@agentfare/forge 0.2.3 → 0.3.0

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.
Files changed (2) hide show
  1. package/install.js +11 -2
  2. package/package.json +1 -1
package/install.js CHANGED
@@ -57,7 +57,12 @@ async function main() {
57
57
 
58
58
  const { goos, goarch } = getPlatform();
59
59
  const archiveName = `forge_${VERSION}_${goos}_${goarch}.tar.gz`;
60
- const url = `https://github.com/MjxUpUp/forge/releases/download/v${VERSION}/${archiveName}`;
60
+
61
+ // Support custom binary host for regions with poor GitHub connectivity.
62
+ // Usage: FORGE_BINARY_HOST=https://mirror.example.com npm install -g @agentfare/forge
63
+ const baseUrl = process.env.FORGE_BINARY_HOST
64
+ || "https://github.com/MjxUpUp/forge/releases/download";
65
+ const url = `${baseUrl}/v${VERSION}/${archiveName}`;
61
66
 
62
67
  const archivePath = path.join(binDir, archiveName);
63
68
  console.log(`Downloading forge v${VERSION} for ${goos}/${goarch}...`);
@@ -84,6 +89,10 @@ async function main() {
84
89
 
85
90
  main().catch((err) => {
86
91
  console.error("Installation failed:", err.message);
87
- console.error("You can download forge manually from https://github.com/MjxUpUp/forge/releases");
92
+ console.error("");
93
+ console.error("If GitHub is unreachable, set a mirror:");
94
+ console.error(" FORGE_BINARY_HOST=https://your-mirror.com npm install -g @agentfare/forge");
95
+ console.error("");
96
+ console.error("Or download manually: https://github.com/MjxUpUp/forge/releases");
88
97
  process.exit(1);
89
98
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentfare/forge",
3
- "version": "0.2.3",
3
+ "version": "0.3.0",
4
4
  "description": "AI 开发质量门禁引擎 — 结构化门禁管道,在 AI 生成的代码进入仓库前进行质量锻造",
5
5
  "bin": {
6
6
  "forge": "run.js"