@wix/himalaya-cli 0.1672.0 → 0.1674.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.
Files changed (44) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/legacy-import/src/index.d.ts +16 -0
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/legacy-import.d.ts +21 -3
  3. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/online-programs/src/index.d.ts +4 -0
  4. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +14 -2
  5. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/legacy-import.mjs +32 -1
  6. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-online-programs.mjs +25 -1
  7. package/dist/browser-plane/assets.json +5 -5
  8. package/dist/browser-plane/preview-deferred/{cf2ac6865a1e6be5cccec4f2538bf18bbbf121a5f5971ad46212bf3a848ec35c.bin → 0f5533bf4197dc43489701db18378cecdb02db230a0fc2603e764999544513da.bin} +1 -1
  9. package/dist/browser-plane/sw.js +6 -6
  10. package/dist/cli.mjs +366 -110
  11. package/dist/preview-assets.generated.bin +0 -0
  12. package/guides/himi-json-output.md +5 -0
  13. package/guides/releasing-with-himi-serve.md +10 -2
  14. package/guides/sdk-reference.json +17 -3
  15. package/guides/skill.md +1 -0
  16. package/guides/web-page-sdk-reference.md +1 -1
  17. package/package.json +2 -2
  18. package/templates/beauty-salon/l10n/en.json +1 -1
  19. package/templates/branded-lite/dev/index.ts +6607 -2231
  20. package/templates/branded-lite/l10n/en.json +25 -15
  21. package/templates/branded-lite/l10n/he.json +34 -34
  22. package/templates/branded-lite/tier5-src/_shared/himi-cms.ts +10 -3
  23. package/templates/branded-lite/tier5-src/_shared/program-standing.ts +6 -0
  24. package/templates/branded-lite/tier5-src/himi-branded-lite-cms/index.ts +7 -0
  25. package/templates/branded-lite/tier5-src/himi-branded-lite-cms-collection/index.ts +527 -138
  26. package/templates/branded-lite/tier5-src/himi-branded-lite-member-programs/index.ts +36 -7
  27. package/templates/branded-lite/tier5-src/himi-branded-lite-program/index.ts +30 -17
  28. package/templates/community-club/dev/index.ts +2459 -271
  29. package/templates/community-club/l10n/en.json +16 -11
  30. package/templates/community-club/l10n/he.json +38 -34
  31. package/templates/community-club/tier5-src/_shared/himi-cms.ts +10 -3
  32. package/templates/community-club/tier5-src/himi-branded-lite-cms/index.ts +7 -0
  33. package/templates/community-club/tier5-src/himi-branded-lite-cms-collection/index.ts +527 -138
  34. package/templates/events-meetups/l10n/en.json +1 -1
  35. package/templates/gym-fitness/l10n/en.json +1 -1
  36. package/templates/nonprofit-cause/l10n/en.json +1 -1
  37. package/templates/podcast-creator/l10n/en.json +1 -1
  38. package/templates/portfolio-creative/l10n/en.json +1 -1
  39. package/templates/restaurant/l10n/en.json +1 -1
  40. package/templates/retail-store/l10n/en.json +1 -1
  41. package/templates/yoga-studio/l10n/en.json +1 -1
  42. package/templates/yoga-studio/tier5-src/_shared/program-standing.ts +6 -0
  43. package/templates/yoga-studio/tier5-src/himi-branded-lite-member-programs/index.ts +36 -7
  44. package/templates/yoga-studio/tier5-src/himi-branded-lite-program/index.ts +30 -17
Binary file
@@ -38,9 +38,14 @@ This is not a whole-command migration: other CAPTCHA failures retain their legac
38
38
  | `device_access_denied` | The owner pressed Deny on the approve page. Exit 1. |
39
39
  | `device_code_expired` | The issuer reported the code expired before approval. Exit 1. |
40
40
  | `device_login_failed` | Any other poll failure; `status` and `error` carry the issuer's answer. Exit 1. |
41
+ | `device_not_started` | `himi login --device --resume` found no pending device login for the target: none was started with `--no-wait`, or it already succeeded, was denied or expired. Start one with `himi login --device --no-wait`. Exit 1. |
42
+ | `device_superseded` | `himi login --device --resume` was approved, or still pending, for a grant that is no longer the stored one: a newer `--no-wait`, another login or `himi logout` replaced it meanwhile. Nothing is stored and the newer pending login is left as it is. Run `--resume` again for the current one. Exit 1. |
43
+ | `device_pending` | Not a failure. `himi login --device --resume` used up its `--timeout` before the owner approved. Printed on **stdout** with `ok: false`, `pending: true`, `userCode`, `verificationUri`, `verificationUriComplete`, `expiresAt`, `interval`, `retryAfterSec` and `resume` (the command to run again). **Exit 3.** |
41
44
 
42
45
  A `429` while polling is not a failure: the CLI backs off by the plane's `retryAfterSec` and keeps waiting.
43
46
 
47
+ `himi login --device --no-wait` prints `{ ok: true, pending: true, via: "device", target, verificationUri, verificationUriComplete, userCode, expiresAt, interval, resume }` on stdout and exits 0 without waiting; its start failures carry the codes above. `--resume` then polls with the same backoff and codes and exits 0 with the usual success envelope, 3 with `device_pending`, or 1. With `--resume`, `device_code_expired` also means the code's lifetime passed locally, and `device_code_expired` and `device_access_denied` remove the pending login. Usage errors (`--resume` with `--no-wait`, `--site` or `--redirect-uri`; `--timeout` without `--resume` or outside 1–600 seconds) exit 2.
48
+
44
49
  ### `himi login --device --site`: `site.error` codes
45
50
 
46
51
  With `--site <msid>`, the success envelope (exit 0) carries a `site` block. On success it is
@@ -258,8 +258,16 @@ A bundle patch must repoint a screen at the new bytes (`push --only bundle:<name
258
258
  while screens still name the key they were built with — so bytes published alone land where
259
259
  nothing reads them.
260
260
 
261
- Caps are enforced at the door (413 `item_too_large`): a screen descriptor 256 KiB, a bundle 4 MiB,
262
- tokens and app-config 64 KiB each, and the whole body 8 MiB.
261
+ Caps are enforced at the door (413 `item_too_large`): a screen descriptor 256 KiB, a bundle, an
262
+ asset or the icon 4 MiB, tokens and app-config 64 KiB each, and the manifest 256 KiB as stored
263
+ (label 1 KiB, notes 16 KiB). The whole body is capped at 8 MiB (413 `payload_too_large`), except a
264
+ whole-release publish from an operator credential, which may be up to 32 MiB: `himi-serve` sends a
265
+ body over 8 MiB gzipped. A self-serve credential keeps the 8 MiB limit. A template's catalog view
266
+ (`source`, or `sourceGz` once inflated) may be up to 32 MiB only when an operator credential
267
+ publishes a reserved `himi-template-*` app; any other release that carries a catalog view keeps
268
+ 8 MiB (413 `item_too_large` for a plain view over it, `source_gz_inflated_too_large` for a
269
+ compressed one). `himi template publish` sends the view compressed, inside a gzip body, when that is the
270
+ only way the template fits.
263
271
 
264
272
  ## Consume (what a device / agent reads)
265
273
 
@@ -3829,11 +3829,18 @@
3829
3829
  "decl": "export interface LegacyImportReportItem {\n key: string;\n /** The item's value — UTF-8 text, or base64 when `meta.encoding === \"base64\"`. */\n value: string;\n meta?: Record<string, string>;\n}",
3830
3830
  "verificationChecked": true
3831
3831
  },
3832
+ {
3833
+ "name": "WebStorageSnapshot",
3834
+ "kind": "interface",
3835
+ "jsdoc": "/** A WebView `storage_seed` snapshot — bind it as a WebView's `storage_seed.snapshot_path`. */",
3836
+ "decl": "export interface WebStorageSnapshot {\n /** Always true: it was captured from the legacy app's shared WebView storage. */\n legacy: true;\n /** The legacy principal it was captured for. A snapshot without one is never exposed. */\n principal: string;\n localStorage?: Record<string, string>;\n sessionStorage?: Record<string, string>;\n}",
3837
+ "verificationChecked": true
3838
+ },
3832
3839
  {
3833
3840
  "name": "LegacyImportReport",
3834
3841
  "kind": "interface",
3835
3842
  "jsdoc": "",
3836
- "decl": "export interface LegacyImportReport {\n /** The `legacyImport.id` that produced it. */\n id: string;\n /** Epoch ms the import ran. */\n extractedAt: number;\n sources: LegacyImportSourceReport[];\n /** Only the `report` sink's items. */\n items: LegacyImportReportItem[];\n}",
3843
+ "decl": "export interface LegacyImportReport {\n /** The `legacyImport.id` that produced it. */\n id: string;\n /** Epoch ms the import ran. */\n extractedAt: number;\n sources: LegacyImportSourceReport[];\n /** Only the `report` sink's items. */\n items: LegacyImportReportItem[];\n /** Origin → snapshot, from the `webStorageSnapshot` sink. */\n webStorage?: Record<string, WebStorageSnapshot>;\n}",
3837
3844
  "verificationChecked": true
3838
3845
  },
3839
3846
  {
@@ -3843,6 +3850,13 @@
3843
3850
  "decl": "export async function read(): Promise<LegacyImportReport | null>;",
3844
3851
  "verificationChecked": true
3845
3852
  },
3853
+ {
3854
+ "name": "webStorageSnapshot",
3855
+ "kind": "function",
3856
+ "jsdoc": "/** The `storage_seed` snapshot of the legacy WebView storage captured for `origin` by a\n * `web-storage` source, or null — none was captured, it has no principal, it was acknowledged\n * (`ack()` deletes it for good), or the signed-in account is not the one it was captured for\n * (the native side only exposes the report to the legacy principal). */",
3857
+ "decl": "export async function webStorageSnapshot(origin: string): Promise<WebStorageSnapshot | null>;",
3858
+ "verificationChecked": true
3859
+ },
3846
3860
  {
3847
3861
  "name": "ack",
3848
3862
  "kind": "function",
@@ -28955,8 +28969,8 @@
28955
28969
  {
28956
28970
  "name": "joinProgram",
28957
28971
  "kind": "function",
28958
- "jsdoc": "/**\n * Join as the signed-in member through Join Applications. Read the current\n * application first so an existing application is resumed without another create.\n * Approved paid applications prepare\n * SINGLE_PAYMENT and return the Wix Payments order as paymentPendingOptions.orderId.\n * mayPreparePayment rechecks the caller's checkout guard before creating that order.\n * beforeWrite lets a resumed caller revalidate its confirmed member after asynchronous reads.\n * @scope member\n */",
28959
- "decl": "export async function joinProgram(programId: string, options?: { mayPreparePayment?: () => boolean; beforeWrite?: () => Promise<void> }): Promise<WixJoinProgramResponse>;",
28972
+ "jsdoc": "/**\n * Join as the signed-in member through Join Applications. Read the current\n * application first so an existing application is resumed without another create.\n * Approved paid applications prepare\n * SINGLE_PAYMENT and return the Wix Payments order as paymentPendingOptions.orderId.\n * mayPreparePayment rechecks the caller's checkout guard before creating that order.\n * beforeWrite lets a resumed caller revalidate its confirmed member after asynchronous reads.\n * withdrawnParticipantId names a participation the caller freshly verified as withdrawn.\n * Only its matching historical application is replaced; another current participant is resumed.\n * @scope member\n */",
28973
+ "decl": "export async function joinProgram(programId: string, options?: { mayPreparePayment?: () => boolean; beforeWrite?: () => Promise<void>; withdrawnParticipantId?: string; resumeExistingParticipant?: boolean }): Promise<WixJoinProgramResponse>;",
28960
28974
  "scope": "member",
28961
28975
  "verificationChecked": true
28962
28976
  },
package/guides/skill.md CHANGED
@@ -185,6 +185,7 @@ and is also served at the public URL above. No repository access is required.
185
185
  - **Your platform already holds the owner's Wix session or token** (they connected their Wix account to it): that token **is** the owner. Any valid Wix token can manage that account's apps, publishing included. Pipe it in — `printf '%s' "$TOKEN" | himi login --wix --wix-token-stdin --target wix` — or set `WIX_TOKEN` and run `himi login --wix --target wix`. Never put a token on the command line (argv shows in `ps` and transcripts) or in a file you commit, and never print it.
186
186
  - **A server or CI job** with an account API key: `WIX_API_KEY` + `himi login --wix --target wix`.
187
187
  - **You hold no token at all:** run `himi login --device --target wix`. It prints a link and a short code. Show the owner both, ask them to open the link on any device where they are signed in to wix.com, check the code matches and approve, then wait: the command returns once they approve (up to 10 minutes). **If the app needs the owner's live site data, add `--site <msid>`** (and `--redirect-uri <uri>` when the app signs members in with its own redirect): the owner picks or confirms that site on the same approve page, and the result's `site` block carries the site's Headless client id (`site.clientId`, a public value — no Wix token reaches you). It is kept per site, so `himi site client list --site <msid>` answers with it afterwards. If `site` carries an `error` instead, the sign-in still worked: give the owner `site.fallbackUrl` to copy the client id from their dashboard.
188
+ - **If your environment can't run a command for about 10 minutes, or only shows a command's output once it exits,** don't run the waiting form. Run `himi login --device --no-wait --target wix` (with `--site` / `--redirect-uri` if you need them): it prints the link, the code and when the code expires, and exits at once. Show the owner the link and the code with whatever your environment uses to ask the user to act (a message, a "needs you" item), then run `himi login --device --resume --target wix` until it succeeds. Each resume waits at most 50 seconds (`--timeout <seconds>` changes that). Exit 3 with `code: "device_pending"` means the owner has not approved yet, so run it again; exit 0 means you are signed in. `device_code_expired`, `device_access_denied` or `device_not_started` mean start again with `--no-wait` and a new code.
188
189
  - **None of these:** stop and say exactly what is missing. Do not improvise another route to a himi token.
189
190
 
190
191
  This replaces only the sign-in. The approval gates above still apply to every side effect.
@@ -32,7 +32,7 @@ the SDK sources, so it matches the shipped SDKs.
32
32
  - [`himi_apps`](https://apps.wix.com/_api/himi-serve/authoring/resource/web-sdk%2Fhimi_apps?format=md) — Cross-app open / host queries. 4 methods · not in Brandy.
33
33
  - [`iap`](https://apps.wix.com/_api/himi-serve/authoring/resource/web-sdk%2Fiap?format=md) — In-app-purchase capability. 10 methods.
34
34
  - [`keyboard`](https://apps.wix.com/_api/himi-serve/authoring/resource/web-sdk%2Fkeyboard?format=md) — Keyboard capability. 1 method.
35
- - [`legacy_import`](https://apps.wix.com/_api/himi-serve/authoring/resource/web-sdk%2Flegacy_import?format=md) — One-time legacy import report. 2 methods · not in Brandy.
35
+ - [`legacy_import`](https://apps.wix.com/_api/himi-serve/authoring/resource/web-sdk%2Flegacy_import?format=md) — One-time legacy import report. 3 methods · not in Brandy.
36
36
  - [`live_activity`](https://apps.wix.com/_api/himi-serve/authoring/resource/web-sdk%2Flive_activity?format=md) — Live Activity capability. 3 methods · not in Brandy.
37
37
  - [`local_database`](https://apps.wix.com/_api/himi-serve/authoring/resource/web-sdk%2Flocal_database?format=md) — Local-database capability: a per-entity on-device store (EntityStore) + an offline WriteQueue, so a worker bundle can persist and query real data on device. 11 methods · not in Brandy.
38
38
  - [`location`](https://apps.wix.com/_api/himi-serve/authoring/resource/web-sdk%2Flocation?format=md) — Device location. 10 methods.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.1672.0",
3
+ "version": "0.1674.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": [
@@ -79,5 +79,5 @@
79
79
  "artifactId": "himalaya-cli"
80
80
  }
81
81
  },
82
- "falconPackageHash": "a3d5a36f28454cc208edd589d57085cacf495af113493df969474a7e"
82
+ "falconPackageHash": "f69f803fd32a713057afe693a5a32f79ca17be5badafd6052fd1f8d0"
83
83
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$source": "en",
3
- "$generated": "2026-11-11T22:30:17.102Z",
3
+ "$generated": "2026-11-11T23:43:24.040Z",
4
4
  "messages": {
5
5
  "h_0028d743eb44": {
6
6
  "source": "Sale",