@wix/himalaya-cli 0.1091.0 → 0.1093.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.
@@ -102,5 +102,15 @@ export declare function extractAppId(url: string): AppLinkSelection;
102
102
  * First occurrence wins; the value is percent-decoded. Pure; never throws.
103
103
  */
104
104
  export declare function extractReleasePin(query: string): string | null;
105
+ /**
106
+ * Extract a preview HANDOVER code (`?h=`) from an app-link residual query (#3423).
107
+ *
108
+ * A handover is a single-use, opaque 22-character code the plane trades for a draft's preview
109
+ * bearer (`core/serve-runtime/src/preview-handover.ts`) — the form a customer-facing link or a
110
+ * connector QR carries instead of an inline `pvt` (#2400). The shape is checked here so a malformed
111
+ * value never becomes a network call. EXACTLY one `h` is accepted: two would leave the app to guess
112
+ * which code the link meant, and a guess spends one of them. Pure; never throws.
113
+ */
114
+ export declare function extractHandoverCode(query: string): string | null;
105
115
  /** Extract the short-lived preview bearer from an app-link residual query. */
106
116
  export declare function extractPreviewToken(query: string): string | null;
@@ -12803,11 +12803,13 @@ var LINK_MOUNT_PATHS = [
12803
12803
  function underLinkMount(path, marker) {
12804
12804
  const clean = path.replace(/\/+$/, "");
12805
12805
  for (const mount of LINK_MOUNT_PATHS) {
12806
- const prefix = `${mount}/${marker}/`;
12807
- if (!clean.startsWith(prefix)) continue;
12808
- const rest = clean.slice(prefix.length);
12809
- if (rest === "") return null;
12810
- return rest.split("/");
12806
+ const prefixes = marker === "a" ? [`${mount}/a/`, `${mount}/preview/a/`] : [`${mount}/${marker}/`];
12807
+ for (const prefix of prefixes) {
12808
+ if (!clean.startsWith(prefix)) continue;
12809
+ const rest = clean.slice(prefix.length);
12810
+ if (rest === "") return null;
12811
+ return rest.split("/");
12812
+ }
12811
12813
  }
12812
12814
  return null;
12813
12815
  }
@@ -12910,6 +12912,18 @@ function extractReleasePin(query) {
12910
12912
  }
12911
12913
  return null;
12912
12914
  }
12915
+ function extractHandoverCode(query) {
12916
+ if (!query) return null;
12917
+ let found = null;
12918
+ for (const pair of query.split("&")) {
12919
+ const eq = pair.indexOf("=");
12920
+ const key = eq < 0 ? pair : pair.slice(0, eq);
12921
+ if (key !== "h") continue;
12922
+ if (found !== null) return null;
12923
+ found = eq < 0 ? "" : pair.slice(eq + 1);
12924
+ }
12925
+ return found !== null && /^[A-Za-z0-9_-]{22}$/.test(found) ? found : null;
12926
+ }
12913
12927
  function extractPreviewToken(query) {
12914
12928
  if (!query) return null;
12915
12929
  try {
@@ -13345,6 +13359,7 @@ export {
13345
13359
  evaluate,
13346
13360
  evaluateAll,
13347
13361
  extractAppId,
13362
+ extractHandoverCode,
13348
13363
  extractPackageShareId,
13349
13364
  extractPreviewToken,
13350
13365
  extractReleasePin,
package/dist/cli.mjs CHANGED
@@ -1648,11 +1648,14 @@ export default defineService("home", {
1648
1648
  2
1649
1649
  ) + "\n"
1650
1650
  );
1651
+ const configImports = [
1652
+ 'import { defineApp } from "@wix/himalaya/core";',
1653
+ 'import { GenericOAuthProvider } from "@wix/himalaya/auth-generic-oauth";',
1654
+ 'import { ConsoleTelemetrySink } from "@wix/himalaya/telemetry-console";'
1655
+ ].join("\n");
1651
1656
  write2(
1652
1657
  "config.ts",
1653
- `import { defineApp } from "@wix/himalaya/core";
1654
- import { GenericOAuthProvider } from "@wix/himalaya/auth-generic-oauth";
1655
- import { ConsoleTelemetrySink } from "@wix/himalaya/telemetry-console";
1658
+ `${configImports}
1656
1659
 
1657
1660
  // For a Wix site's visitor data, replace GenericOAuthProvider with:
1658
1661
  // import { WixConsumerAuthProvider } from "@wix/himalaya/wix-auth";
@@ -6737,7 +6740,6 @@ function walk(node, registry, path2, out2) {
6737
6740
  var SYSTEM_FONT_FAMILY, TONAL_ELEVATION_ALPHA;
6738
6741
  var init_tokens = __esm({
6739
6742
  "../../core/ts/src/tokens.ts"() {
6740
- "use strict";
6741
6743
  SYSTEM_FONT_FAMILY = "$system";
6742
6744
  TONAL_ELEVATION_ALPHA = [0, 0.05, 0.08, 0.11, 0.12, 0.14];
6743
6745
  }
@@ -13040,6 +13042,7 @@ function resolveIdiom(tokens, ctx = {}) {
13040
13042
  var IDIOM_CONTEXTS, UNSAFE_KEYS;
13041
13043
  var init_idiom = __esm({
13042
13044
  "../../core/ts/src/idiom.ts"() {
13045
+ "use strict";
13043
13046
  IDIOM_CONTEXTS = {
13044
13047
  ios: { native: ["ios"] },
13045
13048
  android: { native: ["material"] },
@@ -55610,21 +55613,21 @@ var init_preview_assets_generated = __esm({
55610
55613
  "../../packages/serve/src/preview-assets.generated.ts"() {
55611
55614
  init_preview_assets_format();
55612
55615
  PREVIEW_ASSET_MANIFEST = [
55613
- { key: "assets/index-CoE6RLW8.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 1084872, sha256: "efe384da667b3973c9254d206c2ff4a1e6cb198672bd718f73acf341f28276b6" },
55614
- { key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset: 1084880, length: 4610, sha256: "994062dd7af4186a739de55dd9e151c63b6301f8e2cbafc608d35c2e87da0cd2" },
55615
- { key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset: 1089490, length: 488584, sha256: "d7598e12c5dbef095ff8272cfc55da0250bd07fbdecbac8a530b9b277872a134" },
55616
- { key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 1578074, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
55617
- { key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 1668998, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
55618
- { key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 1759982, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
55619
- { key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 1850962, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
55620
- { key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 1941834, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
55621
- { key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 2032814, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
55622
- { key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 2141450, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
55623
- { key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 2250534, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
55624
- { key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 2359582, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
55625
- { key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 2467282, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
55626
- { key: "index.html", contentType: "text/html; charset=utf-8", offset: 2555390, length: 4947, sha256: "22433159fbe961ce87d3d54359ae252008f338303b61c113aab733562dc269b2" },
55627
- { key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 2560337, length: 17209, sha256: "dffc9718e2faa63ae2cc919e0a842f585ed565aaaa7c53778e90379442c731b6" }
55616
+ { key: "assets/index-BtkpizCd.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 1084929, sha256: "31c667f8a14df2ebf95ca6f3c8d16763cc48e4c4a687efc97f8e7e13a90d71fa" },
55617
+ { key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset: 1084937, length: 4610, sha256: "994062dd7af4186a739de55dd9e151c63b6301f8e2cbafc608d35c2e87da0cd2" },
55618
+ { key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset: 1089547, length: 488584, sha256: "d7598e12c5dbef095ff8272cfc55da0250bd07fbdecbac8a530b9b277872a134" },
55619
+ { key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 1578131, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
55620
+ { key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 1669055, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
55621
+ { key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 1760039, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
55622
+ { key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 1851019, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
55623
+ { key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 1941891, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
55624
+ { key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 2032871, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
55625
+ { key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 2141507, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
55626
+ { key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 2250591, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
55627
+ { key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 2359639, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
55628
+ { key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 2467339, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
55629
+ { key: "index.html", contentType: "text/html; charset=utf-8", offset: 2555447, length: 4947, sha256: "6b533f016eba30621c9c3e7dc26c86c26031f1663b5f107249fe3e848b7d785d" },
55630
+ { key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 2560394, length: 17209, sha256: "dffc9718e2faa63ae2cc919e0a842f585ed565aaaa7c53778e90379442c731b6" }
55628
55631
  ];
55629
55632
  }
55630
55633
  });
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.1091.0",
3
+ "version": "0.1093.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": [
@@ -67,5 +67,5 @@
67
67
  "artifactId": "himalaya-cli"
68
68
  }
69
69
  },
70
- "falconPackageHash": "db4c5b2158d1cfbc8eafc2c9050fb13da5e981f9be04fca8b878a765"
70
+ "falconPackageHash": "29734f97c409e1bee6fc44823b4aa5245ba13a3527ebaf544a74a558"
71
71
  }