@wix/himalaya-cli 0.1436.0 → 0.1437.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
@@ -8022,6 +8022,7 @@ function buttonVariant(style) {
8022
8022
  var SYSTEM_FONT_FAMILY, TONAL_ELEVATION_ALPHA, BUTTON_MIN_HIT_TARGET, nonNegative, nonEmpty2, own, COLOR_TOKEN_PROPS, TYPOGRAPHY_TOKEN_PROPS, BUTTON_VARIANTS;
8023
8023
  var init_tokens = __esm({
8024
8024
  "../../core/ts/src/tokens.ts"() {
8025
+ "use strict";
8025
8026
  SYSTEM_FONT_FAMILY = "$system";
8026
8027
  TONAL_ELEVATION_ALPHA = [0, 0.05, 0.08, 0.11, 0.12, 0.14];
8027
8028
  BUTTON_MIN_HIT_TARGET = 44;
@@ -8077,6 +8078,7 @@ function resolveTranslation(value, catalog3, sourceCatalog) {
8077
8078
  var BINDING_SIGILS, BINDING_SIGIL_RE, TRANSLATION_PREFIX, TRANSLATION_KEY_RE;
8078
8079
  var init_bindings = __esm({
8079
8080
  "../../core/ts/src/bindings.ts"() {
8081
+ "use strict";
8080
8082
  BINDING_SIGILS = ["service", "flag", "item", "t"];
8081
8083
  BINDING_SIGIL_RE = new RegExp(
8082
8084
  `^\\$(?:${BINDING_SIGILS.filter((s2) => s2 !== "t").join("|")})\\b|^\\$t:`
@@ -20698,14 +20700,15 @@ async function localDbEntities(dir) {
20698
20700
  const names2 = (schema?.entities ?? []).map((e2) => e2?.name).filter((n2) => typeof n2 === "string" && n2.length > 0);
20699
20701
  return names2.length ? names2.map((name) => ({ name })) : null;
20700
20702
  }
20701
- function renderMocksFrom(rules, bad2, seeded) {
20702
- if (rules || seeded) {
20703
+ function renderMocksFrom(rules, bad2, seeded, base44) {
20704
+ if (rules || seeded || base44) {
20703
20705
  return {
20704
20706
  mocks: {
20705
20707
  rules: rules?.rules ?? null,
20706
20708
  cmsSeed: seeded,
20707
- from: [...rules ? [rules.from] : [], ...seeded ? ["config cms seed rows"] : []],
20708
- ...bad2 ? { ignored: `the net mocks could not be read (${bad2}), so only the cms seed rows were used` } : {}
20709
+ ...base44 ? { base44Data: base44 } : {},
20710
+ from: [...rules ? [rules.from] : [], ...seeded ? ["config cms seed rows"] : [], ...base44 ? ["Base44 seed / book sample rows"] : []],
20711
+ ...bad2 ? { ignored: `the net mocks could not be read (${bad2}), so only ${[...seeded ? ["the cms seed rows"] : [], ...base44 ? ["the Base44 seed / book sample rows"] : []].join(" and ")} were used` } : {}
20709
20712
  }
20710
20713
  };
20711
20714
  }
@@ -140221,6 +140224,7 @@ async function buildFromLoaded(preloaded, dest, opts = {}) {
140221
140224
  knownScreenIds: /* @__PURE__ */ new Set(),
140222
140225
  rules: collect2.render.mocks.rules ?? null,
140223
140226
  ...collect2.render.mocks.cmsSeed ? { cmsSeed: collect2.render.mocks.cmsSeed } : {},
140227
+ ...collect2.render.mocks.base44Data ? { base44Data: collect2.render.mocks.base44Data } : {},
140224
140228
  localDbSchema: appLocalDbSchema,
140225
140229
  ...collect2.render.loadBudgetMs ? { budgetMs: collect2.render.loadBudgetMs } : {},
140226
140230
  transportWrap: (call) => async (method, path2, body) => {
@@ -184220,7 +184224,8 @@ var USAGE = `himi \u2014 the Himalaya authoring CLI (remote dev loop)
184220
184224
  --live runs the worker's fetches against REAL Wix (minted visitor token) and awaits
184221
184225
  load(), so the render shows LIVE data (needs network + a Wix clientId in config.ts);
184222
184226
  --mocks runs load() against the app's OWN recorded data instead \u2014 dev/net-mocks.json
184223
- (what \`himi test --record\` writes) and the config's cms seed rows, as \`himi test\`'s
184227
+ (what \`himi test --record\` writes), the config's cms seed rows, and for a Base44 app
184228
+ its base44.entities seed rows then the analyze book's sample rows, as \`himi test\`'s
184224
184229
  shots do; no request leaves this machine. With none, it renders the initial state.
184225
184230
  It is the DEFAULT whenever the app has recorded data (mocks.default in the output);
184226
184231
  --no-mocks renders the offline initial state instead;
@@ -184926,7 +184931,7 @@ var COMMANDS2 = [
184926
184931
  { name: "ux", summary: "audit or record mobile UX evidence. `audit` checks the public-safe contract, seeded blank acceptance rows, placeholder source copy, app-specific mocks, and iOS/Android audit records. It warns while existing templates migrate; `--strict` promotes missing evidence. `record` stores checks performed on an installed iOS/Android build: `--checks` is required for passed|failed and empty for unavailable, which drove nothing and needs a `--reason` instead. `record` also STAMPS the release it audited (it resolves the id from a build, the same one a push would publish), because an unforced `himi push` of a release with screens refuses when no drive is recorded for THAT release, or when the one that is recorded says `failed` \u2014 the artifact stopped being advice nobody reads (#2955). `unavailable` still satisfies it; only `failed` refuses.", required: "audit [--content <dir>] [--strict] [--json] | record --content <dir> --platform ios|android --status passed|failed|unavailable [--checks back,keyboard,...] [--reason <text>]" },
184927
184932
  { name: "progress", summary: 'the build JOURNAL an agent keeps for the owner while it works. `himi progress "<what changed>" --step <1-8|name> --image <png>` appends one postcard to .himi/progress.jsonl \u2014 the step is one of the customer journey\'s eight (discover, classify, plan, implement, brand, validate, review, download) \u2014 and COPIES each image, content-addressed, into .himi/history/, because .himi/shots/ is overwritten by every render and cleared by every full `himi test`, so a path into it would later show a different picture than the one the owner was sent. --image repeats. With NO --image, the home screen\'s current shot is attached automatically, only when it is no older than the last source change and not the picture the latest journaled postcard already shows \u2014 and never a shot that landed on loading placeholders, an empty or an error state (.himi/shot-states.json): then the newest home picture of the current source that shows content goes on instead (its .himi/history copy, `imageNote` saying so), or none \u2014 except on the HANDOVER card (`--step review`), where a repeat is the point and it attaches anyway; that card\'s output also names the making-of (`makingOf`, .himi/making-of.html, rebuilt when missing or older than the journal so it ends on this card) and its `next` says to hand it to the owner beside the preview link; `imageAttached` in the output says whether the postcard carries a picture (with `imageNote` saying why not, or which picture went on instead), and `--no-image` sends a text-only postcard. --notify also raises a best-effort desktop notification for an owner who stepped away. A bare `himi progress` prints the journal with the current step and elapsed time \u2014 also how an agent recovers its place after its context was compacted. APPROVALS: `--approve <gate> "<what>"` records one the customer just gave (gates: site-create, connect, private-data, draft, promote, push-signing, qa-build) in .himi/approvals.jsonl, and `--done <gate>` / `--drop <gate>` closes it \u2014 an approval is owed until then, and the chat that held it does not survive a new session. `--brief` prints plain text for a session start: the current step, the last postcard, every open approval, and whether this app\'s agent files are stale \u2014 the SessionStart hook `himi agent-init` installs runs exactly this. The CLI also journals milestones by itself \u2014 the first PNG render of the home screen (for an app a current `himi init` started: once as the template\'s "Starting point" while the source is what init wrote, then once as "First look at your app" after it diverges, Markdown edits not counting; once per app otherwise), a `himi test` crawl whose outcome changed since the last one (its counts or its home picture; an identical re-run writes none, and a repeat names what changed: "The home screen changed since the last crawl." or the changed counts, was \u2192 now), every draft push (with the home picture only when that shot is newer than the last source edit \u2014 otherwise the postcard says why and names `himi render <home> --png`), and ONE rule for a long silence: a successful home `render --png` more than ten minutes after the newest postcard of any kind, with a picture the latest postcard does not show, journals "Still building: here\'s the home screen now." with it (never twice within the window). When a crawl\'s or a draft\'s home picture is the first of an app whose source diverged, "First look at your app" is journaled first, from that shot, once. All are marked `"by": "himi"`; they never move the journey step, carry no link or credential, and step aside (folded out of every reader) when the agent journals the same step or picture within five minutes. Local only: nothing is sent anywhere.', required: '["<message>" [--step <1-8|name>] [--image <png>]\u2026 [--no-image] [--notify]] [--content <dir>] | --approve|--done|--drop <gate> ["<note>"] | --brief' },
184928
184933
  { name: "studio", summary: "open the BUILD BOARD \u2014 one local page the owner can leave open while an agent builds their app, which fills itself in: every screen as it renders (NEW/CHANGED badges, and each earlier version kept for a filmstrip), the journey stepper and the latest postcard from `himi progress`, the validate/test/UX/draft checks as they run, the site next to the app's home screen with its palette, and the navigation the test crawl followed. Writes .himi/studio/index.html and opens it; the page re-reads its state every two seconds, so nothing needs to be served. OPT-IN BY EXISTENCE: until this command (or `himi init`, which makes the board for every app it creates, without opening a browser) has run, no other command touches .himi/studio/ \u2014 after it, render/test/validate/push/icon/site/ux/progress each refresh the board as they finish (best-effort; never fails a command). Every image is a content-addressed copy in .himi/history/, never a live path into .himi/shots/. Local only, no secrets: it never reads a preview token, handover code or control token. --no-open prints the path instead (SSH, CI). `himi studio reel` writes the MAKING-OF: one self-contained HTML file (every image inlined, nothing fetched) with a flipbook of the home screen version by version, captioned by the postcard in effect at the time, the final screens, and every postcard \u2014 sized to stay attachable, thinning frames first. Defaults to .himi/making-of.html (never archived by push), which every successful `himi push --draft` also rebuilds and names as `reel` in its output; --out to put it elsewhere. The output names that file as the one to hand the owner (`handover: {file, hint}` in JSON; two plain lines at a terminal) \u2014 beside the preview link, never instead of it.", required: "[--content <dir>] [--no-open] | reel [--out <file>] [--no-open]" },
184929
- { name: "render", summary: "headless-render a screen with the web renderer: render-tree + diagnostics, optional --png [<file>] (bare: .himi/shots/<id>.png, what the build board shows), --scheme dark, --tree. Local by default (content dir). Pass --remote --app --release to hit GET /v1/preview/\u2026/render on the serve plane after a push. Boots the worker so $service bindings resolve; --static raw bindings; --live real Wix fetches; --mocks (the DEFAULT whenever the app has recorded data; --no-mocks for the offline initial state) runs load() against the app's own recorded data (dev/net-mocks.json from `himi test --record`, then the config's cms seed rows \u2014 hermetic, never a request; with neither it paints the initial state, and `mocks: {used: false}` says why), which is what the automatic pictures use, so they show the app's content instead of its offline placeholders; --state injects worker state; --input supplies pre-boot navigation params; --width/--device for PNG viewport; --rtl for dir=rtl + $env:isRTL.", required: "<screenId> [--content <dir>] [--scheme dark] [--png [<file>]] [--tree] [--static] [--live] [--mocks | --no-mocks] [--state <json|file>] [--input <json|file>] [--width <px> | --device <name>] [--rtl] [--remote --app --release]" },
184934
+ { name: "render", summary: "headless-render a screen with the web renderer: render-tree + diagnostics, optional --png [<file>] (bare: .himi/shots/<id>.png, what the build board shows), --scheme dark, --tree. Local by default (content dir). Pass --remote --app --release to hit GET /v1/preview/\u2026/render on the serve plane after a push. Boots the worker so $service bindings resolve; --static raw bindings; --live real Wix fetches; --mocks (the DEFAULT whenever the app has recorded data; --no-mocks for the offline initial state) runs load() against the app's own recorded data (dev/net-mocks.json from `himi test --record`, then the config's cms seed rows, and the Base44 layer `himi test` uses \u2014 base44.entities seed rows and the analyze book's sample rows \u2014 hermetic, never a request; with neither it paints the initial state, and `mocks: {used: false}` says why), which is what the automatic pictures use, so they show the app's content instead of its offline placeholders; --state injects worker state; --input supplies pre-boot navigation params; --width/--device for PNG viewport; --rtl for dir=rtl + $env:isRTL.", required: "<screenId> [--content <dir>] [--scheme dark] [--png [<file>]] [--tree] [--static] [--live] [--mocks | --no-mocks] [--state <json|file>] [--input <json|file>] [--width <px> | --device <name>] [--rtl] [--remote --app --release]" },
184930
184935
  { name: "cms", summary: "inspect, provision, and seed the app's CMS (Wix Data) collections, declared as a `cms` block in config.ts. `query` is READ-ONLY \u2014 by default it fetches ONLY the physical ids `config.ts` declares (item counts + schema drift) and reports `siteScanned: false`; it never lists the site, so an UNDECLARED `himi_<app>_` collection this app owns is not reached without `--all`. `--all` SCANS the site \u2014 every collection it lists is labeled `owned`/`adopted`/`foreign`, and it describes every foreign one \u2014 id, non-system field keys + types, and the site's read role \u2014 so an app with no `cms` block at all can DISCOVER a collection to adopt (`--all` is the one case where a missing `cms` block is not 'nothing to do'). Foreign collections are described up to a cap and are never item-counted (`itemCount: null`), because a row count is one query each; `foreign.count` is how many the scan LISTED \u2014 it follows the list endpoint's pages, and `listingIncomplete: true` says when the walk stopped short of the end, with `unlistedCollections` counting what it left out when Wix gave a paging total \u2014 and `foreign.truncated` says how many of those went undescribed, each still NAMED in `foreign.others` (id + displayName), so a collection the site already has is never hidden behind the cap. The scan is OWNER-scoped \u2014 it needs --site <msid> (or WIX_SITE_ID) plus owner auth via `wix token`; a visitor token can read a public collection's ITEMS but can never enumerate collections, so there is no tokenless discovery path. `create` reconciles declared collections additively and idempotently, and REFUSES any id outside the app's `himi_<app>_` namespace, so it is safe against a production site. It reports declared-vs-site `permissionDrift` but never writes permissions unless asked with --apply-permissions, so a field reconcile can't silently revert access control changed in the dashboard. `seed` inserts the git-tracked `seed:` rows into EMPTY owned collections (--force to add to a non-empty one; --ai writes placeholder rows plus a refinement prompt for you to review). Adopted collections (declared by `wixId`) are read-only and never created, updated, or seeded. Site from --site <msid> or WIX_SITE_ID; owner auth via `wix token`.", required: "query|create|seed [--site <msid>] [--content <dir>] [--all] [--dry-run] [--force] [--allow-destructive] [--apply-permissions] [--only <id>] [--ai] [--count <n>]" },
184931
184936
  { name: "data", summary: "read-only plan or explicitly provision/seed declared KV and Wix Data resources. Preview and production are separate scopes. KV administration uses the operator data plane from --data-url/HIMI_DATA_ADMIN_URL and HIMI_DATA_ADMIN_TOKEN; draft push never calls it.", required: "plan|create|seed [--site <msid>] [--environment preview|production] [--content <dir>] [--data-url <url>] [--dry-run] [--force]" },
184932
184937
  { name: "icons", summary: "list the valid Icon.name vocabulary (an unknown name renders a fallback glyph; validate warns on unknown names) (offline)", required: "[--json]" },
@@ -188818,7 +188823,8 @@ ${[...afterRun.next, ...testReminder ? [testReminder] : []].join("\n")}`);
188818
188823
  }
188819
188824
  const cmsSeed = await cmsSeedRows(dir, app).catch(() => null);
188820
188825
  const seeded = cmsSeed && Object.keys(cmsSeed).length ? cmsSeed : null;
188821
- const picked = renderMocksFrom(rules, bad2, seeded);
188826
+ const base44Data = await base44CrawlData(dir, app).catch(() => null);
188827
+ const picked = renderMocksFrom(rules, bad2, seeded, base44Data);
188822
188828
  mocks = picked.mocks;
188823
188829
  if (!mocksByDefault || bad2) mocksNote = picked.note;
188824
188830
  }
@@ -188830,7 +188836,7 @@ ${[...afterRun.next, ...testReminder ? [testReminder] : []].join("\n")}`);
188830
188836
  ...hasWorkers ? { tier5Dir: bundleOutDir2(dir) } : {},
188831
188837
  // The settled state is always kept (printed only under --dump-state): it is what says whether
188832
188838
  // the picture landed on the screen's content or on its error, loading or empty state.
188833
- collect: { lint: true, strict, render: { screenId, scheme, png: wantPng, hydrate, dumpState: true, ...live3 ? { live: true } : {}, ...injectedState ? { state: injectedState } : {}, ...injectedInput ? { input: injectedInput } : {}, ...renderWidth ? { width: renderWidth } : {}, ...flags.rtl === true ? { rtl: true } : {}, ...loadBudgetMs ? { loadBudgetMs } : {}, ...mocks ? { mocks: { rules: mocks.rules, cmsSeed: mocks.cmsSeed } } : {} } }
188839
+ collect: { lint: true, strict, render: { screenId, scheme, png: wantPng, hydrate, dumpState: true, ...live3 ? { live: true } : {}, ...injectedState ? { state: injectedState } : {}, ...injectedInput ? { input: injectedInput } : {}, ...renderWidth ? { width: renderWidth } : {}, ...flags.rtl === true ? { rtl: true } : {}, ...loadBudgetMs ? { loadBudgetMs } : {}, ...mocks ? { mocks: { rules: mocks.rules, cmsSeed: mocks.cmsSeed, ...mocks.base44Data ? { base44Data: mocks.base44Data } : {} } } : {} } }
188834
188840
  });
188835
188841
  const r2 = (outcome.renders ?? [])[0];
188836
188842
  if (!r2) {
@@ -219,7 +219,8 @@ every run; record against a **QA site**, never production. See
219
219
 
220
220
  **The pictures use it too.** `himi render <id> --png` runs the worker's load against the same
221
221
  recorded data whenever the app has some — `dev/net-mocks.json`, then the config's cms seed rows,
222
- never the canned fixture and never a request — so a data-driven screen paints its content instead
222
+ and for a Base44 app the same Base44 layer `himi test` uses (`base44.entities` seed rows, then the
223
+ analyze book's sample rows) — never the canned fixture and never a request — so a data-driven screen paints its content instead
223
224
  of its offline placeholders. It is the default (`mocks.default` in the output); `--mocks` asks for
224
225
  it explicitly, `--no-mocks` renders the offline initial state, and `--live`, `--static` and
225
226
  `--state` each render the data they name instead. The automatic pictures (`himi init`'s first look,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.1436.0",
3
+ "version": "0.1437.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": [
@@ -71,5 +71,5 @@
71
71
  "artifactId": "himalaya-cli"
72
72
  }
73
73
  },
74
- "falconPackageHash": "f7ae66a60361733dac4fb8eca6e9d6ded412ab35390c6dea84350b76"
74
+ "falconPackageHash": "9420ac69c3606bfc2c5c00103d9082f80dbed8b2d813d658111e6eeb"
75
75
  }