@wix/himalaya-cli 0.1526.0 → 0.1528.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 (142) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/state/src/connectivity.d.ts +5 -0
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/state/src/index.d.ts +1 -0
  3. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/state.mjs +14 -0
  4. package/dist/cli.mjs +3633 -3260
  5. package/dist/preview-assets.generated.bin +0 -0
  6. package/guides/himi-json-output.md +45 -0
  7. package/guides/himi-mcp.md +41 -0
  8. package/guides/himi-test.md +3 -3
  9. package/guides/iap-products.md +88 -23
  10. package/package.json +2 -2
  11. package/templates/beauty-salon/dev/index.ts +2027 -759
  12. package/templates/beauty-salon/tier5-src/_shared/collection-service.ts +5 -1
  13. package/templates/beauty-salon/tier5-src/_shared/online-actions.ts +76 -0
  14. package/templates/beauty-salon/tier5-src/himi-booking-bookings/index.ts +1 -0
  15. package/templates/beauty-salon/tier5-src/himi-booking-time/index.ts +803 -284
  16. package/templates/beauty-salon/tier5-src/himi-branded-lite-address/index.ts +3 -1
  17. package/templates/beauty-salon/tier5-src/himi-branded-lite-addresses/index.ts +3 -1
  18. package/templates/beauty-salon/tier5-src/himi-branded-lite-cart/index.ts +3 -0
  19. package/templates/beauty-salon/tier5-src/himi-branded-lite-order/index.ts +3 -1
  20. package/templates/beauty-salon/tier5-src/himi-branded-lite-plans/index.ts +13 -1
  21. package/templates/beauty-salon/tier5-src/himi-branded-lite-wallet/index.ts +3 -1
  22. package/templates/beauty-salon/tier5-src/himi-store-product/index.ts +10 -4
  23. package/templates/beauty-salon-owner/tier5-src/_shared/collection-service.ts +5 -1
  24. package/templates/beauty-salon-owner/tier5-src/_shared/online-actions.ts +76 -0
  25. package/templates/branded-lite/dev/index.ts +1910 -603
  26. package/templates/branded-lite/tier5-src/_shared/collection-service.ts +5 -1
  27. package/templates/branded-lite/tier5-src/_shared/online-actions.ts +76 -0
  28. package/templates/branded-lite/tier5-src/himi-booking-bookings/index.ts +1 -0
  29. package/templates/branded-lite/tier5-src/himi-booking-time/index.ts +803 -284
  30. package/templates/branded-lite/tier5-src/himi-branded-lite-address/index.ts +3 -1
  31. package/templates/branded-lite/tier5-src/himi-branded-lite-addresses/index.ts +3 -1
  32. package/templates/branded-lite/tier5-src/himi-branded-lite-cart/index.ts +3 -0
  33. package/templates/branded-lite/tier5-src/himi-branded-lite-feed/index.ts +3 -1
  34. package/templates/branded-lite/tier5-src/himi-branded-lite-group/index.ts +3 -1
  35. package/templates/branded-lite/tier5-src/himi-branded-lite-notifications/index.ts +6 -4
  36. package/templates/branded-lite/tier5-src/himi-branded-lite-notifsettings/index.ts +6 -4
  37. package/templates/branded-lite/tier5-src/himi-branded-lite-order/index.ts +3 -1
  38. package/templates/branded-lite/tier5-src/himi-branded-lite-plans/index.ts +13 -1
  39. package/templates/branded-lite/tier5-src/himi-branded-lite-program/index.ts +3 -1
  40. package/templates/branded-lite/tier5-src/himi-branded-lite-reservations/index.ts +6 -4
  41. package/templates/branded-lite/tier5-src/himi-branded-lite-reserve/index.ts +3 -1
  42. package/templates/branded-lite/tier5-src/himi-branded-lite-wallet/index.ts +3 -1
  43. package/templates/branded-lite/tier5-src/himi-events-detail/index.ts +8 -1
  44. package/templates/branded-lite/tier5-src/himi-events-rsvp/index.ts +7 -4
  45. package/templates/branded-lite/tier5-src/himi-store-product/index.ts +10 -4
  46. package/templates/community-club/tier5-src/_shared/collection-service.ts +5 -1
  47. package/templates/community-club/tier5-src/_shared/online-actions.ts +76 -0
  48. package/templates/community-club/tier5-src/himi-branded-lite-feed/index.ts +3 -1
  49. package/templates/community-club/tier5-src/himi-branded-lite-group/index.ts +3 -1
  50. package/templates/community-club/tier5-src/himi-events-detail/index.ts +8 -1
  51. package/templates/community-club/tier5-src/himi-events-rsvp/index.ts +7 -4
  52. package/templates/community-club-owner/tier5-src/_shared/collection-service.ts +5 -1
  53. package/templates/community-club-owner/tier5-src/_shared/online-actions.ts +76 -0
  54. package/templates/events-meetups/tier5-src/_shared/collection-service.ts +5 -1
  55. package/templates/events-meetups/tier5-src/_shared/online-actions.ts +76 -0
  56. package/templates/events-meetups/tier5-src/himi-branded-lite-feed/index.ts +3 -1
  57. package/templates/events-meetups/tier5-src/himi-branded-lite-group/index.ts +3 -1
  58. package/templates/events-meetups/tier5-src/himi-events-detail/index.ts +8 -1
  59. package/templates/events-meetups/tier5-src/himi-events-rsvp/index.ts +7 -4
  60. package/templates/events-meetups-owner/tier5-src/_shared/collection-service.ts +5 -1
  61. package/templates/events-meetups-owner/tier5-src/_shared/online-actions.ts +76 -0
  62. package/templates/gym-fitness/dev/index.ts +2024 -756
  63. package/templates/gym-fitness/tier5-src/_shared/collection-service.ts +5 -1
  64. package/templates/gym-fitness/tier5-src/_shared/online-actions.ts +76 -0
  65. package/templates/gym-fitness/tier5-src/himi-booking-bookings/index.ts +1 -0
  66. package/templates/gym-fitness/tier5-src/himi-booking-time/index.ts +803 -284
  67. package/templates/gym-fitness/tier5-src/himi-branded-lite-address/index.ts +3 -1
  68. package/templates/gym-fitness/tier5-src/himi-branded-lite-addresses/index.ts +3 -1
  69. package/templates/gym-fitness/tier5-src/himi-branded-lite-cart/index.ts +3 -0
  70. package/templates/gym-fitness/tier5-src/himi-branded-lite-order/index.ts +3 -1
  71. package/templates/gym-fitness/tier5-src/himi-branded-lite-plans/index.ts +13 -1
  72. package/templates/gym-fitness/tier5-src/himi-branded-lite-wallet/index.ts +3 -1
  73. package/templates/gym-fitness/tier5-src/himi-events-detail/index.ts +8 -1
  74. package/templates/gym-fitness/tier5-src/himi-events-rsvp/index.ts +7 -4
  75. package/templates/gym-fitness/tier5-src/himi-store-product/index.ts +10 -4
  76. package/templates/gym-fitness-owner/tier5-src/_shared/collection-service.ts +5 -1
  77. package/templates/gym-fitness-owner/tier5-src/_shared/online-actions.ts +76 -0
  78. package/templates/nonprofit-cause/tier5-src/_shared/collection-service.ts +5 -1
  79. package/templates/nonprofit-cause/tier5-src/_shared/online-actions.ts +76 -0
  80. package/templates/nonprofit-cause/tier5-src/himi-branded-lite-feed/index.ts +3 -1
  81. package/templates/nonprofit-cause/tier5-src/himi-branded-lite-group/index.ts +3 -1
  82. package/templates/nonprofit-cause/tier5-src/himi-branded-lite-plans/index.ts +13 -1
  83. package/templates/nonprofit-cause/tier5-src/himi-branded-lite-wallet/index.ts +3 -1
  84. package/templates/nonprofit-cause/tier5-src/himi-events-detail/index.ts +8 -1
  85. package/templates/nonprofit-cause/tier5-src/himi-events-rsvp/index.ts +7 -4
  86. package/templates/nonprofit-cause-owner/tier5-src/_shared/collection-service.ts +5 -1
  87. package/templates/nonprofit-cause-owner/tier5-src/_shared/online-actions.ts +76 -0
  88. package/templates/owner-lite/tier5-src/_shared/collection-service.ts +5 -1
  89. package/templates/owner-lite/tier5-src/_shared/online-actions.ts +76 -0
  90. package/templates/podcast-creator/tier5-src/_shared/collection-service.ts +5 -1
  91. package/templates/podcast-creator/tier5-src/_shared/online-actions.ts +76 -0
  92. package/templates/podcast-creator/tier5-src/himi-branded-lite-feed/index.ts +3 -1
  93. package/templates/podcast-creator/tier5-src/himi-branded-lite-plans/index.ts +13 -1
  94. package/templates/podcast-creator/tier5-src/himi-branded-lite-wallet/index.ts +3 -1
  95. package/templates/podcast-creator/tier5-src/himi-events-detail/index.ts +8 -1
  96. package/templates/podcast-creator/tier5-src/himi-events-rsvp/index.ts +7 -4
  97. package/templates/podcast-creator-owner/tier5-src/_shared/collection-service.ts +5 -1
  98. package/templates/podcast-creator-owner/tier5-src/_shared/online-actions.ts +76 -0
  99. package/templates/portfolio-creative/tier5-src/_shared/collection-service.ts +5 -1
  100. package/templates/portfolio-creative/tier5-src/_shared/online-actions.ts +76 -0
  101. package/templates/portfolio-creative/tier5-src/himi-branded-lite-address/index.ts +3 -1
  102. package/templates/portfolio-creative/tier5-src/himi-branded-lite-addresses/index.ts +3 -1
  103. package/templates/portfolio-creative/tier5-src/himi-branded-lite-cart/index.ts +3 -0
  104. package/templates/portfolio-creative/tier5-src/himi-branded-lite-order/index.ts +3 -1
  105. package/templates/portfolio-creative/tier5-src/himi-branded-lite-wallet/index.ts +3 -1
  106. package/templates/portfolio-creative/tier5-src/himi-events-detail/index.ts +8 -1
  107. package/templates/portfolio-creative/tier5-src/himi-events-rsvp/index.ts +7 -4
  108. package/templates/portfolio-creative/tier5-src/himi-store-product/index.ts +10 -4
  109. package/templates/portfolio-creative-owner/tier5-src/_shared/collection-service.ts +5 -1
  110. package/templates/portfolio-creative-owner/tier5-src/_shared/online-actions.ts +76 -0
  111. package/templates/restaurant/tier5-src/_shared/collection-service.ts +5 -1
  112. package/templates/restaurant/tier5-src/_shared/online-actions.ts +76 -0
  113. package/templates/restaurant/tier5-src/himi-branded-lite-address/index.ts +3 -1
  114. package/templates/restaurant/tier5-src/himi-branded-lite-addresses/index.ts +3 -1
  115. package/templates/restaurant/tier5-src/himi-branded-lite-reserve/index.ts +3 -1
  116. package/templates/restaurant/tier5-src/himi-branded-lite-wallet/index.ts +3 -1
  117. package/templates/restaurant/tier5-src/himi-events-detail/index.ts +8 -1
  118. package/templates/restaurant/tier5-src/himi-events-rsvp/index.ts +7 -4
  119. package/templates/restaurant-owner/tier5-src/_shared/collection-service.ts +5 -1
  120. package/templates/restaurant-owner/tier5-src/_shared/online-actions.ts +76 -0
  121. package/templates/retail-store/tier5-src/_shared/collection-service.ts +5 -1
  122. package/templates/retail-store/tier5-src/_shared/online-actions.ts +76 -0
  123. package/templates/retail-store/tier5-src/himi-branded-lite-address/index.ts +3 -1
  124. package/templates/retail-store/tier5-src/himi-branded-lite-addresses/index.ts +3 -1
  125. package/templates/retail-store/tier5-src/himi-branded-lite-cart/index.ts +3 -0
  126. package/templates/retail-store/tier5-src/himi-branded-lite-order/index.ts +3 -1
  127. package/templates/retail-store/tier5-src/himi-branded-lite-wallet/index.ts +3 -1
  128. package/templates/retail-store/tier5-src/himi-store-product/index.ts +10 -4
  129. package/templates/retail-store-owner/tier5-src/_shared/collection-service.ts +5 -1
  130. package/templates/retail-store-owner/tier5-src/_shared/online-actions.ts +76 -0
  131. package/templates/yoga-studio/dev/index.ts +2054 -786
  132. package/templates/yoga-studio/tier5-src/_shared/collection-service.ts +5 -1
  133. package/templates/yoga-studio/tier5-src/_shared/online-actions.ts +76 -0
  134. package/templates/yoga-studio/tier5-src/himi-booking-bookings/index.ts +1 -0
  135. package/templates/yoga-studio/tier5-src/himi-booking-time/index.ts +803 -284
  136. package/templates/yoga-studio/tier5-src/himi-branded-lite-plans/index.ts +13 -1
  137. package/templates/yoga-studio/tier5-src/himi-branded-lite-program/index.ts +3 -1
  138. package/templates/yoga-studio/tier5-src/himi-branded-lite-wallet/index.ts +3 -1
  139. package/templates/yoga-studio/tier5-src/himi-events-detail/index.ts +8 -1
  140. package/templates/yoga-studio/tier5-src/himi-events-rsvp/index.ts +7 -4
  141. package/templates/yoga-studio-owner/tier5-src/_shared/collection-service.ts +5 -1
  142. package/templates/yoga-studio-owner/tier5-src/_shared/online-actions.ts +76 -0
@@ -0,0 +1,5 @@
1
+ /** The host checks connectivity at submission time, before any reducer can change state. */
2
+ export declare function connectivity(): {
3
+ online: boolean;
4
+ };
5
+ export declare function requireConnectivity(): void;
@@ -300,3 +300,4 @@ export declare const app: {
300
300
  dispatch(action: string, args?: unknown): Promise<unknown>;
301
301
  };
302
302
  export { validate, isValid as isValidValue, validators, validateAll, type ValidationFailure, type ValidationFailureRule, } from "@wix/himalaya/core/validation";
303
+ export { connectivity, requireConnectivity } from './connectivity.js';
@@ -181,6 +181,18 @@ function validateAll(rules, values, catalog) {
181
181
  return errors;
182
182
  }
183
183
 
184
+ // ../../core/sdk/state/src/connectivity.ts
185
+ function connectivity() {
186
+ const host = globalThis.himalaya;
187
+ if (!host?.connectivity?.current) throw new Error("CONNECTIVITY_UNSUPPORTED: update the Himalaya runtime before installing this screen");
188
+ const current = host.connectivity.current();
189
+ if (typeof current?.online !== "boolean") throw new Error("CONNECTIVITY_UNSUPPORTED: this host cannot report connectivity");
190
+ return current;
191
+ }
192
+ function requireConnectivity() {
193
+ if (!connectivity().online) throw new Error("You\u2019re offline \u2014 this change can\u2019t be saved right now. Connect and try again.");
194
+ }
195
+
184
196
  // ../../core/sdk/state/src/index.ts
185
197
  function withStream(state, directive) {
186
198
  return { ...state, _stream: directive };
@@ -328,11 +340,13 @@ var app = {
328
340
  };
329
341
  export {
330
342
  app,
343
+ connectivity,
331
344
  defineService,
332
345
  encodeSubtree,
333
346
  isAppServiceError,
334
347
  isValid as isValidValue,
335
348
  navigate,
349
+ requireConnectivity,
336
350
  validate,
337
351
  validateAll,
338
352
  validators,