@wix/himalaya-cli 0.1658.0 → 0.1659.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.
@@ -33,6 +33,19 @@ stdout and stderr; progress/warnings are not failure envelopes.
33
33
 
34
34
  A `429` while polling is not a failure: the CLI backs off by the plane's `retryAfterSec` and keeps waiting.
35
35
 
36
+ ## `himi site client list|ensure` codes
37
+
38
+ These commands need a site-scoped Wix credential. They take, in order: `WIX_API_KEY`; the owner's Wix **account** token in `WIX_TOKEN`, exchanged for a 900-second token on that site (OAuth2-NG token exchange, `POST https://www.wixapis.com/oauth2/token`); or a logged-in `wix` CLI (`wix token --site <msid>`). With `WIX_TOKEN` set, no `wix` CLI is needed. The exchanged token is kept in memory for that run only, re-exchanged a minute before it expires or on a `401`, and never written, logged or printed. A himi login alone is not a site credential: `--device` holds no Wix token, and a token piped to `--wix-token-stdin` is not kept after the login. The credential is checked before anything is sent to the site. A failed check prints `{ ok: false, code, error, fix, dashboardUrl, usage }` on stderr, exit 1. `fix` is one line to act on; `dashboardUrl` is the site's OAuth-apps page, where the owner can copy a client id by hand; `usage` is the usage of the subcommand that ran. None of these codes is retried. A network failure or a `5xx` from the exchange is retried like any other Wix call, and is never given one of these codes.
39
+
40
+ | Code | Meaning |
41
+ | --- | --- |
42
+ | `wix_cli_required` | No site credential: `WIX_TOKEN` and `WIX_API_KEY` are not set and the `wix` CLI is not on PATH. Export the owner's account token as `WIX_TOKEN`, install the CLI and run `wix login` on this machine, or export `WIX_API_KEY`. |
43
+ | `wix_cli_token_failed` | The `wix` CLI ran but printed no token: it is not logged in, or it refused to run (for example on an unsupported Node version). `error` carries the CLI's own output, credentials redacted. Run `wix token --site <msid>` to see why, then `wix login`, or export `WIX_API_KEY`. |
44
+ | `site_token_exchange_denied` | Wix refused to exchange `WIX_TOKEN` for the site: a `403`, a site the token's account does not own (`invalid_target`), or a token not issued to a Wix app's client (`unauthorized_client`). `error` carries Wix's code and description. Check the site id, or use the token of the account that owns the site. himi does not fall back to the `wix` CLI, which may be signed in as someone else. |
45
+ | `site_token_subject_not_account` | `WIX_TOKEN` holds a site-level token. Only an account-level token can be exchanged (Wix: `400 invalid_request`, "must be an account-level token"). Set `WIX_TOKEN` to the owner's account token (`wix token` without `--site`). |
46
+
47
+ This is not a whole-command migration: the command's other refusals still have no code.
48
+
36
49
  ## `himi sdk unverified` codes
37
50
 
38
51
  | Code | Meaning |
@@ -218,6 +231,7 @@ target the command read, e.g. `himi login --browser --target wix`.
218
231
  | `control_token_expired` | The stored control token is past its `exp`. Decided locally before any network call; run `himi login`. |
219
232
  | `owner_login_required` | No usable owner login: the control token is missing or has no subject, or the plane answered 401/403 to the owner-apps read (`GET /v1/owner/apps`). Run `himi login`. Other failures of that read stay `app_ownership_unknown`. |
220
233
  | `flag_not_supported_with_ping` | A local-sender flag was passed with `--provider ping`; `flag` names it. `--badge` is one: Ping has no badge field, and for a Branded app Ping sets the iOS badge itself from the member's unseen Ping feed items. |
234
+ | `all_members_not_supported_for_site_app` | `--all-members` with a site app's project token (a site lease). Its roster pre-check needs the account that owns the site, which the lease does not name; send to one member with `--member-email`. |
221
235
 
222
236
  ## `himi cms seed` codes
223
237
 
package/guides/skill.md CHANGED
@@ -189,6 +189,8 @@ and is also served at the public URL above. No repository access is required.
189
189
 
190
190
  This replaces only the sign-in. The approval gates above still apply to every side effect.
191
191
 
192
+ **Live site data needs a site credential.** `himi site client list|ensure` (the site's `WIX_CLIENT_ID`), `himi cms` and `himi data`'s Wix collections call the owner's site directly. They accept, in order: `WIX_API_KEY`; the owner's Wix **account** token in `WIX_TOKEN`, which himi exchanges for a short-lived token on that site (it must be the account that owns the site); or a logged-in `wix` CLI. So if your platform holds the owner's token, keep it in `WIX_TOKEN` for these commands too: piping it to `--wix-token-stdin` signs in to Himi but is not kept afterwards. `--device` alone holds no Wix token and cannot do this. Run `himi site client list --site <msid> --json` once to check. If it fails with `code: "wix_cli_required"`, `"wix_cli_token_failed"`, `"site_token_exchange_denied"` (the token's account does not own that site) or `"site_token_subject_not_account"` (a site token was given where the account token belongs), do not retry it. Ask the owner for one of these: their account token as `WIX_TOKEN` (through the platform, never pasted into chat), `wix login` where you run, an account API key to export as `WIX_API_KEY`, or the client id copied from the `dashboardUrl` in the error. If none of these is possible, tell the owner plainly that the app will show a snapshot of the public site, with no live catalog or booking.
193
+
192
194
  ## Headless / non-interactive agents
193
195
 
194
196
  When there is no human in the loop (QA runner, cron, dispatched agent), do not invent a turn-by-turn approval chat. Map each gate to what the invocation already supplied:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.1658.0",
3
+ "version": "0.1659.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": "c561c697e017c71943f0158cf33fe4e4534809c9fbc8c68a106b58e1"
75
+ "falconPackageHash": "6beaebe228d4dbcf442f259fa073ca5ee769cdf4adb902a1a270d6c0"
76
76
  }