fix(M06-R): 修复静态检查路径兼容

This commit is contained in:
Codex
2026-08-10 19:20:47 +08:00
parent 95cc5ea444
commit da5751f191
5 changed files with 63 additions and 4 deletions
+2 -1
View File
@@ -1,8 +1,9 @@
import assert from 'node:assert/strict';
import { readFileSync } from 'node:fs';
import { join } from 'node:path';
import { fileURLToPath } from 'node:url';
const root = new URL('..', import.meta.url).pathname.replace(/^\/([A-Za-z]:)/, '$1');
const root = fileURLToPath(new URL('..', import.meta.url));
const read = (path) => readFileSync(join(root, path), 'utf8');
const packageJson = JSON.parse(read('admin/package.json'));