@byteplus/ark-cli 1.0.11 → 1.0.12-probe.44c0bc6bde9b

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 CHANGED
@@ -1,72 +1,43 @@
1
1
  {
2
2
  "package": "@byteplus/ark-cli",
3
- "version": "1.0.11",
3
+ "version": "1.0.12-probe.44c0bc6bde9b",
4
4
  "platforms": {
5
5
  "darwin-amd64": {
6
6
  "kind": "cdn",
7
- "url": "https://sf16-sg.tiktokcdn.com/obj/eden-sg/psjryh/ljhwZthlaukjlkulzlp/prod/1.0.11/arkcli-1.0.11-darwin-amd64",
8
- "sha256": "c0ad60daedaf0838f3fa8007a9408fd3dca40d6eec5ef6e7c98063876d8e4f7e",
9
- "fallback": {
10
- "kind": "github-release",
11
- "url": "https://github.com/byteplus-sdk/ark-cli/releases/download/v1.0.11/arkcli-1.0.11-darwin-amd64"
12
- }
7
+ "url": "https://sf16-sg.tiktokcdn.com/obj/eden-sg/psjryh/ljhwZthlaukjlkulzlp/dev/1.0.12-probe.44c0bc6bde9b/arkcli-1.0.12-probe.44c0bc6bde9b-darwin-amd64",
8
+ "sha256": "265952eb3241711a72a7c9d6a2448a7d3a1183cf29fed7eb1cc9dad91e9320f2"
13
9
  },
14
10
  "darwin-arm64": {
15
11
  "kind": "cdn",
16
- "url": "https://sf16-sg.tiktokcdn.com/obj/eden-sg/psjryh/ljhwZthlaukjlkulzlp/prod/1.0.11/arkcli-1.0.11-darwin-arm64",
17
- "sha256": "beb6849a7bc2dea9f05de84d5c785d9309c08379504041fba3d34de220f19fa9",
18
- "fallback": {
19
- "kind": "github-release",
20
- "url": "https://github.com/byteplus-sdk/ark-cli/releases/download/v1.0.11/arkcli-1.0.11-darwin-arm64"
21
- }
12
+ "url": "https://sf16-sg.tiktokcdn.com/obj/eden-sg/psjryh/ljhwZthlaukjlkulzlp/dev/1.0.12-probe.44c0bc6bde9b/arkcli-1.0.12-probe.44c0bc6bde9b-darwin-arm64",
13
+ "sha256": "4d71738935932945f03beb2cb962dfa58969b32834f4be9b14fdc08fbea67333"
22
14
  },
23
15
  "linux-amd64": {
24
16
  "kind": "cdn",
25
- "url": "https://sf16-sg.tiktokcdn.com/obj/eden-sg/psjryh/ljhwZthlaukjlkulzlp/prod/1.0.11/arkcli-1.0.11-linux-amd64",
26
- "sha256": "e1bb957628062241d079fdf601e29969b5c51727dc0ca6f9415cd6ff3a7bb48b",
27
- "fallback": {
28
- "kind": "github-release",
29
- "url": "https://github.com/byteplus-sdk/ark-cli/releases/download/v1.0.11/arkcli-1.0.11-linux-amd64"
30
- }
17
+ "url": "https://sf16-sg.tiktokcdn.com/obj/eden-sg/psjryh/ljhwZthlaukjlkulzlp/dev/1.0.12-probe.44c0bc6bde9b/arkcli-1.0.12-probe.44c0bc6bde9b-linux-amd64",
18
+ "sha256": "62187d3c11c81b506d5ea1a15b73df58e763e42cffb81bf9a8c328e0c3775fd4"
31
19
  },
32
20
  "linux-arm64": {
33
21
  "kind": "cdn",
34
- "url": "https://sf16-sg.tiktokcdn.com/obj/eden-sg/psjryh/ljhwZthlaukjlkulzlp/prod/1.0.11/arkcli-1.0.11-linux-arm64",
35
- "sha256": "a87b9abbb970543845658cc16f95c68d48955c929a35cc282d2c7d581a2edaff",
36
- "fallback": {
37
- "kind": "github-release",
38
- "url": "https://github.com/byteplus-sdk/ark-cli/releases/download/v1.0.11/arkcli-1.0.11-linux-arm64"
39
- }
22
+ "url": "https://sf16-sg.tiktokcdn.com/obj/eden-sg/psjryh/ljhwZthlaukjlkulzlp/dev/1.0.12-probe.44c0bc6bde9b/arkcli-1.0.12-probe.44c0bc6bde9b-linux-arm64",
23
+ "sha256": "4d1119eb5dc3aac6a210cf0b794e2a1291c78fb0035199ebcce19075bcb81076"
40
24
  },
41
25
  "windows-amd64": {
42
26
  "kind": "cdn",
43
- "url": "https://sf16-sg.tiktokcdn.com/obj/eden-sg/psjryh/ljhwZthlaukjlkulzlp/prod/1.0.11/arkcli-1.0.11-windows-amd64.exe",
44
- "sha256": "aab29d7cc0c4822c40e0d9b44bbd20dad7aced68b2681335f047db2f33c40033",
45
- "fallback": {
46
- "kind": "github-release",
47
- "url": "https://github.com/byteplus-sdk/ark-cli/releases/download/v1.0.11/arkcli-1.0.11-windows-amd64.exe"
48
- }
27
+ "url": "https://sf16-sg.tiktokcdn.com/obj/eden-sg/psjryh/ljhwZthlaukjlkulzlp/dev/1.0.12-probe.44c0bc6bde9b/arkcli-1.0.12-probe.44c0bc6bde9b-windows-amd64.exe",
28
+ "sha256": "c8f099663e91d7934c7a5e00f037da23f7fa0bf3ad0f6924f16d717193a59622"
49
29
  },
50
30
  "windows-arm64": {
51
31
  "kind": "cdn",
52
- "url": "https://sf16-sg.tiktokcdn.com/obj/eden-sg/psjryh/ljhwZthlaukjlkulzlp/prod/1.0.11/arkcli-1.0.11-windows-arm64.exe",
53
- "sha256": "032154e1b23a25743b6dc6873a5e6256c95f348894050156dd75ea0fbf61a731",
54
- "fallback": {
55
- "kind": "github-release",
56
- "url": "https://github.com/byteplus-sdk/ark-cli/releases/download/v1.0.11/arkcli-1.0.11-windows-arm64.exe"
57
- }
32
+ "url": "https://sf16-sg.tiktokcdn.com/obj/eden-sg/psjryh/ljhwZthlaukjlkulzlp/dev/1.0.12-probe.44c0bc6bde9b/arkcli-1.0.12-probe.44c0bc6bde9b-windows-arm64.exe",
33
+ "sha256": "3712be25fb120d3017e7839200ec3c4c0d6208e948428cde0907fb09723c9046"
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/prod/1.0.11/skills.tar.gz",
39
+ "url": "https://sf16-sg.tiktokcdn.com/obj/eden-sg/psjryh/ljhwZthlaukjlkulzlp/dev/1.0.12-probe.44c0bc6bde9b/skills.tar.gz",
64
40
  "sha256": "db89be881c9bf3838af2a00f11f23bdc7f2d41ea394238460521fa4b0f8da0fb"
65
- },
66
- "tag": "v1.0.11",
67
- "fallback": {
68
- "kind": "github",
69
- "url": "https://github.com/byteplus-sdk/ark-cli/archive/refs/tags/v1.0.11.tar.gz"
70
41
  }
71
42
  }
72
43
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@byteplus/ark-cli",
3
- "version": "1.0.11",
3
+ "version": "1.0.12-probe.44c0bc6bde9b",
4
4
  "description": "BytePlus Ark command-line interface",
5
5
  "bin": {
6
6
  "arkcli": "scripts/run.js"
@@ -51,7 +51,16 @@ try {
51
51
  process.exit(1);
52
52
  }
53
53
 
54
- if (packageJSON.name !== PACKAGE_NAME || !/^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$/.test(packageJSON.version || "")) {
54
+ const stableVersionPattern =
55
+ /^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$/;
56
+ const probeVersionPattern =
57
+ /^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)-probe\.[0-9a-f]{12}$/;
58
+ const packageVersion = packageJSON.version || "";
59
+ const isProbe = probeVersionPattern.test(packageVersion);
60
+ if (
61
+ packageJSON.name !== PACKAGE_NAME ||
62
+ (!stableVersionPattern.test(packageVersion) && !isProbe)
63
+ ) {
55
64
  console.error(`${PACKAGE_NAME}: package identity is missing or malformed`);
56
65
  process.exit(1);
57
66
  }
@@ -72,13 +81,20 @@ if (!/^[0-9a-f]{64}$/i.test(entry.sha256 || "")) {
72
81
  console.error(`${PACKAGE_NAME}: manifest has a missing or malformed sha256 for ${key}`);
73
82
  process.exit(1);
74
83
  }
75
- if (
76
- !entry.fallback ||
77
- entry.fallback.kind !== "github-release" ||
78
- typeof entry.fallback.url !== "string"
79
- ) {
80
- console.error(`${PACKAGE_NAME}: manifest has no GitHub Release fallback for ${key}`);
81
- process.exit(1);
84
+ if (isProbe) {
85
+ if (Object.prototype.hasOwnProperty.call(entry, "fallback")) {
86
+ console.error(`${PACKAGE_NAME}: probe manifest must not claim a GitHub Release fallback for ${key}`);
87
+ process.exit(1);
88
+ }
89
+ } else {
90
+ if (
91
+ !entry.fallback ||
92
+ entry.fallback.kind !== "github-release" ||
93
+ typeof entry.fallback.url !== "string"
94
+ ) {
95
+ console.error(`${PACKAGE_NAME}: manifest has no GitHub Release fallback for ${key}`);
96
+ process.exit(1);
97
+ }
82
98
  }
83
99
 
84
100
  const allowTestHTTP = process.env.ARKCLI_POSTINSTALL_ALLOW_HTTP_FOR_TESTS === "1";
@@ -288,11 +304,12 @@ async function install() {
288
304
 
289
305
  let installedFrom;
290
306
  try {
307
+ const sources = [{ kind: "cdn", url: entry.url }];
308
+ if (!isProbe) {
309
+ sources.push({ kind: "github-release", url: entry.fallback.url });
310
+ }
291
311
  installedFrom = await downloadVerifiedBinary(
292
- [
293
- { kind: "cdn", url: entry.url },
294
- { kind: "github-release", url: entry.fallback.url },
295
- ],
312
+ sources,
296
313
  tempPath,
297
314
  entry.sha256,
298
315
  );