@volcengine/ark-cli 1.0.19 → 1.0.20-prerelease.f03075994108
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 +16 -44
- package/package.json +1 -1
- package/scripts/postinstall.js +41 -11
package/manifest.json
CHANGED
|
@@ -1,65 +1,37 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.0.
|
|
2
|
+
"version": "1.0.20-prerelease.f03075994108",
|
|
3
3
|
"platforms": {
|
|
4
4
|
"darwin-amd64": {
|
|
5
|
-
"url": "https://lf3-static.bytednsdoc.com/obj/eden-cn/psjryh/ljhwZthlaukjlkulzlp/
|
|
6
|
-
"sha256": "
|
|
7
|
-
"fallback": {
|
|
8
|
-
"url": "https://github.com/volcengine/ark-cli/releases/download/v1.0.19/arkcli-1.0.19-darwin-amd64",
|
|
9
|
-
"kind": "github-release"
|
|
10
|
-
}
|
|
5
|
+
"url": "https://lf3-static.bytednsdoc.com/obj/eden-cn/psjryh/ljhwZthlaukjlkulzlp/prerelease/1.0.20-prerelease.f03075994108/arkcli-1.0.20-prerelease.f03075994108-darwin-amd64",
|
|
6
|
+
"sha256": "d45df938aa300a70d434784368471690e0c408abe775a254e8c256a5005bbe52"
|
|
11
7
|
},
|
|
12
8
|
"darwin-arm64": {
|
|
13
|
-
"url": "https://lf3-static.bytednsdoc.com/obj/eden-cn/psjryh/ljhwZthlaukjlkulzlp/
|
|
14
|
-
"sha256": "
|
|
15
|
-
"fallback": {
|
|
16
|
-
"url": "https://github.com/volcengine/ark-cli/releases/download/v1.0.19/arkcli-1.0.19-darwin-arm64",
|
|
17
|
-
"kind": "github-release"
|
|
18
|
-
}
|
|
9
|
+
"url": "https://lf3-static.bytednsdoc.com/obj/eden-cn/psjryh/ljhwZthlaukjlkulzlp/prerelease/1.0.20-prerelease.f03075994108/arkcli-1.0.20-prerelease.f03075994108-darwin-arm64",
|
|
10
|
+
"sha256": "7e0cd3f4e7b10a24d6fb564a145dd5143bb22fb1b2e2be8b2536ddbc553de551"
|
|
19
11
|
},
|
|
20
12
|
"linux-amd64": {
|
|
21
|
-
"url": "https://lf3-static.bytednsdoc.com/obj/eden-cn/psjryh/ljhwZthlaukjlkulzlp/
|
|
22
|
-
"sha256": "
|
|
23
|
-
"fallback": {
|
|
24
|
-
"url": "https://github.com/volcengine/ark-cli/releases/download/v1.0.19/arkcli-1.0.19-linux-amd64",
|
|
25
|
-
"kind": "github-release"
|
|
26
|
-
}
|
|
13
|
+
"url": "https://lf3-static.bytednsdoc.com/obj/eden-cn/psjryh/ljhwZthlaukjlkulzlp/prerelease/1.0.20-prerelease.f03075994108/arkcli-1.0.20-prerelease.f03075994108-linux-amd64",
|
|
14
|
+
"sha256": "bc4828cc8823f534fad33670edef895f4b161937d6fc8300b231d458b73082a2"
|
|
27
15
|
},
|
|
28
16
|
"linux-arm64": {
|
|
29
|
-
"url": "https://lf3-static.bytednsdoc.com/obj/eden-cn/psjryh/ljhwZthlaukjlkulzlp/
|
|
30
|
-
"sha256": "
|
|
31
|
-
"fallback": {
|
|
32
|
-
"url": "https://github.com/volcengine/ark-cli/releases/download/v1.0.19/arkcli-1.0.19-linux-arm64",
|
|
33
|
-
"kind": "github-release"
|
|
34
|
-
}
|
|
17
|
+
"url": "https://lf3-static.bytednsdoc.com/obj/eden-cn/psjryh/ljhwZthlaukjlkulzlp/prerelease/1.0.20-prerelease.f03075994108/arkcli-1.0.20-prerelease.f03075994108-linux-arm64",
|
|
18
|
+
"sha256": "d0d17c24220bb364642f65414e2e0343e05e6cd3f64bb20b829c318aaf9666d0"
|
|
35
19
|
},
|
|
36
20
|
"windows-amd64": {
|
|
37
|
-
"url": "https://lf3-static.bytednsdoc.com/obj/eden-cn/psjryh/ljhwZthlaukjlkulzlp/
|
|
38
|
-
"sha256": "
|
|
39
|
-
"fallback": {
|
|
40
|
-
"url": "https://github.com/volcengine/ark-cli/releases/download/v1.0.19/arkcli-1.0.19-windows-amd64.exe",
|
|
41
|
-
"kind": "github-release"
|
|
42
|
-
}
|
|
21
|
+
"url": "https://lf3-static.bytednsdoc.com/obj/eden-cn/psjryh/ljhwZthlaukjlkulzlp/prerelease/1.0.20-prerelease.f03075994108/arkcli-1.0.20-prerelease.f03075994108-windows-amd64.exe",
|
|
22
|
+
"sha256": "d7c5ee2735625f4b59819983310d226d4ccb34ca6556a3abd2fa6d10b9183720"
|
|
43
23
|
},
|
|
44
24
|
"windows-arm64": {
|
|
45
|
-
"url": "https://lf3-static.bytednsdoc.com/obj/eden-cn/psjryh/ljhwZthlaukjlkulzlp/
|
|
46
|
-
"sha256": "
|
|
47
|
-
"fallback": {
|
|
48
|
-
"url": "https://github.com/volcengine/ark-cli/releases/download/v1.0.19/arkcli-1.0.19-windows-arm64.exe",
|
|
49
|
-
"kind": "github-release"
|
|
50
|
-
}
|
|
25
|
+
"url": "https://lf3-static.bytednsdoc.com/obj/eden-cn/psjryh/ljhwZthlaukjlkulzlp/prerelease/1.0.20-prerelease.f03075994108/arkcli-1.0.20-prerelease.f03075994108-windows-arm64.exe",
|
|
26
|
+
"sha256": "b285accda178f5252c124baaffcd94fca088c12c67e9e3c6d3a4906eea9dbf1d"
|
|
51
27
|
}
|
|
52
28
|
},
|
|
53
29
|
"skills": {
|
|
54
30
|
"primary": {
|
|
55
|
-
"url": "https://lf3-static.bytednsdoc.com/obj/eden-cn/psjryh/ljhwZthlaukjlkulzlp/
|
|
56
|
-
"sha256": "
|
|
31
|
+
"url": "https://lf3-static.bytednsdoc.com/obj/eden-cn/psjryh/ljhwZthlaukjlkulzlp/prerelease/1.0.20-prerelease.f03075994108/skills.tar.gz",
|
|
32
|
+
"sha256": "b04bd1ab9691e9ca4fdbece8f4e47203f4f560d41aa6e22812d006115cc17319",
|
|
57
33
|
"kind": "cdn"
|
|
58
34
|
},
|
|
59
|
-
"tag": "v1.0.
|
|
60
|
-
"fallback": {
|
|
61
|
-
"url": "https://github.com/volcengine/ark-cli/archive/refs/tags/v1.0.19.tar.gz",
|
|
62
|
-
"kind": "github"
|
|
63
|
-
}
|
|
35
|
+
"tag": "v1.0.20-prerelease.f03075994108"
|
|
64
36
|
}
|
|
65
37
|
}
|
package/package.json
CHANGED
package/scripts/postinstall.js
CHANGED
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
const fs = require("fs");
|
|
20
20
|
const path = require("path");
|
|
21
|
+
const os = require("os");
|
|
21
22
|
const http = require("http");
|
|
22
23
|
const https = require("https");
|
|
23
24
|
const crypto = require("crypto");
|
|
@@ -73,6 +74,14 @@ if (!platform || !arch) {
|
|
|
73
74
|
const key = `${platform}-${arch}`;
|
|
74
75
|
const ext = platform === "windows" ? ".exe" : "";
|
|
75
76
|
|
|
77
|
+
// Snapshot product state before bootstrap or the downloaded binary can create
|
|
78
|
+
// it. Any lookup failure is historical/ambiguous and therefore not fresh.
|
|
79
|
+
let freshStateAbsent = false;
|
|
80
|
+
try {
|
|
81
|
+
const home = os.homedir();
|
|
82
|
+
freshStateAbsent = home !== "" && !fs.existsSync(path.join(home, ".arkcli"));
|
|
83
|
+
} catch (_) {}
|
|
84
|
+
|
|
76
85
|
// —— 读 manifest(发布时烘焙的"平台 -> 真实 cdnUrl + sha256"对照表) ——
|
|
77
86
|
let manifest;
|
|
78
87
|
try {
|
|
@@ -210,10 +219,9 @@ async function downloadVerifiedBinary(sources, dest, expectedSHA) {
|
|
|
210
219
|
}
|
|
211
220
|
|
|
212
221
|
if (process.env.npm_config_global === "true") {
|
|
213
|
-
//
|
|
214
|
-
//
|
|
215
|
-
|
|
216
|
-
let bootstrapReady = false;
|
|
222
|
+
// Enrollment publishes only inert exact-install evidence. Active consent
|
|
223
|
+
// can be created only by later successful human CLI invocations.
|
|
224
|
+
let bootstrapReady = process.platform !== "win32";
|
|
217
225
|
let bootstrapError;
|
|
218
226
|
if (process.platform === "win32") {
|
|
219
227
|
try {
|
|
@@ -228,8 +236,9 @@ async function downloadVerifiedBinary(sources, dest, expectedSHA) {
|
|
|
228
236
|
}
|
|
229
237
|
let automaticSupported;
|
|
230
238
|
let mode;
|
|
239
|
+
let enrollmentPhase;
|
|
231
240
|
let policyError;
|
|
232
|
-
if (bootstrapReady
|
|
241
|
+
if (bootstrapReady) {
|
|
233
242
|
try {
|
|
234
243
|
const supported = execFileSync(
|
|
235
244
|
binPath,
|
|
@@ -241,6 +250,23 @@ async function downloadVerifiedBinary(sources, dest, expectedSHA) {
|
|
|
241
250
|
}
|
|
242
251
|
automaticSupported = supported === "true";
|
|
243
252
|
if (automaticSupported) {
|
|
253
|
+
enrollmentPhase = execFileSync(
|
|
254
|
+
binPath,
|
|
255
|
+
[
|
|
256
|
+
"_refresh-update-cache", "--initialize-enrollment",
|
|
257
|
+
`--fresh-state-absent=${freshStateAbsent}`,
|
|
258
|
+
],
|
|
259
|
+
{ timeout: 10000, encoding: "utf8", stdio: ["ignore", "pipe", "pipe"] },
|
|
260
|
+
).trim();
|
|
261
|
+
if (![
|
|
262
|
+
"disabled",
|
|
263
|
+
"fresh_pending",
|
|
264
|
+
"grace_completed",
|
|
265
|
+
"automatic_active",
|
|
266
|
+
"manual_reinstall_suspended",
|
|
267
|
+
].includes(enrollmentPhase)) {
|
|
268
|
+
throw new Error(`unexpected automatic-update enrollment phase ${JSON.stringify(enrollmentPhase)}`);
|
|
269
|
+
}
|
|
244
270
|
mode = execFileSync(
|
|
245
271
|
binPath,
|
|
246
272
|
["_refresh-update-cache", "--print-mode"],
|
|
@@ -269,12 +295,16 @@ async function downloadVerifiedBinary(sources, dest, expectedSHA) {
|
|
|
269
295
|
);
|
|
270
296
|
} else if (automaticSupported === false) {
|
|
271
297
|
writeInstallNotice("@volcengine/ark-cli: update notices/manual update remain active by default; silent automatic update is not enabled for this product and platform.");
|
|
272
|
-
} else if (
|
|
273
|
-
writeInstallNotice("@volcengine/ark-cli: this
|
|
274
|
-
} else if (
|
|
275
|
-
writeInstallNotice("@volcengine/ark-cli:
|
|
276
|
-
} else if (
|
|
277
|
-
writeInstallNotice("@volcengine/ark-cli:
|
|
298
|
+
} else if (enrollmentPhase === "fresh_pending") {
|
|
299
|
+
writeInstallNotice("@volcengine/ark-cli: silent stable patch updates are enabled by default for this new install; the first human command will not update. Disable with `arkcli config set update.mode disabled`.");
|
|
300
|
+
} else if (enrollmentPhase === "manual_reinstall_suspended") {
|
|
301
|
+
writeInstallNotice("@volcengine/ark-cli: a manual npm install or version change was detected, so silent automatic updates are paused. Keep this version with `arkcli config set update.mode disabled`; resume with `arkcli config set update.mode automatic`.");
|
|
302
|
+
} else if (enrollmentPhase === "disabled" || mode === "disabled") {
|
|
303
|
+
writeInstallNotice("@volcengine/ark-cli: the disabled update policy was preserved; update notices remain active and silent automatic update is not active.");
|
|
304
|
+
} else if (enrollmentPhase === "grace_completed") {
|
|
305
|
+
writeInstallNotice("@volcengine/ark-cli: first-run grace is complete; the next successful human command only activates exact-install consent and will not update immediately. Disable with `arkcli config set update.mode disabled`.");
|
|
306
|
+
} else if (enrollmentPhase === "automatic_active") {
|
|
307
|
+
writeInstallNotice("@volcengine/ark-cli: silent stable patch update consent remains active for this exact install. Disable with `arkcli config set update.mode disabled`.");
|
|
278
308
|
}
|
|
279
309
|
}
|
|
280
310
|
|