@spenceriam/impulse 1.1.4 → 1.2.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.
package/bin/impulse CHANGED
@@ -66,7 +66,7 @@ function findBinary() {
66
66
  }
67
67
 
68
68
  throw new Error(
69
- `Could not find IMPULSE binary for ${platform}-${arch}.\n` +
69
+ `Could not find impulse binary for ${platform}-${arch}.\n` +
70
70
  `Package ${packageName} may not be installed.\n` +
71
71
  `Try reinstalling: npm install -g @spenceriam/impulse`
72
72
  );
@@ -82,7 +82,7 @@ try {
82
82
  });
83
83
 
84
84
  child.on("error", (err) => {
85
- console.error("Failed to start IMPULSE:", err.message);
85
+ console.error("Failed to start impulse:", err.message);
86
86
  process.exit(1);
87
87
  });
88
88
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spenceriam/impulse",
3
- "version": "1.1.4",
3
+ "version": "1.2.2",
4
4
  "description": "Provider-flexible terminal AI coding agent",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -21,10 +21,10 @@
21
21
  "access": "public"
22
22
  },
23
23
  "optionalDependencies": {
24
- "@spenceriam/impulse-linux-x64": "1.1.4",
25
- "@spenceriam/impulse-linux-arm64": "1.1.4",
26
- "@spenceriam/impulse-darwin-x64": "1.1.4",
27
- "@spenceriam/impulse-darwin-arm64": "1.1.4",
28
- "@spenceriam/impulse-windows-x64": "1.1.4"
24
+ "@spenceriam/impulse-linux-x64": "1.2.2",
25
+ "@spenceriam/impulse-linux-arm64": "1.2.2",
26
+ "@spenceriam/impulse-darwin-x64": "1.2.2",
27
+ "@spenceriam/impulse-darwin-arm64": "1.2.2",
28
+ "@spenceriam/impulse-windows-x64": "1.2.2"
29
29
  }
30
30
  }
package/postinstall.mjs CHANGED
@@ -60,7 +60,7 @@ function findBinary() {
60
60
  if (!supportedCombos.includes(combo)) {
61
61
  throw new Error(
62
62
  `Unsupported platform: ${platform}-${arch}\n` +
63
- `IMPULSE currently supports: ${supportedCombos.join(", ")}\n` +
63
+ `impulse currently supports: ${supportedCombos.join(", ")}\n` +
64
64
  `Windows ARM64 support is pending Bun's cross-compile target.`
65
65
  );
66
66
  }
@@ -76,7 +76,15 @@ function findBinary() {
76
76
 
77
77
  return { binaryPath, binaryName };
78
78
  } catch (error) {
79
- throw new Error(`Could not find package ${packageName}: ${error.message}`);
79
+ const wrapperPkg = JSON.parse(
80
+ fs.readFileSync(path.join(__dirname, "package.json"), "utf8")
81
+ );
82
+ throw new Error(
83
+ `Could not find package ${packageName}: ${error.message}\n` +
84
+ `The platform optional dependency may have failed to install (for example npm 404 on a broken publish).\n` +
85
+ `Try: npm cache clean --force && npm i -g @spenceriam/impulse@${wrapperPkg.version}\n` +
86
+ `Or use the macOS/Linux/Windows archives from the GitHub release for v${wrapperPkg.version}.`
87
+ );
80
88
  }
81
89
  }
82
90
 
@@ -126,13 +134,13 @@ async function main() {
126
134
 
127
135
  symlinkBinary(binaryPath, targetPath);
128
136
 
129
- console.log(`IMPULSE binary symlinked: ${targetPath} -> ${binaryPath}`);
130
- console.log(`IMPULSE installed successfully!`);
137
+ console.log(`impulse binary symlinked: ${targetPath} -> ${binaryPath}`);
138
+ console.log(`impulse installed successfully!`);
131
139
  }
132
140
 
133
141
  main().catch((error) => {
134
- console.error("Failed to setup IMPULSE binary:", error.message);
135
- console.error("You may need to install Bun and run IMPULSE directly:");
142
+ console.error("Failed to setup impulse binary:", error.message);
143
+ console.error("You may need to install Bun and run impulse directly:");
136
144
  console.error(" curl -fsSL https://bun.sh/install | bash");
137
145
  console.error(" bun x @spenceriam/impulse");
138
146
  process.exit(1);