@wix/himalaya-cli 0.1778.0 → 0.1779.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/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/webview-embedded.d.ts +8 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +5 -0
- package/dist/cli.mjs +929 -94
- package/guides/himi-test.md +57 -0
- package/guides/release-notes.md +15 -0
- package/package.json +2 -2
package/guides/himi-test.md
CHANGED
|
@@ -311,6 +311,12 @@ Only **unambiguous** defects, so a green run stays worth trusting:
|
|
|
311
311
|
| `list-grew-on-filter` | **warning** | A filter, search or sort made a list longer. Narrowing can reorder or remove, never add. |
|
|
312
312
|
| `typed-value-ignored` | **warning** | The crawl typed the value a control really carries — the payload key every renderer injects for that control — and the dispatch changed **nothing**: no state, no navigation, no request. The value is read off the app itself (an id from the control's own options, or a word from the worker's seeded state) and is always one the control is *not* already showing, so a reducer that ignores it cannot work on device. A warning because the input is the crawl's: a reducer that legitimately no-ops on a value is possible, and `himi-test.json` `skip[]` takes the invariant. |
|
|
313
313
|
| `unnamed-control` | error | **Accessibility.** An operable control — a `Button`, `Toggle`, `TextField`, `Chip`, … or any node an `onTap` promotes to a button — whose *only* accessible name is a binding the worker resolved to an empty string, so a screen reader announces an unnamed control. `himi validate`'s a11y pass cannot see this: it counts `$service:` / `$item` as a name, because on device it becomes copy. Only the crawl has run the worker. Judged per real row inside a bound list, and reported once at the row template. Silent on a name authored empty (that is `himi validate`'s finding, not repeated here), on `null` / absent values (other invariants'), on content that is not a control (a bound `Text` that came out empty), and on nodes collapsed in that state. |
|
|
314
|
+
| `webview-call-unanswered` | error / warning | **WebView pages.** A page method that never answers. Error when nothing can answer it: an exposed method name the SDK does not export, a call the loaded page makes to a namespace the worker does not offer, or a channel that stops answering after malformed page messages. Warning when a handler merely did not settle within the budget. See [WebView pages](#webview-pages). |
|
|
315
|
+
| `webview-answer-unserializable` | error / warning | **WebView pages.** A page handler's answer the device's JSON bridge cannot carry. Error when encoding throws (a `BigInt`, a cycle): the answer is never delivered and the page's promise hangs. Warning when it is lossy (a `Map`, a function, `NaN`). |
|
|
316
|
+
| `webview-page-unheard` | warning | **WebView pages.** A `bridge: "worker"` WebView whose worker never listens on the page channel, so every `himalaya.*` call the page makes goes unanswered. |
|
|
317
|
+
| `webview-page-input-crash` | warning | **WebView pages.** Worker code that throws on page input instead of answering a typed error: a handler that crashes on missing or hostile arguments, or an `onPageMessage` callback that throws on a malformed message. The page is untrusted. |
|
|
318
|
+
| `webview-binding-type` | warning | **WebView pages.** `activePath`, `mutedPath`, `heightPath` or `reloadKeyPath` resolving to a type the host does not read (for example `activePath` holding `"yes"`). |
|
|
319
|
+
| `webview-page-error` | warning | **WebView pages.** The real page, loaded in a browser against the worker, failed to load or threw uncaught errors. |
|
|
314
320
|
|
|
315
321
|
**Accessibility: what a clean run does NOT mean.** `unnamed-control` is the only
|
|
316
322
|
accessibility property the crawl judges, and it is deliberately the narrow one: the name a
|
|
@@ -534,6 +540,55 @@ destructures, so the code behind a granted permission runs too. `local_database`
|
|
|
534
540
|
map is static — it says what a call would be answered with, not that a tap reached it; the gap
|
|
535
541
|
ledger says that.
|
|
536
542
|
|
|
543
|
+
## WebView pages
|
|
544
|
+
|
|
545
|
+
A WebView's pixels cannot be judged headless, but its **page channel** can, and the page channel is
|
|
546
|
+
where an untrusted page reaches native capabilities. For every `bridge: "worker"` WebView, and every
|
|
547
|
+
Tier-3 WebView screen with a `logicBundle`, `himi test` boots the screen's worker with a page channel
|
|
548
|
+
shaped like the device's and **plays the page**:
|
|
549
|
+
|
|
550
|
+
1. **Handshake.** It asks `himalaya.capabilities`, the same question `@wix/himalaya/webview-page`
|
|
551
|
+
asks, and gets every capability the worker exposes and every `onPageRequest` namespace.
|
|
552
|
+
2. **Contract.** Each exposed capability must be granted by `logicBundle.declaredCapabilities`,
|
|
553
|
+
together with the extra capabilities some methods need (`camera.prepareImage` also needs `files`).
|
|
554
|
+
These are the same tables the generated companion worker is built from.
|
|
555
|
+
3. **Every method, called as the page.** Each advertised method is called once. The crawl reports a
|
|
556
|
+
call that is never answered, one refused at the capability gate, and an answer the JSON bridge
|
|
557
|
+
cannot carry. Streams are read to the end, or cancelled.
|
|
558
|
+
4. **Hostile input.** Malformed envelopes, and `null` / `{}` / markup arguments to your handlers. The
|
|
559
|
+
crawl reports worker code that throws on them, and a channel that stops answering afterwards.
|
|
560
|
+
5. **The real page** (layer 3). When the optional headless browser is installed, as for screenshots,
|
|
561
|
+
each `inlineHtml` page is loaded with the same `window.HimalayaWorker` and `window.himalaya` a
|
|
562
|
+
native host injects, wired to the booted worker. The page's own script runs against your real
|
|
563
|
+
handlers. Calls, events and answers cross in both directions, and the report lists every call the
|
|
564
|
+
page made, its answer, uncaught errors and links. The run stays hermetic: every request the page
|
|
565
|
+
makes beyond its own document is refused and counted (`blockedRequests`). The page runs until it has
|
|
566
|
+
been quiet (no bridge traffic and no request) for 400 ms, at most the budget, so a request made
|
|
567
|
+
after a longer silence is not seen. `--webview-live` lets
|
|
568
|
+
them through and also loads `url` pages, through the same filter as the screenshot pass, so page
|
|
569
|
+
script still cannot reach your machine's private addresses.
|
|
570
|
+
|
|
571
|
+
`--json` carries one `webview[]` row per screen:
|
|
572
|
+
|
|
573
|
+
```jsonc
|
|
574
|
+
"webview": [{
|
|
575
|
+
"screen": "shop",
|
|
576
|
+
"pages": [{ "node": "wv", "instanceId": "shop?/wv" }],
|
|
577
|
+
"listening": true,
|
|
578
|
+
"manifest": { "cart": ["add", "watch"], "share": ["open"] },
|
|
579
|
+
"calls": [{ "capability": "cart", "method": "add", "kind": "namespace", "outcome": "error", "code": "bad_args" }],
|
|
580
|
+
"probes": { "sent": 16, "threw": 0 },
|
|
581
|
+
"events": ["cart.changed"],
|
|
582
|
+
"loaded": [{ "node": "wv", "source": "inline", "calls": [{ "capability": "cart", "method": "add", "outcome": "ok" }], "pageErrors": [], "consoleErrors": 0, "links": { "total": 2, "offAllowlist": 1 } }],
|
|
583
|
+
"notLoaded": []
|
|
584
|
+
}]
|
|
585
|
+
```
|
|
586
|
+
|
|
587
|
+
What it does **not** see: how the page looks, a native WebView's own behaviour (cookies, injected
|
|
588
|
+
scripts, gestures), and bridged WebViews inside list rows (one channel per row, keyed by row data;
|
|
589
|
+
counted as `templatePages`). Verify those on the pushed preview or a device. `--no-webview-pages`
|
|
590
|
+
skips the browser step; the protocol passes always run.
|
|
591
|
+
|
|
537
592
|
## Writes to Wix
|
|
538
593
|
|
|
539
594
|
Every run lists what the app **writes** to the Wix site, per screen and action — the inventory an
|
|
@@ -650,6 +705,8 @@ behavior. This instruction does not add an automatic suppression or retry gate t
|
|
|
650
705
|
| `--offline` | Strip every data layer — see the failure UI head-on. (Excludes `--net`.) |
|
|
651
706
|
| `--no-hostile` | Skip the empty-list / all-500 passes. |
|
|
652
707
|
| `--no-shots` | Skip the per-screen PNGs written to `.himi/shots/`. |
|
|
708
|
+
| `--no-webview-pages` | Skip loading bridged WebView pages in the headless browser (the page-channel passes still run). See [WebView pages](#webview-pages). |
|
|
709
|
+
| `--webview-live` | Also load `url` WebView pages, from the live network. Without it only `inlineHtml` pages load. Not with `--offline`. |
|
|
653
710
|
| `--input-evidence` | Requires `--json`; capture actual typed probes and authored-journey receipts in contained local worker mode (see the receipt contract above). |
|
|
654
711
|
| `--net <file>` | Use an explicit net-mocks file instead of the app's own. |
|
|
655
712
|
| `--budget <ms>` | Per-action settle budget (default 2000). |
|
package/guides/release-notes.md
CHANGED
|
@@ -28,6 +28,21 @@ areas, always in the same order, so you can skim for the one you care about.
|
|
|
28
28
|
`fromUrl` block says where each value came from and gives the push and dist commands to run next.
|
|
29
29
|
A refusal carries a typed `code` and writes nothing. (#6128)
|
|
30
30
|
|
|
31
|
+
### Validate & test
|
|
32
|
+
|
|
33
|
+
- **`himi test` now tests WebView pages.** For every standalone `bridge: "worker"` WebView (one inside
|
|
34
|
+
a list row is counted, not played) it plays the page's side of the worker channel. It asks which
|
|
35
|
+
capabilities the worker offers, checks each against `declaredCapabilities` (including the extra
|
|
36
|
+
capability a method like `camera.prepareImage` needs), and calls every offered method once. A method
|
|
37
|
+
the device would refuse, one that can never answer (a misspelled exposed name), or an answer the
|
|
38
|
+
bridge cannot carry (a `BigInt`, a cycle) is an error; a handler that merely does not answer within
|
|
39
|
+
the crawl's budget is a warning. It also sends malformed messages and hostile arguments, and warns
|
|
40
|
+
when your worker code throws on them. When the headless browser is installed, each `inlineHtml` page
|
|
41
|
+
loads for real with the same `window.himalaya` a device injects, wired to your worker, and the report
|
|
42
|
+
lists every call the page made. Its other network requests are refused unless you pass
|
|
43
|
+
`--webview-live`, which also loads `url` pages; `--no-webview-pages` skips the browser step. See
|
|
44
|
+
`himi docs himi-test`, "WebView pages". (#6181)
|
|
45
|
+
|
|
31
46
|
### Shipping binaries
|
|
32
47
|
|
|
33
48
|
- **`himi dist` builds Base44 site-shell apps with native sign-in again.** Published Base44 pages no
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/himalaya-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1779.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": [
|
|
@@ -82,5 +82,5 @@
|
|
|
82
82
|
"artifactId": "himalaya-cli"
|
|
83
83
|
}
|
|
84
84
|
},
|
|
85
|
-
"falconPackageHash": "
|
|
85
|
+
"falconPackageHash": "83722f43f48f824f5d57902e374bd66402ee8d8f0641e9701845879e"
|
|
86
86
|
}
|