Restructure compute core by extracting job contracts and runtime logic into separate modules (`contracts.ts`, `local-runtime.ts`) for improved modularity and clearer API boundaries. Update exports and imports across worker, server, and local compute backends to use the new modules. Enhance Next.js config to support dynamic backend selection via build-time constants and aliasing, enabling seamless switching between local and worker compute modes. Adjust TypeScript paths and Dockerfile entrypoint to align with the new structure.
36 lines
931 B
JSON
36 lines
931 B
JSON
{
|
|
"compilerOptions": {
|
|
"target": "ES2017",
|
|
"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/*"],
|
|
"@openreader/compute-core": ["./compute/core/src/index.ts"],
|
|
"@openreader/compute-core/contracts": ["./compute/core/src/contracts.ts"],
|
|
"@openreader/compute-core/local-runtime": ["./compute/core/src/local-runtime.ts"]
|
|
}
|
|
},
|
|
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
|
|
"exclude": [
|
|
"node_modules",
|
|
"docs-site",
|
|
"docs-site/**",
|
|
"compute/worker",
|
|
"compute/worker/**"
|
|
]
|
|
}
|