fix: update legacy runtime path

- Changed the legacy runtime path from 'legacy-runtime.js' to 'index.js'
in runtime configuration.
- Added a new start script (start.js) to check for the existence of the
built TypeScript server entrypoint and import it.
This commit is contained in:
Haileyesus
2026-03-16 16:16:00 +03:00
parent 695da128f3
commit 23c39a42b1
10 changed files with 119 additions and 2649 deletions

View File

@@ -620,7 +620,7 @@ function writeMarkdown(filePath, summary, records, realtimeContracts) {
}
const clientFiles = walkFiles(clientRoot).filter(filePath => /\.(js|jsx|ts|tsx)$/.test(filePath));
const legacyRuntimePath = path.join(serverRoot, 'legacy-runtime.js');
const legacyRuntimePath = path.join(serverRoot, 'index.js');
const runtimeContent = readText(legacyRuntimePath);
const mounts = parseMounts(runtimeContent);
const records = [];
@@ -639,7 +639,7 @@ const summary = {
httpRoutes: records.filter(record => record.transport === 'http').length,
sseRoutes: records.filter(record => record.transport === 'sse').length,
modularRoutes: records.filter(record => record.sourceFile.includes('/routes/')).length,
inlineRoutes: records.filter(record => record.sourceFile === 'server/legacy-runtime.js').length,
inlineRoutes: records.filter(record => record.sourceFile === 'server/index.js').length,
routeFilesScanned: new Set(records.map(record => record.sourceFile)).size,
};