@wix/himalaya-cli 0.1005.0 → 0.1007.0

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.
@@ -31,14 +31,34 @@ function addToCurrentCart(productId, quantity = 1, options) {
31
31
  }
32
32
  var OWNED_CART_NOT_FOUND = "OWNED_CART_NOT_FOUND";
33
33
  function applicationErrorCode(error) {
34
- const o = error;
35
- if (o && typeof o === "object") {
36
- const structured = o.details?.applicationError?.code ?? o.applicationError?.code ?? o.code;
34
+ if (error && typeof error === "object") {
35
+ const structured = structuredApplicationCode(error);
37
36
  if (typeof structured === "string" && structured) return structured;
38
37
  }
39
- const msg = error instanceof Error ? error.message : String(error ?? "");
40
- const m = /"code"\s*:\s*"([A-Z0-9_]+)"/.exec(msg) ?? /\[([A-Z0-9_]{4,})\]/.exec(msg);
41
- return m ? m[1] : "";
38
+ const message = error?.message;
39
+ const msg = typeof message === "string" ? message : String(error ?? "");
40
+ const body = /^HTTP \d{3}: ([\s\S]*)$/.exec(msg);
41
+ return bodyApplicationCode(body?.[1] ?? msg);
42
+ }
43
+ function structuredApplicationCode(value) {
44
+ const o = value;
45
+ return o && typeof o === "object" ? o.details?.applicationError?.code ?? o.applicationError?.code ?? o.code : void 0;
46
+ }
47
+ var CANONICAL_CUT_BODY = /^\s*\{\s*(?:"message"\s*:\s*"(?:[^"\\]|\\.)*"\s*,\s*)?"details"\s*:\s*\{\s*"applicationError"\s*:\s*\{\s*(?:"[A-Za-z]+"\s*:\s*"(?:[^"\\]|\\.)*"\s*,\s*)*"code"\s*:\s*"([A-Za-z0-9_]+)"/;
48
+ function bodyApplicationCode(body) {
49
+ if (!body) return "";
50
+ let parsed;
51
+ try {
52
+ parsed = JSON.parse(body);
53
+ } catch {
54
+ parsed = void 0;
55
+ }
56
+ if (parsed !== void 0) {
57
+ const structured = structuredApplicationCode(parsed);
58
+ return typeof structured === "string" ? structured : "";
59
+ }
60
+ const m = /^(?:HTTP \d{3} )?\[([A-Z0-9_]{4,})\]/.exec(body) ?? CANONICAL_CUT_BODY.exec(body);
61
+ return m?.[1] ?? "";
42
62
  }
43
63
  function isEmptyCurrentCartError(error) {
44
64
  return applicationErrorCode(error) === OWNED_CART_NOT_FOUND;
package/dist/cli.mjs CHANGED
@@ -5318,7 +5318,6 @@ function walk(node, registry, path2, out) {
5318
5318
  var SYSTEM_FONT_FAMILY;
5319
5319
  var init_tokens = __esm({
5320
5320
  "../../core/ts/src/tokens.ts"() {
5321
- "use strict";
5322
5321
  SYSTEM_FONT_FAMILY = "$system";
5323
5322
  }
5324
5323
  });
@@ -5344,7 +5343,6 @@ function resolveTranslation(value, catalog, sourceCatalog) {
5344
5343
  var BINDING_SIGILS, BINDING_SIGIL_RE, TRANSLATION_PREFIX, TRANSLATION_KEY_RE;
5345
5344
  var init_bindings = __esm({
5346
5345
  "../../core/ts/src/bindings.ts"() {
5347
- "use strict";
5348
5346
  BINDING_SIGILS = ["service", "flag", "item", "t"];
5349
5347
  BINDING_SIGIL_RE = new RegExp(
5350
5348
  `^\\$(?:${BINDING_SIGILS.filter((s) => s !== "t").join("|")})\\b|^\\$t:`
@@ -19467,7 +19465,6 @@ function shouldRevealError(args) {
19467
19465
  var EMAIL_RE, URL_HOST_RE, INTEGER_RE, NUMBER_RE;
19468
19466
  var init_validation = __esm({
19469
19467
  "../../core/ts/src/validation.ts"() {
19470
- "use strict";
19471
19468
  EMAIL_RE = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*\.[A-Za-z]{2,}$/;
19472
19469
  URL_HOST_RE = /^[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*(:[0-9]+)?$/;
19473
19470
  INTEGER_RE = /^[+-]?[0-9]+$/;
@@ -22892,7 +22889,6 @@ function validateWorkerSubtree(raw, slotId, policy, actionCatalog) {
22892
22889
  var WORKER_SUBTREE_CEILINGS, ID_PART, ACTION_ID;
22893
22890
  var init_worker_subtree = __esm({
22894
22891
  "../../core/ts/src/worker-subtree.ts"() {
22895
- "use strict";
22896
22892
  init_worker_subtree_safe_types_generated();
22897
22893
  WORKER_SUBTREE_CEILINGS = Object.freeze({
22898
22894
  maxEncodedBytes: 65536,
@@ -44582,6 +44578,7 @@ ${releaseId}`;
44582
44578
  if (!isSafeMsid(msid)) return json3(400, { error: "webwix_owner_bad_msid" });
44583
44579
  const cookie = request.headers.get("cookie") ?? "";
44584
44580
  if (!/wixSession2=/.test(cookie)) return json3(401, { error: "webwix_owner_no_session" });
44581
+ if (url.searchParams.get("renew") === "1") webwixOwnerInstances.invalidate(msid, cookie);
44585
44582
  try {
44586
44583
  const entry = await webwixOwnerInstances.entry(msid, cookie);
44587
44584
  return json3(200, { ...entry, expiresInMs: Math.max(0, entry.expiresAt - Date.now()) }, { "cache-control": "no-store" });
@@ -45360,19 +45357,19 @@ var init_preview_assets_generated = __esm({
45360
45357
  "../../packages/serve/src/preview-assets.generated.ts"() {
45361
45358
  init_preview_assets_format();
45362
45359
  PREVIEW_ASSET_MANIFEST = [
45363
- { key: "assets/index-vRMb0Dqk.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 1009302, sha256: "3eabff510509e865ab7d3b6e7ac347d36ba9b8a44183d65d67d980efb85a42c5" },
45364
- { key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 1009310, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
45365
- { key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 1100234, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
45366
- { key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 1191218, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
45367
- { key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 1282198, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
45368
- { key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 1373070, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
45369
- { key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 1464050, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
45370
- { key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 1572686, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
45371
- { key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 1681770, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
45372
- { key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 1790818, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
45373
- { key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 1898518, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
45374
- { key: "index.html", contentType: "text/html; charset=utf-8", offset: 1986626, length: 4448, sha256: "70f18366fc27e810bac91bc54dfc247f27c071fb6f0442b07af48bdb7efabb8e" },
45375
- { key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 1991074, length: 17209, sha256: "dffc9718e2faa63ae2cc919e0a842f585ed565aaaa7c53778e90379442c731b6" }
45360
+ { key: "assets/index-BpZXVPIV.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 1012137, sha256: "8d4244200f95528ecbe4b96cad3de8c238d257b4010a578191223445a5fa3c29" },
45361
+ { key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 1012145, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
45362
+ { key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 1103069, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
45363
+ { key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 1194053, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
45364
+ { key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 1285033, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
45365
+ { key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 1375905, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
45366
+ { key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 1466885, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
45367
+ { key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 1575521, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
45368
+ { key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 1684605, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
45369
+ { key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 1793653, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
45370
+ { key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 1901353, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
45371
+ { key: "index.html", contentType: "text/html; charset=utf-8", offset: 1989461, length: 4448, sha256: "95a85e0c6551f6ce184bac040d790ba35ade87d66869827925898126e2398a40" },
45372
+ { key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 1993909, length: 17209, sha256: "dffc9718e2faa63ae2cc919e0a842f585ed565aaaa7c53778e90379442c731b6" }
45376
45373
  ];
45377
45374
  }
45378
45375
  });
@@ -60881,6 +60878,10 @@ async function scopedRegistryBefore(lookup2, deadline) {
60881
60878
  cancel();
60882
60879
  }
60883
60880
  }
60881
+ function lookupOnce(lookup2) {
60882
+ let first;
60883
+ return (budgetMs) => first ??= Promise.resolve().then(() => lookup2(budgetMs));
60884
+ }
60884
60885
  function registryCandidates(env, scoped) {
60885
60886
  const ordered = [isTrustedRegistry(scoped) ? normalizeRegistry(scoped) : void 0, trustedConfiguredRegistry(env), PUBLIC_NPM_REGISTRY];
60886
60887
  return [...new Set(ordered.filter((r) => r !== void 0))];
@@ -66826,9 +66827,10 @@ ${label2}`);
66826
66827
  return 1;
66827
66828
  }
66828
66829
  try {
66829
- const scoped = up.scopedRegistry ?? npmScopedWixRegistry;
66830
+ const deadline = Date.now() + UPDATE_EXPLICIT_BUDGET_MS;
66831
+ const scoped = lookupOnce(up.scopedRegistry ?? npmScopedWixRegistry);
66830
66832
  const answered = await fetchCliPackument(up.fetchImpl ?? fetch, UPDATE_EXPLICIT_BUDGET_MS, env, scoped);
66831
- const registry = answered?.registry ?? registryCandidates(env, await scoped(UPDATE_EXPLICIT_BUDGET_MS))[0];
66833
+ const registry = answered?.registry ?? registryCandidates(env, await scopedRegistryBefore(scoped, deadline))[0];
66832
66834
  if (answered?.latest && compareVersions2(answered.latest, before) <= 0) {
66833
66835
  if (flags.json) print({ ok: true, running: before, installed: before, changed: false, registry, latest: answered.latest });
66834
66836
  else io.log(`himi ${before} (unchanged \u2014 ${registry} has nothing newer; its latest is ${answered.latest})`);
Binary file
@@ -1,5 +1,8 @@
1
1
  # QA builds ("dist") — shippable IPA/APK + an install link for QA
2
2
 
3
+ For the read-only BO metadata API across all Himi apps and Publish attempt
4
+ grouping, see [Himi build diagnostics](https://github.com/wix-private/himalaya/blob/master/docs/build-diagnostics.md).
5
+
3
6
  A **QA build** is a real, installable app you hand to QA — an enterprise/ad-hoc
4
7
  **signed IPA** (iOS) or an **APK** (Android) — plus a link to install it. It is
5
8
  distinct from the CI gates (`test:*`, `argus:*`), which only prove the code builds
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.1005.0",
3
+ "version": "0.1007.0",
4
4
  "type": "module",
5
5
  "description": "himi — the Himalaya authoring CLI. Build a Tier-5 content package on your own machine, push it to the production serve as a draft, preview it on web + Himi Player, and read worker logs back — the remote dev loop. Wraps @himalaya/serve-cli for transport.",
6
6
  "keywords": [
@@ -65,5 +65,5 @@
65
65
  "artifactId": "himalaya-cli"
66
66
  }
67
67
  },
68
- "falconPackageHash": "bbc5500979643dbfcf57fbe15a73b4981e2f2e6b4a09e1e3549f5f3f"
68
+ "falconPackageHash": "65e6a5e768e3d17f2b360d6fc1601cc92b0fff459a87b02b588c643a"
69
69
  }