@wix/himalaya-cli 0.1542.0 → 0.1544.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.
@@ -42,8 +42,9 @@ export interface MemberCaptchaKey {
42
42
  siteKeyId: string;
43
43
  }
44
44
  export interface WixConsumerAuthConfig {
45
- /** Per-site Wix Headless OAuth client id. Required unless `visitorSource` is `"one-app"`;
46
- * there it is optional and only enables member sign-in. */
45
+ /** Per-site Wix Headless OAuth client id. Required unless `visitorSource` is `"one-app"`.
46
+ * There it is optional: without it, native email + password sign-in uses the One App member
47
+ * path (no OAuth client on the site); with it, member sign-in uses this OAuth client instead. */
47
48
  clientId?: string;
48
49
  /** Where the anonymous visitor credential comes from. `"oauth"` (default) mints
49
50
  * `POST /oauth2/token {clientId, grantType:"anonymous"}` and needs a Headless OAuth client on
package/dist/cli.mjs CHANGED
@@ -151122,19 +151122,19 @@ function isSymlink2(path2) {
151122
151122
  async function introducedErrors(dir, validate5, file2, isOwnFinding) {
151123
151123
  const edited = await validate5(dir, { fresh: true });
151124
151124
  if (edited.code === 0) return void 0;
151125
- if (!comparable(edited)) return `himi validate failed and its report could not be read: ${edited.tail ?? "no output"}`;
151125
+ const { comparable: comparable2, compareErrors: compareErrors2 } = await Promise.resolve().then(() => (init_template_trim(), template_trim_exports));
151126
+ if (!comparable2(edited)) return `himi validate failed and its report could not be read: ${edited.tail ?? "no output"}`;
151126
151127
  if (edited.errors.every((e2) => isOwnFinding(e2.ruleCode))) return void 0;
151127
151128
  file2.restore();
151128
151129
  const baseline = await validate5(dir, { fresh: true });
151129
151130
  file2.reapply();
151130
- if (!comparable(baseline)) return "himi validate could not check the original config.ts to compare against";
151131
- const introduced = compareErrors(edited.errors, baseline.errors ?? []).introduced.filter((e2) => !isOwnFinding(e2.ruleCode));
151131
+ if (!comparable2(baseline)) return "himi validate could not check the original config.ts to compare against";
151132
+ const introduced = compareErrors2(edited.errors, baseline.errors ?? []).introduced.filter((e2) => !isOwnFinding(e2.ruleCode));
151132
151133
  return introduced.length ? `the edit introduced ${introduced.length === 1 ? "an error" : `${introduced.length} errors`}: ` + introduced.map((e2) => e2.message).join("; ") : void 0;
151133
151134
  }
151134
151135
  var init_config_source_edit = __esm({
151135
151136
  "src/config-source-edit.ts"() {
151136
151137
  init_progress();
151137
- init_template_trim();
151138
151138
  }
151139
151139
  });
151140
151140
 
@@ -414,10 +414,12 @@ auth: WixConsumerAuthProvider({
414
414
  ```
415
415
 
416
416
  Every surface reads the site with it: the native apps, the hosted draft preview, and
417
- `himi run`, `himi render --live` and `himi test --record`. It is a visitor: member
418
- sign-in still needs a Headless OAuth client.
417
+ `himi run`, `himi render --live` and `himi test --record`. On iOS and Android the same
418
+ binding also signs a site member in with email and password (the Branded app's own
419
+ member flow), still without a client. Google sign-in, registration, password reset and change, and member
420
+ sign-in on the web still need a Headless OAuth client.
419
421
 
420
- **Only when the site owner wants member sign-in now**, and with their agreement,
422
+ **Only when the site owner wants those (Google, registration, web member sign-in)**, and with their agreement,
421
423
  resolve the site's mobile OAuth client with the existing idempotent command (it is
422
424
  an owner-scoped write to the customer's site):
423
425
 
@@ -104,8 +104,15 @@ The instance comes from `GET apps.wix.com/_api/one-app-session-web/v3/businesses
104
104
  mints it directly; the browser cannot (no CORS), so the app's own origin mints it at `/v1/visitor/instance`;
105
105
  `himi run`, `render --live` and `test --record` mint it in Node. Each mint is a new visitor, so it is
106
106
  kept until its `validUntil` (~4h) and re-minted only once expired — a 401 on an unexpired instance is
107
- the endpoint's answer (members-only reads refuse every visitor). Scope is visitor: member sign-in still
108
- needs a `clientId` (+ `redirectUri`), which you may add beside it.
107
+ the endpoint's answer (members-only reads refuse every visitor).
108
+
109
+ **Members, the same way (iOS + Android).** `signInDirect(email, password)` signs a SITE member in the
110
+ way the Branded app does: `POST <site>/_api/iam/authentication/v2/login` with the visitor instance,
111
+ `createSessionCookie` → the site's `smSession`, then the Member signed instance from
112
+ `<siteUrl>/_api/one-app-session-web/v3/businesses/<metaSiteId>/signed-instance?signed_instance_type=Member`
113
+ (sent bare; re-minted from `smSession` when it expires). No `clientId` needed. Still OAuth-only: Google /
114
+ social sign-in, the hosted login page, registration, password reset and change, and member sign-in on the web
115
+ (the app's own origin never handles a password) — add a `clientId` (+ `redirectUri`) beside it for those.
109
116
 
110
117
  Monorepo / native Branded Lite (env overrides, auth bake, shareable binary with icon/splash):
111
118
  [branded-lite-site-binding.md](branded-lite-site-binding.md).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.1542.0",
3
+ "version": "0.1544.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": [
@@ -71,5 +71,5 @@
71
71
  "artifactId": "himalaya-cli"
72
72
  }
73
73
  },
74
- "falconPackageHash": "df1b4ea698663ced2b915395398ceb7e54e9d4ef814dbfe53215381d"
74
+ "falconPackageHash": "dd6b1446735f5206d1c3c73510948819f59f090968b25177db037538"
75
75
  }
@@ -200,8 +200,11 @@ const memberKey = (member: { email: string; scope?: string }) => member.email ?
200
200
  let cacheWrite = Promise.resolve();
201
201
  const svc = defineBackendCollection("himiBrandedOrders", {
202
202
  restorePagesOnLoad: true,
203
+ // `nextCursor` and `filterOptions` are bound by himi_orders (pagination cursor, filter sheet), so they are
204
+ // seeded here: `himi validate --strict` refuses a binding the initial state cannot resolve.
203
205
  state: derive({ status: "loading", rows: [], identityLine: "", emptyText: "", isLoading: true,
204
- notLoading: false, isErrored: false, notErrored: true, noEmpty: true, hideList: true, siteHint: "" }),
206
+ notLoading: false, isErrored: false, notErrored: true, noEmpty: true, hideList: true, siteHint: "",
207
+ nextCursor: "", filterOptions: [] }),
205
208
  source: {
206
209
  id: (row: OrderRow) => row.id,
207
210
  clearOnError: orderAccessDenied,
@@ -200,8 +200,11 @@ const memberKey = (member: { email: string; scope?: string }) => member.email ?
200
200
  let cacheWrite = Promise.resolve();
201
201
  const svc = defineBackendCollection("himiBrandedOrders", {
202
202
  restorePagesOnLoad: true,
203
+ // `nextCursor` and `filterOptions` are bound by himi_orders (pagination cursor, filter sheet), so they are
204
+ // seeded here: `himi validate --strict` refuses a binding the initial state cannot resolve.
203
205
  state: derive({ status: "loading", rows: [], identityLine: "", emptyText: "", isLoading: true,
204
- notLoading: false, isErrored: false, notErrored: true, noEmpty: true, hideList: true, siteHint: "" }),
206
+ notLoading: false, isErrored: false, notErrored: true, noEmpty: true, hideList: true, siteHint: "",
207
+ nextCursor: "", filterOptions: [] }),
205
208
  source: {
206
209
  id: (row: OrderRow) => row.id,
207
210
  clearOnError: orderAccessDenied,
@@ -200,8 +200,11 @@ const memberKey = (member: { email: string; scope?: string }) => member.email ?
200
200
  let cacheWrite = Promise.resolve();
201
201
  const svc = defineBackendCollection("himiBrandedOrders", {
202
202
  restorePagesOnLoad: true,
203
+ // `nextCursor` and `filterOptions` are bound by himi_orders (pagination cursor, filter sheet), so they are
204
+ // seeded here: `himi validate --strict` refuses a binding the initial state cannot resolve.
203
205
  state: derive({ status: "loading", rows: [], identityLine: "", emptyText: "", isLoading: true,
204
- notLoading: false, isErrored: false, notErrored: true, noEmpty: true, hideList: true, siteHint: "" }),
206
+ notLoading: false, isErrored: false, notErrored: true, noEmpty: true, hideList: true, siteHint: "",
207
+ nextCursor: "", filterOptions: [] }),
205
208
  source: {
206
209
  id: (row: OrderRow) => row.id,
207
210
  clearOnError: orderAccessDenied,
@@ -200,8 +200,11 @@ const memberKey = (member: { email: string; scope?: string }) => member.email ?
200
200
  let cacheWrite = Promise.resolve();
201
201
  const svc = defineBackendCollection("himiBrandedOrders", {
202
202
  restorePagesOnLoad: true,
203
+ // `nextCursor` and `filterOptions` are bound by himi_orders (pagination cursor, filter sheet), so they are
204
+ // seeded here: `himi validate --strict` refuses a binding the initial state cannot resolve.
203
205
  state: derive({ status: "loading", rows: [], identityLine: "", emptyText: "", isLoading: true,
204
- notLoading: false, isErrored: false, notErrored: true, noEmpty: true, hideList: true, siteHint: "" }),
206
+ notLoading: false, isErrored: false, notErrored: true, noEmpty: true, hideList: true, siteHint: "",
207
+ nextCursor: "", filterOptions: [] }),
205
208
  source: {
206
209
  id: (row: OrderRow) => row.id,
207
210
  clearOnError: orderAccessDenied,
@@ -200,8 +200,11 @@ const memberKey = (member: { email: string; scope?: string }) => member.email ?
200
200
  let cacheWrite = Promise.resolve();
201
201
  const svc = defineBackendCollection("himiBrandedOrders", {
202
202
  restorePagesOnLoad: true,
203
+ // `nextCursor` and `filterOptions` are bound by himi_orders (pagination cursor, filter sheet), so they are
204
+ // seeded here: `himi validate --strict` refuses a binding the initial state cannot resolve.
203
205
  state: derive({ status: "loading", rows: [], identityLine: "", emptyText: "", isLoading: true,
204
- notLoading: false, isErrored: false, notErrored: true, noEmpty: true, hideList: true, siteHint: "" }),
206
+ notLoading: false, isErrored: false, notErrored: true, noEmpty: true, hideList: true, siteHint: "",
207
+ nextCursor: "", filterOptions: [] }),
205
208
  source: {
206
209
  id: (row: OrderRow) => row.id,
207
210
  clearOnError: orderAccessDenied,