refactor(paths): P5 — getCcWorkDir() single source, drop 37 hardcoded /home/ubuntu
Per audit §7 / H1: ~37 src files hardcoded '/home/ubuntu/ccWorkDir', welding the
whole pipeline to one container (external CI / other machines crash).
- new src/core/paths.ts: getCcWorkDir() (env CCWORKDIR || default) + getWebSrc()
- swept 36 files: '/home/ubuntu/ccWorkDir<sub>' literals → `${getCcWorkDir()}<sub>`
templates; collapsed 3 inline (process.env.CCWORKDIR || '...') dupes to getCcWorkDir()
- covers webapi mirror (_loader WEB_SRC/JNPF_UTILS_UUID + 24 module *_SRC), db/verify
paths, drift/coverage/selfcheck, buildformdata, codegen, render, blindspot boot paths
- playwright .cache path + doc-comment refs left as-is (not ccWorkDir-rooted)
Verified: tsc 0 (validates every inserted import path); runtime menu webapi
initWebapi OK; smoke form list returns real data (WEB_SRC end-to-end via getCcWorkDir);
vitest unit 336 pass.
Co-Authored-By: Claude <[email protected]>
This commit is contained in:
1 parent
2c6e92d3e9
commit
571ac27ab2
37 files changed
+102
-50
No files matched your search
@@ -16,10 +16,11 @@
|
||||
* - defHttp shim 用 JnpfClient 实现 (Node CLI 环境)
|
||||
* - initWebapi(client) 一次性初始化 + 缓存
|
||||
*/
|
||||
import { getCcWorkDir } from '../core/paths.ts'
|
||||
import { JnpfClient } from '../core/client.ts'
|
||||
import { loadWebModule } from './_loader.ts'
|
||||
|
||||
const SYSTEM_SRC = '/home/ubuntu/ccWorkDir/web/apps/jnpf-web-apps-main/src/api/system/system.ts'
|
||||
const SYSTEM_SRC = `${getCcWorkDir()}/web/apps/jnpf-web-apps-main/src/api/system/system.ts`
|
||||
|
||||
let cached: any = null
|
||||
|
||||
|
||||
Reference in new issue
Block a user