The installer and launcher is an Electron app in apps/launcher: main process, a sandboxed preload that only forwards allowed channels, and a React window translated into Chinese and English. Every renderer -> main call is declared once in the IPC contract (shared/ipc/contract.ts) with zod schemas for its input and output; the main side validates both when it registers a handler. The main process throws error codes only, and the window translates them. The launcher's own settings (for now the window language) are kept in the user data folder and written through a temporary file and a rename. Development runs can point the user data folder elsewhere with WTO_LAUNCHER_USER_DATA. The workspace packages (@wto/patcher, @wto/server) stay external to the bundle: they ship as TypeScript sources and will run in utility processes, where Electron's Node strips the types and they find their web pages, tuning and keys next to their sources as they do today. The root typecheck leaves out the launcher, which has its own tsconfig files for the main process and the window. Checked with the launcher typecheck, electron-vite build, the root typecheck, and a start on a scratch user data folder.
26 lines
766 B
JSON
26 lines
766 B
JSON
{
|
|
"compilerOptions": {
|
|
"target": "ES2023",
|
|
"module": "ESNext",
|
|
"moduleResolution": "bundler",
|
|
"lib": ["ES2023", "DOM", "DOM.Iterable"],
|
|
"jsx": "react-jsx",
|
|
"strict": true,
|
|
"noUncheckedIndexedAccess": true,
|
|
"noImplicitOverride": true,
|
|
"exactOptionalPropertyTypes": true,
|
|
"verbatimModuleSyntax": true,
|
|
"allowImportingTsExtensions": true,
|
|
"resolveJsonModule": true,
|
|
"noEmit": true,
|
|
"skipLibCheck": true,
|
|
"forceConsistentCasingInFileNames": true,
|
|
"useDefineForClassFields": true,
|
|
"paths": {
|
|
"@shared/*": ["./src/shared/*"],
|
|
"@/*": ["./src/renderer/src/*"]
|
|
}
|
|
},
|
|
"include": ["src/renderer/src/**/*.ts", "src/renderer/src/**/*.tsx", "src/preload/index.d.ts", "src/shared/**/*.ts"]
|
|
}
|