@wix/himalaya-cli 0.1307.0 → 0.1308.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.
Files changed (2) hide show
  1. package/dist/cli.mjs +30 -3
  2. package/package.json +2 -2
package/dist/cli.mjs CHANGED
@@ -7586,6 +7586,7 @@ function resolveTranslation(value, catalog3, sourceCatalog) {
7586
7586
  var BINDING_SIGILS, BINDING_SIGIL_RE, TRANSLATION_PREFIX, TRANSLATION_KEY_RE;
7587
7587
  var init_bindings = __esm({
7588
7588
  "../../core/ts/src/bindings.ts"() {
7589
+ "use strict";
7589
7590
  BINDING_SIGILS = ["service", "flag", "item", "t"];
7590
7591
  BINDING_SIGIL_RE = new RegExp(
7591
7592
  `^\\$(?:${BINDING_SIGILS.filter((s2) => s2 !== "t").join("|")})\\b|^\\$t:`
@@ -16590,6 +16591,7 @@ function resolveIdiom(tokens2, ctx = {}) {
16590
16591
  var IDIOM_CONTEXTS, UNSAFE_KEYS;
16591
16592
  var init_idiom = __esm({
16592
16593
  "../../core/ts/src/idiom.ts"() {
16594
+ "use strict";
16593
16595
  IDIOM_CONTEXTS = {
16594
16596
  ios: { native: ["ios"] },
16595
16597
  android: { native: ["material"] },
@@ -171722,8 +171724,13 @@ var ServeCliClient = class {
171722
171724
  return this.request("control", "POST", "/v1/admin/dist/plan", { body, headers: this.ctrlHeaders() });
171723
171725
  }
171724
171726
  /** One job's record, refreshed from Job Service while it is still in flight. */
171725
- distStatus(jobId) {
171726
- return this.request("control", "GET", `/v1/admin/dist/${encodeURIComponent(jobId)}`, { headers: this.ctrlHeaders() });
171727
+ /** `wixAuthorization` lets a status read finish a customer TestFlight upload: the control plane
171728
+ * uploads only after it re-verifies, from this Wix credential, that the caller owns the site. */
171729
+ distStatus(jobId, options = {}) {
171730
+ if (options.wixAuthorization) this.assertWixAuthorizationTarget();
171731
+ return this.request("control", "GET", `/v1/admin/dist/${encodeURIComponent(jobId)}`, {
171732
+ headers: { ...this.ctrlHeaders(), ...options.wixAuthorization ? { authorization: options.wixAuthorization } : {} }
171733
+ });
171727
171734
  }
171728
171735
  /** Current player and successful binary links for an app, optionally scoped to one job. */
171729
171736
  distLinks(app, jobId) {
@@ -176218,6 +176225,10 @@ async function run(argv, io2 = defaultIO, deps = {}) {
176218
176225
  }
176219
176226
  return code;
176220
176227
  }
176228
+ function customerUploadWaiting(record2) {
176229
+ const pending = record2?.customerAppStore;
176230
+ return pending?.status === "READY_FOR_UPLOAD" || pending?.status === "UPLOADING";
176231
+ }
176221
176232
  var TAIL_KEYS = ["reminder", "doNowAgain"];
176222
176233
  function tailLast(o2) {
176223
176234
  if (!TAIL_KEYS.some((k2) => k2 in o2)) return o2;
@@ -181000,6 +181011,21 @@ ${label2}`);
181000
181011
  } catch (e2) {
181001
181012
  return distUnreachable(e2);
181002
181013
  }
181014
+ if (r3.ok && customerUploadWaiting(r3.json)) {
181015
+ let wixAuthorization2;
181016
+ try {
181017
+ c2.assertWixAuthorizationTarget();
181018
+ wixAuthorization2 = await accountToken();
181019
+ } catch {
181020
+ }
181021
+ if (wixAuthorization2) {
181022
+ try {
181023
+ r3 = await c2.distStatus(jobId, { wixAuthorization: wixAuthorization2 });
181024
+ } catch (e2) {
181025
+ return distUnreachable(e2);
181026
+ }
181027
+ }
181028
+ }
181003
181029
  const body = { status: r3.status, ...r3.json ?? {} };
181004
181030
  if (r3.ok) await rememberLastDist([body]);
181005
181031
  print(flags.json === true ? body : humanDistJob(body));
@@ -181242,7 +181268,7 @@ ${label2}`);
181242
181268
  let s2;
181243
181269
  let why = "";
181244
181270
  try {
181245
- s2 = await c2.distStatus(jobId);
181271
+ s2 = await c2.distStatus(jobId, { wixAuthorization });
181246
181272
  if (!s2.ok) why = `HTTP ${s2.status}`;
181247
181273
  } catch (e2) {
181248
181274
  why = e2.message;
@@ -182361,6 +182387,7 @@ export {
182361
182387
  createUpdateRunner,
182362
182388
  credentialKind,
182363
182389
  credentialSwapNotice,
182390
+ customerUploadWaiting,
182364
182391
  decideUpdateAction,
182365
182392
  decodeControlTokenClaims,
182366
182393
  defaultTargetForCommand,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.1307.0",
3
+ "version": "0.1308.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": [
@@ -70,5 +70,5 @@
70
70
  "artifactId": "himalaya-cli"
71
71
  }
72
72
  },
73
- "falconPackageHash": "1b51ddaa913b32920061eaf4960831c25ec9b730ddc15843d7390037"
73
+ "falconPackageHash": "eba491049c4b6f346d6c4cb65f33adaa4e2245f1d9f161bd7a6487dc"
74
74
  }