@wix/himalaya-cli 0.1146.0 → 0.1147.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 (28) hide show
  1. package/dist/cli.mjs +77 -19
  2. package/dist/preview-assets.generated.bin +0 -0
  3. package/guides/headless-loop.md +34 -0
  4. package/guides/himi-mcp.md +2 -0
  5. package/guides/tier-5-add-a-screen.md +4 -2
  6. package/package.json +2 -2
  7. package/templates/beauty-salon/tier5-src/himi-branded-lite-home/index.ts +6 -1
  8. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-home/index.ts +6 -1
  9. package/templates/branded-lite/tier5-src/himi-branded-lite-home/index.ts +6 -1
  10. package/templates/community-club/tier5-src/himi-branded-lite-home/index.ts +6 -1
  11. package/templates/community-club-owner/tier5-src/himi-owner-lite-home/index.ts +6 -1
  12. package/templates/events-meetups/tier5-src/himi-branded-lite-home/index.ts +6 -1
  13. package/templates/events-meetups-owner/tier5-src/himi-owner-lite-home/index.ts +6 -1
  14. package/templates/gym-fitness/tier5-src/himi-branded-lite-home/index.ts +6 -1
  15. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-home/index.ts +6 -1
  16. package/templates/nonprofit-cause/tier5-src/himi-branded-lite-home/index.ts +6 -1
  17. package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-home/index.ts +6 -1
  18. package/templates/owner-lite/tier5-src/himi-owner-lite-home/index.ts +6 -1
  19. package/templates/podcast-creator/tier5-src/himi-branded-lite-home/index.ts +6 -1
  20. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-home/index.ts +6 -1
  21. package/templates/portfolio-creative/tier5-src/himi-branded-lite-home/index.ts +6 -1
  22. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-home/index.ts +6 -1
  23. package/templates/restaurant/tier5-src/himi-branded-lite-home/index.ts +6 -1
  24. package/templates/restaurant-owner/tier5-src/himi-owner-lite-home/index.ts +6 -1
  25. package/templates/retail-store/tier5-src/himi-branded-lite-home/index.ts +6 -1
  26. package/templates/retail-store-owner/tier5-src/himi-owner-lite-home/index.ts +6 -1
  27. package/templates/yoga-studio/tier5-src/himi-branded-lite-home/index.ts +6 -1
  28. package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-home/index.ts +6 -1
package/dist/cli.mjs CHANGED
@@ -23567,6 +23567,7 @@ function shouldRevealError(args) {
23567
23567
  var EMAIL_RE, URL_HOST_RE, INTEGER_RE, NUMBER_RE;
23568
23568
  var init_validation = __esm({
23569
23569
  "../../core/ts/src/validation.ts"() {
23570
+ "use strict";
23570
23571
  EMAIL_RE = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*\.[A-Za-z]{2,}$/;
23571
23572
  URL_HOST_RE = /^[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*(:[0-9]+)?$/;
23572
23573
  INTEGER_RE = /^[+-]?[0-9]+$/;
@@ -24226,6 +24227,7 @@ function validateWorkerSubtree(raw, slotId, policy, actionCatalog) {
24226
24227
  var WORKER_SUBTREE_CEILINGS, ID_PART, ACTION_ID;
24227
24228
  var init_worker_subtree = __esm({
24228
24229
  "../../core/ts/src/worker-subtree.ts"() {
24230
+ "use strict";
24229
24231
  init_worker_subtree_safe_types_generated();
24230
24232
  WORKER_SUBTREE_CEILINGS = Object.freeze({
24231
24233
  maxEncodedBytes: 65536,
@@ -56159,6 +56161,56 @@ ${log}` : ""}`, true);
56159
56161
  return r.code === 0 && r.json && typeof r.json === "object" && !Array.isArray(r.json) ? { ...res, structuredContent: r.json } : res;
56160
56162
  }
56161
56163
  },
56164
+ {
56165
+ name: "himi_logs",
56166
+ title: "Worker console logs",
56167
+ description: "What the app's Tier-5 workers printed with `console.log/info/warn/error` at runtime, in the web preview, Himi Player or the native app \u2014 read back from the serve plane. The CONSOLE channel only: failed actions and `error_logged` events are on himi_telemetry. To watch a flow, interact with the preview, then call again with `since` = the last `seq` you saw. A draft release's logs are readable as-is; a live release's need a telemetry token configured for the CLI (`HIMI_TELEMETRY_TOKEN`) \u2014 himi_login does not provide one, so on a 403 tell the user.",
56168
+ annotations: READ_PLANE,
56169
+ inputSchema: z2.object({ app: APP_ID, release: RELEASE_ID.optional(), screen: z2.string().optional().describe("Only lines from this screen id."), level: LOG_LEVEL, since: SINCE, limit: LIMIT }),
56170
+ handler: async (a, d) => fromCli(await d.runCli([
56171
+ "logs",
56172
+ "--app",
56173
+ String(a.app),
56174
+ ...opt("--release", a.release),
56175
+ ...opt("--screen", a.screen),
56176
+ ...opt("--level", a.level),
56177
+ ...opt("--since", a.since),
56178
+ ...opt("--limit", a.limit),
56179
+ ...opt("--target", d.login.target())
56180
+ ]))
56181
+ },
56182
+ {
56183
+ name: "himi_telemetry",
56184
+ title: "Runtime telemetry for a release",
56185
+ description: "A release's runtime telemetry from the serve plane: the EVENT stream (screen views, `action_failed`, `error_logged`, `worker_console`, \u2026) plus the worker console lines, each with a `seq` cursor. The first place to look when a screen misbehaves at runtime but validate/test pass. `type` narrows to one event (e.g. `action_failed`); `crashes` adds crash reports. The two channels count separately: to read only what is new, pass the returned `cursor` as `since` and `logCursor` as `logSince`. Same access rule as himi_logs: a draft is readable as-is, a live release needs `HIMI_TELEMETRY_TOKEN`.",
56186
+ annotations: READ_PLANE,
56187
+ inputSchema: z2.object({
56188
+ app: APP_ID,
56189
+ release: RELEASE_ID.min(1),
56190
+ screen: z2.string().optional().describe("Only rows from this screen id."),
56191
+ type: z2.string().optional().describe("Only events of this type, e.g. `action_failed` or `error_logged`."),
56192
+ level: LOG_LEVEL,
56193
+ since: z2.number().int().min(0).optional().describe("Only EVENTS after this `seq` \u2014 the `cursor` a previous call returned."),
56194
+ logSince: z2.number().int().min(0).optional().describe("Only console LINES after this `seq` \u2014 the `logCursor` a previous call returned. Omitted: the console channel is read from `since` too, which only lines up on a first read."),
56195
+ limit: LIMIT,
56196
+ crashes: z2.boolean().optional().describe("Also return crash reports.")
56197
+ }),
56198
+ handler: async (a, d) => fromCli(await d.runCli([
56199
+ "telemetry",
56200
+ "--app",
56201
+ String(a.app),
56202
+ "--release",
56203
+ String(a.release),
56204
+ ...opt("--screen", a.screen),
56205
+ ...opt("--type", a.type),
56206
+ ...opt("--level", a.level),
56207
+ ...opt("--since", a.since),
56208
+ ...opt("--log-since", a.logSince),
56209
+ ...opt("--limit", a.limit),
56210
+ ...sw("--crashes", a.crashes),
56211
+ ...opt("--target", d.login.target())
56212
+ ]))
56213
+ },
56162
56214
  {
56163
56215
  name: "himi_preview_links",
56164
56216
  title: "Preview links for a release",
@@ -56176,7 +56228,7 @@ ${log}` : ""}`, true);
56176
56228
  }
56177
56229
  ];
56178
56230
  }
56179
- var MAX_TEXT2, clip, text6, json3, opt, sw, DIR2, LEARN, CHECK, LOCAL_WRITE, PUBLISH, PREVIEW_HINT, LOGIN_HINT, PATH_ARGS;
56231
+ var MAX_TEXT2, clip, text6, json3, opt, sw, DIR2, LEARN, CHECK, LOCAL_WRITE, PUBLISH, READ_PLANE, APP_ID, RELEASE_ID, LOG_LEVEL, SINCE, LIMIT, PREVIEW_HINT, LOGIN_HINT, PATH_ARGS;
56180
56232
  var init_tools = __esm({
56181
56233
  "src/mcp/tools.ts"() {
56182
56234
  init_file_tools();
@@ -56192,6 +56244,12 @@ var init_tools = __esm({
56192
56244
  CHECK = { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false };
56193
56245
  LOCAL_WRITE = { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false };
56194
56246
  PUBLISH = { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true };
56247
+ READ_PLANE = { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true };
56248
+ APP_ID = z2.string().min(1).describe("The app id as published (`himalaya.content.json` `appId`).");
56249
+ RELEASE_ID = z2.string().describe("The release id \u2014 e.g. the draft `himi_push` returned.");
56250
+ LOG_LEVEL = z2.enum(["log", "info", "warn", "error", "debug"]).optional().describe("Keep only console lines at this level.");
56251
+ SINCE = z2.number().int().min(0).optional().describe("Only rows after this `seq` cursor \u2014 pass the last `seq` you saw to read just what is new.");
56252
+ LIMIT = z2.number().int().min(1).max(2e3).optional().describe("At most this many rows.");
56195
56253
  PREVIEW_HINT = "The preview is already running: open `url` in your built-in browser \u2014 Claude Code desktop's browser pane, Cursor's Browser tool, the Browser in Codex inside the ChatGPT desktop app, VS Code's integrated browser. Do not also start the `himi-preview` launch configuration: it serves the same port, and is the way to start a preview only when none is running. A terminal-only agent should show the owner `himi_render` PNGs instead. `board` (when present) is the build board on the same origin.";
56196
56254
  LOGIN_HINT = "Not signed in to the himi serve plane. Call himi_login: it opens a browser window where the user signs in to Wix (this server never sees the credential). A user with a terminal can run `himi login --browser` instead. Then retry.";
56197
56255
  PATH_ARGS = ["dir", "parentDir", "file", "out"];
@@ -59032,21 +59090,21 @@ var init_preview_assets_generated = __esm({
59032
59090
  "../../packages/serve/src/preview-assets.generated.ts"() {
59033
59091
  init_preview_assets_format();
59034
59092
  PREVIEW_ASSET_MANIFEST = [
59035
- { key: "assets/index-7BurEkU-.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 1105044, sha256: "c12af4623d4bd925f3c42305e5fa5c9c594100bb4589247b29d1b4c5e45db02a" },
59036
- { key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset: 1105052, length: 4610, sha256: "994062dd7af4186a739de55dd9e151c63b6301f8e2cbafc608d35c2e87da0cd2" },
59037
- { key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset: 1109662, length: 488584, sha256: "d7598e12c5dbef095ff8272cfc55da0250bd07fbdecbac8a530b9b277872a134" },
59038
- { key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 1598246, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
59039
- { key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 1689170, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
59040
- { key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 1780154, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
59041
- { key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 1871134, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
59042
- { key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 1962006, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
59043
- { key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 2052986, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
59044
- { key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 2161622, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
59045
- { key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 2270706, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
59046
- { key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 2379754, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
59047
- { key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 2487454, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
59048
- { key: "index.html", contentType: "text/html; charset=utf-8", offset: 2575562, length: 4947, sha256: "9264715537c78682238c030e4611123deb363e0619f2ac2f710facde2cf5db2d" },
59049
- { key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 2580509, length: 17209, sha256: "dffc9718e2faa63ae2cc919e0a842f585ed565aaaa7c53778e90379442c731b6" }
59093
+ { key: "assets/index-MTleSNX5.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 1105924, sha256: "cd795ed12abde9ce83261aa3031594c0290b9b939f5d760c183e6eab445037e8" },
59094
+ { key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset: 1105932, length: 4610, sha256: "994062dd7af4186a739de55dd9e151c63b6301f8e2cbafc608d35c2e87da0cd2" },
59095
+ { key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset: 1110542, length: 488584, sha256: "d7598e12c5dbef095ff8272cfc55da0250bd07fbdecbac8a530b9b277872a134" },
59096
+ { key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 1599126, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
59097
+ { key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 1690050, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
59098
+ { key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 1781034, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
59099
+ { key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 1872014, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
59100
+ { key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 1962886, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
59101
+ { key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 2053866, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
59102
+ { key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 2162502, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
59103
+ { key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 2271586, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
59104
+ { key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 2380634, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
59105
+ { key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 2488334, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
59106
+ { key: "index.html", contentType: "text/html; charset=utf-8", offset: 2576442, length: 4947, sha256: "19a6a0d5ddc194f08dcd03c96099db31994445a051fad14a09bcfaa724f51298" },
59107
+ { key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 2581389, length: 17209, sha256: "dffc9718e2faa63ae2cc919e0a842f585ed565aaaa7c53778e90379442c731b6" }
59050
59108
  ];
59051
59109
  }
59052
59110
  });
@@ -64781,7 +64839,7 @@ async function visitorPass(url, siteFetch) {
64781
64839
  }
64782
64840
  return { identity, routes: routes.slice(0, MAX_ROUTES), gaps };
64783
64841
  }
64784
- var MAX_HTML_BYTES, MAX_BUNDLE_BYTES, MAX_BUNDLES, MAX_ROUTES, APP_ID, attr, decodeEntities;
64842
+ var MAX_HTML_BYTES, MAX_BUNDLE_BYTES, MAX_BUNDLES, MAX_ROUTES, APP_ID2, attr, decodeEntities;
64785
64843
  var init_visitor = __esm({
64786
64844
  "src/base44-analyze/visitor.ts"() {
64787
64845
  init_write_artifacts();
@@ -64789,7 +64847,7 @@ var init_visitor = __esm({
64789
64847
  MAX_BUNDLE_BYTES = 8 * 1024 * 1024;
64790
64848
  MAX_BUNDLES = 4;
64791
64849
  MAX_ROUTES = 80;
64792
- APP_ID = /^[a-f0-9]{24}$/;
64850
+ APP_ID2 = /^[a-f0-9]{24}$/;
64793
64851
  attr = (tag, name) => {
64794
64852
  const m = new RegExp(`\\b${name}\\s*=\\s*("([^"]*)"|'([^']*)')`, "i").exec(tag);
64795
64853
  return m ? m[2] ?? m[3] : void 0;
@@ -64813,7 +64871,7 @@ async function analyzeBase44(input, ports) {
64813
64871
  const appId2 = input.appId?.trim() || void 0;
64814
64872
  const sample = input.sample ?? DEFAULT_SAMPLE_ROWS;
64815
64873
  if (!url && !appId2) throw new Base44InputError("himi base44 analyze needs --url (visitor pass) or --app-id (owner pass)");
64816
- if (appId2 && !APP_ID.test(appId2)) throw new Base44InputError(`--app-id must be a 24-character hex Base44 app id, got ${JSON.stringify(appId2)}`);
64874
+ if (appId2 && !APP_ID2.test(appId2)) throw new Base44InputError(`--app-id must be a 24-character hex Base44 app id, got ${JSON.stringify(appId2)}`);
64817
64875
  if (!Number.isInteger(sample) || sample < 0 || sample > 100) throw new Base44InputError("--sample must be an integer from 0 to 100");
64818
64876
  const owner = !!appId2 && !!ports.token;
64819
64877
  if (appId2 && !ports.token) {
Binary file
@@ -432,6 +432,40 @@ navigation/error, crash, and worker-console events from the pinned draft release
432
432
  screen/type and cursorable with `--since` / `--follow`. `himi logs` remains the narrow
433
433
  console-only view for `console.log(...)` output.
434
434
 
435
+ Over MCP the same two reads are `himi_telemetry` and `himi_logs` (pass the last `seq` you saw
436
+ as `since` to read only what is new).
437
+
438
+ ### Logging from a worker
439
+
440
+ There is no logging SDK to import: a worker's plain `console.log/info/warn/error` **is** the log
441
+ channel, on every surface. In the web preview each line lands in the DEV panel's **Console** tab
442
+ (with the worker's boot errors, failed actions and uncaught errors); on every surface it ships as a
443
+ `worker_console` event that `himi logs` / `himi_logs` read back.
444
+
445
+ ```ts
446
+ try {
447
+ products = await loadProducts();
448
+ } catch (e) {
449
+ // The status code only — never String(e): a Wix failure carries part of the response body.
450
+ const status = (e as { status?: unknown } | null)?.status ?? /\bHTTP (\d{3})\b/.exec(String(e))?.[1];
451
+ console.warn("[catalog.load] products failed, showing cached", status !== undefined ? `HTTP ${String(status)}` : "");
452
+ products = cached;
453
+ }
454
+ ```
455
+
456
+ - **Prefix with `[service.action]`** so a line names its source when many screens log.
457
+ - **Log decisions, not every step:** a load that failed, a fallback taken, an unexpected shape.
458
+ Native samples console lines and a chatty worker drowns the one that matters.
459
+ - **Never log tokens, emails or other personal data** — the lines are stored on the plane. That
460
+ includes a raw caught error: a Wix failure carries part of the upstream response body, so log a
461
+ status or code (as above), not `String(e)`.
462
+ - **Two channels:** `himi logs` is console lines only. A failed action arrives as
463
+ `action_failed` + `error_logged` on the EVENT stream — read it with
464
+ `himi telemetry --app <app> --release <id> --type action_failed`.
465
+ - **The DEV panel's "N errors" chip** totals every tab (failed network calls, SDK faults, failed
466
+ actions, error telemetry, console errors) and says which; a Console count of 0 next to errors
467
+ means they are on those other tabs.
468
+
435
469
  ## 7. Promote
436
470
 
437
471
  ```sh
@@ -77,6 +77,8 @@ runs a session with it.
77
77
  | `himi_login` | Open a browser window where the user signs in to Wix, so publishing works with no terminal. It returns the sign-in link at once; call it again to see whether the sign-in finished. |
78
78
  | `himi_push` | Publish a **draft**: private to the owner, viewable by preview link and in Himi Player, not live. |
79
79
  | `himi_share`, `himi_preview_links` | Share links for a published release. |
80
+ | `himi_logs` | What the app's workers printed with `console.*` at runtime (preview, Himi Player, device) — what `himi logs` shows. Read-only. |
81
+ | `himi_telemetry` | A release's runtime event stream — screen views, `action_failed`, `error_logged`, crashes — plus the console lines. Read-only. |
80
82
  | `himi_base44_analyze` | Read a Base44 app into an app book (read-only) and return it as structured content — `himi docs base44-app-context`. |
81
83
 
82
84
  Each tool acts on the agent's workspace folder unless it is given a `dir`.
@@ -463,8 +463,10 @@ surface (web, iOS, Android, and the local `himi test` / `himi render --live` loo
463
463
  `_error`. Nothing is invented.
464
464
  2. **It emits `action_failed`** (`{ actionId: "tier5.<service>.<action>", source:
465
465
  "worker", error }` — the same payload the dispatcher emits for a failed dispatch)
466
- plus the `error_logged` central-log line, so the message reaches telemetry and
467
- `himi logs` instead of vanishing.
466
+ plus the `error_logged` central-log line, so the message reaches the telemetry
467
+ EVENT stream (`himi telemetry --app <app> --release <id> --type action_failed`; not `himi logs`, which is the
468
+ `console.*` channel only) and, in the web preview, the DEV panel's Console tab,
469
+ instead of vanishing.
468
470
  3. **It re-throws.** The failure is made *visible*, not caught and continued: an
469
471
  awaiting bundle and the host's `unhandledrejection` net keep every signal they had.
470
472
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.1146.0",
3
+ "version": "0.1147.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": [
@@ -67,5 +67,5 @@
67
67
  "artifactId": "himalaya-cli"
68
68
  }
69
69
  },
70
- "falconPackageHash": "da1d9d3e46786000c48c49145c2ea2b1212f236db2110b68775d29ee"
70
+ "falconPackageHash": "6e0244443eef84efe49d5d233a08bbf3819c2286723fe287fe7c1cc8"
71
71
  }
@@ -508,7 +508,12 @@ async function fetchBookingsSignal(arg: unknown): Promise<BookingsSignal> {
508
508
  try {
509
509
  const response = await queryServices({ query: { paging: { limit: 50 } } });
510
510
  return bookingsSignal(response.services ?? []);
511
- } catch {
511
+ } catch (e) {
512
+ // The block collapses without a word on screen, so say why where an agent looks:
513
+ // the DEV panel's Console tab and `himi logs`. The status only — a Wix failure's
514
+ // message carries part of the upstream body, which may hold personal data.
515
+ const status = (e as { status?: unknown } | null)?.status ?? /\bHTTP (\d{3})\b/.exec(String(e))?.[1];
516
+ console.warn("[home.bookings] services query failed; showcase hidden", status !== undefined ? `HTTP ${String(status)}` : "");
512
517
  return emptyBookingsSignal();
513
518
  }
514
519
  }
@@ -309,7 +309,12 @@ async function measuredRevenue7d(
309
309
  if (typeof measure.total === "number") return measure.total;
310
310
  const values = measure.values ?? [];
311
311
  return values.length ? values.reduce((sum, v) => sum + (v.value || 0), 0) : undefined;
312
- } catch {
312
+ } catch (e) {
313
+ // The fallback is silent on screen (Home shows the order-row sum), so say it where
314
+ // an agent looks: the DEV panel's Console tab and `himi logs`. The status only — a Wix
315
+ // failure's message carries part of the upstream body, which may hold personal data.
316
+ const status = (e as { status?: unknown } | null)?.status ?? /\bHTTP (\d{3})\b/.exec(String(e))?.[1];
317
+ console.warn("[home.revenue] analytics failed; showing the order-row sum", status !== undefined ? `HTTP ${String(status)}` : "");
313
318
  return undefined;
314
319
  }
315
320
  }
@@ -508,7 +508,12 @@ async function fetchBookingsSignal(arg: unknown): Promise<BookingsSignal> {
508
508
  try {
509
509
  const response = await queryServices({ query: { paging: { limit: 50 } } });
510
510
  return bookingsSignal(response.services ?? []);
511
- } catch {
511
+ } catch (e) {
512
+ // The block collapses without a word on screen, so say why where an agent looks:
513
+ // the DEV panel's Console tab and `himi logs`. The status only — a Wix failure's
514
+ // message carries part of the upstream body, which may hold personal data.
515
+ const status = (e as { status?: unknown } | null)?.status ?? /\bHTTP (\d{3})\b/.exec(String(e))?.[1];
516
+ console.warn("[home.bookings] services query failed; showcase hidden", status !== undefined ? `HTTP ${String(status)}` : "");
512
517
  return emptyBookingsSignal();
513
518
  }
514
519
  }
@@ -508,7 +508,12 @@ async function fetchBookingsSignal(arg: unknown): Promise<BookingsSignal> {
508
508
  try {
509
509
  const response = await queryServices({ query: { paging: { limit: 50 } } });
510
510
  return bookingsSignal(response.services ?? []);
511
- } catch {
511
+ } catch (e) {
512
+ // The block collapses without a word on screen, so say why where an agent looks:
513
+ // the DEV panel's Console tab and `himi logs`. The status only — a Wix failure's
514
+ // message carries part of the upstream body, which may hold personal data.
515
+ const status = (e as { status?: unknown } | null)?.status ?? /\bHTTP (\d{3})\b/.exec(String(e))?.[1];
516
+ console.warn("[home.bookings] services query failed; showcase hidden", status !== undefined ? `HTTP ${String(status)}` : "");
512
517
  return emptyBookingsSignal();
513
518
  }
514
519
  }
@@ -309,7 +309,12 @@ async function measuredRevenue7d(
309
309
  if (typeof measure.total === "number") return measure.total;
310
310
  const values = measure.values ?? [];
311
311
  return values.length ? values.reduce((sum, v) => sum + (v.value || 0), 0) : undefined;
312
- } catch {
312
+ } catch (e) {
313
+ // The fallback is silent on screen (Home shows the order-row sum), so say it where
314
+ // an agent looks: the DEV panel's Console tab and `himi logs`. The status only — a Wix
315
+ // failure's message carries part of the upstream body, which may hold personal data.
316
+ const status = (e as { status?: unknown } | null)?.status ?? /\bHTTP (\d{3})\b/.exec(String(e))?.[1];
317
+ console.warn("[home.revenue] analytics failed; showing the order-row sum", status !== undefined ? `HTTP ${String(status)}` : "");
313
318
  return undefined;
314
319
  }
315
320
  }
@@ -508,7 +508,12 @@ async function fetchBookingsSignal(arg: unknown): Promise<BookingsSignal> {
508
508
  try {
509
509
  const response = await queryServices({ query: { paging: { limit: 50 } } });
510
510
  return bookingsSignal(response.services ?? []);
511
- } catch {
511
+ } catch (e) {
512
+ // The block collapses without a word on screen, so say why where an agent looks:
513
+ // the DEV panel's Console tab and `himi logs`. The status only — a Wix failure's
514
+ // message carries part of the upstream body, which may hold personal data.
515
+ const status = (e as { status?: unknown } | null)?.status ?? /\bHTTP (\d{3})\b/.exec(String(e))?.[1];
516
+ console.warn("[home.bookings] services query failed; showcase hidden", status !== undefined ? `HTTP ${String(status)}` : "");
512
517
  return emptyBookingsSignal();
513
518
  }
514
519
  }
@@ -309,7 +309,12 @@ async function measuredRevenue7d(
309
309
  if (typeof measure.total === "number") return measure.total;
310
310
  const values = measure.values ?? [];
311
311
  return values.length ? values.reduce((sum, v) => sum + (v.value || 0), 0) : undefined;
312
- } catch {
312
+ } catch (e) {
313
+ // The fallback is silent on screen (Home shows the order-row sum), so say it where
314
+ // an agent looks: the DEV panel's Console tab and `himi logs`. The status only — a Wix
315
+ // failure's message carries part of the upstream body, which may hold personal data.
316
+ const status = (e as { status?: unknown } | null)?.status ?? /\bHTTP (\d{3})\b/.exec(String(e))?.[1];
317
+ console.warn("[home.revenue] analytics failed; showing the order-row sum", status !== undefined ? `HTTP ${String(status)}` : "");
313
318
  return undefined;
314
319
  }
315
320
  }
@@ -508,7 +508,12 @@ async function fetchBookingsSignal(arg: unknown): Promise<BookingsSignal> {
508
508
  try {
509
509
  const response = await queryServices({ query: { paging: { limit: 50 } } });
510
510
  return bookingsSignal(response.services ?? []);
511
- } catch {
511
+ } catch (e) {
512
+ // The block collapses without a word on screen, so say why where an agent looks:
513
+ // the DEV panel's Console tab and `himi logs`. The status only — a Wix failure's
514
+ // message carries part of the upstream body, which may hold personal data.
515
+ const status = (e as { status?: unknown } | null)?.status ?? /\bHTTP (\d{3})\b/.exec(String(e))?.[1];
516
+ console.warn("[home.bookings] services query failed; showcase hidden", status !== undefined ? `HTTP ${String(status)}` : "");
512
517
  return emptyBookingsSignal();
513
518
  }
514
519
  }
@@ -309,7 +309,12 @@ async function measuredRevenue7d(
309
309
  if (typeof measure.total === "number") return measure.total;
310
310
  const values = measure.values ?? [];
311
311
  return values.length ? values.reduce((sum, v) => sum + (v.value || 0), 0) : undefined;
312
- } catch {
312
+ } catch (e) {
313
+ // The fallback is silent on screen (Home shows the order-row sum), so say it where
314
+ // an agent looks: the DEV panel's Console tab and `himi logs`. The status only — a Wix
315
+ // failure's message carries part of the upstream body, which may hold personal data.
316
+ const status = (e as { status?: unknown } | null)?.status ?? /\bHTTP (\d{3})\b/.exec(String(e))?.[1];
317
+ console.warn("[home.revenue] analytics failed; showing the order-row sum", status !== undefined ? `HTTP ${String(status)}` : "");
313
318
  return undefined;
314
319
  }
315
320
  }
@@ -508,7 +508,12 @@ async function fetchBookingsSignal(arg: unknown): Promise<BookingsSignal> {
508
508
  try {
509
509
  const response = await queryServices({ query: { paging: { limit: 50 } } });
510
510
  return bookingsSignal(response.services ?? []);
511
- } catch {
511
+ } catch (e) {
512
+ // The block collapses without a word on screen, so say why where an agent looks:
513
+ // the DEV panel's Console tab and `himi logs`. The status only — a Wix failure's
514
+ // message carries part of the upstream body, which may hold personal data.
515
+ const status = (e as { status?: unknown } | null)?.status ?? /\bHTTP (\d{3})\b/.exec(String(e))?.[1];
516
+ console.warn("[home.bookings] services query failed; showcase hidden", status !== undefined ? `HTTP ${String(status)}` : "");
512
517
  return emptyBookingsSignal();
513
518
  }
514
519
  }
@@ -309,7 +309,12 @@ async function measuredRevenue7d(
309
309
  if (typeof measure.total === "number") return measure.total;
310
310
  const values = measure.values ?? [];
311
311
  return values.length ? values.reduce((sum, v) => sum + (v.value || 0), 0) : undefined;
312
- } catch {
312
+ } catch (e) {
313
+ // The fallback is silent on screen (Home shows the order-row sum), so say it where
314
+ // an agent looks: the DEV panel's Console tab and `himi logs`. The status only — a Wix
315
+ // failure's message carries part of the upstream body, which may hold personal data.
316
+ const status = (e as { status?: unknown } | null)?.status ?? /\bHTTP (\d{3})\b/.exec(String(e))?.[1];
317
+ console.warn("[home.revenue] analytics failed; showing the order-row sum", status !== undefined ? `HTTP ${String(status)}` : "");
313
318
  return undefined;
314
319
  }
315
320
  }
@@ -309,7 +309,12 @@ async function measuredRevenue7d(
309
309
  if (typeof measure.total === "number") return measure.total;
310
310
  const values = measure.values ?? [];
311
311
  return values.length ? values.reduce((sum, v) => sum + (v.value || 0), 0) : undefined;
312
- } catch {
312
+ } catch (e) {
313
+ // The fallback is silent on screen (Home shows the order-row sum), so say it where
314
+ // an agent looks: the DEV panel's Console tab and `himi logs`. The status only — a Wix
315
+ // failure's message carries part of the upstream body, which may hold personal data.
316
+ const status = (e as { status?: unknown } | null)?.status ?? /\bHTTP (\d{3})\b/.exec(String(e))?.[1];
317
+ console.warn("[home.revenue] analytics failed; showing the order-row sum", status !== undefined ? `HTTP ${String(status)}` : "");
313
318
  return undefined;
314
319
  }
315
320
  }
@@ -508,7 +508,12 @@ async function fetchBookingsSignal(arg: unknown): Promise<BookingsSignal> {
508
508
  try {
509
509
  const response = await queryServices({ query: { paging: { limit: 50 } } });
510
510
  return bookingsSignal(response.services ?? []);
511
- } catch {
511
+ } catch (e) {
512
+ // The block collapses without a word on screen, so say why where an agent looks:
513
+ // the DEV panel's Console tab and `himi logs`. The status only — a Wix failure's
514
+ // message carries part of the upstream body, which may hold personal data.
515
+ const status = (e as { status?: unknown } | null)?.status ?? /\bHTTP (\d{3})\b/.exec(String(e))?.[1];
516
+ console.warn("[home.bookings] services query failed; showcase hidden", status !== undefined ? `HTTP ${String(status)}` : "");
512
517
  return emptyBookingsSignal();
513
518
  }
514
519
  }
@@ -309,7 +309,12 @@ async function measuredRevenue7d(
309
309
  if (typeof measure.total === "number") return measure.total;
310
310
  const values = measure.values ?? [];
311
311
  return values.length ? values.reduce((sum, v) => sum + (v.value || 0), 0) : undefined;
312
- } catch {
312
+ } catch (e) {
313
+ // The fallback is silent on screen (Home shows the order-row sum), so say it where
314
+ // an agent looks: the DEV panel's Console tab and `himi logs`. The status only — a Wix
315
+ // failure's message carries part of the upstream body, which may hold personal data.
316
+ const status = (e as { status?: unknown } | null)?.status ?? /\bHTTP (\d{3})\b/.exec(String(e))?.[1];
317
+ console.warn("[home.revenue] analytics failed; showing the order-row sum", status !== undefined ? `HTTP ${String(status)}` : "");
313
318
  return undefined;
314
319
  }
315
320
  }
@@ -508,7 +508,12 @@ async function fetchBookingsSignal(arg: unknown): Promise<BookingsSignal> {
508
508
  try {
509
509
  const response = await queryServices({ query: { paging: { limit: 50 } } });
510
510
  return bookingsSignal(response.services ?? []);
511
- } catch {
511
+ } catch (e) {
512
+ // The block collapses without a word on screen, so say why where an agent looks:
513
+ // the DEV panel's Console tab and `himi logs`. The status only — a Wix failure's
514
+ // message carries part of the upstream body, which may hold personal data.
515
+ const status = (e as { status?: unknown } | null)?.status ?? /\bHTTP (\d{3})\b/.exec(String(e))?.[1];
516
+ console.warn("[home.bookings] services query failed; showcase hidden", status !== undefined ? `HTTP ${String(status)}` : "");
512
517
  return emptyBookingsSignal();
513
518
  }
514
519
  }
@@ -309,7 +309,12 @@ async function measuredRevenue7d(
309
309
  if (typeof measure.total === "number") return measure.total;
310
310
  const values = measure.values ?? [];
311
311
  return values.length ? values.reduce((sum, v) => sum + (v.value || 0), 0) : undefined;
312
- } catch {
312
+ } catch (e) {
313
+ // The fallback is silent on screen (Home shows the order-row sum), so say it where
314
+ // an agent looks: the DEV panel's Console tab and `himi logs`. The status only — a Wix
315
+ // failure's message carries part of the upstream body, which may hold personal data.
316
+ const status = (e as { status?: unknown } | null)?.status ?? /\bHTTP (\d{3})\b/.exec(String(e))?.[1];
317
+ console.warn("[home.revenue] analytics failed; showing the order-row sum", status !== undefined ? `HTTP ${String(status)}` : "");
313
318
  return undefined;
314
319
  }
315
320
  }
@@ -508,7 +508,12 @@ async function fetchBookingsSignal(arg: unknown): Promise<BookingsSignal> {
508
508
  try {
509
509
  const response = await queryServices({ query: { paging: { limit: 50 } } });
510
510
  return bookingsSignal(response.services ?? []);
511
- } catch {
511
+ } catch (e) {
512
+ // The block collapses without a word on screen, so say why where an agent looks:
513
+ // the DEV panel's Console tab and `himi logs`. The status only — a Wix failure's
514
+ // message carries part of the upstream body, which may hold personal data.
515
+ const status = (e as { status?: unknown } | null)?.status ?? /\bHTTP (\d{3})\b/.exec(String(e))?.[1];
516
+ console.warn("[home.bookings] services query failed; showcase hidden", status !== undefined ? `HTTP ${String(status)}` : "");
512
517
  return emptyBookingsSignal();
513
518
  }
514
519
  }
@@ -309,7 +309,12 @@ async function measuredRevenue7d(
309
309
  if (typeof measure.total === "number") return measure.total;
310
310
  const values = measure.values ?? [];
311
311
  return values.length ? values.reduce((sum, v) => sum + (v.value || 0), 0) : undefined;
312
- } catch {
312
+ } catch (e) {
313
+ // The fallback is silent on screen (Home shows the order-row sum), so say it where
314
+ // an agent looks: the DEV panel's Console tab and `himi logs`. The status only — a Wix
315
+ // failure's message carries part of the upstream body, which may hold personal data.
316
+ const status = (e as { status?: unknown } | null)?.status ?? /\bHTTP (\d{3})\b/.exec(String(e))?.[1];
317
+ console.warn("[home.revenue] analytics failed; showing the order-row sum", status !== undefined ? `HTTP ${String(status)}` : "");
313
318
  return undefined;
314
319
  }
315
320
  }
@@ -508,7 +508,12 @@ async function fetchBookingsSignal(arg: unknown): Promise<BookingsSignal> {
508
508
  try {
509
509
  const response = await queryServices({ query: { paging: { limit: 50 } } });
510
510
  return bookingsSignal(response.services ?? []);
511
- } catch {
511
+ } catch (e) {
512
+ // The block collapses without a word on screen, so say why where an agent looks:
513
+ // the DEV panel's Console tab and `himi logs`. The status only — a Wix failure's
514
+ // message carries part of the upstream body, which may hold personal data.
515
+ const status = (e as { status?: unknown } | null)?.status ?? /\bHTTP (\d{3})\b/.exec(String(e))?.[1];
516
+ console.warn("[home.bookings] services query failed; showcase hidden", status !== undefined ? `HTTP ${String(status)}` : "");
512
517
  return emptyBookingsSignal();
513
518
  }
514
519
  }
@@ -309,7 +309,12 @@ async function measuredRevenue7d(
309
309
  if (typeof measure.total === "number") return measure.total;
310
310
  const values = measure.values ?? [];
311
311
  return values.length ? values.reduce((sum, v) => sum + (v.value || 0), 0) : undefined;
312
- } catch {
312
+ } catch (e) {
313
+ // The fallback is silent on screen (Home shows the order-row sum), so say it where
314
+ // an agent looks: the DEV panel's Console tab and `himi logs`. The status only — a Wix
315
+ // failure's message carries part of the upstream body, which may hold personal data.
316
+ const status = (e as { status?: unknown } | null)?.status ?? /\bHTTP (\d{3})\b/.exec(String(e))?.[1];
317
+ console.warn("[home.revenue] analytics failed; showing the order-row sum", status !== undefined ? `HTTP ${String(status)}` : "");
313
318
  return undefined;
314
319
  }
315
320
  }
@@ -508,7 +508,12 @@ async function fetchBookingsSignal(arg: unknown): Promise<BookingsSignal> {
508
508
  try {
509
509
  const response = await queryServices({ query: { paging: { limit: 50 } } });
510
510
  return bookingsSignal(response.services ?? []);
511
- } catch {
511
+ } catch (e) {
512
+ // The block collapses without a word on screen, so say why where an agent looks:
513
+ // the DEV panel's Console tab and `himi logs`. The status only — a Wix failure's
514
+ // message carries part of the upstream body, which may hold personal data.
515
+ const status = (e as { status?: unknown } | null)?.status ?? /\bHTTP (\d{3})\b/.exec(String(e))?.[1];
516
+ console.warn("[home.bookings] services query failed; showcase hidden", status !== undefined ? `HTTP ${String(status)}` : "");
512
517
  return emptyBookingsSignal();
513
518
  }
514
519
  }
@@ -309,7 +309,12 @@ async function measuredRevenue7d(
309
309
  if (typeof measure.total === "number") return measure.total;
310
310
  const values = measure.values ?? [];
311
311
  return values.length ? values.reduce((sum, v) => sum + (v.value || 0), 0) : undefined;
312
- } catch {
312
+ } catch (e) {
313
+ // The fallback is silent on screen (Home shows the order-row sum), so say it where
314
+ // an agent looks: the DEV panel's Console tab and `himi logs`. The status only — a Wix
315
+ // failure's message carries part of the upstream body, which may hold personal data.
316
+ const status = (e as { status?: unknown } | null)?.status ?? /\bHTTP (\d{3})\b/.exec(String(e))?.[1];
317
+ console.warn("[home.revenue] analytics failed; showing the order-row sum", status !== undefined ? `HTTP ${String(status)}` : "");
313
318
  return undefined;
314
319
  }
315
320
  }