feat: improve mindspace asset handling and local runtime paths
This commit is contained in:
+2
-4
@@ -7,9 +7,7 @@ import path from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
const root = path.join(path.dirname(fileURLToPath(import.meta.url)), '..');
|
||||
const defaultPlazaDir = fs.existsSync(path.join(root, '../test-memindplaza/app/plaza/package.json'))
|
||||
? path.join(root, '../test-memindplaza/app/plaza')
|
||||
: path.join(root, '../tkmind_go/ui/plaza');
|
||||
const defaultPlazaDir = path.join(root, '../memind_plaza');
|
||||
const plazaDir = process.env.PLAZA_APP_DIR ?? defaultPlazaDir;
|
||||
const opsDir = path.join(root, 'ops');
|
||||
const portalPort = Number(process.env.H5_PORT ?? 8081);
|
||||
@@ -125,7 +123,7 @@ const opsEnv = {
|
||||
|
||||
function ensurePlazaApp() {
|
||||
if (!fs.existsSync(path.join(plazaDir, 'package.json'))) {
|
||||
throw new Error(`未找到 Plaza Next.js:${plazaDir}。请设置 PLAZA_APP_DIR 指向本地 Plaza 源码,例如 ../test-memindplaza/app/plaza`);
|
||||
throw new Error(`未找到 Plaza Next.js:${plazaDir}。请设置 PLAZA_APP_DIR 指向本地 Plaza 源码,例如 ../memind_plaza`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user