@1memory/cli 1.0.3 → 1.0.4-dev.2

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.
Files changed (2) hide show
  1. package/bin/cli.js +2 -15
  2. package/package.json +6 -6
package/bin/cli.js CHANGED
@@ -54,21 +54,8 @@ if (!bin) {
54
54
  process.exit(1);
55
55
  }
56
56
 
57
- // 前端产物解耦(2026-09-20):CLI 运行时按 ONEMEMORY_WEB_DIST 查找 tree-ui 产物。
58
- // 此处解析 @1memory/web-dist 的实际位置并注入——Rust 侧无需知道 npm 布局,
59
- // 亦便于用户自备前端(自己设 ONEMEMORY_WEB_DIST 即覆盖,此处不覆盖已有值)。
60
- const env = { ...process.env };
61
- if (!env.ONEMEMORY_WEB_DIST) {
62
- try {
63
- const pkgJson = require.resolve('@1memory/web-dist/package.json');
64
- const distDir = path.join(path.dirname(pkgJson), 'dist');
65
- if (existsSync(path.join(distDir, 'index.html'))) env.ONEMEMORY_WEB_DIST = distDir;
66
- } catch {
67
- // 未装 web-dist:不阻断。仅 `1memory web` 会给出明确指引,其余命令照常。
68
- }
69
- }
70
-
71
- const r = spawnSync(bin, process.argv.slice(2), { stdio: 'inherit', env });
57
+ // 页面在编译 CLI 时由 include_dir 打进二进制,运行时不再查找 web-dist。
58
+ const r = spawnSync(bin, process.argv.slice(2), { stdio: 'inherit', env: process.env });
72
59
  if (r.error) {
73
60
  console.error(`1memory: ${r.error.message}`);
74
61
  process.exit(1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1memory/cli",
3
- "version": "1.0.3",
3
+ "version": "1.0.4-dev.2",
4
4
  "description": "1memory CLI — encrypted cross-device AI memory",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -18,10 +18,10 @@
18
18
  "node": ">=16"
19
19
  },
20
20
  "optionalDependencies": {
21
- "@1memory/cli-linux-x64": "1.0.3",
22
- "@1memory/cli-linux-arm64": "1.0.3",
23
- "@1memory/cli-darwin-arm64": "1.0.3",
24
- "@1memory/cli-win32-x64": "1.0.3",
25
- "@1memory/cli-win32-arm64": "1.0.3"
21
+ "@1memory/cli-linux-x64": "1.0.4-dev.2",
22
+ "@1memory/cli-linux-arm64": "1.0.4-dev.2",
23
+ "@1memory/cli-darwin-arm64": "1.0.4-dev.2",
24
+ "@1memory/cli-win32-x64": "1.0.4-dev.2",
25
+ "@1memory/cli-win32-arm64": "1.0.4-dev.2"
26
26
  }
27
27
  }