@wix/himalaya-cli 0.1602.0 → 0.1604.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.
Binary file
package/guides/hhp.md CHANGED
@@ -210,13 +210,13 @@ Declare the mockup each screen was designed from in `hhp.json`:
210
210
  A screen may also carry `params` (the navigation input a device opens it with, used by native capture, #4935) and `fidelity: { "warn": 80, "fail": 60 }`. Thresholds can also be set app-wide at the top level.
211
211
 
212
212
  ```bash
213
- himi fidelity --content <dir> [--screen a,b] [--variant light,dark,rtl,tablet] [--no-native] [--json] [--post-pr <n>]
213
+ himi fidelity --content <dir> [--screen a,b] [--variant light,dark,rtl,tablet] [--ios <udid>] [--android <serial>] [--ios-tablet <udid>] [--android-tablet <serial>] [--app-id <id>] [--release <id>] [--no-native] [--json] [--post-pr <n>]
214
214
  ```
215
215
 
216
216
  For each screen and variant (`light`, `dark`, `rtl`, `tablet`), the command does four things:
217
217
 
218
218
  1. **Captures the mockup.** It draws the page in Chromium at the variant's width. Dark mode is drawn by emulating `prefers-color-scheme`. RTL is drawn by setting `dir=rtl` on the page.
219
- 2. **Captures the web render** from the app's recorded data, as `himi render` does by default. Native frames come through a capture seam. Until #4935 lands, the seam reports iOS and Android as skipped.
219
+ 2. **Captures the web render** from the app's recorded data, as `himi render` does by default. Native frames come from Himi Player on the devices you pass: `--ios <udid>` and `--android <serial>`, plus `--ios-tablet` and `--android-tablet` for the tablet variant. Only those devices are touched. For each variant the command sets dark or light appearance and, for `rtl`, the Hebrew language (iOS `AppleLanguages`, Android per-app locale, API 33+). It opens `himi://app/<app>/screen/<screen>` and captures once two frames match. Every setting it changed is restored afterwards, also on Ctrl-C. A variant with no device is reported `skipped`, never passed. Without `--release <id>` the Player shows the app's **live** release, not your working copy. A screen that declares `params` is skipped natively for now, because the Player's deep link does not carry them yet. On a fresh iOS simulator, open one `himi://` link by hand first and accept iOS's "Open in Himi Player?" prompt: the command cannot answer it, and until it is accepted every iOS capture shows the prompt.
220
220
  3. **Scores mockup↔web** with ImageMagick SSIM, globally and per tile. The worst tile says where the screens differ most.
221
221
  4. **Asks a fresh model** two questions, using the repo's fidelity judge prompt. The model never ran in the session that wrote the app.
222
222
  - **Design:** does WEB look like the MOCKUP? This judges the port.
@@ -203,6 +203,42 @@ routes: [
203
203
  A notification whose link matches no route opens the app without navigating. `himi validate`
204
204
  warns when a declared route names a screen the app does not declare.
205
205
 
206
+ #### Links from a legacy link space
207
+
208
+ An app that replaces an older one may still receive that app's links: its old custom scheme
209
+ (`legacyapp://widget/42`) or an old web host (`https://legacy.example.com/app/widget/42`).
210
+ Declare those prefixes and route the rest:
211
+
212
+ ```ts
213
+ push: {
214
+ linkPrefixes: ["legacyapp://", "https://legacy.example.com/app/"],
215
+ routes: [{ match: "widget/:id", link: "<scheme>://screen/<widget-screen>?id={id}" }],
216
+ },
217
+ ```
218
+
219
+ Before matching, the device strips a configured prefix from the link, so `widget/42` is matched
220
+ against the routes. It applies these rules in order:
221
+
222
+ 1. With `payloadAdapter: "wix-ping"`, a Wix link is handled first, so a prefix inside the Wix link
223
+ space never applies.
224
+ 2. Otherwise the **longest** matching prefix is stripped. When a prefix starts with a scheme
225
+ (`legacyapp://`, `https://…`), its scheme and host match in any case and the rest matches
226
+ exactly. A prefix with no scheme (`legacy.example.com/app/`, `/app/`) matches exactly.
227
+ 3. A prefix only matches up to a `/`, `?` or `#`, so `https://old.example.com/m` does not strip
228
+ `https://old.example.com/mobile/…`.
229
+ 4. A relative link (`/widget/42`) is matched as is, with no prefix needed.
230
+ 5. Any other link passes through unchanged.
231
+
232
+ `himi validate` warns about a prefix that can never apply: one inside the Wix link space under
233
+ `wix-ping`, or a prefix list with no routes. It does not judge a prefix by its shape. A schemeless
234
+ prefix strips links written without a scheme, and a dotted custom scheme strips its own links.
235
+
236
+ With `wix-ping` and no `routes`, the build derives the routes from the site's verticals. A
237
+ stripped link is then matched against those Wix notification paths only
238
+ (`my-account/:site/stores/orders/:orderId`, …). If your legacy links use paths of their own,
239
+ declare `routes` for them. A declared table replaces the derived one, so list the Wix routes you
240
+ still need there too. `himi validate` warns when prefixes meet only derived routes.
241
+
206
242
  ### Notification action buttons
207
243
 
208
244
  Declare actionable categories in the app's source `config.ts`. The native shells render one
@@ -68,6 +68,8 @@ node --import tsx tools/auth-bake/bake-auth.ts apps/<app> --ios apps/<app>/ios/<
68
68
  `auth.json` = `{ providerId, required, gateScreenId?, config }`. Read by `TemplateAppBoot.loadBakedAuth()` (iOS
69
69
  and macOS) / `TemplateAuth.boot()` (Android).
70
70
 
71
+ A binary baked `providerId: "none"` (a `himi dist` build of a release declaring no auth) stays no-auth until it is rebuilt, whatever later releases serve: adding login to a no-auth app needs a new binary.
72
+
71
73
  ## Step 3 — wire the gate (per platform)
72
74
 
73
75
  ### iOS
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.1602.0",
3
+ "version": "0.1604.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": [
@@ -72,5 +72,5 @@
72
72
  "artifactId": "himalaya-cli"
73
73
  }
74
74
  },
75
- "falconPackageHash": "912a018c8faa872ff500b38a18a77faf8eded63603ce4eecaf8822e7"
75
+ "falconPackageHash": "d9895ee47dde266d1046d74260972f2c9428e600431befd9b0e4ddc6"
76
76
  }