@wix/himalaya-cli 0.1470.0 → 0.1472.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 (103) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/app-config.d.ts +10 -2
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/wix-platform/src/index.d.ts +13 -5
  3. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/auth-gate-screen.d.ts +10 -0
  4. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/define-app.d.ts +16 -1
  5. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +15 -0
  6. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-platform.mjs +29 -8
  7. package/dist/cli.mjs +31 -4
  8. package/guides/sdk-reference.json +2 -2
  9. package/guides/web-page-sdk-reference.md +1 -1
  10. package/guides/wix-login-integration.md +56 -4
  11. package/guides/wix-platform-usage.md +26 -11
  12. package/package.json +2 -2
  13. package/templates/beauty-salon/tier5-src/_shared/collection-query.ts +6 -4
  14. package/templates/beauty-salon/tier5-src/_shared/collection-service.ts +5 -2
  15. package/templates/beauty-salon-owner/tier5-src/_shared/collection-query.ts +6 -4
  16. package/templates/beauty-salon-owner/tier5-src/_shared/collection-service.ts +5 -2
  17. package/templates/beauty-salon-owner/tier5-src/_shared/owner-editor-value.ts +14 -0
  18. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-post-form/index.ts +4 -4
  19. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-product-form/index.ts +4 -4
  20. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-service-form/index.ts +4 -3
  21. package/templates/branded-lite/tier5-src/_shared/collection-query.ts +6 -4
  22. package/templates/branded-lite/tier5-src/_shared/collection-service.ts +5 -2
  23. package/templates/community-club/tier5-src/_shared/collection-query.ts +6 -4
  24. package/templates/community-club/tier5-src/_shared/collection-service.ts +5 -2
  25. package/templates/community-club-owner/tier5-src/_shared/collection-query.ts +6 -4
  26. package/templates/community-club-owner/tier5-src/_shared/collection-service.ts +5 -2
  27. package/templates/community-club-owner/tier5-src/_shared/owner-editor-value.ts +14 -0
  28. package/templates/community-club-owner/tier5-src/himi-owner-lite-event-form/index.ts +4 -4
  29. package/templates/community-club-owner/tier5-src/himi-owner-lite-post-form/index.ts +4 -4
  30. package/templates/community-club-owner/tier5-src/himi-owner-lite-product-form/index.ts +4 -4
  31. package/templates/events-meetups/tier5-src/_shared/collection-query.ts +6 -4
  32. package/templates/events-meetups/tier5-src/_shared/collection-service.ts +5 -2
  33. package/templates/events-meetups-owner/tier5-src/_shared/collection-query.ts +6 -4
  34. package/templates/events-meetups-owner/tier5-src/_shared/collection-service.ts +5 -2
  35. package/templates/events-meetups-owner/tier5-src/_shared/owner-editor-value.ts +14 -0
  36. package/templates/events-meetups-owner/tier5-src/himi-owner-lite-event-form/index.ts +4 -4
  37. package/templates/events-meetups-owner/tier5-src/himi-owner-lite-post-form/index.ts +4 -4
  38. package/templates/gym-fitness/tier5-src/_shared/collection-query.ts +6 -4
  39. package/templates/gym-fitness/tier5-src/_shared/collection-service.ts +5 -2
  40. package/templates/gym-fitness-owner/tier5-src/_shared/collection-query.ts +6 -4
  41. package/templates/gym-fitness-owner/tier5-src/_shared/collection-service.ts +5 -2
  42. package/templates/gym-fitness-owner/tier5-src/_shared/owner-editor-value.ts +14 -0
  43. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-event-form/index.ts +4 -4
  44. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-post-form/index.ts +4 -4
  45. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-product-form/index.ts +4 -4
  46. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-service-form/index.ts +4 -3
  47. package/templates/nonprofit-cause/tier5-src/_shared/collection-query.ts +6 -4
  48. package/templates/nonprofit-cause/tier5-src/_shared/collection-service.ts +5 -2
  49. package/templates/nonprofit-cause-owner/tier5-src/_shared/collection-query.ts +6 -4
  50. package/templates/nonprofit-cause-owner/tier5-src/_shared/collection-service.ts +5 -2
  51. package/templates/nonprofit-cause-owner/tier5-src/_shared/owner-editor-value.ts +14 -0
  52. package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-event-form/index.ts +4 -4
  53. package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-post-form/index.ts +4 -4
  54. package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-service-form/index.ts +4 -3
  55. package/templates/owner-lite/tier5-src/_shared/collection-query.ts +6 -4
  56. package/templates/owner-lite/tier5-src/_shared/collection-service.ts +5 -2
  57. package/templates/owner-lite/tier5-src/_shared/owner-editor-value.ts +14 -0
  58. package/templates/owner-lite/tier5-src/himi-owner-lite-event-form/index.ts +4 -4
  59. package/templates/owner-lite/tier5-src/himi-owner-lite-faq-category-form/index.ts +3 -2
  60. package/templates/owner-lite/tier5-src/himi-owner-lite-faq-question-form/index.ts +4 -4
  61. package/templates/owner-lite/tier5-src/himi-owner-lite-post-form/index.ts +4 -4
  62. package/templates/owner-lite/tier5-src/himi-owner-lite-product-form/index.ts +4 -4
  63. package/templates/owner-lite/tier5-src/himi-owner-lite-service-form/index.ts +4 -3
  64. package/templates/podcast-creator/tier5-src/_shared/collection-query.ts +6 -4
  65. package/templates/podcast-creator/tier5-src/_shared/collection-service.ts +5 -2
  66. package/templates/podcast-creator-owner/tier5-src/_shared/collection-query.ts +6 -4
  67. package/templates/podcast-creator-owner/tier5-src/_shared/collection-service.ts +5 -2
  68. package/templates/podcast-creator-owner/tier5-src/_shared/owner-editor-value.ts +14 -0
  69. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-event-form/index.ts +4 -4
  70. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-post-form/index.ts +4 -4
  71. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-product-form/index.ts +4 -4
  72. package/templates/portfolio-creative/tier5-src/_shared/collection-query.ts +6 -4
  73. package/templates/portfolio-creative/tier5-src/_shared/collection-service.ts +5 -2
  74. package/templates/portfolio-creative-owner/tier5-src/_shared/collection-query.ts +6 -4
  75. package/templates/portfolio-creative-owner/tier5-src/_shared/collection-service.ts +5 -2
  76. package/templates/portfolio-creative-owner/tier5-src/_shared/owner-editor-value.ts +14 -0
  77. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-post-form/index.ts +4 -4
  78. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-product-form/index.ts +4 -4
  79. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-service-form/index.ts +4 -3
  80. package/templates/restaurant/tier5-src/_shared/collection-query.ts +6 -4
  81. package/templates/restaurant/tier5-src/_shared/collection-service.ts +5 -2
  82. package/templates/restaurant-owner/tier5-src/_shared/collection-query.ts +6 -4
  83. package/templates/restaurant-owner/tier5-src/_shared/collection-service.ts +5 -2
  84. package/templates/restaurant-owner/tier5-src/_shared/owner-editor-value.ts +14 -0
  85. package/templates/restaurant-owner/tier5-src/himi-owner-lite-event-form/index.ts +4 -4
  86. package/templates/restaurant-owner/tier5-src/himi-owner-lite-post-form/index.ts +4 -4
  87. package/templates/restaurant-owner/tier5-src/himi-owner-lite-product-form/index.ts +4 -4
  88. package/templates/restaurant-owner/tier5-src/himi-owner-lite-service-form/index.ts +4 -3
  89. package/templates/retail-store/tier5-src/_shared/collection-query.ts +6 -4
  90. package/templates/retail-store/tier5-src/_shared/collection-service.ts +5 -2
  91. package/templates/retail-store-owner/tier5-src/_shared/collection-query.ts +6 -4
  92. package/templates/retail-store-owner/tier5-src/_shared/collection-service.ts +5 -2
  93. package/templates/retail-store-owner/tier5-src/_shared/owner-editor-value.ts +14 -0
  94. package/templates/retail-store-owner/tier5-src/himi-owner-lite-post-form/index.ts +4 -4
  95. package/templates/retail-store-owner/tier5-src/himi-owner-lite-product-form/index.ts +4 -4
  96. package/templates/yoga-studio/tier5-src/_shared/collection-query.ts +6 -4
  97. package/templates/yoga-studio/tier5-src/_shared/collection-service.ts +5 -2
  98. package/templates/yoga-studio-owner/tier5-src/_shared/collection-query.ts +6 -4
  99. package/templates/yoga-studio-owner/tier5-src/_shared/collection-service.ts +5 -2
  100. package/templates/yoga-studio-owner/tier5-src/_shared/owner-editor-value.ts +14 -0
  101. package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-event-form/index.ts +4 -4
  102. package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-post-form/index.ts +4 -4
  103. package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-service-form/index.ts +4 -3
@@ -10,7 +10,7 @@ import { defineService } from "@himalaya/state";
10
10
  import { getEvent, updateEvent, type WixEvent } from "@himalaya/wix-events";
11
11
  import { normalizeEvent } from "../_shared/himi-events.js";
12
12
  import { postBodyText, plainPostBody } from "../_shared/owner-post-content.js";
13
- import { editorSubmitValue, queuedDocument, editorChanged, cachedRichVerdict, editorRunKeys, resetHydratedEditorOnOlderRuntime, editorAfterSave, liveState, settleOverLive, holdsLoadedForm } from "../_shared/owner-editor-value.js";
13
+ import { editorSubmitValue, queuedDocument, editorChanged, cachedRichVerdict, editorRunKeys, resetHydratedEditorOnOlderRuntime, editorAfterSave, liveState, settleOverLive, holdsLoadedForm, landsOnLive } from "../_shared/owner-editor-value.js";
14
14
  import { parseRicosJson } from "@himalaya/wix-rich-content";
15
15
  import { ricosUploadService } from "@himalaya/wix-rich-content-editor";
16
16
  import { ownerLoadError, isOwnerPreviewDemo, ownerDemoFallback, ownerWriteError } from "../_shared/owner-load-error.js";
@@ -169,7 +169,7 @@ function demoRefusal(s: Parameters<typeof shape>[0]): ReturnType<typeof shape> {
169
169
  ricosUploadService("himiOwnerLiteEventFormUploads");
170
170
 
171
171
  const svc = defineService<EventFormState, {
172
- load: (s: EventFormState, arg?: unknown) => Promise<EventFormState>;
172
+ load: (s: EventFormState, arg?: unknown) => Promise<EventFormState | undefined>;
173
173
  descriptionChanged: (s: EventFormState, arg?: unknown) => EventFormState;
174
174
  submit: (s: EventFormState, values?: Record<string, unknown>) => Promise<EventFormState>;
175
175
  }>("himiOwnerLiteEventForm", {
@@ -179,7 +179,7 @@ const svc = defineService<EventFormState, {
179
179
  // perVisit: a cached embed's warm return starts this run fresh, as a cold boot does (`__resetRunState`).
180
180
  perVisit: editorRunKeys("description"),
181
181
  actions: {
182
- load: async (s, arg) => {
182
+ load: async (s, arg): Promise<EventFormState | undefined> => landsOnLive(svc, s, await (async () => {
183
183
  stashCopy(arg); // absorb the descriptor's onAppear copy-pack param
184
184
  const mode = modeFrom(arg, s.mode);
185
185
  // WS-C — nav-param input is PRIMARY (the canonical form bakes no id); the
@@ -262,7 +262,7 @@ const svc = defineService<EventFormState, {
262
262
  }
263
263
  return shape({ ...s, mode, id, status: "error", error: ownerLoadError(e) });
264
264
  }
265
- },
265
+ })()),
266
266
  // The editor's on_change carries `args.dirty` only; the document stays in the form bag.
267
267
  descriptionChanged: (s) => shape({ ...s, descriptionDirty: true, descriptionEdits: s.descriptionEdits + 1, ...editorChanged(s) }),
268
268
  // Laid over the live state ([rico] #3644): what the owner did while the save awaited survives it.
@@ -4,7 +4,7 @@
4
4
  // screen (himiOwnerLitePost.publish). Bound by buildForm ($service:himiOwnerLitePostForm.*).
5
5
 
6
6
  import { postBodyText, plainPostBody, postCoverUrl } from "../_shared/owner-post-content.js";
7
- import { editorSubmitValue, queuedDocument, editorChanged, editorRunKeys, resetHydratedEditorOnOlderRuntime, editorAfterSave, liveState, settleOverLive, holdsLoadedForm } from "../_shared/owner-editor-value.js";
7
+ import { editorSubmitValue, queuedDocument, editorChanged, editorRunKeys, resetHydratedEditorOnOlderRuntime, editorAfterSave, liveState, settleOverLive, holdsLoadedForm, landsOnLive } from "../_shared/owner-editor-value.js";
8
8
  import { ricosUploadService } from "@himalaya/wix-rich-content-editor";
9
9
  import { wixCall } from "@himalaya/wix-site-media";
10
10
  import { wixMediaUrl, WIX_DETAIL_IMAGE } from "../_shared/himi-store.js";
@@ -157,7 +157,7 @@ function demoRefusal(s: Parameters<typeof shape>[0]): ReturnType<typeof shape> {
157
157
  ricosUploadService("himiOwnerLitePostFormUploads");
158
158
 
159
159
  const svc = defineService<PostFormState, {
160
- load: (s: PostFormState, arg?: unknown) => Promise<PostFormState>;
160
+ load: (s: PostFormState, arg?: unknown) => Promise<PostFormState | undefined>;
161
161
  setCover: (s: PostFormState, arg?: unknown) => PostFormState;
162
162
  setExcerpt: (s: PostFormState, arg?: unknown) => PostFormState;
163
163
  detailsOpen: (s: PostFormState) => PostFormState;
@@ -173,7 +173,7 @@ const svc = defineService<PostFormState, {
173
173
  // perVisit: a cached embed's warm return starts this run fresh, as a cold boot does (`__resetRunState`).
174
174
  perVisit: [...editorRunKeys("body"), "detailsOpen"],
175
175
  actions: {
176
- load: async (s, arg) => {
176
+ load: async (s, arg): Promise<PostFormState | undefined> => landsOnLive(svc, s, await (async () => {
177
177
  stashCopy(arg); // absorb the descriptor's onAppear copy-pack param
178
178
  // WS-C — nav-param input is PRIMARY (the canonical create-or-edit shell
179
179
  // bakes no id/mode); the onAppear `id` param is the #570 suffixed-build
@@ -240,7 +240,7 @@ const svc = defineService<PostFormState, {
240
240
  }
241
241
  return shape({ ...s, mode: "edit", id, status: "error", error: ownerLoadError(e) });
242
242
  }
243
- },
243
+ })()),
244
244
  setCover: (s, arg) => shape({ ...s, coverUrl: valueOf(arg).trim(), error: "" }),
245
245
  setExcerpt: (s, arg) => shape({ ...s, excerpt: valueOf(arg), error: "" }),
246
246
  detailsOpen: (s) => shape({ ...s, detailsOpen: true }),
@@ -4,6 +4,7 @@
4
4
  // expose, so this form only edits an existing service's name/description via
5
5
  // updateService. Bound by buildForm ($service:himiOwnerLiteServiceForm.*).
6
6
 
7
+ import { landsOnLive } from "../_shared/owner-editor-value.js";
7
8
  import { defineService } from "@himalaya/state";
8
9
  import { getService, updateService, type WixService } from "@himalaya/wix-bookings";
9
10
  import { ownerLoadError, isOwnerPreviewDemo, ownerDemoFallback, ownerWriteError } from "../_shared/owner-load-error.js";
@@ -108,12 +109,12 @@ function demoRefusal(s: Parameters<typeof shape>[0]): ReturnType<typeof shape> {
108
109
  }
109
110
 
110
111
  const svc = defineService<ServiceFormState, {
111
- load: (s: ServiceFormState, arg?: unknown) => Promise<ServiceFormState>;
112
+ load: (s: ServiceFormState, arg?: unknown) => Promise<ServiceFormState | undefined>;
112
113
  submit: (s: ServiceFormState, values?: Record<string, unknown>) => Promise<ServiceFormState>;
113
114
  }>("himiOwnerLiteServiceForm", {
114
115
  state: shape({ id: initialId }),
115
116
  actions: {
116
- load: async (s, arg) => {
117
+ load: async (s, arg): Promise<ServiceFormState | undefined> => landsOnLive(svc, s, await (async () => {
117
118
  stashCopy(arg); // absorb the descriptor's onAppear copy-pack param
118
119
  // WS-C — nav-param input is PRIMARY (the canonical form bakes no id); the
119
120
  // onAppear `id` param is the #570 suffixed-build fallback.
@@ -167,7 +168,7 @@ const svc = defineService<ServiceFormState, {
167
168
  }
168
169
  return shape({ ...s, id, status: "error", error: ownerLoadError(e) });
169
170
  }
170
- },
171
+ })()),
171
172
  submit: async (s, values) => {
172
173
  if (isOwnerPreviewDemo() || s.demoNote) return demoRefusal(s);
173
174
  const v = values ?? {};