dsh-arcvista 0.1.2 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/README.md +26 -0
- package/package.json +4 -2
- package/server.js +17 -2
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -50,6 +50,32 @@ dsh plugin --profile web add dsh-arcvista
|
|
|
50
50
|
dsh plugin --profile web add /absolute/path/to/arc-vista
|
|
51
51
|
```
|
|
52
52
|
|
|
53
|
+
### 内网离线安装
|
|
54
|
+
|
|
55
|
+
内网(无外网、无 npm registry)环境使用离线安装包,由仓库内的构建脚本生成:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
npm run package:intranet # 生成 ../arc-vista-intranet-installer/ 与 ../arc-vista-intranet-installer.zip
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
把 zip 拷进内网后解压:
|
|
62
|
+
|
|
63
|
+
- Windows:双击 `install.bat`;
|
|
64
|
+
- macOS:双击 `install.command`;
|
|
65
|
+
- 任意平台:`node install.mjs`(加 `--dry-run` 先看计划,`--verify` 检查状态,`--uninstall` 卸载)。
|
|
66
|
+
|
|
67
|
+
安装器只做本地文件复制与 DSH profile 注册,不联网、不需要 pnpm;离线 tarball 会留在 profile 的
|
|
68
|
+
`.dsh-offline-plugins/` 里,之后用 pnpm 也能离线解析。装完重启 DSH Web,左侧栏出现「ArcVista 观界」。
|
|
69
|
+
安装包自身说明见 `packaging/intranet/README.md`。
|
|
70
|
+
|
|
71
|
+
内网安全团队需要审查时,生成配套的安全审查材料包:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
npm run package:security-review
|
|
75
|
+
# 生成 ../arc-vista-security-review/ 与 ../arc-vista-security-review.zip
|
|
76
|
+
# 含文件清单、SHA-256、SBOM、静态扫描证据、可复现构建步骤与审批申请模板
|
|
77
|
+
```
|
|
78
|
+
|
|
53
79
|
### 发布与商店
|
|
54
80
|
|
|
55
81
|
- 发布包名:`dsh-arcvista`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-arcvista",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "ArcVista 观界 —— DSH 内的架构观测台:架构图、安全守护、业务知识图谱、复杂度与分支风险对比",
|
|
@@ -54,7 +54,9 @@
|
|
|
54
54
|
"start": "node --disable-warning=ExperimentalWarning server.js",
|
|
55
55
|
"dev": "node --disable-warning=ExperimentalWarning --watch server.js",
|
|
56
56
|
"test": "node --disable-warning=ExperimentalWarning --test tests/*.test.js",
|
|
57
|
-
"prepack": "node --disable-warning=ExperimentalWarning scripts/check-package.mjs"
|
|
57
|
+
"prepack": "node --disable-warning=ExperimentalWarning scripts/check-package.mjs",
|
|
58
|
+
"package:intranet": "node --disable-warning=ExperimentalWarning scripts/build-intranet-package.mjs",
|
|
59
|
+
"package:security-review": "node --disable-warning=ExperimentalWarning scripts/build-intranet-package.mjs && node --disable-warning=ExperimentalWarning scripts/build-security-review.mjs"
|
|
58
60
|
},
|
|
59
61
|
"dsh": {
|
|
60
62
|
"bundle": {
|
package/server.js
CHANGED
|
@@ -11,6 +11,12 @@ import { analyzeModule } from './lib/analyze/drilldown.js';
|
|
|
11
11
|
import { diffSnapshots } from './lib/diff.js';
|
|
12
12
|
|
|
13
13
|
const ROOT = path.dirname(fileURLToPath(import.meta.url));
|
|
14
|
+
let VERSION = '0.0.0';
|
|
15
|
+
try {
|
|
16
|
+
VERSION = JSON.parse(fs.readFileSync(path.join(ROOT, 'package.json'), 'utf8')).version || VERSION;
|
|
17
|
+
} catch {
|
|
18
|
+
/* package metadata is optional at runtime */
|
|
19
|
+
}
|
|
14
20
|
const PUBLIC_DIR = path.join(ROOT, 'public');
|
|
15
21
|
const DATA_DIR = process.env.ARCVISTA_DATA ? path.resolve(process.env.ARCVISTA_DATA) : path.join(ROOT, 'data');
|
|
16
22
|
const PORT = Number(
|
|
@@ -27,6 +33,15 @@ const HOST = process.env.HOST || '127.0.0.1';
|
|
|
27
33
|
*/
|
|
28
34
|
export function createArcVistaApp({ dataDir = DATA_DIR, publicDir = PUBLIC_DIR, backupDir = null, llm = null } = {}) {
|
|
29
35
|
const store = openDatabase(dataDir, backupDir ? { backupDir } : {});
|
|
36
|
+
// DSH manages the model. Remove legacy standalone model settings (including
|
|
37
|
+
// any old API key) so upgrading to the plugin cannot retain a stale secret.
|
|
38
|
+
if (llm?.provider === 'dsh') {
|
|
39
|
+
try {
|
|
40
|
+
store.db.prepare("DELETE FROM settings WHERE key LIKE 'llm_%'").run();
|
|
41
|
+
} catch {
|
|
42
|
+
/* best-effort cleanup for old databases */
|
|
43
|
+
}
|
|
44
|
+
}
|
|
30
45
|
const git = new GitStore(dataDir);
|
|
31
46
|
const jobs = new JobRunner(store);
|
|
32
47
|
const interruptedJobs = store.jobs.interruptActive();
|
|
@@ -254,9 +269,9 @@ function snapshotOption(snapshot) {
|
|
|
254
269
|
router.get('/api/health', () => ({
|
|
255
270
|
ok: true,
|
|
256
271
|
name: 'ArcVista',
|
|
257
|
-
version:
|
|
272
|
+
version: VERSION,
|
|
258
273
|
node: process.version,
|
|
259
|
-
dataDir:
|
|
274
|
+
dataDir: path.dirname(store.file),
|
|
260
275
|
backups: store.backups.info(),
|
|
261
276
|
llm: publicLlmSettings(),
|
|
262
277
|
uptime: Math.round(process.uptime()),
|