@wix/himalaya-cli 0.1006.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
@@ -5343,7 +5343,6 @@ function resolveTranslation(value, catalog, sourceCatalog) {
5343
5343
  var BINDING_SIGILS, BINDING_SIGIL_RE, TRANSLATION_PREFIX, TRANSLATION_KEY_RE;
5344
5344
  var init_bindings = __esm({
5345
5345
  "../../core/ts/src/bindings.ts"() {
5346
- "use strict";
5347
5346
  BINDING_SIGILS = ["service", "flag", "item", "t"];
5348
5347
  BINDING_SIGIL_RE = new RegExp(
5349
5348
  `^\\$(?:${BINDING_SIGILS.filter((s) => s !== "t").join("|")})\\b|^\\$t:`
@@ -19466,7 +19465,6 @@ function shouldRevealError(args) {
19466
19465
  var EMAIL_RE, URL_HOST_RE, INTEGER_RE, NUMBER_RE;
19467
19466
  var init_validation = __esm({
19468
19467
  "../../core/ts/src/validation.ts"() {
19469
- "use strict";
19470
19468
  EMAIL_RE = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*\.[A-Za-z]{2,}$/;
19471
19469
  URL_HOST_RE = /^[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*(:[0-9]+)?$/;
19472
19470
  INTEGER_RE = /^[+-]?[0-9]+$/;
@@ -22891,7 +22889,6 @@ function validateWorkerSubtree(raw, slotId, policy, actionCatalog) {
22891
22889
  var WORKER_SUBTREE_CEILINGS, ID_PART, ACTION_ID;
22892
22890
  var init_worker_subtree = __esm({
22893
22891
  "../../core/ts/src/worker-subtree.ts"() {
22894
- "use strict";
22895
22892
  init_worker_subtree_safe_types_generated();
22896
22893
  WORKER_SUBTREE_CEILINGS = Object.freeze({
22897
22894
  maxEncodedBytes: 65536,
@@ -44581,6 +44578,7 @@ ${releaseId}`;
44581
44578
  if (!isSafeMsid(msid)) return json3(400, { error: "webwix_owner_bad_msid" });
44582
44579
  const cookie = request.headers.get("cookie") ?? "";
44583
44580
  if (!/wixSession2=/.test(cookie)) return json3(401, { error: "webwix_owner_no_session" });
44581
+ if (url.searchParams.get("renew") === "1") webwixOwnerInstances.invalidate(msid, cookie);
44584
44582
  try {
44585
44583
  const entry = await webwixOwnerInstances.entry(msid, cookie);
44586
44584
  return json3(200, { ...entry, expiresInMs: Math.max(0, entry.expiresAt - Date.now()) }, { "cache-control": "no-store" });
@@ -45359,19 +45357,19 @@ var init_preview_assets_generated = __esm({
45359
45357
  "../../packages/serve/src/preview-assets.generated.ts"() {
45360
45358
  init_preview_assets_format();
45361
45359
  PREVIEW_ASSET_MANIFEST = [
45362
- { key: "assets/index-D21N2om9.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 1009596, sha256: "d6fc0d38f6ddaeb85351d6abdc11dc4953d2c79ba7f76203217278edae4f4609" },
45363
- { key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 1009604, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
45364
- { key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 1100528, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
45365
- { key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 1191512, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
45366
- { key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 1282492, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
45367
- { key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 1373364, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
45368
- { key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 1464344, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
45369
- { key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 1572980, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
45370
- { key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 1682064, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
45371
- { key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 1791112, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
45372
- { key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 1898812, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
45373
- { key: "index.html", contentType: "text/html; charset=utf-8", offset: 1986920, length: 4448, sha256: "8e583daefb3d1122ebc5085083d49fe180a507ae7aac8e9481e248c6e49377fe" },
45374
- { key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 1991368, 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" }
45375
45373
  ];
45376
45374
  }
45377
45375
  });
@@ -60880,6 +60878,10 @@ async function scopedRegistryBefore(lookup2, deadline) {
60880
60878
  cancel();
60881
60879
  }
60882
60880
  }
60881
+ function lookupOnce(lookup2) {
60882
+ let first;
60883
+ return (budgetMs) => first ??= Promise.resolve().then(() => lookup2(budgetMs));
60884
+ }
60883
60885
  function registryCandidates(env, scoped) {
60884
60886
  const ordered = [isTrustedRegistry(scoped) ? normalizeRegistry(scoped) : void 0, trustedConfiguredRegistry(env), PUBLIC_NPM_REGISTRY];
60885
60887
  return [...new Set(ordered.filter((r) => r !== void 0))];
@@ -66825,9 +66827,10 @@ ${label2}`);
66825
66827
  return 1;
66826
66828
  }
66827
66829
  try {
66828
- const scoped = up.scopedRegistry ?? npmScopedWixRegistry;
66830
+ const deadline = Date.now() + UPDATE_EXPLICIT_BUDGET_MS;
66831
+ const scoped = lookupOnce(up.scopedRegistry ?? npmScopedWixRegistry);
66829
66832
  const answered = await fetchCliPackument(up.fetchImpl ?? fetch, UPDATE_EXPLICIT_BUDGET_MS, env, scoped);
66830
- 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];
66831
66834
  if (answered?.latest && compareVersions2(answered.latest, before) <= 0) {
66832
66835
  if (flags.json) print({ ok: true, running: before, installed: before, changed: false, registry, latest: answered.latest });
66833
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.1006.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": "2a66c27dab1b53dc167ea41db33818d0cb019d3fb24a10084c0358af"
68
+ "falconPackageHash": "65e6a5e768e3d17f2b360d6fc1601cc92b0fff459a87b02b588c643a"
69
69
  }