miravo 0.7.1 → 0.7.3
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/miravo.js +9 -8
- package/package.json +8 -6
package/bin/miravo.js
CHANGED
|
@@ -7,6 +7,8 @@ const { spawnSync } = require("node:child_process");
|
|
|
7
7
|
const PLATFORM_PACKAGES = new Map([
|
|
8
8
|
["linux/x64", "@miravo/cli-linux-x64"],
|
|
9
9
|
["linux/arm64", "@miravo/cli-linux-arm64"],
|
|
10
|
+
["linux/x64/musl", "@miravo/cli-linux-x64-musl"],
|
|
11
|
+
["linux/arm64/musl", "@miravo/cli-linux-arm64-musl"],
|
|
10
12
|
["darwin/x64", "@miravo/cli-darwin-x64"],
|
|
11
13
|
["darwin/arm64", "@miravo/cli-darwin-arm64"],
|
|
12
14
|
["win32/x64", "@miravo/cli-windows-x64"],
|
|
@@ -31,6 +33,11 @@ function detectMuslLibc(options = {}) {
|
|
|
31
33
|
return false;
|
|
32
34
|
}
|
|
33
35
|
|
|
36
|
+
function resolvePackageName(platform, arch, options = {}) {
|
|
37
|
+
const libc = platform === "linux" && detectMuslLibc(options) ? "/musl" : "";
|
|
38
|
+
return PLATFORM_PACKAGES.get(`${platform}/${arch}${libc}`);
|
|
39
|
+
}
|
|
40
|
+
|
|
34
41
|
function fail(message) {
|
|
35
42
|
process.stderr.write(`miravo: ${message}\n`);
|
|
36
43
|
process.exit(1);
|
|
@@ -39,7 +46,7 @@ function fail(message) {
|
|
|
39
46
|
function main() {
|
|
40
47
|
const platform = process.platform;
|
|
41
48
|
const arch = process.arch;
|
|
42
|
-
const packageName =
|
|
49
|
+
const packageName = resolvePackageName(platform, arch);
|
|
43
50
|
|
|
44
51
|
if (!packageName) {
|
|
45
52
|
fail(
|
|
@@ -47,12 +54,6 @@ function main() {
|
|
|
47
54
|
);
|
|
48
55
|
}
|
|
49
56
|
|
|
50
|
-
if (platform === "linux" && detectMuslLibc()) {
|
|
51
|
-
fail(
|
|
52
|
-
`Linux musl (for example Alpine) is unsupported for package-manager installs. Use https://miravo.dev/install, Docker, or a standalone archive.`,
|
|
53
|
-
);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
57
|
let pkgJsonPath;
|
|
57
58
|
try {
|
|
58
59
|
pkgJsonPath = require.resolve(`${packageName}/package.json`, { paths: [__dirname] });
|
|
@@ -81,4 +82,4 @@ if (require.main === module) {
|
|
|
81
82
|
main();
|
|
82
83
|
}
|
|
83
84
|
|
|
84
|
-
module.exports = { main, resolveBinaryName, detectMuslLibc };
|
|
85
|
+
module.exports = { main, resolveBinaryName, detectMuslLibc, resolvePackageName };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "miravo",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.3",
|
|
4
4
|
"description": "Industrial environment platform — Node launcher that runs the platform-specific Miravo binary.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -20,11 +20,13 @@
|
|
|
20
20
|
"node": ">=18"
|
|
21
21
|
},
|
|
22
22
|
"optionalDependencies": {
|
|
23
|
-
"@miravo/cli-linux-x64": "0.7.
|
|
24
|
-
"@miravo/cli-linux-arm64": "0.7.
|
|
25
|
-
"@miravo/cli-
|
|
26
|
-
"@miravo/cli-
|
|
27
|
-
"@miravo/cli-
|
|
23
|
+
"@miravo/cli-linux-x64": "0.7.3",
|
|
24
|
+
"@miravo/cli-linux-arm64": "0.7.3",
|
|
25
|
+
"@miravo/cli-linux-x64-musl": "0.7.3",
|
|
26
|
+
"@miravo/cli-linux-arm64-musl": "0.7.3",
|
|
27
|
+
"@miravo/cli-darwin-x64": "0.7.3",
|
|
28
|
+
"@miravo/cli-darwin-arm64": "0.7.3",
|
|
29
|
+
"@miravo/cli-windows-x64": "0.7.3"
|
|
28
30
|
},
|
|
29
31
|
"exports": {
|
|
30
32
|
"./package.json": "./package.json"
|