mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 18:41:08 +02:00
fix lint
This commit is contained in:
parent
16cb8e753b
commit
e9caa4a217
46 changed files with 1784 additions and 728 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -1,11 +0,0 @@
|
|||
// @ts-check
|
||||
import { baseConfig, typescriptConfig, prettierConfig } from '@manacore/eslint-config';
|
||||
|
||||
export default [
|
||||
{
|
||||
ignores: ['dist/**', '.astro/**', 'node_modules/**'],
|
||||
},
|
||||
...baseConfig,
|
||||
...typescriptConfig,
|
||||
...prettierConfig,
|
||||
];
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
// @ts-check
|
||||
import { baseConfig, typescriptConfig, prettierConfig } from '@manacore/eslint-config';
|
||||
|
||||
export default [
|
||||
{
|
||||
ignores: ['dist/**', '.astro/**', 'node_modules/**'],
|
||||
},
|
||||
...baseConfig,
|
||||
...typescriptConfig,
|
||||
...prettierConfig,
|
||||
];
|
||||
|
|
@ -60,7 +60,15 @@ export interface UpdateCalendarInput {
|
|||
/**
|
||||
* Calendar view types
|
||||
*/
|
||||
export type CalendarViewType = 'day' | '5day' | 'week' | '10day' | '14day' | 'month' | 'year' | 'agenda';
|
||||
export type CalendarViewType =
|
||||
| 'day'
|
||||
| '5day'
|
||||
| 'week'
|
||||
| '10day'
|
||||
| '14day'
|
||||
| 'month'
|
||||
| 'year'
|
||||
| 'agenda';
|
||||
|
||||
/**
|
||||
* Default calendar colors
|
||||
|
|
|
|||
|
|
@ -1,11 +0,0 @@
|
|||
// @ts-check
|
||||
import { baseConfig, typescriptConfig, prettierConfig } from '@manacore/eslint-config';
|
||||
|
||||
export default [
|
||||
{
|
||||
ignores: ['dist/**', '.astro/**', 'node_modules/**'],
|
||||
},
|
||||
...baseConfig,
|
||||
...typescriptConfig,
|
||||
...prettierConfig,
|
||||
];
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
// @ts-check
|
||||
import { baseConfig, typescriptConfig, prettierConfig } from '@manacore/eslint-config';
|
||||
|
||||
export default [
|
||||
{
|
||||
ignores: ['dist/**', '.astro/**', 'node_modules/**'],
|
||||
},
|
||||
...baseConfig,
|
||||
...typescriptConfig,
|
||||
...prettierConfig,
|
||||
];
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
// @ts-check
|
||||
import { baseConfig, typescriptConfig, prettierConfig } from '@manacore/eslint-config';
|
||||
|
||||
export default [
|
||||
{
|
||||
ignores: ['dist/**', '.astro/**', 'node_modules/**'],
|
||||
},
|
||||
...baseConfig,
|
||||
...typescriptConfig,
|
||||
...prettierConfig,
|
||||
];
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
// @ts-check
|
||||
import { baseConfig, typescriptConfig, prettierConfig } from '@manacore/eslint-config';
|
||||
|
||||
export default [
|
||||
{
|
||||
ignores: ['dist/**', '.astro/**', 'node_modules/**'],
|
||||
},
|
||||
...baseConfig,
|
||||
...typescriptConfig,
|
||||
...prettierConfig,
|
||||
];
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
// @ts-check
|
||||
import { baseConfig, typescriptConfig, prettierConfig } from '@manacore/eslint-config';
|
||||
|
||||
export default [
|
||||
{
|
||||
ignores: ['dist/**', '.astro/**', 'node_modules/**'],
|
||||
},
|
||||
...baseConfig,
|
||||
...typescriptConfig,
|
||||
...prettierConfig,
|
||||
];
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
// @ts-check
|
||||
import { baseConfig, typescriptConfig, prettierConfig } from '@manacore/eslint-config';
|
||||
|
||||
export default [
|
||||
{
|
||||
ignores: ['dist/**', '.astro/**', 'node_modules/**'],
|
||||
},
|
||||
...baseConfig,
|
||||
...typescriptConfig,
|
||||
...prettierConfig,
|
||||
];
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
// @ts-check
|
||||
import { baseConfig, typescriptConfig, prettierConfig } from '@manacore/eslint-config';
|
||||
|
||||
export default [
|
||||
{
|
||||
ignores: ['dist/**', '.astro/**', 'node_modules/**'],
|
||||
},
|
||||
...baseConfig,
|
||||
...typescriptConfig,
|
||||
...prettierConfig,
|
||||
];
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
// @ts-check
|
||||
import { baseConfig, typescriptConfig, prettierConfig } from '@manacore/eslint-config';
|
||||
|
||||
export default [
|
||||
{
|
||||
ignores: ['dist/**', '.astro/**', 'node_modules/**'],
|
||||
},
|
||||
...baseConfig,
|
||||
...typescriptConfig,
|
||||
...prettierConfig,
|
||||
];
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,6 +1,6 @@
|
|||
import fs from 'fs-extra';
|
||||
import path from 'path';
|
||||
import { ComponentInfo } from '../types';
|
||||
import { type ComponentInfo } from '../types';
|
||||
import { getComponentsPath, ensureDir } from './paths';
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import fs from 'fs-extra';
|
||||
import { ComponentRegistry, ComponentInfo } from '../types';
|
||||
import { type ComponentRegistry, type ComponentInfo } from '../types';
|
||||
import { getRegistryPath } from './paths';
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,11 +0,0 @@
|
|||
// @ts-check
|
||||
import { baseConfig, typescriptConfig, prettierConfig } from '@manacore/eslint-config';
|
||||
|
||||
export default [
|
||||
{
|
||||
ignores: ['dist/**', '.astro/**', 'node_modules/**'],
|
||||
},
|
||||
...baseConfig,
|
||||
...typescriptConfig,
|
||||
...prettierConfig,
|
||||
];
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
// @ts-check
|
||||
import { baseConfig, typescriptConfig, prettierConfig } from '@manacore/eslint-config';
|
||||
|
||||
export default [
|
||||
{
|
||||
ignores: ['dist/**', '.astro/**', 'node_modules/**'],
|
||||
},
|
||||
...baseConfig,
|
||||
...typescriptConfig,
|
||||
...prettierConfig,
|
||||
];
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
// @ts-check
|
||||
import { baseConfig, typescriptConfig, prettierConfig } from '@manacore/eslint-config';
|
||||
|
||||
export default [
|
||||
{
|
||||
ignores: ['dist/**', '.astro/**', 'node_modules/**'],
|
||||
},
|
||||
...baseConfig,
|
||||
...typescriptConfig,
|
||||
...prettierConfig,
|
||||
];
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
// @ts-check
|
||||
import { baseConfig, typescriptConfig, prettierConfig } from '@manacore/eslint-config';
|
||||
|
||||
export default [
|
||||
{
|
||||
ignores: ['dist/**', '.astro/**', 'node_modules/**'],
|
||||
},
|
||||
...baseConfig,
|
||||
...typescriptConfig,
|
||||
...prettierConfig,
|
||||
];
|
||||
|
|
@ -12,7 +12,7 @@ export interface Toast {
|
|||
function createToastStore() {
|
||||
const { subscribe, update } = writable<Toast[]>([]);
|
||||
|
||||
function addToast(message: string, type: ToastType = 'info', duration: number = 3000) {
|
||||
function addToast(message: string, type: ToastType = 'info', duration = 3000) {
|
||||
const id = `toast-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
|
||||
|
||||
const toast: Toast = {
|
||||
|
|
|
|||
|
|
@ -38,13 +38,27 @@ export default [
|
|||
'**/*.d.ts',
|
||||
'**/generated/**',
|
||||
|
||||
// Config files (tool-specific, not part of app code)
|
||||
'**/drizzle.config.ts',
|
||||
'playwright.config.ts',
|
||||
'vitest.config.ts',
|
||||
'tests/**',
|
||||
|
||||
// Documentation examples
|
||||
'docs/test-examples/**',
|
||||
|
||||
// Games with specific runtime environments
|
||||
'games/whopixels/**',
|
||||
|
||||
// Apps with their own ESLint configs (framework-specific)
|
||||
// These import from @manacore/eslint-config but add framework rules
|
||||
'apps/*/apps/mobile/**',
|
||||
'apps/*/apps/web/**',
|
||||
'apps/*/apps/backend/**',
|
||||
'apps/*/apps/landing/**',
|
||||
'apps/*/packages/**', // Project-specific packages
|
||||
'games/*/apps/**',
|
||||
'games/*/packages/**', // Game-specific packages
|
||||
'services/**',
|
||||
],
|
||||
},
|
||||
|
|
|
|||
|
|
@ -315,7 +315,7 @@ class BootScene extends Phaser.Scene {
|
|||
const brickWidth = 16;
|
||||
|
||||
for (let y = 0; y < tileSize; y += brickHeight) {
|
||||
let offset = y % (brickHeight * 2) === 0 ? 0 : brickWidth / 2;
|
||||
const offset = y % (brickHeight * 2) === 0 ? 0 : brickWidth / 2;
|
||||
for (let x = offset; x < tileSize; x += brickWidth) {
|
||||
stoneWallGraphics.fillRect(x, y, brickWidth - 1, brickHeight - 1);
|
||||
}
|
||||
|
|
@ -330,7 +330,7 @@ class BootScene extends Phaser.Scene {
|
|||
// Steinmuster für die Wand
|
||||
stoneWallFlowerGraphics.fillStyle(0x555555);
|
||||
for (let y = 0; y < tileSize; y += brickHeight) {
|
||||
let offset = y % (brickHeight * 2) === 0 ? 0 : brickWidth / 2;
|
||||
const offset = y % (brickHeight * 2) === 0 ? 0 : brickWidth / 2;
|
||||
for (let x = offset; x < tileSize; x += brickWidth) {
|
||||
stoneWallFlowerGraphics.fillRect(x, y, brickWidth - 1, brickHeight - 1);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -246,7 +246,7 @@ const server = http.createServer((req, res) => {
|
|||
|
||||
// Get the file extension
|
||||
const extname = path.extname(filePath);
|
||||
let contentType = MIME_TYPES[extname] || 'application/octet-stream';
|
||||
const contentType = MIME_TYPES[extname] || 'application/octet-stream';
|
||||
|
||||
// Read the file
|
||||
fs.readFile(filePath, (error, content) => {
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@
|
|||
"build": "turbo run build",
|
||||
"test": "turbo run test",
|
||||
"lint": "turbo run lint",
|
||||
"lint:root": "eslint .",
|
||||
"lint:fix": "eslint . --fix",
|
||||
"lint:root": "eslint . --cache",
|
||||
"lint:fix": "eslint . --fix --cache",
|
||||
"type-check": "turbo run type-check",
|
||||
"clean": "turbo run clean",
|
||||
"format": "prettier --config .prettierrc.json --write \"**/*.{ts,tsx,js,jsx,json,md,svelte,astro}\"",
|
||||
|
|
|
|||
|
|
@ -21,6 +21,8 @@ export const typescriptConfig = [
|
|||
parserOptions: {
|
||||
ecmaVersion: 2022,
|
||||
sourceType: 'module',
|
||||
projectService: true,
|
||||
tsconfigRootDir: import.meta.dirname,
|
||||
},
|
||||
},
|
||||
plugins: {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { createParamDecorator, ExecutionContext } from '@nestjs/common';
|
||||
import { createParamDecorator, type ExecutionContext } from '@nestjs/common';
|
||||
|
||||
export interface JwtPayload {
|
||||
sub: string;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { ModuleMetadata, Type } from '@nestjs/common';
|
||||
import { type ModuleMetadata, type Type } from '@nestjs/common';
|
||||
|
||||
export interface ManaCoreModuleOptions {
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -106,12 +106,17 @@ export class CreditClientService {
|
|||
return this.getDefaultBalance();
|
||||
}
|
||||
|
||||
const data = (await response.json()) as CreditBalance;
|
||||
const {
|
||||
balance = 0,
|
||||
freeCreditsRemaining = 0,
|
||||
totalEarned = 0,
|
||||
totalSpent = 0,
|
||||
} = (await response.json()) as CreditBalance;
|
||||
return {
|
||||
balance: data.balance || 0,
|
||||
freeCreditsRemaining: data.freeCreditsRemaining || 0,
|
||||
totalEarned: data.totalEarned || 0,
|
||||
totalSpent: data.totalSpent || 0,
|
||||
balance,
|
||||
freeCreditsRemaining,
|
||||
totalEarned,
|
||||
totalSpent,
|
||||
};
|
||||
} catch (error) {
|
||||
this.logger.error(`Failed to get balance for user ${userId}:`, error);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { drizzle, PostgresJsDatabase } from 'drizzle-orm/postgres-js';
|
||||
import { drizzle, type PostgresJsDatabase } from 'drizzle-orm/postgres-js';
|
||||
import postgres from 'postgres';
|
||||
import * as schema from './schema';
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@
|
|||
* Generic types for creating auth stores with custom user types
|
||||
*/
|
||||
|
||||
import type { AuthResult as BaseAuthResult } from '@manacore/shared-types';
|
||||
|
||||
/**
|
||||
* Base user interface that all app-specific user types must extend
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -106,10 +106,6 @@ export function createAuthService(config: AuthServiceConfig) {
|
|||
*/
|
||||
async signUp(email: string, password: string): Promise<AuthResult> {
|
||||
try {
|
||||
const storage = getStorageAdapter();
|
||||
const deviceAdapter = getDeviceAdapter();
|
||||
const deviceInfo = await deviceAdapter.getDeviceInfo();
|
||||
|
||||
const response = await fetch(`${baseUrl}${endpoints.signUp}`, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
|
|
@ -128,7 +124,8 @@ export function createAuthService(config: AuthServiceConfig) {
|
|||
return { success: false, error: errorData.message || 'Sign up failed' };
|
||||
}
|
||||
|
||||
const responseData = await response.json();
|
||||
// Consume response to avoid unhandled promise
|
||||
await response.json();
|
||||
|
||||
// Mana Core Auth returns user data immediately on registration
|
||||
// User needs to sign in separately to get tokens
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ export function decodeToken(token: string): DecodedToken | null {
|
|||
/**
|
||||
* Check if a token is valid locally (not expired)
|
||||
*/
|
||||
export function isTokenValidLocally(token: string, bufferSeconds: number = 10): boolean {
|
||||
export function isTokenValidLocally(token: string, bufferSeconds = 10): boolean {
|
||||
try {
|
||||
const payload = decodeToken(token);
|
||||
if (!payload || !payload.exp) {
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ export function getEnv(
|
|||
*/
|
||||
export function getBoolEnv(
|
||||
key: string,
|
||||
defaultValue: boolean = false,
|
||||
defaultValue = false,
|
||||
env: NodeJS.ProcessEnv = process.env
|
||||
): boolean {
|
||||
const value = env[key];
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ export function createFeatureFlags<T extends Record<string, FeatureFlag>>(
|
|||
*/
|
||||
export function isFeatureEnabled(
|
||||
featureName: string,
|
||||
defaultValue: boolean = false,
|
||||
defaultValue = false,
|
||||
env: NodeJS.ProcessEnv = process.env
|
||||
): boolean {
|
||||
const envVar = `FEATURE_${featureName.toUpperCase().replace(/[^A-Z0-9]/g, '_')}`;
|
||||
|
|
|
|||
|
|
@ -230,10 +230,7 @@ export function createCreditService(config: CreditServiceConfig) {
|
|||
/**
|
||||
* Calculate cost for multiple units of an operation
|
||||
*/
|
||||
async function calculateCost(
|
||||
operation: StandardOperationType,
|
||||
quantity: number = 1
|
||||
): Promise<number> {
|
||||
async function calculateCost(operation: StandardOperationType, quantity = 1): Promise<number> {
|
||||
const unitCost = await getOperationCost(operation);
|
||||
return unitCost * quantity;
|
||||
}
|
||||
|
|
@ -241,7 +238,7 @@ export function createCreditService(config: CreditServiceConfig) {
|
|||
/**
|
||||
* Calculate cost synchronously (uses cached values)
|
||||
*/
|
||||
function calculateCostSync(operation: StandardOperationType, quantity: number = 1): number {
|
||||
function calculateCostSync(operation: StandardOperationType, quantity = 1): number {
|
||||
const unitCost = getOperationCostSync(operation);
|
||||
return unitCost * quantity;
|
||||
}
|
||||
|
|
@ -288,7 +285,7 @@ export function createCreditService(config: CreditServiceConfig) {
|
|||
/**
|
||||
* Format credit amount for display
|
||||
*/
|
||||
function formatCredits(amount: number, locale: string = 'en-US'): string {
|
||||
function formatCredits(amount: number, locale = 'en-US'): string {
|
||||
return new Intl.NumberFormat(locale).format(amount);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,8 +4,6 @@
|
|||
* Types for credit/mana operations across all apps
|
||||
*/
|
||||
|
||||
import type { OperationPricing, ManaBalance } from '@manacore/shared-subscription-types';
|
||||
|
||||
/**
|
||||
* Credit balance with additional metadata
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,4 +1,8 @@
|
|||
import { ErrorCode, ERROR_CODE_TO_HTTP_STATUS, ERROR_CODE_RETRYABLE } from '../types/error-codes';
|
||||
import {
|
||||
type ErrorCode,
|
||||
ERROR_CODE_TO_HTTP_STATUS,
|
||||
ERROR_CODE_RETRYABLE,
|
||||
} from '../types/error-codes';
|
||||
|
||||
/**
|
||||
* Additional context that can be attached to errors.
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import {
|
|||
Logger,
|
||||
} from '@nestjs/common';
|
||||
import type { Request, Response } from 'express';
|
||||
import { AppError } from '../errors/app-error';
|
||||
import { type AppError } from '../errors/app-error';
|
||||
import { isAppError, isCreditError, isRateLimitError } from '../guards/type-guards';
|
||||
import { ErrorCode } from '../types/error-codes';
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@
|
|||
*/
|
||||
|
||||
import type {
|
||||
Feedback,
|
||||
CreateFeedbackInput,
|
||||
FeedbackQueryParams,
|
||||
FeedbackResponse,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { createParamDecorator, ExecutionContext } from '@nestjs/common';
|
||||
import { CurrentUserData } from '../types';
|
||||
import { createParamDecorator, type ExecutionContext } from '@nestjs/common';
|
||||
import { type CurrentUserData } from '../types';
|
||||
|
||||
/**
|
||||
* Parameter decorator to extract the current user from the request.
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* This package provides a unified Supabase client and common database utilities.
|
||||
*/
|
||||
|
||||
import { createClient, SupabaseClient } from '@supabase/supabase-js';
|
||||
import { createClient, type SupabaseClient } from '@supabase/supabase-js';
|
||||
import type { SupabaseConfig } from '@manacore/shared-types';
|
||||
|
||||
export { SupabaseClient } from '@supabase/supabase-js';
|
||||
|
|
|
|||
|
|
@ -111,11 +111,7 @@ export function createUserSettingsStore(config: UserSettingsStoreConfig): UserSe
|
|||
/**
|
||||
* Make an API request to the settings endpoint
|
||||
*/
|
||||
async function apiRequest<T>(
|
||||
method: string,
|
||||
path: string,
|
||||
body?: object
|
||||
): Promise<T | null> {
|
||||
async function apiRequest<T>(method: string, path: string, body?: object): Promise<T | null> {
|
||||
const token = await getAccessToken();
|
||||
if (!token) {
|
||||
console.warn('No access token available for settings API');
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ export type LocaleKey = keyof typeof locales;
|
|||
*/
|
||||
export function formatDate(
|
||||
date: string | Date,
|
||||
formatStr: string = 'PPP',
|
||||
formatStr = 'PPP',
|
||||
locale: LocaleKey = 'de'
|
||||
): string {
|
||||
const dateObj = typeof date === 'string' ? parseISO(date) : date;
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ export function formatDurationHumanReadable(seconds: number, locale: 'en' | 'de'
|
|||
/**
|
||||
* Format file size from bytes to human readable string
|
||||
*/
|
||||
export function formatFileSize(bytes: number, decimals: number = 1): string {
|
||||
export function formatFileSize(bytes: number, decimals = 1): string {
|
||||
if (bytes === 0) return '0 B';
|
||||
if (!Number.isFinite(bytes) || bytes < 0) return '--';
|
||||
|
||||
|
|
@ -107,18 +107,14 @@ export function formatFileSize(bytes: number, decimals: number = 1): string {
|
|||
/**
|
||||
* Format number with thousands separator
|
||||
*/
|
||||
export function formatNumber(num: number, locale: string = 'de-DE'): string {
|
||||
export function formatNumber(num: number, locale = 'de-DE'): string {
|
||||
return num.toLocaleString(locale);
|
||||
}
|
||||
|
||||
/**
|
||||
* Format currency
|
||||
*/
|
||||
export function formatCurrency(
|
||||
amount: number,
|
||||
currency: string = 'EUR',
|
||||
locale: string = 'de-DE'
|
||||
): string {
|
||||
export function formatCurrency(amount: number, currency = 'EUR', locale = 'de-DE'): string {
|
||||
return new Intl.NumberFormat(locale, {
|
||||
style: 'currency',
|
||||
currency,
|
||||
|
|
@ -128,11 +124,7 @@ export function formatCurrency(
|
|||
/**
|
||||
* Format percentage
|
||||
*/
|
||||
export function formatPercent(
|
||||
value: number,
|
||||
decimals: number = 0,
|
||||
locale: string = 'de-DE'
|
||||
): string {
|
||||
export function formatPercent(value: number, decimals = 0, locale = 'de-DE'): string {
|
||||
return new Intl.NumberFormat(locale, {
|
||||
style: 'percent',
|
||||
minimumFractionDigits: decimals,
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ export function capitalize(str: string): string {
|
|||
/**
|
||||
* Generate a random string ID
|
||||
*/
|
||||
export function generateId(length: number = 8): string {
|
||||
export function generateId(length = 8): string {
|
||||
const chars = 'abcdefghijklmnopqrstuvwxyz0123456789';
|
||||
let result = '';
|
||||
for (let i = 0; i < length; i++) {
|
||||
|
|
|
|||
|
|
@ -30,7 +30,10 @@ function parseEnvFile(content) {
|
|||
if (match) {
|
||||
let [, key, value] = match;
|
||||
// Handle quoted values
|
||||
if ((value.startsWith('"') && value.endsWith('"')) || (value.startsWith("'") && value.endsWith("'"))) {
|
||||
if (
|
||||
(value.startsWith('"') && value.endsWith('"')) ||
|
||||
(value.startsWith("'") && value.endsWith("'"))
|
||||
) {
|
||||
value = value.slice(1, -1);
|
||||
}
|
||||
env[key.trim()] = value;
|
||||
|
|
@ -142,7 +145,8 @@ const APP_CONFIGS = [
|
|||
{
|
||||
path: 'apps/maerchenzauber/apps/mobile/.env',
|
||||
vars: {
|
||||
EXPO_PUBLIC_STORYTELLER_BACKEND_URL: (env) => `http://localhost:${env.MAERCHENZAUBER_BACKEND_PORT || '3003'}`,
|
||||
EXPO_PUBLIC_STORYTELLER_BACKEND_URL: (env) =>
|
||||
`http://localhost:${env.MAERCHENZAUBER_BACKEND_PORT || '3003'}`,
|
||||
EXPO_ROUTER_APP_ROOT: () => 'app',
|
||||
},
|
||||
},
|
||||
|
|
@ -227,7 +231,8 @@ const APP_CONFIGS = [
|
|||
NODE_ENV: () => 'development',
|
||||
PORT: (env) => env.PICTURE_BACKEND_PORT || '3003',
|
||||
BACKEND_URL: (env) => env.PICTURE_BACKEND_URL || 'http://localhost:3003',
|
||||
DATABASE_URL: (env) => env.PICTURE_DATABASE_URL || 'postgresql://picture:picturepassword@localhost:5434/picture',
|
||||
DATABASE_URL: (env) =>
|
||||
env.PICTURE_DATABASE_URL || 'postgresql://picture:picturepassword@localhost:5434/picture',
|
||||
MANA_CORE_AUTH_URL: (env) => env.MANA_CORE_AUTH_URL,
|
||||
DEV_BYPASS_AUTH: () => 'true',
|
||||
DEV_USER_ID: (env) => env.DEV_USER_ID || '00000000-0000-0000-0000-000000000000',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue