@wix/himalaya-cli 0.843.0 → 0.845.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 (69) hide show
  1. package/dist/cli.mjs +109 -73
  2. package/guides/release-notes.md +19 -0
  3. package/package.json +2 -2
  4. package/templates/beauty-salon-owner/dev/index.ts +858 -0
  5. package/templates/beauty-salon-owner/tier5-src/_shared/aria-chat.ts +59 -9
  6. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-analytics/index.ts +7 -1
  7. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-analytics/report.ts +690 -0
  8. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-aria/index.ts +1 -1
  9. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-aria-history/index.ts +1 -1
  10. package/templates/community-club-owner/dev/index.ts +858 -0
  11. package/templates/community-club-owner/tier5-src/_shared/aria-chat.ts +59 -9
  12. package/templates/community-club-owner/tier5-src/himi-owner-lite-analytics/index.ts +7 -1
  13. package/templates/community-club-owner/tier5-src/himi-owner-lite-analytics/report.ts +690 -0
  14. package/templates/community-club-owner/tier5-src/himi-owner-lite-aria/index.ts +1 -1
  15. package/templates/community-club-owner/tier5-src/himi-owner-lite-aria-history/index.ts +1 -1
  16. package/templates/events-meetups-owner/dev/index.ts +858 -0
  17. package/templates/events-meetups-owner/tier5-src/_shared/aria-chat.ts +59 -9
  18. package/templates/events-meetups-owner/tier5-src/himi-owner-lite-analytics/index.ts +7 -1
  19. package/templates/events-meetups-owner/tier5-src/himi-owner-lite-analytics/report.ts +690 -0
  20. package/templates/events-meetups-owner/tier5-src/himi-owner-lite-aria/index.ts +1 -1
  21. package/templates/events-meetups-owner/tier5-src/himi-owner-lite-aria-history/index.ts +1 -1
  22. package/templates/gym-fitness-owner/dev/index.ts +858 -0
  23. package/templates/gym-fitness-owner/tier5-src/_shared/aria-chat.ts +59 -9
  24. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-analytics/index.ts +7 -1
  25. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-analytics/report.ts +690 -0
  26. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-aria/index.ts +1 -1
  27. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-aria-history/index.ts +1 -1
  28. package/templates/nonprofit-cause-owner/dev/index.ts +858 -0
  29. package/templates/nonprofit-cause-owner/tier5-src/_shared/aria-chat.ts +59 -9
  30. package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-analytics/index.ts +7 -1
  31. package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-analytics/report.ts +690 -0
  32. package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-aria/index.ts +1 -1
  33. package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-aria-history/index.ts +1 -1
  34. package/templates/owner-lite/dev/index.ts +858 -0
  35. package/templates/owner-lite/tier5-src/_shared/aria-chat.ts +59 -9
  36. package/templates/owner-lite/tier5-src/himi-owner-lite-analytics/index.ts +7 -1
  37. package/templates/owner-lite/tier5-src/himi-owner-lite-analytics/report.ts +690 -0
  38. package/templates/owner-lite/tier5-src/himi-owner-lite-aria/index.ts +1 -1
  39. package/templates/owner-lite/tier5-src/himi-owner-lite-aria-history/index.ts +1 -1
  40. package/templates/podcast-creator-owner/dev/index.ts +858 -0
  41. package/templates/podcast-creator-owner/tier5-src/_shared/aria-chat.ts +59 -9
  42. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-analytics/index.ts +7 -1
  43. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-analytics/report.ts +690 -0
  44. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-aria/index.ts +1 -1
  45. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-aria-history/index.ts +1 -1
  46. package/templates/portfolio-creative-owner/dev/index.ts +858 -0
  47. package/templates/portfolio-creative-owner/tier5-src/_shared/aria-chat.ts +59 -9
  48. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-analytics/index.ts +7 -1
  49. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-analytics/report.ts +690 -0
  50. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-aria/index.ts +1 -1
  51. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-aria-history/index.ts +1 -1
  52. package/templates/restaurant-owner/dev/index.ts +858 -0
  53. package/templates/restaurant-owner/tier5-src/_shared/aria-chat.ts +59 -9
  54. package/templates/restaurant-owner/tier5-src/himi-owner-lite-analytics/index.ts +7 -1
  55. package/templates/restaurant-owner/tier5-src/himi-owner-lite-analytics/report.ts +690 -0
  56. package/templates/restaurant-owner/tier5-src/himi-owner-lite-aria/index.ts +1 -1
  57. package/templates/restaurant-owner/tier5-src/himi-owner-lite-aria-history/index.ts +1 -1
  58. package/templates/retail-store-owner/dev/index.ts +858 -0
  59. package/templates/retail-store-owner/tier5-src/_shared/aria-chat.ts +59 -9
  60. package/templates/retail-store-owner/tier5-src/himi-owner-lite-analytics/index.ts +7 -1
  61. package/templates/retail-store-owner/tier5-src/himi-owner-lite-analytics/report.ts +690 -0
  62. package/templates/retail-store-owner/tier5-src/himi-owner-lite-aria/index.ts +1 -1
  63. package/templates/retail-store-owner/tier5-src/himi-owner-lite-aria-history/index.ts +1 -1
  64. package/templates/yoga-studio-owner/dev/index.ts +858 -0
  65. package/templates/yoga-studio-owner/tier5-src/_shared/aria-chat.ts +59 -9
  66. package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-analytics/index.ts +7 -1
  67. package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-analytics/report.ts +690 -0
  68. package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-aria/index.ts +1 -1
  69. package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-aria-history/index.ts +1 -1
package/dist/cli.mjs CHANGED
@@ -18609,6 +18609,81 @@ var init_token_colors = __esm({
18609
18609
  }
18610
18610
  });
18611
18611
 
18612
+ // src/token-lint.ts
18613
+ import { existsSync as existsSync13, readFileSync as readFileSync16 } from "node:fs";
18614
+ import { join as join17 } from "node:path";
18615
+ function configuredTokensPath(dir) {
18616
+ for (const name of ["config.ts", "config.js", "himi.config.ts"]) {
18617
+ const f = join17(dir, name);
18618
+ if (!existsSync13(f)) continue;
18619
+ const src = readFileSync16(f, "utf8");
18620
+ const m = /designTokensPath\s*:\s*["'`]([^"'`]+)["'`]/.exec(src);
18621
+ if (m) return { path: m[1].replace(/^\.\//, "") };
18622
+ if (/designTokensPath\s*:/.test(src)) return { computed: true };
18623
+ }
18624
+ return {};
18625
+ }
18626
+ function tokenColorIssues(dir, tokensPathOverride) {
18627
+ const issues = [];
18628
+ const error = (message) => issues.push({ screen: null, pass: "tokens", severity: "error", message });
18629
+ const warn = (message) => issues.push({ screen: null, pass: "tokens", severity: "warning", message });
18630
+ const configured = tokensPathOverride ? { path: tokensPathOverride } : configuredTokensPath(dir);
18631
+ if (configured.computed) {
18632
+ warn(
18633
+ "config designTokensPath is a computed expression, so this pass cannot tell which file holds the palette -- only tokens.json was checked"
18634
+ );
18635
+ }
18636
+ const tokensPath = configured.path ?? "tokens.json";
18637
+ const p = join17(dir, tokensPath);
18638
+ if (!existsSync13(p)) {
18639
+ if (tokensPath !== "tokens.json") {
18640
+ warn(`config designTokensPath points at ${tokensPath}, which does not exist -- colour tokens were not checked`);
18641
+ }
18642
+ return issues;
18643
+ }
18644
+ let raw;
18645
+ try {
18646
+ raw = JSON.parse(readFileSync16(p, "utf8"));
18647
+ } catch (e) {
18648
+ error(`${tokensPath}: unparsable JSON \u2014 ${e.message}`);
18649
+ return issues;
18650
+ }
18651
+ if (raw === null || typeof raw !== "object" || Array.isArray(raw)) {
18652
+ error(`${tokensPath}: must be an object`);
18653
+ return issues;
18654
+ }
18655
+ const shadows = raw.shadows;
18656
+ if (shadows !== null && typeof shadows === "object" && !Array.isArray(shadows)) {
18657
+ for (const [name, token] of Object.entries(shadows)) {
18658
+ const value = token?.color;
18659
+ if (value === void 0) continue;
18660
+ if (typeof value === "string" && isCanonicalHex(value)) continue;
18661
+ const suggestion = typeof value === "string" ? canonicalHex(value) : void 0;
18662
+ const shown2 = typeof value === "string" ? value : JSON.stringify(value) ?? String(value);
18663
+ error(
18664
+ `${tokensPath}: shadows.${name}.color is ${shown2} \u2014 the native runtimes parse only #RRGGBB or #RRGGBBAA` + (suggestion ? `. Write ${suggestion}.` : `, and this value names no colour that can be converted for you. Write the hex it should be.`)
18665
+ );
18666
+ }
18667
+ }
18668
+ const colors = raw.colors;
18669
+ if (colors === void 0) return issues;
18670
+ if (colors === null || typeof colors !== "object" || Array.isArray(colors)) {
18671
+ error(`${tokensPath}: "colors" must be an object of { "<token>": "#RRGGBB" | { "<variant>": "#RRGGBB" } }`);
18672
+ return issues;
18673
+ }
18674
+ for (const problem of tokenColorProblems(colors)) {
18675
+ error(
18676
+ `${tokensPath}: colors.${problem.path} is ${problem.value} \u2014 the native runtimes parse only #RRGGBB or #RRGGBBAA` + (problem.suggestion ? `. Write ${problem.suggestion}.` : `, and this value names no colour that can be converted for you. Write the hex it should be.`)
18677
+ );
18678
+ }
18679
+ return issues;
18680
+ }
18681
+ var init_token_lint = __esm({
18682
+ "src/token-lint.ts"() {
18683
+ init_token_colors();
18684
+ }
18685
+ });
18686
+
18612
18687
  // ../app-icons/glyphs.ts
18613
18688
  function shade(hex2, f) {
18614
18689
  const n = parseInt(hex2.slice(1), 16);
@@ -20014,7 +20089,7 @@ function listReport(opts = {}) {
20014
20089
  return { ok: true, count: families.length, totalBytes, families };
20015
20090
  }
20016
20091
  function fontFindings(appDir2) {
20017
- const tokensPath = join23(appDir2, "tokens.json");
20092
+ const tokensPath = join23(appDir2, configuredTokensPath(appDir2).path ?? "tokens.json");
20018
20093
  if (!existsSync19(tokensPath)) return null;
20019
20094
  const catalog = loadCatalog();
20020
20095
  const tokens = readJson(tokensPath, {});
@@ -20049,7 +20124,8 @@ function fontFindings(appDir2) {
20049
20124
  function checkReport(appDir2) {
20050
20125
  const result = fontFindings(appDir2);
20051
20126
  if (!result) {
20052
- return { ok: false, count: 0, totalBytes: 0, problems: [`${appDir2}: no tokens.json`], hint: "run inside an app directory" };
20127
+ const looked = configuredTokensPath(appDir2).path ?? "tokens.json";
20128
+ return { ok: false, count: 0, totalBytes: 0, problems: [`${appDir2}: no ${looked}`], hint: "run inside an app directory" };
20053
20129
  }
20054
20130
  const { plan, findings } = result;
20055
20131
  const catalog = loadCatalog();
@@ -20113,6 +20189,7 @@ var init_fonts = __esm({
20113
20189
  init_catalog();
20114
20190
  init_plan_fonts();
20115
20191
  init_face_source();
20192
+ init_token_lint();
20116
20193
  DEFAULT_ASSET_BUDGET_BYTES = 32 * 1024 * 1024;
20117
20194
  }
20118
20195
  });
@@ -41086,6 +41163,15 @@ async function buildFromLoaded(preloaded, dest, opts = {}) {
41086
41163
  baked.push({
41087
41164
  screenId,
41088
41165
  descriptor: JSON.parse(json5),
41166
+ // The EXACT baked bytes, exactly as the exact-screen path hands
41167
+ // them over. Omitting them did not degrade the crawl quietly — it
41168
+ // took out the native-decode oracle for the whole app, which
41169
+ // refuses to judge a screen whose baked bytes it was not given
41170
+ // ("the release builder did not return its exact baked JSON
41171
+ // bytes") and throws rather than skipping. So one templated route
41172
+ // anywhere in an app meant `himi test --native` reported nothing
41173
+ // for ANY of its screens.
41174
+ descriptorJson: json5,
41089
41175
  bundleName,
41090
41176
  bundleJs: bundleName ? readBuiltBundle(tier5Dir, bundleName) ?? null : null,
41091
41177
  ...bundleMapFor(tier5Dir, bundleName ?? void 0)
@@ -59814,76 +59900,8 @@ function readLocalPlatforms(dir) {
59814
59900
  }
59815
59901
  }
59816
59902
 
59817
- // src/token-lint.ts
59818
- init_token_colors();
59819
- import { existsSync as existsSync13, readFileSync as readFileSync16 } from "node:fs";
59820
- import { join as join17 } from "node:path";
59821
- function configuredTokensPath(dir) {
59822
- for (const name of ["config.ts", "config.js", "himi.config.ts"]) {
59823
- const f = join17(dir, name);
59824
- if (!existsSync13(f)) continue;
59825
- const src = readFileSync16(f, "utf8");
59826
- const m = /designTokensPath\s*:\s*["'`]([^"'`]+)["'`]/.exec(src);
59827
- if (m) return { path: m[1].replace(/^\.\//, "") };
59828
- if (/designTokensPath\s*:/.test(src)) return { computed: true };
59829
- }
59830
- return {};
59831
- }
59832
- function tokenColorIssues(dir, tokensPathOverride) {
59833
- const issues = [];
59834
- const error = (message) => issues.push({ screen: null, pass: "tokens", severity: "error", message });
59835
- const warn = (message) => issues.push({ screen: null, pass: "tokens", severity: "warning", message });
59836
- const configured = tokensPathOverride ? { path: tokensPathOverride } : configuredTokensPath(dir);
59837
- if (configured.computed) {
59838
- warn(
59839
- "config designTokensPath is a computed expression, so this pass cannot tell which file holds the palette -- only tokens.json was checked"
59840
- );
59841
- }
59842
- const tokensPath = configured.path ?? "tokens.json";
59843
- const p = join17(dir, tokensPath);
59844
- if (!existsSync13(p)) {
59845
- if (tokensPath !== "tokens.json") {
59846
- warn(`config designTokensPath points at ${tokensPath}, which does not exist -- colour tokens were not checked`);
59847
- }
59848
- return issues;
59849
- }
59850
- let raw;
59851
- try {
59852
- raw = JSON.parse(readFileSync16(p, "utf8"));
59853
- } catch (e) {
59854
- error(`${tokensPath}: unparsable JSON \u2014 ${e.message}`);
59855
- return issues;
59856
- }
59857
- if (raw === null || typeof raw !== "object" || Array.isArray(raw)) {
59858
- error(`${tokensPath}: must be an object`);
59859
- return issues;
59860
- }
59861
- const shadows = raw.shadows;
59862
- if (shadows !== null && typeof shadows === "object" && !Array.isArray(shadows)) {
59863
- for (const [name, token] of Object.entries(shadows)) {
59864
- const value = token?.color;
59865
- if (value === void 0) continue;
59866
- if (typeof value === "string" && isCanonicalHex(value)) continue;
59867
- const suggestion = typeof value === "string" ? canonicalHex(value) : void 0;
59868
- const shown2 = typeof value === "string" ? value : JSON.stringify(value) ?? String(value);
59869
- error(
59870
- `${tokensPath}: shadows.${name}.color is ${shown2} \u2014 the native runtimes parse only #RRGGBB or #RRGGBBAA` + (suggestion ? `. Write ${suggestion}.` : `, and this value names no colour that can be converted for you. Write the hex it should be.`)
59871
- );
59872
- }
59873
- }
59874
- const colors = raw.colors;
59875
- if (colors === void 0) return issues;
59876
- if (colors === null || typeof colors !== "object" || Array.isArray(colors)) {
59877
- error(`${tokensPath}: "colors" must be an object of { "<token>": "#RRGGBB" | { "<variant>": "#RRGGBB" } }`);
59878
- return issues;
59879
- }
59880
- for (const problem of tokenColorProblems(colors)) {
59881
- error(
59882
- `${tokensPath}: colors.${problem.path} is ${problem.value} \u2014 the native runtimes parse only #RRGGBB or #RRGGBBAA` + (problem.suggestion ? `. Write ${problem.suggestion}.` : `, and this value names no colour that can be converted for you. Write the hex it should be.`)
59883
- );
59884
- }
59885
- return issues;
59886
- }
59903
+ // src/cli.ts
59904
+ init_token_lint();
59887
59905
 
59888
59906
  // src/icon-lint.ts
59889
59907
  init_icon();
@@ -61806,7 +61824,25 @@ himi v${cliVersion()} \u2014 run \`himi --version\`. If authoring commands fail
61806
61824
  ...hasWorkers ? { tier5Dir: bundleOutDir2(buildDir) } : {},
61807
61825
  collect: { lint: true, strict }
61808
61826
  });
61809
- const { report, hasErrors } = summarizeLint(app, bres, outcome, strict);
61827
+ const scaffoldSourceFindings = resolve40(sourceDir) === resolve40(appDir2) ? [] : [
61828
+ ...tokenColorIssues(sourceDir),
61829
+ ...surfaceIssues(sourceDir, void 0, strict),
61830
+ ...fontIssues(sourceDir, strict),
61831
+ ...storesV1Issues(sourceDir, strict)
61832
+ ].map((issue2) => ({
61833
+ ...issue2,
61834
+ // Say WHICH tree. The same message against two trees means two different fixes,
61835
+ // and the scaffold source is the one the author is least likely to be looking at.
61836
+ message: `scaffold source (--source-dir ${sourceDir}): ${issue2.message}`
61837
+ }));
61838
+ const { report, hasErrors } = summarizeLint(app, bres, outcome, strict, [
61839
+ ...await cmsIssues(buildDir, app, strict, { local: true }),
61840
+ ...surfaceIssues(buildDir, outcome.surfaceNav, strict),
61841
+ ...tokenColorIssues(buildDir),
61842
+ ...fontIssues(buildDir, strict),
61843
+ ...storesV1Issues(buildDir, strict),
61844
+ ...scaffoldSourceFindings
61845
+ ]);
61810
61846
  if (hasErrors && !force) {
61811
61847
  print({ ...report, published: false, hint: "lint found errors \u2014 fix them, or re-run with --force to publish anyway" });
61812
61848
  return 1;
@@ -27,6 +27,15 @@ areas, always in the same order, so you can skim for the one you care about.
27
27
  (`String(p?.value ?? p?.text ?? "")`) is still the safe way to read a payload. The divergence is
28
28
  documented and held from growing, not fixed — no renderer's behaviour changed. (#2462)
29
29
 
30
+ ### Validate & test
31
+
32
+ - **`himi test --native ios` works again for any app with a detail route.** The release builder
33
+ handed the decode oracle every screen's exact baked bytes except for the screens it materializes
34
+ from a templated route, and the oracle refuses to judge a screen whose bytes it was not given —
35
+ so one detail route anywhere in an app took out native decode for the whole app. Owner Lite went
36
+ from reporting zero of its 99 descriptors to decoding all 99. If you have been seeing "the
37
+ release builder did not return its exact baked JSON bytes", that was this. (#2520)
38
+
30
39
  ### Preview, push & release
31
40
 
32
41
  - **A `.himi` package can carry your app's source, so the whole codebase travels as one file.**
@@ -36,6 +45,16 @@ areas, always in the same order, so you can skim for the one you care about.
36
45
  copy of the one it came from. Plain `himi pack` is unchanged and still ships built output only;
37
46
  a source-carrying package is always labelled, and the web host will not open one. (#2448)
38
47
 
48
+ ### Branded Lite & Owner Lite
49
+
50
+ - **An Aria action link can no longer claim to go to Wix when it does not.** Owner Lite already
51
+ appended the destination host to a link leaving Wix, because both the label and the url in a
52
+ reply are model output and nothing makes them agree. Three url shapes defeated that check and
53
+ rendered with no host at all — most simply, a backslash, which the url standard treats as ending
54
+ the authority but the check did not. Those links now disclose where they go, and a url whose
55
+ destination cannot be established at all is labelled as unknown rather than trusted. Links are
56
+ still never rewritten or dropped. (#2520)
57
+
39
58
  ## 2026-09-17
40
59
 
41
60
  ### Getting started & the CLI
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.843.0",
3
+ "version": "0.845.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": [
@@ -63,5 +63,5 @@
63
63
  "artifactId": "himalaya-cli"
64
64
  }
65
65
  },
66
- "falconPackageHash": "8b2f654400348b18a463a7765085ddd68af86fb362f28e1c926ee25a"
66
+ "falconPackageHash": "bdc0bc58bddca320ea203b35d6e99e38e85596fb173f88cac3404b38"
67
67
  }