From b30823bf386abbfcfd922400bf424a35591679a0 Mon Sep 17 00:00:00 2001 From: Max Peintner Date: Thu, 10 Jul 2025 15:46:48 +0200 Subject: [PATCH] cleanup tsconfig --- login/apps/login/scripts/README.md | 3 +- .../apps/login/scripts/prepare-standalone.js | 29 ++----------------- login/apps/login/tsconfig.standalone.json | 27 ----------------- 3 files changed, 3 insertions(+), 56 deletions(-) delete mode 100644 login/apps/login/tsconfig.standalone.json diff --git a/login/apps/login/scripts/README.md b/login/apps/login/scripts/README.md index 3427fe79b6..774a09872a 100644 --- a/login/apps/login/scripts/README.md +++ b/login/apps/login/scripts/README.md @@ -8,7 +8,6 @@ This directory contains the simplified scripts needed for managing the ZITADEL L - `package.json` - Main package file (monorepo mode with `workspace:*`) - `package.standalone.json` - Pre-configured standalone version (uses `latest`) -- `tsconfig.standalone.json` - TypeScript configuration for standalone mode - `scripts/prepare-standalone.js` - Conversion script ### Generated/Temporary Files @@ -30,7 +29,7 @@ node scripts/prepare-standalone.js [--install] **What it does:** - Copies `package.standalone.json` → `package.json` -- Copies `tsconfig.standalone.json` → `tsconfig.json` +- Confirms all configurations are unified and ready for standalone use - Optionally runs `npm install` ## šŸš€ **Simplified Approach** diff --git a/login/apps/login/scripts/prepare-standalone.js b/login/apps/login/scripts/prepare-standalone.js index cb490132eb..f827151afe 100644 --- a/login/apps/login/scripts/prepare-standalone.js +++ b/login/apps/login/scripts/prepare-standalone.js @@ -9,11 +9,7 @@ import fs from 'fs/promises'; import { execSync } from 'child_process'; const CONFIG_FILES = [ - { - source: 'tsconfig.standalone.json', - target: 'tsconfig.json', - required: true - } + // TypeScript config is now unified - no separate standalone version needed ]; async function prepareStandalone() { @@ -39,28 +35,7 @@ async function prepareStandalone() { throw new Error('package.standalone.json not found!'); } - // Step 2: Copy TypeScript configuration - console.log('\nāš™ļø Setting up TypeScript configuration...'); - for (const config of CONFIG_FILES) { - try { - const sourceExists = await fs.access(config.source).then(() => true).catch(() => false); - if (sourceExists) { - await fs.copyFile(config.source, config.target); - console.log(` āœ… ${config.source} → ${config.target}`); - } else if (config.required) { - throw new Error(`Required file ${config.source} not found!`); - } else { - console.log(` āš ļø ${config.source} not found, skipping`); - } - } catch (error) { - if (config.required) { - throw error; - } - console.warn(` āŒ Failed to copy ${config.source}: ${error.message}`); - } - } - - // Step 3: Install dependencies if requested + // Step 2: Install dependencies if requested if (shouldInstall) { console.log('\nšŸ“„ Installing dependencies...'); try { diff --git a/login/apps/login/tsconfig.standalone.json b/login/apps/login/tsconfig.standalone.json deleted file mode 100644 index e59724b283..0000000000 --- a/login/apps/login/tsconfig.standalone.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "lib": ["dom", "dom.iterable", "esnext"], - "allowJs": true, - "skipLibCheck": true, - "strict": true, - "noEmit": true, - "esModuleInterop": true, - "module": "esnext", - "moduleResolution": "bundler", - "resolveJsonModule": true, - "isolatedModules": true, - "jsx": "preserve", - "incremental": true, - "plugins": [ - { - "name": "next" - } - ], - "paths": { - "@/*": ["./src/*"] - } - }, - "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], - "exclude": ["node_modules"] -}