@foxden-app/foxclaw 0.5.72 → 0.5.74
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 +16 -0
- package/dist/main.js +3 -1
- package/dist/update.d.ts +1 -1
- package/dist/update.js +6 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
All notable FoxClaw changes are listed here. Each release note is bilingual so GitHub Releases and the npm package are useful to both Chinese and English readers.
|
|
4
4
|
|
|
5
|
+
## 0.5.74 - 2026-07-11
|
|
6
|
+
|
|
7
|
+
### 中文
|
|
8
|
+
- FoxClaw 现在优先保留 Node 实际调用的 `process.argv[1]` 作为自身入口,而不是使用会解析软链接的 `import.meta.url`。这样 pnpm 11 shim 中的 `global/v11/<instance>` 布局信息不会在进入更新器前丢失,自更新可以保持在 pnpm 11 隔离全局目录中完成。
|
|
9
|
+
|
|
10
|
+
### English
|
|
11
|
+
- FoxClaw now preserves Node's invoked `process.argv[1]` as its own entry point instead of relying on `import.meta.url`, which resolves symlinks. This retains pnpm 11's `global/v11/<instance>` layout information before self-update starts, allowing updates to remain within the pnpm 11 isolated global installation.
|
|
12
|
+
|
|
13
|
+
## 0.5.73 - 2026-07-11
|
|
14
|
+
|
|
15
|
+
### 中文
|
|
16
|
+
- 当 pnpm 10 与 pnpm 11 全局安装同时存在时,自更新会根据 `pnpm root -g` 返回的当前布局选择对应 CLI shim:`global/5` 使用 `PNPM_HOME/foxclaw`,`global/v11` 使用 `PNPM_HOME/bin/foxclaw`,避免升级后把 systemd 服务切到另一套全局安装。
|
|
17
|
+
|
|
18
|
+
### English
|
|
19
|
+
- When pnpm 10 and pnpm 11 global installations coexist, self-update now selects the CLI shim that matches the current `pnpm root -g` layout: `PNPM_HOME/foxclaw` for `global/5`, and `PNPM_HOME/bin/foxclaw` for `global/v11`. This prevents the systemd service from switching to the other global installation after an update.
|
|
20
|
+
|
|
5
21
|
## 0.5.72 - 2026-07-11
|
|
6
22
|
|
|
7
23
|
### 中文
|
package/dist/main.js
CHANGED
|
@@ -22,7 +22,9 @@ const rawCommand = process.argv[2];
|
|
|
22
22
|
const command = rawCommand || 'serve';
|
|
23
23
|
loadEnv();
|
|
24
24
|
const packageRoot = path.dirname(path.dirname(fileURLToPath(import.meta.url)));
|
|
25
|
-
const entryPoint =
|
|
25
|
+
const entryPoint = process.argv[1]
|
|
26
|
+
? path.resolve(process.argv[1])
|
|
27
|
+
: fileURLToPath(import.meta.url);
|
|
26
28
|
const PROXY_ENV_KEYS = [
|
|
27
29
|
'HTTP_PROXY',
|
|
28
30
|
'HTTPS_PROXY',
|
package/dist/update.d.ts
CHANGED
|
@@ -87,6 +87,6 @@ export declare function readPendingClusterUpdateBroadcast(filePath: string): Pen
|
|
|
87
87
|
export declare function writePendingClusterUpdateBroadcast(filePath: string, value: PendingClusterUpdateBroadcast): void;
|
|
88
88
|
export declare function clearPendingClusterUpdateBroadcast(filePath: string): void;
|
|
89
89
|
export declare function resolveFoxclawEntryPointFromGlobalRoot(globalRoot: string, exists?: (target: string) => boolean): string | null;
|
|
90
|
-
export declare function resolveFoxclawEntryPointFromPnpmHome(pnpmHome: string, exists?: (target: string) => boolean, readText?: (target: string) => string): string | null;
|
|
90
|
+
export declare function resolveFoxclawEntryPointFromPnpmHome(pnpmHome: string, preferBin?: boolean, exists?: (target: string) => boolean, readText?: (target: string) => string): string | null;
|
|
91
91
|
export declare function extractReleaseNotes(changelog: string, version: string, locale: AppLocale): string[] | null;
|
|
92
92
|
export {};
|
package/dist/update.js
CHANGED
|
@@ -478,11 +478,11 @@ export function resolveFoxclawEntryPointFromGlobalRoot(globalRoot, exists = fs.e
|
|
|
478
478
|
];
|
|
479
479
|
return candidates.find(candidate => exists(candidate)) ?? null;
|
|
480
480
|
}
|
|
481
|
-
export function resolveFoxclawEntryPointFromPnpmHome(pnpmHome, exists = fs.existsSync, readText = (target) => fs.readFileSync(target, 'utf8')) {
|
|
482
|
-
const
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
];
|
|
481
|
+
export function resolveFoxclawEntryPointFromPnpmHome(pnpmHome, preferBin = false, exists = fs.existsSync, readText = (target) => fs.readFileSync(target, 'utf8')) {
|
|
482
|
+
const commandName = process.platform === 'win32' ? 'foxclaw.cmd' : 'foxclaw';
|
|
483
|
+
const rootShim = path.join(pnpmHome, commandName);
|
|
484
|
+
const binShim = path.join(pnpmHome, 'bin', commandName);
|
|
485
|
+
const shimCandidates = preferBin ? [binShim, rootShim] : [rootShim, binShim];
|
|
486
486
|
for (const shim of shimCandidates) {
|
|
487
487
|
if (!exists(shim))
|
|
488
488
|
continue;
|
|
@@ -514,7 +514,7 @@ function resolveUpdatedEntryPoint(installer, env) {
|
|
|
514
514
|
throw new Error(`Could not locate the updated global package root using ${installer.manager}.`);
|
|
515
515
|
}
|
|
516
516
|
const updatedEntryPoint = (installer.pnpmHome
|
|
517
|
-
? resolveFoxclawEntryPointFromPnpmHome(installer.pnpmHome)
|
|
517
|
+
? resolveFoxclawEntryPointFromPnpmHome(installer.pnpmHome, /^v\d+$/.test(path.basename(globalRoot)))
|
|
518
518
|
: null)
|
|
519
519
|
?? resolveFoxclawEntryPointFromGlobalRoot(globalRoot);
|
|
520
520
|
if (!updatedEntryPoint) {
|