@spenceriam/impulse 0.36.0 → 1.0.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.
- package/bin/impulse +19 -29
- package/package.json +6 -7
- package/postinstall.mjs +2 -2
package/bin/impulse
CHANGED
|
@@ -47,40 +47,30 @@ function findBinary() {
|
|
|
47
47
|
const { platform, arch } = detectPlatformAndArch();
|
|
48
48
|
const packageName = `@spenceriam/impulse-${platform}-${arch}`;
|
|
49
49
|
const binaryName = platform === "windows" ? "impulse.exe" : "impulse";
|
|
50
|
-
const packageCandidates = [packageName];
|
|
51
50
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
for (const candidate of packageCandidates) {
|
|
58
|
-
try {
|
|
59
|
-
const packageJsonPath = require.resolve(`${candidate}/package.json`);
|
|
60
|
-
const packageDir = dirname(packageJsonPath);
|
|
61
|
-
const binaryPath = join(packageDir, "bin", binaryName);
|
|
62
|
-
|
|
63
|
-
if (!existsSync(binaryPath)) {
|
|
64
|
-
continue;
|
|
65
|
-
}
|
|
51
|
+
try {
|
|
52
|
+
const packageJsonPath = require.resolve(`${packageName}/package.json`);
|
|
53
|
+
const packageDir = dirname(packageJsonPath);
|
|
54
|
+
const binaryPath = join(packageDir, "bin", binaryName);
|
|
66
55
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
// Try next candidate package.
|
|
56
|
+
if (!existsSync(binaryPath)) {
|
|
57
|
+
throw new Error(`Binary not found at ${binaryPath}`);
|
|
70
58
|
}
|
|
71
|
-
}
|
|
72
59
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
60
|
+
return binaryPath;
|
|
61
|
+
} catch (error) {
|
|
62
|
+
// Check if symlinked binary exists in same directory
|
|
63
|
+
const localBinary = join(__dirname, binaryName);
|
|
64
|
+
if (existsSync(localBinary)) {
|
|
65
|
+
return localBinary;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
throw new Error(
|
|
69
|
+
`Could not find IMPULSE binary for ${platform}-${arch}.\n` +
|
|
70
|
+
`Package ${packageName} may not be installed.\n` +
|
|
71
|
+
`Try reinstalling: npm install -g @spenceriam/impulse`
|
|
72
|
+
);
|
|
77
73
|
}
|
|
78
|
-
|
|
79
|
-
throw new Error(
|
|
80
|
-
`Could not find IMPULSE binary for ${platform}-${arch}.\n` +
|
|
81
|
-
`Checked packages: ${packageCandidates.join(", ")}.\n` +
|
|
82
|
-
`Try reinstalling: npm install -g @spenceriam/impulse`
|
|
83
|
-
);
|
|
84
74
|
}
|
|
85
75
|
|
|
86
76
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spenceriam/impulse",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Terminal-based AI coding agent powered by Z.ai's Coding Plan",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bin": {
|
|
@@ -21,11 +21,10 @@
|
|
|
21
21
|
"access": "public"
|
|
22
22
|
},
|
|
23
23
|
"optionalDependencies": {
|
|
24
|
-
"@spenceriam/impulse-linux-x64": "0.
|
|
25
|
-
"@spenceriam/impulse-linux-arm64": "0.
|
|
26
|
-
"@spenceriam/impulse-darwin-x64": "0.
|
|
27
|
-
"@spenceriam/impulse-darwin-arm64": "0.
|
|
28
|
-
"@spenceriam/impulse-windows-x64": "0.
|
|
29
|
-
"@spenceriam/impulse-windows-arm64": "0.36.0"
|
|
24
|
+
"@spenceriam/impulse-linux-x64": "1.0.0",
|
|
25
|
+
"@spenceriam/impulse-linux-arm64": "1.0.0",
|
|
26
|
+
"@spenceriam/impulse-darwin-x64": "1.0.0",
|
|
27
|
+
"@spenceriam/impulse-darwin-arm64": "1.0.0",
|
|
28
|
+
"@spenceriam/impulse-windows-x64": "1.0.0"
|
|
30
29
|
}
|
|
31
30
|
}
|
package/postinstall.mjs
CHANGED
|
@@ -54,14 +54,14 @@ function findBinary() {
|
|
|
54
54
|
"darwin-x64",
|
|
55
55
|
"darwin-arm64",
|
|
56
56
|
"windows-x64",
|
|
57
|
-
"windows-arm64",
|
|
58
57
|
];
|
|
59
58
|
|
|
60
59
|
const combo = `${platform}-${arch}`;
|
|
61
60
|
if (!supportedCombos.includes(combo)) {
|
|
62
61
|
throw new Error(
|
|
63
62
|
`Unsupported platform: ${platform}-${arch}\n` +
|
|
64
|
-
`IMPULSE currently supports: ${supportedCombos.join(", ")}`
|
|
63
|
+
`IMPULSE currently supports: ${supportedCombos.join(", ")}\n` +
|
|
64
|
+
`Windows ARM64 support is pending Bun's cross-compile target.`
|
|
65
65
|
);
|
|
66
66
|
}
|
|
67
67
|
|