@wix/himalaya-cli 0.1106.0 → 0.1107.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 +28 -5
  2. package/package.json +2 -2
package/dist/cli.mjs CHANGED
@@ -6762,6 +6762,7 @@ function walk(node, registry, path2, out2) {
6762
6762
  var SYSTEM_FONT_FAMILY, TONAL_ELEVATION_ALPHA;
6763
6763
  var init_tokens = __esm({
6764
6764
  "../../core/ts/src/tokens.ts"() {
6765
+ "use strict";
6765
6766
  SYSTEM_FONT_FAMILY = "$system";
6766
6767
  TONAL_ELEVATION_ALPHA = [0, 0.05, 0.08, 0.11, 0.12, 0.14];
6767
6768
  }
@@ -13139,6 +13140,7 @@ function resolveIdiom(tokens, ctx = {}) {
13139
13140
  var IDIOM_CONTEXTS, UNSAFE_KEYS;
13140
13141
  var init_idiom = __esm({
13141
13142
  "../../core/ts/src/idiom.ts"() {
13143
+ "use strict";
13142
13144
  IDIOM_CONTEXTS = {
13143
13145
  ios: { native: ["ios"] },
13144
13146
  android: { native: ["material"] },
@@ -24717,6 +24719,7 @@ function shouldRevealError(args) {
24717
24719
  var EMAIL_RE, URL_HOST_RE, INTEGER_RE, NUMBER_RE;
24718
24720
  var init_validation = __esm({
24719
24721
  "../../core/ts/src/validation.ts"() {
24722
+ "use strict";
24720
24723
  EMAIL_RE = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*\.[A-Za-z]{2,}$/;
24721
24724
  URL_HOST_RE = /^[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*(:[0-9]+)?$/;
24722
24725
  INTEGER_RE = /^[+-]?[0-9]+$/;
@@ -29117,6 +29120,7 @@ function validateWorkerSubtree(raw, slotId, policy, actionCatalog) {
29117
29120
  var WORKER_SUBTREE_CEILINGS, ID_PART, ACTION_ID;
29118
29121
  var init_worker_subtree = __esm({
29119
29122
  "../../core/ts/src/worker-subtree.ts"() {
29123
+ "use strict";
29120
29124
  init_worker_subtree_safe_types_generated();
29121
29125
  WORKER_SUBTREE_CEILINGS = Object.freeze({
29122
29126
  maxEncodedBytes: 65536,
@@ -68715,6 +68719,7 @@ var init_context = __esm({
68715
68719
  // src/cli.ts
68716
68720
  import { mkdtempSync as mkdtempSync4, readFileSync as readFileSync79, mkdirSync as mkdirSync32, writeFileSync as writeFileSync29, existsSync as existsSync66, rmSync as rmSync15, readdirSync as readdirSync30, statSync as statSync18, lstatSync as lstatSync13, accessSync, constants as constants2, renameSync as renameSync7, cpSync as cpSync3 } from "node:fs";
68717
68721
  import { execFile, execFileSync as execFileSync7, spawnSync as spawnSync5, spawn as spawn7 } from "node:child_process";
68722
+ import { AsyncLocalStorage } from "node:async_hooks";
68718
68723
  import { createHash as createHash31, randomUUID as randomUUID6 } from "node:crypto";
68719
68724
  import { tmpdir as tmpdir5, homedir as homedir7, hostname } from "node:os";
68720
68725
  import { join as join64, resolve as resolve51, relative as relative13, basename as basename17, dirname as dirname36 } from "node:path";
@@ -73274,8 +73279,23 @@ async function liveMapFor(dir) {
73274
73279
  }
73275
73280
  };
73276
73281
  }
73282
+ var commandScratch = new AsyncLocalStorage();
73283
+ function commandScratchDir(prefix) {
73284
+ const dir = mkdtempSync4(join64(tmpdir5(), prefix));
73285
+ commandScratch.getStore()?.push(dir);
73286
+ return dir;
73287
+ }
73277
73288
  async function run(argv, io = defaultIO, deps = {}) {
73278
- const code = await runCommand(argv, io, deps);
73289
+ const scratch = [];
73290
+ let code;
73291
+ try {
73292
+ code = await commandScratch.run(scratch, () => runCommand(argv, io, deps));
73293
+ } finally {
73294
+ for (const dir of scratch) try {
73295
+ rmSync15(dir, { recursive: true, force: true });
73296
+ } catch {
73297
+ }
73298
+ }
73279
73299
  const { _: pos, flags } = parseFlags(argv);
73280
73300
  if (BOARD_REFRESHERS.has(pos[0]) && flags.help !== true) {
73281
73301
  const dir = contentDir(flags);
@@ -74028,7 +74048,7 @@ ${doNow.map((l) => ` ${l}`).join("\n")}`);
74028
74048
  const { navIssues: navIssues2 } = await Promise.resolve().then(() => (init_nav_lint(), nav_lint_exports));
74029
74049
  const { buildContentForValidation: buildContentForValidation2, buildReleaseFromContent: buildReleaseFromContent2, bundleOutDir: bundleOutDir2 } = await loadAuthoring();
74030
74050
  const bres = await buildContentForValidation2(dir, { resolution: resolutionFlag(flags) });
74031
- const out2 = mkdtempSync4(join64(tmpdir5(), "himi-validate-"));
74051
+ const out2 = commandScratchDir("himi-validate-");
74032
74052
  const hasWorkers = bres.built.length > 0 || bres.compileErrors.length > 0;
74033
74053
  const outcome = await buildReleaseFromContent2(dir, out2, {
74034
74054
  ...hasWorkers ? { tier5Dir: bundleOutDir2(dir) } : {},
@@ -74530,7 +74550,7 @@ ${handover.hint[0].toUpperCase()}${handover.hint.slice(1)}.`);
74530
74550
  }
74531
74551
  }
74532
74552
  const bres = await buildContentBundles2(dir, { resolution: resolutionFlag(flags) });
74533
- const out2 = mkdtempSync4(join64(tmpdir5(), "himi-test-"));
74553
+ const out2 = commandScratchDir("himi-test-");
74534
74554
  const hasWorkers = bres.built.length > 0 || bres.compileErrors.length > 0;
74535
74555
  const outcome = await buildReleaseFromContent2(dir, out2, {
74536
74556
  ...hasWorkers ? { tier5Dir: bundleOutDir2(dir) } : {},
@@ -74964,7 +74984,7 @@ ${[...afterRun.next, ...testReminder ? [testReminder] : []].join("\n")}`);
74964
74984
  }
74965
74985
  const { buildContentBundles: buildContentBundles2, buildReleaseFromContent: buildReleaseFromContent2, bundleOutDir: bundleOutDir2 } = await loadAuthoring();
74966
74986
  const bres = await buildContentBundles2(dir, { resolution: resolutionFlag(flags) });
74967
- const out2 = mkdtempSync4(join64(tmpdir5(), "himi-render-"));
74987
+ const out2 = commandScratchDir("himi-render-");
74968
74988
  const hasWorkers = bres.built.length > 0 || bres.compileErrors.length > 0;
74969
74989
  const outcome = await buildReleaseFromContent2(dir, out2, {
74970
74990
  ...hasWorkers ? { tier5Dir: bundleOutDir2(dir) } : {},
@@ -75480,7 +75500,7 @@ default (no --glyph): ${DEFAULT_GLYPH2} \u2014 a mark that claims nothing, so th
75480
75500
  const force = flags.force === true;
75481
75501
  const { buildContentForValidation: buildContentForValidation2, buildReleaseFromContent: buildReleaseFromContent2, bundleOutDir: bundleOutDir2 } = await loadAuthoring();
75482
75502
  const bres = await buildContentForValidation2(dir, { resolution: resolutionFlag(flags) });
75483
- const out2 = mkdtempSync4(join64(tmpdir5(), "himi-push-"));
75503
+ const out2 = commandScratchDir("himi-push-");
75484
75504
  const hasWorkers = bres.built.length > 0 || bres.compileErrors.length > 0;
75485
75505
  const outcome = await buildReleaseFromContent2(dir, out2, {
75486
75506
  ...hasWorkers ? { tier5Dir: bundleOutDir2(dir) } : {},
@@ -76282,6 +76302,7 @@ default (no --glyph): ${DEFAULT_GLYPH2} \u2014 a mark that claims nothing, so th
76282
76302
  }
76283
76303
  }
76284
76304
  let served = null;
76305
+ let browserCopy = null;
76285
76306
  let servedMissing = [];
76286
76307
  const fromContent = !source;
76287
76308
  try {
@@ -76343,6 +76364,7 @@ default (no --glyph): ${DEFAULT_GLYPH2} \u2014 a mark that claims nothing, so th
76343
76364
  const { runInBrowser: runInBrowser2 } = await Promise.resolve().then(() => (init_run_browser(), run_browser_exports));
76344
76365
  const { resolvePackage: resolvePackage2 } = await Promise.resolve().then(() => (init_run(), run_exports));
76345
76366
  const resolved2 = await resolvePackage2(source);
76367
+ browserCopy = resolved2.temp;
76346
76368
  const run2 = await runInBrowser2(resolved2.releaseRoot, resolved2.app, resolved2.header, {
76347
76369
  ...port !== void 0 ? { port } : {},
76348
76370
  chrome: chromeArg,
@@ -76492,6 +76514,7 @@ default (no --glyph): ${DEFAULT_GLYPH2} \u2014 a mark that claims nothing, so th
76492
76514
  } finally {
76493
76515
  if (temp) rmSync15(temp, { recursive: true, force: true });
76494
76516
  if (served) rmSync15(served, { recursive: true, force: true });
76517
+ if (browserCopy) rmSync15(browserCopy, { recursive: true, force: true });
76495
76518
  }
76496
76519
  }
76497
76520
  case "preview": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.1106.0",
3
+ "version": "0.1107.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": "faa54f382a4c5a4903c112395c7bf69887e9b0d8ff91ea2e682af85d"
70
+ "falconPackageHash": "d7ccf3aff51bc4aea68b31d9a7b184e1135a7f4796de1f09192bb7c8"
71
71
  }