@hjxarthuratlas/claw-adr 0.0.0-stage → 2.1.1
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/adr-darwin-arm64 +0 -0
- package/bin/adr-linux-amd64 +0 -0
- package/bin/adr-linux-arm64 +0 -0
- package/bin/claw-adr.js +19 -0
- package/package.json +23 -4
- package/README.md +0 -3
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/bin/claw-adr.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// claw-adr 的 npm 启动器:按平台选择随包发布的 Go 二进制并转发参数、退出码与信号。
|
|
3
|
+
'use strict';
|
|
4
|
+
const { spawnSync } = require('child_process');
|
|
5
|
+
const path = require('path');
|
|
6
|
+
const fs = require('fs');
|
|
7
|
+
|
|
8
|
+
const key = `${process.platform}-${process.arch}`; // 例:linux-x64 / linux-arm64 / darwin-arm64
|
|
9
|
+
const bin = path.join(__dirname, `adr-${key}`);
|
|
10
|
+
if (!fs.existsSync(bin)) {
|
|
11
|
+
process.stderr.write(`claw-adr: 没有适用于 ${key} 的二进制(已提供 linux-x64 / linux-arm64 / darwin-arm64)\n`);
|
|
12
|
+
process.exit(2);
|
|
13
|
+
}
|
|
14
|
+
const result = spawnSync(bin, process.argv.slice(2), { stdio: 'inherit' });
|
|
15
|
+
if (result.error) {
|
|
16
|
+
process.stderr.write(`claw-adr: 启动失败: ${result.error.message}\n`);
|
|
17
|
+
process.exit(1);
|
|
18
|
+
}
|
|
19
|
+
process.exit(result.signal ? 1 : result.status);
|
package/package.json
CHANGED
|
@@ -1,6 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hjxarthuratlas/claw-adr",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "2.1.1",
|
|
4
|
+
"description": "决策记录(ADR)命令行:新建、校验、按改动面列出管辖记录、提案与批准、取代链、索引生成。Go 静态二进制,本包按平台选择可执行文件。",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": "git@github.com:HJXArthurAtlas/claw-adr.git",
|
|
7
|
+
"bin": {
|
|
8
|
+
"adr": "bin/claw-adr.js"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"bin"
|
|
12
|
+
],
|
|
13
|
+
"engines": {
|
|
14
|
+
"node": ">=18"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"adr",
|
|
18
|
+
"decision-records",
|
|
19
|
+
"governance",
|
|
20
|
+
"agent"
|
|
21
|
+
],
|
|
22
|
+
"publishConfig": {
|
|
23
|
+
"access": "public"
|
|
24
|
+
}
|
|
25
|
+
}
|
package/README.md
DELETED