@wix/himalaya-cli 0.1538.0 → 0.1539.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 (138) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/state/src/index.d.ts +7 -0
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/stores-v1/src/display.d.ts +4 -0
  3. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/state.mjs +23 -0
  4. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-events.mjs +1 -0
  5. package/dist/cli.mjs +3 -3
  6. package/guides/component-reference.json +24 -39
  7. package/guides/component-reference.md +59 -13
  8. package/guides/dynamic-list.service.ts +7 -1
  9. package/guides/form-submit.service.ts +7 -1
  10. package/guides/index.json +2 -2
  11. package/guides/recipe-four-state.md +10 -1
  12. package/guides/sdk-reference.json +966 -46
  13. package/guides/search-list.service.ts +7 -1
  14. package/package.json +2 -2
  15. package/templates/beauty-salon/dev/index.ts +5021 -4164
  16. package/templates/beauty-salon/tier5-src/_shared/collection-contract.ts +9 -3
  17. package/templates/beauty-salon/tier5-src/_shared/collection-service.ts +6 -3
  18. package/templates/beauty-salon/tier5-src/_shared/engine-intl.ts +5 -2
  19. package/templates/beauty-salon/tier5-src/_shared/himi-store-categories.ts +18 -12
  20. package/templates/beauty-salon/tier5-src/_shared/store-order-presentation.ts +56 -0
  21. package/templates/beauty-salon/tier5-src/_shared/wix-service-price.ts +4 -2
  22. package/templates/beauty-salon/tier5-src/himi-branded-lite-category/index.ts +196 -0
  23. package/templates/beauty-salon/tier5-src/himi-branded-lite-order/index.ts +29 -6
  24. package/templates/beauty-salon/tier5-src/himi-branded-lite-orders/index.ts +58 -5
  25. package/templates/beauty-salon/tier5-src/wix-spaces-collections/index.ts +37 -88
  26. package/templates/beauty-salon-owner/tier5-src/_shared/collection-contract.ts +9 -3
  27. package/templates/beauty-salon-owner/tier5-src/_shared/collection-service.ts +6 -3
  28. package/templates/beauty-salon-owner/tier5-src/_shared/engine-intl.ts +5 -2
  29. package/templates/branded-lite/dev/index.ts +4933 -4079
  30. package/templates/branded-lite/tier5-src/_shared/collection-contract.ts +9 -3
  31. package/templates/branded-lite/tier5-src/_shared/collection-service.ts +6 -3
  32. package/templates/branded-lite/tier5-src/_shared/engine-intl.ts +5 -2
  33. package/templates/branded-lite/tier5-src/_shared/himi-store-categories.ts +18 -12
  34. package/templates/branded-lite/tier5-src/_shared/store-order-presentation.ts +56 -0
  35. package/templates/branded-lite/tier5-src/_shared/wix-service-price.ts +4 -2
  36. package/templates/branded-lite/tier5-src/himi-branded-lite-category/index.ts +196 -0
  37. package/templates/branded-lite/tier5-src/himi-branded-lite-order/index.ts +29 -6
  38. package/templates/branded-lite/tier5-src/himi-branded-lite-orders/index.ts +58 -5
  39. package/templates/branded-lite/tier5-src/wix-spaces-collections/index.ts +37 -88
  40. package/templates/community-club/tier5-src/_shared/collection-contract.ts +9 -3
  41. package/templates/community-club/tier5-src/_shared/collection-service.ts +6 -3
  42. package/templates/community-club/tier5-src/_shared/engine-intl.ts +5 -2
  43. package/templates/community-club/tier5-src/_shared/himi-store-categories.ts +18 -12
  44. package/templates/community-club/tier5-src/_shared/wix-service-price.ts +4 -2
  45. package/templates/community-club-owner/tier5-src/_shared/collection-contract.ts +9 -3
  46. package/templates/community-club-owner/tier5-src/_shared/collection-service.ts +6 -3
  47. package/templates/community-club-owner/tier5-src/_shared/engine-intl.ts +5 -2
  48. package/templates/events-meetups/tier5-src/_shared/collection-contract.ts +9 -3
  49. package/templates/events-meetups/tier5-src/_shared/collection-service.ts +6 -3
  50. package/templates/events-meetups/tier5-src/_shared/engine-intl.ts +5 -2
  51. package/templates/events-meetups/tier5-src/_shared/himi-store-categories.ts +18 -12
  52. package/templates/events-meetups/tier5-src/_shared/wix-service-price.ts +4 -2
  53. package/templates/events-meetups-owner/tier5-src/_shared/collection-contract.ts +9 -3
  54. package/templates/events-meetups-owner/tier5-src/_shared/collection-service.ts +6 -3
  55. package/templates/events-meetups-owner/tier5-src/_shared/engine-intl.ts +5 -2
  56. package/templates/gym-fitness/dev/index.ts +5018 -4161
  57. package/templates/gym-fitness/tier5-src/_shared/collection-contract.ts +9 -3
  58. package/templates/gym-fitness/tier5-src/_shared/collection-service.ts +6 -3
  59. package/templates/gym-fitness/tier5-src/_shared/engine-intl.ts +5 -2
  60. package/templates/gym-fitness/tier5-src/_shared/himi-store-categories.ts +18 -12
  61. package/templates/gym-fitness/tier5-src/_shared/store-order-presentation.ts +56 -0
  62. package/templates/gym-fitness/tier5-src/_shared/wix-service-price.ts +4 -2
  63. package/templates/gym-fitness/tier5-src/himi-branded-lite-category/index.ts +196 -0
  64. package/templates/gym-fitness/tier5-src/himi-branded-lite-order/index.ts +29 -6
  65. package/templates/gym-fitness/tier5-src/himi-branded-lite-orders/index.ts +58 -5
  66. package/templates/gym-fitness/tier5-src/wix-spaces-collections/index.ts +37 -88
  67. package/templates/gym-fitness-owner/tier5-src/_shared/collection-contract.ts +9 -3
  68. package/templates/gym-fitness-owner/tier5-src/_shared/collection-service.ts +6 -3
  69. package/templates/gym-fitness-owner/tier5-src/_shared/engine-intl.ts +5 -2
  70. package/templates/nonprofit-cause/tier5-src/_shared/collection-contract.ts +9 -3
  71. package/templates/nonprofit-cause/tier5-src/_shared/collection-service.ts +6 -3
  72. package/templates/nonprofit-cause/tier5-src/_shared/engine-intl.ts +5 -2
  73. package/templates/nonprofit-cause/tier5-src/_shared/himi-store-categories.ts +18 -12
  74. package/templates/nonprofit-cause/tier5-src/_shared/wix-service-price.ts +4 -2
  75. package/templates/nonprofit-cause-owner/tier5-src/_shared/collection-contract.ts +9 -3
  76. package/templates/nonprofit-cause-owner/tier5-src/_shared/collection-service.ts +6 -3
  77. package/templates/nonprofit-cause-owner/tier5-src/_shared/engine-intl.ts +5 -2
  78. package/templates/owner-lite/tier5-src/_shared/collection-contract.ts +9 -3
  79. package/templates/owner-lite/tier5-src/_shared/collection-service.ts +6 -3
  80. package/templates/owner-lite/tier5-src/_shared/engine-intl.ts +5 -2
  81. package/templates/podcast-creator/tier5-src/_shared/collection-contract.ts +9 -3
  82. package/templates/podcast-creator/tier5-src/_shared/collection-service.ts +6 -3
  83. package/templates/podcast-creator/tier5-src/_shared/engine-intl.ts +5 -2
  84. package/templates/podcast-creator/tier5-src/_shared/himi-store-categories.ts +18 -12
  85. package/templates/podcast-creator/tier5-src/_shared/wix-service-price.ts +4 -2
  86. package/templates/podcast-creator-owner/tier5-src/_shared/collection-contract.ts +9 -3
  87. package/templates/podcast-creator-owner/tier5-src/_shared/collection-service.ts +6 -3
  88. package/templates/podcast-creator-owner/tier5-src/_shared/engine-intl.ts +5 -2
  89. package/templates/portfolio-creative/dev/index.ts +5017 -4157
  90. package/templates/portfolio-creative/tier5-src/_shared/collection-contract.ts +9 -3
  91. package/templates/portfolio-creative/tier5-src/_shared/collection-service.ts +6 -3
  92. package/templates/portfolio-creative/tier5-src/_shared/engine-intl.ts +5 -2
  93. package/templates/portfolio-creative/tier5-src/_shared/himi-store-categories.ts +18 -12
  94. package/templates/portfolio-creative/tier5-src/_shared/store-order-presentation.ts +56 -0
  95. package/templates/portfolio-creative/tier5-src/_shared/wix-service-price.ts +4 -2
  96. package/templates/portfolio-creative/tier5-src/himi-branded-lite-category/index.ts +196 -0
  97. package/templates/portfolio-creative/tier5-src/himi-branded-lite-order/index.ts +29 -6
  98. package/templates/portfolio-creative/tier5-src/himi-branded-lite-orders/index.ts +58 -5
  99. package/templates/portfolio-creative/tier5-src/wix-spaces-collections/index.ts +37 -88
  100. package/templates/portfolio-creative-owner/tier5-src/_shared/collection-contract.ts +9 -3
  101. package/templates/portfolio-creative-owner/tier5-src/_shared/collection-service.ts +6 -3
  102. package/templates/portfolio-creative-owner/tier5-src/_shared/engine-intl.ts +5 -2
  103. package/templates/restaurant/tier5-src/_shared/collection-contract.ts +9 -3
  104. package/templates/restaurant/tier5-src/_shared/collection-service.ts +6 -3
  105. package/templates/restaurant/tier5-src/_shared/engine-intl.ts +5 -2
  106. package/templates/restaurant/tier5-src/_shared/himi-store-categories.ts +18 -12
  107. package/templates/restaurant/tier5-src/_shared/wix-service-price.ts +4 -2
  108. package/templates/restaurant-owner/tier5-src/_shared/collection-contract.ts +9 -3
  109. package/templates/restaurant-owner/tier5-src/_shared/collection-service.ts +6 -3
  110. package/templates/restaurant-owner/tier5-src/_shared/engine-intl.ts +5 -2
  111. package/templates/retail-store/dev/index.ts +5159 -4302
  112. package/templates/retail-store/tier5-src/_shared/collection-contract.ts +9 -3
  113. package/templates/retail-store/tier5-src/_shared/collection-service.ts +6 -3
  114. package/templates/retail-store/tier5-src/_shared/engine-intl.ts +5 -2
  115. package/templates/retail-store/tier5-src/_shared/himi-store-categories.ts +18 -12
  116. package/templates/retail-store/tier5-src/_shared/store-order-presentation.ts +56 -0
  117. package/templates/retail-store/tier5-src/_shared/wix-service-price.ts +4 -2
  118. package/templates/retail-store/tier5-src/himi-branded-lite-category/index.ts +196 -0
  119. package/templates/retail-store/tier5-src/himi-branded-lite-order/index.ts +29 -6
  120. package/templates/retail-store/tier5-src/himi-branded-lite-orders/index.ts +58 -5
  121. package/templates/retail-store/tier5-src/wix-spaces-collections/index.ts +37 -88
  122. package/templates/retail-store-owner/tier5-src/_shared/collection-contract.ts +9 -3
  123. package/templates/retail-store-owner/tier5-src/_shared/collection-service.ts +6 -3
  124. package/templates/retail-store-owner/tier5-src/_shared/engine-intl.ts +5 -2
  125. package/templates/yoga-studio/dev/index.ts +0 -3
  126. package/templates/yoga-studio/tier5-src/_shared/collection-contract.ts +9 -3
  127. package/templates/yoga-studio/tier5-src/_shared/collection-service.ts +6 -3
  128. package/templates/yoga-studio/tier5-src/_shared/engine-intl.ts +5 -2
  129. package/templates/yoga-studio/tier5-src/_shared/himi-store-categories.ts +18 -12
  130. package/templates/yoga-studio/tier5-src/_shared/wix-service-price.ts +4 -2
  131. package/templates/yoga-studio-owner/tier5-src/_shared/collection-contract.ts +9 -3
  132. package/templates/yoga-studio-owner/tier5-src/_shared/collection-service.ts +6 -3
  133. package/templates/yoga-studio-owner/tier5-src/_shared/engine-intl.ts +5 -2
  134. package/templates/beauty-salon/tier5-src/wix-spaces-collection-detail/index.ts +0 -170
  135. package/templates/branded-lite/tier5-src/wix-spaces-collection-detail/index.ts +0 -170
  136. package/templates/gym-fitness/tier5-src/wix-spaces-collection-detail/index.ts +0 -170
  137. package/templates/portfolio-creative/tier5-src/wix-spaces-collection-detail/index.ts +0 -170
  138. 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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.1538.0",
3
+ "version": "0.1539.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": "cf2aec518d6f8738d5ae5bc0969628fe4258bf6977f4621442bbd5d4"
75
75
  }