@wix/himalaya-cli 0.1675.0 → 0.1677.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/browser-plane/assets.json +5 -5
- package/dist/browser-plane/preview-deferred/{0f5533bf4197dc43489701db18378cecdb02db230a0fc2603e764999544513da.bin → 4a260ef73a6f9f421a9119eac3d67bb9978e67b44c66a870038d189e6c77a0bd.bin} +1 -1
- package/dist/browser-plane/sw.js +9 -9
- package/dist/cli.mjs +618 -434
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/designing-himi-screens.md +8 -0
- package/guides/getting-started.md +2 -2
- package/guides/himi-json-output.md +20 -1
- package/guides/himi-skill.md +2 -2
- package/guides/skill.md +1 -1
- package/guides/templates.md +5 -2
- package/package.json +2 -2
package/dist/cli.mjs
CHANGED
|
@@ -2780,8 +2780,8 @@ async function readWip(store, app2) {
|
|
|
2780
2780
|
if (!wipSupported(store)) return "unsupported";
|
|
2781
2781
|
const { wip, promoted } = normalizeWipRecord(await store.getWipRecord(app2));
|
|
2782
2782
|
if (!wip || promoted.some((p2) => p2.id === wip.releaseId)) return null;
|
|
2783
|
-
const
|
|
2784
|
-
return
|
|
2783
|
+
const live4 = await store.getManifest(app2);
|
|
2784
|
+
return live4?.releaseId === wip.releaseId ? null : wip;
|
|
2785
2785
|
}
|
|
2786
2786
|
var storedTime;
|
|
2787
2787
|
var init_wip_pointer = __esm({
|
|
@@ -2802,15 +2802,15 @@ function validateFunctionManifest(manifest2) {
|
|
|
2802
2802
|
throw new Error(`ReleaseManifest.functions[${fn2.name}] references missing bundle "${fn2.bundleHash}".`);
|
|
2803
2803
|
}
|
|
2804
2804
|
}
|
|
2805
|
-
for (const
|
|
2806
|
-
if (!bundleHashes.has(
|
|
2807
|
-
throw new Error(`ReleaseManifest.functionSchedules[${
|
|
2805
|
+
for (const schedule2 of manifest2.functionSchedules ?? []) {
|
|
2806
|
+
if (!bundleHashes.has(schedule2.bundleHash)) {
|
|
2807
|
+
throw new Error(`ReleaseManifest.functionSchedules[${schedule2.name}] references missing bundle "${schedule2.bundleHash}".`);
|
|
2808
2808
|
}
|
|
2809
|
-
const target = functionsByName.get(
|
|
2810
|
-
if (!target) throw new Error(`ReleaseManifest.functionSchedules[${
|
|
2811
|
-
if (target.bundleHash !==
|
|
2809
|
+
const target = functionsByName.get(schedule2.functionName);
|
|
2810
|
+
if (!target) throw new Error(`ReleaseManifest.functionSchedules[${schedule2.name}] references missing function "${schedule2.functionName}".`);
|
|
2811
|
+
if (target.bundleHash !== schedule2.bundleHash) throw new Error(`ReleaseManifest.functionSchedules[${schedule2.name}] bundle does not match function "${schedule2.functionName}".`);
|
|
2812
2812
|
if (target.wixIdentity !== "installation" || target.wixPermissions.length === 0) {
|
|
2813
|
-
throw new Error(`ReleaseManifest.functionSchedules[${
|
|
2813
|
+
throw new Error(`ReleaseManifest.functionSchedules[${schedule2.name}] requires an installation-identity function.`);
|
|
2814
2814
|
}
|
|
2815
2815
|
}
|
|
2816
2816
|
}
|
|
@@ -21168,7 +21168,7 @@ function inputJson(input) {
|
|
|
21168
21168
|
const json9 = JSON.stringify(input ?? {});
|
|
21169
21169
|
return json9 === void 0 ? "{}" : json9;
|
|
21170
21170
|
}
|
|
21171
|
-
function timerGlobals(hide,
|
|
21171
|
+
function timerGlobals(hide, live4) {
|
|
21172
21172
|
const hidden = new Set(hide ?? []);
|
|
21173
21173
|
const stubs = {
|
|
21174
21174
|
setTimeout: " globalThis.setTimeout = function () { return 0; };",
|
|
@@ -21194,7 +21194,7 @@ function timerGlobals(hide, live3) {
|
|
|
21194
21194
|
setInterval: " globalThis.setInterval = function () { return 0; };",
|
|
21195
21195
|
clearInterval: " globalThis.clearInterval = function () {};"
|
|
21196
21196
|
};
|
|
21197
|
-
const decls =
|
|
21197
|
+
const decls = live4 ? real : stubs;
|
|
21198
21198
|
return Object.entries(decls).filter(([name]) => !hidden.has(name)).map(([, src]) => src).join("\n");
|
|
21199
21199
|
}
|
|
21200
21200
|
function connectivityOnline(host) {
|
|
@@ -22252,7 +22252,7 @@ function createQuickJsWorkerRealm(options2 = {}) {
|
|
|
22252
22252
|
);
|
|
22253
22253
|
return thread;
|
|
22254
22254
|
}
|
|
22255
|
-
function answer(envelope,
|
|
22255
|
+
function answer(envelope, seq3) {
|
|
22256
22256
|
const bytes2 = encoder.encode(envelope);
|
|
22257
22257
|
if (bytes2.length > data.length) {
|
|
22258
22258
|
const err = encoder.encode(
|
|
@@ -22264,7 +22264,7 @@ function createQuickJsWorkerRealm(options2 = {}) {
|
|
|
22264
22264
|
data.set(bytes2);
|
|
22265
22265
|
Atomics.store(ctl, CTL_LEN, bytes2.length);
|
|
22266
22266
|
}
|
|
22267
|
-
Atomics.store(ctl, CTL_SEQ,
|
|
22267
|
+
Atomics.store(ctl, CTL_SEQ, seq3);
|
|
22268
22268
|
Atomics.store(ctl, CTL_READY, 1);
|
|
22269
22269
|
Atomics.notify(ctl, CTL_READY);
|
|
22270
22270
|
}
|
|
@@ -38043,7 +38043,7 @@ import { createHash as createHash11 } from "node:crypto";
|
|
|
38043
38043
|
function captureAccountSession(req, opts = {}) {
|
|
38044
38044
|
const env = opts.env ?? process.env;
|
|
38045
38045
|
const now = opts.now ?? Date.now();
|
|
38046
|
-
const
|
|
38046
|
+
const live4 = (cookie) => {
|
|
38047
38047
|
const ws2 = /(?:^|;\s*)wixSession2=([^;]+)/.exec(cookie)?.[1];
|
|
38048
38048
|
if (!ws2) return false;
|
|
38049
38049
|
let value2 = ws2;
|
|
@@ -38054,10 +38054,10 @@ function captureAccountSession(req, opts = {}) {
|
|
|
38054
38054
|
return !isWixSessionExpired(value2, now);
|
|
38055
38055
|
};
|
|
38056
38056
|
const fromRequest = forwardableWixSessionCookies(req.headers.cookie);
|
|
38057
|
-
if (fromRequest &&
|
|
38057
|
+
if (fromRequest && live4(fromRequest)) return { cookie: fromRequest, source: "cookie" };
|
|
38058
38058
|
if (!opts.machineSession) return null;
|
|
38059
38059
|
const fromEnv = forwardableWixSessionCookies(env.HIMI_WEB_ACCOUNT_COOKIE);
|
|
38060
|
-
if (fromEnv &&
|
|
38060
|
+
if (fromEnv && live4(fromEnv)) return { cookie: fromEnv, source: "env" };
|
|
38061
38061
|
let fromFile = "";
|
|
38062
38062
|
try {
|
|
38063
38063
|
fromFile = readFileSync31(opts.dpxSessionPath ?? pathJoin2(homedir5(), ".dpx", "session", "wix-session"), "utf8").trim();
|
|
@@ -38065,7 +38065,7 @@ function captureAccountSession(req, opts = {}) {
|
|
|
38065
38065
|
}
|
|
38066
38066
|
if (fromFile && /^[^;\s=]+$/.test(fromFile)) {
|
|
38067
38067
|
const cookie = `wixSession2=${fromFile}`;
|
|
38068
|
-
if (
|
|
38068
|
+
if (live4(cookie)) return { cookie, source: "file" };
|
|
38069
38069
|
}
|
|
38070
38070
|
return null;
|
|
38071
38071
|
}
|
|
@@ -40783,8 +40783,8 @@ function ImagePreviewScope({ node: node3, ctx, render: render3 }) {
|
|
|
40783
40783
|
const id = React2.useId();
|
|
40784
40784
|
const ref = React2.useRef(null);
|
|
40785
40785
|
const prepared = React2.useRef();
|
|
40786
|
-
const
|
|
40787
|
-
|
|
40786
|
+
const live4 = React2.useRef({ node: node3, ctx });
|
|
40787
|
+
live4.current = { node: node3, ctx };
|
|
40788
40788
|
const mode = String(node3.modifiers?.imagePreview);
|
|
40789
40789
|
const painted2 = React2.useRef({});
|
|
40790
40790
|
const collections2 = React2.useRef(/* @__PURE__ */ new Map());
|
|
@@ -40808,13 +40808,13 @@ function ImagePreviewScope({ node: node3, ctx, render: render3 }) {
|
|
|
40808
40808
|
const video = target.dataset.previewKind === "video" ? target.querySelector("video") ?? void 0 : void 0;
|
|
40809
40809
|
if (video && !event.target.closest("[data-preview-open-video]")) return;
|
|
40810
40810
|
event.stopPropagation();
|
|
40811
|
-
const { node: node4, ctx: ctx2 } =
|
|
40811
|
+
const { node: node4, ctx: ctx2 } = live4.current;
|
|
40812
40812
|
if (!ctx2.onAction) return;
|
|
40813
40813
|
if (prepared.current?.node !== node4) {
|
|
40814
|
-
prepared.current = { node: node4, gallery: new ImagePreviewGallery(() => node4, (path2) =>
|
|
40814
|
+
prepared.current = { node: node4, gallery: new ImagePreviewGallery(() => node4, (path2) => live4.current.ctx.provider?.value(path2), false) };
|
|
40815
40815
|
}
|
|
40816
|
-
prepared.current.gallery.env = (raw) => evalEnvExpr(raw, ctxEnv(
|
|
40817
|
-
prepared.current.gallery.translate = (text22) => resolveTranslation(text22,
|
|
40816
|
+
prepared.current.gallery.env = (raw) => evalEnvExpr(raw, ctxEnv(live4.current.ctx));
|
|
40817
|
+
prepared.current.gallery.translate = (text22) => resolveTranslation(text22, live4.current.ctx.catalog);
|
|
40818
40818
|
const items = prepared.current.gallery.items(ctx2.itemScope ?? {}, painted2.current).filter((i2) => video ? i2.kind === "video" && JSON.stringify([i2.nodeId, ...i2.rowKeys ?? []]) === target.dataset.previewIdentity : i2.kind !== "video");
|
|
40819
40819
|
const identity = target.dataset.previewIdentity;
|
|
40820
40820
|
const identityFor = (item2) => JSON.stringify([item2.nodeId, ...item2.rowKeys ?? []]);
|
|
@@ -42113,13 +42113,13 @@ function easeScroll(all, instant2) {
|
|
|
42113
42113
|
return ANCHOR_JUMP_MS;
|
|
42114
42114
|
}
|
|
42115
42115
|
function useTopAnchorReport(root, anchors, report9, content) {
|
|
42116
|
-
const
|
|
42117
|
-
|
|
42116
|
+
const live4 = React8.useRef({ anchors, report: report9 });
|
|
42117
|
+
live4.current = { anchors, report: report9 };
|
|
42118
42118
|
const tracker = React8.useRef(null);
|
|
42119
42119
|
if (!tracker.current) {
|
|
42120
42120
|
tracker.current = new TopAnchorTracker(
|
|
42121
|
-
() => readTopAnchor(
|
|
42122
|
-
(id) =>
|
|
42121
|
+
() => readTopAnchor(live4.current.anchors?.() ?? []),
|
|
42122
|
+
(id) => live4.current.report(id)
|
|
42123
42123
|
);
|
|
42124
42124
|
}
|
|
42125
42125
|
const t2 = tracker.current;
|
|
@@ -42141,7 +42141,7 @@ function useTopAnchorReport(root, anchors, report9, content) {
|
|
|
42141
42141
|
};
|
|
42142
42142
|
}, [on4, t2, root]);
|
|
42143
42143
|
return React8.useCallback((ms2) => {
|
|
42144
|
-
if (
|
|
42144
|
+
if (live4.current.anchors) t2.jump(ms2);
|
|
42145
42145
|
}, [t2]);
|
|
42146
42146
|
}
|
|
42147
42147
|
var TOP_ANCHOR_TOLERANCE_PX, TOP_ANCHOR_SETTLE_MS, TOP_ANCHOR_JUMP_GRACE_MS, ANCHOR_JUMP_MS, SCROLL_SLACK_PX, tweens, INTERRUPTS, TopAnchorTracker;
|
|
@@ -43248,6 +43248,114 @@ var init_motionDefaults = __esm({
|
|
|
43248
43248
|
}
|
|
43249
43249
|
});
|
|
43250
43250
|
|
|
43251
|
+
// ../../core/web-renderer/src/inScreenMatch.ts
|
|
43252
|
+
function matchInScreen(before, after, opts = {}) {
|
|
43253
|
+
if (opts.reduceMotion) return [];
|
|
43254
|
+
const claimed = new Set(opts.claimed ?? []);
|
|
43255
|
+
const group = (entries) => {
|
|
43256
|
+
const m2 = /* @__PURE__ */ new Map();
|
|
43257
|
+
for (const e2 of entries) {
|
|
43258
|
+
if (!e2.id) continue;
|
|
43259
|
+
const list4 = m2.get(e2.id);
|
|
43260
|
+
if (list4) list4.push(e2);
|
|
43261
|
+
else m2.set(e2.id, [e2]);
|
|
43262
|
+
}
|
|
43263
|
+
return m2;
|
|
43264
|
+
};
|
|
43265
|
+
const b2 = group(before);
|
|
43266
|
+
const a2 = group(after);
|
|
43267
|
+
const out2 = [];
|
|
43268
|
+
for (const [id, was] of b2) {
|
|
43269
|
+
const now = a2.get(id);
|
|
43270
|
+
if (claimed.has(id) || was.length !== 1 || !now || now.length !== 1) continue;
|
|
43271
|
+
if (was[0].key === now[0].key || scopeOf(was[0]) !== scopeOf(now[0])) continue;
|
|
43272
|
+
out2.push(id);
|
|
43273
|
+
}
|
|
43274
|
+
return out2.sort();
|
|
43275
|
+
}
|
|
43276
|
+
function morphTiming(transition) {
|
|
43277
|
+
const m2 = /(\d+(?:\.\d+)?)(ms|s)\b\s*(.*)$/.exec(transition ?? "");
|
|
43278
|
+
if (!m2) return { duration: 200, easing: "ease-in-out" };
|
|
43279
|
+
return { duration: m2[2] === "s" ? Number(m2[1]) * 1e3 : Number(m2[1]), easing: m2[3].trim() || "ease-in-out" };
|
|
43280
|
+
}
|
|
43281
|
+
function rectOf(el2) {
|
|
43282
|
+
if (!el2) return null;
|
|
43283
|
+
const r3 = el2.getBoundingClientRect();
|
|
43284
|
+
return { left: r3.left, top: r3.top, width: r3.width, height: r3.height };
|
|
43285
|
+
}
|
|
43286
|
+
function noteEnter(e2) {
|
|
43287
|
+
live.set(e2.key, e2);
|
|
43288
|
+
entered.add(e2.key);
|
|
43289
|
+
schedule();
|
|
43290
|
+
}
|
|
43291
|
+
function noteLeave(key3, measure2) {
|
|
43292
|
+
const was = live.get(key3);
|
|
43293
|
+
live.delete(key3);
|
|
43294
|
+
entered.delete(key3);
|
|
43295
|
+
if (was) departed.push({ id: was.id, key: key3, scope: was.scope, rect: rectOf(measure2), radius: measure2 ? getComputedStyle(measure2).borderRadius : "" });
|
|
43296
|
+
schedule();
|
|
43297
|
+
}
|
|
43298
|
+
function schedule() {
|
|
43299
|
+
if (scheduled) return;
|
|
43300
|
+
scheduled = true;
|
|
43301
|
+
queueMicrotask(flush);
|
|
43302
|
+
}
|
|
43303
|
+
function navigating() {
|
|
43304
|
+
return typeof document !== "undefined" && !!document.activeViewTransition;
|
|
43305
|
+
}
|
|
43306
|
+
function flush() {
|
|
43307
|
+
scheduled = false;
|
|
43308
|
+
const left = departed;
|
|
43309
|
+
const arrived = entered;
|
|
43310
|
+
departed = [];
|
|
43311
|
+
entered = /* @__PURE__ */ new Set();
|
|
43312
|
+
if (!left.length || !arrived.size) return;
|
|
43313
|
+
const reduce = typeof matchMedia === "function" && matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
43314
|
+
const nav = navigating();
|
|
43315
|
+
for (const scope3 of new Set(left.map(scopeOf))) playScope(scope3, left.filter((d2) => scopeOf(d2) === scope3), arrived, reduce, nav);
|
|
43316
|
+
}
|
|
43317
|
+
function playScope(scope3, left, arrived, reduce, nav) {
|
|
43318
|
+
const touched = new Set(left.map((d2) => d2.id));
|
|
43319
|
+
const after = [...live.values()].filter((l2) => touched.has(l2.id) && scopeOf(l2) === scope3);
|
|
43320
|
+
const before = [...after.filter((l2) => !arrived.has(l2.key)), ...left];
|
|
43321
|
+
const matched = matchInScreen(before, after, { reduceMotion: reduce, claimed: nav ? touched : [] });
|
|
43322
|
+
for (const id of matched) {
|
|
43323
|
+
const from = left.find((d2) => d2.id === id);
|
|
43324
|
+
const to2 = after.find((l2) => l2.id === id);
|
|
43325
|
+
const el2 = to2?.el();
|
|
43326
|
+
if (!from?.rect || !to2 || !el2 || typeof el2.animate !== "function") continue;
|
|
43327
|
+
const last = rectOf(el2);
|
|
43328
|
+
if (!last || last.width === 0 || last.height === 0) continue;
|
|
43329
|
+
const dx = from.rect.left + from.rect.width / 2 - (last.left + last.width / 2);
|
|
43330
|
+
const dy = from.rect.top + from.rect.height / 2 - (last.top + last.height / 2);
|
|
43331
|
+
const sx = from.rect.width / last.width;
|
|
43332
|
+
const sy = from.rect.height / last.height;
|
|
43333
|
+
const style = getComputedStyle(el2);
|
|
43334
|
+
const own6 = style.transform && style.transform !== "none" ? style.transform : "";
|
|
43335
|
+
const toRadius = style.borderRadius;
|
|
43336
|
+
el2.animate(
|
|
43337
|
+
[
|
|
43338
|
+
{ transform: `translate(${dx}px, ${dy}px) scale(${sx}, ${sy})${own6 ? ` ${own6}` : ""}`, borderRadius: from.radius || toRadius },
|
|
43339
|
+
{ transform: own6 || "none", borderRadius: toRadius }
|
|
43340
|
+
],
|
|
43341
|
+
{ duration: to2.duration, easing: to2.easing }
|
|
43342
|
+
);
|
|
43343
|
+
}
|
|
43344
|
+
}
|
|
43345
|
+
var scopeOf, live, departed, entered, scheduled, seq, nextMorphKey;
|
|
43346
|
+
var init_inScreenMatch = __esm({
|
|
43347
|
+
"../../core/web-renderer/src/inScreenMatch.ts"() {
|
|
43348
|
+
init_define_HHP_CATALOG();
|
|
43349
|
+
scopeOf = (e2) => e2.scope ?? "s";
|
|
43350
|
+
live = /* @__PURE__ */ new Map();
|
|
43351
|
+
departed = [];
|
|
43352
|
+
entered = /* @__PURE__ */ new Set();
|
|
43353
|
+
scheduled = false;
|
|
43354
|
+
seq = 0;
|
|
43355
|
+
nextMorphKey = () => `m${++seq}`;
|
|
43356
|
+
}
|
|
43357
|
+
});
|
|
43358
|
+
|
|
43251
43359
|
// ../../core/web-renderer/src/boundTransforms.ts
|
|
43252
43360
|
function boundNumber(value2) {
|
|
43253
43361
|
if (typeof value2 === "number") return Number.isFinite(value2) ? value2 : void 0;
|
|
@@ -43567,8 +43675,8 @@ function createRicosHostSession(o2) {
|
|
|
43567
43675
|
const t2 = o2.timers ?? realTimers;
|
|
43568
43676
|
const flushMs = o2.flushTimeoutMs ?? RICOS_HOST_DEFAULTS.flushTimeoutMs;
|
|
43569
43677
|
const debounceMs = o2.onChangeDebounceMs ?? RICOS_HOST_DEFAULTS.onChangeDebounceMs;
|
|
43570
|
-
let
|
|
43571
|
-
const newId = o2.newId ?? (() => `rq${Date.now().toString(36)}${++
|
|
43678
|
+
let seq3 = 0;
|
|
43679
|
+
const newId = o2.newId ?? (() => `rq${Date.now().toString(36)}${++seq3}`);
|
|
43572
43680
|
const state = { ready: false, unavailable: null, dirty: false, toolbar: EMPTY_TOOLBAR, focused: false };
|
|
43573
43681
|
let locale = o2.locale;
|
|
43574
43682
|
let rtl = o2.rtl;
|
|
@@ -43990,7 +44098,7 @@ function RichContentEditorView({ props: props2, ctx, wrap, nodeId, renderChild,
|
|
|
43990
44098
|
const C2 = ctx.color;
|
|
43991
44099
|
const name = typeof props2.name === "string" && props2.name ? props2.name : void 0;
|
|
43992
44100
|
const bag = React13.useContext(FormValuesContext);
|
|
43993
|
-
const
|
|
44101
|
+
const live4 = !!ctx.onAction;
|
|
43994
44102
|
const toolsKey = JSON.stringify(props2.tools ?? null);
|
|
43995
44103
|
const tools = React13.useMemo(() => effectiveTools(props2.tools, props2.uploadService), [toolsKey, props2.uploadService]);
|
|
43996
44104
|
const seedMode = typeof props2.documentJson === "string" ? "literal" : typeof props2.documentPath === "string" && props2.documentPath ? "binding" : "none";
|
|
@@ -44033,11 +44141,11 @@ function RichContentEditorView({ props: props2, ctx, wrap, nodeId, renderChild,
|
|
|
44033
44141
|
const fireOnChangeRef = React13.useRef(fireOnChange);
|
|
44034
44142
|
fireOnChangeRef.current = fireOnChange;
|
|
44035
44143
|
React13.useEffect(() => {
|
|
44036
|
-
if (
|
|
44037
|
-
}, [
|
|
44144
|
+
if (live4) setSrc(new URL(ENGINE_PAGE_PATH, document.baseURI).toString());
|
|
44145
|
+
}, [live4]);
|
|
44038
44146
|
React13.useEffect(() => {
|
|
44039
44147
|
const frame = iframeRef.current;
|
|
44040
|
-
if (!
|
|
44148
|
+
if (!live4 || !src || !frame) return;
|
|
44041
44149
|
const t2 = ricosEditorWebTimings;
|
|
44042
44150
|
const session = createRicosHostSession({
|
|
44043
44151
|
send: (msg) => frame.contentWindow?.postMessage({ ricos: 1, msg }, "*"),
|
|
@@ -44082,7 +44190,7 @@ function RichContentEditorView({ props: props2, ctx, wrap, nodeId, renderChild,
|
|
|
44082
44190
|
session.dispose();
|
|
44083
44191
|
sessionRef.current = null;
|
|
44084
44192
|
};
|
|
44085
|
-
}, [
|
|
44193
|
+
}, [live4, src]);
|
|
44086
44194
|
React13.useEffect(() => {
|
|
44087
44195
|
sessionRef.current?.updateLocale(ctx.localeTag ?? "en", ctx.isRTL ?? document.documentElement.dir === "rtl");
|
|
44088
44196
|
}, [ctx.localeTag, ctx.isRTL]);
|
|
@@ -44141,7 +44249,7 @@ function RichContentEditorView({ props: props2, ctx, wrap, nodeId, renderChild,
|
|
|
44141
44249
|
setLink(null);
|
|
44142
44250
|
};
|
|
44143
44251
|
const root = { position: "relative", display: "flex", flexDirection: "column", width: "100%", ...fill ? { flex: "1 1 auto" } : {}, minHeight, ...wrap };
|
|
44144
|
-
if (!
|
|
44252
|
+
if (!live4) {
|
|
44145
44253
|
const { paddingTop: _t2, paddingBottom: _b, paddingLeft: _l2, paddingRight: _r2, ...rootNoSides } = root;
|
|
44146
44254
|
const own6 = { ...rootNoSides, border: `1px solid ${C2("border", "#e3e3e3")}`, borderRadius: 8, padding: 12, boxSizing: "border-box" };
|
|
44147
44255
|
return /* @__PURE__ */ jsx8("div", { ...dom, style: addIntrinsicPadding(own6, wrap) ?? own6, children: /* @__PURE__ */ jsx8("span", { style: { color: C2("textSecondary", "#636B78") }, children: placeholder3 || "Rich text editor" }) });
|
|
@@ -44526,7 +44634,7 @@ function createRadioGroups() {
|
|
|
44526
44634
|
const owners = /* @__PURE__ */ new Map();
|
|
44527
44635
|
const members2 = /* @__PURE__ */ new Map();
|
|
44528
44636
|
const listeners2 = /* @__PURE__ */ new Set();
|
|
44529
|
-
let
|
|
44637
|
+
let seq3 = 0;
|
|
44530
44638
|
const emit = () => {
|
|
44531
44639
|
for (const l2 of [...listeners2]) l2();
|
|
44532
44640
|
};
|
|
@@ -44534,8 +44642,8 @@ function createRadioGroups() {
|
|
|
44534
44642
|
/** A fresh member identity — per mounted radio, not per component id (rows of one bound
|
|
44535
44643
|
* template share an id and must each be their own member). */
|
|
44536
44644
|
newMember() {
|
|
44537
|
-
|
|
44538
|
-
return `radio-${
|
|
44645
|
+
seq3 += 1;
|
|
44646
|
+
return `radio-${seq3}`;
|
|
44539
44647
|
},
|
|
44540
44648
|
owner(group) {
|
|
44541
44649
|
return owners.get(group);
|
|
@@ -44681,8 +44789,8 @@ var init_controls = __esm({
|
|
|
44681
44789
|
React15.useEffect(() => {
|
|
44682
44790
|
setTapped(null);
|
|
44683
44791
|
}, [bound2, props2.valuePath, ctx.provider]);
|
|
44684
|
-
const
|
|
44685
|
-
const on4 = inForm && touchedField.current === fieldId && formOn !== null ? formOn :
|
|
44792
|
+
const live4 = standaloneService && tapped && tapped.path === props2.valuePath && Object.is(tapped.over, bound2) && tapped.provider === ctx.provider ? tapped.on : null;
|
|
44793
|
+
const on4 = inForm && touchedField.current === fieldId && formOn !== null ? formOn : live4 ?? resolved2;
|
|
44686
44794
|
const ruleKey = props2.validation ? JSON.stringify(props2.validation) : "";
|
|
44687
44795
|
React15.useEffect(() => {
|
|
44688
44796
|
if (!bag || !fieldId) return;
|
|
@@ -45211,7 +45319,7 @@ function isWithinTopModal(el2) {
|
|
|
45211
45319
|
const top = topOver(el2);
|
|
45212
45320
|
return top == null || top.el.contains(el2);
|
|
45213
45321
|
}
|
|
45214
|
-
function
|
|
45322
|
+
function live2() {
|
|
45215
45323
|
const out2 = [];
|
|
45216
45324
|
for (const layer of layers) {
|
|
45217
45325
|
const el2 = layer.el();
|
|
@@ -45246,7 +45354,7 @@ function topOf(candidates, all) {
|
|
|
45246
45354
|
return top;
|
|
45247
45355
|
}
|
|
45248
45356
|
function topOver(target) {
|
|
45249
|
-
const all =
|
|
45357
|
+
const all = live2();
|
|
45250
45358
|
return topOf(all.filter((l2) => l2.scope.contains(target) || target.contains(l2.el)), all);
|
|
45251
45359
|
}
|
|
45252
45360
|
function topLayerOver(target) {
|
|
@@ -45257,7 +45365,7 @@ function sync() {
|
|
|
45257
45365
|
watcher = null;
|
|
45258
45366
|
for (const el2 of madeInert) el2.removeAttribute("inert");
|
|
45259
45367
|
madeInert.clear();
|
|
45260
|
-
const all =
|
|
45368
|
+
const all = live2();
|
|
45261
45369
|
if (!all.length) return;
|
|
45262
45370
|
const levels = /* @__PURE__ */ new Set();
|
|
45263
45371
|
for (const scope3 of new Set(all.map((l2) => l2.scope))) {
|
|
@@ -47090,8 +47198,8 @@ function WebViewBridgeHost(p2) {
|
|
|
47090
47198
|
const source2 = p2.htmlStr != null ? "\0html" : p2.urlStr ?? "";
|
|
47091
47199
|
const origins = p2.allowedOrigins.join("\n");
|
|
47092
47200
|
const sessionRef = React18.useRef(null);
|
|
47093
|
-
const
|
|
47094
|
-
|
|
47201
|
+
const live4 = React18.useRef({ active: active2, muted });
|
|
47202
|
+
live4.current = { active: active2, muted };
|
|
47095
47203
|
React18.useEffect(() => {
|
|
47096
47204
|
if (typeof window === "undefined") return;
|
|
47097
47205
|
if (p2.urlStr == null && p2.htmlStr == null) return;
|
|
@@ -47109,8 +47217,8 @@ function WebViewBridgeHost(p2) {
|
|
|
47109
47217
|
consoleForwarding,
|
|
47110
47218
|
win: window,
|
|
47111
47219
|
frameWindow: () => p2.frameRef.current?.contentWindow ?? null,
|
|
47112
|
-
active:
|
|
47113
|
-
muted:
|
|
47220
|
+
active: live4.current.active,
|
|
47221
|
+
muted: live4.current.muted
|
|
47114
47222
|
});
|
|
47115
47223
|
session.start();
|
|
47116
47224
|
sessionRef.current = session;
|
|
@@ -117477,7 +117585,7 @@ var init_pdf_worker_min = __esm({
|
|
|
117477
117585
|
c2 = false;
|
|
117478
117586
|
this[So].firstUnsplittable = null;
|
|
117479
117587
|
this[So].noLayoutFailure = false;
|
|
117480
|
-
const
|
|
117588
|
+
const flush2 = (t4) => {
|
|
117481
117589
|
const n3 = e2[xo]();
|
|
117482
117590
|
if (n3) {
|
|
117483
117591
|
c2 ||= n3.children?.length > 0;
|
|
@@ -117505,7 +117613,7 @@ var init_pdf_worker_min = __esm({
|
|
|
117505
117613
|
}
|
|
117506
117614
|
if (h3.isBreak()) {
|
|
117507
117615
|
const e3 = h3.breakNode;
|
|
117508
|
-
|
|
117616
|
+
flush2(t4);
|
|
117509
117617
|
if ("auto" === e3.targetType) continue;
|
|
117510
117618
|
if (e3.leader) {
|
|
117511
117619
|
l2 = this[gl](e3.leader, e3[zo]());
|
|
@@ -117531,7 +117639,7 @@ var init_pdf_worker_min = __esm({
|
|
|
117531
117639
|
const n3 = e3[Ho](), a5 = n3.target;
|
|
117532
117640
|
n3.addLeader = null !== n3.leader;
|
|
117533
117641
|
n3.addTrailer = null !== n3.trailer;
|
|
117534
|
-
|
|
117642
|
+
flush2(t4);
|
|
117535
117643
|
const s4 = t4;
|
|
117536
117644
|
t4 = 1 / 0;
|
|
117537
117645
|
if (a5 instanceof PageArea) o2 = a5;
|
|
@@ -117545,7 +117653,7 @@ var init_pdf_worker_min = __esm({
|
|
|
117545
117653
|
}
|
|
117546
117654
|
continue;
|
|
117547
117655
|
}
|
|
117548
|
-
|
|
117656
|
+
flush2(t4);
|
|
117549
117657
|
}
|
|
117550
117658
|
this[So].pageNumber += 1;
|
|
117551
117659
|
o2 && (o2[nl]() ? o2[So].numberOfUse += 1 : o2 = null);
|
|
@@ -127813,7 +127921,7 @@ function PdfDocument({ src, nativeSrc, title, height, startPage, zoomPercent, st
|
|
|
127813
127921
|
frame2.scrollTop += (canvas.getBoundingClientRect().top - box.top) / scale;
|
|
127814
127922
|
}, [startPage, pages2]);
|
|
127815
127923
|
React19.useEffect(() => {
|
|
127816
|
-
let
|
|
127924
|
+
let live4 = true;
|
|
127817
127925
|
let loading;
|
|
127818
127926
|
const container = containerRef.current;
|
|
127819
127927
|
setFailedRequest(null);
|
|
@@ -127821,11 +127929,11 @@ function PdfDocument({ src, nativeSrc, title, height, startPage, zoomPercent, st
|
|
|
127821
127929
|
void (async () => {
|
|
127822
127930
|
if (!container) return;
|
|
127823
127931
|
if (!container.ownerDocument.createElement("canvas").getContext("2d")) {
|
|
127824
|
-
if (
|
|
127932
|
+
if (live4) setFailedRequest(request);
|
|
127825
127933
|
return;
|
|
127826
127934
|
}
|
|
127827
127935
|
const task = await loadDocument(src, container.ownerDocument);
|
|
127828
|
-
if (!
|
|
127936
|
+
if (!live4) {
|
|
127829
127937
|
void task.promise.catch(() => {
|
|
127830
127938
|
});
|
|
127831
127939
|
void destroyPdfDocumentLoad(task);
|
|
@@ -127833,13 +127941,13 @@ function PdfDocument({ src, nativeSrc, title, height, startPage, zoomPercent, st
|
|
|
127833
127941
|
}
|
|
127834
127942
|
loading = task;
|
|
127835
127943
|
const document2 = await task.promise;
|
|
127836
|
-
const count2 = await paintPdfDocument(document2, container, container.clientWidth || 600, startPageRef.current, zoomPercent, () =>
|
|
127837
|
-
if (
|
|
127944
|
+
const count2 = await paintPdfDocument(document2, container, container.clientWidth || 600, startPageRef.current, zoomPercent, () => live4, onPageCount);
|
|
127945
|
+
if (live4) setPages(count2);
|
|
127838
127946
|
})().catch(() => {
|
|
127839
|
-
if (
|
|
127947
|
+
if (live4) setFailedRequest(request);
|
|
127840
127948
|
});
|
|
127841
127949
|
return () => {
|
|
127842
|
-
|
|
127950
|
+
live4 = false;
|
|
127843
127951
|
if (loading) void destroyPdfDocumentLoad(loading);
|
|
127844
127952
|
container?.replaceChildren();
|
|
127845
127953
|
};
|
|
@@ -128787,6 +128895,15 @@ function richContentDocumentHash(s2) {
|
|
|
128787
128895
|
}
|
|
128788
128896
|
return h2 >>> 0;
|
|
128789
128897
|
}
|
|
128898
|
+
function visibilityDelegates(node3, ctx) {
|
|
128899
|
+
const mods = node3?.modifiers;
|
|
128900
|
+
const hp = mods?.hiddenPath ?? mods?.hidden_path;
|
|
128901
|
+
if (typeof hp === "string" && !isEnvExpr(hp) && isBinding(hp) && isStateBinding(hp) && !!ctx.provider) return true;
|
|
128902
|
+
const lit = typeof hp === "string" ? hp.trim().toLowerCase() : void 0;
|
|
128903
|
+
const litPath = lit === "true" || lit === "1" || lit === "false" || lit === "0";
|
|
128904
|
+
if ((typeof mods?.hidden === "boolean" || litPath) && exitSpecFor(mods, ctx)) return true;
|
|
128905
|
+
return typeof hp === "string" && isEnvExpr(hp) && !!exitSpecFor(mods, ctx);
|
|
128906
|
+
}
|
|
128790
128907
|
function useBoundTransformMotion(node3, ctx) {
|
|
128791
128908
|
const last = React20.useRef(void 0);
|
|
128792
128909
|
const modifiers = node3?.modifiers;
|
|
@@ -130017,7 +130134,7 @@ function packOverlaps(items) {
|
|
|
130017
130134
|
const result = [];
|
|
130018
130135
|
let cluster = [];
|
|
130019
130136
|
let clusterEnd = -Infinity;
|
|
130020
|
-
const
|
|
130137
|
+
const flush2 = () => {
|
|
130021
130138
|
if (!cluster.length) return;
|
|
130022
130139
|
const columnsEnd = [];
|
|
130023
130140
|
const placed = [];
|
|
@@ -130035,11 +130152,11 @@ function packOverlaps(items) {
|
|
|
130035
130152
|
clusterEnd = -Infinity;
|
|
130036
130153
|
};
|
|
130037
130154
|
for (const item2 of sorted2) {
|
|
130038
|
-
if (cluster.length && item2.startMin >= clusterEnd)
|
|
130155
|
+
if (cluster.length && item2.startMin >= clusterEnd) flush2();
|
|
130039
130156
|
cluster.push(item2);
|
|
130040
130157
|
clusterEnd = Math.max(clusterEnd, item2.endMin);
|
|
130041
130158
|
}
|
|
130042
|
-
|
|
130159
|
+
flush2();
|
|
130043
130160
|
return result;
|
|
130044
130161
|
}
|
|
130045
130162
|
function actionClick(ctx, action) {
|
|
@@ -130603,7 +130720,13 @@ function renderNode(node3, ctx) {
|
|
|
130603
130720
|
}
|
|
130604
130721
|
ensureFocusStyles();
|
|
130605
130722
|
const bindings = directServiceBindings(node3);
|
|
130606
|
-
|
|
130723
|
+
const rendered = bindings.length > 0 && ctx.provider || boundTransformPaths(node3?.modifiers) ? /* @__PURE__ */ jsx13(ReactiveDirectScalars, { node: node3, ctx, bindings }) : renderNodeInner(node3, ctx);
|
|
130724
|
+
const mods = node3?.modifiers;
|
|
130725
|
+
const tid2 = typeof mods?.transitionId === "string" ? resolvedComponentId(mods.transitionId, ctx) : void 0;
|
|
130726
|
+
if (tid2 && rendered != null && !visibilityDelegates(node3, ctx) && !ctx.reduceMotion() && !motionDeterministic()) {
|
|
130727
|
+
return /* @__PURE__ */ jsx13(InScreenMorphHost, { id: tid2, scope: ctx.screenId ?? "", transition: ctx.motionTransition(mods?.motion ?? ctx.kit?.motion), children: rendered });
|
|
130728
|
+
}
|
|
130729
|
+
return rendered;
|
|
130607
130730
|
}
|
|
130608
130731
|
function applyBoundTransforms(wrap, modifiers, bt2, motion, ctx) {
|
|
130609
130732
|
if (bindsTransform(bt2.bound)) {
|
|
@@ -131414,7 +131537,7 @@ function reportUnknownComponent(ctx, pkg, type2) {
|
|
|
131414
131537
|
function unknownComponentShowsDeveloperLabel(ctx) {
|
|
131415
131538
|
return ctx.debugUnknownComponents ?? ctx.previewSurface != null;
|
|
131416
131539
|
}
|
|
131417
|
-
var AppearanceActionContext, rowValue, loadPdfFetch, WebViewBridgeHost2, useIsomorphicLayoutEffect2, GridColumnsContext, GridBoundList, GRID_SPAN_ALL, ResponsiveGrid, SPLIT_EXPANDED_MIN_WIDTH, SPLIT_COLUMN_GAP, ResponsiveSplitView, appearKeyframesInjected, valueSwapKeyframesInjected, NUMERIC_TEXT, shimmerKeyframesInjected, pressStylesInjected, REVEAL_ON_FOCUS_ATTR, FOCUS_RING_CSS, focusStylesInjected, HLIST_CHILD_CSS, hListStylesInjected, listAnimateRuntimeInstalled, transitionKeyframesInjected, countUpRuntimeInjected, MEASURE_PREFIX, measureRuntimeInjected, revealRuntimeInjected, AMBIENT_HOST_STYLE, AmbientMotionBox, vectorAnimStylesInjected, scrollProgressRuntimeInjected, confettiRuntimeInjected, lottieRuntimeInjected, LOTTIE_RUNTIME_ATTRIBUTES, lottieAnims, riveRuntimeInjected, gradientKeyframesInjected, parallaxRuntimeInjected, spinKeyframesInjected, marqueeKeyframesInjected, alignItems, zJustifyItems, hAlignItems, bodyFont, kids2, rowKidCtx, rowKids, staggeredKids, asTextL10n, asFinalTextL10n, asBoundText, useBoundString, asBoundCopy, useBoundCopy, InterpolatedTextView, txt, selectFragmentCase, fragmentValueHash, fragmentSlotContent, FragmentSlotNode, RichContentEditorNode, MediaFieldNode, WorkerSubtreeNode, RichContentNode, substituteItemDeep, resolveItemDeep2, resolveRowAction2, resolveSwipeActions, resolveModBindings, resolvedComponentId, directServiceBindings, withRootStyle, ReactiveDirectScalars, resolveNodeBoundTransforms, HiddenGate, ExitPresence, StatefulSectionNode, KEYBOARD_INPUT_MODES, AUTOCAPITALIZE_VALUES, ENTER_KEY_HINTS, AUTOGROW_CEILING, EditableField, MENU_ANCHOR_CONTROL, MenuNode, MENU_LONG_PRESS_MS, menuOpensOnLongPress, LoadMoreSentinel, FieldErrorNode, FormView, MediaSlotProvider, MEDIA_ITEM_BINDABLE, MediaPlayerView, VideoNode, PdfDocumentCanvas, PdfViewNode, WebViewNode, InteractivePicker, InteractiveDatePicker, InteractiveSearchField, InteractiveStepper, NODE_EXTRAS_TARGET, SYNTHETIC_TAP_ROLE, SYNTHETIC_TABINDEX, INFERRED_DECORATIVE, SELF_RENDERED_LEAF, ROLE_WHEN_NAMED, AUTHORED_ROLE, PENDING_RANGE, RANGE_ROLES, NODE_A11Y_ATTRS, INTERACTIVE_ROLES, ALWAYS_INTERACTIVE_COMPONENT_TYPES, TAP_ACTIVATOR_ATTR, TAP_GROUP_ATTR, NESTED_CONTROL_SELECTOR, VISUALLY_HIDDEN, NAME_SKIP_SELECTOR, activatorNameObservers, ACTIVATOR_STATE_ATTRS, controlNode, ToggleNode, SliderNode, SelectionControlNode, TabsNode, SegmentedControlNode, DisclosureGroupNode, GridNode, SplitViewNode, REVEAL_RELEASE_MS, REVEAL_FADE_MS, REVEAL_BUFFER, revealProgress, countWords, RevealText, TextNode, ImageNode, ANIMATION_LEAF, LottieNode, RiveNode, AvatarNode, IconNode, EMPTY_STATE_SPACING, EmptyStateNode, ERROR_STATE_VARIANTS, ERROR_STATE_SPACING, ErrorStateNode, ButtonNode, OtpInputNode, ProgressBarNode, SnackbarNode, ACTIVITY_DEFAULT_NAME, ACTIVITY_RING_ARC, ActivityIndicatorNode, NATIVELY_TABBABLE, BottomSheetNode, BOTTOM_DRAWER_HOST_STACK_EVENT, ModalBottomSheetNode, BottomDrawerNode, PRESENTED_OVERLAY_ATTR, TooltipNode, PopoverNode, ChipsInputNode, ChipNode, TableNode, GaugeRing, GaugeNode, RATING_METRICS, ratingMetrics, RatingNode, AvatarStripNode, CHART_STROKE_CYCLE, chartStrokeAt, chartBarCenter, ChartNode, donutSliceOpacity, DonutChartNode, QrCodeNode, ShapeNode, LegendMarker, LegendNode, cellAlign, dataTableProbe, DataTableNode, voiceNoteState, voiceNoteDelivery, VOICE_NOTE_DEFAULT_BARS, clampBarCount, VoiceNoteNode, LiveWaveformNode, TimelineNode, ECHO_WINDOW_MS, heldPageIndex, LiveWindowMeasured, LiveWindowPage, PagingNode, WheelPickerNode, ColorPickerNode, FilterChipsNode, TILE_PX, MAX_MERCATOR_LAT, DEFAULT_TILE_MAX_ZOOM, CIRCLE_SEGMENTS, METRES_PER_DEG_LAT, MARKER_HIT_RADIUS, SHAPE_HIT_RADIUS, MapNode, CAROUSEL_SETTLE_MS, railScrollLeft, carouselScrollLeft, scrollCarouselTo, CarouselNode, BannerNode, CollapsingHeaderNode, UnsupportedOnSurface, CALENDAR_DATE_ONLY_RE, CAL_DEFAULT_MAX_DOTS, CAL_AGENDA_INITIAL_DAYS, CAL_AGENDA_PAGE_DAYS, CAL_DEFAULT_SNAP_MINUTES, CAL_UNASSIGNED_LANE_ID, MonthCalendarNode, TimeGridNode, AgendaNode, ARIA_ROLE, initialFocusScheduled, PRESENTED_SCOPE, focusRoots, A11yHintDescription, rowRenderers, railRowFrame, renderRailRow, RowAnchors, reportedUnknownComponents, UnknownComponentNode, WebRenderer, ScrollIntoViewNode;
|
|
131540
|
+
var AppearanceActionContext, rowValue, loadPdfFetch, WebViewBridgeHost2, useIsomorphicLayoutEffect2, GridColumnsContext, GridBoundList, GRID_SPAN_ALL, ResponsiveGrid, SPLIT_EXPANDED_MIN_WIDTH, SPLIT_COLUMN_GAP, ResponsiveSplitView, appearKeyframesInjected, valueSwapKeyframesInjected, NUMERIC_TEXT, shimmerKeyframesInjected, pressStylesInjected, REVEAL_ON_FOCUS_ATTR, FOCUS_RING_CSS, focusStylesInjected, HLIST_CHILD_CSS, hListStylesInjected, listAnimateRuntimeInstalled, transitionKeyframesInjected, countUpRuntimeInjected, MEASURE_PREFIX, measureRuntimeInjected, revealRuntimeInjected, AMBIENT_HOST_STYLE, AmbientMotionBox, vectorAnimStylesInjected, scrollProgressRuntimeInjected, confettiRuntimeInjected, lottieRuntimeInjected, LOTTIE_RUNTIME_ATTRIBUTES, lottieAnims, riveRuntimeInjected, gradientKeyframesInjected, parallaxRuntimeInjected, spinKeyframesInjected, marqueeKeyframesInjected, alignItems, zJustifyItems, hAlignItems, bodyFont, kids2, rowKidCtx, rowKids, staggeredKids, asTextL10n, asFinalTextL10n, asBoundText, useBoundString, asBoundCopy, useBoundCopy, InterpolatedTextView, txt, selectFragmentCase, fragmentValueHash, fragmentSlotContent, FragmentSlotNode, RichContentEditorNode, MediaFieldNode, WorkerSubtreeNode, RichContentNode, substituteItemDeep, resolveItemDeep2, resolveRowAction2, resolveSwipeActions, resolveModBindings, resolvedComponentId, directServiceBindings, withRootStyle, InScreenMorphHost, ReactiveDirectScalars, resolveNodeBoundTransforms, HiddenGate, ExitPresence, StatefulSectionNode, KEYBOARD_INPUT_MODES, AUTOCAPITALIZE_VALUES, ENTER_KEY_HINTS, AUTOGROW_CEILING, EditableField, MENU_ANCHOR_CONTROL, MenuNode, MENU_LONG_PRESS_MS, menuOpensOnLongPress, LoadMoreSentinel, FieldErrorNode, FormView, MediaSlotProvider, MEDIA_ITEM_BINDABLE, MediaPlayerView, VideoNode, PdfDocumentCanvas, PdfViewNode, WebViewNode, InteractivePicker, InteractiveDatePicker, InteractiveSearchField, InteractiveStepper, NODE_EXTRAS_TARGET, SYNTHETIC_TAP_ROLE, SYNTHETIC_TABINDEX, INFERRED_DECORATIVE, SELF_RENDERED_LEAF, ROLE_WHEN_NAMED, AUTHORED_ROLE, PENDING_RANGE, RANGE_ROLES, NODE_A11Y_ATTRS, INTERACTIVE_ROLES, ALWAYS_INTERACTIVE_COMPONENT_TYPES, TAP_ACTIVATOR_ATTR, TAP_GROUP_ATTR, NESTED_CONTROL_SELECTOR, VISUALLY_HIDDEN, NAME_SKIP_SELECTOR, activatorNameObservers, ACTIVATOR_STATE_ATTRS, controlNode, ToggleNode, SliderNode, SelectionControlNode, TabsNode, SegmentedControlNode, DisclosureGroupNode, GridNode, SplitViewNode, REVEAL_RELEASE_MS, REVEAL_FADE_MS, REVEAL_BUFFER, revealProgress, countWords, RevealText, TextNode, ImageNode, ANIMATION_LEAF, LottieNode, RiveNode, AvatarNode, IconNode, EMPTY_STATE_SPACING, EmptyStateNode, ERROR_STATE_VARIANTS, ERROR_STATE_SPACING, ErrorStateNode, ButtonNode, OtpInputNode, ProgressBarNode, SnackbarNode, ACTIVITY_DEFAULT_NAME, ACTIVITY_RING_ARC, ActivityIndicatorNode, NATIVELY_TABBABLE, BottomSheetNode, BOTTOM_DRAWER_HOST_STACK_EVENT, ModalBottomSheetNode, BottomDrawerNode, PRESENTED_OVERLAY_ATTR, TooltipNode, PopoverNode, ChipsInputNode, ChipNode, TableNode, GaugeRing, GaugeNode, RATING_METRICS, ratingMetrics, RatingNode, AvatarStripNode, CHART_STROKE_CYCLE, chartStrokeAt, chartBarCenter, ChartNode, donutSliceOpacity, DonutChartNode, QrCodeNode, ShapeNode, LegendMarker, LegendNode, cellAlign, dataTableProbe, DataTableNode, voiceNoteState, voiceNoteDelivery, VOICE_NOTE_DEFAULT_BARS, clampBarCount, VoiceNoteNode, LiveWaveformNode, TimelineNode, ECHO_WINDOW_MS, heldPageIndex, LiveWindowMeasured, LiveWindowPage, PagingNode, WheelPickerNode, ColorPickerNode, FilterChipsNode, TILE_PX, MAX_MERCATOR_LAT, DEFAULT_TILE_MAX_ZOOM, CIRCLE_SEGMENTS, METRES_PER_DEG_LAT, MARKER_HIT_RADIUS, SHAPE_HIT_RADIUS, MapNode, CAROUSEL_SETTLE_MS, railScrollLeft, carouselScrollLeft, scrollCarouselTo, CarouselNode, BannerNode, CollapsingHeaderNode, UnsupportedOnSurface, CALENDAR_DATE_ONLY_RE, CAL_DEFAULT_MAX_DOTS, CAL_AGENDA_INITIAL_DAYS, CAL_AGENDA_PAGE_DAYS, CAL_DEFAULT_SNAP_MINUTES, CAL_UNASSIGNED_LANE_ID, MonthCalendarNode, TimeGridNode, AgendaNode, ARIA_ROLE, initialFocusScheduled, PRESENTED_SCOPE, focusRoots, A11yHintDescription, rowRenderers, railRowFrame, renderRailRow, RowAnchors, reportedUnknownComponents, UnknownComponentNode, WebRenderer, ScrollIntoViewNode;
|
|
131418
131541
|
var init_renderNode = __esm({
|
|
131419
131542
|
"../../core/web-renderer/src/renderNode.tsx"() {
|
|
131420
131543
|
"use strict";
|
|
@@ -131459,6 +131582,7 @@ var init_renderNode = __esm({
|
|
|
131459
131582
|
init_pickerField();
|
|
131460
131583
|
init_symbolEffects();
|
|
131461
131584
|
init_motionDefaults();
|
|
131585
|
+
init_inScreenMatch();
|
|
131462
131586
|
init_boundTransforms();
|
|
131463
131587
|
init_mediaProps();
|
|
131464
131588
|
init_webviewFrame();
|
|
@@ -131593,12 +131717,12 @@ var init_renderNode = __esm({
|
|
|
131593
131717
|
const react = () => {
|
|
131594
131718
|
if (!alive) return;
|
|
131595
131719
|
running = el2.animate(frames, { duration: total, easing: "ease-in-out", composite: "add" });
|
|
131596
|
-
running.onfinish = () =>
|
|
131720
|
+
running.onfinish = () => schedule2();
|
|
131597
131721
|
};
|
|
131598
|
-
const
|
|
131722
|
+
const schedule2 = () => {
|
|
131599
131723
|
if (alive) timer = setTimeout(react, ambientGapMs(kind, opts, Math.random()));
|
|
131600
131724
|
};
|
|
131601
|
-
|
|
131725
|
+
schedule2();
|
|
131602
131726
|
}
|
|
131603
131727
|
return () => {
|
|
131604
131728
|
alive = false;
|
|
@@ -131677,7 +131801,7 @@ var init_renderNode = __esm({
|
|
|
131677
131801
|
const bound2 = Object.entries(params).filter(
|
|
131678
131802
|
([, v2]) => typeof v2 === "string" && isStateBinding(v2)
|
|
131679
131803
|
);
|
|
131680
|
-
const [
|
|
131804
|
+
const [live4, setLive] = React20.useState(() => {
|
|
131681
131805
|
const seed2 = {};
|
|
131682
131806
|
if (ctx.provider) for (const [k3, p2] of bound2) seed2[k3] = ctx.provider.value(servicePath(p2));
|
|
131683
131807
|
return seed2;
|
|
@@ -131691,7 +131815,7 @@ var init_renderNode = __esm({
|
|
|
131691
131815
|
);
|
|
131692
131816
|
return () => unsubs.forEach((u2) => u2());
|
|
131693
131817
|
}, [ctx.provider, subKey]);
|
|
131694
|
-
const resolved2 = { ...
|
|
131818
|
+
const resolved2 = { ...live4 };
|
|
131695
131819
|
for (const [k3, v2] of Object.entries(params)) {
|
|
131696
131820
|
if (typeof v2 === "string" && v2.startsWith("$item")) resolved2[k3] = resolveScalarStatic(v2, ctx);
|
|
131697
131821
|
}
|
|
@@ -132050,6 +132174,18 @@ var init_renderNode = __esm({
|
|
|
132050
132174
|
const element = content;
|
|
132051
132175
|
return React20.cloneElement(element, { style: { ...element.props.style, ...style } });
|
|
132052
132176
|
};
|
|
132177
|
+
InScreenMorphHost = ({ id, scope: scope3, transition, style, children: children2 }) => {
|
|
132178
|
+
const ref = React20.useRef(null);
|
|
132179
|
+
const key3 = React20.useRef("");
|
|
132180
|
+
if (!key3.current) key3.current = nextMorphKey();
|
|
132181
|
+
const timing = morphTiming(transition);
|
|
132182
|
+
React20.useLayoutEffect(() => {
|
|
132183
|
+
const k3 = key3.current;
|
|
132184
|
+
noteEnter({ id, key: k3, scope: scope3, el: () => ref.current?.firstElementChild, duration: timing.duration, easing: timing.easing });
|
|
132185
|
+
return () => noteLeave(k3, ref.current?.firstElementChild);
|
|
132186
|
+
}, [id, scope3]);
|
|
132187
|
+
return /* @__PURE__ */ jsx13("div", { ref, "data-himalaya-transition-id": id, style: { display: "contents" }, children: style ? withRootStyle(children2, style) : children2 });
|
|
132188
|
+
};
|
|
132053
132189
|
ReactiveDirectScalars = ({ node: node3, ctx, bindings, style }) => {
|
|
132054
132190
|
const [, rerender] = React20.useState(0);
|
|
132055
132191
|
const bindingKey = bindings.join("|");
|
|
@@ -132791,18 +132927,18 @@ var init_renderNode = __esm({
|
|
|
132791
132927
|
React20.useEffect(() => {
|
|
132792
132928
|
const el2 = ref.current;
|
|
132793
132929
|
if (!cursor || !ctx.onAction || !el2 || typeof IntersectionObserver === "undefined") return;
|
|
132794
|
-
let
|
|
132930
|
+
let live4 = true;
|
|
132795
132931
|
let root = el2.parentElement;
|
|
132796
132932
|
while (root && !["auto", "scroll", "overlay"].includes(el2.ownerDocument.defaultView?.getComputedStyle(root).overflowY ?? "")) root = root.parentElement;
|
|
132797
132933
|
const io2 = new IntersectionObserver((entries) => {
|
|
132798
|
-
if (!
|
|
132934
|
+
if (!live4 || !entries[entries.length - 1]?.isIntersecting) return;
|
|
132799
132935
|
if (pages2.claim(cycle)) {
|
|
132800
132936
|
ctx.onAction?.(workerTap.tapped(firedWithoutTap(action)));
|
|
132801
132937
|
}
|
|
132802
132938
|
}, { root, rootMargin: "0px 0px 320px 0px" });
|
|
132803
132939
|
io2.observe(el2);
|
|
132804
132940
|
return () => {
|
|
132805
|
-
|
|
132941
|
+
live4 = false;
|
|
132806
132942
|
io2.disconnect();
|
|
132807
132943
|
};
|
|
132808
132944
|
}, [pages2, cycle, cursor, ctx.onAction, action]);
|
|
@@ -133355,12 +133491,12 @@ var init_renderNode = __esm({
|
|
|
133355
133491
|
const [retyped, setRetyped] = React20.useState(null);
|
|
133356
133492
|
React20.useEffect(() => {
|
|
133357
133493
|
if (!retypeSrc) return;
|
|
133358
|
-
let
|
|
133494
|
+
let live4 = true;
|
|
133359
133495
|
let made = null;
|
|
133360
133496
|
const settle2 = (r3) => {
|
|
133361
133497
|
const u2 = r3?.url ?? null;
|
|
133362
133498
|
made = u2;
|
|
133363
|
-
if (!
|
|
133499
|
+
if (!live4) {
|
|
133364
133500
|
if (u2) URL.revokeObjectURL(u2);
|
|
133365
133501
|
return;
|
|
133366
133502
|
}
|
|
@@ -133368,7 +133504,7 @@ var init_renderNode = __esm({
|
|
|
133368
133504
|
};
|
|
133369
133505
|
loadPdfFetch().then((m2) => m2.retypeAsPdfCounted(retypeSrc)).then(settle2, () => settle2(null));
|
|
133370
133506
|
return () => {
|
|
133371
|
-
|
|
133507
|
+
live4 = false;
|
|
133372
133508
|
if (made) URL.revokeObjectURL(made);
|
|
133373
133509
|
setRetyped((cur) => cur?.from === retypeSrc ? null : cur);
|
|
133374
133510
|
};
|
|
@@ -133381,15 +133517,15 @@ var init_renderNode = __esm({
|
|
|
133381
133517
|
const [direct, setDirect] = React20.useState(null);
|
|
133382
133518
|
React20.useEffect(() => {
|
|
133383
133519
|
if (!directSrc) return;
|
|
133384
|
-
let
|
|
133520
|
+
let live4 = true;
|
|
133385
133521
|
let made = null;
|
|
133386
133522
|
loadPdfFetch().then((m2) => m2.fetchPdfDocument(splitFragment(directSrc).base), () => null).then((doc) => {
|
|
133387
|
-
if (!
|
|
133523
|
+
if (!live4) return;
|
|
133388
133524
|
made = wantsShare && doc ? URL.createObjectURL(doc.blob) : null;
|
|
133389
133525
|
setDirect({ from: directSrc, count: doc?.pageCount ?? null, blobUrl: made });
|
|
133390
133526
|
});
|
|
133391
133527
|
return () => {
|
|
133392
|
-
|
|
133528
|
+
live4 = false;
|
|
133393
133529
|
if (made) URL.revokeObjectURL(made);
|
|
133394
133530
|
setDirect((cur) => cur?.from === directSrc ? null : cur);
|
|
133395
133531
|
};
|
|
@@ -134922,7 +135058,7 @@ var init_renderNode = __esm({
|
|
|
134922
135058
|
const drag = React20.useRef(null);
|
|
134923
135059
|
const reduceMotion = ctx.reduceMotion();
|
|
134924
135060
|
const [mounted, setMounted] = React20.useState(shown2);
|
|
134925
|
-
const [
|
|
135061
|
+
const [entered2, setEntered] = React20.useState(shown2 && ctx.staticRender === true);
|
|
134926
135062
|
React20.useEffect(() => {
|
|
134927
135063
|
if (shown2) {
|
|
134928
135064
|
setMounted(true);
|
|
@@ -134955,7 +135091,7 @@ var init_renderNode = __esm({
|
|
|
134955
135091
|
}, [mounted]);
|
|
134956
135092
|
if (!shown2 && !mounted) return null;
|
|
134957
135093
|
const leaving = !shown2;
|
|
134958
|
-
const atRest =
|
|
135094
|
+
const atRest = entered2 && !leaving;
|
|
134959
135095
|
const grabber = props2.showGrabber !== false && edge === "bottom";
|
|
134960
135096
|
const sheet = idiomControls(ctx.idiom).sheet;
|
|
134961
135097
|
const r3 = `${sheet.cornerRadius}px`;
|
|
@@ -135076,7 +135212,7 @@ var init_renderNode = __esm({
|
|
|
135076
135212
|
}, [shown2]);
|
|
135077
135213
|
const reduceMotion = ctx.reduceMotion();
|
|
135078
135214
|
const [mounted, setMounted] = React20.useState(shown2);
|
|
135079
|
-
const [
|
|
135215
|
+
const [entered2, setEntered] = React20.useState(shown2 && ctx.staticRender === true);
|
|
135080
135216
|
React20.useEffect(() => {
|
|
135081
135217
|
if (shown2) {
|
|
135082
135218
|
setMounted(true);
|
|
@@ -135229,7 +135365,7 @@ var init_renderNode = __esm({
|
|
|
135229
135365
|
const index = Math.min(detentIndex, Math.max(detents.length - 1, 0));
|
|
135230
135366
|
dragState.current = { index, count: detents.length, dismissible };
|
|
135231
135367
|
const leaving = !shown2;
|
|
135232
|
-
const atRest =
|
|
135368
|
+
const atRest = entered2 && !leaving;
|
|
135233
135369
|
const grabber = props2.showGrabber !== false;
|
|
135234
135370
|
const dragFrame = drawerDragFrame(index, detents, regionPx, dragDy, dismissible);
|
|
135235
135371
|
const sized = detents.length && regionPx > 0 ? { height: `${Math.round(dragFrame.heightPx ?? detents[index] * regionPx)}px`, display: "flex", flexDirection: "column" } : {};
|
|
@@ -136378,7 +136514,7 @@ var init_renderNode = __esm({
|
|
|
136378
136514
|
const granted = providerAllowsLiveAudio(ctx.provider);
|
|
136379
136515
|
const canRun = gateOpen && sourceKnown && granted && !ctx.empty && typeof requestAnimationFrame === "function";
|
|
136380
136516
|
const [levels, setLevels] = React20.useState(() => new Array(bars).fill(0));
|
|
136381
|
-
const [
|
|
136517
|
+
const [live4, setLive] = React20.useState(false);
|
|
136382
136518
|
React20.useEffect(() => {
|
|
136383
136519
|
const flat2 = () => {
|
|
136384
136520
|
setLive(false);
|
|
@@ -136423,13 +136559,13 @@ var init_renderNode = __esm({
|
|
|
136423
136559
|
};
|
|
136424
136560
|
}, [canRun, bars, ctx.liveAudioLevel]);
|
|
136425
136561
|
const color = ctx.color(resolveScalarStatic(props2.color, ctx) ?? "accentPrimary", "#116DFF");
|
|
136426
|
-
const glide =
|
|
136562
|
+
const glide = live4 && !ctx.reduceMotion() ? `height ${Math.round(LIVE_WAVEFORM_MIN_FRAME_MS * 4)}ms linear` : void 0;
|
|
136427
136563
|
const minBar = 2;
|
|
136428
136564
|
return /* @__PURE__ */ jsx13(
|
|
136429
136565
|
"div",
|
|
136430
136566
|
{
|
|
136431
|
-
"data-live-waveform-state":
|
|
136432
|
-
"data-a11y-value":
|
|
136567
|
+
"data-live-waveform-state": live4 ? "live" : "idle",
|
|
136568
|
+
"data-a11y-value": live4 ? "live" : "idle",
|
|
136433
136569
|
"aria-hidden": "true",
|
|
136434
136570
|
...{ [INFERRED_DECORATIVE]: true, [ROLE_WHEN_NAMED]: "img" },
|
|
136435
136571
|
style: { display: "flex", alignItems: "center", gap: 2, height, width: "100%", boxSizing: "border-box", ...wrap },
|
|
@@ -136442,9 +136578,9 @@ var init_renderNode = __esm({
|
|
|
136442
136578
|
maxWidth: 6,
|
|
136443
136579
|
minWidth: 1,
|
|
136444
136580
|
borderRadius: 999,
|
|
136445
|
-
height:
|
|
136581
|
+
height: live4 ? Math.max(minBar, Math.round(v2 * height)) : minBar,
|
|
136446
136582
|
background: color,
|
|
136447
|
-
opacity:
|
|
136583
|
+
opacity: live4 ? 1 : 0.3,
|
|
136448
136584
|
transition: glide
|
|
136449
136585
|
}
|
|
136450
136586
|
},
|
|
@@ -141053,9 +141189,9 @@ async function handleOwnerSitesRequest(req, res) {
|
|
|
141053
141189
|
try {
|
|
141054
141190
|
const { fetchLiveOwnerSites } = await import("./apps/wix-owner-clone-live.js");
|
|
141055
141191
|
const { buildWixOwnerCloneSites } = await import("./apps/wix-owner-clone-app.js");
|
|
141056
|
-
const
|
|
141057
|
-
if (
|
|
141058
|
-
payload = { sites:
|
|
141192
|
+
const live4 = await fetchLiveOwnerSites();
|
|
141193
|
+
if (live4) {
|
|
141194
|
+
payload = { sites: live4 };
|
|
141059
141195
|
} else {
|
|
141060
141196
|
source2 = "fallback";
|
|
141061
141197
|
payload = buildWixOwnerCloneSites();
|
|
@@ -141507,7 +141643,7 @@ async function handleHotReloadCommand(req, res, state) {
|
|
|
141507
141643
|
function startBundleArtifactWatcher(state) {
|
|
141508
141644
|
const pending2 = /* @__PURE__ */ new Set();
|
|
141509
141645
|
let timer;
|
|
141510
|
-
const
|
|
141646
|
+
const flush2 = () => {
|
|
141511
141647
|
timer = void 0;
|
|
141512
141648
|
const bundles = [...pending2].sort();
|
|
141513
141649
|
pending2.clear();
|
|
@@ -141526,7 +141662,7 @@ function startBundleArtifactWatcher(state) {
|
|
|
141526
141662
|
if (!bundle) return;
|
|
141527
141663
|
pending2.add(bundle);
|
|
141528
141664
|
if (timer) clearTimeout(timer);
|
|
141529
|
-
timer = setTimeout(
|
|
141665
|
+
timer = setTimeout(flush2, 120);
|
|
141530
141666
|
});
|
|
141531
141667
|
watcher2.on("error", (err) => {
|
|
141532
141668
|
console.warn(`[himalaya-dev] bundle watcher stopped: ${err.message}`);
|
|
@@ -141546,10 +141682,10 @@ function startBundleSourceWatcher(state) {
|
|
|
141546
141682
|
const pending2 = /* @__PURE__ */ new Set();
|
|
141547
141683
|
let timer;
|
|
141548
141684
|
let building = false;
|
|
141549
|
-
const
|
|
141685
|
+
const flush2 = async () => {
|
|
141550
141686
|
timer = void 0;
|
|
141551
141687
|
if (building) {
|
|
141552
|
-
timer = setTimeout(
|
|
141688
|
+
timer = setTimeout(flush2, 120);
|
|
141553
141689
|
return;
|
|
141554
141690
|
}
|
|
141555
141691
|
const names2 = [...pending2].sort();
|
|
@@ -141573,7 +141709,7 @@ function startBundleSourceWatcher(state) {
|
|
|
141573
141709
|
if (!name || name.startsWith(".")) return;
|
|
141574
141710
|
pending2.add(name);
|
|
141575
141711
|
if (timer) clearTimeout(timer);
|
|
141576
|
-
timer = setTimeout(
|
|
141712
|
+
timer = setTimeout(flush2, 200);
|
|
141577
141713
|
});
|
|
141578
141714
|
watcher2.on("error", (err) => {
|
|
141579
141715
|
console.warn(`[himalaya-dev] bundle source watcher stopped: ${err.message}`);
|
|
@@ -141803,10 +141939,10 @@ function startAppSourceWatcher(state) {
|
|
|
141803
141939
|
const pending2 = /* @__PURE__ */ new Set();
|
|
141804
141940
|
let timer;
|
|
141805
141941
|
let reloading = false;
|
|
141806
|
-
const
|
|
141942
|
+
const flush2 = async () => {
|
|
141807
141943
|
timer = void 0;
|
|
141808
141944
|
if (reloading) {
|
|
141809
|
-
timer = setTimeout(
|
|
141945
|
+
timer = setTimeout(flush2, 120);
|
|
141810
141946
|
return;
|
|
141811
141947
|
}
|
|
141812
141948
|
const paths2 = [...pending2];
|
|
@@ -141845,7 +141981,7 @@ function startAppSourceWatcher(state) {
|
|
|
141845
141981
|
if (!classifyAppPath(rel2)) return;
|
|
141846
141982
|
pending2.add(rel2);
|
|
141847
141983
|
if (timer) clearTimeout(timer);
|
|
141848
|
-
timer = setTimeout(
|
|
141984
|
+
timer = setTimeout(flush2, 200);
|
|
141849
141985
|
});
|
|
141850
141986
|
watcher2.on("error", (err) => {
|
|
141851
141987
|
console.warn(`[himalaya-dev] app source watcher stopped: ${err.message}`);
|
|
@@ -142117,15 +142253,15 @@ async function handleWebWix(req, res, state) {
|
|
|
142117
142253
|
await pipeWebWixStream(upstream2, res, abort.signal, recordStream);
|
|
142118
142254
|
return;
|
|
142119
142255
|
}
|
|
142120
|
-
const
|
|
142121
|
-
if (!
|
|
142256
|
+
const live4 = currentBindingSession(session, state);
|
|
142257
|
+
if (!live4.visitorToken && !live4.memberToken) {
|
|
142122
142258
|
try {
|
|
142123
|
-
|
|
142259
|
+
live4.visitorToken = await mintAppVisitor(state.app, live4);
|
|
142124
142260
|
} catch {
|
|
142125
142261
|
}
|
|
142126
142262
|
}
|
|
142127
|
-
const isMember = !!
|
|
142128
|
-
let token =
|
|
142263
|
+
const isMember = !!live4.memberToken;
|
|
142264
|
+
let token = live4.memberToken ?? live4.visitorToken ?? "";
|
|
142129
142265
|
let upstream = await webWixStream(method, target.toString(), body, token, void 0, forwardedHeaders, abort.signal);
|
|
142130
142266
|
if ((upstream.status === 401 || upstream.status === 403) && !isMember && !abort.signal.aborted) {
|
|
142131
142267
|
try {
|
|
@@ -142133,7 +142269,7 @@ async function handleWebWix(req, res, state) {
|
|
|
142133
142269
|
} catch {
|
|
142134
142270
|
}
|
|
142135
142271
|
try {
|
|
142136
|
-
const again = currentBindingSession(
|
|
142272
|
+
const again = currentBindingSession(live4, state);
|
|
142137
142273
|
token = again.visitorToken = await mintAppVisitor(state.app, again);
|
|
142138
142274
|
upstream = await webWixStream(method, target.toString(), body, token, void 0, forwardedHeaders, abort.signal);
|
|
142139
142275
|
} catch {
|
|
@@ -142425,19 +142561,19 @@ async function handleWebWix(req, res, state) {
|
|
|
142425
142561
|
return reply(status, { error: auth2 ? "webwix_owner_mint_failed" : "webwix_bridge_upstream_failed" });
|
|
142426
142562
|
}
|
|
142427
142563
|
}
|
|
142428
|
-
const
|
|
142429
|
-
if (!
|
|
142564
|
+
const live4 = currentBindingSession(session, state);
|
|
142565
|
+
if (!live4.visitorToken && !live4.memberToken) {
|
|
142430
142566
|
try {
|
|
142431
|
-
|
|
142567
|
+
live4.visitorToken = await mintAppVisitor(state.app, live4);
|
|
142432
142568
|
} catch {
|
|
142433
142569
|
}
|
|
142434
142570
|
}
|
|
142435
|
-
const token =
|
|
142571
|
+
const token = live4.memberToken ?? live4.visitorToken ?? "";
|
|
142436
142572
|
try {
|
|
142437
142573
|
let r3 = await webWixCall(method, requestedPath, body, token, void 0, forwardedHeaders);
|
|
142438
|
-
if ((r3.status === 401 || r3.status === 403) && !
|
|
142574
|
+
if ((r3.status === 401 || r3.status === 403) && !live4.memberToken) {
|
|
142439
142575
|
try {
|
|
142440
|
-
const again = currentBindingSession(
|
|
142576
|
+
const again = currentBindingSession(live4, state);
|
|
142441
142577
|
again.visitorToken = await mintAppVisitor(state.app, again);
|
|
142442
142578
|
r3 = await webWixCall(method, requestedPath, body, again.visitorToken, void 0, forwardedHeaders);
|
|
142443
142579
|
} catch {
|
|
@@ -142534,10 +142670,10 @@ async function handleDev(req, res, state) {
|
|
|
142534
142670
|
}
|
|
142535
142671
|
let descriptor = body.descriptor;
|
|
142536
142672
|
if (!descriptor && body.screenId) {
|
|
142537
|
-
const
|
|
142538
|
-
if ("refusal" in
|
|
142539
|
-
const diagnostics2 = depthRefusalDiagnostics(state,
|
|
142540
|
-
const legacy2 = { screenId: body.screenId, scheme, renderable: false, reason: `depth_budget_exceeded: ${
|
|
142673
|
+
const live4 = await liveDescriptorFor(state, body.screenId);
|
|
142674
|
+
if ("refusal" in live4) {
|
|
142675
|
+
const diagnostics2 = depthRefusalDiagnostics(state, live4.refusal);
|
|
142676
|
+
const legacy2 = { screenId: body.screenId, scheme, renderable: false, reason: `depth_budget_exceeded: ${live4.refusal.finding.message}`, diagnostics: diagnostics2 };
|
|
142541
142677
|
const report10 = foldLegacyReport(legacy2, {
|
|
142542
142678
|
source: "render",
|
|
142543
142679
|
screenId: body.screenId,
|
|
@@ -142548,7 +142684,7 @@ async function handleDev(req, res, state) {
|
|
|
142548
142684
|
});
|
|
142549
142685
|
return sendJson(res, body.envelope === 1 ? 422 : 200, report10);
|
|
142550
142686
|
}
|
|
142551
|
-
descriptor =
|
|
142687
|
+
descriptor = live4.descriptor;
|
|
142552
142688
|
}
|
|
142553
142689
|
if (!descriptor || typeof descriptor !== "object") {
|
|
142554
142690
|
return sendJson(res, 404, { error: "screen_not_found", screenId: body.screenId ?? null });
|
|
@@ -142598,9 +142734,9 @@ async function handleDev(req, res, state) {
|
|
|
142598
142734
|
const diagMatch = /^\/__dev\/screen\/(.+?)\/diagnostics(?:\?|$)/.exec(url);
|
|
142599
142735
|
if (diagMatch && req.method === "GET") {
|
|
142600
142736
|
const screenId = decodeURIComponent(diagMatch[1]);
|
|
142601
|
-
const
|
|
142602
|
-
if ("refusal" in
|
|
142603
|
-
const descriptor =
|
|
142737
|
+
const live4 = await liveDescriptorFor(state, screenId);
|
|
142738
|
+
if ("refusal" in live4) return sendJson(res, 422, depthRefusalDiagnostics(state, live4.refusal));
|
|
142739
|
+
const descriptor = live4.descriptor;
|
|
142604
142740
|
if (!descriptor) return sendJson(res, 404, { error: "screen_not_found", screenId });
|
|
142605
142741
|
const diag = await runScreenDiagnostics(state, screenId, descriptor);
|
|
142606
142742
|
return sendJson(res, diag.ok ? 200 : 422, diag);
|
|
@@ -143042,9 +143178,9 @@ async function handleAdminPlayground(req, res, state) {
|
|
|
143042
143178
|
if (validateMatch && req.method === "GET") {
|
|
143043
143179
|
const screenId = decodeURIComponent(validateMatch[1]);
|
|
143044
143180
|
const strict = /[?&]strict=1(?:&|$)/.test(url);
|
|
143045
|
-
const
|
|
143046
|
-
if ("refusal" in
|
|
143047
|
-
const descriptor =
|
|
143181
|
+
const live4 = await liveDescriptorFor(state, screenId);
|
|
143182
|
+
if ("refusal" in live4) return sendJson(res, 422, depthRefusalReport(live4.refusal, strict));
|
|
143183
|
+
const descriptor = live4.descriptor;
|
|
143048
143184
|
if (!descriptor) return sendJson(res, 404, { error: "screen_not_found", screenId });
|
|
143049
143185
|
const { validateScreenDescriptor: validateScreenDescriptor2, loadAllowedComponents: loadAllowedComponents2, readBuiltBundle: readBuiltBundle2, readBuiltBundleMap: readBuiltBundleMap2, appWorkerActionsFor: appWorkerActionsFor2, appWorkerServicesFor: appWorkerServicesFor2, appServicesContextFor: appServicesContextFor2 } = await Promise.resolve().then(() => (init_validate_descriptor(), validate_descriptor_exports));
|
|
143050
143186
|
const tokens2 = readAppTokens(state) ?? void 0;
|
|
@@ -149078,7 +149214,7 @@ async function buildFromLoaded(preloaded, dest, opts = {}) {
|
|
|
149078
149214
|
} else {
|
|
149079
149215
|
const counting = countingWixCall(await ensureLiveWixCall());
|
|
149080
149216
|
const host = collect2.render.host ? countingHostAnswers(collect2.render.host) : void 0;
|
|
149081
|
-
const
|
|
149217
|
+
const live4 = await liveRenderServices(bundleJs, {
|
|
149082
149218
|
wixCall: counting.call,
|
|
149083
149219
|
input,
|
|
149084
149220
|
budgetMs: collect2.render.loadBudgetMs ?? LIVE_LOAD_BUDGET_MS,
|
|
@@ -149086,14 +149222,14 @@ async function buildFromLoaded(preloaded, dest, opts = {}) {
|
|
|
149086
149222
|
descriptor,
|
|
149087
149223
|
...host ? { host: host.host } : {}
|
|
149088
149224
|
});
|
|
149089
|
-
base2 =
|
|
149090
|
-
liveCalls = [...
|
|
149225
|
+
base2 = live4.services;
|
|
149226
|
+
liveCalls = [...live4.calls];
|
|
149091
149227
|
liveReturned = counting.returned();
|
|
149092
149228
|
if (host) liveReturned += host.answered();
|
|
149093
149229
|
liveFailed = counting.failed();
|
|
149094
149230
|
liveEmpty = counting.empty();
|
|
149095
149231
|
liveRefused = counting.refused();
|
|
149096
|
-
liveErrors =
|
|
149232
|
+
liveErrors = live4.errors;
|
|
149097
149233
|
}
|
|
149098
149234
|
} else if (collect2?.render?.mocks && collect2.render.hydrate !== false && bundleName && readBundle(bundleName)) {
|
|
149099
149235
|
const calls = [];
|
|
@@ -149935,10 +150071,10 @@ async function buildFunctionsOnlyRelease(preloaded, dest) {
|
|
|
149935
150071
|
functions: built.map((item2) => item2.record),
|
|
149936
150072
|
...config.functions.siteBinding ? { functionSiteBinding: { ...config.functions.siteBinding } } : {},
|
|
149937
150073
|
...functionDataResources ? { functionDataResources } : {},
|
|
149938
|
-
...config.functions.schedules?.length ? { functionSchedules: config.functions.schedules.map((
|
|
149939
|
-
const target = built.find((item2) => item2.name ===
|
|
149940
|
-
if (!target) throw new Error(`function schedule "${
|
|
149941
|
-
return { ...
|
|
150074
|
+
...config.functions.schedules?.length ? { functionSchedules: config.functions.schedules.map((schedule2) => {
|
|
150075
|
+
const target = built.find((item2) => item2.name === schedule2.functionName);
|
|
150076
|
+
if (!target) throw new Error(`function schedule "${schedule2.name}" references unknown function "${schedule2.functionName}"`);
|
|
150077
|
+
return { ...schedule2, bundleHash: target.bundleHash };
|
|
149942
150078
|
}) } : {}
|
|
149943
150079
|
};
|
|
149944
150080
|
const sha4 = gitSha();
|
|
@@ -156262,9 +156398,9 @@ var init_src8 = __esm({
|
|
|
156262
156398
|
});
|
|
156263
156399
|
|
|
156264
156400
|
// ../../node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js
|
|
156265
|
-
function hasSeq(data,
|
|
156266
|
-
for (let j2 = 0; j2 <
|
|
156267
|
-
if (
|
|
156401
|
+
function hasSeq(data, seq3, i2) {
|
|
156402
|
+
for (let j2 = 0; j2 < seq3.length; j2++) {
|
|
156403
|
+
if (seq3[j2] !== data[i2 + j2 + 1]) return false;
|
|
156268
156404
|
}
|
|
156269
156405
|
return true;
|
|
156270
156406
|
}
|
|
@@ -160169,9 +160305,9 @@ function decodeContentInfo(bytes2) {
|
|
|
160169
160305
|
function contentInfos(info4, password) {
|
|
160170
160306
|
if (!info4) return [];
|
|
160171
160307
|
if (info4.oid === OID.data) {
|
|
160172
|
-
const
|
|
160173
|
-
if (!
|
|
160174
|
-
return walkContentInfoList(
|
|
160308
|
+
const seq3 = readSequence(info4.payload, 0);
|
|
160309
|
+
if (!seq3) return walkSafeBags(info4.payload, password);
|
|
160310
|
+
return walkContentInfoList(seq3.contents, password);
|
|
160175
160311
|
}
|
|
160176
160312
|
if (info4.oid === OID.encryptedData) {
|
|
160177
160313
|
const decrypted = decryptEncryptedData(info4.payload, password);
|
|
@@ -160183,22 +160319,22 @@ function walkContentInfoList(bytes2, password) {
|
|
|
160183
160319
|
const out2 = [];
|
|
160184
160320
|
let i2 = 0;
|
|
160185
160321
|
while (i2 < bytes2.length) {
|
|
160186
|
-
const
|
|
160187
|
-
if (!
|
|
160188
|
-
const inner = decodeContentInfo(
|
|
160322
|
+
const seq3 = readSequence(bytes2, i2);
|
|
160323
|
+
if (!seq3) break;
|
|
160324
|
+
const inner = decodeContentInfo(seq3.contents);
|
|
160189
160325
|
if (inner?.oid === OID.data) {
|
|
160190
160326
|
out2.push(...walkSafeBags(inner.payload, password));
|
|
160191
160327
|
} else if (inner?.oid === OID.encryptedData) {
|
|
160192
160328
|
const decrypted = decryptEncryptedData(inner.payload, password);
|
|
160193
160329
|
if (decrypted) out2.push(...walkSafeBags(decrypted, password));
|
|
160194
160330
|
}
|
|
160195
|
-
i2 =
|
|
160331
|
+
i2 = seq3.end;
|
|
160196
160332
|
}
|
|
160197
160333
|
return out2;
|
|
160198
160334
|
}
|
|
160199
160335
|
function walkSafeBags(bytes2, password) {
|
|
160200
|
-
const
|
|
160201
|
-
const body =
|
|
160336
|
+
const seq3 = bytes2[0] === 48 ? readSequence(bytes2, 0) : void 0;
|
|
160337
|
+
const body = seq3 ? seq3.contents : bytes2;
|
|
160202
160338
|
const out2 = [];
|
|
160203
160339
|
let i2 = 0;
|
|
160204
160340
|
while (i2 < body.length) {
|
|
@@ -160226,8 +160362,8 @@ function decodeSafeBag(bytes2, password) {
|
|
|
160226
160362
|
return [];
|
|
160227
160363
|
}
|
|
160228
160364
|
function decodeCertBag(bytes2) {
|
|
160229
|
-
const
|
|
160230
|
-
const body =
|
|
160365
|
+
const seq3 = readSequence(bytes2, 0);
|
|
160366
|
+
const body = seq3 ? seq3.contents : bytes2;
|
|
160231
160367
|
const oid = readOid(body, 0);
|
|
160232
160368
|
if (!oid || oid.oid !== OID.x509Certificate) return [];
|
|
160233
160369
|
const wrapped = readContext(body, oid.end, 0);
|
|
@@ -160241,11 +160377,11 @@ function decodeCertBag(bytes2) {
|
|
|
160241
160377
|
}
|
|
160242
160378
|
}
|
|
160243
160379
|
function decryptEncryptedData(bytes2, password) {
|
|
160244
|
-
const
|
|
160245
|
-
if (!
|
|
160246
|
-
const ver = readInteger(
|
|
160380
|
+
const seq3 = readSequence(bytes2, 0);
|
|
160381
|
+
if (!seq3) return void 0;
|
|
160382
|
+
const ver = readInteger(seq3.contents, 0);
|
|
160247
160383
|
if (!ver) return void 0;
|
|
160248
|
-
const info4 = readSequence(
|
|
160384
|
+
const info4 = readSequence(seq3.contents, ver.end);
|
|
160249
160385
|
if (!info4) return void 0;
|
|
160250
160386
|
const contentType = readOid(info4.contents, 0);
|
|
160251
160387
|
if (!contentType) return void 0;
|
|
@@ -160259,8 +160395,8 @@ function decryptEncryptedData(bytes2, password) {
|
|
|
160259
160395
|
return decryptPbe(alg.contents, ciphertext, password);
|
|
160260
160396
|
}
|
|
160261
160397
|
function decryptShroudedKey(bytes2, password) {
|
|
160262
|
-
const
|
|
160263
|
-
const body =
|
|
160398
|
+
const seq3 = readSequence(bytes2, 0);
|
|
160399
|
+
const body = seq3 ? seq3.contents : bytes2;
|
|
160264
160400
|
const alg = readSequence(body, 0);
|
|
160265
160401
|
if (!alg) return void 0;
|
|
160266
160402
|
const oct = readOctetString(body, alg.end);
|
|
@@ -164341,7 +164477,7 @@ async function runNotifySetup(pos, flags, io2, deps = {}) {
|
|
|
164341
164477
|
if (ownership.state !== "owned") return refuse4(io2, "app_ownership_unverified", void 0, 1);
|
|
164342
164478
|
input.app = ownership.slug;
|
|
164343
164479
|
const common2 = { target, wixToken, previewTag, fetchImpl: deps.fetchImpl };
|
|
164344
|
-
const readStatus = (
|
|
164480
|
+
const readStatus = (live4 = false) => pushSetupRequest({ ...common2, operation: "status", query: { app: input.app, site: input.site, ...live4 ? { verify: "live" } : {} } });
|
|
164345
164481
|
if (operation === "status") return report(await readStatus(flags.refresh === true), flags, io2, dir);
|
|
164346
164482
|
const previous = await readStatus();
|
|
164347
164483
|
if (!previous.ok || !STATES.has(String(previous.body?.state))) return report(previous, flags, io2, dir);
|
|
@@ -166559,7 +166695,7 @@ function watchReminder(dir, opts = {}) {
|
|
|
166559
166695
|
try {
|
|
166560
166696
|
if (!existsSync55(join51(dir, "himalaya.content.json"))) return void 0;
|
|
166561
166697
|
const nowDate = opts.now ?? /* @__PURE__ */ new Date();
|
|
166562
|
-
const
|
|
166698
|
+
const live4 = liveWatch(dir, opts.isAlive, nowDate);
|
|
166563
166699
|
const now = nowDate.getTime();
|
|
166564
166700
|
const file2 = join51(dir, REMINDERS_FILE);
|
|
166565
166701
|
let last = Number.NaN;
|
|
@@ -166571,8 +166707,8 @@ function watchReminder(dir, opts = {}) {
|
|
|
166571
166707
|
if (!realDirIn(dir, ".himi")) return void 0;
|
|
166572
166708
|
writeFileAtomic(file2, `${JSON.stringify({ watch: new Date(now).toISOString() })}
|
|
166573
166709
|
`);
|
|
166574
|
-
if (
|
|
166575
|
-
return `the live preview is running at ${
|
|
166710
|
+
if (live4) {
|
|
166711
|
+
return `the live preview is running at ${live4.url} (pid ${live4.pid}${live4.by === "init" ? ", started by himi init" : ""}) \u2014 it repaints on every save, and the build board is ${live4.board}; give the owner that link to click around while you work, and do not start another`;
|
|
166576
166712
|
}
|
|
166577
166713
|
const content = opts.content ?? displayPath(dir);
|
|
166578
166714
|
const remote = readInitSource(dir)?.source === "remote" ? "init did not start it because this template came off the serve plane \u2014 once you have read its code, " : "";
|
|
@@ -166619,9 +166755,9 @@ async function startWatchAtInit(dir, opts) {
|
|
|
166619
166755
|
const note = given.length ? { note: watchOptOutIgnoredNote(given) } : {};
|
|
166620
166756
|
const deps = { ...defaultStartWatchDeps, ...opts.deps };
|
|
166621
166757
|
const now = opts.now ?? /* @__PURE__ */ new Date();
|
|
166622
|
-
const
|
|
166623
|
-
if (
|
|
166624
|
-
return { skipped: `a live preview of this app is already running (pid ${
|
|
166758
|
+
const live4 = liveWatch(dir, deps.isAlive, now);
|
|
166759
|
+
if (live4 && (live4.by === "init" || await deps.previewRunning(dir))) {
|
|
166760
|
+
return { skipped: `a live preview of this app is already running (pid ${live4.pid})`, url: live4.url, board: live4.board, pid: live4.pid, ...note };
|
|
166625
166761
|
}
|
|
166626
166762
|
try {
|
|
166627
166763
|
const port = await deps.freePort(previewPortForDir(dir));
|
|
@@ -168647,6 +168783,9 @@ function verticalsFromBook(path2) {
|
|
|
168647
168783
|
function recommendTemplates(input) {
|
|
168648
168784
|
const text22 = input.text ?? "";
|
|
168649
168785
|
const owner = OWNER_WORDS.test(text22);
|
|
168786
|
+
const role = owner ? "owner" : "customer";
|
|
168787
|
+
const roleOf2 = (name) => /owner/.test(name) ? "owner" : "customer";
|
|
168788
|
+
const context = input.context?.trim() ? input.context : void 0;
|
|
168650
168789
|
const rows = new Map(input.catalog.map((row2) => [row2.name, rowTokens([row2.name, row2.title ?? "", row2.description ?? "", ...row2.tags ?? [], row2.category ?? ""].join(" "))]));
|
|
168651
168790
|
const hays = new Map([...rows].map(([name, r3]) => [name, r3.tokens]));
|
|
168652
168791
|
const known = new Set([...hays.values()].flatMap((h2) => [...h2]));
|
|
@@ -168657,6 +168796,7 @@ function recommendTemplates(input) {
|
|
|
168657
168796
|
const byName3 = /* @__PURE__ */ new Map();
|
|
168658
168797
|
const fits = /* @__PURE__ */ new Set();
|
|
168659
168798
|
const siteFits = /* @__PURE__ */ new Set();
|
|
168799
|
+
const requestFits = /* @__PURE__ */ new Set();
|
|
168660
168800
|
for (const row2 of input.catalog) {
|
|
168661
168801
|
const reasons = [];
|
|
168662
168802
|
let score = 0;
|
|
@@ -168667,7 +168807,10 @@ function recommendTemplates(input) {
|
|
|
168667
168807
|
if (hit.length) {
|
|
168668
168808
|
const depth = rows.get(row2.name).depth;
|
|
168669
168809
|
score += hit.reduce((n2, t2) => n2 + weight(t2) * (t2.startsWith("@") ? depthCredit(depth.get(t2) ?? 0) : 1), 0) / wantWeight;
|
|
168670
|
-
if ((hit.some((t2) => t2.startsWith("@")) || hit.length >= 2) && owner === isOwner)
|
|
168810
|
+
if ((hit.some((t2) => t2.startsWith("@")) || hit.length >= 2) && owner === isOwner) {
|
|
168811
|
+
fits.add(row2.name);
|
|
168812
|
+
requestFits.add(row2.name);
|
|
168813
|
+
}
|
|
168671
168814
|
reasons.push(`matches ${hit.map((h2) => h2.startsWith("@") ? `${h2.slice(1)} words` : `"${h2}"`).join(", ")}`);
|
|
168672
168815
|
const more = extras.get(row2.name);
|
|
168673
168816
|
if (more.length) reasons.push(`also covers ${more.map((t2) => t2.slice(1)).join(", ")}, which the brief did not ask for`);
|
|
@@ -168681,7 +168824,21 @@ function recommendTemplates(input) {
|
|
|
168681
168824
|
score -= 0.3;
|
|
168682
168825
|
}
|
|
168683
168826
|
}
|
|
168684
|
-
byName3.set(row2.name, { name: row2.name, score, reasons, ...row2.source ? { source: row2.source } : {} });
|
|
168827
|
+
byName3.set(row2.name, { name: row2.name, score, reasons, ...row2.source ? { source: row2.source } : {}, role: roleOf2(row2.name), fit: "none" });
|
|
168828
|
+
}
|
|
168829
|
+
const contextMatch = /* @__PURE__ */ new Map();
|
|
168830
|
+
if (context !== void 0 && want.size) {
|
|
168831
|
+
const named3 = new Set(tokens(context).filter((t2) => t2.startsWith("@") && known.has(t2)));
|
|
168832
|
+
const added = [...named3].filter((t2) => !asked.has(t2));
|
|
168833
|
+
for (const name of added.length ? requestFits : []) {
|
|
168834
|
+
const hay = hays.get(name);
|
|
168835
|
+
if ([...hay].some((t2) => t2.startsWith("@") && !asked.has(t2) && !named3.has(t2))) continue;
|
|
168836
|
+
const depth = rows.get(name).depth;
|
|
168837
|
+
const hit = added.filter((t2) => hay.has(t2));
|
|
168838
|
+
if (!hit.length) continue;
|
|
168839
|
+
contextMatch.set(name, hit.reduce((n2, t2) => n2 + depthCredit(depth.get(t2) ?? 0), 0));
|
|
168840
|
+
byName3.get(name).reasons.push(`the context also names ${hit.map((t2) => t2.slice(1)).join(", ")} (used only to order equal scores)`);
|
|
168841
|
+
}
|
|
168685
168842
|
}
|
|
168686
168843
|
if (input.verticals?.length) {
|
|
168687
168844
|
for (const c2 of scoreOverlays(input.verticals, "")) {
|
|
@@ -168701,8 +168858,12 @@ function recommendTemplates(input) {
|
|
|
168701
168858
|
fb.score = Math.max(fb.score + 0.25, best + 0.01);
|
|
168702
168859
|
fb.reasons.push(owner ? "the default start for owner/operations apps" : "the default start for a customer app on a Wix site");
|
|
168703
168860
|
}
|
|
168704
|
-
const ranked = [...byName3.values()].map((r3) => ({
|
|
168705
|
-
|
|
168861
|
+
const ranked = [...byName3.values()].map((r3) => ({
|
|
168862
|
+
...r3,
|
|
168863
|
+
score: Math.round(r3.score * 1e3) / 1e3,
|
|
168864
|
+
fit: requestFits.has(r3.name) ? "request" : siteFits.has(r3.name) && r3.role === role ? "site" : r3.name === fallback ? "default" : "none"
|
|
168865
|
+
})).filter((r3) => r3.score > 0).sort((a2, b2) => b2.score - a2.score || (contextMatch.get(b2.name) ?? 0) - (contextMatch.get(a2.name) ?? 0) || Number(siteFits.has(b2.name)) - Number(siteFits.has(a2.name)) || (extras.get(a2.name)?.length ?? 0) - (extras.get(b2.name)?.length ?? 0) || Number(b2.name === fallback) - Number(a2.name === fallback) || a2.name.localeCompare(b2.name));
|
|
168866
|
+
return { owner, role, defaultTemplate: fb ? fallback : null, ...context !== void 0 ? { contextApplied: true } : {}, ranked };
|
|
168706
168867
|
}
|
|
168707
168868
|
var OWNER_WORDS, STOP, CONCEPTS, CONCEPT_OF, tokens, depthCredit, weight, BookRefusal, readJson7, uniq;
|
|
168708
168869
|
var init_template_recommend = __esm({
|
|
@@ -170329,16 +170490,16 @@ function requireStr() {
|
|
|
170329
170490
|
return str6;
|
|
170330
170491
|
}
|
|
170331
170492
|
function requireSeq() {
|
|
170332
|
-
if (hasRequiredSeq) return
|
|
170493
|
+
if (hasRequiredSeq) return seq2;
|
|
170333
170494
|
hasRequiredSeq = 1;
|
|
170334
170495
|
const Type22 = requireType();
|
|
170335
|
-
|
|
170496
|
+
seq2 = new Type22("tag:yaml.org,2002:seq", {
|
|
170336
170497
|
kind: "sequence",
|
|
170337
170498
|
construct: function(data) {
|
|
170338
170499
|
return data !== null ? data : [];
|
|
170339
170500
|
}
|
|
170340
170501
|
});
|
|
170341
|
-
return
|
|
170502
|
+
return seq2;
|
|
170342
170503
|
}
|
|
170343
170504
|
function requireMap() {
|
|
170344
170505
|
if (hasRequiredMap) return map;
|
|
@@ -172996,7 +173157,7 @@ function requireJsYaml() {
|
|
|
172996
173157
|
jsYaml.safeDump = renamed("safeDump", "dump");
|
|
172997
173158
|
return jsYaml;
|
|
172998
173159
|
}
|
|
172999
|
-
var jsYaml, loader, common, hasRequiredCommon, exception, hasRequiredException, snippet, hasRequiredSnippet, type, hasRequiredType, schema, hasRequiredSchema, str6, hasRequiredStr,
|
|
173160
|
+
var jsYaml, loader, common, hasRequiredCommon, exception, hasRequiredException, snippet, hasRequiredSnippet, type, hasRequiredType, schema, hasRequiredSchema, str6, hasRequiredStr, seq2, hasRequiredSeq, map, hasRequiredMap, failsafe, hasRequiredFailsafe, _null, hasRequired_null, bool2, hasRequiredBool, int2, hasRequiredInt, float, hasRequiredFloat, json2, hasRequiredJson, core, hasRequiredCore, timestamp, hasRequiredTimestamp, merge, hasRequiredMerge, binary, hasRequiredBinary, omap, hasRequiredOmap, pairs, hasRequiredPairs, set, hasRequiredSet, _default, hasRequired_default, hasRequiredLoader, dumper, hasRequiredDumper, hasRequiredJsYaml, jsYamlExports, yaml, Type2, Schema, FAILSAFE_SCHEMA, JSON_SCHEMA, CORE_SCHEMA, DEFAULT_SCHEMA, load3, loadAll, dump, YAMLException, types, safeLoad, safeLoadAll, safeDump;
|
|
173000
173161
|
var init_js_yaml = __esm({
|
|
173001
173162
|
"../../node_modules/js-yaml/dist/js-yaml.mjs"() {
|
|
173002
173163
|
init_define_HHP_CATALOG();
|
|
@@ -174668,12 +174829,12 @@ function genNativeConfig(app2, opts = {}) {
|
|
|
174668
174829
|
const embedManaged = hasMarkers(project, "yaml", LABEL_LIVE_EMBED);
|
|
174669
174830
|
if (targetManaged !== embedManaged) throw new Error(`${app2}: Live Activity target and embedding markers must be installed together`);
|
|
174670
174831
|
const drainsWidgetActions = hostAppliesDeferredWidgetActions(app2);
|
|
174671
|
-
const
|
|
174672
|
-
if (
|
|
174832
|
+
const live4 = targetManaged ? liveActivityPlan(project, ids.includes("live_activity"), drainsWidgetActions) : void 0;
|
|
174833
|
+
if (live4?.appGroupId) {
|
|
174673
174834
|
const key3 = "com.apple.security.application-groups";
|
|
174674
174835
|
const existing = ios.entitlements[key3];
|
|
174675
174836
|
const groups = Array.isArray(existing) ? [...existing] : existing === void 0 ? [] : [existing];
|
|
174676
|
-
if (!groups.includes(
|
|
174837
|
+
if (!groups.includes(live4.appGroupId)) groups.push(live4.appGroupId);
|
|
174677
174838
|
ios.entitlements[key3] = groups;
|
|
174678
174839
|
}
|
|
174679
174840
|
const files = [
|
|
@@ -174789,7 +174950,7 @@ function genNativeConfig(app2, opts = {}) {
|
|
|
174789
174950
|
files.push(r3);
|
|
174790
174951
|
}
|
|
174791
174952
|
if (targetManaged) {
|
|
174792
|
-
const plan =
|
|
174953
|
+
const plan = live4;
|
|
174793
174954
|
files.push(applyToFile(iosYml, "yaml", LABEL_LIVE_TARGET, (i2) => plan.target.map((line) => i2 + line), check));
|
|
174794
174955
|
files.push(applyToFile(iosYml, "yaml", LABEL_LIVE_EMBED, (i2) => plan.embed.map((line) => i2 + line), check));
|
|
174795
174956
|
const source2 = join63(dirname37(iosYml), LIVE_SOURCE_PATH);
|
|
@@ -174812,7 +174973,7 @@ function genNativeConfig(app2, opts = {}) {
|
|
|
174812
174973
|
}
|
|
174813
174974
|
if (targetManaged) {
|
|
174814
174975
|
const manifest3 = join63(dirname37(iosYml), LIVE_PRIVACY_MANIFEST_PATH);
|
|
174815
|
-
files.push(
|
|
174976
|
+
files.push(live4.source ? applyWholeFile(manifest3, renderPrivacyManifest(privacyPlanFor([])), check) : removeWholeFile(manifest3, check));
|
|
174816
174977
|
}
|
|
174817
174978
|
const liveRoot = join63(dirname37(iosYml), dirname37(LIVE_PRIVACY_MANIFEST_PATH));
|
|
174818
174979
|
for (const yml of [iosYml, macosProjectYml(app2)]) {
|
|
@@ -180521,9 +180682,9 @@ function makeFunctionsHandler(options2) {
|
|
|
180521
180682
|
const target = resolveTarget3(new URL(request.url).pathname);
|
|
180522
180683
|
if (!target) return errorResponse(404, "not_found", "function route not found", id);
|
|
180523
180684
|
if (request.method === "OPTIONS") return new Response(null, { status: 204, headers: { "access-control-allow-origin": "*", "access-control-allow-methods": "GET,POST,PUT,PATCH,DELETE,OPTIONS", "access-control-allow-headers": "authorization,content-type,x-request-id,x-himalaya-release,x-himalaya-preview-token", "x-request-id": id } });
|
|
180524
|
-
const
|
|
180685
|
+
const live4 = await options2.store.getManifest(target.app);
|
|
180525
180686
|
const pin = new URL(request.url).searchParams.get("release") || request.headers.get("x-himalaya-release");
|
|
180526
|
-
let selected =
|
|
180687
|
+
let selected = live4;
|
|
180527
180688
|
if (pin && !options2.previewTokenSecret) return errorResponse(501, "preview_token_unavailable", "pinned release access requires preview token validation", id);
|
|
180528
180689
|
let previewClaims;
|
|
180529
180690
|
if (pin && options2.previewTokenSecret) {
|
|
@@ -180867,10 +181028,10 @@ function memoryStore(manifest2, built) {
|
|
|
180867
181028
|
async function buildLocalFunctions(app2) {
|
|
180868
181029
|
const built = await buildFunctions(app2.definitions, app2.sources);
|
|
180869
181030
|
const bundles = Object.fromEntries(built.map((item2) => [item2.name, { sha256: item2.bundleHash, sri: item2.sri, bytes: item2.bytes.length }]));
|
|
180870
|
-
const manifest2 = { releaseId: "local", gitSha: "local", app: app2.app, minBinaryVersion: null, screens: {}, bundles, functions: built.map((item2) => item2.record), ...app2.siteBinding ? { functionSiteBinding: { ...app2.siteBinding } } : {}, ...app2.data ? { functionDataResources: app2.data } : {}, ...app2.schedules?.length ? { functionSchedules: app2.schedules.map((
|
|
180871
|
-
const target = built.find((item2) => item2.name ===
|
|
180872
|
-
if (!target) throw new Error(`function schedule "${
|
|
180873
|
-
return { ...
|
|
181031
|
+
const manifest2 = { releaseId: "local", gitSha: "local", app: app2.app, minBinaryVersion: null, screens: {}, bundles, functions: built.map((item2) => item2.record), ...app2.siteBinding ? { functionSiteBinding: { ...app2.siteBinding } } : {}, ...app2.data ? { functionDataResources: app2.data } : {}, ...app2.schedules?.length ? { functionSchedules: app2.schedules.map((schedule2) => {
|
|
181032
|
+
const target = built.find((item2) => item2.name === schedule2.functionName);
|
|
181033
|
+
if (!target) throw new Error(`function schedule "${schedule2.name}" references unknown function "${schedule2.functionName}"`);
|
|
181034
|
+
return { ...schedule2, bundleHash: target.bundleHash };
|
|
180874
181035
|
}) } : {} };
|
|
180875
181036
|
const store = memoryStore(manifest2, built);
|
|
180876
181037
|
return { manifest: manifest2, built, handler: makeFunctionsHandler({ store, sandbox: createLocalTestSandbox(), definitions: app2.definitions, siteBinding: app2.siteBinding }) };
|
|
@@ -192655,10 +192816,10 @@ var init_commerce = __esm({
|
|
|
192655
192816
|
}
|
|
192656
192817
|
/** Manual prices, or undefined when the product was never priced (its synthetic schedule's prices 404). */
|
|
192657
192818
|
async prices(id) {
|
|
192658
|
-
const
|
|
192659
|
-
if (!
|
|
192819
|
+
const schedule2 = await optional3(() => this.t.get(`/v2/inAppPurchases/${encodeURIComponent(id)}/iapPriceSchedule`));
|
|
192820
|
+
if (!schedule2?.data)
|
|
192660
192821
|
return void 0;
|
|
192661
|
-
const doc = await optional3(() => this.t.list(`/v1/inAppPurchasePriceSchedules/${encodeURIComponent(one(
|
|
192822
|
+
const doc = await optional3(() => this.t.list(`/v1/inAppPurchasePriceSchedules/${encodeURIComponent(one(schedule2, "price schedule").id)}/manualPrices`, { query: { include: "inAppPurchasePricePoint,territory" } }));
|
|
192662
192823
|
return doc && manualPrices(doc.data, doc.included ?? [], "inAppPurchasePricePoint");
|
|
192663
192824
|
}
|
|
192664
192825
|
/** Sets one base-territory price from `startDate` (default: today, US Pacific) — replaces the schedule. */
|
|
@@ -195363,13 +195524,13 @@ var init_actions_release = __esm({
|
|
|
195363
195524
|
const item2 = items.find((i2) => i2.id === p2.itemId);
|
|
195364
195525
|
if (!item2 || item2.state === "REMOVED")
|
|
195365
195526
|
return noop("reviewSubmissionItems", `item ${p2.itemId} is not in submission ${p2.submissionId}`);
|
|
195366
|
-
const
|
|
195527
|
+
const live4 = items.filter((i2) => i2.state !== "REMOVED");
|
|
195367
195528
|
return {
|
|
195368
195529
|
changes: [{ op: "delete", resource: "reviewSubmissionItems", id: p2.itemId, summary: `remove ${item2.type ?? "item"} ${item2.itemId ?? p2.itemId} (${item2.state}) from ${p2.submissionId} (${submission.state})` }],
|
|
195369
195530
|
sideEffects: [
|
|
195370
195531
|
"the item is no longer reviewed with this submission",
|
|
195371
195532
|
...item2.type === "appStoreVersions" ? ["it is the submission's app version: what is left is reviewed without it"] : [],
|
|
195372
|
-
...
|
|
195533
|
+
...live4.length === 1 ? ["it is the submission's last item"] : []
|
|
195373
195534
|
],
|
|
195374
195535
|
facts: { state: submission.state ?? null }
|
|
195375
195536
|
};
|
|
@@ -195403,11 +195564,11 @@ var init_actions_release = __esm({
|
|
|
195403
195564
|
const nothing = (p2.resolved === void 0 || p2.resolved === true && item2.state !== "REJECTED") && (p2.removed === void 0 || p2.removed === true && item2.state === "REMOVED" || p2.removed === false && item2.state !== "REMOVED");
|
|
195404
195565
|
if (nothing)
|
|
195405
195566
|
return noop("reviewSubmissionItems", `item ${p2.itemId} is ${item2.state}; nothing to change`);
|
|
195406
|
-
const
|
|
195567
|
+
const live4 = items.filter((i2) => i2.state !== "REMOVED");
|
|
195407
195568
|
const asked = [...p2.resolved !== void 0 ? [`resolved ${p2.resolved === null ? "cleared" : p2.resolved}`] : [], ...p2.removed !== void 0 ? [`removed ${p2.removed === null ? "cleared" : p2.removed}`] : []];
|
|
195408
195569
|
return {
|
|
195409
195570
|
changes: [{ op: "update", resource: "reviewSubmissionItems", id: p2.itemId, summary: `${item2.type ?? "item"} ${item2.itemId ?? p2.itemId} (${item2.state}): ${asked.join(", ")}`, after: { ...p2.resolved !== void 0 ? { resolved: p2.resolved } : {}, ...p2.removed !== void 0 ? { removed: p2.removed } : {} } }],
|
|
195410
|
-
sideEffects: p2.removed === true ? ["the item is no longer reviewed with this submission", ...item2.type === "appStoreVersions" ? ["it is the submission's app version: what is left is reviewed without it"] : [], ...
|
|
195571
|
+
sideEffects: p2.removed === true ? ["the item is no longer reviewed with this submission", ...item2.type === "appStoreVersions" ? ["it is the submission's app version: what is left is reviewed without it"] : [], ...live4.length === 1 ? ["it is the submission's last item"] : []] : [],
|
|
195411
195572
|
facts: { state: submission.state ?? null, itemState: item2.state }
|
|
195412
195573
|
};
|
|
195413
195574
|
},
|
|
@@ -196549,9 +196710,9 @@ var init_batch = __esm({
|
|
|
196549
196710
|
if (batch.status !== "planned")
|
|
196550
196711
|
throw new AscError("refused", `batch ${id} is ${batch.status}`);
|
|
196551
196712
|
const offered = [...batch.approvals, { approver: ctx.actor, planHash: batch.planHash, at: this.now().toISOString() }];
|
|
196552
|
-
const
|
|
196553
|
-
const accounts = [...new Set(
|
|
196554
|
-
const decisions = await Promise.all([...new Set(
|
|
196713
|
+
const live4 = batch.items.filter((i2) => i2.status === "planned");
|
|
196714
|
+
const accounts = [...new Set(live4.map((i2) => i2.issuerId))];
|
|
196715
|
+
const decisions = await Promise.all([...new Set(live4.map((i2) => i2.action))].map((action) => this.options.gate.evaluate({ jobId: batch.id, action, requestedBy: batch.actor, planHash: batch.planHash, accounts, appCount: live4.length, offered, summary: `batch ${batch.id}: ${live4.length} line(s) across ${accounts.length} account(s)` })));
|
|
196555
196716
|
batch.approvals = decisions[0]?.approvals ?? offered;
|
|
196556
196717
|
const denied2 = decisions.find((d2) => d2.status === "denied");
|
|
196557
196718
|
const pending2 = decisions.find((d2) => d2.status === "pending");
|
|
@@ -197804,8 +197965,8 @@ var init_actions_products = __esm({
|
|
|
197804
197965
|
const base = await api4.subscriptions.pricePoint(p2.subscriptionId, p2.baseTerritory, p2.basePrice);
|
|
197805
197966
|
const others = await api4.subscriptions.equalizations(base.id, p2.baseTerritory);
|
|
197806
197967
|
const hasPrices = await api4.subscriptions.hasPrices(p2.subscriptionId);
|
|
197807
|
-
const
|
|
197808
|
-
const start = p2.startDate ??
|
|
197968
|
+
const scheduled2 = !p2.startDate && hasPrices && LIVE_SUBSCRIPTION_STATES.has(String(subscription.state ?? "").trim().toUpperCase()) ? tomorrow(today(api4)) : void 0;
|
|
197969
|
+
const start = p2.startDate ?? scheduled2;
|
|
197809
197970
|
const on4 = start ?? today(api4);
|
|
197810
197971
|
const current = await api4.subscriptions.resolvedPrices(p2.subscriptionId, on4);
|
|
197811
197972
|
const all = [{ territory: p2.baseTerritory, price: base.customerPrice, pricePointId: base.id }, ...others.map((o2) => ({ territory: o2.territory, price: o2.customerPrice, pricePointId: o2.id }))];
|
|
@@ -197814,7 +197975,7 @@ var init_actions_products = __esm({
|
|
|
197814
197975
|
return noop6("subscriptionPrices", `all ${all.length} territories are already at the ${p2.basePrice} ${p2.baseTerritory} point on ${on4}`);
|
|
197815
197976
|
return {
|
|
197816
197977
|
changes: targets.map((t2) => ({ op: current.has(t2.territory) ? "update" : "create", resource: "subscriptionPrices", summary: `${t2.territory}: ${current.get(t2.territory)?.customerPrice ?? "no price"} \u2192 ${t2.price}${start ? ` from ${start}` : ""}` })),
|
|
197817
|
-
sideEffects: [...unsold.length ? [`${unsold.length} of the priced territories are not in the subscription's availability: they get a price, and it stays off sale there (availability is not changed)`] : [], ...
|
|
197978
|
+
sideEffects: [...unsold.length ? [`${unsold.length} of the priced territories are not in the subscription's availability: they get a price, and it stays off sale there (availability is not changed)`] : [], ...scheduled2 ? [`the subscription is ${subscription.state}: prices change on ${scheduled2} (tomorrow, US Pacific)`] : [], ...hasPrices ? [] : [`the subscription has no price yet: ${p2.baseTerritory} is set first, the rest follow`], ...p2.preserveCurrentPrice ? ["current subscribers keep their price"] : []],
|
|
197818
197979
|
facts: { targets, hasPrices, start: start ?? null, on: on4, state: subscription.state ?? null, unsold: unsold.length }
|
|
197819
197980
|
};
|
|
197820
197981
|
},
|
|
@@ -202272,11 +202433,11 @@ async function runConnectFlow(opts) {
|
|
|
202272
202433
|
let refusal2;
|
|
202273
202434
|
let over = false;
|
|
202274
202435
|
let path2 = "";
|
|
202275
|
-
const
|
|
202436
|
+
const live4 = /* @__PURE__ */ new Set();
|
|
202276
202437
|
const begin = (input) => {
|
|
202277
202438
|
const attempt2 = startAttempt(input);
|
|
202278
|
-
|
|
202279
|
-
void attempt2.settled.then(() =>
|
|
202439
|
+
live4.add(attempt2);
|
|
202440
|
+
void attempt2.settled.then(() => live4.delete(attempt2));
|
|
202280
202441
|
if (over)
|
|
202281
202442
|
attempt2.cancel();
|
|
202282
202443
|
return attempt2;
|
|
@@ -202395,13 +202556,13 @@ async function runConnectFlow(opts) {
|
|
|
202395
202556
|
} catch (e2) {
|
|
202396
202557
|
return fail10(`signed in, but App Store Connect did not list the teams: ${messageOf2(e2)}`);
|
|
202397
202558
|
}
|
|
202398
|
-
const
|
|
202559
|
+
const live5 = { ...session, cookies: client4.cookies };
|
|
202399
202560
|
if (listed.available.length > 1) {
|
|
202400
|
-
state = { name: "team", saved: session, live:
|
|
202561
|
+
state = { name: "team", saved: session, live: live5, providers: listed.available, current: listed.current?.providerId };
|
|
202401
202562
|
return show();
|
|
202402
202563
|
}
|
|
202403
202564
|
const provider = listed.current ?? listed.available[0] ?? { providerId: session.providerId ?? 0, name: session.providerName ?? "", publicProviderId: session.publicProviderId };
|
|
202404
|
-
return connected(session,
|
|
202565
|
+
return connected(session, live5, provider);
|
|
202405
202566
|
}
|
|
202406
202567
|
async function onTeamPost(st2, form) {
|
|
202407
202568
|
const chosen = st2.providers.find((p2) => String(p2.providerId) === form.get("providerId"));
|
|
@@ -202409,22 +202570,22 @@ async function runConnectFlow(opts) {
|
|
|
202409
202570
|
state = { ...st2, error: { kind: "team", text: "Choose one of the teams." } };
|
|
202410
202571
|
return show();
|
|
202411
202572
|
}
|
|
202412
|
-
let
|
|
202573
|
+
let live5 = st2.live;
|
|
202413
202574
|
if (chosen.providerId !== st2.current) {
|
|
202414
202575
|
try {
|
|
202415
|
-
|
|
202576
|
+
live5 = (await new WebClient2(st2.live, clientOptions).selectProvider({ providerId: chosen.providerId })).session;
|
|
202416
202577
|
} catch (e2) {
|
|
202417
202578
|
state = { ...st2, error: { kind: "team", text: `App Store Connect did not move to that team: ${messageOf2(e2)}` } };
|
|
202418
202579
|
return show();
|
|
202419
202580
|
}
|
|
202420
202581
|
}
|
|
202421
|
-
return connected(st2.saved,
|
|
202582
|
+
return connected(st2.saved, live5, chosen);
|
|
202422
202583
|
}
|
|
202423
|
-
async function connected(saved,
|
|
202424
|
-
let cookies =
|
|
202584
|
+
async function connected(saved, live5, provider) {
|
|
202585
|
+
let cookies = live5.cookies;
|
|
202425
202586
|
let teamId;
|
|
202426
202587
|
try {
|
|
202427
|
-
const portal = new AgreementsClient(onTeam(
|
|
202588
|
+
const portal = new AgreementsClient(onTeam(live5, provider), { ...clientOptions, developerBase: base.ascBase, onSessionChange: (s2) => void (cookies = s2.cookies) });
|
|
202428
202589
|
const match = matchDeveloperTeam(provider, await portal.developerTeams(), false);
|
|
202429
202590
|
if (match.teamId !== null)
|
|
202430
202591
|
teamId = match.teamId;
|
|
@@ -202482,7 +202643,7 @@ async function runConnectFlow(opts) {
|
|
|
202482
202643
|
// already running (a key being created) is not stopped, and the page expires once it returns.
|
|
202483
202644
|
onTtl: () => {
|
|
202484
202645
|
over = true;
|
|
202485
|
-
for (const attempt2 of
|
|
202646
|
+
for (const attempt2 of live4)
|
|
202486
202647
|
attempt2.cancel();
|
|
202487
202648
|
},
|
|
202488
202649
|
handler: async ({ method, path: at2, form }) => {
|
|
@@ -202503,9 +202664,9 @@ async function runConnectFlow(opts) {
|
|
|
202503
202664
|
path2 = new URL(server.url).pathname;
|
|
202504
202665
|
const letGo = async () => {
|
|
202505
202666
|
over = true;
|
|
202506
|
-
for (const attempt2 of
|
|
202667
|
+
for (const attempt2 of live4)
|
|
202507
202668
|
attempt2.cancel();
|
|
202508
|
-
await Promise.all([...
|
|
202669
|
+
await Promise.all([...live4].map((a2) => a2.settled));
|
|
202509
202670
|
};
|
|
202510
202671
|
let cancelled = false;
|
|
202511
202672
|
const stopped = new Promise((resolve112) => {
|
|
@@ -203304,12 +203465,12 @@ var init_commands = __esm({
|
|
|
203304
203465
|
summary: "The version on sale",
|
|
203305
203466
|
options: { app: { type: "string" }, platform: { type: "string" } },
|
|
203306
203467
|
async run(inv) {
|
|
203307
|
-
const
|
|
203308
|
-
if (!
|
|
203468
|
+
const live4 = await (await inv.ctx.api()).versions.live(await appId2(inv), inv.opts.platform ?? "IOS");
|
|
203469
|
+
if (!live4) {
|
|
203309
203470
|
inv.ctx.io.stderr("no version on sale\n");
|
|
203310
203471
|
return ExitCode.NotFound;
|
|
203311
203472
|
}
|
|
203312
|
-
inv.print(
|
|
203473
|
+
inv.print(live4);
|
|
203313
203474
|
}
|
|
203314
203475
|
},
|
|
203315
203476
|
"testflight groups": {
|
|
@@ -205769,9 +205930,9 @@ async function versionsFor(inv) {
|
|
|
205769
205930
|
throw new AscError("notFound", `version ${versionId} is not a version of app ${id}`);
|
|
205770
205931
|
return [v2];
|
|
205771
205932
|
}
|
|
205772
|
-
const
|
|
205933
|
+
const live4 = await api4.versions.live(id, platform ?? "IOS");
|
|
205773
205934
|
const inFlight = await api4.versions.inFlight(id, platform ?? "IOS");
|
|
205774
|
-
return [inFlight,
|
|
205935
|
+
return [inFlight, live4].filter((v2) => !!v2 && (v2 !== live4 || v2.id !== inFlight?.id));
|
|
205775
205936
|
}
|
|
205776
205937
|
var versionOptions, phasedMove, RELEASE_CONTROL_COMMANDS;
|
|
205777
205938
|
var init_commands_release_controls = __esm({
|
|
@@ -211149,12 +211310,12 @@ async function applyBatchAsking(ctx, a2, call, o2 = {}) {
|
|
|
211149
211310
|
ctx.webAppleId = await identityForApply(ctx, batch.id);
|
|
211150
211311
|
}
|
|
211151
211312
|
if (batch.status === "planned" && ctx.approver && !ctx.worker) {
|
|
211152
|
-
const
|
|
211153
|
-
const accounts = [...new Set(
|
|
211154
|
-
const request = { jobId: batch.id, action: [...new Set(
|
|
211155
|
-
${batchSummaryLines(
|
|
211313
|
+
const live4 = batch.items.filter((i2) => i2.status === "planned");
|
|
211314
|
+
const accounts = [...new Set(live4.map((i2) => i2.issuerId))];
|
|
211315
|
+
const request = { jobId: batch.id, action: [...new Set(live4.map((i2) => i2.action))].join(", "), requestedBy: batch.actor, planHash: batch.planHash, accounts, appCount: live4.length, offered: batch.approvals, summary: `batch ${batch.id}${batch.ordered ? " (in this order)" : ""}: ${live4.length} line(s) across ${accounts.length} account(s)
|
|
211316
|
+
${batchSummaryLines(live4).join("\n")}${o2.detail ? `
|
|
211156
211317
|
${o2.detail}` : ""}` };
|
|
211157
|
-
const levels = [...new Set(
|
|
211318
|
+
const levels = [...new Set(live4.map((i2) => i2.action))].map((action) => requiredLevel(ctx.policy(), { ...request, action }));
|
|
211158
211319
|
const level = ["never", "two", "one", "auto"].find((l2) => levels.includes(l2)) ?? "one";
|
|
211159
211320
|
let decided = batch;
|
|
211160
211321
|
refuseIfGone(call, `batch ${batch.id}`);
|
|
@@ -211733,7 +211894,7 @@ function connectView(r3) {
|
|
|
211733
211894
|
function startConnect(host, ctx, createKey) {
|
|
211734
211895
|
const pageEnd = new AbortController();
|
|
211735
211896
|
const waiting = /* @__PURE__ */ new Set();
|
|
211736
|
-
let
|
|
211897
|
+
let live4;
|
|
211737
211898
|
let gotPage;
|
|
211738
211899
|
const page = new Promise((r3) => gotPage = r3);
|
|
211739
211900
|
const view = (async () => {
|
|
@@ -211760,12 +211921,12 @@ function startConnect(host, ctx, createKey) {
|
|
|
211760
211921
|
return v2;
|
|
211761
211922
|
} finally {
|
|
211762
211923
|
gotPage(void 0);
|
|
211763
|
-
if (liveConnects.get(host) ===
|
|
211924
|
+
if (liveConnects.get(host) === live4)
|
|
211764
211925
|
liveConnects.delete(host);
|
|
211765
211926
|
}
|
|
211766
211927
|
})();
|
|
211767
211928
|
const settled = view.then(() => void 0, () => void 0);
|
|
211768
|
-
|
|
211929
|
+
live4 = {
|
|
211769
211930
|
page,
|
|
211770
211931
|
settled,
|
|
211771
211932
|
async join(call) {
|
|
@@ -211792,13 +211953,13 @@ function startConnect(host, ctx, createKey) {
|
|
|
211792
211953
|
}
|
|
211793
211954
|
}
|
|
211794
211955
|
};
|
|
211795
|
-
liveConnects.set(host,
|
|
211796
|
-
return
|
|
211956
|
+
liveConnects.set(host, live4);
|
|
211957
|
+
return live4;
|
|
211797
211958
|
}
|
|
211798
|
-
async function joinConnect(
|
|
211959
|
+
async function joinConnect(live4, call) {
|
|
211799
211960
|
call.progress("A connect page from an earlier store_connect call is still open; waiting on it instead of starting a second sign-in");
|
|
211800
211961
|
let reopened = false;
|
|
211801
|
-
const reopening = Promise.race([
|
|
211962
|
+
const reopening = Promise.race([live4.page, live4.settled.then(() => void 0)]).then(async (page) => {
|
|
211802
211963
|
if (!page || !page.live || call.signal.aborted)
|
|
211803
211964
|
return;
|
|
211804
211965
|
try {
|
|
@@ -211809,7 +211970,7 @@ async function joinConnect(live3, call) {
|
|
|
211809
211970
|
call.progress("Could not open the connect page again; it is still open in the person's browser");
|
|
211810
211971
|
}
|
|
211811
211972
|
});
|
|
211812
|
-
const view = await
|
|
211973
|
+
const view = await live4.join(call);
|
|
211813
211974
|
await reopening;
|
|
211814
211975
|
return { ...view, reopened };
|
|
211815
211976
|
}
|
|
@@ -211936,9 +212097,9 @@ A submission can take more than one batch: after store_apply, call store_plan ag
|
|
|
211936
212097
|
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true },
|
|
211937
212098
|
inputSchema: z6.object({ createKey: z6.boolean().optional().describe("Offer to create and save an API key on the page (default true).") }),
|
|
211938
212099
|
handler: async (a2, ctx, host, call) => {
|
|
211939
|
-
const
|
|
211940
|
-
if (
|
|
211941
|
-
return ok2(await joinConnect(
|
|
212100
|
+
const live4 = liveConnects.get(host);
|
|
212101
|
+
if (live4)
|
|
212102
|
+
return ok2(await joinConnect(live4, call));
|
|
211942
212103
|
return ok2(await startConnect(host, ctx, a2.createKey ?? true).join(call));
|
|
211943
212104
|
}
|
|
211944
212105
|
},
|
|
@@ -216452,9 +216613,9 @@ async function renderCommand(ctx) {
|
|
|
216452
216613
|
const scheme = str3(flags.scheme) === "dark" ? "dark" : "light";
|
|
216453
216614
|
const wantPng = flags.png === true || typeof flags.png === "string";
|
|
216454
216615
|
const hydrate = flags.static !== true;
|
|
216455
|
-
const
|
|
216616
|
+
const live4 = flags.live === true;
|
|
216456
216617
|
const strict = flags.strict === true;
|
|
216457
|
-
if (
|
|
216618
|
+
if (live4 && flags.static === true) {
|
|
216458
216619
|
io2.error(JSON.stringify({ error: "--static and --live are mutually exclusive: --static renders raw bindings, --live renders real Wix data" }));
|
|
216459
216620
|
return 2;
|
|
216460
216621
|
}
|
|
@@ -216462,8 +216623,8 @@ async function renderCommand(ctx) {
|
|
|
216462
216623
|
io2.error(JSON.stringify({ error: `--mocks takes no value (got "${String(flags.mocks)}") \u2014 pass it bare` }));
|
|
216463
216624
|
return 2;
|
|
216464
216625
|
}
|
|
216465
|
-
if (flags.mocks === true && (
|
|
216466
|
-
io2.error(JSON.stringify({ error: `--mocks and ${
|
|
216626
|
+
if (flags.mocks === true && (live4 || flags.static === true)) {
|
|
216627
|
+
io2.error(JSON.stringify({ error: `--mocks and ${live4 ? "--live" : "--static"} are mutually exclusive: --mocks loads the app's recorded data, ${live4 ? "--live real Wix data" : "--static no data at all"}` }));
|
|
216467
216628
|
return 2;
|
|
216468
216629
|
}
|
|
216469
216630
|
if (flags.mocks === true && flags["no-mocks"] === true) {
|
|
@@ -216550,7 +216711,7 @@ async function renderCommand(ctx) {
|
|
|
216550
216711
|
}
|
|
216551
216712
|
let mocks;
|
|
216552
216713
|
let mocksNote;
|
|
216553
|
-
const mocksByDefault = flags.mocks !== true && flags["no-mocks"] !== true && !
|
|
216714
|
+
const mocksByDefault = flags.mocks !== true && flags["no-mocks"] !== true && !live4 && flags.static !== true && injectedState === void 0;
|
|
216554
216715
|
if (flags.mocks === true || mocksByDefault) {
|
|
216555
216716
|
let rules = null;
|
|
216556
216717
|
let bad3;
|
|
@@ -216574,7 +216735,7 @@ async function renderCommand(ctx) {
|
|
|
216574
216735
|
...hasWorkers ? { tier5Dir: bundleOutDir2(dir) } : {},
|
|
216575
216736
|
// The settled state is always kept (printed only under --dump-state): it is what says whether
|
|
216576
216737
|
// the picture landed on the screen's content or on its error, loading or empty state.
|
|
216577
|
-
collect: { lint: true, strict, render: { screenId, scheme, png: wantPng, hydrate, dumpState: true, ...
|
|
216738
|
+
collect: { lint: true, strict, render: { screenId, scheme, png: wantPng, hydrate, dumpState: true, ...live4 ? { live: true } : {}, ...injectedState ? { state: injectedState } : {}, ...injectedInput ? { input: injectedInput } : {}, ...renderWidth ? { width: renderWidth } : {}, ...platform ? { platform } : {}, ...frame ? { frame: true } : {}, ...renderSurface ? { surface: renderSurface } : {}, ...flags.rtl === true ? { rtl: true } : {}, ...loadBudgetMs ? { loadBudgetMs } : {}, ...mocks ? { mocks: { rules: mocks.rules, cmsSeed: mocks.cmsSeed, ...mocks.base44Data ? { base44Data: mocks.base44Data } : {} } } : {} } }
|
|
216578
216739
|
});
|
|
216579
216740
|
const r3 = (outcome.renders ?? [])[0];
|
|
216580
216741
|
if (!r3) {
|
|
@@ -216606,12 +216767,12 @@ async function renderCommand(ctx) {
|
|
|
216606
216767
|
screenId,
|
|
216607
216768
|
scheme,
|
|
216608
216769
|
renderable: r3.renderable,
|
|
216609
|
-
hydrated:
|
|
216610
|
-
dataSource: renderDataSource({ live:
|
|
216611
|
-
...
|
|
216770
|
+
hydrated: live4 ? "live" : hydrate,
|
|
216771
|
+
dataSource: renderDataSource({ live: live4, hydrate, liveCalls: r3.liveCalls, liveReturned: r3.liveReturned, liveEmpty: r3.liveEmpty, liveRefused: r3.liveRefused, mocked: !!r3.mockCalls }),
|
|
216772
|
+
...live4 && dataSourceHint(renderDataSource({ live: live4, hydrate, liveCalls: r3.liveCalls, liveReturned: r3.liveReturned, liveEmpty: r3.liveEmpty, liveRefused: r3.liveRefused })) ? { dataSourceHint: dataSourceHint(renderDataSource({ live: live4, hydrate, liveCalls: r3.liveCalls, liveReturned: r3.liveReturned, liveEmpty: r3.liveEmpty, liveRefused: r3.liveRefused })) } : {},
|
|
216612
216773
|
// What --mocks loaded from, how many requests the load made, and the ones no layer held.
|
|
216613
216774
|
...r3.mockCalls && mocks ? { mocks: { used: true, from: mocks.from, calls: r3.mockCalls.length, ...r3.mockUnserved?.length ? { unserved: r3.mockUnserved } : {}, ...mocks.ignored ? { ignored: mocks.ignored } : {}, ...mocksByDefault ? { default: true, hint: "the app's recorded data loaded by default; --no-mocks renders the offline initial state, --live the real site" } : {} } } : mocksNote ? { mocks: mocksNote } : mocks ? { mocks: { used: false, reason: r3.mockBootFailed ? "the screen's worker failed to boot against the recorded data, so its initial state was rendered" : "the screen has no worker bundle to load data into", ...mocks.ignored ? { ignored: mocks.ignored } : {} } } : {},
|
|
216614
|
-
...
|
|
216775
|
+
...live4 ? renderLiveFields(r3) : {},
|
|
216615
216776
|
...injectedState ? { stateInjected: Object.keys(injectedState) } : {},
|
|
216616
216777
|
...injectedInput ? { inputInjected: Object.keys(injectedInput) } : {},
|
|
216617
216778
|
...flags["dump-state"] === true && r3.serviceState ? { serviceState: r3.serviceState } : {},
|
|
@@ -216656,7 +216817,7 @@ async function renderCommand(ctx) {
|
|
|
216656
216817
|
if (pngFile && r3.renderable) {
|
|
216657
216818
|
const { recordShotState: recordShotState2, screenStateOf: screenStateOf2 } = await Promise.resolve().then(() => (init_screen_state(), screen_state_exports));
|
|
216658
216819
|
const mocked = !!r3.mockCalls;
|
|
216659
|
-
landed = screenStateOf2(r3.serviceState, r3.html, { initial: !
|
|
216820
|
+
landed = screenStateOf2(r3.serviceState, r3.html, { initial: !live4 && !mocked, offline: mocked && (r3.mockUnserved?.length ?? 0) > 0 });
|
|
216660
216821
|
recordShotState2(dir, screenId, pngFile, landed);
|
|
216661
216822
|
}
|
|
216662
216823
|
const autoSkip = process.env.HIMI_AUTO_RENDER === "validate" && landed !== null && (landed.state === "loading" || landed.state === "empty" || landed.state === "error" && landed.offline === true) ? `the picture shows the home screen's ${landed.state} state${landed.initial || landed.offline ? " (an offline preview: the site's data is not loaded offline)" : ""}, so no postcard was journaled from it` : void 0;
|
|
@@ -220287,12 +220448,12 @@ function planFromPayload(payload, base, selectors) {
|
|
|
220287
220448
|
}
|
|
220288
220449
|
return { ok: true, plan: { patch, touched, included, rebound } };
|
|
220289
220450
|
}
|
|
220290
|
-
function regressionDiff(base,
|
|
220451
|
+
function regressionDiff(base, live4, touched) {
|
|
220291
220452
|
const moves = new Set(touched);
|
|
220292
220453
|
const rows = [];
|
|
220293
|
-
for (const id of /* @__PURE__ */ new Set([...Object.keys(
|
|
220454
|
+
for (const id of /* @__PURE__ */ new Set([...Object.keys(live4.screens ?? {}), ...Object.keys(base.screens ?? {})])) {
|
|
220294
220455
|
if (moves.has(`screen:${id}`)) continue;
|
|
220295
|
-
const l2 =
|
|
220456
|
+
const l2 = live4.screens?.[id];
|
|
220296
220457
|
const b2 = base.screens?.[id];
|
|
220297
220458
|
if (!b2) {
|
|
220298
220459
|
rows.push({ item: `screen:${id}`, live: l2?.descriptorHash ?? null, base: null, effect: `${id} DISAPPEARS \u2014 it was added after ${base.releaseId}` });
|
|
@@ -220306,13 +220467,13 @@ function regressionDiff(base, live3, touched) {
|
|
|
220306
220467
|
rows.push({ item: `screen:${id}`, live: l2.descriptorHash, base: b2.descriptorHash, effect: `${id} reverts to its ${base.releaseId} descriptor` });
|
|
220307
220468
|
continue;
|
|
220308
220469
|
}
|
|
220309
|
-
if (resolveBundleSha(
|
|
220310
|
-
rows.push({ item: `screen:${id}`, live: resolveBundleSha(
|
|
220470
|
+
if (resolveBundleSha(live4, l2.bundle) !== resolveBundleSha(base, b2.bundle)) {
|
|
220471
|
+
rows.push({ item: `screen:${id}`, live: resolveBundleSha(live4, l2.bundle), base: resolveBundleSha(base, b2.bundle), effect: `${id} rebinds to its ${base.releaseId} worker bundle` });
|
|
220311
220472
|
}
|
|
220312
220473
|
}
|
|
220313
220474
|
const scalar4 = (key3, item2, what) => {
|
|
220314
220475
|
if (moves.has(item2)) return;
|
|
220315
|
-
const l2 =
|
|
220476
|
+
const l2 = live4[key3] ?? null;
|
|
220316
220477
|
const b2 = base[key3] ?? null;
|
|
220317
220478
|
if (l2 !== b2) rows.push({ item: item2, live: l2, base: b2, effect: `${what} reverts to ${base.releaseId}` });
|
|
220318
220479
|
};
|
|
@@ -220320,8 +220481,8 @@ function regressionDiff(base, live3, touched) {
|
|
|
220320
220481
|
scalar4("appConfigHash", "app-config", "app-config");
|
|
220321
220482
|
scalar4("iconHash", "icon", "the launcher icon");
|
|
220322
220483
|
scalar4("minBinaryVersion", "minBinaryVersion", "the minimum binary version");
|
|
220323
|
-
for (const name of /* @__PURE__ */ new Set([...Object.keys(
|
|
220324
|
-
const l2 =
|
|
220484
|
+
for (const name of /* @__PURE__ */ new Set([...Object.keys(live4.assets ?? {}), ...Object.keys(base.assets ?? {})])) {
|
|
220485
|
+
const l2 = live4.assets?.[name]?.sha256 ?? null;
|
|
220325
220486
|
const b2 = base.assets?.[name]?.sha256 ?? null;
|
|
220326
220487
|
if (l2 === b2) continue;
|
|
220327
220488
|
rows.push({
|
|
@@ -220331,16 +220492,16 @@ function regressionDiff(base, live3, touched) {
|
|
|
220331
220492
|
effect: b2 === null ? `asset:${name} record DISAPPEARS \u2014 references fall back to the baked copy or render empty` : `asset:${name} reverts to ${base.releaseId}`
|
|
220332
220493
|
});
|
|
220333
220494
|
}
|
|
220334
|
-
for (const name of /* @__PURE__ */ new Set([...Object.keys(
|
|
220335
|
-
const l2 =
|
|
220495
|
+
for (const name of /* @__PURE__ */ new Set([...Object.keys(live4.authoringDocs ?? {}), ...Object.keys(base.authoringDocs ?? {})])) {
|
|
220496
|
+
const l2 = live4.authoringDocs?.[name]?.sha256 ?? null;
|
|
220336
220497
|
const b2 = base.authoringDocs?.[name]?.sha256 ?? null;
|
|
220337
220498
|
if (l2 !== b2) rows.push({ item: `doc:${name}`, live: l2, base: b2, effect: `${name} reverts to ${base.releaseId}` });
|
|
220338
220499
|
}
|
|
220339
220500
|
const PROVENANCE = /* @__PURE__ */ new Set(["releaseId", "gitSha", "shellSha", "label", "notes", "publishedAt", "publishedBy", "attestation", "forcedPastErrors", "allowedBinaryGap", "oneAppMigration"]);
|
|
220340
220501
|
const REPORTED_IN_DETAIL = /* @__PURE__ */ new Set(["app", "screens", "bundles", "tokensHash", "appConfigHash", "iconHash", "minBinaryVersion", "assets", "authoringDocs"]);
|
|
220341
|
-
for (const key3 of /* @__PURE__ */ new Set([...Object.keys(
|
|
220502
|
+
for (const key3 of /* @__PURE__ */ new Set([...Object.keys(live4), ...Object.keys(base)])) {
|
|
220342
220503
|
if (PROVENANCE.has(key3) || REPORTED_IN_DETAIL.has(key3) || moves.has(key3)) continue;
|
|
220343
|
-
const l2 =
|
|
220504
|
+
const l2 = live4[key3] ?? null;
|
|
220344
220505
|
const b2 = base[key3] ?? null;
|
|
220345
220506
|
const ls2 = JSON.stringify(l2) ?? "null";
|
|
220346
220507
|
const bs2 = JSON.stringify(b2) ?? "null";
|
|
@@ -220559,10 +220720,10 @@ __export(ring_pins_exports, {
|
|
|
220559
220720
|
readRingPins: () => readRingPins,
|
|
220560
220721
|
ringsPinnedElsewhere: () => ringsPinnedElsewhere
|
|
220561
220722
|
});
|
|
220562
|
-
function ringsPinnedElsewhere(
|
|
220563
|
-
if (!
|
|
220723
|
+
function ringsPinnedElsewhere(live4, releaseId) {
|
|
220724
|
+
if (!live4 || typeof live4 !== "object") return [];
|
|
220564
220725
|
const pins = [];
|
|
220565
|
-
for (const [pinned, rings] of Object.entries(
|
|
220726
|
+
for (const [pinned, rings] of Object.entries(live4)) {
|
|
220566
220727
|
if (pinned === releaseId || !Array.isArray(rings)) continue;
|
|
220567
220728
|
for (const ring of rings) if (typeof ring === "string") pins.push({ ring, releaseId: pinned });
|
|
220568
220729
|
}
|
|
@@ -220576,19 +220737,19 @@ function promoteCommand(o2, ring, force) {
|
|
|
220576
220737
|
return `himi promote --app ${shellQuote(o2.app)} --release ${shellQuote(o2.releaseId)} --ring ${shellQuote(ring)}${force ? " --force" : ""} --target ${shellQuote(o2.target)}${control}`;
|
|
220577
220738
|
}
|
|
220578
220739
|
async function readRingPins(client4, o2) {
|
|
220579
|
-
let
|
|
220740
|
+
let live4;
|
|
220580
220741
|
let markedForced = false;
|
|
220581
220742
|
try {
|
|
220582
220743
|
const r3 = await client4.releases(o2.app);
|
|
220583
220744
|
if (!r3.ok) return null;
|
|
220584
220745
|
const ledger = r3.json;
|
|
220585
|
-
|
|
220746
|
+
live4 = ledger?.live;
|
|
220586
220747
|
markedForced = Array.isArray(ledger?.releases) && ledger.releases.some((row2) => row2?.releaseId === o2.releaseId && row2.forcedPastErrors === true);
|
|
220587
220748
|
} catch {
|
|
220588
220749
|
return null;
|
|
220589
220750
|
}
|
|
220590
220751
|
const force = o2.force === true || markedForced;
|
|
220591
|
-
const pins = ringsPinnedElsewhere(
|
|
220752
|
+
const pins = ringsPinnedElsewhere(live4, o2.releaseId);
|
|
220592
220753
|
if (!pins.length) return null;
|
|
220593
220754
|
const ringPins = pins.map((pin) => ({ ...pin, promote: promoteCommand(o2, pin.ring, force) }));
|
|
220594
220755
|
const named3 = pins.map((pin) => `ring "${forTerminal(pin.ring)}" is pinned to ${forTerminal(pin.releaseId)}`).join(", ");
|
|
@@ -220914,19 +221075,19 @@ function publicRecord(value2) {
|
|
|
220914
221075
|
const { archiveBase64: _archiveBase64, ...record3 } = value2;
|
|
220915
221076
|
return record3;
|
|
220916
221077
|
}
|
|
220917
|
-
function
|
|
221078
|
+
function live3(value2, now) {
|
|
220918
221079
|
if (!value2 || value2.revokedAt) return null;
|
|
220919
221080
|
if (value2.expiresAt && Date.parse(value2.expiresAt) <= now.getTime()) return null;
|
|
220920
221081
|
return value2;
|
|
220921
221082
|
}
|
|
220922
221083
|
async function resolvePackageShareMetadata(store, id, now = /* @__PURE__ */ new Date()) {
|
|
220923
221084
|
if (!PACKAGE_SHARE_ID_PATTERN2.test(id) || !store.getDoc) return null;
|
|
220924
|
-
const value2 =
|
|
221085
|
+
const value2 = live3(parseStored(await store.getDoc(PACKAGE_SHARE_NAMESPACE, id), id), now);
|
|
220925
221086
|
return value2 ? publicRecord(value2) : null;
|
|
220926
221087
|
}
|
|
220927
221088
|
async function resolvePackageShare(store, id, now = /* @__PURE__ */ new Date()) {
|
|
220928
221089
|
if (!PACKAGE_SHARE_ID_PATTERN2.test(id) || !store.getDoc) return null;
|
|
220929
|
-
const value2 =
|
|
221090
|
+
const value2 = live3(parseStored(await store.getDoc(PACKAGE_SHARE_NAMESPACE, id), id), now);
|
|
220930
221091
|
if (!value2) return null;
|
|
220931
221092
|
const archive = await decodeArchive(value2, id);
|
|
220932
221093
|
return archive ? { share: publicRecord(value2), archive } : null;
|
|
@@ -221583,8 +221744,8 @@ ${releaseId}`;
|
|
|
221583
221744
|
if (/^\/v1\/app-config\/[^/]+$/.test(url.pathname)) return drop2();
|
|
221584
221745
|
let servable;
|
|
221585
221746
|
try {
|
|
221586
|
-
const
|
|
221587
|
-
const eligible =
|
|
221747
|
+
const live4 = await manifest2(app2);
|
|
221748
|
+
const eligible = live4?.releaseId === pin || await isRingRelease(app2, pin);
|
|
221588
221749
|
const pinned = eligible ? await pinnedManifest(app2, pin) : null;
|
|
221589
221750
|
servable = pinned !== null;
|
|
221590
221751
|
const screenId = /^\/v1\/screen\/([^/]+)$/.exec(url.pathname)?.[1];
|
|
@@ -222297,7 +222458,7 @@ ${releaseId}`;
|
|
|
222297
222458
|
if (!m2) return json6(404, { error: "app_not_found", app: app2 });
|
|
222298
222459
|
}
|
|
222299
222460
|
const mm = m2;
|
|
222300
|
-
const readDoc = (hash3,
|
|
222461
|
+
const readDoc = (hash3, live4) => pin ? hash3 ? pinnedBody(app2, hash3, live4) : Promise.resolve(null) : live4();
|
|
222301
222462
|
const ringPinned = pin !== null && request.headers.get(RELEASE_SOURCE_HEADER) === "ring";
|
|
222302
222463
|
const cfgBytes = ringPinned ? await store.getAppConfig(app2) : await readDoc(mm.appConfigHash, () => store.getAppConfig(app2));
|
|
222303
222464
|
if (!cfgBytes) return json6(404, { error: "app_config_not_found", app: app2 });
|
|
@@ -222327,9 +222488,9 @@ ${releaseId}`;
|
|
|
222327
222488
|
let homeFrom = mm;
|
|
222328
222489
|
let readHome = readDoc;
|
|
222329
222490
|
if (ringPinned && homeScreenId && !mm.screens[homeScreenId]) {
|
|
222330
|
-
const
|
|
222331
|
-
if (
|
|
222332
|
-
homeFrom =
|
|
222491
|
+
const live4 = await manifest2(app2);
|
|
222492
|
+
if (live4?.screens[homeScreenId]) {
|
|
222493
|
+
homeFrom = live4;
|
|
222333
222494
|
readHome = (_hash, liveSlot) => liveSlot();
|
|
222334
222495
|
}
|
|
222335
222496
|
}
|
|
@@ -223052,50 +223213,50 @@ var init_preview_assets_generated = __esm({
|
|
|
223052
223213
|
init_define_HHP_CATALOG();
|
|
223053
223214
|
init_preview_assets_format();
|
|
223054
223215
|
PREVIEW_ASSET_MANIFEST = [
|
|
223055
|
-
{ key: "assets/DashboardHost-
|
|
223056
|
-
{ key: "assets/DevDrawer-
|
|
223057
|
-
{ key: "assets/IdiomCompare-
|
|
223058
|
-
{ key: "assets/LightboxViewer-
|
|
223059
|
-
{ key: "assets/OfflineReadingBar-
|
|
223060
|
-
{ key: "assets/PhonePreviewControl-
|
|
223061
|
-
{ key: "assets/SchemeCompare-
|
|
223062
|
-
{ key: "assets/WixFrogTelemetrySink-
|
|
223216
|
+
{ key: "assets/DashboardHost-BooGgQCo.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 2984, sha256: "ba7ea038bd976272ce6ff4364921dba5e36b6ced7b55b55ebcfc935ee39bd773" },
|
|
223217
|
+
{ key: "assets/DevDrawer-6UAU_WzF.js", contentType: "application/javascript; charset=utf-8", offset: 2992, length: 16783, sha256: "cb36f567192d42811affdbdded95f82262da92173a991efc9c0517e9b2ef7b61" },
|
|
223218
|
+
{ key: "assets/IdiomCompare-d-zPX1kt.js", contentType: "application/javascript; charset=utf-8", offset: 19775, length: 1926, sha256: "2728f375a35ee69a0f5f5c92edb63e6039574062f4acf1a7c547ff3e97e7267f" },
|
|
223219
|
+
{ key: "assets/LightboxViewer-_G76cl1r.js", contentType: "application/javascript; charset=utf-8", offset: 21701, length: 17379, sha256: "e297bda0131ae043bcb87b4b84bcbc3cd60a803d804aca4be28feee440ed48c8" },
|
|
223220
|
+
{ key: "assets/OfflineReadingBar-ChX8WEgd.js", contentType: "application/javascript; charset=utf-8", offset: 39080, length: 1646, sha256: "602a6b47b27f32851fdfbee528a68ccc432df0bf26931306108297cc2da6f5e9" },
|
|
223221
|
+
{ key: "assets/PhonePreviewControl-B8m-5Dsv.js", contentType: "application/javascript; charset=utf-8", offset: 40726, length: 37851, sha256: "e27ee9f2ae02b4e2b1570afd74374f937009c95094bb34a66834d45167e7d77a" },
|
|
223222
|
+
{ key: "assets/SchemeCompare-BKO0lmYj.js", contentType: "application/javascript; charset=utf-8", offset: 78577, length: 1858, sha256: "ac196d83b5ba27b261511e0f000909dbe3adb06fa203cbe8129e796bc0328d51" },
|
|
223223
|
+
{ key: "assets/WixFrogTelemetrySink-cNk7EaLI.js", contentType: "application/javascript; charset=utf-8", offset: 80435, length: 3497, sha256: "404fa9bcf5b8edd4dda961016cf736d6ed8906f3c0e07a1782f9f5ea1011b844" },
|
|
223063
223224
|
{ key: "assets/calendar-ics-BvfIYWjG.js", contentType: "application/javascript; charset=utf-8", offset: 83932, length: 2192, sha256: "1636167041e9829ceccd3544297b86b8475c38bd2f759c4dbc17c813dc6e9254" },
|
|
223064
223225
|
{ key: "assets/catalog-CAoUWITw.js", contentType: "application/javascript; charset=utf-8", offset: 86124, length: 26046, sha256: "4c270ca3051f77d761aef1297125e02339d48493dd2b84a0cacf0faf41aa8cb3" },
|
|
223065
|
-
{ key: "assets/catalogFontFaces-
|
|
223226
|
+
{ key: "assets/catalogFontFaces-3bif4sZo.js", contentType: "application/javascript; charset=utf-8", offset: 112170, length: 1111, sha256: "265dca01900fa1d47ed52d8226c62cf2468371a013aa19be44b62e83f880a569" },
|
|
223066
223227
|
{ key: "assets/contacts-vcard-BcohPQ0m.js", contentType: "application/javascript; charset=utf-8", offset: 113281, length: 2567, sha256: "c4ff75e96cd909bbb9182c5dc78794fcebc65139fbddef2537711d774fb33ad0" },
|
|
223067
|
-
{ key: "assets/files-transfer-
|
|
223228
|
+
{ key: "assets/files-transfer-D1JGe1xf.js", contentType: "application/javascript; charset=utf-8", offset: 115848, length: 6446, sha256: "56a3b912ecd1d9f934cf3ddb3eea51056363569b595493e8a4411f57d1d101e1" },
|
|
223068
223229
|
{ key: "assets/frogActionMap-CTMe3Bz1.js", contentType: "application/javascript; charset=utf-8", offset: 122294, length: 1172, sha256: "9f1ce4c70a680dfb902949e1f482c7e47500b69c3350cd091b1b51d674032d53" },
|
|
223069
|
-
{ key: "assets/frogApiRules-
|
|
223230
|
+
{ key: "assets/frogApiRules-BrNkZjBp.js", contentType: "application/javascript; charset=utf-8", offset: 123466, length: 2207, sha256: "2e15a5edda8f13c30108be3e1e8c22e851eab659e899c61c9bd6978288a814f1" },
|
|
223070
223231
|
{ key: "assets/frogScreenMap-S_IRnz20.js", contentType: "application/javascript; charset=utf-8", offset: 125673, length: 1067, sha256: "22b2f71e1b06df8f1e79b890d47fe42e983d37865c2cc9be753e4121764c91e1" },
|
|
223071
223232
|
{ key: "assets/glassPreviewBrowser-DONaOehd.js", contentType: "application/javascript; charset=utf-8", offset: 126740, length: 6578, sha256: "4402c4cddd2a564e7466cdf1e12a0e0277c0400b288e1e5eda1d23e797599d31" },
|
|
223072
223233
|
{ key: "assets/image-preparation-Cj4gldm6.js", contentType: "application/javascript; charset=utf-8", offset: 133318, length: 2704, sha256: "32944ea587c2f3b84389b66b50a850437560238f1c8d33b6275973ee04eee865" },
|
|
223073
|
-
{ key: "assets/index-
|
|
223074
|
-
{ key: "assets/jsx-runtime-CdvZGgm7.js", contentType: "application/javascript; charset=utf-8", offset:
|
|
223075
|
-
{ key: "assets/pdf-
|
|
223076
|
-
{ key: "assets/pdf.worker.min-BGnVRhRG.js", contentType: "application/javascript; charset=utf-8", offset:
|
|
223077
|
-
{ key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/javascript; charset=utf-8", offset:
|
|
223078
|
-
{ key: "assets/pdfDocument-
|
|
223079
|
-
{ key: "assets/pdfFetch-Cc8i1I1h.js", contentType: "application/javascript; charset=utf-8", offset:
|
|
223080
|
-
{ key: "assets/webviewBridgeHost-
|
|
223081
|
-
{ key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset:
|
|
223082
|
-
{ key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset:
|
|
223083
|
-
{ key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset:
|
|
223084
|
-
{ key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset:
|
|
223085
|
-
{ key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset:
|
|
223086
|
-
{ key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset:
|
|
223087
|
-
{ key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset:
|
|
223088
|
-
{ key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset:
|
|
223089
|
-
{ key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset:
|
|
223090
|
-
{ key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset:
|
|
223091
|
-
{ key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset:
|
|
223092
|
-
{ key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset:
|
|
223093
|
-
{ key: "himi-sw.js", contentType: "application/javascript; charset=utf-8", offset:
|
|
223094
|
-
{ key: "index.html", contentType: "text/html; charset=utf-8", offset:
|
|
223095
|
-
{ key: "ios-glass-preview.css", contentType: "text/css; charset=utf-8", offset:
|
|
223096
|
-
{ key: "kit-tab-bar.css", contentType: "text/css; charset=utf-8", offset:
|
|
223097
|
-
{ key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset:
|
|
223098
|
-
{ key: "t5-worker-frame.html", contentType: "text/html; charset=utf-8", offset:
|
|
223234
|
+
{ key: "assets/index-9o0qdrDh.js", contentType: "application/javascript; charset=utf-8", offset: 136022, length: 1568398, sha256: "a0449f87848b927a52b7207f4e7a62ed7a39392caf4c1c1a5d651b061bd839b1" },
|
|
223235
|
+
{ key: "assets/jsx-runtime-CdvZGgm7.js", contentType: "application/javascript; charset=utf-8", offset: 1704420, length: 7751, sha256: "42a78b508d0f309f6a4a6efbb8669015211b3c26574c5b0929884c4d9d20b806" },
|
|
223236
|
+
{ key: "assets/pdf-BjM9gBHL.js", contentType: "application/javascript; charset=utf-8", offset: 1712171, length: 488215, sha256: "4a260ef73a6f9f421a9119eac3d67bb9978e67b44c66a870038d189e6c77a0bd" },
|
|
223237
|
+
{ key: "assets/pdf.worker.min-BGnVRhRG.js", contentType: "application/javascript; charset=utf-8", offset: 2200386, length: 90, sha256: "521a0e528916d678d7588b2cddf3dadd3bb959a6d62426382f61c77a82017e35" },
|
|
223238
|
+
{ key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/javascript; charset=utf-8", offset: 2200476, length: 1317034, sha256: "a33cfe728c584fdba4fcc1fd54bcdc2f9f2f13889ddbb5b2bd1d0f8cbe49b84e" },
|
|
223239
|
+
{ key: "assets/pdfDocument-D_URrSsW.js", contentType: "application/javascript; charset=utf-8", offset: 3517510, length: 3470, sha256: "1dbbf7bdcad4a0bec0fe28a739aa7adeb5eb2471153c6bbdae5d9ea73c1b0c8c" },
|
|
223240
|
+
{ key: "assets/pdfFetch-Cc8i1I1h.js", contentType: "application/javascript; charset=utf-8", offset: 3520980, length: 2266, sha256: "1d21ad008921942217c9eac0c35b1713773b9d89c71e3ab4412781f7bb88f463" },
|
|
223241
|
+
{ key: "assets/webviewBridgeHost-C9A4jWR7.js", contentType: "application/javascript; charset=utf-8", offset: 3523246, length: 9888, sha256: "a8707f0e7f8fdc92baa40f496aaf9e882780fb493714b13c5d76399db46548e9" },
|
|
223242
|
+
{ key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset: 3533134, length: 4610, sha256: "994062dd7af4186a739de55dd9e151c63b6301f8e2cbafc608d35c2e87da0cd2" },
|
|
223243
|
+
{ key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset: 3537744, length: 488584, sha256: "d7598e12c5dbef095ff8272cfc55da0250bd07fbdecbac8a530b9b277872a134" },
|
|
223244
|
+
{ key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 4026328, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
|
|
223245
|
+
{ key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 4117252, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
|
|
223246
|
+
{ key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 4208236, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
|
|
223247
|
+
{ key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 4299216, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
|
|
223248
|
+
{ key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 4390088, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
|
|
223249
|
+
{ key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 4481068, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
|
|
223250
|
+
{ key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 4589704, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
|
|
223251
|
+
{ key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 4698788, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
|
|
223252
|
+
{ key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 4807836, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
|
|
223253
|
+
{ key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 4915536, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
|
|
223254
|
+
{ key: "himi-sw.js", contentType: "application/javascript; charset=utf-8", offset: 5003644, length: 6818, sha256: "835250c3d8004f27c2b67f9b471984351ba6df07b916d97e33b43c691200a18c" },
|
|
223255
|
+
{ key: "index.html", contentType: "text/html; charset=utf-8", offset: 5010462, length: 4924, sha256: "ed8dc94c2f11cdb92b539cb9a780955114073aca7a53c9fbe2b8734e602928f6" },
|
|
223256
|
+
{ key: "ios-glass-preview.css", contentType: "text/css; charset=utf-8", offset: 5015386, length: 11457, sha256: "6cb2b75264fa5fa2b4d28851878a5eab0712900e8b3a6c2370cc661d6d820805" },
|
|
223257
|
+
{ key: "kit-tab-bar.css", contentType: "text/css; charset=utf-8", offset: 5026843, length: 1171, sha256: "9e2c3a0faaf05d5471badf167a4d3bdf1c4e6dd65c432eea6d254158bfd99585" },
|
|
223258
|
+
{ key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 5028014, length: 23047, sha256: "20d1459e3f896f344e478e613d0c979a0de02e81a929a45d3a0ef6a53af36441" },
|
|
223259
|
+
{ key: "t5-worker-frame.html", contentType: "text/html; charset=utf-8", offset: 5051061, length: 23064, sha256: "8655cfe9c74212ec5dafecb49d2fdeb48b19f1bd8a710091e3e55631f9b4ab06" }
|
|
223099
223260
|
];
|
|
223100
223261
|
}
|
|
223101
223262
|
});
|
|
@@ -223790,7 +223951,7 @@ function normalizeRelopsScope(value2) {
|
|
|
223790
223951
|
if (typeof v2 !== "string" || !RELOPS_SCOPES.includes(v2)) return null;
|
|
223791
223952
|
set2.add(v2);
|
|
223792
223953
|
}
|
|
223793
|
-
if (
|
|
223954
|
+
if (!set2.has("read")) return null;
|
|
223794
223955
|
return RELOPS_SCOPES.filter((s2) => set2.has(s2));
|
|
223795
223956
|
}
|
|
223796
223957
|
function scrubSecretShapes(text22) {
|
|
@@ -223879,7 +224040,7 @@ function storeHandoffBundleProblem(value2) {
|
|
|
223879
224040
|
if (hasSecretShape(text22)) return { code: "bundle_contains_secret", detail: "the bundle carries a secret-shaped value" };
|
|
223880
224041
|
return null;
|
|
223881
224042
|
}
|
|
223882
|
-
var STORE_HANDOFF_SCHEMA, MAX_STORE_HANDOFF_BUNDLE_BYTES, MAX_HANDOFF_JOBS, MAX_HANDOFF_BATCHES, MAX_HANDOFF_AUDIT, RELOPS_SCOPES, SECRET_PATTERNS2, BASE64_RUN, looksLikeKeyMaterial, FORBIDDEN_BUNDLE_KEY, HANDOFF_PARAM_NAMES, MAX_HANDOFF_STRING, BUNDLE_ID_RE2, isObj4, STR, NUM, BOOL2, ACCOUNT, APPROVALS, BUNDLE_SHAPE;
|
|
224043
|
+
var STORE_HANDOFF_SCHEMA, MAX_STORE_HANDOFF_BUNDLE_BYTES, MAX_HANDOFF_JOBS, MAX_HANDOFF_BATCHES, MAX_HANDOFF_AUDIT, RELOPS_SCOPES, RELOPS_ANDROID_SCOPES, SECRET_PATTERNS2, BASE64_RUN, looksLikeKeyMaterial, FORBIDDEN_BUNDLE_KEY, HANDOFF_PARAM_NAMES, MAX_HANDOFF_STRING, BUNDLE_ID_RE2, isObj4, STR, NUM, BOOL2, ACCOUNT, APPROVALS, BUNDLE_SHAPE;
|
|
223883
224044
|
var init_store_handoff_bundle = __esm({
|
|
223884
224045
|
"../../core/serve-control/src/store-handoff-bundle.ts"() {
|
|
223885
224046
|
init_define_HHP_CATALOG();
|
|
@@ -223888,7 +224049,8 @@ var init_store_handoff_bundle = __esm({
|
|
|
223888
224049
|
MAX_HANDOFF_JOBS = 500;
|
|
223889
224050
|
MAX_HANDOFF_BATCHES = 200;
|
|
223890
224051
|
MAX_HANDOFF_AUDIT = 1e3;
|
|
223891
|
-
RELOPS_SCOPES = ["read", "submit"];
|
|
224052
|
+
RELOPS_SCOPES = ["read", "submit", "android-build", "play-console"];
|
|
224053
|
+
RELOPS_ANDROID_SCOPES = ["android-build", "play-console"];
|
|
223892
224054
|
SECRET_PATTERNS2 = [
|
|
223893
224055
|
/-----BEGIN [A-Z ]*PRIVATE KEY-----[\s\S]*?(?:-----END [A-Z ]*PRIVATE KEY-----|$)/g,
|
|
223894
224056
|
/-----BEGIN [A-Z ]*PRIVATE KEY-----/g,
|
|
@@ -224244,8 +224406,12 @@ async function runStoreHandoff(pos, flags, io2, deps = {}) {
|
|
|
224244
224406
|
if (!localOnly && (!app2 || !site)) {
|
|
224245
224407
|
throw new UsageError4(`name the Wix app and site: the "wix" block of store/app-store.json, or --app <id> --site <msid>`);
|
|
224246
224408
|
}
|
|
224247
|
-
const
|
|
224248
|
-
if (
|
|
224409
|
+
const platform = text15(flags.platform) ?? "ios";
|
|
224410
|
+
if (platform !== "ios" && platform !== "android") throw new UsageError4(`--platform is "ios" or "android"`);
|
|
224411
|
+
if (handoff && flags.platform !== void 0) throw new UsageError4("--platform is for `store relops request`");
|
|
224412
|
+
const asked = (text15(flags.scope) ?? "read").split(",").map((s2) => s2.trim()).filter(Boolean);
|
|
224413
|
+
const scope3 = handoff ? void 0 : normalizeRelopsScope(platform === "android" ? [...asked, ...RELOPS_ANDROID_SCOPES] : asked);
|
|
224414
|
+
if (!handoff && !scope3) throw new UsageError4(`--scope is "read" or "read,submit" (allowed: ${RELOPS_SCOPES.join(", ")}; every scope needs read)`);
|
|
224249
224415
|
const appleAppIds = (text15(flags["apple-app-id"]) ?? "").split(",").map((s2) => s2.trim()).filter(Boolean);
|
|
224250
224416
|
if (appleAppIds.some((id) => !/^[0-9]{6,20}$/.test(id))) throw new UsageError4("--apple-app-id is the App Store Connect app id (digits)");
|
|
224251
224417
|
if (!handoff && appleAppIds.length) throw new UsageError4("--apple-app-id is for `store handoff`");
|
|
@@ -224355,7 +224521,7 @@ var init_store_handoff = __esm({
|
|
|
224355
224521
|
init_define_HHP_CATALOG();
|
|
224356
224522
|
init_store_handoff_bundle();
|
|
224357
224523
|
init_store_host();
|
|
224358
|
-
STORE_HANDOFF_USAGE = "himi store handoff [--dir <app>] [--app <id> --site <msid>] [--apple-app-id <id>[,<id>]] [--out <file> | --dry-run] | himi store relops request [--dir <app>] [--app <id> --site <msid>] [--scope read|read,submit] [--yes]";
|
|
224524
|
+
STORE_HANDOFF_USAGE = "himi store handoff [--dir <app>] [--app <id> --site <msid>] [--apple-app-id <id>[,<id>]] [--out <file> | --dry-run] | himi store relops request [--dir <app>] [--app <id> --site <msid>] [--platform ios|android] [--scope read|read,submit] [--yes]";
|
|
224359
224525
|
STORE_HANDOFF_PATH = "/v1/admin/site/store-handoff";
|
|
224360
224526
|
RELOPS_CONSENT_PATH = "/v1/admin/site/relops-consent";
|
|
224361
224527
|
STORE_HANDOFF_CODES = [
|
|
@@ -224386,7 +224552,9 @@ var init_store_handoff = __esm({
|
|
|
224386
224552
|
lc2 = (v2) => typeof v2 === "string" ? v2.trim().toLowerCase() : void 0;
|
|
224387
224553
|
SCOPE_WORDS = {
|
|
224388
224554
|
read: "read this app's App Store state (handoffs, App Store Connect status, App Review messages)",
|
|
224389
|
-
submit: "plan and apply App Store submission steps for it and answer App Review"
|
|
224555
|
+
submit: "plan and apply App Store submission steps for it and answer App Review",
|
|
224556
|
+
"android-build": "start Wix-signed Google Play builds of it",
|
|
224557
|
+
"play-console": "work on it in your Google Play Console, asking you for a yes on each agreement there (app declarations, content rating terms, production access, promotion to production, policy replies)"
|
|
224390
224558
|
};
|
|
224391
224559
|
}
|
|
224392
224560
|
});
|
|
@@ -225181,14 +225349,14 @@ var init_iap_api = __esm({
|
|
|
225181
225349
|
return points.map((p2) => ({ id: p2.id, customerPrice: attr(p2, "customerPrice") }));
|
|
225182
225350
|
}
|
|
225183
225351
|
async readPriceSchedule(resourceId) {
|
|
225184
|
-
const
|
|
225185
|
-
if (!
|
|
225186
|
-
const doc = await this.client.get(`/v1/inAppPurchasePriceSchedules/${enc(
|
|
225187
|
-
if (doc.links?.next) throw new AscError2("truncated", `price schedule ${
|
|
225352
|
+
const schedule2 = await readOptional(() => this.client.get(`/v2/inAppPurchases/${enc(resourceId)}/iapPriceSchedule?include=baseTerritory`));
|
|
225353
|
+
if (!schedule2) return void 0;
|
|
225354
|
+
const doc = await this.client.get(`/v1/inAppPurchasePriceSchedules/${enc(schedule2.id)}/manualPrices?include=inAppPurchasePricePoint,territory&${PAGE3}`);
|
|
225355
|
+
if (doc.links?.next) throw new AscError2("truncated", `price schedule ${schedule2.id} has more manual prices than one page`);
|
|
225188
225356
|
const prices = Array.isArray(doc.data) ? doc.data : [];
|
|
225189
225357
|
return {
|
|
225190
|
-
id:
|
|
225191
|
-
baseTerritory: relatedId(
|
|
225358
|
+
id: schedule2.id,
|
|
225359
|
+
baseTerritory: relatedId(schedule2, "baseTerritory"),
|
|
225192
225360
|
manualPrices: prices.map((p2) => toManualPrice(p2, doc.included ?? []))
|
|
225193
225361
|
};
|
|
225194
225362
|
}
|
|
@@ -225573,10 +225741,10 @@ function createCatalogIapApi(client4, appId3) {
|
|
|
225573
225741
|
},
|
|
225574
225742
|
listPricePoints: points,
|
|
225575
225743
|
readPriceSchedule: async (id) => {
|
|
225576
|
-
const
|
|
225577
|
-
if (!
|
|
225578
|
-
const territories = new Map(await Promise.all([...new Set((
|
|
225579
|
-
return { id:
|
|
225744
|
+
const schedule2 = (await client4.getPriceSchedule(appId3, id)).priceSchedule;
|
|
225745
|
+
if (!schedule2) return void 0;
|
|
225746
|
+
const territories = new Map(await Promise.all([...new Set((schedule2.manualPrices ?? []).map((p2) => p2.territory))].map(async (territory2) => [territory2, await points(id, territory2)])));
|
|
225747
|
+
return { id: schedule2.id, baseTerritory: schedule2.baseTerritory ?? "", manualPrices: (schedule2.manualPrices ?? []).map((p2) => {
|
|
225580
225748
|
const point = territories.get(p2.territory)?.find((point2) => point2.id === p2.pricePointId);
|
|
225581
225749
|
if (!point) throw new Error(`Catalog price point ${p2.pricePointId} could not be read`);
|
|
225582
225750
|
return { territory: p2.territory, customerPrice: point.customerPrice, startDate: p2.startDate ?? null, endDate: p2.endDate ?? null };
|
|
@@ -226062,11 +226230,11 @@ var init_iap_result = __esm({
|
|
|
226062
226230
|
});
|
|
226063
226231
|
|
|
226064
226232
|
// ../store-release/iap-price-status.ts
|
|
226065
|
-
function livePriceIssue(
|
|
226066
|
-
if (!
|
|
226067
|
-
if (
|
|
226068
|
-
if (!
|
|
226069
|
-
if (
|
|
226233
|
+
function livePriceIssue(live4, item2) {
|
|
226234
|
+
if (!live4) return "item missing from the Wix catalog";
|
|
226235
|
+
if (live4.hidden || live4.kind !== "digital") return "Wix item is hidden or no longer a supported digital item";
|
|
226236
|
+
if (!live4.price || !/^\d+(\.\d+)?$/.test(live4.price.amount) || compareAmounts(live4.price.amount, "0") <= 0) return "Wix item is free or has no valid paid price";
|
|
226237
|
+
if (live4.price.currency !== item2.price.currency) return `Wix currency ${live4.price.currency} differs from ${item2.price.currency}`;
|
|
226070
226238
|
return void 0;
|
|
226071
226239
|
}
|
|
226072
226240
|
async function checkStatusPrice(item2, observed, pricing, catalog4) {
|
|
@@ -226074,10 +226242,10 @@ async function checkStatusPrice(item2, observed, pricing, catalog4) {
|
|
|
226074
226242
|
let price = item2.price;
|
|
226075
226243
|
if (catalog4 !== void 0) {
|
|
226076
226244
|
if (!item2.wix) return { priceSource, priceCheckIssue: "live Wix price checks do not reprice shared consumable tiers" };
|
|
226077
|
-
const
|
|
226078
|
-
const issue3 = livePriceIssue(
|
|
226245
|
+
const live4 = catalog4.find((c2) => c2.source === item2.wix.entityType && c2.id === item2.wix.entityId);
|
|
226246
|
+
const issue3 = livePriceIssue(live4, item2);
|
|
226079
226247
|
if (issue3) return { priceSource, priceCheckIssue: issue3 };
|
|
226080
|
-
price = { ...price, amount:
|
|
226248
|
+
price = { ...price, amount: live4.price.amount };
|
|
226081
226249
|
}
|
|
226082
226250
|
if (!observed?.price || observed.price.customerPrices.length !== 1) return { priceSource, priceCheckIssue: "Apple has no unambiguous current base-territory price" };
|
|
226083
226251
|
if (observed.price.baseTerritory !== price.baseTerritory) return { priceSource, priceCheckIssue: "Apple and the manifest use different base territories" };
|
|
@@ -226277,13 +226445,13 @@ function inEffect(price, today2) {
|
|
|
226277
226445
|
return (!price.startDate || price.startDate <= today2) && (!price.endDate || price.endDate > today2);
|
|
226278
226446
|
}
|
|
226279
226447
|
async function readObservedPrice(api4, resourceId, today2 = isoDay(/* @__PURE__ */ new Date())) {
|
|
226280
|
-
const
|
|
226281
|
-
return priceInEffect(
|
|
226448
|
+
const schedule2 = await api4.readPriceSchedule(resourceId);
|
|
226449
|
+
return priceInEffect(schedule2, today2);
|
|
226282
226450
|
}
|
|
226283
|
-
function priceInEffect(
|
|
226284
|
-
const basePrices =
|
|
226285
|
-
if (!
|
|
226286
|
-
return { baseTerritory:
|
|
226451
|
+
function priceInEffect(schedule2, today2) {
|
|
226452
|
+
const basePrices = schedule2?.manualPrices.filter((p2) => p2.territory === schedule2.baseTerritory && inEffect(p2, today2)) ?? [];
|
|
226453
|
+
if (!schedule2 || !basePrices.length) return void 0;
|
|
226454
|
+
return { baseTerritory: schedule2.baseTerritory, customerPrices: basePrices.map((p2) => p2.customerPrice) };
|
|
226287
226455
|
}
|
|
226288
226456
|
async function readObservedAvailability(api4, resourceId) {
|
|
226289
226457
|
const availability = await api4.readAvailability(resourceId);
|
|
@@ -226425,16 +226593,16 @@ function localizationOps(item2, observed) {
|
|
|
226425
226593
|
return found.name === wanted.name && found.description === wanted.description ? [] : [{ kind: "updateLocalization", locale: wanted.locale }];
|
|
226426
226594
|
});
|
|
226427
226595
|
}
|
|
226428
|
-
function priceScheduleConflict(
|
|
226429
|
-
if (!
|
|
226430
|
-
const pending2 =
|
|
226596
|
+
function priceScheduleConflict(schedule2, today2) {
|
|
226597
|
+
if (!schedule2) return "the price schedule could not be read";
|
|
226598
|
+
const pending2 = schedule2.manualPrices.filter((p2) => !p2.endDate || p2.endDate > today2);
|
|
226431
226599
|
if (pending2.some((p2) => p2.startDate && p2.startDate > today2 || p2.endDate)) return "future or temporary price changes must be resolved in App Store Connect";
|
|
226432
|
-
if (pending2.some((p2) => p2.territory !==
|
|
226600
|
+
if (pending2.some((p2) => p2.territory !== schedule2.baseTerritory)) return "custom territory prices must be resolved in App Store Connect";
|
|
226433
226601
|
if (pending2.length !== 1) return "the current base-territory price is ambiguous";
|
|
226434
226602
|
return void 0;
|
|
226435
226603
|
}
|
|
226436
|
-
function priceScheduleDigest(
|
|
226437
|
-
return sha256Digest(
|
|
226604
|
+
function priceScheduleDigest(schedule2) {
|
|
226605
|
+
return sha256Digest(schedule2 ? { ...schedule2, manualPrices: [...schedule2.manualPrices].sort((a2, b2) => JSON.stringify(a2).localeCompare(JSON.stringify(b2))) } : null);
|
|
226438
226606
|
}
|
|
226439
226607
|
async function priceOps(pricing, item2, observed, target, today2) {
|
|
226440
226608
|
if (observed.price) {
|
|
@@ -226635,32 +226803,32 @@ function assertSameAccount(planned2, current) {
|
|
|
226635
226803
|
`the plan was made with profile "${planned2.profile}" (team ${planned2.team}, key ${planned2.fingerprint}) but this run resolved profile "${current.profile}" (team ${current.team}, key ${current.fingerprint}). Make a new plan with the account you mean.`
|
|
226636
226804
|
);
|
|
226637
226805
|
}
|
|
226638
|
-
function driftOf(planned2,
|
|
226806
|
+
function driftOf(planned2, live4, today2) {
|
|
226639
226807
|
if (planned2.decision === "conflict") return void 0;
|
|
226640
|
-
if (
|
|
226808
|
+
if (live4.decision === "conflict") return `${live4.productId} now conflicts: ${live4.conflicts.join("; ")}`;
|
|
226641
226809
|
const priceChange = planned2.ops.find((op) => op.kind === "changePrice");
|
|
226642
226810
|
if (priceChange) {
|
|
226643
|
-
if (planned2.targetPrice !==
|
|
226644
|
-
if (planned2.observed?.state !==
|
|
226645
|
-
if (
|
|
226646
|
-
const scheduleProblem = priceScheduleConflict(
|
|
226647
|
-
if (scheduleProblem) return `${
|
|
226648
|
-
}
|
|
226649
|
-
const [plannedShot, liveShot] = [planned2.reviewScreenshot,
|
|
226650
|
-
if (plannedShot && liveShot && plannedShot.checksum !== liveShot.checksum) return `${
|
|
226651
|
-
if (replacesUnplannedScreenshot(planned2,
|
|
226652
|
-
const unplanned =
|
|
226653
|
-
return unplanned.length ? `${
|
|
226654
|
-
}
|
|
226655
|
-
function replacesUnplannedScreenshot(planned2,
|
|
226656
|
-
if (!
|
|
226657
|
-
const held =
|
|
226811
|
+
if (planned2.targetPrice !== live4.targetPrice) return `${live4.productId} now resolves to another Apple price point`;
|
|
226812
|
+
if (planned2.observed?.state !== live4.observed?.state || JSON.stringify(planned2.observed?.versions) !== JSON.stringify(live4.observed?.versions)) return `${live4.productId} changed review state`;
|
|
226813
|
+
if (live4.ops.some((op) => op.kind === "changePrice") && priceScheduleDigest(planned2.observed?.priceSchedule) !== priceScheduleDigest(live4.observed?.priceSchedule)) return `${live4.productId} changed its price schedule`;
|
|
226814
|
+
const scheduleProblem = priceScheduleConflict(live4.observed?.priceSchedule, today2);
|
|
226815
|
+
if (scheduleProblem) return `${live4.productId}: ${scheduleProblem}`;
|
|
226816
|
+
}
|
|
226817
|
+
const [plannedShot, liveShot] = [planned2.reviewScreenshot, live4.reviewScreenshot];
|
|
226818
|
+
if (plannedShot && liveShot && plannedShot.checksum !== liveShot.checksum) return `${live4.productId}: ${liveShot.fileName} changed since the plan was made`;
|
|
226819
|
+
if (replacesUnplannedScreenshot(planned2, live4)) return `${live4.productId}: a review screenshot was added in App Store Connect after the plan \u2014 make a new plan before replacing it`;
|
|
226820
|
+
const unplanned = live4.ops.filter((op) => !planned2.ops.some((p2) => sameOp(p2, op)));
|
|
226821
|
+
return unplanned.length ? `${live4.productId} now needs ${unplanned.map(describeOp).join(", ")}, which the plan did not list` : void 0;
|
|
226822
|
+
}
|
|
226823
|
+
function replacesUnplannedScreenshot(planned2, live4) {
|
|
226824
|
+
if (!live4.ops.some((op) => op.kind === "replaceReviewScreenshot")) return false;
|
|
226825
|
+
const held = live4.observed?.reviewScreenshot;
|
|
226658
226826
|
if (!held || isScreenshotLeftover(held)) return false;
|
|
226659
226827
|
const seen = planned2.observed?.reviewScreenshot;
|
|
226660
226828
|
return !seen || seen.id !== held.id || isScreenshotLeftover(seen);
|
|
226661
226829
|
}
|
|
226662
|
-
function assertNoDrift(plan,
|
|
226663
|
-
const drift = [...
|
|
226830
|
+
function assertNoDrift(plan, live4, today2) {
|
|
226831
|
+
const drift = [...live4].map(([i2, current]) => driftOf(plan.items[i2], current, today2)).filter((d2) => d2 !== void 0);
|
|
226664
226832
|
if (!drift.length) return;
|
|
226665
226833
|
throw new IapProvisionError("drift", `App Store Connect changed since the plan was made \u2014 nothing was written:
|
|
226666
226834
|
- ${drift.join("\n - ")}
|
|
@@ -226823,12 +226991,12 @@ function operationRunners(context, manifest2) {
|
|
|
226823
226991
|
const { point, failure: failure3 } = await pricing.resolve(resourceId, price);
|
|
226824
226992
|
if (!point || point.customerPrice !== op.to) throw new UnresolvedWriteError(failure3 ?? "Apple's target price changed after preflight \u2014 make a new plan");
|
|
226825
226993
|
const matches2 = async () => {
|
|
226826
|
-
const
|
|
226994
|
+
const schedule2 = await api4.readPriceSchedule(resourceId);
|
|
226827
226995
|
const today2 = context.now().toISOString().slice(0, 10);
|
|
226828
|
-
const problem = priceScheduleConflict(
|
|
226996
|
+
const problem = priceScheduleConflict(schedule2, today2);
|
|
226829
226997
|
if (problem) throw new UnresolvedWriteError(problem);
|
|
226830
|
-
if (priceMatches(priceInEffect(
|
|
226831
|
-
if (priceScheduleDigest(
|
|
226998
|
+
if (priceMatches(priceInEffect(schedule2, today2), price, op.to)) return true;
|
|
226999
|
+
if (priceScheduleDigest(schedule2) !== priceScheduleDigest(run3.priceSchedule)) throw new UnresolvedWriteError("Apple's price schedule changed after preflight \u2014 make a new plan");
|
|
226832
227000
|
return void 0;
|
|
226833
227001
|
};
|
|
226834
227002
|
if (await matches2()) return { state: "reconciled" };
|
|
@@ -226927,11 +227095,11 @@ async function knownUnmetFor(item2, planned2, context) {
|
|
|
226927
227095
|
const metadata2 = metadataDiffs(item2, planned2.observed, planned2.targetPrice ?? await context.pricing.targetAmount(item2.price));
|
|
226928
227096
|
return [...metadata2, ...context.api.managed ? [] : screenshotUnmet(planned2.reviewScreenshot, planned2.observed)];
|
|
226929
227097
|
}
|
|
226930
|
-
async function applyItem(item2,
|
|
227098
|
+
async function applyItem(item2, live4, context, manifest2) {
|
|
226931
227099
|
const base = { target: manifest2.target, item: item2, readAt: context.now() };
|
|
226932
|
-
if (
|
|
226933
|
-
const unmet2 = await knownUnmetFor(item2,
|
|
226934
|
-
return itemResult({ ...base, observed:
|
|
227100
|
+
if (live4.decision === "conflict") {
|
|
227101
|
+
const unmet2 = await knownUnmetFor(item2, live4, context);
|
|
227102
|
+
return itemResult({ ...base, observed: live4.observed, outcome: "conflict", conflicts: live4.conflicts, unmet: unmet2 });
|
|
226935
227103
|
}
|
|
226936
227104
|
if (context.api.managed) {
|
|
226937
227105
|
try {
|
|
@@ -226940,30 +227108,30 @@ async function applyItem(item2, live3, context, manifest2) {
|
|
|
226940
227108
|
const code3 = error instanceof IapCatalogError ? error.code : "catalog_request_failed";
|
|
226941
227109
|
const conflict = ["sku_in_use", "mapping_conflict", "mapping_inactive", "mapping_type_mismatch", "mapping_unsupported"].includes(code3);
|
|
226942
227110
|
const detail = error instanceof Error ? error.message : String(error);
|
|
226943
|
-
const result2 = itemResult({ ...base, observed:
|
|
227111
|
+
const result2 = itemResult({ ...base, observed: live4.observed, outcome: conflict ? "conflict" : "failed", ...conflict ? { conflicts: [detail] } : { unmet: [detail] } });
|
|
226944
227112
|
result2.provisioning.code = code3;
|
|
226945
227113
|
return result2;
|
|
226946
227114
|
}
|
|
226947
227115
|
}
|
|
226948
227116
|
const run3 = {
|
|
226949
227117
|
item: item2,
|
|
226950
|
-
resourceId:
|
|
226951
|
-
versionId:
|
|
226952
|
-
localizations:
|
|
226953
|
-
priceSchedule:
|
|
227118
|
+
resourceId: live4.observed?.resourceId,
|
|
227119
|
+
versionId: live4.observed?.draftVersionId,
|
|
227120
|
+
localizations: live4.observed?.draftVersionId ? live4.observed.localizations : [],
|
|
227121
|
+
priceSchedule: live4.observed?.priceSchedule
|
|
226954
227122
|
};
|
|
226955
|
-
const steps = await runOps(run3,
|
|
227123
|
+
const steps = await runOps(run3, live4.ops, context, manifest2);
|
|
226956
227124
|
const { observed, failure: failure3 } = await readBack2(run3, context, manifest2);
|
|
226957
|
-
const unmet = failure3 ? [`could not read the product back: ${failure3}`] : [...await unmetFor(item2, observed, context), ...context.api.managed ? [] : screenshotUnmet(
|
|
226958
|
-
const outcome = outcomeOf(
|
|
227125
|
+
const unmet = failure3 ? [`could not read the product back: ${failure3}`] : [...await unmetFor(item2, observed, context), ...context.api.managed ? [] : screenshotUnmet(live4.reviewScreenshot, observed)];
|
|
227126
|
+
const outcome = outcomeOf(live4.ops, steps, unmet);
|
|
226959
227127
|
const result = itemResult({ ...base, readAt: context.now(), observed, outcome, steps, unmet, appleResourceId: run3.resourceId });
|
|
226960
227128
|
const code2 = steps.find((step) => step.code)?.code;
|
|
226961
227129
|
if (code2) result.provisioning.code = code2;
|
|
226962
227130
|
return result;
|
|
226963
227131
|
}
|
|
226964
|
-
function deferredResult(item2,
|
|
226965
|
-
const steps =
|
|
226966
|
-
return itemResult({ target: manifest2.target, item: item2, observed:
|
|
227132
|
+
function deferredResult(item2, live4, context, manifest2) {
|
|
227133
|
+
const steps = live4.ops.map((op) => stepFor(op, "notRun"));
|
|
227134
|
+
return itemResult({ target: manifest2.target, item: item2, observed: live4.observed, outcome: "deferred", steps, requirements: [DEFERRED_REQUIREMENT], readAt: context.now() });
|
|
226967
227135
|
}
|
|
226968
227136
|
function needsRefresh(planned2) {
|
|
226969
227137
|
return planned2.decision !== "conflict" && planned2.ops.length > 0;
|
|
@@ -226982,12 +227150,12 @@ async function applyIap(planDoc, applyContext) {
|
|
|
226982
227150
|
const context = { ...applyContext, ...manifestDir ? { manifestDir } : {}, pricing: applyContext.pricing ?? new PriceGrid(applyContext.api) };
|
|
226983
227151
|
const manifest2 = plan.manifest;
|
|
226984
227152
|
const refresh = plan.items.flatMap((planned2, i2) => (context.api.managed ? planned2.decision !== "conflict" : needsRefresh(planned2)) ? [i2] : []);
|
|
226985
|
-
const
|
|
226986
|
-
assertNoDrift(plan,
|
|
227153
|
+
const live4 = await planItemsAt(context, manifest2, refresh);
|
|
227154
|
+
assertNoDrift(plan, live4, context.now().toISOString().slice(0, 10));
|
|
226987
227155
|
const items = [];
|
|
226988
227156
|
let created = 0;
|
|
226989
227157
|
for (const [i2, item2] of manifest2.items.entries()) {
|
|
226990
|
-
const itemPlan2 =
|
|
227158
|
+
const itemPlan2 = live4.get(i2);
|
|
226991
227159
|
if (!itemPlan2) {
|
|
226992
227160
|
items.push(await plannedResult(item2, plan.items[i2], plan, context, manifest2));
|
|
226993
227161
|
continue;
|
|
@@ -227355,10 +227523,10 @@ function refreshMergedPrices(items, catalog4, options2) {
|
|
|
227355
227523
|
return items.flatMap((existing) => {
|
|
227356
227524
|
if (!existing.wix || existing.price.rule !== "atLeast") return [];
|
|
227357
227525
|
const { entityType, entityId } = existing.wix;
|
|
227358
|
-
const
|
|
227359
|
-
const reason =
|
|
227360
|
-
if (reason) return [{ source: entityType, id: entityId, name:
|
|
227361
|
-
existing.price.amount = normalizeAmount(
|
|
227526
|
+
const live4 = byEntity.get(entityKey(entityType, entityId));
|
|
227527
|
+
const reason = live4 ? skipReason(live4, { ...options2, baseTerritory: existing.price.baseTerritory, currency: existing.price.currency, applePrices: existing.price.baseTerritory === options2.baseTerritory ? options2.applePrices : void 0 }) : "missing from the Wix catalog";
|
|
227528
|
+
if (reason) return [{ source: entityType, id: entityId, name: live4?.name ?? existing.referenceName, reason: `${reason} \u2014 existing mapping and price retained` }];
|
|
227529
|
+
existing.price.amount = normalizeAmount(live4.price.amount);
|
|
227362
227530
|
return [];
|
|
227363
227531
|
});
|
|
227364
227532
|
}
|
|
@@ -229992,9 +230160,9 @@ function analyzeStoreIdentity(projectYml, storeConfig, xcconfig, adopted) {
|
|
|
229992
230160
|
f2.push({ level: "error", message: `Store build would ship the developer identity: bundle id "${shipped}" ends in .dev. ${remedy}` });
|
|
229993
230161
|
}
|
|
229994
230162
|
}
|
|
229995
|
-
const
|
|
230163
|
+
const live4 = projectYml.split("\n").filter((l2) => !/^\s*#/.test(l2)).join("\n");
|
|
229996
230164
|
const replaced = /* @__PURE__ */ new Set();
|
|
229997
|
-
for (const m2 of
|
|
230165
|
+
for (const m2 of live4.matchAll(/\b(applinks|webcredentials):([^\s"'#]+)/g)) {
|
|
229998
230166
|
const [, service, written] = m2;
|
|
229999
230167
|
if (service === "applinks" && adopted?.associatedDomainHosts.length) continue;
|
|
230000
230168
|
const swapped = service === "applinks" && !!configured.associatedDomain && /^(?:localhost\b|\$\([A-Z0-9_]+\))/.test(written);
|
|
@@ -230014,7 +230182,7 @@ function analyzeStoreIdentity(projectYml, storeConfig, xcconfig, adopted) {
|
|
|
230014
230182
|
}
|
|
230015
230183
|
for (const name of replaced) {
|
|
230016
230184
|
const ref = `$(${name})`;
|
|
230017
|
-
const elsewhere =
|
|
230185
|
+
const elsewhere = live4.split("\n").some((l2) => l2.includes(ref) && !/\b(?:applinks|webcredentials):/.test(l2));
|
|
230018
230186
|
const value2 = expandVars(ref, xcconfig);
|
|
230019
230187
|
if (elsewhere && isLoopback2(value2)) {
|
|
230020
230188
|
f2.push({
|
|
@@ -234085,12 +234253,12 @@ function keepRemotePermissions(desired, remote, spec) {
|
|
|
234085
234253
|
const remoteProps = propsOf2(remote);
|
|
234086
234254
|
const desiredProps = propsOf2(desired);
|
|
234087
234255
|
for (const f2 of spec.fields ?? []) {
|
|
234088
|
-
const
|
|
234089
|
-
if (!
|
|
234090
|
-
if (canonical7(f2.rls) === canonical7(
|
|
234091
|
-
drift.push({ kind: "permissions", detail: `field "${f2.key}": declared rls ${canonical7(f2.rls)} differs from the live ${canonical7(
|
|
234092
|
-
if (
|
|
234093
|
-
else desiredProps[f2.key].rls =
|
|
234256
|
+
const live4 = remoteProps[f2.key];
|
|
234257
|
+
if (!live4 || f2.rls === void 0) continue;
|
|
234258
|
+
if (canonical7(f2.rls) === canonical7(live4.rls ?? {})) continue;
|
|
234259
|
+
drift.push({ kind: "permissions", detail: `field "${f2.key}": declared rls ${canonical7(f2.rls)} differs from the live ${canonical7(live4.rls ?? {})} \u2014 the live rules are kept` });
|
|
234260
|
+
if (live4.rls === void 0) delete desiredProps[f2.key].rls;
|
|
234261
|
+
else desiredProps[f2.key].rls = live4.rls;
|
|
234094
234262
|
}
|
|
234095
234263
|
return drift;
|
|
234096
234264
|
}
|
|
@@ -234111,9 +234279,9 @@ function planEntitySync(declared, snapshot4, opts) {
|
|
|
234111
234279
|
const specs = declared.filter((s2) => !!s2 && typeof s2 === "object");
|
|
234112
234280
|
const owned = new Map(specs.filter(isOwnedEntity).map((s2) => [physicalEntityName(s2, app2), s2]));
|
|
234113
234281
|
const adopted = new Set(specs.filter(isAdoptedEntity).map((s2) => physicalEntityName(s2, app2)));
|
|
234114
|
-
const
|
|
234282
|
+
const live4 = new Map(snapshot4.map((e2) => [e2.name, e2]));
|
|
234115
234283
|
const provisioned = new Set((opts.provisioned ?? []).filter((n2) => isOwnedPhysical(n2, app2)));
|
|
234116
|
-
const ownedHere = /* @__PURE__ */ new Set([...snapshot4.map((e2) => e2.name).filter((n2) => provisioned.has(n2)), ...[...owned.keys()].filter((n2) => !
|
|
234284
|
+
const ownedHere = /* @__PURE__ */ new Set([...snapshot4.map((e2) => e2.name).filter((n2) => provisioned.has(n2)), ...[...owned.keys()].filter((n2) => !live4.has(n2))]);
|
|
234117
234285
|
plan.owned = [...ownedHere].sort();
|
|
234118
234286
|
for (const e2 of snapshot4) {
|
|
234119
234287
|
if (!ownedHere.has(e2.name)) {
|
|
@@ -234172,12 +234340,12 @@ function planEntitySync(declared, snapshot4, opts) {
|
|
|
234172
234340
|
plan.actions.push({ name: e2.name, ownership: "owned", action: changed ? "update" : "unchanged", ...drift.length ? { drift } : {} });
|
|
234173
234341
|
}
|
|
234174
234342
|
for (const [name, spec] of owned) {
|
|
234175
|
-
if (
|
|
234343
|
+
if (live4.has(name)) continue;
|
|
234176
234344
|
plan.next[name] = toBase44Schema(spec, app2);
|
|
234177
234345
|
plan.actions.push({ name, ownership: "owned", action: "create" });
|
|
234178
234346
|
}
|
|
234179
234347
|
for (const name of adopted) {
|
|
234180
|
-
if (!
|
|
234348
|
+
if (!live4.has(name)) plan.warnings.push(`adopted entity "${name}" is not on the live app \u2014 himi never creates an entity it does not own`);
|
|
234181
234349
|
}
|
|
234182
234350
|
plan.refusals.push(...foreignGuard(snapshot4, plan.next, ownedHere));
|
|
234183
234351
|
return plan;
|
|
@@ -234315,12 +234483,12 @@ async function createBase44Entities(opts) {
|
|
|
234315
234483
|
const owned = new Set(second.owned);
|
|
234316
234484
|
const ledgerNames = Object.keys(second.next).filter((n2) => owned.has(n2));
|
|
234317
234485
|
const maybeApplied = async () => {
|
|
234318
|
-
let
|
|
234486
|
+
let live4 = /* @__PURE__ */ new Set();
|
|
234319
234487
|
try {
|
|
234320
|
-
|
|
234488
|
+
live4 = new Set((await readEntitySnapshot(appId3, { download: opts.download })).entities.map((e2) => e2.name));
|
|
234321
234489
|
} catch {
|
|
234322
234490
|
}
|
|
234323
|
-
return [.../* @__PURE__ */ new Set([...provisioned, ...ledgerNames.filter((n2) => provisioned.includes(n2) ||
|
|
234491
|
+
return [.../* @__PURE__ */ new Set([...provisioned, ...ledgerNames.filter((n2) => provisioned.includes(n2) || live4.has(n2))])];
|
|
234324
234492
|
};
|
|
234325
234493
|
let res;
|
|
234326
234494
|
try {
|
|
@@ -238660,16 +238828,16 @@ function canonical8(v2) {
|
|
|
238660
238828
|
}
|
|
238661
238829
|
return JSON.stringify(v2) ?? "undefined";
|
|
238662
238830
|
}
|
|
238663
|
-
function liveItemType(
|
|
238664
|
-
const props2 =
|
|
238831
|
+
function liveItemType(live4, key3) {
|
|
238832
|
+
const props2 = live4.schema?.properties;
|
|
238665
238833
|
const items = props2?.[key3]?.items;
|
|
238666
238834
|
const t2 = items && typeof items === "object" ? items.type : void 0;
|
|
238667
238835
|
return typeof t2 === "string" ? t2 : void 0;
|
|
238668
238836
|
}
|
|
238669
|
-
function diffEntityFields(spec,
|
|
238670
|
-
const entity =
|
|
238837
|
+
function diffEntityFields(spec, live4) {
|
|
238838
|
+
const entity = live4.name;
|
|
238671
238839
|
const out2 = [];
|
|
238672
|
-
const liveFields = new Map(
|
|
238840
|
+
const liveFields = new Map(live4.fields.filter((f2) => !BUILTINS3.has(f2.name)).map((f2) => [f2.name, f2]));
|
|
238673
238841
|
for (const f2 of spec.fields ?? []) {
|
|
238674
238842
|
const remote = liveFields.get(f2.key);
|
|
238675
238843
|
const declared = typeLabel(f2.type, f2.format);
|
|
@@ -238680,7 +238848,7 @@ function diffEntityFields(spec, live3) {
|
|
|
238680
238848
|
if (actual !== declared) out2.push({ entity, kind: "type-mismatch", detail: `field "${f2.key}" is declared ${declared} but the live entity has ${actual}` });
|
|
238681
238849
|
else if (f2.type === "array") {
|
|
238682
238850
|
const declaredItems = f2.items?.type;
|
|
238683
|
-
const liveItems = liveItemType(
|
|
238851
|
+
const liveItems = liveItemType(live4, f2.key);
|
|
238684
238852
|
if (declaredItems !== liveItems) {
|
|
238685
238853
|
out2.push({ entity, kind: "type-mismatch", detail: `field "${f2.key}" is declared array of ${declaredItems ?? "unspecified"} but the live entity has array of ${liveItems ?? "unspecified"}` });
|
|
238686
238854
|
}
|
|
@@ -238692,8 +238860,8 @@ function diffEntityFields(spec, live3) {
|
|
|
238692
238860
|
if (!DECLARABLE_TYPES.has(f2.type)) continue;
|
|
238693
238861
|
out2.push({ entity, kind: "extra-field", detail: `field "${key3}" (${typeLabel(f2.type, f2.format)}) exists on the live entity but is not declared` });
|
|
238694
238862
|
}
|
|
238695
|
-
if (spec.rls !== void 0 && canonical8(spec.rls) !== canonical8(
|
|
238696
|
-
out2.push({ entity, kind: "rls-mismatch", detail: `declared rls ${canonical8(spec.rls)} differs from the live rls ${canonical8(
|
|
238863
|
+
if (spec.rls !== void 0 && canonical8(spec.rls) !== canonical8(live4.rls ?? {})) {
|
|
238864
|
+
out2.push({ entity, kind: "rls-mismatch", detail: `declared rls ${canonical8(spec.rls)} differs from the live rls ${canonical8(live4.rls ?? {})} \u2014 informational; nothing is changed` });
|
|
238697
238865
|
}
|
|
238698
238866
|
return out2;
|
|
238699
238867
|
}
|
|
@@ -238726,15 +238894,15 @@ async function countRows(ports, appId3, entity, cap = ROW_COUNT_CAP) {
|
|
|
238726
238894
|
async function queryBase44Entities(opts) {
|
|
238727
238895
|
const { app: app2, appId: appId3, ports } = opts;
|
|
238728
238896
|
const cap = opts.cap ?? ROW_COUNT_CAP;
|
|
238729
|
-
let
|
|
238897
|
+
let live4;
|
|
238730
238898
|
let sourceError;
|
|
238731
238899
|
try {
|
|
238732
|
-
|
|
238900
|
+
live4 = await readLiveSchemas(ports, appId3);
|
|
238733
238901
|
} catch (e2) {
|
|
238734
238902
|
sourceError = e2.message;
|
|
238735
238903
|
}
|
|
238736
|
-
if (
|
|
238737
|
-
|
|
238904
|
+
if (live4 && live4.size === 0) {
|
|
238905
|
+
live4 = void 0;
|
|
238738
238906
|
sourceError = "the downloaded project files contain no entity schemas \u2014 drift not checked";
|
|
238739
238907
|
}
|
|
238740
238908
|
const specs = (opts.base44.entities ?? []).filter((s2) => !!s2 && typeof s2 === "object" && !!physicalEntityName(s2, app2));
|
|
@@ -238748,8 +238916,8 @@ async function queryBase44Entities(opts) {
|
|
|
238748
238916
|
rows: null,
|
|
238749
238917
|
drift: []
|
|
238750
238918
|
};
|
|
238751
|
-
const remote =
|
|
238752
|
-
if (
|
|
238919
|
+
const remote = live4?.get(physical);
|
|
238920
|
+
if (live4 && !remote) {
|
|
238753
238921
|
row2.drift.push({ entity: physical, kind: "missing", detail: `entity "${physical}" is declared but the live app does not have it` });
|
|
238754
238922
|
} else {
|
|
238755
238923
|
if (remote) row2.drift = diffEntityFields(spec, remote);
|
|
@@ -238764,7 +238932,7 @@ async function queryBase44Entities(opts) {
|
|
|
238764
238932
|
declared.push(row2);
|
|
238765
238933
|
}
|
|
238766
238934
|
const known = new Set(declared.map((d2) => d2.physical));
|
|
238767
|
-
const foreignNames =
|
|
238935
|
+
const foreignNames = live4 ? [...live4.keys()].filter((n2) => !known.has(n2)).sort() : [];
|
|
238768
238936
|
return {
|
|
238769
238937
|
ok: true,
|
|
238770
238938
|
app: app2,
|
|
@@ -238772,7 +238940,7 @@ async function queryBase44Entities(opts) {
|
|
|
238772
238940
|
prefix: base44Prefix(app2),
|
|
238773
238941
|
declared,
|
|
238774
238942
|
foreign: opts.all ? foreignNames : { count: foreignNames.length },
|
|
238775
|
-
sourceRead:
|
|
238943
|
+
sourceRead: live4 ? "ok" : "unavailable",
|
|
238776
238944
|
...sourceError ? { sourceError } : {}
|
|
238777
238945
|
};
|
|
238778
238946
|
}
|
|
@@ -246857,13 +247025,13 @@ async function snapshotAndPublish(fetchImpl, token, msid, opts = {}) {
|
|
|
246857
247025
|
timeoutMs: 45e3,
|
|
246858
247026
|
body: { label: "WIX_CLI", useUniqueLabel: true }
|
|
246859
247027
|
});
|
|
246860
|
-
const
|
|
247028
|
+
const live4 = production ? await veloCall(fetchImpl, "POST", SITE_PUBLISH_URL, { token, msid, timeoutMs: 45e3, body: {} }) : void 0;
|
|
246861
247029
|
return {
|
|
246862
247030
|
revision: revisionFrom(rev.json),
|
|
246863
247031
|
codeAppId: codeAppIdFromRevision(rev.json),
|
|
246864
247032
|
rev,
|
|
246865
247033
|
rc,
|
|
246866
|
-
live:
|
|
247034
|
+
live: live4
|
|
246867
247035
|
};
|
|
246868
247036
|
}
|
|
246869
247037
|
function httpOk(r3) {
|
|
@@ -249912,9 +250080,12 @@ var USAGE = `himi \u2014 the Himalaya authoring CLI (remote dev loop)
|
|
|
249912
250080
|
identifiers) across dev/index.ts, config.ts, tokens.json and tier5-src; syntax-checks
|
|
249913
250081
|
every changed file (and re-parses a generated SCREENS map) before writing, and
|
|
249914
250082
|
reports placeholdersLeft
|
|
249915
|
-
himi template recommend [--text <
|
|
250083
|
+
himi template recommend [--text <requested app> [--context <business context>]] [--verticals a,b] [--book <site analyze dir>] [--remote]
|
|
249916
250084
|
rank the catalog for one business: description words + owner-vs-customer, and the
|
|
249917
|
-
site's installed verticals (the same scoring site analyze uses)
|
|
250085
|
+
site's installed verticals (the same scoring site analyze uses). --context is the
|
|
250086
|
+
site's business analysis: supporting evidence that only reorders rows --text already
|
|
250087
|
+
fits, never the role. Each ranked row says its role and fit: request | site |
|
|
250088
|
+
default | none; the envelope says role, defaultTemplate and contextApplied
|
|
249918
250089
|
himi build [--content <dir>] [--binary] compile Tier-5 workers with esbuild
|
|
249919
250090
|
himi publish-size [--content <dir>] [--app <slug>] [--reserve-bytes <n>] [--binary|--source]
|
|
249920
250091
|
build locally and measure draft publish JSON with source;
|
|
@@ -250449,7 +250620,7 @@ var USAGE = `himi \u2014 the Himalaya authoring CLI (remote dev loop)
|
|
|
250449
250620
|
statuses and outcomes; keys, cookies, passwords, free text and
|
|
250450
250621
|
file paths stay behind), uploaded for the app's Wix site.
|
|
250451
250622
|
--out / --dry-run keep it local. Site owner only (himi login).
|
|
250452
|
-
himi store relops request [--dir <app>] [--app <id> --site <msid>] [--scope read|read,submit] [--yes]
|
|
250623
|
+
himi store relops request [--dir <app>] [--app <id> --site <msid>] [--platform ios|android] [--scope read|read,submit] [--yes]
|
|
250453
250624
|
record your consent that Wix RelOps may act for the app:
|
|
250454
250625
|
read (default) or read,submit. Asks you to type the app id
|
|
250455
250626
|
at a terminal; --yes without one. Answers the consentId.
|
|
@@ -250793,7 +250964,7 @@ var COMMANDS = [
|
|
|
250793
250964
|
{ name: "visibility", summary: "read (no value) or set whether the public registry (/v1/apps + the Himi Player picker) LISTS the app. `public` lists it for everyone; `unlisted` hides it from listings while direct reads by app id \u2014 deep links, previews \u2014 keep working. App from --app or the content dir. Setting it needs no republish.", required: "[public|unlisted] [--app <a>] [--content <dir>] (--control-token)" },
|
|
250794
250965
|
{ name: "dist", summary: "build an INSTALLABLE QA binary (signed IPA / APK) on the Wix Job Service Mac pool and return an install link \u2014 the serve plane brokers the job, the pool builds it. WAITS for the build by default (~4 min) and prints the install link; `--no-wait` returns a jobId immediately instead. Omitting `--release` builds whatever is LIVE for the app. A named draft is refused unless `--allow-draft` makes that exceptional build explicit. `status <jobId>` / `watch <jobId>` / `list --app <a>` / `cancel <jobId>` inspect and stop builds (`watch` reports up front whether the job mints its own signing identity or borrows one, so a doomed iOS build is cancellable in seconds rather than after the archive). Off-repo, name a target \u2014 `--target wix` for a self-serve Wix login or `--target bo` for the internal employee path (the in-repo default is a local dev plane that isn't reachable off-repo); self-serve callers may build their OWN apps under a tighter budget (2 in flight / 5 per 24h), while a manage-only owner-role credential is refused. `--shell` picks the native host to sign into (branded-lite | owner-lite | brandy | base44 | player | demo-app) and defaults to the content package's himalaya.content.json `shell` (templates carry the one they were written for), else branded-lite. The per-app shells ADD the release's declared capabilities to the binary, while Himi Player and demo-app refuse a release declaring one they lack; `--plan` previews it without building; `brandy` is the site shell \u2014 the customer's own website as native-framed tabs. `--signing` defaults to `wix-managed` \u2014 the Wix Apple account mints a per-app signing identity for the build, so the caller provisions no Apple credentials of their own; `--signing byo --site <id>` reuses an existing customer ad-hoc profile and certificate for iOS; requires an owned site and a completed personal signing binding. `--android-signing` is the Android counterpart and a SEPARATE axis (a keystore, not an Apple account): `qa-keystore` (default \u2014 the repo's committed QA key, identical on every pool machine, so a build installs over the previous one), `wix-keystore` (the Wix key the pool machine carries; the build FAILS naming the paths searched if it carries none, rather than quietly signing with something else), or `debug` (the old per-machine key \u2014 QA must uninstall any previous build first). `--aab` builds an Android App Bundle (.aab) for the owner to upload to Google Play AND an APK from the same build \u2014 a download link for the .aab, an install link and QR for the APK; Android only; the bundle is signed with the Wix production key (`wix-keystore`, the upload key Branded apps use) \u2014 any other `--android-signing` is refused \u2014 and the APK with the committed QA key; a self-serve caller gets one only as the store build of its own Containers app (it must own the app's site, and `--aab` sends your Wix login); any other self-serve `--aab` gets 403 android_format_not_allowed. `--app-name <name> --app-icon-url <url>` (together; the icon a `https://static.wixstatic.com/media/<file>` URL) give the binary a name and icon in place of the release's, and a Containers app's store build (`--aab`, or its TestFlight build) needs both. NOT the normal way to ship: screens, Tier-5 bundles, tokens and app-config all go over the air with `himi push` in seconds \u2014 a binary trip is only needed for a NATIVE delta (a new SDUI component, a new declared capability/entitlement, a new bundle id, or a minBinaryVersion floor bump). Refuses to build an app whose launcher icon is missing, a placeholder, or one a store would reject \u2014 the one thing a binary carries that no later OTA push can fix; `--force` builds anyway. Also refuses a release whose member login (WixConsumerAuthProvider) names no siteId, or not in lower case, when Wix says its site requires a member CAPTCHA \u2014 such a binary ships without the CAPTCHA key and every member sign-in fails; whatever it cannot read (the release, the site's setting) only warns and builds; `--skip-captcha-check` builds anyway", required: "[--app <a>] [--platform ios,android] [--release <id>] [--allow-draft] [--target <t>] [--shell branded-lite|owner-lite|brandy|base44|player|demo-app] [--signing wix-managed|byo] [--site <id>] [--android-signing qa-keystore|wix-keystore|debug] [--aab] [--app-name <name> --app-icon-url <url>] [--borrow-ios-id <bundleId>] [--no-wait] [--force] [--skip-captcha-check] [--plan] | status <jobId> [--target <t>] | watch <jobId> [--target <t>] [--interval <ms>] | list --app <a> [--target <t>] | cancel <jobId> [--target <t>]" },
|
|
250795
250966
|
{ name: "testflight", summary: 'build, sign and upload an app to TestFlight (internal testers \u2014 no Beta App Review), then WAIT until App Store Connect finishes processing it. Sugar for `store upload --track testflight`. Prompts first: a build number is consumed permanently on a real Apple account and cannot be reused \u2014 `--yes` for CI, `--dry-run` to see the plan without touching anything. The wait is the real check, not a nicety: fastlane prints "Successfully uploaded" for a binary App Store Connect then rejects in processing, and a rejected binary leaves NO build record at all (the reason is emailed). Public App Store review is deliberately NOT automatable here \u2014 `--track appstore` is refused; use /submit-ios-app when you mean to go public', required: "<app> [--track testflight|internal] [--profile <name>] [--yes] [--dry-run] [--skip-build] [--no-wait] [--json]" },
|
|
250796
|
-
{ name: "store", summary: "`app set --app <id> --site <msid> --android-package himi.<name>` gives an app YOUR account owns (one made with `himi init`) the Google Play store app of a Wix site your account also owns, so `himi dist --aab` makes its Wix-signed (WixOne) Play bundle: the app is LINKED to the site, never converted into a site app, so your `himi login` token keeps working for push and the rest. One site per app and one app per site; the package name is permanent once a build locks it. `app show --app <id> --site <msid>` runs the store build's checks without building (saved package name, the site's Premium plan). Both send your `himi login` control token plus the account `wix token`, which the plane uses to verify your account owns the app and the site (`himi docs qa-builds`). `apple-keys setup|status` onboards the owner\u2019s ASC and In-App Purchase keys independently of push and signing profiles. `connect` and `submission status|plan|apply|rejection|reply` submit an app to the App Store from YOUR computer under YOUR Apple account, off-repo (Node 24+): `connect` opens a sign-in page on 127.0.0.1 where you type your Apple ID password and 2FA code (no flag takes them) and creates an Admin API key saved in this computer's keychain, shared with Wix for App Store builds when the app's store/app-store.json names its site; `submission plan` plans the next ordered batch and `apply` applies it only after you type the plan hash's first 8 characters (or click Approve on a local page). The same steps are the store_* tools of `himi mcp` (`himi docs store-submission`). `handoff` uploads the app's asc-node records (allowlisted ids, statuses and outcomes; never keys, cookies or passwords) so Wix RelOps can take the submission over, `--out`/`--dry-run` keep it local; `relops request` records your consent that RelOps may act for the app (`--scope read` by default, or `read,submit`; you type the app id, or pass --yes). Both are site-owner only. The App Store Connect group behind `testflight`. `preflight <app>` checks readiness offline (icon, entitlements, encryption flag, version, store.config ids, listing + review record); `upload <app>` is what `testflight` runs; `status <app>` reads live build + processing state. `--profile` selects WHICH App Store Connect account: an app built for a Wix customer ships under the CUSTOMER's Apple team (Apple guideline 4.2.6 forbids an app-generation service submitting on a client's behalf), declared per-app as ios.credentialProfile in store.config.yaml and resolved from ~/.himalaya/store-credentials/<name>.json \u2014 the .p8 itself never enters the repo. `iap draft|plan|apply|status|connect|screenshots|check|mappings` registers an app owner's digital products as in-app purchases (non-consumables, or consumable price tiers): draft reads the Wix catalog and writes the manifest, plan and status only read, apply is the one App Store mutation boundary, connect readies the Wix site to sell them (purchases app, In-App Purchase key, appleIAP provider, product mappings; --preview-tag routes only its Serve calls to a deploy preview), legacy screenshots --profile renders each product's purchase screen from the app (--content) as a bound iPhone shows it to a signed-in member and names the 1290\xD72796 PNG as the item's App Review screenshot, and none of them builds, signs or needs a checkout (`himi docs iap-products`) IAP provisioning defaults to Catalog; managed apply generates screenshots on the server with no local .p8 or profile fallback; --managed is optional and --profile selects legacy mode; --catalog-route or HIMI_IAP_CATALOG_ROUTE has no default.", required: "app set --app <id> --site <msid> --android-package himi.<name> | app show --app <id> --site <msid> | connect [--dir <app>] [--app <id> --site <msid>] [--no-key] [--profile <name>] | submission status|plan|rejection [--dir <app>] [--apple-id <id>] [--profile <name>] | submission apply (--batch <id> | --job <id>) --plan-hash <hash> | submission reply --text <reply> [--attach <file>]\u2026 [--thread <id>] [--dir <app>] | handoff [--dir <app>] [--app <id> --site <msid>] [--apple-app-id <id>] [--out <file> | --dry-run] | relops request [--dir <app>] [--app <id> --site <msid>] [--scope read|read,submit] [--yes] | apple-keys setup|status --app <slug> --site <metaSiteId> --bundle-id <id> [--asc-key-file <p8> --asc-key-id <id> --asc-issuer-id <issuer>] [--iap-key <p8> --iap-key-id <id> --iap-issuer-id <issuer>] [--yes|--dry-run] [--json] | preflight <app> [--profile <n>] | upload <app> [--track <t>] [--profile <n>] [--yes] [--dry-run] | status <app> [--profile <n>] | iap draft --site <msid> " + IAP_CREDENTIAL_OPTIONS + " --apple-app <id> --bundle <id> --base-territory <t> --out <f> [--territories <a,b>] [--locale <l>] [--mode per-item|tiers] [--merge <f>] [--report <f>] [--json] | iap plan --manifest <f> " + IAP_CREDENTIAL_OPTIONS + " --out <f> [--json] | iap apply --plan <f> " + IAP_CREDENTIAL_OPTIONS + " --out <f> [--yes] [--limit <n>] [--no-submit] [--json] | iap status --manifest <f> " + IAP_CREDENTIAL_OPTIONS + " [--out <f>] [--json] | iap connect --manifest <f> [--profile <n>] [--catalog-route <prefix>] [--iap-key <AuthKey.p8> --iap-key-id <id>] [--content <dir>] [--preview-tag dp-<tag>] [--dry-run] [--yes] [--out <f>] [--json] | iap screenshots --manifest <f> --content <dir> --profile <n> [--out-dir <d>] [--only <id,\u2026>] [--force] [--dry-run] [--json] | iap check --manifest <f> --catalog-route <prefix> [--purchases-app <id>] [--content <dir>] [--plist <file>] [--visitor-client <id>] [--json] | iap mappings --site <msid> --purchases-app <id> --catalog-route <prefix> [--product <id> --active true|false --yes] [--json]" },
|
|
250967
|
+
{ name: "store", summary: "`app set --app <id> --site <msid> --android-package himi.<name>` gives an app YOUR account owns (one made with `himi init`) the Google Play store app of a Wix site your account also owns, so `himi dist --aab` makes its Wix-signed (WixOne) Play bundle: the app is LINKED to the site, never converted into a site app, so your `himi login` token keeps working for push and the rest. One site per app and one app per site; the package name is permanent once a build locks it. `app show --app <id> --site <msid>` runs the store build's checks without building (saved package name, the site's Premium plan). Both send your `himi login` control token plus the account `wix token`, which the plane uses to verify your account owns the app and the site (`himi docs qa-builds`). `apple-keys setup|status` onboards the owner\u2019s ASC and In-App Purchase keys independently of push and signing profiles. `connect` and `submission status|plan|apply|rejection|reply` submit an app to the App Store from YOUR computer under YOUR Apple account, off-repo (Node 24+): `connect` opens a sign-in page on 127.0.0.1 where you type your Apple ID password and 2FA code (no flag takes them) and creates an Admin API key saved in this computer's keychain, shared with Wix for App Store builds when the app's store/app-store.json names its site; `submission plan` plans the next ordered batch and `apply` applies it only after you type the plan hash's first 8 characters (or click Approve on a local page). The same steps are the store_* tools of `himi mcp` (`himi docs store-submission`). `handoff` uploads the app's asc-node records (allowlisted ids, statuses and outcomes; never keys, cookies or passwords) so Wix RelOps can take the submission over, `--out`/`--dry-run` keep it local; `relops request` records your consent that RelOps may act for the app (`--scope read` by default, or `read,submit`; `--platform android` adds the Google Play scopes `android-build` and `play-console`; you type the app id, or pass --yes). Both are site-owner only. The App Store Connect group behind `testflight`. `preflight <app>` checks readiness offline (icon, entitlements, encryption flag, version, store.config ids, listing + review record); `upload <app>` is what `testflight` runs; `status <app>` reads live build + processing state. `--profile` selects WHICH App Store Connect account: an app built for a Wix customer ships under the CUSTOMER's Apple team (Apple guideline 4.2.6 forbids an app-generation service submitting on a client's behalf), declared per-app as ios.credentialProfile in store.config.yaml and resolved from ~/.himalaya/store-credentials/<name>.json \u2014 the .p8 itself never enters the repo. `iap draft|plan|apply|status|connect|screenshots|check|mappings` registers an app owner's digital products as in-app purchases (non-consumables, or consumable price tiers): draft reads the Wix catalog and writes the manifest, plan and status only read, apply is the one App Store mutation boundary, connect readies the Wix site to sell them (purchases app, In-App Purchase key, appleIAP provider, product mappings; --preview-tag routes only its Serve calls to a deploy preview), legacy screenshots --profile renders each product's purchase screen from the app (--content) as a bound iPhone shows it to a signed-in member and names the 1290\xD72796 PNG as the item's App Review screenshot, and none of them builds, signs or needs a checkout (`himi docs iap-products`) IAP provisioning defaults to Catalog; managed apply generates screenshots on the server with no local .p8 or profile fallback; --managed is optional and --profile selects legacy mode; --catalog-route or HIMI_IAP_CATALOG_ROUTE has no default.", required: "app set --app <id> --site <msid> --android-package himi.<name> | app show --app <id> --site <msid> | connect [--dir <app>] [--app <id> --site <msid>] [--no-key] [--profile <name>] | submission status|plan|rejection [--dir <app>] [--apple-id <id>] [--profile <name>] | submission apply (--batch <id> | --job <id>) --plan-hash <hash> | submission reply --text <reply> [--attach <file>]\u2026 [--thread <id>] [--dir <app>] | handoff [--dir <app>] [--app <id> --site <msid>] [--apple-app-id <id>] [--out <file> | --dry-run] | relops request [--dir <app>] [--app <id> --site <msid>] [--platform ios|android] [--scope read|read,submit] [--yes] | apple-keys setup|status --app <slug> --site <metaSiteId> --bundle-id <id> [--asc-key-file <p8> --asc-key-id <id> --asc-issuer-id <issuer>] [--iap-key <p8> --iap-key-id <id> --iap-issuer-id <issuer>] [--yes|--dry-run] [--json] | preflight <app> [--profile <n>] | upload <app> [--track <t>] [--profile <n>] [--yes] [--dry-run] | status <app> [--profile <n>] | iap draft --site <msid> " + IAP_CREDENTIAL_OPTIONS + " --apple-app <id> --bundle <id> --base-territory <t> --out <f> [--territories <a,b>] [--locale <l>] [--mode per-item|tiers] [--merge <f>] [--report <f>] [--json] | iap plan --manifest <f> " + IAP_CREDENTIAL_OPTIONS + " --out <f> [--json] | iap apply --plan <f> " + IAP_CREDENTIAL_OPTIONS + " --out <f> [--yes] [--limit <n>] [--no-submit] [--json] | iap status --manifest <f> " + IAP_CREDENTIAL_OPTIONS + " [--out <f>] [--json] | iap connect --manifest <f> [--profile <n>] [--catalog-route <prefix>] [--iap-key <AuthKey.p8> --iap-key-id <id>] [--content <dir>] [--preview-tag dp-<tag>] [--dry-run] [--yes] [--out <f>] [--json] | iap screenshots --manifest <f> --content <dir> --profile <n> [--out-dir <d>] [--only <id,\u2026>] [--force] [--dry-run] [--json] | iap check --manifest <f> --catalog-route <prefix> [--purchases-app <id>] [--content <dir>] [--plist <file>] [--visitor-client <id>] [--json] | iap mappings --site <msid> --purchases-app <id> --catalog-route <prefix> [--product <id> --active true|false --yes] [--json]" },
|
|
250797
250968
|
{ name: "guide", summary: "print the Himalaya overview + headless dev loop + available topics (offline)", required: "[--json]" },
|
|
250798
250969
|
{ name: "docs", summary: "print bundled/verified cached guides offline; status reports kit identity; refresh downloads compatible reference content independently of CLI without changing app source", required: "[<topic>|catalog [kind]|status|refresh] [--pin <version|digest>] [--unpin] [--no-network] [--json]" },
|
|
250799
250970
|
{ name: "components", summary: "print the SDUI component vocabulary + props; a name = that component (offline)", required: "[<Name>] [--json]" },
|
|
@@ -251367,6 +251538,16 @@ async function templateCommand(ctx) {
|
|
|
251367
251538
|
let verticals = str3(flags.verticals)?.split(",").map((v2) => v2.trim()).filter(Boolean);
|
|
251368
251539
|
const book = flags.book === true ? "." : str3(flags.book);
|
|
251369
251540
|
let text22 = str3(flags.text) ?? (pos.slice(2).join(" ") || void 0);
|
|
251541
|
+
if (flags.context !== void 0 && (typeof flags.context !== "string" || !text22)) {
|
|
251542
|
+
io2.error(JSON.stringify({
|
|
251543
|
+
ok: false,
|
|
251544
|
+
code: "invalid_usage",
|
|
251545
|
+
error: typeof flags.context !== "string" ? '--context needs a value: --context "<supporting business context>"' : "--context needs --text: pass the requested app as --text and the site's business analysis as --context",
|
|
251546
|
+
usage: "himi template recommend --text <requested app> [--context <business context>] [--verticals a,b] [--book <dir>] [--remote]"
|
|
251547
|
+
}));
|
|
251548
|
+
return 2;
|
|
251549
|
+
}
|
|
251550
|
+
const context = str3(flags.context)?.trim() ? str3(flags.context) : void 0;
|
|
251370
251551
|
let bookInfo;
|
|
251371
251552
|
if (!verticals?.length && book) {
|
|
251372
251553
|
let signal;
|
|
@@ -251399,7 +251580,7 @@ async function templateCommand(ctx) {
|
|
|
251399
251580
|
ok: false,
|
|
251400
251581
|
code: "invalid_usage",
|
|
251401
251582
|
error: 'nothing to match \u2014 pass a business description (--text "\u2026"), --verticals stores,bookings, or --book <site analyze dir>',
|
|
251402
|
-
usage: "himi template recommend [--text <
|
|
251583
|
+
usage: "himi template recommend [--text <requested app> [--context <business context>]] [--verticals a,b] [--book <dir>] [--remote]"
|
|
251403
251584
|
}));
|
|
251404
251585
|
return 2;
|
|
251405
251586
|
}
|
|
@@ -251416,12 +251597,15 @@ async function templateCommand(ctx) {
|
|
|
251416
251597
|
note = `remote catalog unreachable (${e2.message}); ranked the embedded templates only`;
|
|
251417
251598
|
}
|
|
251418
251599
|
}
|
|
251419
|
-
const res = recommendTemplates2({ catalog: catalog4, verticals, text: text22 });
|
|
251600
|
+
const res = recommendTemplates2({ catalog: catalog4, verticals, text: text22, context });
|
|
251420
251601
|
print({
|
|
251421
251602
|
ok: true,
|
|
251422
251603
|
...verticals?.length ? { verticals } : {},
|
|
251423
251604
|
...bookInfo ? { book: bookInfo } : {},
|
|
251424
251605
|
owner: res.owner,
|
|
251606
|
+
role: res.role,
|
|
251607
|
+
defaultTemplate: res.defaultTemplate,
|
|
251608
|
+
...res.contextApplied ? { contextApplied: true } : {},
|
|
251425
251609
|
recommended: res.ranked[0]?.name ?? null,
|
|
251426
251610
|
ranked: res.ranked.slice(0, 8),
|
|
251427
251611
|
...note ? { note } : {},
|
|
@@ -251806,7 +251990,7 @@ async function templateCommand(ctx) {
|
|
|
251806
251990
|
}
|
|
251807
251991
|
}
|
|
251808
251992
|
}
|
|
251809
|
-
io2.error(JSON.stringify({ error: "template needs a subcommand", usage: "himi template list [--remote] | himi template prompt <name> | himi template publish [--dir <app>] [--source-dir <dir>] [--name <n>] [--icon <png>] [--target <t>] [--source-hash] | himi template trim --keep <id,id,\u2026>|--from-spec [SPEC.md] [--content <dir>] [--links follow|drop] [--dry-run] [--force] | himi template inspect | himi template screens [--show <id>] [--write <id> --from <file>] | himi template sweep --set 'Old=>New' | himi template recommend --text <
|
|
251993
|
+
io2.error(JSON.stringify({ error: "template needs a subcommand", usage: "himi template list [--remote] | himi template prompt <name> | himi template publish [--dir <app>] [--source-dir <dir>] [--name <n>] [--icon <png>] [--target <t>] [--source-hash] | himi template trim --keep <id,id,\u2026>|--from-spec [SPEC.md] [--content <dir>] [--links follow|drop] [--dry-run] [--force] | himi template inspect | himi template screens [--show <id>] [--write <id> --from <file>] | himi template sweep --set 'Old=>New' | himi template recommend --text <requested app> [--context <business context>]" }));
|
|
251810
251994
|
return 2;
|
|
251811
251995
|
}
|
|
251812
251996
|
|
|
@@ -254797,9 +254981,9 @@ async function runPackageCommand(ctx) {
|
|
|
254797
254981
|
await announce(running);
|
|
254798
254982
|
if (watchKit && bus) {
|
|
254799
254983
|
const { buildContentBundles: buildContentBundles2, buildReleaseFromContent: buildReleaseFromContent2, bundleOutDir: bundleOutDir2 } = await loadAuthoring();
|
|
254800
|
-
const
|
|
254984
|
+
const live4 = join124(running.releaseRoot, running.app);
|
|
254801
254985
|
const manifestOf = (tree) => JSON.parse(readFileSync129(join124(tree, "release-manifest.json"), "utf8"));
|
|
254802
|
-
let current = manifestOf(
|
|
254986
|
+
let current = manifestOf(live4);
|
|
254803
254987
|
const failed3 = async (message2) => {
|
|
254804
254988
|
if (stopping) return;
|
|
254805
254989
|
bus.publish("build.failed", { message: message2 });
|
|
@@ -254829,13 +255013,13 @@ async function runPackageCommand(ctx) {
|
|
|
254829
255013
|
const fresh = manifestOf(join124(next, running.app));
|
|
254830
255014
|
const diff = watchKit.diffReleases(current, fresh);
|
|
254831
255015
|
const { describeChanges: describeChanges2, headline: headline2 } = await Promise.resolve().then(() => (init_build_changes(), build_changes_exports));
|
|
254832
|
-
const changes = describeChanges2(
|
|
254833
|
-
const retired = `${
|
|
254834
|
-
renameSync17(
|
|
255016
|
+
const changes = describeChanges2(live4, join124(next, running.app), diff);
|
|
255017
|
+
const retired = `${live4}.retired-${Date.now()}`;
|
|
255018
|
+
renameSync17(live4, retired);
|
|
254835
255019
|
try {
|
|
254836
|
-
renameSync17(join124(next, running.app),
|
|
255020
|
+
renameSync17(join124(next, running.app), live4);
|
|
254837
255021
|
} catch {
|
|
254838
|
-
cpSync3(join124(next, running.app),
|
|
255022
|
+
cpSync3(join124(next, running.app), live4, { recursive: true });
|
|
254839
255023
|
}
|
|
254840
255024
|
rmSync30(retired, { recursive: true, force: true });
|
|
254841
255025
|
current = fresh;
|
|
@@ -260462,9 +260646,9 @@ himi v${cliVersion()} \u2014 run \`himi --version\`. If authoring commands fail
|
|
|
260462
260646
|
io2.error(JSON.stringify(pushFailure2("release_read_failed", liveFound)));
|
|
260463
260647
|
return 1;
|
|
260464
260648
|
}
|
|
260465
|
-
const
|
|
260466
|
-
if (
|
|
260467
|
-
regressions = regressionDiff2(base,
|
|
260649
|
+
const live4 = liveFound.manifest;
|
|
260650
|
+
if (live4 && live4.releaseId !== base.releaseId) {
|
|
260651
|
+
regressions = regressionDiff2(base, live4, plan.touched);
|
|
260468
260652
|
if (regressions.length > 0 && !opts.acceptRegressions) {
|
|
260469
260653
|
io2.error(JSON.stringify(pushFailure2("would_regress", {
|
|
260470
260654
|
ok: false,
|
|
@@ -260472,7 +260656,7 @@ himi v${cliVersion()} \u2014 run \`himi --version\`. If authoring commands fail
|
|
|
260472
260656
|
error: "would_regress",
|
|
260473
260657
|
app: app2,
|
|
260474
260658
|
base: { releaseId: base.releaseId, publishedAt: base.publishedAt ?? null },
|
|
260475
|
-
live: { releaseId:
|
|
260659
|
+
live: { releaseId: live4.releaseId, publishedAt: live4.publishedAt ?? null },
|
|
260476
260660
|
message: `a branch does not merge. Activating a release derived from ${base.releaseId} reverts every item this patch does not move.`,
|
|
260477
260661
|
wouldRegress: regressions,
|
|
260478
260662
|
moves: plan.touched,
|