@wix/himalaya-cli 0.1942.0 → 0.1943.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 +12 -7
  2. package/package.json +2 -2
package/dist/cli.mjs CHANGED
@@ -3964,7 +3964,6 @@ var init_himi_package = __esm({
3964
3964
  var ICON_VIEW_BOX, ICON_STROKE_WIDTH, ICON_FALLBACK, ICON_CATALOG, ICON_NORMALIZED_INDEX, ICON_NAMES;
3965
3965
  var init_icon_catalog_generated = __esm({
3966
3966
  "../../core/ts/src/icon-catalog.generated.ts"() {
3967
- "use strict";
3968
3967
  init_define_HHP_CATALOG();
3969
3968
  ICON_VIEW_BOX = 24;
3970
3969
  ICON_STROKE_WIDTH = 2;
@@ -178091,6 +178090,7 @@ __export(template_trim_exports, {
178091
178090
  routeMatcher: () => routeMatcher,
178092
178091
  runTemplateTrim: () => runTemplateTrim,
178093
178092
  trimCapabilities: () => trimCapabilities,
178093
+ trimLineScans: () => trimLineScans,
178094
178094
  workersInUse: () => workersInUse
178095
178095
  });
178096
178096
  import { cpSync, existsSync as existsSync54, mkdirSync as mkdirSync26, readdirSync as readdirSync30, readFileSync as readFileSync58, renameSync as renameSync10, rmSync as rmSync15, statSync as statSync17, writeFileSync as writeFileSync22 } from "node:fs";
@@ -178274,7 +178274,7 @@ function jsonString(literal4, what) {
178274
178274
  try {
178275
178275
  return JSON.parse(literal4);
178276
178276
  } catch (e2) {
178277
- throw new TrimRefusal(`${what} ${literal4} is not a valid JSON string (${e2.message}) \u2014 trim reads the shape \`himi init\` writes; fix the literal or trim by hand (\`himi docs trim-a-template\`)`);
178277
+ throw new TrimRefusal(`${typeof what === "function" ? what() : what} ${literal4} is not a valid JSON string (${e2.message}) \u2014 trim reads the shape \`himi init\` writes; fix the literal or trim by hand (\`himi docs trim-a-template\`)`);
178278
178278
  }
178279
178279
  }
178280
178280
  function bracketEnd(src, open6) {
@@ -178343,7 +178343,7 @@ function parseApp(dev, config) {
178343
178343
  `dev/index.ts line ${lineOf2(dev, pos)}: expected a \`"<screenId>": {\` entry of the SCREENS map \u2014 every screen must be a plain JSON entry inside the \`SCREENS\` literal (no spread, call, computed key or runtime merge such as Object.assign); write generated screens with \`himi template screens --upsert --from <screens.json>\``
178344
178344
  );
178345
178345
  }
178346
- const id = jsonString(m2[1], `dev/index.ts line ${lineOf2(dev, pos)}: the SCREENS key`);
178346
+ const id = jsonString(m2[1], () => `dev/index.ts line ${lineOf2(dev, pos)}: the SCREENS key`);
178347
178347
  const open6 = pos + m2[0].length - 1;
178348
178348
  const close = objectEnd(dev, open6);
178349
178349
  if (close < 0 || dev.slice(close, close + 2) !== ",\n") {
@@ -178374,8 +178374,8 @@ function parseApp(dev, config) {
178374
178374
  TENTRY.lastIndex = pos;
178375
178375
  const m2 = TENTRY.exec(dev);
178376
178376
  if (!m2) throw new TrimRefusal(`dev/index.ts line ${lineOf2(dev, pos)}: expected a \`{ pattern: \u2026, display: \u2026, template: {\u2026} },\` entry of TEMPLATED`);
178377
- const pattern = jsonString(m2[1], `dev/index.ts line ${lineOf2(dev, pos)}: the TEMPLATED pattern`);
178378
- const display = jsonString(m2[2], `dev/index.ts line ${lineOf2(dev, pos)}: the TEMPLATED display`);
178377
+ const pattern = jsonString(m2[1], () => `dev/index.ts line ${lineOf2(dev, pos)}: the TEMPLATED pattern`);
178378
+ const display = jsonString(m2[2], () => `dev/index.ts line ${lineOf2(dev, pos)}: the TEMPLATED display`);
178379
178379
  const lineEnd = dev.indexOf("\n", pos);
178380
178380
  const tk = dev.indexOf("template: {", pos);
178381
178381
  if (tk < 0 || tk > lineEnd) throw new TrimRefusal(`dev/index.ts: the templated route ${display} has no \`template: {\` on its first line`);
@@ -179261,7 +179261,7 @@ function summarize2(errors) {
179261
179261
  const shown3 = errors.slice(0, 5).map(one2).join("; ");
179262
179262
  return errors.length > 5 ? `${shown3}; and ${errors.length - 5} more` : shown3;
179263
179263
  }
179264
- var TrimRefusal, LIT, ATOM, QUANT, CAP, SAFE_ROUTE_PATTERN, lineOf2, isStatic, WORKER_OPEN, entryLabel, isNode6, asItems, NAV_SCREEN_KEYS, WORKER_SCREEN_PARAMS, sorted, refuse3, plural;
179264
+ var TrimRefusal, LIT, ATOM, QUANT, CAP, SAFE_ROUTE_PATTERN, lineScans, trimLineScans, lineOf2, isStatic, WORKER_OPEN, entryLabel, isNode6, asItems, NAV_SCREEN_KEYS, WORKER_SCREEN_PARAMS, sorted, refuse3, plural;
179265
179265
  var init_template_trim = __esm({
179266
179266
  "src/template-trim.ts"() {
179267
179267
  init_define_HHP_CATALOG();
@@ -179288,7 +179288,12 @@ var init_template_trim = __esm({
179288
179288
  SAFE_ROUTE_PATTERN = new RegExp(
179289
179289
  String.raw`^\^${LIT}(?:${CAP}${LIT}|\(\?:(?:${LIT}|\[(?:[^\]\\[]|\\.)+\])${CAP}\)\?)?\$$`
179290
179290
  );
179291
- lineOf2 = (src, at2) => src.slice(0, at2).split("\n").length;
179291
+ lineScans = 0;
179292
+ trimLineScans = () => lineScans;
179293
+ lineOf2 = (src, at2) => {
179294
+ lineScans += 1;
179295
+ return src.slice(0, at2).split("\n").length;
179296
+ };
179292
179297
  isStatic = (id) => typeof id === "string" && id !== "" && !id.startsWith("$");
179293
179298
  WORKER_OPEN = /^tier5\.[A-Za-z0-9_]+\.openMember$/;
179294
179299
  entryLabel = (entry) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.1942.0",
3
+ "version": "0.1943.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": "d45ce3f49eb61d265595976e686a71ff22bdb89dd15947333349fc50"
85
+ "falconPackageHash": "11669eba46d47d326aad2fc291ac3db4d64a7469549b319ca54b58ae"
86
86
  }