@wix/himalaya-cli 0.1353.0 → 0.1354.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
@@ -22017,7 +22017,7 @@ function usageStringCopyFor(permissionCopy) {
22017
22017
  }
22018
22018
  return out2;
22019
22019
  }
22020
- var BRIDGE_CAPABILITY_IDS, KNOWN_CAPABILITY_IDS, CAPABILITY_LITERAL, BRIDGE_MARKERS, NEEDS_BOOT_WIRING, AWAITING_THIRD_PARTY_SIGN_OFF, NOT_DIST_ADDABLE;
22020
+ var BRIDGE_CAPABILITY_IDS, KNOWN_CAPABILITY_IDS, CAPABILITY_LITERAL, BRIDGE_MARKERS, NEEDS_BOOT_WIRING, NOT_DIST_ADDABLE;
22021
22021
  var init_known = __esm({
22022
22022
  "../../core/sdk/capability-catalog/src/known.ts"() {
22023
22023
  init_builtins();
@@ -22059,13 +22059,7 @@ var init_known = __esm({
22059
22059
  // on Android the shell must pick Godot's libc++_shared over the core's (himi-game's godotStl).
22060
22060
  godot: "needs the shell's GameSurface view and, on Android, its libc++_shared pick for the engine, which a build cannot add"
22061
22061
  });
22062
- AWAITING_THIRD_PARTY_SIGN_OFF = Object.freeze({
22063
- calls: "links the community libwebrtc engine (HimalayaCoreCalls / :himalaya-core-calls), whose third-party sign-off for store-shipping apps is still open, so a dist build does not add it to a customer binary"
22064
- });
22065
- NOT_DIST_ADDABLE = Object.freeze({
22066
- ...NEEDS_BOOT_WIRING,
22067
- ...AWAITING_THIRD_PARTY_SIGN_OFF
22068
- });
22062
+ NOT_DIST_ADDABLE = NEEDS_BOOT_WIRING;
22069
22063
  }
22070
22064
  });
22071
22065
 
@@ -35387,6 +35381,69 @@ function resolveServeBase() {
35387
35381
  }
35388
35382
  return (raw ?? "").replace(/\/$/, "");
35389
35383
  }
35384
+ function resolvePlaneControlReadBase() {
35385
+ const explicit = process.env.HIMALAYA_PLAYER_CONTROL_URL;
35386
+ if (explicit) return explicit.replace(/\/$/, "");
35387
+ const override = process.env.HIMALAYA_PLAYER_SERVE_URL;
35388
+ if (override) {
35389
+ const base = resolveServeBase();
35390
+ return sameOrigin(base, LOCAL_ORIGINS.serve) ? LOCAL_ORIGINS.control : base;
35391
+ }
35392
+ let control = "";
35393
+ try {
35394
+ control = resolveTarget().control ?? "";
35395
+ } catch {
35396
+ }
35397
+ const serve = resolveServeBase();
35398
+ return isLocalHostUrl(control) && isLocalHostUrl(serve) && !sameUrlOrigin(control, serve) ? control.replace(/\/$/, "") : serve;
35399
+ }
35400
+ function isLocalHostUrl(url) {
35401
+ let h2;
35402
+ try {
35403
+ h2 = new URL(url).hostname.replace(/^\[|\]$/g, "").toLowerCase();
35404
+ } catch {
35405
+ return false;
35406
+ }
35407
+ if (h2 === "localhost" || h2 === "::1" || h2.endsWith(".local")) return true;
35408
+ const p2 = h2.split(".").map(Number);
35409
+ if (p2.length !== 4 || p2.some((n2) => !Number.isInteger(n2))) return false;
35410
+ return p2[0] === 127 || p2[0] === 10 || p2[0] === 192 && p2[1] === 168 || p2[0] === 169 && p2[1] === 254 || p2[0] === 172 && p2[1] >= 16 && p2[1] <= 31;
35411
+ }
35412
+ function sameUrlOrigin(a2, b2) {
35413
+ try {
35414
+ return new URL(a2).origin === new URL(b2).origin;
35415
+ } catch {
35416
+ return false;
35417
+ }
35418
+ }
35419
+ function isLoopbackUrl(url) {
35420
+ try {
35421
+ return ["127.0.0.1", "localhost", "[::1]"].includes(new URL(url).hostname);
35422
+ } catch {
35423
+ return false;
35424
+ }
35425
+ }
35426
+ function sameOrigin(url, local) {
35427
+ try {
35428
+ const a2 = new URL(url);
35429
+ const b2 = new URL(local);
35430
+ return isLoopbackUrl(url) && a2.port === b2.port && a2.protocol === b2.protocol && (a2.pathname === "/" || a2.pathname === "");
35431
+ } catch {
35432
+ return false;
35433
+ }
35434
+ }
35435
+ function tenantHostPlaneRead(url, headers2, hostApp, method = "GET") {
35436
+ if (!hostApp || !isTenantHost(hostApp) || method !== "GET" && method !== "HEAD") return null;
35437
+ const [path2, query = ""] = url.split("?");
35438
+ if (path2 === "/v1/site/member-app/resolve") return resolvePlaneControlReadBase() || null;
35439
+ if (path2 === "/v1/release/current") {
35440
+ const app = new URLSearchParams(query).get("app")?.trim();
35441
+ if (!app || app === hostApp || HOSTED_TENANTS[hostApp].includes(app)) return null;
35442
+ if (targetTenant(url, headers2, hostApp) !== null) return null;
35443
+ return resolveServeBase() || null;
35444
+ }
35445
+ return null;
35446
+ }
35390
35447
  function targetTenant(url, headers2, hostApp) {
35391
35448
  const hdr = headers2["x-himalaya-app"];
35392
35449
  const headerApp = Array.isArray(hdr) ? hdr[0] : hdr;
@@ -35454,6 +35511,7 @@ var PLAYER_APP_ID, HOSTED_TENANTS, TENANT_PREFIX, LOOPBACK_PEERS, STRIP_RESPONSE
35454
35511
  var init_player_proxy = __esm({
35455
35512
  "../../core/dev-server/src/player-proxy.ts"() {
35456
35513
  init_config();
35514
+ init_serve_origins();
35457
35515
  PLAYER_APP_ID = "himi-player";
35458
35516
  HOSTED_TENANTS = {
35459
35517
  "himi-spaces-lite": ["himi-branded-lite"]
@@ -132468,6 +132526,8 @@ function createDevServer(opts = {}) {
132468
132526
  forwardAs: clientHost ? { host: clientHost, prefix: `${TENANT_PREFIX}${encodeURIComponent(tenant)}` } : void 0
132469
132527
  });
132470
132528
  }
132529
+ const planeRead = tenantHostPlaneRead(url, req.headers, state.appName, req.method);
132530
+ if (planeRead) return await proxyToServe(planeRead, req, res);
132471
132531
  }
132472
132532
  if (url.split("?")[0] === "/v1/app-icon" && req.method === "GET") {
132473
132533
  const iconApp = new URLSearchParams(url.split("?")[1] ?? "").get("app") ?? "";
@@ -156718,25 +156778,25 @@ var init_preview_assets_generated = __esm({
156718
156778
  "../../packages/serve/src/preview-assets.generated.ts"() {
156719
156779
  init_preview_assets_format();
156720
156780
  PREVIEW_ASSET_MANIFEST = [
156721
- { key: "assets/index-BDNhcRLx.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 1271913, sha256: "b78f7b3400ea25a2066e24c6b771199b819a833b624499d221edbc5f1b01a18b" },
156722
- { key: "assets/pdf-mXRF2YFr.js", contentType: "application/javascript; charset=utf-8", offset: 1271921, length: 488199, sha256: "3ecd61c959307bee0f74d6d9a3c6ab94dbf7b7305d6d67e2f0167dbf3bc6034a" },
156723
- { key: "assets/pdf.worker.min-BQa_JDET.js", contentType: "application/javascript; charset=utf-8", offset: 1760120, length: 73, sha256: "41bcfda4f3c8c0a81c785ea87c69afc8e7d0ed8c333324aee94c273d881bb6aa" },
156724
- { key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/javascript; charset=utf-8", offset: 1760193, length: 1317034, sha256: "a33cfe728c584fdba4fcc1fd54bcdc2f9f2f13889ddbb5b2bd1d0f8cbe49b84e" },
156725
- { key: "assets/pdfDocument-BZIqh5sA.js", contentType: "application/javascript; charset=utf-8", offset: 3077227, length: 2858, sha256: "32abe2da16ae5c22ce831a4a75bdb6e6121dc99fdae72be8ec22038d6982dd81" },
156726
- { key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset: 3080085, length: 4610, sha256: "994062dd7af4186a739de55dd9e151c63b6301f8e2cbafc608d35c2e87da0cd2" },
156727
- { key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset: 3084695, length: 488584, sha256: "d7598e12c5dbef095ff8272cfc55da0250bd07fbdecbac8a530b9b277872a134" },
156728
- { key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 3573279, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
156729
- { key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 3664203, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
156730
- { key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 3755187, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
156731
- { key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 3846167, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
156732
- { key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 3937039, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
156733
- { key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 4028019, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
156734
- { key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 4136655, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
156735
- { key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 4245739, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
156736
- { key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 4354787, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
156737
- { key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 4462487, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
156738
- { key: "index.html", contentType: "text/html; charset=utf-8", offset: 4550595, length: 4947, sha256: "475486545202c2973900224ffffa48ffbd7313e49b559cbcf9be678b068bff82" },
156739
- { key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 4555542, length: 17512, sha256: "c5c8612a8b3f5a1828d0c6593106036a180eea11da80232f5181548a50679137" }
156781
+ { key: "assets/index-CfDtWTd9.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 1271649, sha256: "b09aff3c4ca8b6d279140f389c9c2c85988dd12e78414ac3e1584f72456ee566" },
156782
+ { key: "assets/pdf-CVazw9Ub.js", contentType: "application/javascript; charset=utf-8", offset: 1271657, length: 488199, sha256: "e42ce9b09b54fe70642b68c38e7209b4a357177f277ef8c40faa3262f1853cde" },
156783
+ { key: "assets/pdf.worker.min-BQa_JDET.js", contentType: "application/javascript; charset=utf-8", offset: 1759856, length: 73, sha256: "41bcfda4f3c8c0a81c785ea87c69afc8e7d0ed8c333324aee94c273d881bb6aa" },
156784
+ { key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/javascript; charset=utf-8", offset: 1759929, length: 1317034, sha256: "a33cfe728c584fdba4fcc1fd54bcdc2f9f2f13889ddbb5b2bd1d0f8cbe49b84e" },
156785
+ { key: "assets/pdfDocument-HGrmnRP0.js", contentType: "application/javascript; charset=utf-8", offset: 3076963, length: 2858, sha256: "abf488e7017dd90516a2ada53ec9f0f9bf9402173c8f5b7483917c4d60b03411" },
156786
+ { key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset: 3079821, length: 4610, sha256: "994062dd7af4186a739de55dd9e151c63b6301f8e2cbafc608d35c2e87da0cd2" },
156787
+ { key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset: 3084431, length: 488584, sha256: "d7598e12c5dbef095ff8272cfc55da0250bd07fbdecbac8a530b9b277872a134" },
156788
+ { key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 3573015, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
156789
+ { key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 3663939, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
156790
+ { key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 3754923, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
156791
+ { key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 3845903, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
156792
+ { key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 3936775, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
156793
+ { key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 4027755, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
156794
+ { key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 4136391, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
156795
+ { key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 4245475, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
156796
+ { key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 4354523, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
156797
+ { key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 4462223, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
156798
+ { key: "index.html", contentType: "text/html; charset=utf-8", offset: 4550331, length: 4947, sha256: "d9b156d2824937902486f47a6250a5589f6e33f224eef7bd512506612779159e" },
156799
+ { key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 4555278, length: 17512, sha256: "c5c8612a8b3f5a1828d0c6593106036a180eea11da80232f5181548a50679137" }
156740
156800
  ];
156741
156801
  }
156742
156802
  });
Binary file
@@ -39,10 +39,9 @@ Your page can only use capabilities the **app owner** turned on for your site. I
39
39
  `capabilities`, allowing **every** method the capability's page lists — except
40
40
  `presigned_upload.putFile`, which reads a device file and is allowed only when `files` is enabled
41
41
  too. So enabling a capability is enough; the owner does not list methods.
42
- - **What a Brandy app cannot enable:** `app_info`, `calls`, `godot`, `himi_apps`, `live_activity`,
42
+ - **What a Brandy app cannot enable:** `app_info`, `godot`, `himi_apps`, `live_activity`,
43
43
  `local_database`, `release_control`, `system_intents`, `ui` and `wix_platform` — most need wiring
44
- a website app's shell does not have, and `calls` waits on a third-party sign-off for its WebRTC
45
- engine, so plan your page without them. `base44` works only when the
44
+ a website app's shell does not have, so plan your page without them. `base44` works only when the
46
45
  app also has a Base44 binding. Every other capability in the reference can be enabled; other Himi
47
46
  apps (not Brandy) may offer these too.
48
47
  - Enabling a capability changes the app's native permissions, so the owner ships a **new app
@@ -20,7 +20,7 @@ the SDK sources, so it matches the shipped SDKs.
20
20
  - [`biometrics`](https://apps.wix.com/_api/himi-serve/authoring/resource/web-sdk%2Fbiometrics?format=md) — Biometric authentication capability. 2 methods.
21
21
  - [`browser_auth`](https://apps.wix.com/_api/himi-serve/authoring/resource/web-sdk%2Fbrowser_auth?format=md) — Native browser SSO. 1 method.
22
22
  - [`calendar`](https://apps.wix.com/_api/himi-serve/authoring/resource/web-sdk%2Fcalendar?format=md) — Device calendar. 6 methods.
23
- - [`calls`](https://apps.wix.com/_api/himi-serve/authoring/resource/web-sdk%2Fcalls?format=md) — Real-time 1:1 audio calls (Stage 1). 16 methods · not in Brandy.
23
+ - [`calls`](https://apps.wix.com/_api/himi-serve/authoring/resource/web-sdk%2Fcalls?format=md) — Real-time 1:1 audio calls (Stage 1). 16 methods.
24
24
  - [`camera`](https://apps.wix.com/_api/himi-serve/authoring/resource/web-sdk%2Fcamera?format=md) — Camera capability. 3 methods.
25
25
  - [`clipboard`](https://apps.wix.com/_api/himi-serve/authoring/resource/web-sdk%2Fclipboard?format=md) — System clipboard. 3 methods.
26
26
  - [`contacts`](https://apps.wix.com/_api/himi-serve/authoring/resource/web-sdk%2Fcontacts?format=md) — Device address book. 4 methods.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.1353.0",
3
+ "version": "0.1354.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": "1a0d58e6899a9865208dd609c52f853493400202cbdc1a198968c548"
74
+ "falconPackageHash": "07e69214f20355a26a4e813ff46d40f5f5e4f8eaff658f0598038078"
75
75
  }