@baize-ai/core 0.3.10 → 0.3.11
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
CHANGED
|
@@ -5,6 +5,11 @@ All notable changes to baize-core will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.3.11] - 2026-08-27
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- web-console 渠道安装:`cliPath()` 增加大陆 install.sh 布局候选(`~/.local/node/lib/node_modules/@baize-ai/core/cli/baize.js`)+ `npm root -g` 动态兜底——此前候选硬编码 `~/.npm-global`,大陆安装(Node 在 `~/.local/node`)报「baize CLI not found」,web 安装飞书/渠道失败
|
|
12
|
+
|
|
8
13
|
## [0.3.10] - 2026-08-27
|
|
9
14
|
|
|
10
15
|
### Fixed
|
package/package.json
CHANGED
|
@@ -495,8 +495,22 @@ export function cliPath() {
|
|
|
495
495
|
path.join(__dirname, '../../../cli/baize.js'),
|
|
496
496
|
path.join(__dirname, '../../../node_modules/@baize-ai/core/cli/baize.js'),
|
|
497
497
|
path.join(os.homedir(), '.npm-global', 'lib', 'node_modules', '@baize-ai', 'core', 'cli', 'baize.js'),
|
|
498
|
+
// Mainland install.sh layout: Node installed from the npmmirror binary
|
|
499
|
+
// mirror into ~/.local/node, so the global core package lives there.
|
|
500
|
+
path.join(os.homedir(), '.local', 'node', 'lib', 'node_modules', '@baize-ai', 'core', 'cli', 'baize.js'),
|
|
498
501
|
];
|
|
499
|
-
|
|
502
|
+
const found = candidates.find((c) => fs.existsSync(c));
|
|
503
|
+
if (found) return found;
|
|
504
|
+
// Dynamic fallback: resolve via the user's actual global npm root — covers
|
|
505
|
+
// any prefix (mainland ~/.local/node, homebrew, nvm, custom) when npm is on
|
|
506
|
+
// PATH. Static candidates take precedence so source-tree / skills-copy
|
|
507
|
+
// layouts always win.
|
|
508
|
+
try {
|
|
509
|
+
const root = execFileSync('npm', ['root', '-g'], { encoding: 'utf8', timeout: 10000, stdio: 'pipe' }).trim();
|
|
510
|
+
const p = path.join(root, '@baize-ai', 'core', 'cli', 'baize.js');
|
|
511
|
+
if (fs.existsSync(p)) return p;
|
|
512
|
+
} catch { /* npm unavailable */ }
|
|
513
|
+
return null;
|
|
500
514
|
}
|
|
501
515
|
|
|
502
516
|
function runCli(args, deps = {}) {
|