@wix/himalaya-cli 0.1836.0 → 0.1837.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
@@ -8453,6 +8453,7 @@ function assertExternalUrl(site, value2, where) {
8453
8453
  var WIX_FREE_SITE_HOST_SUFFIXES, SITE_KINDS, SITE_LAYOUTS, SITE_PAGE_TITLES, SITE_TOP_BAR_MAX_ACTIONS, SITE_BUILTIN_NATIVE_SCREENS, SITE_PRIVATE_NATIVE_SCREENS, SITE_SHELL_MAX_TABS, SITE_SCREEN_PREFIX, SITE_PAGE_SCREEN_ID, BASE44_ORIGINS, PAGE_ID, SITE_PAGE_NODE_ID, SITE_SCREEN_FORMS, SITE_NODE_SCREEN_RENDERER, PLACEMENTS, ICONS, SITE_MEMBER_PAGE_SCREENS, SITE_MEMBER_CART_SCREENS, SITE_MEMBER_ONLY_SCREENS;
8454
8454
  var init_site_shell = __esm({
8455
8455
  "../../core/ts/src/site-shell.ts"() {
8456
+ "use strict";
8456
8457
  init_define_HHP_CATALOG();
8457
8458
  init_himi_package();
8458
8459
  init_icon_catalog_generated();
@@ -246433,11 +246434,37 @@ __export(input_evidence_isolation_exports, {
246433
246434
  runInputEvidenceChild: () => runInputEvidenceChild
246434
246435
  });
246435
246436
  async function installInputEvidenceIsolation(dir) {
246436
- const { lstatSync: lstatSync42, readdirSync: readdirSync67 } = await import("node:fs");
246437
- const { join: join213 } = await import("node:path");
246437
+ const { lstatSync: lstatSync42, readdirSync: readdirSync67, readlinkSync: readlinkSync3, realpathSync: realpathSync26 } = await import("node:fs");
246438
+ const { dirname: dirname91, isAbsolute: isAbsolute23, join: join213, relative: relative40, resolve: resolve133, sep: sep37 } = await import("node:path");
246439
+ const root = resolve133(dir);
246440
+ const privateDir = join213(root, ".himi");
246441
+ const privateReal = join213(realpathSync26(root), ".himi") + sep37;
246442
+ const within2 = (base2, path2) => {
246443
+ const rel2 = relative40(base2, path2);
246444
+ return !!rel2 && rel2 !== ".." && !rel2.startsWith(`..${sep37}`) && !isAbsolute23(rel2);
246445
+ };
246446
+ const recording = join213(dir, "dev", "net-mocks.json");
246447
+ const isAllowedLink = (path2) => {
246448
+ try {
246449
+ if (path2 === recording) {
246450
+ const link4 = readlinkSync3(path2);
246451
+ if (isAbsolute23(link4)) return false;
246452
+ const target = resolve133(dirname91(path2), link4);
246453
+ if (!within2(privateDir, target)) return false;
246454
+ if (realpathSync26(path2) !== join213(realpathSync26(root), relative40(root, target))) return false;
246455
+ return lstatSync42(target).isFile();
246456
+ }
246457
+ return within2(privateDir, resolve133(path2)) && realpathSync26(path2).startsWith(privateReal);
246458
+ } catch {
246459
+ return false;
246460
+ }
246461
+ };
246438
246462
  const check = (path2) => {
246439
246463
  const stat10 = lstatSync42(path2);
246440
- if (stat10.isSymbolicLink()) throw new Error("input evidence requires a content tree without symlinks");
246464
+ if (stat10.isSymbolicLink()) {
246465
+ if (isAllowedLink(path2)) return;
246466
+ throw new Error("input evidence requires a content tree without symlinks");
246467
+ }
246441
246468
  if (stat10.isDirectory()) for (const name of readdirSync67(path2)) check(join213(path2, name));
246442
246469
  };
246443
246470
  check(dir);
@@ -289088,8 +289115,8 @@ async function testCommand(ctx) {
289088
289115
  print({ ok: false, code: "test_input_evidence_requires_json", error: "--input-evidence requires --json" });
289089
289116
  return 2;
289090
289117
  }
289091
- if (captureInputEvidence && (flags.browser === true || existsSync115(join149(dir, "functions")))) {
289092
- print({ ok: false, code: "test_input_evidence_unsupported_mode", error: "--input-evidence needs the local app worker crawl, not --browser or a functions package" });
289118
+ if (captureInputEvidence && (flags.browser === true || flags.record === true || existsSync115(join149(dir, "functions")))) {
289119
+ print({ ok: false, code: "test_input_evidence_unsupported_mode", error: "--input-evidence needs the local app worker crawl, not --browser, --record or a functions package" });
289093
289120
  return 2;
289094
289121
  }
289095
289122
  let sourceArchiveHash;
@@ -142,7 +142,7 @@ keeps its existing fields and adds the code:
142
142
  | `test_browser_cold_visits_unsupported` | `--browser` was requested with an authored `coldVisits` contract. Exit 2 before compilation or opening a browser; run without `--browser` to exercise those visits. The browser loop cannot certify saved-record return behavior. |
143
143
  | `test_browser_journeys_unsupported` | `--browser` was requested with authored journeys that have no `coldVisits`. Exit 2 before compilation or opening a browser. The single-screen browser loop does not execute authored steps or root `expectText`/`absentText` assertions; run without `--browser` to execute that contract. The existing cold-visit code remains in use when any journey has `coldVisits`. |
144
144
  | `test_input_evidence_requires_json` | `--input-evidence` was requested without explicit `--json`. Exit 2 before build or worker execution. |
145
- | `test_input_evidence_unsupported_mode` | `--input-evidence` was combined with `--browser`, or the content is a functions package rather than an app worker crawl. Exit 2 before execution. |
145
+ | `test_input_evidence_unsupported_mode` | `--input-evidence` was combined with `--browser` or `--record` (the recording is outside the archived source hash), or the content is a functions package rather than an app worker crawl. Exit 2 before execution. |
146
146
  | `test_input_evidence_unavailable` | The isolated input crawl cannot establish all contained realms, cannot read a stable source archive before/after the crawl, or fails to return one complete JSON report (including interruption, process timeout or output limit). Exit 1; no host-realm fallback or positive input acceptance. |
147
147
 
148
148
  This is a scoped migration. Other legacy `himi test` failure paths retain their existing envelopes.
@@ -89,7 +89,12 @@ import confinement, and establishes QuickJS/WASM realms for generated dev module
89
89
  config, worker boot and worker actions before loading generated modules. Explicit
90
90
  host-realm overrides or unavailable isolation refuse with
91
91
  `test_input_evidence_unavailable`; there is no host fallback. Packages containing
92
- symlinks are refused. The compiler accepts package-owned files and CLI-owned
92
+ symlinks are refused, with two exceptions that the One App migration guide asks for, both
93
+ tied to the private `.himi/` folder (the source archive never contains it): `dev/net-mocks.json`
94
+ may be a relative link to a regular file inside `.himi/`, and a link inside `.himi/` may point
95
+ only inside `.himi/` (the `.bin` links npm makes for the guide's pixel tools). A recording read
96
+ through that link is not part of the archived source hash, so `--record` cannot be combined with
97
+ `--input-evidence`. The compiler accepts package-owned files and CLI-owned
93
98
  source/staged SDK roots; it does not expand arbitrary app or ancestor dependency
94
99
  links into trusted roots. A separate editor SDK install cannot substitute for the
95
100
  pinned CLI's runtime in this mode. The trusted caller must keep the generated
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.1836.0",
3
+ "version": "0.1837.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": [
@@ -82,5 +82,5 @@
82
82
  "artifactId": "himalaya-cli"
83
83
  }
84
84
  },
85
- "falconPackageHash": "3040dae8536348870b46aa6e94725039915866115d4ec29bab6d4294"
85
+ "falconPackageHash": "e3cba4e99a9fcf2c35c6cd45013d5c41029d8dac8eb03f7781050acc"
86
86
  }