devspace-kit 1.2.0 → 1.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.
|
Binary file
|
package/bin/devspace-darwin-x64
CHANGED
|
Binary file
|
package/bin/devspace-linux-arm64
CHANGED
|
Binary file
|
package/bin/devspace-linux-x64
CHANGED
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "devspace-kit",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Interactive CLI for scaffolding applications, Docker and Kubernetes configurations",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -18,8 +18,15 @@
|
|
|
18
18
|
"README.md",
|
|
19
19
|
"LICENSE"
|
|
20
20
|
],
|
|
21
|
-
"os": [
|
|
22
|
-
|
|
21
|
+
"os": [
|
|
22
|
+
"win32",
|
|
23
|
+
"darwin",
|
|
24
|
+
"linux"
|
|
25
|
+
],
|
|
26
|
+
"cpu": [
|
|
27
|
+
"x64",
|
|
28
|
+
"arm64"
|
|
29
|
+
],
|
|
23
30
|
"engines": {
|
|
24
31
|
"node": ">=22"
|
|
25
32
|
},
|
|
@@ -35,4 +42,4 @@
|
|
|
35
42
|
"prepack": "npm run build",
|
|
36
43
|
"postinstall": "node scripts/install.js"
|
|
37
44
|
}
|
|
38
|
-
}
|
|
45
|
+
}
|
package/scripts/install.js
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
const fs = require("node:fs");
|
|
4
4
|
const path = require("node:path");
|
|
5
|
+
const { spawnSync } = require("node:child_process");
|
|
6
|
+
|
|
7
|
+
const supported = new Set([
|
|
8
|
+
"win32-x64",
|
|
9
|
+
"darwin-x64",
|
|
10
|
+
"darwin-arm64",
|
|
11
|
+
"linux-x64",
|
|
12
|
+
"linux-arm64",
|
|
13
|
+
]);
|
|
5
14
|
|
|
6
15
|
const target = process.platform + "-" + process.arch;
|
|
7
16
|
const extension = process.platform === "win32" ? ".exe" : "";
|
|
@@ -14,6 +23,10 @@ const executable = path.resolve(
|
|
|
14
23
|
);
|
|
15
24
|
|
|
16
25
|
try {
|
|
26
|
+
if (!supported.has(target)) {
|
|
27
|
+
throw new Error("Unsupported platform: " + target);
|
|
28
|
+
}
|
|
29
|
+
|
|
17
30
|
if (!fs.existsSync(executable)) {
|
|
18
31
|
throw new Error("Executable not found: " + executable);
|
|
19
32
|
}
|
|
@@ -22,7 +35,21 @@ try {
|
|
|
22
35
|
fs.chmodSync(executable, 0o755);
|
|
23
36
|
}
|
|
24
37
|
|
|
25
|
-
|
|
38
|
+
const result = spawnSync(executable, ["welcome"], {
|
|
39
|
+
stdio: "inherit",
|
|
40
|
+
shell: false,
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
if (result.error) {
|
|
44
|
+
throw result.error;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
if (result.status !== 0) {
|
|
48
|
+
throw new Error(
|
|
49
|
+
"Welcome command failed: " +
|
|
50
|
+
(result.signal || "exit code " + result.status)
|
|
51
|
+
);
|
|
52
|
+
}
|
|
26
53
|
} catch (error) {
|
|
27
54
|
console.error("Devspace installation failed: " + error.message);
|
|
28
55
|
process.exit(1);
|