@wix/himalaya-cli 0.1538.0 → 0.1540.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 (151) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/builder.d.ts +5 -0
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/state/src/index.d.ts +7 -0
  3. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/schema.d.ts +7 -0
  4. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/stores-v1/src/display.d.ts +4 -0
  5. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/state.mjs +23 -0
  6. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-events.mjs +1 -0
  7. package/dist/cli.mjs +2184 -1825
  8. package/dist/preview-assets.generated.bin +0 -0
  9. package/guides/component-reference.json +29 -42
  10. package/guides/component-reference.md +67 -14
  11. package/guides/dynamic-list.service.ts +7 -1
  12. package/guides/form-submit.service.ts +7 -1
  13. package/guides/himi-json-output.md +7 -0
  14. package/guides/index.json +2 -2
  15. package/guides/recipe-four-state.md +10 -1
  16. package/guides/recipe-search.md +9 -7
  17. package/guides/release-notes.md +17 -0
  18. package/guides/sdk-reference.json +966 -46
  19. package/guides/search-list.service.ts +7 -1
  20. package/guides/templates.md +19 -0
  21. package/package.json +2 -2
  22. package/stdlib/design-kits/dark-luxe.json +4 -0
  23. package/templates/beauty-salon/dev/index.ts +5021 -4164
  24. package/templates/beauty-salon/tier5-src/_shared/collection-contract.ts +9 -3
  25. package/templates/beauty-salon/tier5-src/_shared/collection-service.ts +6 -3
  26. package/templates/beauty-salon/tier5-src/_shared/engine-intl.ts +5 -2
  27. package/templates/beauty-salon/tier5-src/_shared/himi-store-categories.ts +18 -12
  28. package/templates/beauty-salon/tier5-src/_shared/store-order-presentation.ts +56 -0
  29. package/templates/beauty-salon/tier5-src/_shared/wix-service-price.ts +4 -2
  30. package/templates/beauty-salon/tier5-src/himi-branded-lite-category/index.ts +196 -0
  31. package/templates/beauty-salon/tier5-src/himi-branded-lite-order/index.ts +29 -6
  32. package/templates/beauty-salon/tier5-src/himi-branded-lite-orders/index.ts +58 -5
  33. package/templates/beauty-salon/tier5-src/wix-spaces-collections/index.ts +37 -88
  34. package/templates/beauty-salon-owner/tier5-src/_shared/collection-contract.ts +9 -3
  35. package/templates/beauty-salon-owner/tier5-src/_shared/collection-service.ts +6 -3
  36. package/templates/beauty-salon-owner/tier5-src/_shared/engine-intl.ts +5 -2
  37. package/templates/branded-lite/dev/index.ts +4933 -4079
  38. package/templates/branded-lite/tier5-src/_shared/collection-contract.ts +9 -3
  39. package/templates/branded-lite/tier5-src/_shared/collection-service.ts +6 -3
  40. package/templates/branded-lite/tier5-src/_shared/engine-intl.ts +5 -2
  41. package/templates/branded-lite/tier5-src/_shared/himi-store-categories.ts +18 -12
  42. package/templates/branded-lite/tier5-src/_shared/store-order-presentation.ts +56 -0
  43. package/templates/branded-lite/tier5-src/_shared/wix-service-price.ts +4 -2
  44. package/templates/branded-lite/tier5-src/himi-branded-lite-category/index.ts +196 -0
  45. package/templates/branded-lite/tier5-src/himi-branded-lite-order/index.ts +29 -6
  46. package/templates/branded-lite/tier5-src/himi-branded-lite-orders/index.ts +58 -5
  47. package/templates/branded-lite/tier5-src/wix-spaces-collections/index.ts +37 -88
  48. package/templates/branded-lite/tokens.json +1 -1
  49. package/templates/brandy/tokens.json +1 -1
  50. package/templates/community-club/tier5-src/_shared/collection-contract.ts +9 -3
  51. package/templates/community-club/tier5-src/_shared/collection-service.ts +6 -3
  52. package/templates/community-club/tier5-src/_shared/engine-intl.ts +5 -2
  53. package/templates/community-club/tier5-src/_shared/himi-store-categories.ts +18 -12
  54. package/templates/community-club/tier5-src/_shared/wix-service-price.ts +4 -2
  55. package/templates/community-club-owner/tier5-src/_shared/collection-contract.ts +9 -3
  56. package/templates/community-club-owner/tier5-src/_shared/collection-service.ts +6 -3
  57. package/templates/community-club-owner/tier5-src/_shared/engine-intl.ts +5 -2
  58. package/templates/events-meetups/tier5-src/_shared/collection-contract.ts +9 -3
  59. package/templates/events-meetups/tier5-src/_shared/collection-service.ts +6 -3
  60. package/templates/events-meetups/tier5-src/_shared/engine-intl.ts +5 -2
  61. package/templates/events-meetups/tier5-src/_shared/himi-store-categories.ts +18 -12
  62. package/templates/events-meetups/tier5-src/_shared/wix-service-price.ts +4 -2
  63. package/templates/events-meetups-owner/tier5-src/_shared/collection-contract.ts +9 -3
  64. package/templates/events-meetups-owner/tier5-src/_shared/collection-service.ts +6 -3
  65. package/templates/events-meetups-owner/tier5-src/_shared/engine-intl.ts +5 -2
  66. package/templates/gym-fitness/dev/index.ts +5018 -4161
  67. package/templates/gym-fitness/tier5-src/_shared/collection-contract.ts +9 -3
  68. package/templates/gym-fitness/tier5-src/_shared/collection-service.ts +6 -3
  69. package/templates/gym-fitness/tier5-src/_shared/engine-intl.ts +5 -2
  70. package/templates/gym-fitness/tier5-src/_shared/himi-store-categories.ts +18 -12
  71. package/templates/gym-fitness/tier5-src/_shared/store-order-presentation.ts +56 -0
  72. package/templates/gym-fitness/tier5-src/_shared/wix-service-price.ts +4 -2
  73. package/templates/gym-fitness/tier5-src/himi-branded-lite-category/index.ts +196 -0
  74. package/templates/gym-fitness/tier5-src/himi-branded-lite-order/index.ts +29 -6
  75. package/templates/gym-fitness/tier5-src/himi-branded-lite-orders/index.ts +58 -5
  76. package/templates/gym-fitness/tier5-src/wix-spaces-collections/index.ts +37 -88
  77. package/templates/gym-fitness-owner/tier5-src/_shared/collection-contract.ts +9 -3
  78. package/templates/gym-fitness-owner/tier5-src/_shared/collection-service.ts +6 -3
  79. package/templates/gym-fitness-owner/tier5-src/_shared/engine-intl.ts +5 -2
  80. package/templates/nonprofit-cause/tier5-src/_shared/collection-contract.ts +9 -3
  81. package/templates/nonprofit-cause/tier5-src/_shared/collection-service.ts +6 -3
  82. package/templates/nonprofit-cause/tier5-src/_shared/engine-intl.ts +5 -2
  83. package/templates/nonprofit-cause/tier5-src/_shared/himi-store-categories.ts +18 -12
  84. package/templates/nonprofit-cause/tier5-src/_shared/wix-service-price.ts +4 -2
  85. package/templates/nonprofit-cause-owner/tier5-src/_shared/collection-contract.ts +9 -3
  86. package/templates/nonprofit-cause-owner/tier5-src/_shared/collection-service.ts +6 -3
  87. package/templates/nonprofit-cause-owner/tier5-src/_shared/engine-intl.ts +5 -2
  88. package/templates/owner-lite/tier5-src/_shared/collection-contract.ts +9 -3
  89. package/templates/owner-lite/tier5-src/_shared/collection-service.ts +6 -3
  90. package/templates/owner-lite/tier5-src/_shared/engine-intl.ts +5 -2
  91. package/templates/podcast-creator/tier5-src/_shared/collection-contract.ts +9 -3
  92. package/templates/podcast-creator/tier5-src/_shared/collection-service.ts +6 -3
  93. package/templates/podcast-creator/tier5-src/_shared/engine-intl.ts +5 -2
  94. package/templates/podcast-creator/tier5-src/_shared/himi-store-categories.ts +18 -12
  95. package/templates/podcast-creator/tier5-src/_shared/wix-service-price.ts +4 -2
  96. package/templates/podcast-creator/tokens.json +4 -4
  97. package/templates/podcast-creator-owner/tier5-src/_shared/collection-contract.ts +9 -3
  98. package/templates/podcast-creator-owner/tier5-src/_shared/collection-service.ts +6 -3
  99. package/templates/podcast-creator-owner/tier5-src/_shared/engine-intl.ts +5 -2
  100. package/templates/podcast-creator-owner/tokens.json +4 -4
  101. package/templates/portfolio-creative/dev/index.ts +5017 -4157
  102. package/templates/portfolio-creative/tier5-src/_shared/collection-contract.ts +9 -3
  103. package/templates/portfolio-creative/tier5-src/_shared/collection-service.ts +6 -3
  104. package/templates/portfolio-creative/tier5-src/_shared/engine-intl.ts +5 -2
  105. package/templates/portfolio-creative/tier5-src/_shared/himi-store-categories.ts +18 -12
  106. package/templates/portfolio-creative/tier5-src/_shared/store-order-presentation.ts +56 -0
  107. package/templates/portfolio-creative/tier5-src/_shared/wix-service-price.ts +4 -2
  108. package/templates/portfolio-creative/tier5-src/himi-branded-lite-category/index.ts +196 -0
  109. package/templates/portfolio-creative/tier5-src/himi-branded-lite-order/index.ts +29 -6
  110. package/templates/portfolio-creative/tier5-src/himi-branded-lite-orders/index.ts +58 -5
  111. package/templates/portfolio-creative/tier5-src/wix-spaces-collections/index.ts +37 -88
  112. package/templates/portfolio-creative-owner/tier5-src/_shared/collection-contract.ts +9 -3
  113. package/templates/portfolio-creative-owner/tier5-src/_shared/collection-service.ts +6 -3
  114. package/templates/portfolio-creative-owner/tier5-src/_shared/engine-intl.ts +5 -2
  115. package/templates/restaurant/tier5-src/_shared/collection-contract.ts +9 -3
  116. package/templates/restaurant/tier5-src/_shared/collection-service.ts +6 -3
  117. package/templates/restaurant/tier5-src/_shared/engine-intl.ts +5 -2
  118. package/templates/restaurant/tier5-src/_shared/himi-store-categories.ts +18 -12
  119. package/templates/restaurant/tier5-src/_shared/wix-service-price.ts +4 -2
  120. package/templates/restaurant/tokens.json +4 -4
  121. package/templates/restaurant-owner/tier5-src/_shared/collection-contract.ts +9 -3
  122. package/templates/restaurant-owner/tier5-src/_shared/collection-service.ts +6 -3
  123. package/templates/restaurant-owner/tier5-src/_shared/engine-intl.ts +5 -2
  124. package/templates/retail-store/dev/index.ts +5159 -4302
  125. package/templates/retail-store/tier5-src/_shared/collection-contract.ts +9 -3
  126. package/templates/retail-store/tier5-src/_shared/collection-service.ts +6 -3
  127. package/templates/retail-store/tier5-src/_shared/engine-intl.ts +5 -2
  128. package/templates/retail-store/tier5-src/_shared/himi-store-categories.ts +18 -12
  129. package/templates/retail-store/tier5-src/_shared/store-order-presentation.ts +56 -0
  130. package/templates/retail-store/tier5-src/_shared/wix-service-price.ts +4 -2
  131. package/templates/retail-store/tier5-src/himi-branded-lite-category/index.ts +196 -0
  132. package/templates/retail-store/tier5-src/himi-branded-lite-order/index.ts +29 -6
  133. package/templates/retail-store/tier5-src/himi-branded-lite-orders/index.ts +58 -5
  134. package/templates/retail-store/tier5-src/wix-spaces-collections/index.ts +37 -88
  135. package/templates/retail-store-owner/tier5-src/_shared/collection-contract.ts +9 -3
  136. package/templates/retail-store-owner/tier5-src/_shared/collection-service.ts +6 -3
  137. package/templates/retail-store-owner/tier5-src/_shared/engine-intl.ts +5 -2
  138. package/templates/yoga-studio/dev/index.ts +0 -3
  139. package/templates/yoga-studio/tier5-src/_shared/collection-contract.ts +9 -3
  140. package/templates/yoga-studio/tier5-src/_shared/collection-service.ts +6 -3
  141. package/templates/yoga-studio/tier5-src/_shared/engine-intl.ts +5 -2
  142. package/templates/yoga-studio/tier5-src/_shared/himi-store-categories.ts +18 -12
  143. package/templates/yoga-studio/tier5-src/_shared/wix-service-price.ts +4 -2
  144. package/templates/yoga-studio-owner/tier5-src/_shared/collection-contract.ts +9 -3
  145. package/templates/yoga-studio-owner/tier5-src/_shared/collection-service.ts +6 -3
  146. package/templates/yoga-studio-owner/tier5-src/_shared/engine-intl.ts +5 -2
  147. package/templates/beauty-salon/tier5-src/wix-spaces-collection-detail/index.ts +0 -170
  148. package/templates/branded-lite/tier5-src/wix-spaces-collection-detail/index.ts +0 -170
  149. package/templates/gym-fitness/tier5-src/wix-spaces-collection-detail/index.ts +0 -170
  150. package/templates/portfolio-creative/tier5-src/wix-spaces-collection-detail/index.ts +0 -170
  151. package/templates/retail-store/tier5-src/wix-spaces-collection-detail/index.ts +0 -170
@@ -95,7 +95,11 @@ function shape(s: Partial<PostsState>): PostsState {
95
95
  // under `himi test` / `himi render`.
96
96
  const STATUS = /\b(?:HTTP|Wix) (\d{3})\b/;
97
97
  // No answer at all — what a dropped connection says on every platform.
98
- const TRANSPORT = /NSURLErrorDomain|(?:UnknownHost|Connect|SocketTimeout|NoRouteToHost|SSLHandshake)Exception|Failed to connect|Unable to resolve host|Connection (?:refused|reset)|Network is unreachable|Software caused connection abort|ECONNRESET|ETIMEDOUT|EPIPE|Broken pipe|stream was reset|unexpected end of stream|timed out|^timeout$|Failed to fetch|NetworkError|^(?:TypeError: )?Load failed$|net::ERR_|^[a-z0-9-]+(?:\.[a-z0-9-]+)+$/i;
98
+ const TRANSPORT = /(?:UnknownHost|Connect|NoRouteToHost|SSLHandshake)Exception|Unable to resolve host|Connection (?:refused|reset)|Network is unreachable|Software caused connection abort|ECONNRESET|EPIPE|Broken pipe|stream was reset|unexpected end of stream|Failed to fetch|NetworkError|^(?:TypeError: )?Load failed$|net::ERR_|^[a-z0-9-]+(?:\.[a-z0-9-]+)+$/i;
99
+ // iOS reports a URLError as `NSURLErrorDomain error <code>`: only the no-route codes are offline. A bad server
100
+ // response (-1011) or a timeout is a server problem, as in the SDK's classifyLoadError.
101
+ const URL_ERROR = /NSURLErrorDomain\D*?(-?\d{3,5})/;
102
+ const URL_OFFLINE = new Set([-1009, -1005, -1004, -1003, -1006, -1020]);
99
103
  // Android reports an unknown host as the bare hostname (`users.wix.com`) — hence the last form.
100
104
  // No session on the device: the native bridge refuses before any request leaves.
101
105
  // A pinned site with no member session: iOS `siteNotPermitted(requested: "account", …)`,
@@ -127,6 +131,8 @@ function classifyError(e: unknown, authState: "signedIn" | "signedOut" | "unknow
127
131
  ? /"detail"\s*:\s*"([^"]+)"/.exec(msg)?.[1] ?? msg
128
132
  : msg;
129
133
  if (status && detail === msg) return "server";
134
+ const urlCode = URL_ERROR.exec(detail)?.[1];
135
+ if (urlCode !== undefined) return URL_OFFLINE.has(Number(urlCode)) ? "offline" : "server";
130
136
  if (TRANSPORT.test(detail)) return "offline";
131
137
  return "server"; // anything else — a bug, a malformed row — is not the user's connection
132
138
  }
@@ -143,6 +143,25 @@ preview — the `clientId` **is** the site binding (no separate MSID field). Pla
143
143
  `YOUR_WIX_CLIENT_ID` are not a real backend. Monorepo / native binary path:
144
144
  [branded-lite-site-binding.md](branded-lite-site-binding.md).
145
145
 
146
+ ### Keep the copied `_shared` helpers current
147
+
148
+ `init` copies the platform helpers under `tier5-src/_shared/` once, and nothing updates them. An old
149
+ copy keeps compiling against a newer platform and can break a feature without an error (an old
150
+ `iap-presentation.ts` left a Buy button disabled). So every build compares each copy with the ones
151
+ the running CLI ships. `himi build` lists a mismatch under `warnings`; `validate`, `push` and `pack`
152
+ report it as one issue (`pass: "stale-shared"`, `ruleCode: "shared-file-differs"`, `files: [{path,
153
+ shipped, alsoCopy}]`) with severity `warning`, which `--strict` does not promote. (`push --only`
154
+ lists it under `warnings`; `template publish` runs the same lint but prints issues only when it
155
+ refuses.) The message names each file and prints
156
+ the command that refreshes it, plus any `_shared` file the shipped copy imports that your package
157
+ lacks. A copy that matches any template's variant counts as current; the refresh takes the variant of
158
+ the template `init` recorded in `.himi/init-source.json`, or else the one closest to your copy. Files
159
+ the CLI does not ship are yours and are not checked.
160
+
161
+ When you changed a helper on purpose, add a `// himi:forked` line to it and the check skips that
162
+ file; `himi template sweep` adds that line to any `_shared` file it rewrites. Nothing else records
163
+ which files you edited after `init`, so an unmarked edit and an old copy look the same.
164
+
146
165
  ## Publish your own
147
166
 
148
167
  Any himi app can *become* a template. Add a `himalaya.template.json` next to
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.1538.0",
3
+ "version": "0.1540.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": [
@@ -71,5 +71,5 @@
71
71
  "artifactId": "himalaya-cli"
72
72
  }
73
73
  },
74
- "falconPackageHash": "a1a15dbe939dfa2c63ef1cc4b38f88d026f5eda14efaf885d5c9aa84"
74
+ "falconPackageHash": "a1d4dc831a852d303dab5ab6d7d7c2eea37f28a6f0c949a4d2c1ce6f"
75
75
  }
@@ -32,6 +32,10 @@
32
32
  "light": "#101319",
33
33
  "dark": "#101319"
34
34
  },
35
+ "surfaceTertiary": {
36
+ "light": "#232834",
37
+ "dark": "#232834"
38
+ },
35
39
  "textPrimary": {
36
40
  "light": "#F1E9D2",
37
41
  "dark": "#F1E9D2"