@wix/himalaya-cli 0.1578.0 → 0.1580.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/sdk/calendar/src/index.d.ts +42 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/motion/src/index.d.ts +51 -5
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/sdk-types/src/capabilities.generated.d.ts +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/media/src/index.d.ts +1 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/media/src/rendition.d.ts +42 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/audio-record.mjs +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/calendar.mjs +46 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/calls.mjs +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/contacts.mjs +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/location.mjs +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/motion.mjs +23 -3
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/photos.mjs +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdk-types.mjs +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/tasks.mjs +1 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-media.mjs +78 -0
- package/dist/cli.mjs +9027 -7450
- package/dist/preview-assets.generated.bin +0 -0
- package/dist/quickjs-intl.js +462 -0
- package/dist/quickjs-web-globals.js +540 -0
- package/dist/quickjs-worker-entry.js +313 -0
- package/guides/himi-json-output.md +30 -1
- package/guides/one-app-section-mappings.md +30 -5
- package/guides/one-app-to-himi-app.md +214 -6
- package/guides/one-app-viewer.md +2 -2
- package/guides/sdk-reference.json +79 -7
- package/guides/web-page-sdk-reference.md +1 -1
- package/package.json +3 -2
- package/templates/beauty-salon/dev/index.ts +14 -0
- package/templates/beauty-salon/tier5-src/_shared/himi-bookings.ts +21 -0
- package/templates/beauty-salon/tier5-src/_shared/himi-copy.ts +8 -3
- package/templates/beauty-salon/tier5-src/himi-booking-services/index.ts +36 -12
- package/templates/beauty-salon-owner/tier5-src/_shared/himi-copy.ts +8 -3
- package/templates/branded-lite/dev/index.ts +14 -0
- package/templates/branded-lite/tier5-src/_shared/himi-bookings.ts +21 -0
- package/templates/branded-lite/tier5-src/_shared/himi-copy.ts +8 -3
- package/templates/branded-lite/tier5-src/himi-booking-services/index.ts +36 -12
- package/templates/branded-lite/tier5-src/himi-branded-lite-programs/index.ts +40 -2
- package/templates/brandy/tier5-src/_shared/himi-copy.ts +8 -3
- package/templates/community-club/tier5-src/_shared/himi-copy.ts +8 -3
- package/templates/community-club-owner/tier5-src/_shared/himi-copy.ts +8 -3
- package/templates/events-meetups/tier5-src/_shared/himi-copy.ts +8 -3
- package/templates/events-meetups-owner/tier5-src/_shared/himi-copy.ts +8 -3
- package/templates/gym-fitness/dev/index.ts +14 -0
- package/templates/gym-fitness/tier5-src/_shared/himi-bookings.ts +21 -0
- package/templates/gym-fitness/tier5-src/_shared/himi-copy.ts +8 -3
- package/templates/gym-fitness/tier5-src/himi-booking-services/index.ts +36 -12
- package/templates/gym-fitness-owner/tier5-src/_shared/himi-copy.ts +8 -3
- package/templates/himi-chat/tier5-src/_shared/himi-copy.ts +8 -3
- package/templates/nonprofit-cause/tier5-src/_shared/himi-copy.ts +8 -3
- package/templates/nonprofit-cause-owner/tier5-src/_shared/himi-copy.ts +8 -3
- package/templates/owner-lite/tier5-src/_shared/himi-copy.ts +8 -3
- package/templates/podcast-creator/tier5-src/_shared/himi-copy.ts +8 -3
- package/templates/podcast-creator-owner/tier5-src/_shared/himi-copy.ts +8 -3
- package/templates/portfolio-creative/tier5-src/_shared/himi-copy.ts +8 -3
- package/templates/portfolio-creative-owner/tier5-src/_shared/himi-copy.ts +8 -3
- package/templates/restaurant/tier5-src/_shared/himi-copy.ts +8 -3
- package/templates/restaurant-owner/tier5-src/_shared/himi-copy.ts +8 -3
- package/templates/retail-store/tier5-src/_shared/himi-copy.ts +8 -3
- package/templates/retail-store-owner/tier5-src/_shared/himi-copy.ts +8 -3
- package/templates/yoga-studio/dev/index.ts +14 -0
- package/templates/yoga-studio/tier5-src/_shared/himi-bookings.ts +21 -0
- package/templates/yoga-studio/tier5-src/_shared/himi-copy.ts +8 -3
- package/templates/yoga-studio/tier5-src/himi-booking-services/index.ts +36 -12
- package/templates/yoga-studio/tier5-src/himi-branded-lite-programs/index.ts +40 -2
- package/templates/yoga-studio-owner/tier5-src/_shared/himi-copy.ts +8 -3
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
// ../../core/dev-server/src/quickjs-worker-entry.ts
|
|
2
|
+
import { parentPort, workerData } from "node:worker_threads";
|
|
3
|
+
import { pathToFileURL } from "node:url";
|
|
4
|
+
var CTL_READY = 0;
|
|
5
|
+
var CTL_LEN = 1;
|
|
6
|
+
var CTL_SEQ = 2;
|
|
7
|
+
var CTL_WORDS = 4;
|
|
8
|
+
var DATA_OFFSET = CTL_WORDS * 4;
|
|
9
|
+
var sessions = /* @__PURE__ */ new Map();
|
|
10
|
+
var { sab, intlPath, webGlobalsPath } = workerData;
|
|
11
|
+
var webGlobalsInstaller = null;
|
|
12
|
+
async function installWebGlobalsInto(ctx) {
|
|
13
|
+
webGlobalsInstaller ??= (await import(pathToFileURL(webGlobalsPath).href)).installWebGlobals;
|
|
14
|
+
webGlobalsInstaller(ctx);
|
|
15
|
+
}
|
|
16
|
+
var intlInstaller = null;
|
|
17
|
+
async function installIntlInto(ctx) {
|
|
18
|
+
intlInstaller ??= (await import(pathToFileURL(intlPath).href)).installIntl;
|
|
19
|
+
intlInstaller(ctx);
|
|
20
|
+
}
|
|
21
|
+
var ctl = new Int32Array(sab, 0, CTL_WORDS);
|
|
22
|
+
var data = new Uint8Array(sab, DATA_OFFSET);
|
|
23
|
+
var decoder = new TextDecoder();
|
|
24
|
+
var crossingSeq = 0;
|
|
25
|
+
function crossToHost(kind, method, path, body, waitMs, headers = "") {
|
|
26
|
+
const mine = ++crossingSeq;
|
|
27
|
+
const deadline = Date.now() + waitMs;
|
|
28
|
+
Atomics.store(ctl, CTL_SEQ, 0);
|
|
29
|
+
Atomics.store(ctl, CTL_READY, 0);
|
|
30
|
+
parentPort.postMessage({ want: { kind, method, path, body, headers, seq: mine } });
|
|
31
|
+
for (; ; ) {
|
|
32
|
+
const left = deadline - Date.now();
|
|
33
|
+
if (left <= 0) {
|
|
34
|
+
return JSON.stringify({ ok: false, e: `the host transport did not answer within ${waitMs}ms` });
|
|
35
|
+
}
|
|
36
|
+
const res = Atomics.wait(ctl, CTL_READY, 0, left);
|
|
37
|
+
if (res === "timed-out") {
|
|
38
|
+
return JSON.stringify({ ok: false, e: `the host transport did not answer within ${waitMs}ms` });
|
|
39
|
+
}
|
|
40
|
+
if (Atomics.load(ctl, CTL_SEQ) !== mine) {
|
|
41
|
+
Atomics.store(ctl, CTL_READY, 0);
|
|
42
|
+
continue;
|
|
43
|
+
}
|
|
44
|
+
const len = Atomics.load(ctl, CTL_LEN);
|
|
45
|
+
if (len < 0 || len > data.length) {
|
|
46
|
+
return JSON.stringify({ ok: false, e: `the host transport returned an out-of-range length (${len})` });
|
|
47
|
+
}
|
|
48
|
+
return decoder.decode(data.subarray(0, len));
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
var modulePromise = null;
|
|
52
|
+
async function realmModule() {
|
|
53
|
+
modulePromise ??= (async () => {
|
|
54
|
+
const { newQuickJSWASMModuleFromVariant } = await import("quickjs-emscripten");
|
|
55
|
+
const variant = await import("@jitl/quickjs-wasmfile-release-sync");
|
|
56
|
+
return newQuickJSWASMModuleFromVariant(variant.default ?? variant);
|
|
57
|
+
})();
|
|
58
|
+
return modulePromise;
|
|
59
|
+
}
|
|
60
|
+
async function boot(msg) {
|
|
61
|
+
const mod = await realmModule();
|
|
62
|
+
const runtime = mod.newRuntime();
|
|
63
|
+
runtime.setMemoryLimit(msg.memoryLimitBytes);
|
|
64
|
+
let deadline = Date.now() + (msg.timeoutMs > 0 ? msg.timeoutMs : 2e3);
|
|
65
|
+
let waiting = false;
|
|
66
|
+
runtime.setInterruptHandler(() => !waiting && Date.now() > deadline);
|
|
67
|
+
const ctx = runtime.newContext();
|
|
68
|
+
let keepAlive = false;
|
|
69
|
+
try {
|
|
70
|
+
const host = ctx.newFunction("__himiWixCall", (mH, pH, bH, hH) => {
|
|
71
|
+
waiting = true;
|
|
72
|
+
try {
|
|
73
|
+
const answer = crossToHost(
|
|
74
|
+
"wix",
|
|
75
|
+
ctx.getString(mH),
|
|
76
|
+
ctx.getString(pH),
|
|
77
|
+
ctx.getString(bH),
|
|
78
|
+
// An explicit per-crossing budget when the caller set one; otherwise the remaining boot
|
|
79
|
+
// time, floored, so a stalled transport still surfaces as a rejected call rather than as
|
|
80
|
+
// the whole boot timing out with no attribution.
|
|
81
|
+
msg.answerTimeoutMs !== void 0 ? msg.answerTimeoutMs : Math.max(1e3, deadline - Date.now()),
|
|
82
|
+
// `undefined` when the guest called with three arguments, which every caller did
|
|
83
|
+
// before per-call site scope existed.
|
|
84
|
+
hH === void 0 ? "" : ctx.getString(hH)
|
|
85
|
+
);
|
|
86
|
+
return ctx.newString(answer);
|
|
87
|
+
} finally {
|
|
88
|
+
waiting = false;
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
ctx.setProp(ctx.global, "__himiWixCall", host);
|
|
92
|
+
host.dispose();
|
|
93
|
+
const dispatchHost = ctx.newFunction("__himiDispatch", (aH, pH) => {
|
|
94
|
+
waiting = true;
|
|
95
|
+
try {
|
|
96
|
+
const answer = crossToHost(
|
|
97
|
+
"dispatch",
|
|
98
|
+
"",
|
|
99
|
+
ctx.getString(aH),
|
|
100
|
+
ctx.getString(pH),
|
|
101
|
+
msg.answerTimeoutMs !== void 0 ? msg.answerTimeoutMs : Math.max(1e3, deadline - Date.now())
|
|
102
|
+
);
|
|
103
|
+
return ctx.newString(answer);
|
|
104
|
+
} finally {
|
|
105
|
+
waiting = false;
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
ctx.setProp(ctx.global, "__himiDispatch", dispatchHost);
|
|
109
|
+
dispatchHost.dispose();
|
|
110
|
+
const pre = ctx.evalCode(msg.prelude, "himi-sandbox.js");
|
|
111
|
+
if (pre.error) {
|
|
112
|
+
const detail = ctx.dump(pre.error);
|
|
113
|
+
pre.error.dispose();
|
|
114
|
+
throw new Error(`sandbox prelude failed: ${String(detail?.message ?? detail)}`);
|
|
115
|
+
}
|
|
116
|
+
const bridge = pre.value;
|
|
117
|
+
const readback = ctx.getProp(bridge, "readback");
|
|
118
|
+
const dispatch2 = ctx.getProp(bridge, "dispatch");
|
|
119
|
+
const actionsReadback = ctx.getProp(bridge, "actions");
|
|
120
|
+
bridge.dispose();
|
|
121
|
+
if (msg.webGlobals && !msg.hide?.length) await installWebGlobalsInto(ctx);
|
|
122
|
+
if (msg.intl) await installIntlInto(ctx);
|
|
123
|
+
let bundleThrow = null;
|
|
124
|
+
try {
|
|
125
|
+
const res = ctx.evalCode(msg.bundleJs, msg.filename);
|
|
126
|
+
if (res.error) {
|
|
127
|
+
const detail = ctx.dump(res.error);
|
|
128
|
+
res.error.dispose();
|
|
129
|
+
bundleThrow = String(detail?.message ?? detail);
|
|
130
|
+
} else {
|
|
131
|
+
res.value.dispose();
|
|
132
|
+
}
|
|
133
|
+
let actions = "[]";
|
|
134
|
+
let sweepError = null;
|
|
135
|
+
try {
|
|
136
|
+
actions = drain(ctx, runtime, msg.skipLoad ? "himi.quickjs.actions" : "himi.quickjs.loads");
|
|
137
|
+
} catch (e) {
|
|
138
|
+
sweepError = String(e?.message ?? e);
|
|
139
|
+
}
|
|
140
|
+
const services = readbackJson(ctx, readback);
|
|
141
|
+
sessions.set(msg.id, {
|
|
142
|
+
runtime,
|
|
143
|
+
ctx,
|
|
144
|
+
dispatch: dispatch2,
|
|
145
|
+
actions: actionsReadback,
|
|
146
|
+
setDeadline(timeoutMs) {
|
|
147
|
+
deadline = Date.now() + (timeoutMs > 0 ? timeoutMs : 2e3);
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
keepAlive = true;
|
|
151
|
+
return { actions, error: bundleThrow ?? sweepError ?? void 0, console: services, sessionId: msg.id };
|
|
152
|
+
} finally {
|
|
153
|
+
readback.dispose();
|
|
154
|
+
if (!keepAlive) {
|
|
155
|
+
dispatch2.dispose();
|
|
156
|
+
actionsReadback.dispose();
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
} finally {
|
|
160
|
+
if (!keepAlive) {
|
|
161
|
+
try {
|
|
162
|
+
ctx.dispose();
|
|
163
|
+
} catch {
|
|
164
|
+
}
|
|
165
|
+
try {
|
|
166
|
+
runtime.dispose();
|
|
167
|
+
} catch {
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
function dispatch(msg) {
|
|
173
|
+
const session = sessions.get(msg.sessionId);
|
|
174
|
+
if (!session) throw new Error("the contained guest session is no longer available");
|
|
175
|
+
session.setDeadline(msg.timeoutMs);
|
|
176
|
+
const service = session.ctx.newString(msg.service);
|
|
177
|
+
const action = session.ctx.newString(msg.action);
|
|
178
|
+
const args = session.ctx.newString(msg.argsJson);
|
|
179
|
+
try {
|
|
180
|
+
const called = session.ctx.callFunction(
|
|
181
|
+
session.dispatch,
|
|
182
|
+
session.ctx.undefined,
|
|
183
|
+
service,
|
|
184
|
+
action,
|
|
185
|
+
args,
|
|
186
|
+
typeof msg.online === "boolean" ? msg.online ? session.ctx.true : session.ctx.false : session.ctx.undefined
|
|
187
|
+
);
|
|
188
|
+
if (called.error) {
|
|
189
|
+
const detail = session.ctx.dump(called.error);
|
|
190
|
+
called.error.dispose();
|
|
191
|
+
throw new Error(`the guest dispatch could not be started: ${String(detail?.message ?? detail)}`);
|
|
192
|
+
}
|
|
193
|
+
settlePromise(session.ctx, session.runtime, called.value, "guest dispatch");
|
|
194
|
+
drainDetachedJobs(session.ctx, session.runtime);
|
|
195
|
+
return { actions: readbackJson(session.ctx, session.actions) };
|
|
196
|
+
} finally {
|
|
197
|
+
service.dispose();
|
|
198
|
+
action.dispose();
|
|
199
|
+
args.dispose();
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
function release(sessionId) {
|
|
203
|
+
const session = sessions.get(sessionId);
|
|
204
|
+
if (!session) return;
|
|
205
|
+
sessions.delete(sessionId);
|
|
206
|
+
try {
|
|
207
|
+
session.dispatch.dispose();
|
|
208
|
+
} catch {
|
|
209
|
+
}
|
|
210
|
+
try {
|
|
211
|
+
session.actions.dispose();
|
|
212
|
+
} catch {
|
|
213
|
+
}
|
|
214
|
+
try {
|
|
215
|
+
session.ctx.dispose();
|
|
216
|
+
} catch {
|
|
217
|
+
}
|
|
218
|
+
try {
|
|
219
|
+
session.runtime.dispose();
|
|
220
|
+
} catch {
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
function drain(ctx, runtime, trigger) {
|
|
224
|
+
const trig = ctx.evalCode(`globalThis[${JSON.stringify(trigger)}]`, "himi-actions.js");
|
|
225
|
+
if (trig.error) {
|
|
226
|
+
const detail = ctx.dump(trig.error);
|
|
227
|
+
trig.error.dispose();
|
|
228
|
+
throw new Error(`the guest load sweep could not be started: ${String(detail?.message ?? detail)}`);
|
|
229
|
+
}
|
|
230
|
+
return settlePromise(ctx, runtime, trig.value, "guest load sweep");
|
|
231
|
+
}
|
|
232
|
+
function settlePromise(ctx, runtime, promise, label) {
|
|
233
|
+
try {
|
|
234
|
+
for (let i = 0; i < MAX_PUMP_ROUNDS; i++) {
|
|
235
|
+
const state = ctx.getPromiseState(promise);
|
|
236
|
+
if (state.type === "fulfilled") {
|
|
237
|
+
const out = String(ctx.dump(state.value));
|
|
238
|
+
state.value.dispose();
|
|
239
|
+
return out;
|
|
240
|
+
}
|
|
241
|
+
if (state.type === "rejected") {
|
|
242
|
+
const detail = ctx.dump(state.error);
|
|
243
|
+
state.error.dispose();
|
|
244
|
+
throw new Error(`the ${label} failed: ${String(detail?.message ?? detail)}`);
|
|
245
|
+
}
|
|
246
|
+
state.value?.dispose?.();
|
|
247
|
+
const pending = runtime.executePendingJobs();
|
|
248
|
+
if (pending.error) {
|
|
249
|
+
const detail = ctx.dump(pending.error);
|
|
250
|
+
pending.error.dispose();
|
|
251
|
+
throw new Error(`a guest job threw during the load sweep: ${String(detail?.message ?? detail)}`);
|
|
252
|
+
}
|
|
253
|
+
if (pending.value === 0) {
|
|
254
|
+
const ticked = ctx.evalCode(`globalThis["himi.quickjs.tick"]`, "himi-tick.js");
|
|
255
|
+
if (ticked.error) {
|
|
256
|
+
const detail = ctx.dump(ticked.error);
|
|
257
|
+
ticked.error.dispose();
|
|
258
|
+
throw new Error(`the guest timer pump failed: ${String(detail?.message ?? detail)}`);
|
|
259
|
+
}
|
|
260
|
+
const fired = ctx.dump(ticked.value) === true;
|
|
261
|
+
ticked.value.dispose();
|
|
262
|
+
if (fired) continue;
|
|
263
|
+
throw new Error(
|
|
264
|
+
`the ${label} is pending with no runnable jobs \u2014 a worker awaited something the sandbox never resolves (a capability this realm does not provide)`
|
|
265
|
+
);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
throw new Error(`the ${label} did not settle within ${MAX_PUMP_ROUNDS} job rounds`);
|
|
269
|
+
} finally {
|
|
270
|
+
promise.dispose();
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
function drainDetachedJobs(ctx, runtime) {
|
|
274
|
+
for (let i = 0; i < MAX_PUMP_ROUNDS; i++) {
|
|
275
|
+
const pending = runtime.executePendingJobs();
|
|
276
|
+
if (pending.error) {
|
|
277
|
+
const detail = ctx.dump(pending.error);
|
|
278
|
+
pending.error.dispose();
|
|
279
|
+
throw new Error(`a nested guest job threw after dispatch: ${String(detail?.message ?? detail)}`);
|
|
280
|
+
}
|
|
281
|
+
if (pending.value === 0) {
|
|
282
|
+
const ticked = ctx.evalCode(`globalThis["himi.quickjs.tick"]`, "himi-tick.js");
|
|
283
|
+
if (ticked.error) {
|
|
284
|
+
const detail = ctx.dump(ticked.error);
|
|
285
|
+
ticked.error.dispose();
|
|
286
|
+
throw new Error(`the nested guest timer pump failed: ${String(detail?.message ?? detail)}`);
|
|
287
|
+
}
|
|
288
|
+
const fired = ctx.dump(ticked.value) === true;
|
|
289
|
+
ticked.value.dispose();
|
|
290
|
+
if (!fired) return;
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
throw new Error(`nested guest actions did not quiesce within ${MAX_PUMP_ROUNDS} job rounds`);
|
|
294
|
+
}
|
|
295
|
+
var MAX_PUMP_ROUNDS = 1e4;
|
|
296
|
+
parentPort.on("message", (msg) => {
|
|
297
|
+
if ("end" in msg) {
|
|
298
|
+
process.exit(0);
|
|
299
|
+
}
|
|
300
|
+
const operation = msg.kind === "warm" ? realmModule().then(() => ({})) : msg.kind === "boot" ? boot(msg) : msg.kind === "dispatch" ? Promise.resolve(dispatch(msg)) : Promise.resolve((release(msg.sessionId), {}));
|
|
301
|
+
operation.then((r) => parentPort.postMessage({ id: msg.id, ...r })).catch((e) => parentPort.postMessage({ id: msg.id, error: String(e?.message ?? e) }));
|
|
302
|
+
});
|
|
303
|
+
function readbackJson(ctx, readback) {
|
|
304
|
+
const called = ctx.callFunction(readback, ctx.undefined);
|
|
305
|
+
if (called.error) {
|
|
306
|
+
const detail = ctx.dump(called.error);
|
|
307
|
+
called.error.dispose();
|
|
308
|
+
throw new Error(String(detail?.message ?? detail));
|
|
309
|
+
}
|
|
310
|
+
const dumped = ctx.dump(called.value);
|
|
311
|
+
called.value.dispose();
|
|
312
|
+
return String(dumped);
|
|
313
|
+
}
|
|
@@ -6,7 +6,7 @@ repurposed when human wording changes. New codes may be added; consumers must
|
|
|
6
6
|
handle an unknown code as a failure, without parsing prose.
|
|
7
7
|
|
|
8
8
|
**Rollout:** this contract is enforced for **`himi push`**, including `--only`,
|
|
9
|
-
first, for **`himi store iap connect`**, for **`himi site member-app`**, for **`himi fidelity`**, for the **`himi base44`** entity and function verbs, and for **`himi l10n import`**. Other subcommands still have legacy failures without codes and are a
|
|
9
|
+
first, for **`himi publish-size`**, for **`himi store iap connect`**, for **`himi site member-app`**, for **`himi fidelity`**, for the **`himi base44`** entity and function verbs, and for **`himi l10n import`**. Other subcommands still have legacy failures without codes and are a
|
|
10
10
|
follow-up migration. This is an additive change: existing `error`, `errors`,
|
|
11
11
|
`message`, `hint`, status, body, and gate-specific fields stay as they were.
|
|
12
12
|
Some legacy envelopes have no singular `error` or `hint`; consumers must not
|
|
@@ -47,6 +47,22 @@ keeps its existing fields and adds the code:
|
|
|
47
47
|
| `source_icon_unavailable` | Verified source evidence or its logo is missing, unreadable, unavailable, over the download/decoding budget, or cannot be normalized. |
|
|
48
48
|
| `source_icon_unusable` | The prepared source mark fails mechanical launcher/store checks. Existing icon files and metadata are left unchanged. |
|
|
49
49
|
|
|
50
|
+
## `himi publish-size` codes
|
|
51
|
+
|
|
52
|
+
This local planning command never claims or publishes. Every failure includes
|
|
53
|
+
`pushed: false` and `claimed: false`.
|
|
54
|
+
|
|
55
|
+
| Code | Meaning |
|
|
56
|
+
| --- | --- |
|
|
57
|
+
| `invalid_usage` | Unsupported, repeated, missing or invalid measurement options (exit 2). Publishing flags are refused. |
|
|
58
|
+
| `build_failed` | The contained local release could not be built completely, required host/network access, or the isolated build failed; measuring missing screens or bundles would undercount (exit 1). |
|
|
59
|
+
| `app_source_contains_secrets` | The shared source scanner found possible credentials (exit 1). |
|
|
60
|
+
| `app_source_too_large` | The base64 source archive exceeds its independent limit (exit 1). |
|
|
61
|
+
| `publish_body_too_large` | Measured draft JSON plus the explicit metadata planning reserve exceeds the publish budget (exit 1). `bodyBytes` and `overageBytes` describe the measured envelope; `planningBytes` and `planningOverageBytes` also include the reserve. |
|
|
62
|
+
|
|
63
|
+
`ok: true` means the measured draft plus its reserve fits. It does not certify
|
|
64
|
+
publication readiness or bound metadata not yet supplied to the final push.
|
|
65
|
+
|
|
50
66
|
## `himi one-app validate-payments` codes
|
|
51
67
|
|
|
52
68
|
| Code | Meaning |
|
|
@@ -58,6 +74,19 @@ keeps its existing fields and adds the code:
|
|
|
58
74
|
The checker validates recorded evidence and decisions; it does not independently
|
|
59
75
|
verify merchant readiness or create transactions. General publication remains unchanged.
|
|
60
76
|
|
|
77
|
+
## `himi one-app validate-identity` codes
|
|
78
|
+
|
|
79
|
+
| Code | Meaning |
|
|
80
|
+
| --- | --- |
|
|
81
|
+
| `invalid_usage` | Missing, repeated or unsupported identity-check arguments. |
|
|
82
|
+
| `identity_source_unverified` | Collected source hashes or the business display name cannot be verified. Recollect older evidence that did not save business identity. |
|
|
83
|
+
| `identity_target_unverified` | The technical app slug, target compilation or complete built descriptors are unavailable. |
|
|
84
|
+
| `literal_slug_visible` | Built display text or the known business-chat identity seed contains the technical slug instead of the collected business identity, without matching exact authored source copy. |
|
|
85
|
+
|
|
86
|
+
The check reads built descriptors, not every possible runtime string. A passing
|
|
87
|
+
result does not verify dynamic live data, translations, branding images or device
|
|
88
|
+
appearance. It does not change publication or coverage policy.
|
|
89
|
+
|
|
61
90
|
## Push codes
|
|
62
91
|
|
|
63
92
|
| Code | Meaning |
|
|
@@ -16,7 +16,7 @@ Use this companion to the [Structure inference guide](https://apps.wix.com/_api/
|
|
|
16
16
|
- Existing screen builders often return a complete screen. Preserve the source inline placement using supported composition; do not replace a mixed source screen with an unrelated full vertical screen.
|
|
17
17
|
- Map data selectors, labels/media, design, permissions, CTA parameters and target destinations. The source definition's `settingsData.componentId` identifies a source editor component, not a Himalaya implementation or a complete settings schema.
|
|
18
18
|
|
|
19
|
-
Source snapshots: Catalyst `617c06d43d2a5608b6876d724553269b1e5346f0`; Himalaya `97f1542f2f7d6e8cb7a902b912c87dcaa37e5a67`. GitHub references are pinned to these inspected versions. Recheck implementation contracts if using another version. No customer data was fetched, no app was generated, and no parity tests were run for
|
|
19
|
+
Source snapshots: Catalyst `617c06d43d2a5608b6876d724553269b1e5346f0`; Himalaya `97f1542f2f7d6e8cb7a902b912c87dcaa37e5a67`. GitHub references are pinned to these inspected versions. Recheck implementation contracts if using another version. No customer data was fetched, no app was generated, and no parity tests were run for the original documentation inventory. The Pages row now links the current source-selected editorial reconstruction recipe; its capture/decoder tests do not certify an individual app’s parity.
|
|
20
20
|
|
|
21
21
|
## Coverage summary
|
|
22
22
|
|
|
@@ -24,9 +24,9 @@ Source snapshots: Catalyst `617c06d43d2a5608b6876d724553269b1e5346f0`; Himalaya
|
|
|
24
24
|
| --- | ---: |
|
|
25
25
|
| Module | 13 |
|
|
26
26
|
| Primitive | 7 |
|
|
27
|
-
| Composition |
|
|
27
|
+
| Composition | 9 |
|
|
28
28
|
| Partial | 24 |
|
|
29
|
-
| Empty |
|
|
29
|
+
| Empty | 24 |
|
|
30
30
|
| Total | 77 |
|
|
31
31
|
|
|
32
32
|
## Mappings by server group
|
|
@@ -51,6 +51,32 @@ The **Himalaya implementation** cell is blank for every unassigned row. Notes on
|
|
|
51
51
|
| `achievements_carousel_section` | `wix-one-app-achievements.MemberChallengesCarousel` | [Programs data/detail](https://github.com/wix-private/himalaya/blob/97f1542f2f7d6e8cb7a902b912c87dcaa37e5a67/core/dev-server/tier5-bundles-src/himi-branded-lite-programs/index.ts "audience-lint-ok: optional pinned upstream evidence, not a local authoring dependency") + [Core Carousel](https://github.com/wix-private/himalaya/blob/97f1542f2f7d6e8cb7a902b912c87dcaa37e5a67/core/dev-server/src/builder.ts "audience-lint-ok: optional pinned upstream evidence, not a local authoring dependency") | Existing base; adaptation needed | Partial | Reuse the Programs feature and compose a carousel; preserve source extraProps.limit=5 and selected programs. No ready-made legacy Challenges carousel adapter is claimed. |
|
|
52
52
|
| `achievements_participant_carousel_section` | `wix-one-app-achievements.ParticipantChallengesCarousel` | | | Empty | The public Programs catalog is not a member-participating-programs carousel. No verified consumer participant/progress list implementation was found. |
|
|
53
53
|
|
|
54
|
+
For authored Programs sections, pass the source settings as a JSON string in the
|
|
55
|
+
`programsSection` parameter to `tier5.himiBrandedPrograms.load`:
|
|
56
|
+
|
|
57
|
+
```js
|
|
58
|
+
const programsSection = JSON.stringify({ settings: {
|
|
59
|
+
sortingSettings: { ordering: "MANUAL", challengesOrder: ["program-id-b", "program-id-a"] },
|
|
60
|
+
} });
|
|
61
|
+
// Source IDs come from the collected section, never customer-specific constants in a template.
|
|
62
|
+
const onAppear = { actionId: "tier5.himiBrandedPrograms.load", params: { programsSection } };
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
The worker also reads the same string from navigation input at boot. Preserve it
|
|
66
|
+
in the authored section's onAppear params when forwarding the copy pack. A
|
|
67
|
+
copy-only load or Retry retains the last settings. Sending an explicit empty
|
|
68
|
+
settings object, `DEFAULT`, or an empty manual order restores the complete
|
|
69
|
+
newest-first catalog. Manual ordering puts known configured IDs first, then all
|
|
70
|
+
remaining Programs in catalog order; it is not an inclusion list. Stale and
|
|
71
|
+
repeated IDs add no cards. Each worker instance retains its own source settings.
|
|
72
|
+
The collection's member-selected A–Z/Z–A sort still overrides its default order;
|
|
73
|
+
pass `collectionSort: "default"` when opening a source section that must start in
|
|
74
|
+
source order. The member list (`himi_member_programs`) does not read
|
|
75
|
+
`programsSection` and has no manual order yet. This is an authoring recipe, not an
|
|
76
|
+
automatic section importer.
|
|
77
|
+
Category selection, participant status/counts, display flags, limits, See All and
|
|
78
|
+
carousel placement remain separate gaps; the mappings above stay Partial.
|
|
79
|
+
|
|
54
80
|
### 3. bookings-section-definitions.json
|
|
55
81
|
|
|
56
82
|
[Server definitions](https://github.com/wix-private/catalyst-server/blob/617c06d43d2a5608b6876d724553269b1e5346f0/one-app-sections/one-app-sections-definitions/src/main/resources/sections/bookings-section-definitions.json) · 4 definition(s).
|
|
@@ -143,7 +169,7 @@ The **Himalaya implementation** cell is blank for every unassigned row. Notes on
|
|
|
143
169
|
|
|
144
170
|
| Source sectionDefinitionId | Source viewer component | Himalaya implementation | Placement / reuse | Class | Settings, actions and gaps |
|
|
145
171
|
| --- | --- | --- | --- | --- | --- |
|
|
146
|
-
| `pages_section` | `Pages.SectionPageClientScreen` |
|
|
172
|
+
| `pages_section` | `Pages.SectionPageClientScreen` | [Pages capture recipe](https://apps.wix.com/_api/himi-serve/docs/one-app-to-himi-app.md#referenced-pages-content) / `oneAppPageSection` | Editable inline native RichContent | Composition | Select `settings.value.pageId`; use the collector’s Visitor-only referenced read and `pages-content.json`. Preserve source placement order, text, formatting and links. Ready/empty captures can be reconstructed; missing, forbidden, malformed and unsupported captures remain explicit gaps. This is editorial reconstruction, not a live runtime Pages adapter. |
|
|
147
173
|
|
|
148
174
|
### 12. photoalbum-section-definitions.json
|
|
149
175
|
|
|
@@ -332,7 +358,6 @@ These are the exact definitions whose target cells above remain empty. “Not fo
|
|
|
332
358
|
| `loyalty-section-definitions.json` | `loyalty_status_section` | The existing Loyalty worker lists the program and rewards but does not load this member's points balance/tier/status. A rewards catalog is not a loyalty-status widget. |
|
|
333
359
|
| `referrals-section-definitions.json` | `referrals_refer_section` | No consumer referral-code/link sharing and referral-status feature was found. Do not map to Loyalty or generic sharing without a user decision. A visitor-readable program read exists; see the row above. |
|
|
334
360
|
| `referrals-section-definitions.json` | `referrals_description_section` | No referral-program description/data implementation was found. Text primitives alone do not resolve the business-bound referral content. A visitor-readable program read exists; see the row above. |
|
|
335
|
-
| `pages-section-definitions.json` | `pages_section` | No matching Wix Pages content fetch/render adapter was found. Generic CMS or RichContent renderers do not identify the original page entity or its data contract. |
|
|
336
361
|
| `photoalbum-section-definitions.json` | `photoAlbums_list_section` | Existing Photo Albums code is an empty-state placeholder with no album API wired. Pro Gallery uses a different data source and is not a substitute; choose an implementation explicitly. |
|
|
337
362
|
| `photoalbum-section-definitions.json` | `photoAlbums_photos_list` | Existing Photo Albums code is an empty-state placeholder with no album API wired. Pro Gallery uses a different data source and is not a substitute; choose an implementation explicitly. |
|
|
338
363
|
| `photoalbum-section-definitions.json` | `photoAlbums_carousel_section` | Existing Photo Albums code is an empty-state placeholder with no album API wired. Pro Gallery uses a different data source and is not a substitute; choose an implementation explicitly. |
|