@mistydemeo/cargodisttest 0.2.249 → 0.2.251
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/binary-install.js +9 -60
- package/binary.js +1 -3
- package/npm-shrinkwrap.json +78 -3
- package/package.json +4 -3
package/binary-install.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
const {
|
|
2
|
-
const { join
|
|
1
|
+
const { existsSync, mkdirSync } = require("fs");
|
|
2
|
+
const { join } = require("path");
|
|
3
3
|
const { spawnSync } = require("child_process");
|
|
4
|
-
const { tmpdir } = require("os");
|
|
5
4
|
|
|
6
5
|
const axios = require("axios");
|
|
6
|
+
const tar = require("tar");
|
|
7
7
|
const rimraf = require("rimraf");
|
|
8
|
-
const tmpDir = tmpdir();
|
|
9
8
|
|
|
10
9
|
const error = (msg) => {
|
|
11
10
|
console.error(msg);
|
|
@@ -13,7 +12,7 @@ const error = (msg) => {
|
|
|
13
12
|
};
|
|
14
13
|
|
|
15
14
|
class Package {
|
|
16
|
-
constructor(name, url,
|
|
15
|
+
constructor(name, url, binaries) {
|
|
17
16
|
let errors = [];
|
|
18
17
|
if (typeof url !== "string") {
|
|
19
18
|
errors.push("url must be a string");
|
|
@@ -49,8 +48,6 @@ class Package {
|
|
|
49
48
|
}
|
|
50
49
|
this.url = url;
|
|
51
50
|
this.name = name;
|
|
52
|
-
this.filename = filename;
|
|
53
|
-
this.zipExt = zipExt;
|
|
54
51
|
this.installDirectory = join(__dirname, "node_modules", ".bin_real");
|
|
55
52
|
this.binaries = binaries;
|
|
56
53
|
|
|
@@ -93,59 +90,11 @@ class Package {
|
|
|
93
90
|
return axios({ ...fetchOptions, url: this.url, responseType: "stream" })
|
|
94
91
|
.then((res) => {
|
|
95
92
|
return new Promise((resolve, reject) => {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
if (/\.tar\.*/.test(this.zipExt)) {
|
|
102
|
-
const result = spawnSync("tar", [
|
|
103
|
-
"xf",
|
|
104
|
-
tempFile,
|
|
105
|
-
// The tarballs are stored with a leading directory
|
|
106
|
-
// component; we strip one component in the
|
|
107
|
-
// shell installers too.
|
|
108
|
-
"--strip-components",
|
|
109
|
-
"1",
|
|
110
|
-
"-C",
|
|
111
|
-
this.installDirectory,
|
|
112
|
-
]);
|
|
113
|
-
if (result.status == 0) {
|
|
114
|
-
resolve();
|
|
115
|
-
} else if (result.error) {
|
|
116
|
-
reject(result.error);
|
|
117
|
-
} else {
|
|
118
|
-
reject(
|
|
119
|
-
new Error(
|
|
120
|
-
`An error occurred untarring the artifact: stdout: ${result.stdout}; stderr: ${result.stderr}`,
|
|
121
|
-
),
|
|
122
|
-
);
|
|
123
|
-
}
|
|
124
|
-
} else if (this.zipExt == ".zip") {
|
|
125
|
-
const result = spawnSync("unzip", [
|
|
126
|
-
"-q",
|
|
127
|
-
tempFile,
|
|
128
|
-
"-d",
|
|
129
|
-
this.installDirectory,
|
|
130
|
-
]);
|
|
131
|
-
if (result.status == 0) {
|
|
132
|
-
resolve();
|
|
133
|
-
} else if (result.error) {
|
|
134
|
-
reject(result.error);
|
|
135
|
-
} else {
|
|
136
|
-
reject(
|
|
137
|
-
new Error(
|
|
138
|
-
`An error occurred unzipping the artifact: stdout: ${result.stdout}; stderr: ${result.stderr}`,
|
|
139
|
-
),
|
|
140
|
-
);
|
|
141
|
-
}
|
|
142
|
-
} else {
|
|
143
|
-
reject(
|
|
144
|
-
new Error(`Unrecognized file extension: ${this.zipExt}`),
|
|
145
|
-
);
|
|
146
|
-
}
|
|
147
|
-
});
|
|
148
|
-
});
|
|
93
|
+
const sink = res.data.pipe(
|
|
94
|
+
tar.x({ strip: 1, C: this.installDirectory }),
|
|
95
|
+
);
|
|
96
|
+
sink.on("finish", () => resolve());
|
|
97
|
+
sink.on("error", (err) => reject(err));
|
|
149
98
|
});
|
|
150
99
|
})
|
|
151
100
|
.then(() => {
|
package/binary.js
CHANGED
|
@@ -94,9 +94,7 @@ const getPlatform = () => {
|
|
|
94
94
|
const getPackage = () => {
|
|
95
95
|
const platform = getPlatform();
|
|
96
96
|
const url = `${artifactDownloadUrl}/${platform.artifactName}`;
|
|
97
|
-
let
|
|
98
|
-
let ext = platform.zipExt;
|
|
99
|
-
let binary = new Package(name, url, filename, ext, platform.bins);
|
|
97
|
+
let binary = new Package(name, url, platform.bins);
|
|
100
98
|
|
|
101
99
|
return binary;
|
|
102
100
|
};
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
"axios-proxy-builder": "^0.1.2",
|
|
12
12
|
"console.table": "^0.10.0",
|
|
13
13
|
"detect-libc": "^2.0.3",
|
|
14
|
-
"rimraf": "^5.0.8"
|
|
14
|
+
"rimraf": "^5.0.8",
|
|
15
|
+
"tar": "^7.4.3"
|
|
15
16
|
},
|
|
16
17
|
"devDependencies": {
|
|
17
18
|
"prettier": "^3.3.3"
|
|
@@ -23,7 +24,7 @@
|
|
|
23
24
|
"hasInstallScript": true,
|
|
24
25
|
"license": "MIT OR Apache-2.0",
|
|
25
26
|
"name": "@mistydemeo/cargodisttest",
|
|
26
|
-
"version": "0.2.
|
|
27
|
+
"version": "0.2.251"
|
|
27
28
|
},
|
|
28
29
|
"node_modules/@isaacs/cliui": {
|
|
29
30
|
"dependencies": {
|
|
@@ -42,6 +43,18 @@
|
|
|
42
43
|
"resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz",
|
|
43
44
|
"version": "8.0.2"
|
|
44
45
|
},
|
|
46
|
+
"node_modules/@isaacs/fs-minipass": {
|
|
47
|
+
"dependencies": {
|
|
48
|
+
"minipass": "^7.0.4"
|
|
49
|
+
},
|
|
50
|
+
"engines": {
|
|
51
|
+
"node": ">=18.0.0"
|
|
52
|
+
},
|
|
53
|
+
"integrity": "sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w==",
|
|
54
|
+
"license": "ISC",
|
|
55
|
+
"resolved": "https://registry.npmjs.org/@isaacs/fs-minipass/-/fs-minipass-4.0.1.tgz",
|
|
56
|
+
"version": "4.0.1"
|
|
57
|
+
},
|
|
45
58
|
"node_modules/@pkgjs/parseargs": {
|
|
46
59
|
"engines": {
|
|
47
60
|
"node": ">=14"
|
|
@@ -116,6 +129,15 @@
|
|
|
116
129
|
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
|
|
117
130
|
"version": "2.0.1"
|
|
118
131
|
},
|
|
132
|
+
"node_modules/chownr": {
|
|
133
|
+
"engines": {
|
|
134
|
+
"node": ">=18"
|
|
135
|
+
},
|
|
136
|
+
"integrity": "sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==",
|
|
137
|
+
"license": "BlueOak-1.0.0",
|
|
138
|
+
"resolved": "https://registry.npmjs.org/chownr/-/chownr-3.0.0.tgz",
|
|
139
|
+
"version": "3.0.0"
|
|
140
|
+
},
|
|
119
141
|
"node_modules/clone": {
|
|
120
142
|
"engines": {
|
|
121
143
|
"node": ">=0.8"
|
|
@@ -392,6 +414,34 @@
|
|
|
392
414
|
"resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz",
|
|
393
415
|
"version": "7.1.2"
|
|
394
416
|
},
|
|
417
|
+
"node_modules/minizlib": {
|
|
418
|
+
"dependencies": {
|
|
419
|
+
"minipass": "^7.0.4",
|
|
420
|
+
"rimraf": "^5.0.5"
|
|
421
|
+
},
|
|
422
|
+
"engines": {
|
|
423
|
+
"node": ">= 18"
|
|
424
|
+
},
|
|
425
|
+
"integrity": "sha512-umcy022ILvb5/3Djuu8LWeqUa8D68JaBzlttKeMWen48SjabqS3iY5w/vzeMzMUNhLDifyhbOwKDSznB1vvrwg==",
|
|
426
|
+
"license": "MIT",
|
|
427
|
+
"resolved": "https://registry.npmjs.org/minizlib/-/minizlib-3.0.1.tgz",
|
|
428
|
+
"version": "3.0.1"
|
|
429
|
+
},
|
|
430
|
+
"node_modules/mkdirp": {
|
|
431
|
+
"bin": {
|
|
432
|
+
"mkdirp": "dist/cjs/src/bin.js"
|
|
433
|
+
},
|
|
434
|
+
"engines": {
|
|
435
|
+
"node": ">=10"
|
|
436
|
+
},
|
|
437
|
+
"funding": {
|
|
438
|
+
"url": "https://github.com/sponsors/isaacs"
|
|
439
|
+
},
|
|
440
|
+
"integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==",
|
|
441
|
+
"license": "MIT",
|
|
442
|
+
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-3.0.1.tgz",
|
|
443
|
+
"version": "3.0.1"
|
|
444
|
+
},
|
|
395
445
|
"node_modules/path-key": {
|
|
396
446
|
"engines": {
|
|
397
447
|
"node": ">=8"
|
|
@@ -584,6 +634,22 @@
|
|
|
584
634
|
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
|
|
585
635
|
"version": "5.0.1"
|
|
586
636
|
},
|
|
637
|
+
"node_modules/tar": {
|
|
638
|
+
"dependencies": {
|
|
639
|
+
"@isaacs/fs-minipass": "^4.0.0",
|
|
640
|
+
"chownr": "^3.0.0",
|
|
641
|
+
"minipass": "^7.1.2",
|
|
642
|
+
"minizlib": "^3.0.1",
|
|
643
|
+
"mkdirp": "^3.0.1",
|
|
644
|
+
"yallist": "^5.0.0"
|
|
645
|
+
},
|
|
646
|
+
"engines": {
|
|
647
|
+
"node": ">=18"
|
|
648
|
+
},
|
|
649
|
+
"integrity": "sha512-5S7Va8hKfV7W5U6g3aYxXmlPoZVAwUMy9AOKyF2fVuZa2UD3qZjg578OrLRt8PcNN1PleVaL/5/yYATNL0ICUw==",
|
|
650
|
+
"resolved": "https://registry.npmjs.org/tar/-/tar-7.4.3.tgz",
|
|
651
|
+
"version": "7.4.3"
|
|
652
|
+
},
|
|
587
653
|
"node_modules/tunnel": {
|
|
588
654
|
"engines": {
|
|
589
655
|
"node": ">=0.6.11 <=0.7.0 || >=0.7.3"
|
|
@@ -708,8 +774,17 @@
|
|
|
708
774
|
"license": "MIT",
|
|
709
775
|
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
|
|
710
776
|
"version": "6.0.1"
|
|
777
|
+
},
|
|
778
|
+
"node_modules/yallist": {
|
|
779
|
+
"engines": {
|
|
780
|
+
"node": ">=18"
|
|
781
|
+
},
|
|
782
|
+
"integrity": "sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==",
|
|
783
|
+
"license": "BlueOak-1.0.0",
|
|
784
|
+
"resolved": "https://registry.npmjs.org/yallist/-/yallist-5.0.0.tgz",
|
|
785
|
+
"version": "5.0.0"
|
|
711
786
|
}
|
|
712
787
|
},
|
|
713
788
|
"requires": true,
|
|
714
|
-
"version": "0.2.
|
|
789
|
+
"version": "0.2.251"
|
|
715
790
|
}
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"artifactDownloadUrl": "https://mistydemeo.artifacts.axodotdev.host/axolotlsay/
|
|
2
|
+
"artifactDownloadUrl": "https://mistydemeo.artifacts.axodotdev.host/axolotlsay/ax_gciyAxKLvicVUQTvh_0ac",
|
|
3
3
|
"bin": {
|
|
4
4
|
"axolotlsay": "run-axolotlsay.js"
|
|
5
5
|
},
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
"axios-proxy-builder": "^0.1.2",
|
|
9
9
|
"console.table": "^0.10.0",
|
|
10
10
|
"detect-libc": "^2.0.3",
|
|
11
|
-
"rimraf": "^5.0.8"
|
|
11
|
+
"rimraf": "^5.0.8",
|
|
12
|
+
"tar": "^7.4.3"
|
|
12
13
|
},
|
|
13
14
|
"description": "💬 a CLI for learning to distribute CLIs in rust",
|
|
14
15
|
"devDependencies": {
|
|
@@ -76,7 +77,7 @@
|
|
|
76
77
|
"zipExt": ".tar.gz"
|
|
77
78
|
}
|
|
78
79
|
},
|
|
79
|
-
"version": "0.2.
|
|
80
|
+
"version": "0.2.251",
|
|
80
81
|
"volta": {
|
|
81
82
|
"node": "18.14.1",
|
|
82
83
|
"npm": "9.5.0"
|