@wix/himalaya-cli 0.1106.0 → 0.1108.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 +25 -6
  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
  }
@@ -6788,7 +6789,6 @@ function resolveTranslation(value, catalog, sourceCatalog) {
6788
6789
  var BINDING_SIGILS, BINDING_SIGIL_RE, TRANSLATION_PREFIX, TRANSLATION_KEY_RE;
6789
6790
  var init_bindings = __esm({
6790
6791
  "../../core/ts/src/bindings.ts"() {
6791
- "use strict";
6792
6792
  BINDING_SIGILS = ["service", "flag", "item", "t"];
6793
6793
  BINDING_SIGIL_RE = new RegExp(
6794
6794
  `^\\$(?:${BINDING_SIGILS.filter((s) => s !== "t").join("|")})\\b|^\\$t:`
@@ -68715,6 +68715,7 @@ var init_context = __esm({
68715
68715
  // src/cli.ts
68716
68716
  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
68717
  import { execFile, execFileSync as execFileSync7, spawnSync as spawnSync5, spawn as spawn7 } from "node:child_process";
68718
+ import { AsyncLocalStorage } from "node:async_hooks";
68718
68719
  import { createHash as createHash31, randomUUID as randomUUID6 } from "node:crypto";
68719
68720
  import { tmpdir as tmpdir5, homedir as homedir7, hostname } from "node:os";
68720
68721
  import { join as join64, resolve as resolve51, relative as relative13, basename as basename17, dirname as dirname36 } from "node:path";
@@ -73274,8 +73275,23 @@ async function liveMapFor(dir) {
73274
73275
  }
73275
73276
  };
73276
73277
  }
73278
+ var commandScratch = new AsyncLocalStorage();
73279
+ function commandScratchDir(prefix) {
73280
+ const dir = mkdtempSync4(join64(tmpdir5(), prefix));
73281
+ commandScratch.getStore()?.push(dir);
73282
+ return dir;
73283
+ }
73277
73284
  async function run(argv, io = defaultIO, deps = {}) {
73278
- const code = await runCommand(argv, io, deps);
73285
+ const scratch = [];
73286
+ let code;
73287
+ try {
73288
+ code = await commandScratch.run(scratch, () => runCommand(argv, io, deps));
73289
+ } finally {
73290
+ for (const dir of scratch) try {
73291
+ rmSync15(dir, { recursive: true, force: true });
73292
+ } catch {
73293
+ }
73294
+ }
73279
73295
  const { _: pos, flags } = parseFlags(argv);
73280
73296
  if (BOARD_REFRESHERS.has(pos[0]) && flags.help !== true) {
73281
73297
  const dir = contentDir(flags);
@@ -74028,7 +74044,7 @@ ${doNow.map((l) => ` ${l}`).join("\n")}`);
74028
74044
  const { navIssues: navIssues2 } = await Promise.resolve().then(() => (init_nav_lint(), nav_lint_exports));
74029
74045
  const { buildContentForValidation: buildContentForValidation2, buildReleaseFromContent: buildReleaseFromContent2, bundleOutDir: bundleOutDir2 } = await loadAuthoring();
74030
74046
  const bres = await buildContentForValidation2(dir, { resolution: resolutionFlag(flags) });
74031
- const out2 = mkdtempSync4(join64(tmpdir5(), "himi-validate-"));
74047
+ const out2 = commandScratchDir("himi-validate-");
74032
74048
  const hasWorkers = bres.built.length > 0 || bres.compileErrors.length > 0;
74033
74049
  const outcome = await buildReleaseFromContent2(dir, out2, {
74034
74050
  ...hasWorkers ? { tier5Dir: bundleOutDir2(dir) } : {},
@@ -74530,7 +74546,7 @@ ${handover.hint[0].toUpperCase()}${handover.hint.slice(1)}.`);
74530
74546
  }
74531
74547
  }
74532
74548
  const bres = await buildContentBundles2(dir, { resolution: resolutionFlag(flags) });
74533
- const out2 = mkdtempSync4(join64(tmpdir5(), "himi-test-"));
74549
+ const out2 = commandScratchDir("himi-test-");
74534
74550
  const hasWorkers = bres.built.length > 0 || bres.compileErrors.length > 0;
74535
74551
  const outcome = await buildReleaseFromContent2(dir, out2, {
74536
74552
  ...hasWorkers ? { tier5Dir: bundleOutDir2(dir) } : {},
@@ -74964,7 +74980,7 @@ ${[...afterRun.next, ...testReminder ? [testReminder] : []].join("\n")}`);
74964
74980
  }
74965
74981
  const { buildContentBundles: buildContentBundles2, buildReleaseFromContent: buildReleaseFromContent2, bundleOutDir: bundleOutDir2 } = await loadAuthoring();
74966
74982
  const bres = await buildContentBundles2(dir, { resolution: resolutionFlag(flags) });
74967
- const out2 = mkdtempSync4(join64(tmpdir5(), "himi-render-"));
74983
+ const out2 = commandScratchDir("himi-render-");
74968
74984
  const hasWorkers = bres.built.length > 0 || bres.compileErrors.length > 0;
74969
74985
  const outcome = await buildReleaseFromContent2(dir, out2, {
74970
74986
  ...hasWorkers ? { tier5Dir: bundleOutDir2(dir) } : {},
@@ -75480,7 +75496,7 @@ default (no --glyph): ${DEFAULT_GLYPH2} \u2014 a mark that claims nothing, so th
75480
75496
  const force = flags.force === true;
75481
75497
  const { buildContentForValidation: buildContentForValidation2, buildReleaseFromContent: buildReleaseFromContent2, bundleOutDir: bundleOutDir2 } = await loadAuthoring();
75482
75498
  const bres = await buildContentForValidation2(dir, { resolution: resolutionFlag(flags) });
75483
- const out2 = mkdtempSync4(join64(tmpdir5(), "himi-push-"));
75499
+ const out2 = commandScratchDir("himi-push-");
75484
75500
  const hasWorkers = bres.built.length > 0 || bres.compileErrors.length > 0;
75485
75501
  const outcome = await buildReleaseFromContent2(dir, out2, {
75486
75502
  ...hasWorkers ? { tier5Dir: bundleOutDir2(dir) } : {},
@@ -76282,6 +76298,7 @@ default (no --glyph): ${DEFAULT_GLYPH2} \u2014 a mark that claims nothing, so th
76282
76298
  }
76283
76299
  }
76284
76300
  let served = null;
76301
+ let browserCopy = null;
76285
76302
  let servedMissing = [];
76286
76303
  const fromContent = !source;
76287
76304
  try {
@@ -76343,6 +76360,7 @@ default (no --glyph): ${DEFAULT_GLYPH2} \u2014 a mark that claims nothing, so th
76343
76360
  const { runInBrowser: runInBrowser2 } = await Promise.resolve().then(() => (init_run_browser(), run_browser_exports));
76344
76361
  const { resolvePackage: resolvePackage2 } = await Promise.resolve().then(() => (init_run(), run_exports));
76345
76362
  const resolved2 = await resolvePackage2(source);
76363
+ browserCopy = resolved2.temp;
76346
76364
  const run2 = await runInBrowser2(resolved2.releaseRoot, resolved2.app, resolved2.header, {
76347
76365
  ...port !== void 0 ? { port } : {},
76348
76366
  chrome: chromeArg,
@@ -76492,6 +76510,7 @@ default (no --glyph): ${DEFAULT_GLYPH2} \u2014 a mark that claims nothing, so th
76492
76510
  } finally {
76493
76511
  if (temp) rmSync15(temp, { recursive: true, force: true });
76494
76512
  if (served) rmSync15(served, { recursive: true, force: true });
76513
+ if (browserCopy) rmSync15(browserCopy, { recursive: true, force: true });
76495
76514
  }
76496
76515
  }
76497
76516
  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.1108.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": "f34076e20d0b1e1ece37ba530d97d5091ac1f3d042ef56aed6d8190b"
71
71
  }