@wix/himalaya-cli 0.1459.0 → 0.1460.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 (2) hide show
  1. package/dist/cli.mjs +15 -2
  2. package/package.json +2 -2
package/dist/cli.mjs CHANGED
@@ -160097,9 +160097,14 @@ var init_pinned_read = __esm({
160097
160097
  });
160098
160098
 
160099
160099
  // ../../core/serve-runtime/src/member-exchange.ts
160100
+ function internalHost(host) {
160101
+ const h2 = host.toLowerCase().replace(/^\[|\]$/g, "");
160102
+ return h2 === "localhost" || h2.endsWith(".localhost") || h2.endsWith(".local") || h2.endsWith(".internal") || !h2.includes(".") || /^[0-9.]+$/.test(h2) || h2.includes(":");
160103
+ }
160100
160104
  function hopAllowed(url, firstHost) {
160101
160105
  if (url.protocol !== "https:" || url.port !== "" && url.port !== "443" || url.username || url.password) return false;
160102
160106
  const host = url.hostname.toLowerCase();
160107
+ if (internalHost(host)) return false;
160103
160108
  return host === firstHost || host === "wix.com" || host.endsWith(".wix.com") || host.endsWith(".wixsite.com") || host === "wixapis.com" || host.endsWith(".wixapis.com");
160104
160109
  }
160105
160110
  async function exchangeMemberSession(input, fetchImpl = fetch, random = randomBytes6, now = Date.now, redirectUri = REGISTERED_REDIRECT_URI) {
@@ -160109,7 +160114,7 @@ async function exchangeMemberSession(input, fetchImpl = fetch, random = randomBy
160109
160114
  }
160110
160115
  const call = async (url2, init) => {
160111
160116
  try {
160112
- return await fetchImpl(url2, { ...init, signal: AbortSignal.timeout(STEP_TIMEOUT_MS) });
160117
+ return await fetchImpl(url2, { ...init, redirect: "manual", signal: AbortSignal.timeout(STEP_TIMEOUT_MS) });
160113
160118
  } catch {
160114
160119
  return null;
160115
160120
  }
@@ -161056,7 +161061,15 @@ ${releaseId}`;
161056
161061
  if (!exchangePin || !resolvePreviewToken(request, url)) return json5(403, { error: "draft_preview_required" }, noStore);
161057
161062
  const exchangeCfg = await appConfigFor(request, url, exchangeApp);
161058
161063
  if (!exchangeCfg.ok) return exchangeCfg.response;
161059
- if ((await manifest(exchangeApp))?.releaseId === exchangePin || await isRingRelease(exchangeApp, exchangePin)) {
161064
+ let ringPinned = false;
161065
+ if (opts.ringReleases) {
161066
+ try {
161067
+ ringPinned = new Set(await opts.ringReleases(exchangeApp)).has(exchangePin);
161068
+ } catch {
161069
+ return json5(503, { error: "ring_lookup_unavailable" }, noStore);
161070
+ }
161071
+ }
161072
+ if ((await manifest(exchangeApp))?.releaseId === exchangePin || ringPinned) {
161060
161073
  return json5(403, { error: "draft_preview_required" }, noStore);
161061
161074
  }
161062
161075
  const exchangeClient = wixClientIdOf(utf8Decode(exchangeCfg.bytes));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.1459.0",
3
+ "version": "0.1460.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": "671905888b8bae86b934860d075660df2589c4d9791b110e75cc5b8b"
75
75
  }