@spenceriam/impulse 1.6.0 → 1.6.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 +2 -1
- package/package.json +8 -7
- package/platform-package.mjs +10 -0
- package/postinstall.mjs +4 -3
package/bin/impulse
CHANGED
|
@@ -5,6 +5,7 @@ import { existsSync } from "fs";
|
|
|
5
5
|
import { join, dirname } from "path";
|
|
6
6
|
import { fileURLToPath } from "url";
|
|
7
7
|
import { createRequire } from "module";
|
|
8
|
+
import { platformPackageName } from "../platform-package.mjs";
|
|
8
9
|
import os from "os";
|
|
9
10
|
|
|
10
11
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
@@ -45,7 +46,7 @@ function detectPlatformAndArch() {
|
|
|
45
46
|
|
|
46
47
|
function findBinary() {
|
|
47
48
|
const { platform, arch } = detectPlatformAndArch();
|
|
48
|
-
const packageName =
|
|
49
|
+
const packageName = platformPackageName(platform, arch);
|
|
49
50
|
const binaryName = platform === "windows" ? "impulse.exe" : "impulse";
|
|
50
51
|
|
|
51
52
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spenceriam/impulse",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.2",
|
|
4
4
|
"description": "Provider-flexible terminal AI coding agent",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bin": {
|
|
@@ -16,15 +16,16 @@
|
|
|
16
16
|
"homepage": "https://github.com/spenceriam/impulse#readme",
|
|
17
17
|
"keywords": ["ai", "cli", "impulse", "terminal", "coding", "agent"],
|
|
18
18
|
"author": "Spencer Francisco",
|
|
19
|
-
"files": ["bin/*", "postinstall.mjs"],
|
|
19
|
+
"files": ["bin/*", "postinstall.mjs", "platform-package.mjs"],
|
|
20
20
|
"publishConfig": {
|
|
21
21
|
"access": "public"
|
|
22
22
|
},
|
|
23
23
|
"optionalDependencies": {
|
|
24
|
-
"@spenceriam/impulse-linux-x64": "1.6.
|
|
25
|
-
"@spenceriam/impulse-linux-arm64": "1.6.
|
|
26
|
-
"@spenceriam/impulse-darwin-x64": "1.6.
|
|
27
|
-
"@spenceriam/impulse-darwin-arm64": "1.6.
|
|
28
|
-
"@spenceriam/impulse-windows-x64": "1.6.
|
|
24
|
+
"@spenceriam/impulse-linux-x64": "1.6.2",
|
|
25
|
+
"@spenceriam/impulse-linux-arm64": "1.6.2",
|
|
26
|
+
"@spenceriam/impulse-darwin-x64": "1.6.2",
|
|
27
|
+
"@spenceriam/impulse-darwin-arm64": "1.6.2",
|
|
28
|
+
"@spenceriam/impulse-windows-x64": "1.6.2",
|
|
29
|
+
"@spenceriam/impulse-win32-arm64": "1.6.2"
|
|
29
30
|
}
|
|
30
31
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* npm platform package names. Windows ARM64 uses win32-arm64 because
|
|
3
|
+
* @spenceriam/impulse-windows-arm64 was unpublished and cannot be reclaimed.
|
|
4
|
+
*/
|
|
5
|
+
export function platformPackageName(platform, arch) {
|
|
6
|
+
if (platform === "windows" && arch === "arm64") {
|
|
7
|
+
return "@spenceriam/impulse-win32-arm64";
|
|
8
|
+
}
|
|
9
|
+
return `@spenceriam/impulse-${platform}-${arch}`;
|
|
10
|
+
}
|
package/postinstall.mjs
CHANGED
|
@@ -5,6 +5,7 @@ import path from "path";
|
|
|
5
5
|
import os from "os";
|
|
6
6
|
import { fileURLToPath } from "url";
|
|
7
7
|
import { createRequire } from "module";
|
|
8
|
+
import { platformPackageName } from "./platform-package.mjs";
|
|
8
9
|
|
|
9
10
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
10
11
|
const require = createRequire(import.meta.url);
|
|
@@ -44,7 +45,7 @@ function detectPlatformAndArch() {
|
|
|
44
45
|
|
|
45
46
|
function findBinary() {
|
|
46
47
|
const { platform, arch } = detectPlatformAndArch();
|
|
47
|
-
const packageName =
|
|
48
|
+
const packageName = platformPackageName(platform, arch);
|
|
48
49
|
const binaryName = platform === "windows" ? "impulse.exe" : "impulse";
|
|
49
50
|
|
|
50
51
|
// Check for unsupported platform/arch combinations
|
|
@@ -54,14 +55,14 @@ function findBinary() {
|
|
|
54
55
|
"darwin-x64",
|
|
55
56
|
"darwin-arm64",
|
|
56
57
|
"windows-x64",
|
|
58
|
+
"windows-arm64",
|
|
57
59
|
];
|
|
58
60
|
|
|
59
61
|
const combo = `${platform}-${arch}`;
|
|
60
62
|
if (!supportedCombos.includes(combo)) {
|
|
61
63
|
throw new Error(
|
|
62
64
|
`Unsupported platform: ${platform}-${arch}\n` +
|
|
63
|
-
`impulse currently supports: ${supportedCombos.join(", ")}
|
|
64
|
-
`Windows ARM64 support is pending Bun's cross-compile target.`
|
|
65
|
+
`impulse currently supports: ${supportedCombos.join(", ")}`
|
|
65
66
|
);
|
|
66
67
|
}
|
|
67
68
|
|