@byteplus/ark-cli 1.0.15 → 1.0.16-probe.045dfcef1176
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/manifest.json +15 -44
- package/package.json +1 -1
- package/scripts/postinstall.js +101 -1
- package/scripts/run.js +1 -3
package/manifest.json
CHANGED
|
@@ -1,72 +1,43 @@
|
|
|
1
1
|
{
|
|
2
2
|
"package": "@byteplus/ark-cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.16-probe.045dfcef1176",
|
|
4
4
|
"platforms": {
|
|
5
5
|
"darwin-amd64": {
|
|
6
6
|
"kind": "cdn",
|
|
7
|
-
"url": "https://sf16-sg.tiktokcdn.com/obj/eden-sg/psjryh/ljhwZthlaukjlkulzlp/
|
|
8
|
-
"sha256": "
|
|
9
|
-
"fallback": {
|
|
10
|
-
"kind": "github-release",
|
|
11
|
-
"url": "https://github.com/byteplus-sdk/ark-cli/releases/download/v1.0.15/arkcli-1.0.15-darwin-amd64"
|
|
12
|
-
}
|
|
7
|
+
"url": "https://sf16-sg.tiktokcdn.com/obj/eden-sg/psjryh/ljhwZthlaukjlkulzlp/dev/1.0.16-probe.045dfcef1176/arkcli-1.0.16-probe.045dfcef1176-darwin-amd64",
|
|
8
|
+
"sha256": "c771cb1bb4bfef21318f8fe3de1ba6caa1fc1f8556fe164db07702ac10f6f338"
|
|
13
9
|
},
|
|
14
10
|
"darwin-arm64": {
|
|
15
11
|
"kind": "cdn",
|
|
16
|
-
"url": "https://sf16-sg.tiktokcdn.com/obj/eden-sg/psjryh/ljhwZthlaukjlkulzlp/
|
|
17
|
-
"sha256": "
|
|
18
|
-
"fallback": {
|
|
19
|
-
"kind": "github-release",
|
|
20
|
-
"url": "https://github.com/byteplus-sdk/ark-cli/releases/download/v1.0.15/arkcli-1.0.15-darwin-arm64"
|
|
21
|
-
}
|
|
12
|
+
"url": "https://sf16-sg.tiktokcdn.com/obj/eden-sg/psjryh/ljhwZthlaukjlkulzlp/dev/1.0.16-probe.045dfcef1176/arkcli-1.0.16-probe.045dfcef1176-darwin-arm64",
|
|
13
|
+
"sha256": "f241190127e79d5e7fb94b434f379a6d0f466bc2a2393d532452f0e0e67a7d8b"
|
|
22
14
|
},
|
|
23
15
|
"linux-amd64": {
|
|
24
16
|
"kind": "cdn",
|
|
25
|
-
"url": "https://sf16-sg.tiktokcdn.com/obj/eden-sg/psjryh/ljhwZthlaukjlkulzlp/
|
|
26
|
-
"sha256": "
|
|
27
|
-
"fallback": {
|
|
28
|
-
"kind": "github-release",
|
|
29
|
-
"url": "https://github.com/byteplus-sdk/ark-cli/releases/download/v1.0.15/arkcli-1.0.15-linux-amd64"
|
|
30
|
-
}
|
|
17
|
+
"url": "https://sf16-sg.tiktokcdn.com/obj/eden-sg/psjryh/ljhwZthlaukjlkulzlp/dev/1.0.16-probe.045dfcef1176/arkcli-1.0.16-probe.045dfcef1176-linux-amd64",
|
|
18
|
+
"sha256": "8c7c42584aa22757a3cfae1270daa3eb417ed810f2243a099211188b9de05b65"
|
|
31
19
|
},
|
|
32
20
|
"linux-arm64": {
|
|
33
21
|
"kind": "cdn",
|
|
34
|
-
"url": "https://sf16-sg.tiktokcdn.com/obj/eden-sg/psjryh/ljhwZthlaukjlkulzlp/
|
|
35
|
-
"sha256": "
|
|
36
|
-
"fallback": {
|
|
37
|
-
"kind": "github-release",
|
|
38
|
-
"url": "https://github.com/byteplus-sdk/ark-cli/releases/download/v1.0.15/arkcli-1.0.15-linux-arm64"
|
|
39
|
-
}
|
|
22
|
+
"url": "https://sf16-sg.tiktokcdn.com/obj/eden-sg/psjryh/ljhwZthlaukjlkulzlp/dev/1.0.16-probe.045dfcef1176/arkcli-1.0.16-probe.045dfcef1176-linux-arm64",
|
|
23
|
+
"sha256": "a2f66cb5ee577760b35f247bb0ffa789fcd5c0a3496f75dfeb494fd649b1afda"
|
|
40
24
|
},
|
|
41
25
|
"windows-amd64": {
|
|
42
26
|
"kind": "cdn",
|
|
43
|
-
"url": "https://sf16-sg.tiktokcdn.com/obj/eden-sg/psjryh/ljhwZthlaukjlkulzlp/
|
|
44
|
-
"sha256": "
|
|
45
|
-
"fallback": {
|
|
46
|
-
"kind": "github-release",
|
|
47
|
-
"url": "https://github.com/byteplus-sdk/ark-cli/releases/download/v1.0.15/arkcli-1.0.15-windows-amd64.exe"
|
|
48
|
-
}
|
|
27
|
+
"url": "https://sf16-sg.tiktokcdn.com/obj/eden-sg/psjryh/ljhwZthlaukjlkulzlp/dev/1.0.16-probe.045dfcef1176/arkcli-1.0.16-probe.045dfcef1176-windows-amd64.exe",
|
|
28
|
+
"sha256": "a00fa9018d2ea49ae1255da0994781b9bb211c1042a5186e15e5abe144ab774a"
|
|
49
29
|
},
|
|
50
30
|
"windows-arm64": {
|
|
51
31
|
"kind": "cdn",
|
|
52
|
-
"url": "https://sf16-sg.tiktokcdn.com/obj/eden-sg/psjryh/ljhwZthlaukjlkulzlp/
|
|
53
|
-
"sha256": "
|
|
54
|
-
"fallback": {
|
|
55
|
-
"kind": "github-release",
|
|
56
|
-
"url": "https://github.com/byteplus-sdk/ark-cli/releases/download/v1.0.15/arkcli-1.0.15-windows-arm64.exe"
|
|
57
|
-
}
|
|
32
|
+
"url": "https://sf16-sg.tiktokcdn.com/obj/eden-sg/psjryh/ljhwZthlaukjlkulzlp/dev/1.0.16-probe.045dfcef1176/arkcli-1.0.16-probe.045dfcef1176-windows-arm64.exe",
|
|
33
|
+
"sha256": "a5f562c6245e820cc449e0adc44958cd18bdfb309663b423659b7d70129e2eaa"
|
|
58
34
|
}
|
|
59
35
|
},
|
|
60
36
|
"skills": {
|
|
61
37
|
"primary": {
|
|
62
38
|
"kind": "cdn",
|
|
63
|
-
"url": "https://sf16-sg.tiktokcdn.com/obj/eden-sg/psjryh/ljhwZthlaukjlkulzlp/
|
|
64
|
-
"sha256": "
|
|
65
|
-
},
|
|
66
|
-
"tag": "v1.0.15",
|
|
67
|
-
"fallback": {
|
|
68
|
-
"kind": "github",
|
|
69
|
-
"url": "https://github.com/byteplus-sdk/ark-cli/archive/refs/tags/v1.0.15.tar.gz"
|
|
39
|
+
"url": "https://sf16-sg.tiktokcdn.com/obj/eden-sg/psjryh/ljhwZthlaukjlkulzlp/dev/1.0.16-probe.045dfcef1176/skills.tar.gz",
|
|
40
|
+
"sha256": "c0629c7998cbabfaab0488fa4fb4b2adde834b5f5bac012e04b1e5142477bf7c"
|
|
70
41
|
}
|
|
71
42
|
}
|
|
72
43
|
}
|
package/package.json
CHANGED
package/scripts/postinstall.js
CHANGED
|
@@ -13,6 +13,38 @@ const path = require("path");
|
|
|
13
13
|
const { execFileSync } = require("child_process");
|
|
14
14
|
const { Transform, pipeline } = require("stream");
|
|
15
15
|
|
|
16
|
+
function writeInstallNotice(message, warning = false) {
|
|
17
|
+
const terminal = process.platform === "win32" ? "\\\\.\\CONOUT$" : "/dev/tty";
|
|
18
|
+
let fd = null;
|
|
19
|
+
try {
|
|
20
|
+
fd = fs.openSync(terminal, "w");
|
|
21
|
+
fs.writeSync(fd, `${message}${process.platform === "win32" ? "\r\n" : "\n"}`);
|
|
22
|
+
return;
|
|
23
|
+
} catch (_) {
|
|
24
|
+
(warning ? console.warn : console.log)(message);
|
|
25
|
+
} finally {
|
|
26
|
+
if (fd !== null) {
|
|
27
|
+
try { fs.closeSync(fd); } catch (_) {}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function hasInteractiveInstallConsole() {
|
|
33
|
+
if (process.stdout.isTTY || process.stderr.isTTY) return true;
|
|
34
|
+
if (process.platform !== "win32") return false;
|
|
35
|
+
let fd = null;
|
|
36
|
+
try {
|
|
37
|
+
fd = fs.openSync("\\\\.\\CONOUT$", "w");
|
|
38
|
+
return true;
|
|
39
|
+
} catch (_) {
|
|
40
|
+
return false;
|
|
41
|
+
} finally {
|
|
42
|
+
if (fd !== null) {
|
|
43
|
+
try { fs.closeSync(fd); } catch (_) {}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
16
48
|
const PACKAGE_NAME = "@byteplus/ark-cli";
|
|
17
49
|
const GITHUB_RELEASE_PREFIX = "/byteplus-sdk/ark-cli/releases/download/";
|
|
18
50
|
const MAX_REDIRECTS = 5;
|
|
@@ -351,10 +383,78 @@ async function install() {
|
|
|
351
383
|
|
|
352
384
|
console.log(`${PACKAGE_NAME}: installed ${path.basename(binPath)} from ${installedFrom.kind}`);
|
|
353
385
|
|
|
354
|
-
if (process.env.CI
|
|
386
|
+
if (process.env.CI || process.env.BUILD_NUMBER || process.env.RUN_ID) {
|
|
355
387
|
return;
|
|
356
388
|
}
|
|
357
389
|
|
|
390
|
+
if (process.env.npm_config_global === "true") {
|
|
391
|
+
// Bootstrap provisioning is best-effort updater setup. It must never turn
|
|
392
|
+
// a valid public package install into a publication or installation gate.
|
|
393
|
+
let bootstrapReady = false;
|
|
394
|
+
let bootstrapError;
|
|
395
|
+
if (process.platform === "win32") {
|
|
396
|
+
try {
|
|
397
|
+
execFileSync(binPath, ["_initialize-update-bootstrap"], {
|
|
398
|
+
timeout: 120000,
|
|
399
|
+
stdio: "ignore",
|
|
400
|
+
});
|
|
401
|
+
bootstrapReady = true;
|
|
402
|
+
} catch (err) {
|
|
403
|
+
bootstrapError = err;
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
let automaticSupported;
|
|
407
|
+
let mode;
|
|
408
|
+
let policyError;
|
|
409
|
+
if (bootstrapReady && hasInteractiveInstallConsole()) {
|
|
410
|
+
try {
|
|
411
|
+
const supported = execFileSync(
|
|
412
|
+
binPath,
|
|
413
|
+
["_refresh-update-cache", "--print-automatic-supported"],
|
|
414
|
+
{ timeout: 10000, encoding: "utf8", stdio: ["ignore", "pipe", "pipe"] },
|
|
415
|
+
).trim();
|
|
416
|
+
if (supported !== "true" && supported !== "false") {
|
|
417
|
+
throw new Error(`unexpected automatic-update capability ${JSON.stringify(supported)}`);
|
|
418
|
+
}
|
|
419
|
+
automaticSupported = supported === "true";
|
|
420
|
+
if (automaticSupported) {
|
|
421
|
+
mode = execFileSync(
|
|
422
|
+
binPath,
|
|
423
|
+
["_refresh-update-cache", "--print-mode"],
|
|
424
|
+
{ timeout: 10000, encoding: "utf8", stdio: ["ignore", "pipe", "pipe"] },
|
|
425
|
+
).trim();
|
|
426
|
+
}
|
|
427
|
+
} catch (err) {
|
|
428
|
+
policyError = err;
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
try {
|
|
432
|
+
execFileSync(binPath, ["_refresh-update-cache"], {
|
|
433
|
+
timeout: 10000,
|
|
434
|
+
stdio: "ignore",
|
|
435
|
+
});
|
|
436
|
+
} catch (_) {}
|
|
437
|
+
if (bootstrapError) {
|
|
438
|
+
writeInstallNotice(
|
|
439
|
+
`${PACKAGE_NAME}: recoverable automatic-update bootstrap is unavailable; this install remains notice/manual-only (${bootstrapError.message || bootstrapError})`,
|
|
440
|
+
true,
|
|
441
|
+
);
|
|
442
|
+
} else if (policyError) {
|
|
443
|
+
writeInstallNotice(
|
|
444
|
+
`${PACKAGE_NAME}: automatic-update capability could not be confirmed; this install remains notice/manual-only (${policyError.message || policyError})`,
|
|
445
|
+
true,
|
|
446
|
+
);
|
|
447
|
+
} else if (automaticSupported === false) {
|
|
448
|
+
writeInstallNotice(`${PACKAGE_NAME}: update notices/manual update remain active by default; silent automatic update is not enabled for this product and platform.`);
|
|
449
|
+
} else if (mode === "automatic") {
|
|
450
|
+
writeInstallNotice(`${PACKAGE_NAME}: this reinstall retired the prior automatic binding; run \`arkcli config set update.mode automatic\` to authorize this exact install again.`);
|
|
451
|
+
} else if (mode === "disabled") {
|
|
452
|
+
writeInstallNotice(`${PACKAGE_NAME}: the disabled update policy was preserved; silent automatic update is not active.`);
|
|
453
|
+
} else if (bootstrapReady && automaticSupported) {
|
|
454
|
+
writeInstallNotice(`${PACKAGE_NAME}: update notices/manual update remain active by default; run \`arkcli config set update.mode automatic\` to opt in to silent automatic update.`);
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
|
|
358
458
|
let tty = null;
|
|
359
459
|
try {
|
|
360
460
|
tty = fs.openSync("/dev/tty", "r+");
|
package/scripts/run.js
CHANGED
|
@@ -39,8 +39,6 @@ if (!binaryReady) {
|
|
|
39
39
|
try {
|
|
40
40
|
execFileSync(binary, process.argv.slice(2), { stdio: "inherit" });
|
|
41
41
|
} catch (err) {
|
|
42
|
-
if (err.signal)
|
|
43
|
-
process.kill(process.pid, err.signal);
|
|
44
|
-
}
|
|
42
|
+
if (err.signal) process.kill(process.pid, err.signal);
|
|
45
43
|
process.exit(Number.isInteger(err.status) ? err.status : 1);
|
|
46
44
|
}
|