@qfeius/everyline-cli 0.1.5 → 0.1.6
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/bin/checksums.txt +6 -6
- package/bin/darwin-amd64/everyline-cli +0 -0
- package/bin/darwin-arm64/everyline-cli +0 -0
- package/bin/linux-amd64/everyline-cli +0 -0
- package/bin/linux-arm64/everyline-cli +0 -0
- package/bin/windows-amd64/everyline-cli.exe +0 -0
- package/bin/windows-arm64/everyline-cli.exe +0 -0
- package/docs/everyline-cli-skill-guide.md +10 -0
- package/package.json +1 -1
- package/scripts/install.js +37 -0
- package/skills/everyline-review/SKILL.md +1 -1
- package/skills/everyline-review-config/SKILL.md +1 -1
package/bin/checksums.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
42972378fcae2b729ce992ccc9d07af56980537956d46bca71cd5dcb7c0040a6 bin/darwin-amd64/everyline-cli
|
|
2
|
+
21e6f194166a29efd88702a77b0b75f0870040cdf3da0360907f3699fb959e78 bin/darwin-arm64/everyline-cli
|
|
3
|
+
0436b26cf2efd8d0a9745cfd17fd95781381a18d7a0480af9b6e9c81eeb6d297 bin/linux-amd64/everyline-cli
|
|
4
|
+
12262192b44e3178d732b27c39a16473995061605e3219bde8c72406568b4903 bin/linux-arm64/everyline-cli
|
|
5
|
+
a2dc6aaf804744a8a1905b32919255d8ce5be0fa5263bed57b048ac458af5f5e bin/windows-amd64/everyline-cli.exe
|
|
6
|
+
bc0af994fac92aa8624f3a96bce1ccc5198f09d713642ddf2d1ba55f9441208e bin/windows-arm64/everyline-cli.exe
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -641,3 +641,13 @@ Windows PowerShell 使用自定义 prefix 时:
|
|
|
641
641
|
$EverylineNpmPrefix = Join-Path $HOME ".local"
|
|
642
642
|
npm uninstall -g --prefix $EverylineNpmPrefix @qfeius/everyline-cli
|
|
643
643
|
```
|
|
644
|
+
|
|
645
|
+
### 恢复缺失的命令入口
|
|
646
|
+
|
|
647
|
+
macOS/Linux 全局包仍存在但 `everyline-cli` 命令入口缺失时,使用原安装 prefix 执行:
|
|
648
|
+
|
|
649
|
+
```bash
|
|
650
|
+
npm rebuild -g --foreground-scripts --allow-scripts=@qfeius/everyline-cli @qfeius/everyline-cli
|
|
651
|
+
```
|
|
652
|
+
|
|
653
|
+
安装脚本会按包实际所在 prefix 检查并恢复缺失链接;显式设置 `--bin-links=false` 时跳过恢复。已有文件或链接保持原样;Windows 的命令 shim 由 npm rebuild 管理。入口后来再次被删除时,需要重新执行恢复命令,不会在后台自动重建。
|
package/package.json
CHANGED
package/scripts/install.js
CHANGED
|
@@ -346,6 +346,40 @@ function ensureFirstInstallState(packageRoot, environment, userHome, platform, r
|
|
|
346
346
|
return { path: statePath, ...JSON.parse(output) };
|
|
347
347
|
}
|
|
348
348
|
|
|
349
|
+
/**
|
|
350
|
+
* restoreGlobalCommand 恢复 macOS/Linux 全局包缺失的命令链接,保留已有入口。
|
|
351
|
+
* 入参:packageRoot(string)为包目录;platform(string)为平台;environment(object)为 npm 环境。
|
|
352
|
+
* 返回值:void;禁用命令链接、非全局、Windows 或非标准全局布局直接返回,文件系统错误向上传递。
|
|
353
|
+
*/
|
|
354
|
+
function restoreGlobalCommand(packageRoot, platform, environment) {
|
|
355
|
+
// 尊重 npm 显式禁用命令链接的选择,避免 postinstall 重新创建已被 npm 跳过的入口。
|
|
356
|
+
if (environment.npm_config_bin_links === "false" ||
|
|
357
|
+
environment.npm_config_global !== "true" || platform === "win32") return;
|
|
358
|
+
// 从包实际所在位置推导 prefix,避免使用另一个 Node/npm 的全局目录。
|
|
359
|
+
const root = resolve(packageRoot);
|
|
360
|
+
const modules = dirname(dirname(root));
|
|
361
|
+
if (basename(root) !== "everyline-cli" || basename(dirname(root)) !== "@qfeius" ||
|
|
362
|
+
basename(modules) !== "node_modules" || basename(dirname(modules)) !== "lib") return;
|
|
363
|
+
const source = join(root, "scripts", "run.js");
|
|
364
|
+
if (!existsSync(source)) throw new Error(`npm 包缺少命令入口: ${source}`);
|
|
365
|
+
const target = join(dirname(dirname(modules)), "bin", "everyline-cli");
|
|
366
|
+
try {
|
|
367
|
+
// lstat 也能识别失效链接;已有入口交给 npm 管理,绝不覆盖用户文件。
|
|
368
|
+
lstatSync(target);
|
|
369
|
+
return;
|
|
370
|
+
} catch (error) {
|
|
371
|
+
if (error.code !== "ENOENT") throw error;
|
|
372
|
+
}
|
|
373
|
+
mkdirSync(dirname(target), { recursive: true });
|
|
374
|
+
chmodSync(source, 0o755);
|
|
375
|
+
try {
|
|
376
|
+
symlinkSync(source, target);
|
|
377
|
+
} catch (error) {
|
|
378
|
+
// 并发 npm 已创建入口时保留其结果。
|
|
379
|
+
if (error.code !== "EEXIST") throw error;
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
|
|
349
383
|
/**
|
|
350
384
|
* installPackage 保留首次安装意图,将三宿主同步、废弃入口迁出和最终安装状态提交放在同一恢复流程中。
|
|
351
385
|
* 入参:options(object,可选),可注入 packageRoot、platform、architecture、environment 和 userHome 供安装与测试使用。
|
|
@@ -368,6 +402,8 @@ function installPackage(options = {}) {
|
|
|
368
402
|
chmodSync(binary, 0o755);
|
|
369
403
|
}
|
|
370
404
|
|
|
405
|
+
restoreGlobalCommand(packageRoot, platform, environment);
|
|
406
|
+
|
|
371
407
|
if (!shouldInstallCodexSkill(environment)) {
|
|
372
408
|
return {
|
|
373
409
|
binary,
|
|
@@ -492,6 +528,7 @@ if (require.main === module) {
|
|
|
492
528
|
}
|
|
493
529
|
|
|
494
530
|
module.exports = {
|
|
531
|
+
restoreGlobalCommand,
|
|
495
532
|
formatInstallOutput,
|
|
496
533
|
installPackage,
|
|
497
534
|
ensureFirstInstallState,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: everyline-review
|
|
3
3
|
description: "负责 EveryLine CLI 安装配置、身份授权与恢复;使用 EveryLine CLI 发起或继续单份合同智能审查,包括沙箱附件、审查主体、清单、强度、任务状态和完整签名结果链接;合同起草、一般法律咨询及规则维护不使用本 Skill。"
|
|
4
4
|
metadata:
|
|
5
|
-
version: "0.1.
|
|
5
|
+
version: "0.1.6"
|
|
6
6
|
requires:
|
|
7
7
|
bins: ["everyline-cli"]
|
|
8
8
|
cliHelp: "everyline-cli --help;everyline-cli auth --help;everyline-cli review file upload --help;everyline-cli review task start --help;everyline-cli review task result --help"
|