@wix/himalaya-cli 0.1654.0 → 0.1656.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.
package/dist/cli.mjs CHANGED
@@ -146400,6 +146400,7 @@ __export(build_exports2, {
146400
146400
  explicitMinRuntimeVersion: () => explicitMinRuntimeVersion,
146401
146401
  gitSha: () => gitSha,
146402
146402
  idiomContextForRender: () => idiomContextForRender,
146403
+ isEmptyResult: () => isEmptyResult,
146403
146404
  isMonorepoCheckout: () => isMonorepoCheckout,
146404
146405
  l10nLintOptions: () => l10nLintOptions,
146405
146406
  linkableScreenIdsFrom: () => linkableScreenIdsFrom,
@@ -146849,8 +146850,21 @@ async function buildRelease(app, dest, opts = {}) {
146849
146850
  ...opts.minRuntimeVersion ? { minRuntimeVersion: opts.minRuntimeVersion } : {}
146850
146851
  })).manifest;
146851
146852
  }
146853
+ function isEmptyResult(body) {
146854
+ const isObj5 = (v2) => !!v2 && typeof v2 === "object" && !Array.isArray(v2);
146855
+ if (!isObj5(body)) return false;
146856
+ let target = body;
146857
+ if (isObj5(body.data) && Object.keys(body).length === 1) target = body.data;
146858
+ const keys = Object.keys(target);
146859
+ const only = keys.length === 1 ? target[keys[0]] : void 0;
146860
+ if (isObj5(only) && ["entities", "edges", "nodes", "items"].some((k2) => Array.isArray(only[k2]))) target = only;
146861
+ const lists = Object.values(target).filter(Array.isArray);
146862
+ return lists.length > 0 && lists.every((l2) => l2.length === 0);
146863
+ }
146852
146864
  function countingWixCall(base) {
146853
146865
  let returned = 0;
146866
+ let empty2 = 0;
146867
+ let refused2 = 0;
146854
146868
  const failed3 = [];
146855
146869
  return {
146856
146870
  call: async (method, path2, body) => {
@@ -146859,12 +146873,16 @@ function countingWixCall(base) {
146859
146873
  out2 = await base(method, path2, body);
146860
146874
  } catch (e2) {
146861
146875
  failed3.push(`${String(method).toUpperCase()} ${String(path2).split("?")[0]}`);
146876
+ if (/^HTTP (401|403)\b/.test(e2?.message ?? "")) refused2 += 1;
146862
146877
  throw e2;
146863
146878
  }
146864
146879
  returned += 1;
146880
+ if (isEmptyResult(out2)) empty2 += 1;
146865
146881
  return out2;
146866
146882
  },
146867
146883
  returned: () => returned,
146884
+ empty: () => empty2,
146885
+ refused: () => refused2,
146868
146886
  failed: () => [...failed3]
146869
146887
  };
146870
146888
  }
@@ -147106,6 +147124,8 @@ async function buildFromLoaded(preloaded, dest, opts = {}) {
147106
147124
  let liveCalls;
147107
147125
  let liveReturned;
147108
147126
  let liveFailed;
147127
+ let liveEmpty;
147128
+ let liveRefused;
147109
147129
  let liveErrors;
147110
147130
  let mockCalls;
147111
147131
  let mockBootFailed;
@@ -147130,6 +147150,8 @@ async function buildFromLoaded(preloaded, dest, opts = {}) {
147130
147150
  liveReturned = counting.returned();
147131
147151
  if (host) liveReturned += host.answered();
147132
147152
  liveFailed = counting.failed();
147153
+ liveEmpty = counting.empty();
147154
+ liveRefused = counting.refused();
147133
147155
  liveErrors = live3.errors;
147134
147156
  }
147135
147157
  } else if (collect2?.render?.mocks && collect2.render.hydrate !== false && bundleName && readBundle(bundleName)) {
@@ -147179,7 +147201,7 @@ async function buildFromLoaded(preloaded, dest, opts = {}) {
147179
147201
  services[svc] = { ...services[svc] ?? {}, ...st2 };
147180
147202
  }
147181
147203
  }
147182
- return { services, ...liveCalls ? { liveCalls } : {}, ...liveReturned !== void 0 ? { liveReturned } : {}, ...liveFailed?.length ? { liveFailed } : {}, ...liveErrors ? { liveErrors } : {}, ...mockCalls ? { mockCalls, mockUnserved: mockUnserved ?? [] } : {}, ...mockBootFailed ? { mockBootFailed } : {} };
147204
+ return { services, ...liveCalls ? { liveCalls } : {}, ...liveReturned !== void 0 ? { liveReturned } : {}, ...liveFailed?.length ? { liveFailed } : {}, ...liveEmpty ? { liveEmpty } : {}, ...liveRefused ? { liveRefused } : {}, ...liveErrors ? { liveErrors } : {}, ...mockCalls ? { mockCalls, mockUnserved: mockUnserved ?? [] } : {}, ...mockBootFailed ? { mockBootFailed } : {} };
147183
147205
  };
147184
147206
  checkRegistry(preloaded.module.actions);
147185
147207
  const contentManifestPath2 = join31(preloaded.dir, "himalaya.content.json");
@@ -147513,9 +147535,9 @@ async function buildFromLoaded(preloaded, dest, opts = {}) {
147513
147535
  lintScreens.push({ screenId, descriptor });
147514
147536
  }
147515
147537
  if (collect2?.render && (!collect2.render.screenId || collect2.render.screenId === screenId)) {
147516
- const { services, liveCalls, liveReturned, liveErrors, mockCalls, mockUnserved, mockBootFailed, liveFailed } = await renderServicesFor(bundleName, descriptor, screenId);
147538
+ const { services, liveCalls, liveReturned, liveErrors, mockCalls, mockUnserved, mockBootFailed, liveFailed, liveEmpty, liveRefused } = await renderServicesFor(bundleName, descriptor, screenId);
147517
147539
  const rr2 = await renderDescriptorWeb(descriptor, renderTokens, renderScheme, collect2.render.png === true, services, collect2.render.width, collect2.render.rtl === true, renderIdiom, base);
147518
- renders.push({ screenId, scheme: renderScheme, ...rr2, ...await renderCompare(descriptor, services), ...collect2.render.dumpState && services ? { serviceState: services } : {}, ...liveCalls ? { liveCalls } : {}, ...liveReturned !== void 0 ? { liveReturned } : {}, ...liveFailed ? { liveFailed } : {}, ...liveErrors ? { liveErrors } : {}, ...mockCalls ? { mockCalls, mockUnserved } : {}, ...mockBootFailed ? { mockBootFailed } : {} });
147540
+ renders.push({ screenId, scheme: renderScheme, ...rr2, ...await renderCompare(descriptor, services), ...collect2.render.dumpState && services ? { serviceState: services } : {}, ...liveCalls ? { liveCalls } : {}, ...liveReturned !== void 0 ? { liveReturned } : {}, ...liveFailed ? { liveFailed } : {}, ...liveEmpty ? { liveEmpty } : {}, ...liveRefused ? { liveRefused } : {}, ...liveErrors ? { liveErrors } : {}, ...mockCalls ? { mockCalls, mockUnserved } : {}, ...mockBootFailed ? { mockBootFailed } : {} });
147519
147541
  }
147520
147542
  }
147521
147543
  if (collect2?.lint) lintAppWebViewInstances(lint, lintScreens);
@@ -147556,9 +147578,9 @@ async function buildFromLoaded(preloaded, dest, opts = {}) {
147556
147578
  });
147557
147579
  lint.push({ screenId: wantedRender, ok: report8.ok, issues: report8.issues });
147558
147580
  }
147559
- const { services, liveCalls, liveReturned, liveErrors, mockCalls, mockUnserved, mockBootFailed, liveFailed } = await renderServicesFor(bundleName, descriptor, wantedRender);
147581
+ const { services, liveCalls, liveReturned, liveErrors, mockCalls, mockUnserved, mockBootFailed, liveFailed, liveEmpty, liveRefused } = await renderServicesFor(bundleName, descriptor, wantedRender);
147560
147582
  const rr2 = await renderDescriptorWeb(descriptor, renderTokens, renderScheme, collect2.render.png === true, services, collect2.render.width, collect2.render.rtl === true, renderIdiom, base);
147561
- renders.push({ screenId: wantedRender, scheme: renderScheme, ...rr2, ...await renderCompare(descriptor, services), ...collect2.render.dumpState && services ? { serviceState: services } : {}, ...liveCalls ? { liveCalls } : {}, ...liveReturned !== void 0 ? { liveReturned } : {}, ...liveFailed ? { liveFailed } : {}, ...liveErrors ? { liveErrors } : {}, ...mockCalls ? { mockCalls, mockUnserved } : {}, ...mockBootFailed ? { mockBootFailed } : {} });
147583
+ renders.push({ screenId: wantedRender, scheme: renderScheme, ...rr2, ...await renderCompare(descriptor, services), ...collect2.render.dumpState && services ? { serviceState: services } : {}, ...liveCalls ? { liveCalls } : {}, ...liveReturned !== void 0 ? { liveReturned } : {}, ...liveFailed ? { liveFailed } : {}, ...liveEmpty ? { liveEmpty } : {}, ...liveRefused ? { liveRefused } : {}, ...liveErrors ? { liveErrors } : {}, ...mockCalls ? { mockCalls, mockUnserved } : {}, ...mockBootFailed ? { mockBootFailed } : {} });
147562
147584
  } else if (res.status === 422) {
147563
147585
  const finding2 = await depthRefusalOf(res);
147564
147586
  if (finding2 && !depthRefusals.some((r3) => r3.screenId === wantedRender)) depthRefusals.push({ screenId: wantedRender, finding: finding2 });
@@ -182870,7 +182892,24 @@ function renderDataSource(input) {
182870
182892
  if (!input.live) return input.mocked ? "app-mocks" : input.hydrate ? "worker-initial-state" : "static";
182871
182893
  if (!input.liveCalls) return "static";
182872
182894
  if (input.liveCalls.length === 0) return "worker-load-no-network";
182873
- return (input.liveReturned ?? 0) > 0 ? "wix-network" : "wix-network-failed";
182895
+ const returned = input.liveReturned ?? 0;
182896
+ if (returned > 0) {
182897
+ if (returned >= input.liveCalls.length && (input.liveEmpty ?? 0) >= returned) return "wix-empty-result";
182898
+ return "wix-network";
182899
+ }
182900
+ return (input.liveRefused ?? 0) > 0 ? "wix-auth-refused" : "wix-network-failed";
182901
+ }
182902
+ function dataSourceHint(source) {
182903
+ switch (source) {
182904
+ case "wix-empty-result":
182905
+ return "Every Wix call succeeded but returned 0 items. This is not a network or auth problem: check the query (collection/entity id, filters, paging), that the site actually has content, and the worker's mapping of the response.";
182906
+ case "wix-auth-refused":
182907
+ return "Wix refused the request (HTTP 401/403). Check the visitor/member permissions on the collection or vertical, the clientId, and whether the read needs a signed-in member.";
182908
+ case "wix-network-failed":
182909
+ return "Requests went out and none came back successfully (timeout, DNS, TLS, 5xx or another HTTP error). Check connectivity and the HTTP status in liveErrorDetail/liveFailed.";
182910
+ default:
182911
+ return void 0;
182912
+ }
182874
182913
  }
182875
182914
  function renderPlatform(explicit2) {
182876
182915
  return explicit2 === "ios" || explicit2 === "android" ? explicit2 : void 0;
@@ -182887,6 +182926,17 @@ function topBarSearchWebPreviewNote(descriptor) {
182887
182926
  const search = screen?.topBar?.searchable;
182888
182927
  return search == null ? void 0 : "This render has no app shell, so it does not draw the shell's top-bar search slot; it shows the authored fallback SearchField, if present.";
182889
182928
  }
182929
+ function renderLiveFields(r3) {
182930
+ return {
182931
+ liveCalls: r3.liveCalls?.length ?? 0,
182932
+ // Beside the attempt count, because the two coming apart IS the signal (#1883).
182933
+ liveReturned: r3.liveReturned ?? 0,
182934
+ liveErrors: r3.liveErrors?.length ?? 0,
182935
+ ...r3.liveCalls?.length ? { liveCallPaths: r3.liveCalls } : {},
182936
+ ...r3.liveFailed?.length ? { liveFailed: r3.liveFailed } : {},
182937
+ ...r3.liveErrors?.length ? { liveErrorDetail: r3.liveErrors } : {}
182938
+ };
182939
+ }
182890
182940
  async function renderCommand(ctx) {
182891
182941
  const { io: io2, pos, flags, print, targetName, client: client2, serveFailure } = ctx;
182892
182942
  const screenId = pos[1];
@@ -183099,17 +183149,11 @@ async function renderCommand(ctx) {
183099
183149
  scheme,
183100
183150
  renderable: r3.renderable,
183101
183151
  hydrated: live3 ? "live" : hydrate,
183102
- dataSource: renderDataSource({ live: live3, hydrate, liveCalls: r3.liveCalls, liveReturned: r3.liveReturned, mocked: !!r3.mockCalls }),
183152
+ dataSource: renderDataSource({ live: live3, hydrate, liveCalls: r3.liveCalls, liveReturned: r3.liveReturned, liveEmpty: r3.liveEmpty, liveRefused: r3.liveRefused, mocked: !!r3.mockCalls }),
183153
+ ...live3 && dataSourceHint(renderDataSource({ live: live3, hydrate, liveCalls: r3.liveCalls, liveReturned: r3.liveReturned, liveEmpty: r3.liveEmpty, liveRefused: r3.liveRefused })) ? { dataSourceHint: dataSourceHint(renderDataSource({ live: live3, hydrate, liveCalls: r3.liveCalls, liveReturned: r3.liveReturned, liveEmpty: r3.liveEmpty, liveRefused: r3.liveRefused })) } : {},
183103
183154
  // What --mocks loaded from, how many requests the load made, and the ones no layer held.
183104
183155
  ...r3.mockCalls && mocks ? { mocks: { used: true, from: mocks.from, calls: r3.mockCalls.length, ...r3.mockUnserved?.length ? { unserved: r3.mockUnserved } : {}, ...mocks.ignored ? { ignored: mocks.ignored } : {}, ...mocksByDefault ? { default: true, hint: "the app's recorded data loaded by default; --no-mocks renders the offline initial state, --live the real site" } : {} } } : mocksNote ? { mocks: mocksNote } : mocks ? { mocks: { used: false, reason: r3.mockBootFailed ? "the screen's worker failed to boot against the recorded data, so its initial state was rendered" : "the screen has no worker bundle to load data into", ...mocks.ignored ? { ignored: mocks.ignored } : {} } } : {},
183105
- ...live3 ? {
183106
- liveCalls: r3.liveCalls?.length ?? 0,
183107
- // Beside the attempt count, because the two coming apart IS the signal (#1883).
183108
- liveReturned: r3.liveReturned ?? 0,
183109
- liveErrors: r3.liveErrors?.length ?? 0,
183110
- ...r3.liveCalls?.length ? { liveCallPaths: r3.liveCalls } : {},
183111
- ...r3.liveErrors?.length ? { liveErrorDetail: r3.liveErrors } : {}
183112
- } : {},
183156
+ ...live3 ? renderLiveFields(r3) : {},
183113
183157
  ...injectedState ? { stateInjected: Object.keys(injectedState) } : {},
183114
183158
  ...injectedInput ? { inputInjected: Object.keys(injectedInput) } : {},
183115
183159
  ...flags["dump-state"] === true && r3.serviceState ? { serviceState: r3.serviceState } : {},
@@ -215937,8 +215981,8 @@ var USAGE = `himi \u2014 the Himalaya authoring CLI (remote dev loop)
215937
215981
  --google-services <file> builds an UNSIGNED bundle
215938
215982
  under your own package name and Firebase project,
215939
215983
  for an app bound to no Wix site, with no APK beside
215940
- it. Sign it before uploading. Off until a plane
215941
- switches it on (501 owner_bundles_unconfigured).
215984
+ it. Sign it with your own upload key before
215985
+ uploading. No Wix site or plan needed.
215942
215986
  --app-name / --app-icon-url (together) give the binary
215943
215987
  a name and icon in place of the release's; the icon is
215944
215988
  a https://static.wixstatic.com/media/<file> URL. A
@@ -226026,6 +226070,7 @@ export {
226026
226070
  credentialKind,
226027
226071
  credentialSwapNotice,
226028
226072
  customerUploadWaiting,
226073
+ dataSourceHint,
226029
226074
  decideUpdateAction,
226030
226075
  decodeControlTokenClaims,
226031
226076
  defaultTargetForCommand,
@@ -1373,9 +1373,12 @@ signing with another key.
1373
1373
 
1374
1374
  ### An unsigned bundle under the owner's own name — an owner bundle
1375
1375
 
1376
- **Off by default.** A plane answers `501 owner_bundles_unconfigured` until `HIMI_DIST_OWNER_BUNDLES=1`
1377
- is on its databag. It's the first half of a path for an owner who publishes to their own Google Play
1378
- account with no WixOne link. The bundle isn't usable until it's signed, and nothing here signs it yet.
1376
+ **Open to self-serve callers since 2026-11-11.** It's how a Himi app with no Wix site gets a Google Play
1377
+ file: the owner publishes to their own Google Play account under their own package name, with no WixOne
1378
+ link and no plan check. Plan rules belong to the Wix products that bind an app to a site (Containers,
1379
+ Harmony, Brandy). `HIMI_DIST_OWNER_BUNDLES=0` on the serve config closes it (`501
1380
+ owner_bundles_unconfigured`); a blank or missing value leaves it open. The bundle comes back unsigned:
1381
+ the owner signs it with their own upload key before uploading (the gplay tool does this locally).
1379
1382
 
1380
1383
  ```sh
1381
1384
  himi dist --app <app> --platform android --aab --android-signing owner \
@@ -1403,7 +1406,7 @@ himi dist --app <app> --platform android --aab --android-signing owner \
1403
1406
  `409 release_predates_owner_bundles`), and the result callback fails anything not reported as
1404
1407
  `unsigned` and drops its link (`android_format_wrong_signer`).
1405
1408
  - **A site-bound app is refused** (`409 owner_bundle_site_bound`). Its Google Play file is a store
1406
- build, whose plan check this path must not bypass.
1409
+ build, made through the Wix product that bound it, whose plan check this path must not bypass.
1407
1410
 
1408
1411
  Other refusals, each with `code` equal to `error`: `android_signing_unsigned_requires_aab`,
1409
1412
  `owner_bundle_fields_unexpected` (the two fields on any other build), `owner_bundle_android_only`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.1654.0",
3
+ "version": "0.1656.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": [
@@ -72,5 +72,5 @@
72
72
  "artifactId": "himalaya-cli"
73
73
  }
74
74
  },
75
- "falconPackageHash": "a7689b4aee345bbd65477a8cfbf90d9c21d461898c31a2e92ccca057"
75
+ "falconPackageHash": "c15540a29c0ff2b7022ad8eb495d987be01d1733b5efbd4b19d314a3"
76
76
  }