@hjxarthuratlas/claw-adr 2.1.1 → 2.1.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.
Binary file
Binary file
Binary file
package/bin/claw-adr.js CHANGED
@@ -5,10 +5,12 @@ const { spawnSync } = require('child_process');
5
5
  const path = require('path');
6
6
  const fs = require('fs');
7
7
 
8
- const key = `${process.platform}-${process.arch}`; // 例:linux-x64 / linux-arm64 / darwin-arm64
8
+ // 二进制文件名用 Go 的写法 amd64;Node 在 64 位 x86 上报告的架构名是 x64
9
+ const arch = process.arch === 'x64' ? 'amd64' : process.arch;
10
+ const key = `${process.platform}-${arch}`; // 例:linux-amd64 / linux-arm64 / darwin-arm64
9
11
  const bin = path.join(__dirname, `adr-${key}`);
10
12
  if (!fs.existsSync(bin)) {
11
- process.stderr.write(`claw-adr: 没有适用于 ${key} 的二进制(已提供 linux-x64 / linux-arm64 / darwin-arm64)\n`);
13
+ process.stderr.write(`claw-adr: 没有适用于 ${key} 的二进制(已提供 linux-amd64 / linux-arm64 / darwin-arm64)\n`);
12
14
  process.exit(2);
13
15
  }
14
16
  const result = spawnSync(bin, process.argv.slice(2), { stdio: 'inherit' });
package/package.json CHANGED
@@ -1,9 +1,12 @@
1
1
  {
2
2
  "name": "@hjxarthuratlas/claw-adr",
3
- "version": "2.1.1",
3
+ "version": "2.1.2",
4
4
  "description": "决策记录(ADR)命令行:新建、校验、按改动面列出管辖记录、提案与批准、取代链、索引生成。Go 静态二进制,本包按平台选择可执行文件。",
5
5
  "license": "MIT",
6
- "repository": "git@github.com:HJXArthurAtlas/claw-adr.git",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+ssh://git@github.com/HJXArthurAtlas/claw-adr.git"
9
+ },
7
10
  "bin": {
8
11
  "adr": "bin/claw-adr.js"
9
12
  },