@mistydemeo/cargodisttest 0.2.240 → 0.2.241
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 +41 -8
- package/npm-shrinkwrap.json +3 -78
- package/package.json +15 -16
package/binary-install.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
const { existsSync, mkdirSync } = require("fs");
|
|
2
|
-
const { join } = require("path");
|
|
1
|
+
const { createWriteStream, existsSync, mkdirSync, mkdtemp } = require("fs");
|
|
2
|
+
const { join, sep } = require("path");
|
|
3
3
|
const { spawnSync } = require("child_process");
|
|
4
|
+
const { tmpdir } = require("os");
|
|
4
5
|
|
|
5
6
|
const axios = require("axios");
|
|
6
|
-
const tar = require("tar");
|
|
7
7
|
const rimraf = require("rimraf");
|
|
8
|
+
const tmpDir = tmpdir();
|
|
8
9
|
|
|
9
10
|
const error = (msg) => {
|
|
10
11
|
console.error(msg);
|
|
@@ -90,11 +91,43 @@ class Package {
|
|
|
90
91
|
return axios({ ...fetchOptions, url: this.url, responseType: "stream" })
|
|
91
92
|
.then((res) => {
|
|
92
93
|
return new Promise((resolve, reject) => {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
94
|
+
mkdtemp(`${tmpDir}${sep}`, (err, directory) => {
|
|
95
|
+
let filename = this.url.split("/").slice(-1)[0];
|
|
96
|
+
let tempFile = join(directory, filename);
|
|
97
|
+
const sink = res.data.pipe(createWriteStream(tempFile));
|
|
98
|
+
sink.on("error", (err) => reject(err));
|
|
99
|
+
sink.on("finish", () => {
|
|
100
|
+
if (/\.tar\.*/.test(filename)) {
|
|
101
|
+
const result = spawnSync("tar", [
|
|
102
|
+
"xf",
|
|
103
|
+
tempFile,
|
|
104
|
+
"--strip-components",
|
|
105
|
+
"1",
|
|
106
|
+
"-C",
|
|
107
|
+
this.installDirectory,
|
|
108
|
+
]);
|
|
109
|
+
if (result.status == 0) {
|
|
110
|
+
resolve();
|
|
111
|
+
} else {
|
|
112
|
+
reject(result.error);
|
|
113
|
+
}
|
|
114
|
+
} else if (filename.endsWith(".zip")) {
|
|
115
|
+
const result = spawnSync("unzip", [
|
|
116
|
+
"-q",
|
|
117
|
+
tempFile,
|
|
118
|
+
"-d",
|
|
119
|
+
this.installDirectory,
|
|
120
|
+
]);
|
|
121
|
+
if (result.status == 0) {
|
|
122
|
+
resolve();
|
|
123
|
+
} else {
|
|
124
|
+
reject(result.error);
|
|
125
|
+
}
|
|
126
|
+
} else {
|
|
127
|
+
reject(`Unrecognized file extension: ${filename}`);
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
});
|
|
98
131
|
});
|
|
99
132
|
})
|
|
100
133
|
.then(() => {
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -11,8 +11,7 @@
|
|
|
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"
|
|
15
|
-
"tar": "^7.4.3"
|
|
14
|
+
"rimraf": "^5.0.8"
|
|
16
15
|
},
|
|
17
16
|
"devDependencies": {
|
|
18
17
|
"prettier": "^3.3.3"
|
|
@@ -24,7 +23,7 @@
|
|
|
24
23
|
"hasInstallScript": true,
|
|
25
24
|
"license": "MIT OR Apache-2.0",
|
|
26
25
|
"name": "@mistydemeo/cargodisttest",
|
|
27
|
-
"version": "0.2.
|
|
26
|
+
"version": "0.2.241"
|
|
28
27
|
},
|
|
29
28
|
"node_modules/@isaacs/cliui": {
|
|
30
29
|
"dependencies": {
|
|
@@ -43,18 +42,6 @@
|
|
|
43
42
|
"resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz",
|
|
44
43
|
"version": "8.0.2"
|
|
45
44
|
},
|
|
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
|
-
},
|
|
58
45
|
"node_modules/@pkgjs/parseargs": {
|
|
59
46
|
"engines": {
|
|
60
47
|
"node": ">=14"
|
|
@@ -129,15 +116,6 @@
|
|
|
129
116
|
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
|
|
130
117
|
"version": "2.0.1"
|
|
131
118
|
},
|
|
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
|
-
},
|
|
141
119
|
"node_modules/clone": {
|
|
142
120
|
"engines": {
|
|
143
121
|
"node": ">=0.8"
|
|
@@ -414,34 +392,6 @@
|
|
|
414
392
|
"resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz",
|
|
415
393
|
"version": "7.1.2"
|
|
416
394
|
},
|
|
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
|
-
},
|
|
445
395
|
"node_modules/path-key": {
|
|
446
396
|
"engines": {
|
|
447
397
|
"node": ">=8"
|
|
@@ -634,22 +584,6 @@
|
|
|
634
584
|
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
|
|
635
585
|
"version": "5.0.1"
|
|
636
586
|
},
|
|
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
|
-
},
|
|
653
587
|
"node_modules/tunnel": {
|
|
654
588
|
"engines": {
|
|
655
589
|
"node": ">=0.6.11 <=0.7.0 || >=0.7.3"
|
|
@@ -774,17 +708,8 @@
|
|
|
774
708
|
"license": "MIT",
|
|
775
709
|
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
|
|
776
710
|
"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"
|
|
786
711
|
}
|
|
787
712
|
},
|
|
788
713
|
"requires": true,
|
|
789
|
-
"version": "0.2.
|
|
714
|
+
"version": "0.2.241"
|
|
790
715
|
}
|
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_B5CW0tu-pJKHxvDW-7h8g",
|
|
3
3
|
"bin": {
|
|
4
4
|
"axolotlsay": "run-axolotlsay.js"
|
|
5
5
|
},
|
|
@@ -8,8 +8,7 @@
|
|
|
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"
|
|
12
|
-
"tar": "^7.4.3"
|
|
11
|
+
"rimraf": "^5.0.8"
|
|
13
12
|
},
|
|
14
13
|
"description": "💬 a CLI for learning to distribute CLIs in rust",
|
|
15
14
|
"devDependencies": {
|
|
@@ -35,49 +34,49 @@
|
|
|
35
34
|
},
|
|
36
35
|
"supportedPlatforms": {
|
|
37
36
|
"aarch64-apple-darwin": {
|
|
38
|
-
"artifactName": "axolotlsay-aarch64-apple-darwin.tar.
|
|
37
|
+
"artifactName": "axolotlsay-aarch64-apple-darwin.tar.xz",
|
|
39
38
|
"bins": {
|
|
40
39
|
"axolotlsay": "axolotlsay"
|
|
41
40
|
},
|
|
42
|
-
"zipExt": ".tar.
|
|
41
|
+
"zipExt": ".tar.xz"
|
|
43
42
|
},
|
|
44
43
|
"aarch64-pc-windows-msvc": {
|
|
45
|
-
"artifactName": "axolotlsay-x86_64-pc-windows-msvc.
|
|
44
|
+
"artifactName": "axolotlsay-x86_64-pc-windows-msvc.zip",
|
|
46
45
|
"bins": {
|
|
47
46
|
"axolotlsay": "axolotlsay.exe"
|
|
48
47
|
},
|
|
49
|
-
"zipExt": ".
|
|
48
|
+
"zipExt": ".zip"
|
|
50
49
|
},
|
|
51
50
|
"x86_64-apple-darwin": {
|
|
52
|
-
"artifactName": "axolotlsay-x86_64-apple-darwin.tar.
|
|
51
|
+
"artifactName": "axolotlsay-x86_64-apple-darwin.tar.xz",
|
|
53
52
|
"bins": {
|
|
54
53
|
"axolotlsay": "axolotlsay"
|
|
55
54
|
},
|
|
56
|
-
"zipExt": ".tar.
|
|
55
|
+
"zipExt": ".tar.xz"
|
|
57
56
|
},
|
|
58
57
|
"x86_64-pc-windows-gnu": {
|
|
59
|
-
"artifactName": "axolotlsay-x86_64-pc-windows-msvc.
|
|
58
|
+
"artifactName": "axolotlsay-x86_64-pc-windows-msvc.zip",
|
|
60
59
|
"bins": {
|
|
61
60
|
"axolotlsay": "axolotlsay.exe"
|
|
62
61
|
},
|
|
63
|
-
"zipExt": ".
|
|
62
|
+
"zipExt": ".zip"
|
|
64
63
|
},
|
|
65
64
|
"x86_64-pc-windows-msvc": {
|
|
66
|
-
"artifactName": "axolotlsay-x86_64-pc-windows-msvc.
|
|
65
|
+
"artifactName": "axolotlsay-x86_64-pc-windows-msvc.zip",
|
|
67
66
|
"bins": {
|
|
68
67
|
"axolotlsay": "axolotlsay.exe"
|
|
69
68
|
},
|
|
70
|
-
"zipExt": ".
|
|
69
|
+
"zipExt": ".zip"
|
|
71
70
|
},
|
|
72
71
|
"x86_64-unknown-linux-gnu": {
|
|
73
|
-
"artifactName": "axolotlsay-x86_64-unknown-linux-gnu.tar.
|
|
72
|
+
"artifactName": "axolotlsay-x86_64-unknown-linux-gnu.tar.xz",
|
|
74
73
|
"bins": {
|
|
75
74
|
"axolotlsay": "axolotlsay"
|
|
76
75
|
},
|
|
77
|
-
"zipExt": ".tar.
|
|
76
|
+
"zipExt": ".tar.xz"
|
|
78
77
|
}
|
|
79
78
|
},
|
|
80
|
-
"version": "0.2.
|
|
79
|
+
"version": "0.2.241",
|
|
81
80
|
"volta": {
|
|
82
81
|
"node": "18.14.1",
|
|
83
82
|
"npm": "9.5.0"
|