@wix/himalaya-cli 0.1459.0 → 0.1461.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/cli.mjs CHANGED
@@ -7310,6 +7310,18 @@ function compileV2(html, profile, options) {
7310
7310
  mods[name2] = coerce(raw, field2);
7311
7311
  structured(el2, mods[name2]);
7312
7312
  }
7313
+ if (name2 === "onMeasure" && mods.onMeasure && typeof mods.onMeasure === "object") {
7314
+ for (const [key3, value] of Object.entries(mods.onMeasure)) {
7315
+ if (!key3.endsWith("Path") || typeof value !== "string") continue;
7316
+ if (value.startsWith("$service:") || info4?.paths.has(statePath(value))) {
7317
+ const axis = key3.replace(/Path$/, "");
7318
+ const taken = (k2) => !!info4?.paths.has(statePath(k2));
7319
+ let suggestion = taken(axis) ? `measured${axis[0].toUpperCase()}${axis.slice(1)}` : axis;
7320
+ for (let n2 = 2; taken(suggestion); n2++) suggestion = `measured${axis[0].toUpperCase()}${axis.slice(1)}${n2}`;
7321
+ error(el2, "HHP-MEASURE-TARGET", `onMeasure.${key3} ${value} names controller state; measurements publish only to the renderer's measure store.`, `Use a store key (e.g. "${suggestion}") and read it back with a $measure:<key> modifier path.`);
7322
+ }
7323
+ }
7324
+ }
7313
7325
  continue;
7314
7326
  }
7315
7327
  const name = nativeField(attr3.startsWith("data-prop-") ? attr3.slice(10) : attr3);
@@ -160097,9 +160109,14 @@ var init_pinned_read = __esm({
160097
160109
  });
160098
160110
 
160099
160111
  // ../../core/serve-runtime/src/member-exchange.ts
160112
+ function internalHost(host) {
160113
+ const h2 = host.toLowerCase().replace(/^\[|\]$/g, "");
160114
+ return h2 === "localhost" || h2.endsWith(".localhost") || h2.endsWith(".local") || h2.endsWith(".internal") || !h2.includes(".") || /^[0-9.]+$/.test(h2) || h2.includes(":");
160115
+ }
160100
160116
  function hopAllowed(url, firstHost) {
160101
160117
  if (url.protocol !== "https:" || url.port !== "" && url.port !== "443" || url.username || url.password) return false;
160102
160118
  const host = url.hostname.toLowerCase();
160119
+ if (internalHost(host)) return false;
160103
160120
  return host === firstHost || host === "wix.com" || host.endsWith(".wix.com") || host.endsWith(".wixsite.com") || host === "wixapis.com" || host.endsWith(".wixapis.com");
160104
160121
  }
160105
160122
  async function exchangeMemberSession(input, fetchImpl = fetch, random = randomBytes6, now = Date.now, redirectUri = REGISTERED_REDIRECT_URI) {
@@ -160109,7 +160126,7 @@ async function exchangeMemberSession(input, fetchImpl = fetch, random = randomBy
160109
160126
  }
160110
160127
  const call = async (url2, init) => {
160111
160128
  try {
160112
- return await fetchImpl(url2, { ...init, signal: AbortSignal.timeout(STEP_TIMEOUT_MS) });
160129
+ return await fetchImpl(url2, { ...init, redirect: "manual", signal: AbortSignal.timeout(STEP_TIMEOUT_MS) });
160113
160130
  } catch {
160114
160131
  return null;
160115
160132
  }
@@ -161056,7 +161073,15 @@ ${releaseId}`;
161056
161073
  if (!exchangePin || !resolvePreviewToken(request, url)) return json5(403, { error: "draft_preview_required" }, noStore);
161057
161074
  const exchangeCfg = await appConfigFor(request, url, exchangeApp);
161058
161075
  if (!exchangeCfg.ok) return exchangeCfg.response;
161059
- if ((await manifest(exchangeApp))?.releaseId === exchangePin || await isRingRelease(exchangeApp, exchangePin)) {
161076
+ let ringPinned = false;
161077
+ if (opts.ringReleases) {
161078
+ try {
161079
+ ringPinned = new Set(await opts.ringReleases(exchangeApp)).has(exchangePin);
161080
+ } catch {
161081
+ return json5(503, { error: "ring_lookup_unavailable" }, noStore);
161082
+ }
161083
+ }
161084
+ if ((await manifest(exchangeApp))?.releaseId === exchangePin || ringPinned) {
161060
161085
  return json5(403, { error: "draft_preview_required" }, noStore);
161061
161086
  }
161062
161087
  const exchangeClient = wixClientIdOf(utf8Decode(exchangeCfg.bytes));
package/guides/hhp.md CHANGED
@@ -86,7 +86,9 @@ use a child `script type="application/himalaya-props"` containing JSON.
86
86
  ordinary-control aliases. Explicit modifiers use `data-mod-*` or `himi-mod-*`.
87
87
  A `…-path` modifier (`data-mod-hidden-path="full"`, `data-mod-background-color-path`)
88
88
  names controller state exactly like `bind:*`, or `$item.<field>` in a row; an unknown
89
- path is a lint error. `onMeasure` keys name the renderer's measure store instead.
89
+ path is a lint error. `onMeasure` keys name the renderer's measure store instead
90
+ (read back with a `$measure:<key>` path); no renderer writes a measurement into worker
91
+ state, so an `onMeasure` key that names controller state is an `HHP-MEASURE-TARGET` error.
90
92
  `style` and `title` are HTML globals: `style` is always CSS, so a native `style`
91
93
  variant uses `variant="primary"`; `title="…"` sets a component's `title` field. CSS
92
94
  `font` applies only to text components (Text, Label, Marquee). The profile's
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.1459.0",
3
+ "version": "0.1461.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": "db96f8e1d9f3f0a55120ae97f89b4211fed249d7a3f98225dc9269b1"
74
+ "falconPackageHash": "383d7c17e59533d072b72cd7a7d5e46ef59606d5af81f0fc19cf1c52"
75
75
  }