@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.
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/app-config.d.ts +10 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/wix-platform/src/index.d.ts +13 -5
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/auth-gate-screen.d.ts +10 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/define-app.d.ts +16 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +15 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-platform.mjs +29 -8
- package/dist/cli.mjs +31 -4
- package/guides/sdk-reference.json +2 -2
- package/guides/web-page-sdk-reference.md +1 -1
- package/guides/wix-login-integration.md +56 -4
- package/guides/wix-platform-usage.md +26 -11
- package/package.json +2 -2
- package/templates/beauty-salon/tier5-src/_shared/collection-query.ts +6 -4
- package/templates/beauty-salon/tier5-src/_shared/collection-service.ts +5 -2
- package/templates/beauty-salon-owner/tier5-src/_shared/collection-query.ts +6 -4
- package/templates/beauty-salon-owner/tier5-src/_shared/collection-service.ts +5 -2
- package/templates/beauty-salon-owner/tier5-src/_shared/owner-editor-value.ts +14 -0
- package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-post-form/index.ts +4 -4
- package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-product-form/index.ts +4 -4
- package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-service-form/index.ts +4 -3
- package/templates/branded-lite/tier5-src/_shared/collection-query.ts +6 -4
- package/templates/branded-lite/tier5-src/_shared/collection-service.ts +5 -2
- package/templates/community-club/tier5-src/_shared/collection-query.ts +6 -4
- package/templates/community-club/tier5-src/_shared/collection-service.ts +5 -2
- package/templates/community-club-owner/tier5-src/_shared/collection-query.ts +6 -4
- package/templates/community-club-owner/tier5-src/_shared/collection-service.ts +5 -2
- package/templates/community-club-owner/tier5-src/_shared/owner-editor-value.ts +14 -0
- package/templates/community-club-owner/tier5-src/himi-owner-lite-event-form/index.ts +4 -4
- package/templates/community-club-owner/tier5-src/himi-owner-lite-post-form/index.ts +4 -4
- package/templates/community-club-owner/tier5-src/himi-owner-lite-product-form/index.ts +4 -4
- package/templates/events-meetups/tier5-src/_shared/collection-query.ts +6 -4
- package/templates/events-meetups/tier5-src/_shared/collection-service.ts +5 -2
- package/templates/events-meetups-owner/tier5-src/_shared/collection-query.ts +6 -4
- package/templates/events-meetups-owner/tier5-src/_shared/collection-service.ts +5 -2
- package/templates/events-meetups-owner/tier5-src/_shared/owner-editor-value.ts +14 -0
- package/templates/events-meetups-owner/tier5-src/himi-owner-lite-event-form/index.ts +4 -4
- package/templates/events-meetups-owner/tier5-src/himi-owner-lite-post-form/index.ts +4 -4
- package/templates/gym-fitness/tier5-src/_shared/collection-query.ts +6 -4
- package/templates/gym-fitness/tier5-src/_shared/collection-service.ts +5 -2
- package/templates/gym-fitness-owner/tier5-src/_shared/collection-query.ts +6 -4
- package/templates/gym-fitness-owner/tier5-src/_shared/collection-service.ts +5 -2
- package/templates/gym-fitness-owner/tier5-src/_shared/owner-editor-value.ts +14 -0
- package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-event-form/index.ts +4 -4
- package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-post-form/index.ts +4 -4
- package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-product-form/index.ts +4 -4
- package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-service-form/index.ts +4 -3
- package/templates/nonprofit-cause/tier5-src/_shared/collection-query.ts +6 -4
- package/templates/nonprofit-cause/tier5-src/_shared/collection-service.ts +5 -2
- package/templates/nonprofit-cause-owner/tier5-src/_shared/collection-query.ts +6 -4
- package/templates/nonprofit-cause-owner/tier5-src/_shared/collection-service.ts +5 -2
- package/templates/nonprofit-cause-owner/tier5-src/_shared/owner-editor-value.ts +14 -0
- package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-event-form/index.ts +4 -4
- package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-post-form/index.ts +4 -4
- package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-service-form/index.ts +4 -3
- package/templates/owner-lite/tier5-src/_shared/collection-query.ts +6 -4
- package/templates/owner-lite/tier5-src/_shared/collection-service.ts +5 -2
- package/templates/owner-lite/tier5-src/_shared/owner-editor-value.ts +14 -0
- package/templates/owner-lite/tier5-src/himi-owner-lite-event-form/index.ts +4 -4
- package/templates/owner-lite/tier5-src/himi-owner-lite-faq-category-form/index.ts +3 -2
- package/templates/owner-lite/tier5-src/himi-owner-lite-faq-question-form/index.ts +4 -4
- package/templates/owner-lite/tier5-src/himi-owner-lite-post-form/index.ts +4 -4
- package/templates/owner-lite/tier5-src/himi-owner-lite-product-form/index.ts +4 -4
- package/templates/owner-lite/tier5-src/himi-owner-lite-service-form/index.ts +4 -3
- package/templates/podcast-creator/tier5-src/_shared/collection-query.ts +6 -4
- package/templates/podcast-creator/tier5-src/_shared/collection-service.ts +5 -2
- package/templates/podcast-creator-owner/tier5-src/_shared/collection-query.ts +6 -4
- package/templates/podcast-creator-owner/tier5-src/_shared/collection-service.ts +5 -2
- package/templates/podcast-creator-owner/tier5-src/_shared/owner-editor-value.ts +14 -0
- package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-event-form/index.ts +4 -4
- package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-post-form/index.ts +4 -4
- package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-product-form/index.ts +4 -4
- package/templates/portfolio-creative/tier5-src/_shared/collection-query.ts +6 -4
- package/templates/portfolio-creative/tier5-src/_shared/collection-service.ts +5 -2
- package/templates/portfolio-creative-owner/tier5-src/_shared/collection-query.ts +6 -4
- package/templates/portfolio-creative-owner/tier5-src/_shared/collection-service.ts +5 -2
- package/templates/portfolio-creative-owner/tier5-src/_shared/owner-editor-value.ts +14 -0
- package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-post-form/index.ts +4 -4
- package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-product-form/index.ts +4 -4
- package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-service-form/index.ts +4 -3
- package/templates/restaurant/tier5-src/_shared/collection-query.ts +6 -4
- package/templates/restaurant/tier5-src/_shared/collection-service.ts +5 -2
- package/templates/restaurant-owner/tier5-src/_shared/collection-query.ts +6 -4
- package/templates/restaurant-owner/tier5-src/_shared/collection-service.ts +5 -2
- package/templates/restaurant-owner/tier5-src/_shared/owner-editor-value.ts +14 -0
- package/templates/restaurant-owner/tier5-src/himi-owner-lite-event-form/index.ts +4 -4
- package/templates/restaurant-owner/tier5-src/himi-owner-lite-post-form/index.ts +4 -4
- package/templates/restaurant-owner/tier5-src/himi-owner-lite-product-form/index.ts +4 -4
- package/templates/restaurant-owner/tier5-src/himi-owner-lite-service-form/index.ts +4 -3
- package/templates/retail-store/tier5-src/_shared/collection-query.ts +6 -4
- package/templates/retail-store/tier5-src/_shared/collection-service.ts +5 -2
- package/templates/retail-store-owner/tier5-src/_shared/collection-query.ts +6 -4
- package/templates/retail-store-owner/tier5-src/_shared/collection-service.ts +5 -2
- package/templates/retail-store-owner/tier5-src/_shared/owner-editor-value.ts +14 -0
- package/templates/retail-store-owner/tier5-src/himi-owner-lite-post-form/index.ts +4 -4
- package/templates/retail-store-owner/tier5-src/himi-owner-lite-product-form/index.ts +4 -4
- package/templates/yoga-studio/tier5-src/_shared/collection-query.ts +6 -4
- package/templates/yoga-studio/tier5-src/_shared/collection-service.ts +5 -2
- package/templates/yoga-studio-owner/tier5-src/_shared/collection-query.ts +6 -4
- package/templates/yoga-studio-owner/tier5-src/_shared/collection-service.ts +5 -2
- package/templates/yoga-studio-owner/tier5-src/_shared/owner-editor-value.ts +14 -0
- package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-event-form/index.ts +4 -4
- package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-post-form/index.ts +4 -4
- 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 ?? {};
|