refactor(core): finish TypeScript workspace migration

This commit is contained in:
tommy0103
2026-07-12 00:37:32 +08:00
parent 83d5703f7b
commit 535d8edb4d
31 changed files with 326 additions and 199 deletions
+1
View File
@@ -130,6 +130,7 @@ function replaceDbWithTemp(tempDbPath, dbPath) {
function resolveSchemaPath() {
const candidates = [
path.join(__dirname, 'schema.sql'),
path.join(__dirname, '..', '..', '..', 'packages', 'core', 'src', 'schema.sql'),
path.join(__dirname, '..', 'scripts', 'schema.sql'),
process.resourcesPath ? path.join(process.resourcesPath, 'scripts', 'schema.sql') : null,
].filter((c): c is string => Boolean(c));
+2 -2
View File
@@ -17,7 +17,7 @@ import {
codexRawId,
codexParentThreadId,
readCodexGuardianThreadInfo,
} from '../../../packages/core/src/parsing.mjs';
} from '../../../packages/core/src/parsing.ts';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
@@ -41,7 +41,7 @@ interface FileInfo {
function resolveSchemaPath() {
const candidates = [
path.join(__dirname, 'schema.sql'),
path.join(__dirname, '..', '..', '..', 'scripts', 'schema.sql'),
path.join(__dirname, '..', '..', '..', 'packages', 'core', 'src', 'schema.sql'),
process.resourcesPath ? path.join(process.resourcesPath, 'scripts', 'schema.sql') : null,
].filter((c): c is string => Boolean(c));
const found = candidates.find(p => fs.existsSync(p));