@wix/himalaya-cli 0.1571.0 → 0.1572.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/stdlib/wix-sdk/members-feed-viewer/src/index.d.ts +6 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-members-feed-viewer.mjs +18 -0
- package/dist/cli.mjs +379 -83
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/index.json +7 -0
- package/guides/map-one-app-coverage.js +117 -0
- package/guides/one-app-to-himi-app.md +87 -7
- package/guides/recipe-one-app-coverage-mapping.md +74 -0
- package/guides/sdk-reference.json +6 -0
- package/package.json +2 -2
- package/templates/beauty-salon-owner/dev/index.ts +2 -3
- package/templates/branded-lite/tier5-src/himi-branded-lite-programs/index.ts +28 -11
- package/templates/community-club-owner/dev/index.ts +2 -3
- package/templates/events-meetups-owner/dev/index.ts +2 -3
- package/templates/gym-fitness-owner/dev/index.ts +2 -3
- package/templates/nonprofit-cause-owner/dev/index.ts +2 -3
- package/templates/owner-lite/dev/index.ts +2 -3
- package/templates/podcast-creator-owner/dev/index.ts +2 -3
- package/templates/portfolio-creative-owner/dev/index.ts +2 -3
- package/templates/restaurant-owner/dev/index.ts +2 -3
- package/templates/retail-store-owner/dev/index.ts +2 -3
- package/templates/yoga-studio/tier5-src/himi-branded-lite-programs/index.ts +28 -11
- package/templates/yoga-studio-owner/dev/index.ts +2 -3
|
@@ -112,13 +112,10 @@ function programFields(p: WixProgram): Omit<ProgramRow, "priceLine"> {
|
|
|
112
112
|
initial: initials(name),
|
|
113
113
|
hasImage: !!image,
|
|
114
114
|
noImage: !image,
|
|
115
|
-
// The
|
|
116
|
-
//
|
|
117
|
-
//
|
|
118
|
-
|
|
119
|
-
// liveSeedRoute({ prefix: "himi_program_" }) already seeds and `currentInputId`
|
|
120
|
-
// resolves through its prefix path.
|
|
121
|
-
detailScreenId: `himi_program_${id}`,
|
|
115
|
+
// The canonical route is baked even offline. Hosts pass the row's `id` as
|
|
116
|
+
// worker input (WS-C); suffixed routes only exist for the preview seed's
|
|
117
|
+
// first 50 records and cannot open a complete live catalog in production.
|
|
118
|
+
detailScreenId: "himi_program",
|
|
122
119
|
};
|
|
123
120
|
}
|
|
124
121
|
|
|
@@ -157,9 +154,29 @@ function errored(state: State): State {
|
|
|
157
154
|
};
|
|
158
155
|
}
|
|
159
156
|
|
|
160
|
-
async function fetchPrograms(): Promise<WixProgram[]> {
|
|
161
|
-
const
|
|
162
|
-
|
|
157
|
+
async function fetchPrograms(isCurrent: () => boolean): Promise<WixProgram[] | undefined> {
|
|
158
|
+
const programs = new Map<string, WixProgram>();
|
|
159
|
+
const seen = new Set<string>();
|
|
160
|
+
let cursor = "";
|
|
161
|
+
do {
|
|
162
|
+
// Wix cursors carry the initial sort/filter. Repeating either on a continuation
|
|
163
|
+
// is rejected with INVALID_CURSOR, even when their values have not changed.
|
|
164
|
+
const response = await queryPrograms(cursor
|
|
165
|
+
? { cursorPaging: { limit: 50, cursor } }
|
|
166
|
+
: { cursorPaging: { limit: 50 }, sort: [{ fieldName: "createdDate", order: "DESC" }] });
|
|
167
|
+
if (!isCurrent()) return undefined;
|
|
168
|
+
for (const program of response.programs ?? []) {
|
|
169
|
+
if (program.id && !isDraft(program)) programs.set(program.id, program);
|
|
170
|
+
}
|
|
171
|
+
const paging = response.pagingMetadata;
|
|
172
|
+
const next = paging?.hasNext === false ? "" : paging?.cursors?.next ?? "";
|
|
173
|
+
if ((paging?.hasNext && !next) || (next && seen.has(next))) {
|
|
174
|
+
throw new Error("Invalid program catalog cursor");
|
|
175
|
+
}
|
|
176
|
+
if (next) seen.add(next);
|
|
177
|
+
cursor = next;
|
|
178
|
+
} while (cursor);
|
|
179
|
+
return [...programs.values()];
|
|
163
180
|
}
|
|
164
181
|
|
|
165
182
|
// ── Content and App Store prices ─────
|
|
@@ -180,7 +197,7 @@ let loadSeq = 0;
|
|
|
180
197
|
async function load(_state: State, arg?: unknown): Promise<undefined> {
|
|
181
198
|
stashCopy(arg);
|
|
182
199
|
const seq = ++loadSeq;
|
|
183
|
-
const programs = await fetchPrograms().catch(() => undefined);
|
|
200
|
+
const programs = await fetchPrograms(() => seq === loadSeq).catch(() => undefined);
|
|
184
201
|
if (seq !== loadSeq) return undefined;
|
|
185
202
|
content = programs ? { status: "ready", programs: programs.map(programContent) } : { ...content, status: "error" };
|
|
186
203
|
void svc.pricingPublish();
|
|
@@ -52522,8 +52522,7 @@ const SCREENS = runtimeSetting({
|
|
|
52522
52522
|
"params": {
|
|
52523
52523
|
"screenId": "himi_owner_lite_search",
|
|
52524
52524
|
"title": "Search records",
|
|
52525
|
-
"subtitle": "Across your business areas"
|
|
52526
|
-
"search": "drawer"
|
|
52525
|
+
"subtitle": "Across your business areas"
|
|
52527
52526
|
}
|
|
52528
52527
|
},
|
|
52529
52528
|
"pressFeedback": "scale",
|
|
@@ -54042,7 +54041,7 @@ const SCREENS = runtimeSetting({
|
|
|
54042
54041
|
"actionId": "tier5.himiOwnerLiteSearch.search"
|
|
54043
54042
|
},
|
|
54044
54043
|
"debounceMs": 200,
|
|
54045
|
-
"
|
|
54044
|
+
"loadingPath": "$service:himiOwnerLiteSearch.anyLoading"
|
|
54046
54045
|
}
|
|
54047
54046
|
}
|
|
54048
54047
|
},
|