@wix/himalaya-cli 0.856.0 → 0.858.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.
@@ -230,6 +230,12 @@ the complete decision order and examples.
230
230
  publishes to the internal registry `npm.dev.wixpress.com`, which is unreachable off-VPN. The
231
231
  CLI itself is not: it comes from public npm.
232
232
  - ⛔ **Needs a Wix sign-in:** `himi push` / `promote` publish and activate your release.
233
+ To change **part** of a release instead of republishing it, `push --only <selector>` publishes
234
+ just the named items — same build + lint gate, derived from the live release — and `himi patch`
235
+ does the same from a raw file on a machine with no content package. Both require an explicit
236
+ `--draft` or `--live`: a partial publish has no safe default, and neither carries an attestation
237
+ or refreshes the source archive (the output names both). Prefer `push` for anything you would
238
+ want restorable.
233
239
  After a push, **`context` / `screens` / `diagnose` / `deeplinks` / `render --remote` /
234
240
  `telemetry` / `logs`** read back from what you published (over `/v1/preview/…`,
235
241
  `/v1/telemetry/events`, `/v1/telemetry/logs`), and so does **`himi dist`**
@@ -135,6 +135,10 @@ driving a native shell, record the result—not an assumption—with `himi ux re
135
135
  is required for `passed`/`failed` and names what you actually drove; an unavailable platform drove
136
136
  nothing, so it takes no checks and needs a `--reason` instead.
137
137
 
138
+ `himi render --width`/`--device` writes into the same `.himi/ux-audit.json`, appending the width it
139
+ rendered. That is what the width marker below reads first, so rendering the screen at two widths is
140
+ itself the evidence — see the strict audit contract.
141
+
138
142
  ### Strict audit contract
139
143
 
140
144
  **Two commands read this contract.** `himi validate` reports a gap as a **warning**, so a rewrite
@@ -162,12 +166,31 @@ better document, were refused, and pasted the sentence back:
162
166
  - *or literally*: the phrase `one primary CTA per state` appears anywhere. It is not deprecated —
163
167
  a document that passes today keeps passing.
164
168
 
165
- The remaining marker, **width evidence**, is graded by **content, not by phrase** — it is a
166
- fact about what you rendered rather than a string, so there is nothing to paste. Satisfy it either
167
- way:
168
-
169
- - Name two pixel widths spanning compact → wider, **each spelled as a width on itself**, within
170
- about 400 characters of each other so they read as one statement: one **below 600px** (compact)
169
+ The remaining marker, **width evidence**, is graded by **what you rendered, not by a phrase** — it
170
+ is a fact rather than a string, so there is nothing to paste. Three things satisfy it, and they are
171
+ tried in this order:
172
+
173
+ - **A recorded render — the primary path, and the one to prefer.** `himi render <screenId>
174
+ --content <app> --width 390`, then the same screen again at `--width 834` (or `--device iphone`
175
+ and `--device ipad`), appends the width each run actually rendered to `.himi/ux-audit.json` —
176
+ the same structured evidence file `himi ux record` writes. A recorded render **below 600px**
177
+ plus one **at 600px or wider** satisfies this marker on its own: the document need not name a
178
+ width anywhere. The gate is then reading a fact the tool produced instead of a sentence you
179
+ typed, which is the whole point of the marker.
180
+
181
+ Each entry carries the screen, the width, the `--device` preset when you used one, and the PNG
182
+ when `--png` wrote one. Re-rendering the same screen at the same width **replaces** that entry
183
+ rather than appending another, so a long dev loop leaves one line per screen and width, and a
184
+ native audit already recorded in the same file is never disturbed. A render with **no**
185
+ `--width`/`--device` records nothing on purpose: without one the PNG viewport is the headless
186
+ browser's desktop default, and writing that down would manufacture the very expanded render the
187
+ marker exists to prove. Recording never fails or slows a render — if the file cannot be written
188
+ the render still succeeds, and the paths below still apply. `.himi/` is gitignored, so this is
189
+ evidence about your checkout rather than something a pull request carries.
190
+
191
+ - Or name two pixel widths in the document, spanning compact → wider,
192
+ **each spelled as a width on itself**, within about 400 characters of each other so they read as
193
+ one statement: one **below 600px** (compact)
171
194
  and one **at 600px or wider** (medium or expanded). A number is spelled as a width when it
172
195
  carries a **unit** — `320px`, `320 px`, `320pt`, `320dp`, `320 pixels`, `320 wide` — or sits in a
173
196
  **screenshot filename** — `home-320.png`, `home-834-dark.png`, `home-390x844.png`. That is the
@@ -211,9 +234,17 @@ way:
211
234
  `expanded` must follow within about 400 characters, so keep them in the same sentence or bullet
212
235
  rather than in separate sections.
213
236
 
237
+ The two written paths are a **fallback, not a deprecation**: plenty of real renders are not driven
238
+ by `himi render` at all — a simulator, a real phone, or an automated UI driver leaves no entry in
239
+ `.himi/ux-audit.json` — so a document that satisfies this marker today still satisfies it. A render
240
+ record can only **add** a way to pass; it never takes one away, and a record showing fewer size
241
+ classes than your document claims is not itself a finding.
242
+
214
243
  When the marker fails, the error names **which** of the four things went wrong — no compact width,
215
244
  no wider width, two widths too far apart to be one statement, or no number spelled as a width — and
216
- says so alongside the height-axis rule if that is what discarded your numbers. Read the branch it
245
+ says so alongside the height-axis rule if that is what discarded your numbers. When the render
246
+ record holds something, it also names what it holds and the single command that would complete it
247
+ ("holds 390px — compact only. Render the same screen again at 600px or wider"). Read the branch it
217
248
  gave you rather than pasting the example: the example is a form that works, not the only one.
218
249
 
219
250
  **HTML comments are stripped before any of this runs.** The scaffold ships a `<!-- LOAD-BEARING -->`
@@ -1046,7 +1046,7 @@ therefore no seed endpoint to call.
1046
1046
  yarn workspace @himalaya/native-ci dist:ios # → run-dist.ts ios --force
1047
1047
  yarn workspace @himalaya/native-ci dist:android
1048
1048
  # target another app:
1049
- APP_DIR=apps/orion-clone APP_BUNDLE_ID=com.wix.orion.clone.dev \
1049
+ APP_DIR=apps/demo-app APP_BUNDLE_ID=com.himalaya.demoapp.dev \
1050
1050
  yarn workspace @himalaya/native-ci dist:ios
1051
1051
  ```
1052
1052
 
@@ -9,7 +9,7 @@ bound to a worker boolean.
9
9
 
10
10
  This is the corpus norm: of the in-repo worker bundles, ~3 in 4 model loading,
11
11
  more than half model error, and the reference apps (`apps/himi-owner-lite`,
12
- `apps/himi-blog`, `apps/demo-app`) all ship this exact shape. The
12
+ `apps/demo-app`, and Himi Blog) all ship this exact shape. The
13
13
  `examples/dynamic-list.*` and `examples/form-submit.*` pairs both demonstrate it.
14
14
 
15
15
  ## 1. One status field, derived display strings
@@ -5,8 +5,8 @@ the full result set in state, derive the visible rows from a query string. No
5
5
  network round-trip per keystroke, instant results, and the empty state can say
6
6
  *why* it's empty.
7
7
 
8
- Mined from `apps/himi-blog` (`himi-blog-feed` worker: search + category chips over
9
- posts). The `examples/search-list.*` pair that `himi agent-init` writes is a
8
+ Mined from the Himi Blog app's `himi-blog-feed` worker (search + category chips
9
+ over posts). The `examples/search-list.*` pair that `himi agent-init` writes is a
10
10
  distilled, runnable version. Builds on `himi docs recipe-dynamic-list` — read that
11
11
  first; this recipe only adds the query layer.
12
12
 
@@ -31,7 +31,7 @@ first; this recipe only adds the query layer.
31
31
  - `onSubmit` (keyboard search key) is optional when `onChange` already filters live.
32
32
  - For category/facet filtering alongside text search, add `FilterChips` with
33
33
  `optionsPath: "$service:posts.categories"` and a `selectCategory` action — same
34
- worker-side pattern (see `apps/himi-blog`).
34
+ worker-side pattern as the `himi-blog-feed` worker.
35
35
 
36
36
  ## 2. The worker: keep `all`, derive `items`
37
37
 
@@ -103,6 +103,48 @@ himi-serve release visibility --app <app> public # flip without repu
103
103
  `"visibility": "unlisted"` in `himalaya.content.json`.) The verb is `POST
104
104
  /v1/admin/app-settings` — owner-role callable, scope-checked, audited.
105
105
 
106
+ ## Patching one item of a release
107
+
108
+ A whole `himi push` sends every screen, bundle, tokens and app-config in one body. To change
109
+ **part** of a release instead, two doors derive a new release from an existing one, moving only
110
+ what you name (`POST /v1/admin/release/patch`):
111
+
112
+ ```bash
113
+ # You have the content package: same build + lint gate as a whole push, publishing less.
114
+ himi push --only changed --draft # every item whose bytes differ from the base
115
+ himi push --only screen:cart,tokens --live
116
+ himi push --only bundle:cart --draft # drags the screens that reference it
117
+
118
+ # You do not: a raw file, no build, no package lint.
119
+ himi patch screen cart --app my-app --file cart.json --live --notes "hotfix #4412"
120
+ himi patch tokens --app my-app --file tokens.json --draft
121
+ ```
122
+
123
+ **Blast radius is never implied.** A whole `himi push` defaults to `--draft` because you promote
124
+ it afterwards; a patch requires an explicit `--draft` or `--live`, and neither is a usage error.
125
+
126
+ **The base is the live release**, or `--from-release <id>` to branch off a past one. A branch does
127
+ **not merge**: activating it materializes that base's bytes for every item the patch does not move,
128
+ so anything published since goes backwards. Both doors compute that list and refuse — draft or
129
+ live — until you have seen it and passed `--accept-regressions`.
130
+
131
+ **What a derived release does not carry**, each reported in the output rather than assumed:
132
+
133
+ | Slice | What happens |
134
+ |---|---|
135
+ | attestation | **Dropped.** Evidence belongs to exact bytes, so a derived release has none and does not inherit the base's. |
136
+ | source archive | **Inherited, not refreshed** — the route accepts no archive. `himi pull` on the patched release returns the base's source, *without* your edit, so the output sets `restore: null` and says so. Only a full `himi push` re-syncs the backup. |
137
+ | assets, icon, platforms, `minBinaryVersion` | **Inherited.** `push --only` holds both manifests, so it detects a package that changed one of these and refuses `not_carried_by_patch` (override: `--accept-partial`). `himi patch` cannot see it. |
138
+ | a new screen | **Refused.** `himi patch screen` updates a screen the base already has; it cannot add one. A new screen also changes navigation, deep links and the surface envelope, and only a full `himi push` builds and checks those — so adding goes through `push`, while updating an existing screen is exactly what the raw-file door is for. |
139
+
140
+ A bundle patch must repoint a screen at the new bytes (`push --only bundle:<name>` infers this;
141
+ `himi patch bundle` takes `--for-screen`), because the manifest records patched bundles by sha
142
+ while screens still name the key they were built with — so bytes published alone land where
143
+ nothing reads them.
144
+
145
+ Caps are enforced at the door (413 `item_too_large`): a screen descriptor 256 KiB, a bundle 4 MiB,
146
+ tokens and app-config 64 KiB each, and the whole body 8 MiB.
147
+
106
148
  ## Consume (what a device / agent reads)
107
149
 
108
150
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.856.0",
3
+ "version": "0.858.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": [
@@ -63,5 +63,5 @@
63
63
  "artifactId": "himalaya-cli"
64
64
  }
65
65
  },
66
- "falconPackageHash": "82a824b69c0914106e80e0fb205b046bd8e669b53f46887b3adf0eed"
66
+ "falconPackageHash": "972ac0ce50f52661ff47fd5e94ce05f0bb2cb51462e5c44281e4f147"
67
67
  }