@wix/himalaya-cli 0.855.0 → 0.857.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 +1077 -745
- package/guides/himi-test.md +1 -1
- package/guides/mobile-ux.md +65 -13
- package/guides/tier-5-add-a-screen.md +4 -0
- package/package.json +2 -2
package/guides/himi-test.md
CHANGED
|
@@ -236,7 +236,7 @@ browser.
|
|
|
236
236
|
| `--no-shots` | Skip the per-screen PNGs written to `.himi/shots/`. |
|
|
237
237
|
| `--net <file>` | Use an explicit net-mocks file instead of the app's own. |
|
|
238
238
|
| `--budget <ms>` | Per-action settle budget (default 2000). |
|
|
239
|
-
| `--native` | Also decode every baked descriptor with the real native decoders; bare `--native` runs whichever toolchains are present, and `--native ios` or `--native android` selects one. |
|
|
239
|
+
| `--native` | Also decode every baked descriptor with the real native decoders; bare `--native` runs whichever toolchains are present, and `--native ios` or `--native android` selects one. **Source-checkout only** — the decoder oracles are that tree's own HimalayaCore Swift package and Gradle harness, which a published install does not ship, so it cannot run this at all (and its coverage ledger stays silent about native decoding rather than suggesting it). |
|
|
240
240
|
| `--all-screens` | Crawl every templated instance instead of one representative per structure. |
|
|
241
241
|
| `--browser` / `--no-open` / `--timeout <ms>` | Run the loop in your own browser tab (one screen per run; refuses record/net/offline/hostile/deep/budget/shots/native). |
|
|
242
242
|
| `himi test <screenId>…` | Focus one or more screens — the record and shots passes scope with them. |
|
package/guides/mobile-ux.md
CHANGED
|
@@ -135,25 +135,62 @@ 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
|
-
**Two commands read
|
|
141
|
-
|
|
144
|
+
**Two commands read this contract.** `himi validate` reports a gap as a **warning**, so a rewrite
|
|
145
|
+
that drops something the gate needs is caught in the loop you are already running rather than at
|
|
142
146
|
the end of it. `himi validate --strict` and `himi ux audit --strict` both promote that warning to a
|
|
143
|
-
**release blocker**. Both read the same
|
|
144
|
-
|
|
145
|
-
one primary call to action") fails the same as omitting them:
|
|
147
|
+
**release blocker**. Both read the same markers. The two HEADINGS are matched verbatim — other
|
|
148
|
+
tooling addresses the document by them, so a heading really is the thing itself:
|
|
146
149
|
|
|
147
150
|
- The heading `## Implementation acceptance`.
|
|
148
151
|
- The heading `## Evidence`.
|
|
149
|
-
- The phrase `one primary CTA per state`.
|
|
150
|
-
|
|
151
|
-
The fourth marker, **width evidence**, is graded by **content, not by phrase** — it is a
|
|
152
|
-
fact about what you rendered rather than a string, so there is nothing to paste. Satisfy it either
|
|
153
|
-
way:
|
|
154
152
|
|
|
155
|
-
-
|
|
156
|
-
|
|
153
|
+
The **primary-CTA** marker is satisfied **either** structurally *or* by the legacy phrase,
|
|
154
|
+
because a semantically equivalent rewrite — "each state exposes exactly one primary call to
|
|
155
|
+
action" — used to fail exactly like omitting it, and four of five independent testers wrote a
|
|
156
|
+
better document, were refused, and pasted the sentence back:
|
|
157
|
+
|
|
158
|
+
- *structurally*: `## Implementation acceptance` carries a `Primary CTA` column, has a row for
|
|
159
|
+
every state you declare in a `… states:` bullet under `## Screen contract`, and names exactly one
|
|
160
|
+
CTA per row (a comma, a semicolon or a spaced slash reads as two; "Save and close", "Save &
|
|
161
|
+
Close" and "Save + Continue" are each one label and pass). The row check reads a `states:` bullet
|
|
162
|
+
only when every item is a **name** (`ready, empty, destructive-confirm`); a bullet answered with
|
|
163
|
+
prose declares nothing and the row check is skipped rather than guessed at — no rule can tell a
|
|
164
|
+
short description from a name, and inventing states from prose would fail exactly the documents
|
|
165
|
+
that took the most care.
|
|
166
|
+
- *or literally*: the phrase `one primary CTA per state` appears anywhere. It is not deprecated —
|
|
167
|
+
a document that passes today keeps passing.
|
|
168
|
+
|
|
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)
|
|
157
194
|
and one **at 600px or wider** (medium or expanded). A number is spelled as a width when it
|
|
158
195
|
carries a **unit** — `320px`, `320 px`, `320pt`, `320dp`, `320 pixels`, `320 wide` — or sits in a
|
|
159
196
|
**screenshot filename** — `home-320.png`, `home-834-dark.png`, `home-390x844.png`. That is the
|
|
@@ -197,11 +234,26 @@ way:
|
|
|
197
234
|
`expanded` must follow within about 400 characters, so keep them in the same sentence or bullet
|
|
198
235
|
rather than in separate sections.
|
|
199
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
|
+
|
|
200
243
|
When the marker fails, the error names **which** of the four things went wrong — no compact width,
|
|
201
244
|
no wider width, two widths too far apart to be one statement, or no number spelled as a width — and
|
|
202
|
-
says so alongside the height-axis rule if that is what discarded your numbers.
|
|
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
|
|
203
248
|
gave you rather than pasting the example: the example is a form that works, not the only one.
|
|
204
249
|
|
|
250
|
+
**HTML comments are stripped before any of this runs.** The scaffold ships a `<!-- LOAD-BEARING -->`
|
|
251
|
+
note quoting the load-bearing strings verbatim, right beside the line telling you to replace the
|
|
252
|
+
example rows — so the note is guidance and never an answer: a document that kept the note and
|
|
253
|
+
deleted the prose satisfies nothing. An **unterminated** `<!--` swallows the rest of the file here
|
|
254
|
+
and in any renderer alike, so that is reported on its own rather than as four headings "missing"
|
|
255
|
+
that you can plainly see.
|
|
256
|
+
|
|
205
257
|
A `MOBILE-UX.md` that is **absent or empty** is not four missing markers. `himi ux audit` reports it
|
|
206
258
|
once, as a missing contract; `himi validate` stays silent about it entirely. Asking for the document
|
|
207
259
|
itself is the audit's job — most apps never adopt this contract, and a warning on every one of them
|
|
@@ -326,6 +326,10 @@ himi test <screenId> --record # refresh dev/net-mocks.json from live boot rea
|
|
|
326
326
|
himi test <screenId> --native # run BOTH real native decoders over the baked JSON bytes
|
|
327
327
|
```
|
|
328
328
|
|
|
329
|
+
`--native` runs only from a Himalaya **source checkout**: the decoder oracles are that tree's own HimalayaCore Swift
|
|
330
|
+
package and Gradle harness, which a published/off-repo install does not ship. Working off-repo,
|
|
331
|
+
skip it — the coverage ledger will not ask you for it either.
|
|
332
|
+
|
|
329
333
|
**Then see it.** `himi render <screenId> --png <file>` per scheme is the fast visual check,
|
|
330
334
|
and `himi push` gives you a draft preview to open in a browser. Neither drives a real
|
|
331
335
|
device, which is what `himi ux record` is for: it records per platform that a drive
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/himalaya-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.857.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": "
|
|
66
|
+
"falconPackageHash": "629ade3aa68530bbdcfe1842b24b52fcb778d8e8f85ff394bc3372fb"
|
|
67
67
|
}
|