@wix/himalaya-cli 0.1030.0 → 0.1031.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/app-config.d.ts +7 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/wix-gateway.d.ts +32 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/wix-gateway.rules.d.ts +2 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/define-app.d.ts +7 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/genie-chat/src/index.d.ts +64 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-genie-chat.mjs +41 -1
- package/dist/cli.mjs +260 -104
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/sdk-reference.json +50 -2
- package/package.json +2 -2
- package/templates/beauty-salon/tier5-src/_shared/owner-load-error.ts +7 -1
- package/templates/beauty-salon-owner/config.ts +1 -1
- package/templates/beauty-salon-owner/dev/index.ts +247 -9
- package/templates/beauty-salon-owner/tier5-src/_shared/aria-attachments.ts +179 -0
- package/templates/beauty-salon-owner/tier5-src/_shared/aria-chat.ts +405 -20
- package/templates/beauty-salon-owner/tier5-src/_shared/owner-bookings.ts +20 -0
- package/templates/beauty-salon-owner/tier5-src/_shared/owner-load-error.ts +7 -1
- package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-aria/index.ts +40 -1
- package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-home/index.ts +2 -12
- package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-manage/index.ts +10 -4
- package/templates/branded-lite/tier5-src/_shared/owner-load-error.ts +7 -1
- package/templates/community-club/tier5-src/_shared/owner-load-error.ts +7 -1
- package/templates/community-club-owner/config.ts +1 -1
- package/templates/community-club-owner/dev/index.ts +247 -9
- package/templates/community-club-owner/tier5-src/_shared/aria-attachments.ts +179 -0
- package/templates/community-club-owner/tier5-src/_shared/aria-chat.ts +405 -20
- package/templates/community-club-owner/tier5-src/_shared/owner-bookings.ts +20 -0
- package/templates/community-club-owner/tier5-src/_shared/owner-load-error.ts +7 -1
- package/templates/community-club-owner/tier5-src/himi-owner-lite-aria/index.ts +40 -1
- package/templates/community-club-owner/tier5-src/himi-owner-lite-home/index.ts +2 -12
- package/templates/community-club-owner/tier5-src/himi-owner-lite-manage/index.ts +10 -4
- package/templates/events-meetups/tier5-src/_shared/owner-load-error.ts +7 -1
- package/templates/events-meetups-owner/config.ts +1 -1
- package/templates/events-meetups-owner/dev/index.ts +247 -9
- package/templates/events-meetups-owner/tier5-src/_shared/aria-attachments.ts +179 -0
- package/templates/events-meetups-owner/tier5-src/_shared/aria-chat.ts +405 -20
- package/templates/events-meetups-owner/tier5-src/_shared/owner-bookings.ts +20 -0
- package/templates/events-meetups-owner/tier5-src/_shared/owner-load-error.ts +7 -1
- package/templates/events-meetups-owner/tier5-src/himi-owner-lite-aria/index.ts +40 -1
- package/templates/events-meetups-owner/tier5-src/himi-owner-lite-home/index.ts +2 -12
- package/templates/events-meetups-owner/tier5-src/himi-owner-lite-manage/index.ts +10 -4
- package/templates/gym-fitness/tier5-src/_shared/owner-load-error.ts +7 -1
- package/templates/gym-fitness-owner/config.ts +1 -1
- package/templates/gym-fitness-owner/dev/index.ts +247 -9
- package/templates/gym-fitness-owner/tier5-src/_shared/aria-attachments.ts +179 -0
- package/templates/gym-fitness-owner/tier5-src/_shared/aria-chat.ts +405 -20
- package/templates/gym-fitness-owner/tier5-src/_shared/owner-bookings.ts +20 -0
- package/templates/gym-fitness-owner/tier5-src/_shared/owner-load-error.ts +7 -1
- package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-aria/index.ts +40 -1
- package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-home/index.ts +2 -12
- package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-manage/index.ts +10 -4
- package/templates/himi-chat/tier5-src/_shared/owner-load-error.ts +7 -1
- package/templates/nonprofit-cause/tier5-src/_shared/owner-load-error.ts +7 -1
- package/templates/nonprofit-cause-owner/config.ts +1 -1
- package/templates/nonprofit-cause-owner/dev/index.ts +247 -9
- package/templates/nonprofit-cause-owner/tier5-src/_shared/aria-attachments.ts +179 -0
- package/templates/nonprofit-cause-owner/tier5-src/_shared/aria-chat.ts +405 -20
- package/templates/nonprofit-cause-owner/tier5-src/_shared/owner-bookings.ts +20 -0
- package/templates/nonprofit-cause-owner/tier5-src/_shared/owner-load-error.ts +7 -1
- package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-aria/index.ts +40 -1
- package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-home/index.ts +2 -12
- package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-manage/index.ts +10 -4
- package/templates/owner-lite/config.ts +1 -1
- package/templates/owner-lite/dev/index.ts +247 -9
- package/templates/owner-lite/tier5-src/_shared/aria-attachments.ts +179 -0
- package/templates/owner-lite/tier5-src/_shared/aria-chat.ts +405 -20
- package/templates/owner-lite/tier5-src/_shared/owner-bookings.ts +20 -0
- package/templates/owner-lite/tier5-src/_shared/owner-load-error.ts +7 -1
- package/templates/owner-lite/tier5-src/himi-owner-lite-aria/index.ts +40 -1
- package/templates/owner-lite/tier5-src/himi-owner-lite-home/index.ts +2 -12
- package/templates/owner-lite/tier5-src/himi-owner-lite-manage/index.ts +10 -4
- package/templates/podcast-creator/tier5-src/_shared/owner-load-error.ts +7 -1
- package/templates/podcast-creator-owner/config.ts +1 -1
- package/templates/podcast-creator-owner/dev/index.ts +247 -9
- package/templates/podcast-creator-owner/tier5-src/_shared/aria-attachments.ts +179 -0
- package/templates/podcast-creator-owner/tier5-src/_shared/aria-chat.ts +405 -20
- package/templates/podcast-creator-owner/tier5-src/_shared/owner-bookings.ts +20 -0
- package/templates/podcast-creator-owner/tier5-src/_shared/owner-load-error.ts +7 -1
- package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-aria/index.ts +40 -1
- package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-home/index.ts +2 -12
- package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-manage/index.ts +10 -4
- package/templates/portfolio-creative/tier5-src/_shared/owner-load-error.ts +7 -1
- package/templates/portfolio-creative-owner/config.ts +1 -1
- package/templates/portfolio-creative-owner/dev/index.ts +247 -9
- package/templates/portfolio-creative-owner/tier5-src/_shared/aria-attachments.ts +179 -0
- package/templates/portfolio-creative-owner/tier5-src/_shared/aria-chat.ts +405 -20
- package/templates/portfolio-creative-owner/tier5-src/_shared/owner-bookings.ts +20 -0
- package/templates/portfolio-creative-owner/tier5-src/_shared/owner-load-error.ts +7 -1
- package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-aria/index.ts +40 -1
- package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-home/index.ts +2 -12
- package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-manage/index.ts +10 -4
- package/templates/restaurant/tier5-src/_shared/owner-load-error.ts +7 -1
- package/templates/restaurant-owner/config.ts +1 -1
- package/templates/restaurant-owner/dev/index.ts +247 -9
- package/templates/restaurant-owner/tier5-src/_shared/aria-attachments.ts +179 -0
- package/templates/restaurant-owner/tier5-src/_shared/aria-chat.ts +405 -20
- package/templates/restaurant-owner/tier5-src/_shared/owner-bookings.ts +20 -0
- package/templates/restaurant-owner/tier5-src/_shared/owner-load-error.ts +7 -1
- package/templates/restaurant-owner/tier5-src/himi-owner-lite-aria/index.ts +40 -1
- package/templates/restaurant-owner/tier5-src/himi-owner-lite-home/index.ts +2 -12
- package/templates/restaurant-owner/tier5-src/himi-owner-lite-manage/index.ts +10 -4
- package/templates/retail-store/tier5-src/_shared/owner-load-error.ts +7 -1
- package/templates/retail-store-owner/config.ts +1 -1
- package/templates/retail-store-owner/dev/index.ts +247 -9
- package/templates/retail-store-owner/tier5-src/_shared/aria-attachments.ts +179 -0
- package/templates/retail-store-owner/tier5-src/_shared/aria-chat.ts +405 -20
- package/templates/retail-store-owner/tier5-src/_shared/owner-bookings.ts +20 -0
- package/templates/retail-store-owner/tier5-src/_shared/owner-load-error.ts +7 -1
- package/templates/retail-store-owner/tier5-src/himi-owner-lite-aria/index.ts +40 -1
- package/templates/retail-store-owner/tier5-src/himi-owner-lite-home/index.ts +2 -12
- package/templates/retail-store-owner/tier5-src/himi-owner-lite-manage/index.ts +10 -4
- package/templates/yoga-studio/tier5-src/_shared/owner-load-error.ts +7 -1
- package/templates/yoga-studio-owner/config.ts +1 -1
- package/templates/yoga-studio-owner/dev/index.ts +247 -9
- package/templates/yoga-studio-owner/tier5-src/_shared/aria-attachments.ts +179 -0
- package/templates/yoga-studio-owner/tier5-src/_shared/aria-chat.ts +405 -20
- package/templates/yoga-studio-owner/tier5-src/_shared/owner-bookings.ts +20 -0
- package/templates/yoga-studio-owner/tier5-src/_shared/owner-load-error.ts +7 -1
- package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-aria/index.ts +40 -1
- package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-home/index.ts +2 -12
- package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-manage/index.ts +10 -4
package/dist/cli.mjs
CHANGED
|
@@ -16806,16 +16806,33 @@ function redactBodyString(body) {
|
|
|
16806
16806
|
function createWixGatewayState() {
|
|
16807
16807
|
return { mode: "record", rules: [], traffic: [], clients: /* @__PURE__ */ new Set(), seq: 0, ruleSeq: 0 };
|
|
16808
16808
|
}
|
|
16809
|
+
function failsClosed(gw) {
|
|
16810
|
+
return gw.mode === "mock" && gw.unmatched === "fail";
|
|
16811
|
+
}
|
|
16812
|
+
function hermeticRefusal(method, path2) {
|
|
16813
|
+
return {
|
|
16814
|
+
status: 404,
|
|
16815
|
+
headers: { "content-type": "application/json; charset=utf-8" },
|
|
16816
|
+
body: JSON.stringify({
|
|
16817
|
+
message: `No hermetic fixture for ${method} ${path2}. The dev gateway is sealed (mode: mock, unmatched: fail), so this call was not sent to Wix. Add a rule to the app's net mocks.`,
|
|
16818
|
+
details: { applicationError: { code: "HIMI_HERMETIC_NO_FIXTURE", description: `${method} ${path2}` } }
|
|
16819
|
+
})
|
|
16820
|
+
};
|
|
16821
|
+
}
|
|
16822
|
+
function parseUnmatched(value) {
|
|
16823
|
+
return value === "fail" || value === "passthrough" ? value : void 0;
|
|
16824
|
+
}
|
|
16809
16825
|
function applyNetMocks(gw, mocks) {
|
|
16810
16826
|
const rules = Array.isArray(mocks.rules) ? mocks.rules : [];
|
|
16811
16827
|
gw.rules = rules.map((r) => ({ ...r, id: r.id || ++gw.ruleSeq }));
|
|
16812
16828
|
gw.mode = mocks.mode ?? (gw.rules.length > 0 ? "mock" : gw.mode);
|
|
16829
|
+
gw.unmatched = parseUnmatched(mocks.unmatched) ?? "passthrough";
|
|
16813
16830
|
return { rules: gw.rules.length, mode: gw.mode };
|
|
16814
16831
|
}
|
|
16815
16832
|
function resolveNetMocks(fileMocks, appDeclared) {
|
|
16816
16833
|
if (fileMocks) return { mocks: fileMocks, source: "file" };
|
|
16817
16834
|
const declared = Array.isArray(appDeclared?.rules) ? appDeclared.rules : [];
|
|
16818
|
-
if (declared.length > 0) return { mocks: { mode: appDeclared?.mode, rules: declared }, source: "app" };
|
|
16835
|
+
if (declared.length > 0) return { mocks: { mode: appDeclared?.mode, rules: declared, unmatched: appDeclared?.unmatched }, source: "app" };
|
|
16819
16836
|
return null;
|
|
16820
16837
|
}
|
|
16821
16838
|
function readNetMocksFile(path2) {
|
|
@@ -16826,7 +16843,7 @@ function readNetMocksFile(path2) {
|
|
|
16826
16843
|
if (raw && typeof raw === "object") {
|
|
16827
16844
|
const o = raw;
|
|
16828
16845
|
if (!Array.isArray(o.rules) || wixMockRuleErrors(o.rules).length) return null;
|
|
16829
|
-
return { mode: o.mode, rules: o.rules };
|
|
16846
|
+
return { mode: o.mode, rules: o.rules, unmatched: parseUnmatched(o.unmatched) };
|
|
16830
16847
|
}
|
|
16831
16848
|
return null;
|
|
16832
16849
|
} catch {
|
|
@@ -16984,17 +17001,22 @@ data: ${JSON.stringify({ mode: gw.mode })}
|
|
|
16984
17001
|
}
|
|
16985
17002
|
if (suffix === "mode" && method === "POST") {
|
|
16986
17003
|
try {
|
|
16987
|
-
const { mode } = JSON.parse(await readBody(req));
|
|
17004
|
+
const { mode, unmatched } = JSON.parse(await readBody(req));
|
|
16988
17005
|
if (mode === "record" || mode === "mock") {
|
|
16989
17006
|
gw.mode = mode;
|
|
16990
17007
|
gw.operatorOverride = true;
|
|
16991
17008
|
}
|
|
17009
|
+
const policy = parseUnmatched(unmatched);
|
|
17010
|
+
if (policy) {
|
|
17011
|
+
gw.unmatched = policy;
|
|
17012
|
+
gw.operatorOverride = true;
|
|
17013
|
+
}
|
|
16992
17014
|
} catch {
|
|
16993
17015
|
}
|
|
16994
|
-
return json(res, 200, { ok: true, mode: gw.mode }), true;
|
|
17016
|
+
return json(res, 200, { ok: true, mode: gw.mode, unmatched: gw.unmatched ?? "passthrough" }), true;
|
|
16995
17017
|
}
|
|
16996
17018
|
if (suffix === "rules" && method === "GET") {
|
|
16997
|
-
return json(res, 200, { mode: gw.mode, rules: gw.rules }), true;
|
|
17019
|
+
return json(res, 200, { mode: gw.mode, unmatched: gw.unmatched ?? "passthrough", rules: gw.rules }), true;
|
|
16998
17020
|
}
|
|
16999
17021
|
if (suffix === "rules" && method === "PUT") {
|
|
17000
17022
|
try {
|
|
@@ -17048,8 +17070,38 @@ data: ${JSON.stringify({ mode: gw.mode })}
|
|
|
17048
17070
|
return true;
|
|
17049
17071
|
}
|
|
17050
17072
|
if (!target) {
|
|
17073
|
+
recordWixTraffic(gw, app, adminUrl, {
|
|
17074
|
+
ts: started,
|
|
17075
|
+
source: "proxy",
|
|
17076
|
+
capability,
|
|
17077
|
+
host,
|
|
17078
|
+
method: upstreamMethod,
|
|
17079
|
+
url: "",
|
|
17080
|
+
path: targetPath,
|
|
17081
|
+
status: 400,
|
|
17082
|
+
durationMs: Date.now() - started
|
|
17083
|
+
});
|
|
17051
17084
|
return json(res, 400, { error: "missing_target" }), true;
|
|
17052
17085
|
}
|
|
17086
|
+
if (!match && failsClosed(gw)) {
|
|
17087
|
+
const refusal = hermeticRefusal(upstreamMethod, targetPath);
|
|
17088
|
+
recordWixTraffic(gw, app, adminUrl, {
|
|
17089
|
+
ts: started,
|
|
17090
|
+
source: "mock",
|
|
17091
|
+
capability,
|
|
17092
|
+
host,
|
|
17093
|
+
method: upstreamMethod,
|
|
17094
|
+
url: target,
|
|
17095
|
+
path: targetPath,
|
|
17096
|
+
status: refusal.status,
|
|
17097
|
+
durationMs: Date.now() - started,
|
|
17098
|
+
mockRuleId: UNMATCHED_FAIL_CLOSED_ID
|
|
17099
|
+
});
|
|
17100
|
+
res.statusCode = refusal.status;
|
|
17101
|
+
for (const [k, v] of Object.entries(refusal.headers)) res.setHeader(k, v);
|
|
17102
|
+
res.end(refusal.body);
|
|
17103
|
+
return true;
|
|
17104
|
+
}
|
|
17053
17105
|
const fwdHeaders = {};
|
|
17054
17106
|
for (const [k, v] of Object.entries(req.headers)) {
|
|
17055
17107
|
const lk = k.toLowerCase();
|
|
@@ -17129,7 +17181,7 @@ data: ${JSON.stringify({ mode: gw.mode })}
|
|
|
17129
17181
|
}
|
|
17130
17182
|
return false;
|
|
17131
17183
|
}
|
|
17132
|
-
var WIX_DEV_CLIENT_ID, TRAFFIC_CAP, BODY_CAP, SECRET_HEADERS, SECRET_BODY_KEYS, REDACTED, normKey, FORM_ASSIGNMENT_RE, JSON_FIELD_RE, JSON_FIELD_UNTERMINATED_RE, BEARER_RE;
|
|
17184
|
+
var WIX_DEV_CLIENT_ID, TRAFFIC_CAP, BODY_CAP, SECRET_HEADERS, SECRET_BODY_KEYS, REDACTED, normKey, FORM_ASSIGNMENT_RE, JSON_FIELD_RE, JSON_FIELD_UNTERMINATED_RE, BEARER_RE, UNMATCHED_FAIL_CLOSED_ID;
|
|
17133
17185
|
var init_wix_gateway = __esm({
|
|
17134
17186
|
"../../core/dev-server/src/wix-gateway.ts"() {
|
|
17135
17187
|
init_wix_gateway_rules();
|
|
@@ -17177,6 +17229,7 @@ var init_wix_gateway = __esm({
|
|
|
17177
17229
|
JSON_FIELD_RE = /"([^"\\]+)"(\s*:\s*)"((?:\\.|[^"\\])*)"/g;
|
|
17178
17230
|
JSON_FIELD_UNTERMINATED_RE = /"([^"\\]+)"(\s*:\s*)"(?:\\.|[^"\\])*$/;
|
|
17179
17231
|
BEARER_RE = /\b(Bearer|Basic)\s+[A-Za-z0-9._~+/=-]+/gi;
|
|
17232
|
+
UNMATCHED_FAIL_CLOSED_ID = "unmatched:fail-closed";
|
|
17180
17233
|
}
|
|
17181
17234
|
});
|
|
17182
17235
|
|
|
@@ -18781,21 +18834,22 @@ async function reseedIfDayChanged(host, today = todayYmd()) {
|
|
|
18781
18834
|
if (host.wix.operatorOverride) return { reseeded: false, reason: "operator-override" };
|
|
18782
18835
|
const declared = host.declaredRules();
|
|
18783
18836
|
if (!declared?.rules?.length) {
|
|
18784
|
-
const before = { mode: host.wix.mode, rules: [...host.wix.rules] };
|
|
18785
|
-
host.seed({ mode: declared ? declared.mode : "record", rules: [] });
|
|
18786
|
-
if (scenarioChanged(before, { mode: host.wix.mode, rules: host.wix.rules })) {
|
|
18837
|
+
const before = { mode: host.wix.mode, rules: [...host.wix.rules], unmatched: host.wix.unmatched };
|
|
18838
|
+
host.seed({ mode: declared ? declared.mode : "record", rules: [], ...declared?.unmatched ? { unmatched: declared.unmatched } : {} });
|
|
18839
|
+
if (scenarioChanged(before, { mode: host.wix.mode, rules: host.wix.rules, unmatched: host.wix.unmatched })) {
|
|
18787
18840
|
host.publishConfigInvalidated("net-mocks scenario removed");
|
|
18788
18841
|
}
|
|
18789
18842
|
host.seededOn = today;
|
|
18790
18843
|
return { reseeded: false, reason: "no-rules" };
|
|
18791
18844
|
}
|
|
18792
|
-
host.seed({ mode: declared.mode, rules: declared.rules });
|
|
18845
|
+
host.seed({ mode: declared.mode, rules: declared.rules, ...declared.unmatched ? { unmatched: declared.unmatched } : {} });
|
|
18793
18846
|
host.seededOn = today;
|
|
18794
18847
|
host.publishConfigInvalidated("net-mocks date rollover");
|
|
18795
18848
|
return { reseeded: true, rules: declared.rules.length, from, to: today };
|
|
18796
18849
|
}
|
|
18797
18850
|
function scenarioChanged(before, after) {
|
|
18798
18851
|
if (before.mode !== after.mode) return true;
|
|
18852
|
+
if ((before.unmatched ?? "passthrough") !== (after.unmatched ?? "passthrough")) return true;
|
|
18799
18853
|
if (before.rules.length !== after.rules.length) return true;
|
|
18800
18854
|
return serialise(before.rules) !== serialise(after.rules);
|
|
18801
18855
|
}
|
|
@@ -20046,7 +20100,6 @@ function shouldRevealError(args) {
|
|
|
20046
20100
|
var EMAIL_RE, URL_HOST_RE, INTEGER_RE, NUMBER_RE;
|
|
20047
20101
|
var init_validation = __esm({
|
|
20048
20102
|
"../../core/ts/src/validation.ts"() {
|
|
20049
|
-
"use strict";
|
|
20050
20103
|
EMAIL_RE = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*\.[A-Za-z]{2,}$/;
|
|
20051
20104
|
URL_HOST_RE = /^[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*(:[0-9]+)?$/;
|
|
20052
20105
|
INTEGER_RE = /^[+-]?[0-9]+$/;
|
|
@@ -23633,7 +23686,6 @@ function validateWorkerSubtree(raw, slotId, policy, actionCatalog) {
|
|
|
23633
23686
|
var WORKER_SUBTREE_CEILINGS, ID_PART, ACTION_ID;
|
|
23634
23687
|
var init_worker_subtree = __esm({
|
|
23635
23688
|
"../../core/ts/src/worker-subtree.ts"() {
|
|
23636
|
-
"use strict";
|
|
23637
23689
|
init_worker_subtree_safe_types_generated();
|
|
23638
23690
|
WORKER_SUBTREE_CEILINGS = Object.freeze({
|
|
23639
23691
|
maxEncodedBytes: 65536,
|
|
@@ -25589,14 +25641,43 @@ function renderInner(node, ctx) {
|
|
|
25589
25641
|
const titleF = ctx.font(props.titleStyle ?? "body");
|
|
25590
25642
|
const subF = ctx.font(props.subtitleStyle ?? "caption");
|
|
25591
25643
|
const accessoryGlyph = props.accessory === "chevron" ? "\u203A" : props.accessory === "checkmark" ? "\u2713" : null;
|
|
25592
|
-
const
|
|
25593
|
-
const
|
|
25594
|
-
|
|
25595
|
-
|
|
25596
|
-
|
|
25597
|
-
|
|
25598
|
-
|
|
25599
|
-
|
|
25644
|
+
const rowDisabled = props.disabled === true || modifiers?.disabled === true || modifiers?.hitTestable === false || modifiers?.hit_testable === false;
|
|
25645
|
+
const onClick = ctx.onAction && props.onTap && !rowDisabled ? () => ctx.onAction(resolveItemDeep2(props.onTap, ctx)) : void 0;
|
|
25646
|
+
const ell = { display: "block", whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" };
|
|
25647
|
+
const modifierTap = modifiers?.onTap ?? modifiers?.on_tap;
|
|
25648
|
+
const keyboardOperable = !!ctx.onAction && !rowDisabled && !!(props.onTap || modifierTap);
|
|
25649
|
+
const slotInteractive = (slot) => keyboardOperable && slot != null && hasInteractiveDescendant({ type: "ListItem", props: { slot } });
|
|
25650
|
+
const leadingInteractive = slotInteractive(props.leading);
|
|
25651
|
+
const trailingInteractive = slotInteractive(props.trailing);
|
|
25652
|
+
const splitButton = leadingInteractive || trailingInteractive;
|
|
25653
|
+
const authoredLabel = splitButton ? resolveScalarStatic(modifiers?.accessibilityLabel ?? modifiers?.accessibility_label, ctx) : void 0;
|
|
25654
|
+
const buttonA11y = keyboardOperable ? {
|
|
25655
|
+
role: "button",
|
|
25656
|
+
tabIndex: 0,
|
|
25657
|
+
...authoredLabel != null && String(authoredLabel).trim() ? { "aria-label": String(authoredLabel) } : {},
|
|
25658
|
+
onKeyDown: (e) => {
|
|
25659
|
+
if (e.defaultPrevented || e.target !== e.currentTarget || e.repeat) return;
|
|
25660
|
+
if (e.key !== "Enter" && e.key !== " ") return;
|
|
25661
|
+
e.preventDefault();
|
|
25662
|
+
e.currentTarget.click();
|
|
25663
|
+
}
|
|
25664
|
+
} : void 0;
|
|
25665
|
+
const leadingEl = props.leading && /* @__PURE__ */ jsx6("div", { style: { flex: "none", display: "flex" }, children: renderNode(props.leading, ctx) });
|
|
25666
|
+
const textEl = /* @__PURE__ */ jsxs3("div", { style: { flex: 1, minWidth: 0, display: "flex", flexDirection: "column", gap: 2 }, children: [
|
|
25667
|
+
props.overline != null && /* @__PURE__ */ jsx6("span", { style: { fontFamily: bodyFont(ctx), fontSize: 11, fontWeight: 600, letterSpacing: 0.4, textTransform: "uppercase", color: C(props.overlineColor ?? "textSecondary", "#888"), ...ell }, children: txt(props.overline, ctx) }),
|
|
25668
|
+
/* @__PURE__ */ jsx6("span", { style: { fontFamily: fontStack(titleF.family, ctx.idiom), fontSize: titleF.remSize, fontWeight: titleF.weight, color: C(props.titleColor ?? "textPrimary", "#13171e"), ...ell }, children: txt(props.title, ctx) ?? (ctx.empty ? "" : "") }),
|
|
25669
|
+
props.subtitle != null && /* @__PURE__ */ jsx6("span", { style: { fontFamily: fontStack(subF.family, ctx.idiom), fontSize: subF.remSize, color: C(props.subtitleColor ?? "textSecondary", "#888"), ...ell }, children: txt(props.subtitle, ctx) })
|
|
25670
|
+
] });
|
|
25671
|
+
return /* @__PURE__ */ jsxs3("div", { onClick, ...splitButton ? void 0 : buttonA11y, style: { display: "flex", alignItems: "center", gap: 12, width: "100%", padding: "10px 4px", boxSizing: "border-box", cursor: onClick ? "pointer" : void 0, ...wrap }, children: [
|
|
25672
|
+
splitButton ? /* @__PURE__ */ jsxs3(Fragment3, { children: [
|
|
25673
|
+
leadingInteractive && /* @__PURE__ */ jsx6("div", { onClick: (e) => e.stopPropagation(), style: { flex: "none", display: "flex" }, children: leadingEl }),
|
|
25674
|
+
/* @__PURE__ */ jsxs3("div", { ...buttonA11y, style: { flex: 1, minWidth: 0, display: "flex", alignItems: "center", gap: 12 }, children: [
|
|
25675
|
+
!leadingInteractive && leadingEl,
|
|
25676
|
+
textEl
|
|
25677
|
+
] })
|
|
25678
|
+
] }) : /* @__PURE__ */ jsxs3(Fragment3, { children: [
|
|
25679
|
+
leadingEl,
|
|
25680
|
+
textEl
|
|
25600
25681
|
] }),
|
|
25601
25682
|
props.trailing ? (
|
|
25602
25683
|
// #1010 — the row's `onTap` lives on the outer flex div, and the trailing
|
|
@@ -25607,7 +25688,7 @@ function renderInner(node, ctx) {
|
|
|
25607
25688
|
// Menu popup renders inside this slot, menu-item clicks don't double-fire
|
|
25608
25689
|
// the row either. Mirrors the Button node, which stops for the same reason.
|
|
25609
25690
|
/* @__PURE__ */ jsx6("div", { onClick: (e) => e.stopPropagation(), style: { flex: "none", display: "flex", alignItems: "center" }, children: renderNode(props.trailing, ctx) })
|
|
25610
|
-
) : accessoryGlyph && /* @__PURE__ */ jsx6("span", { style: { flex: "none", color: C("textTertiary", "#c0c4cc"), fontSize: 20, lineHeight: 1 }, children: accessoryGlyph })
|
|
25691
|
+
) : accessoryGlyph && /* @__PURE__ */ jsx6("span", { "aria-hidden": props.accessory === "chevron" ? true : void 0, style: { flex: "none", color: C("textTertiary", "#c0c4cc"), fontSize: 20, lineHeight: 1 }, children: accessoryGlyph })
|
|
25611
25692
|
] });
|
|
25612
25693
|
}
|
|
25613
25694
|
case "Slider":
|
|
@@ -33125,11 +33206,11 @@ function syncNetMocksWithApp(state) {
|
|
|
33125
33206
|
const declared = state.app?.meta.devGateway;
|
|
33126
33207
|
const next = declared?.rules ?? [];
|
|
33127
33208
|
const before = { mode: state.wix.mode, rules: state.wix.rules };
|
|
33128
|
-
const beforeSnapshot = { mode: before.mode, rules: JSON.parse(JSON.stringify(before.rules)) };
|
|
33129
|
-
applyNetMocks(state.wix, { mode: declared?.mode, rules: next });
|
|
33209
|
+
const beforeSnapshot = { mode: before.mode, rules: JSON.parse(JSON.stringify(before.rules)), unmatched: state.wix.unmatched };
|
|
33210
|
+
applyNetMocks(state.wix, { mode: declared?.mode, rules: next, unmatched: declared?.unmatched });
|
|
33130
33211
|
state.wixSeededOn = todayYmd();
|
|
33131
33212
|
state.wixReseedBackoffUntil = 0;
|
|
33132
|
-
if (scenarioChanged(beforeSnapshot, { mode: state.wix.mode, rules: state.wix.rules })) {
|
|
33213
|
+
if (scenarioChanged(beforeSnapshot, { mode: state.wix.mode, rules: state.wix.rules, unmatched: state.wix.unmatched })) {
|
|
33133
33214
|
publishSSE(state, "config.invalidated", { reason: "net-mocks scenario changed", at: Date.now() });
|
|
33134
33215
|
console.error(`[himalaya-dev] net-mocks: re-synced ${next.length} rule(s) after an app reload`);
|
|
33135
33216
|
}
|
|
@@ -33420,69 +33501,106 @@ async function handleWebWix(req, res, state) {
|
|
|
33420
33501
|
}
|
|
33421
33502
|
if (path2 === "/v1/__webwix/call" && req.method === "POST") {
|
|
33422
33503
|
const b = await readJson5();
|
|
33423
|
-
|
|
33424
|
-
|
|
33425
|
-
|
|
33426
|
-
const cookie = req.headers.cookie ?? "";
|
|
33427
|
-
if (!/wixSession2=/.test(cookie)) return reply(501, { error: "webwix_owner_no_session" });
|
|
33428
|
-
try {
|
|
33429
|
-
if (b.checkOwnerSession !== true && String(b.method ?? "GET").toUpperCase() === "POST" && isOwnerSitesPath(String(b.path ?? ""))) {
|
|
33430
|
-
const body3 = b.body === void 0 ? void 0 : typeof b.body === "string" ? b.body : JSON.stringify(b.body);
|
|
33431
|
-
return reply(200, await wixOwnerSitesCall(String(b.path), cookie, body3, fetch));
|
|
33432
|
-
}
|
|
33433
|
-
let instance = await webOwnerPreviewInstances.instance(msid, cookie);
|
|
33434
|
-
res.setHeader("cache-control", "no-store");
|
|
33435
|
-
if (b.checkOwnerSession === true) return reply(200, { status: 200, body: JSON.stringify({ ready: true }) });
|
|
33436
|
-
const method2 = String(b.method ?? "GET").toUpperCase();
|
|
33437
|
-
const requestPath = String(b.path ?? "/");
|
|
33438
|
-
const body2 = b.body === void 0 ? void 0 : typeof b.body === "string" ? b.body : JSON.stringify(b.body);
|
|
33439
|
-
const headers2 = normalizeWixForwardedHeaders(b.headers);
|
|
33440
|
-
let result = await wixVisitorCall(method2, requestPath, body2, instance, fetch, headers2);
|
|
33441
|
-
if (result.status === 401) {
|
|
33442
|
-
webOwnerPreviewInstances.invalidate(msid, cookie);
|
|
33443
|
-
instance = await webOwnerPreviewInstances.instance(msid, cookie);
|
|
33444
|
-
result = await wixVisitorCall(method2, requestPath, body2, instance, fetch, headers2);
|
|
33445
|
-
}
|
|
33446
|
-
return reply(200, result);
|
|
33447
|
-
} catch (e) {
|
|
33448
|
-
if (String(e).includes("absolute URLs")) return reply(400, { error: "absolute_urls_not_allowed" });
|
|
33449
|
-
const auth2 = /owner mint failed \(40[13]\)/.test(String(e?.message ?? e));
|
|
33450
|
-
return reply(auth2 ? 501 : 502, { error: auth2 ? "webwix_owner_mint_failed" : "webwix_bridge_upstream_failed" });
|
|
33451
|
-
}
|
|
33452
|
-
}
|
|
33504
|
+
const ownerRung = b.ownerMsid !== void 0 || b.checkOwnerSession === true;
|
|
33505
|
+
const msid = String(b.ownerMsid ?? "");
|
|
33506
|
+
const cookie = req.headers.cookie ?? "";
|
|
33453
33507
|
const method = String(b.method ?? "GET").toUpperCase();
|
|
33454
33508
|
const requestedPath = String(b.path ?? "/");
|
|
33455
|
-
const body = b.body === void 0 ? void 0 : typeof b.body === "string" ? b.body : JSON.stringify(b.body);
|
|
33456
|
-
const forwardedHeaders = normalizeWixForwardedHeaders(b.headers, requestedPath);
|
|
33457
|
-
const target = new URL(requestedPath, "https://www.wixapis.com");
|
|
33458
|
-
const query = Object.fromEntries(target.searchParams.entries());
|
|
33459
33509
|
const started = Date.now();
|
|
33460
|
-
const
|
|
33461
|
-
|
|
33462
|
-
|
|
33463
|
-
|
|
33464
|
-
|
|
33510
|
+
const capability = ownerRung ? "wix_api.web.owner" : "wix_api.web";
|
|
33511
|
+
const refuseEarly = (status, error, parsed) => {
|
|
33512
|
+
recordWixTraffic(state.wix, state.appName, state.adminUrl, {
|
|
33513
|
+
ts: started,
|
|
33514
|
+
source: "proxy",
|
|
33515
|
+
capability,
|
|
33516
|
+
host: parsed?.host ?? "www.wixapis.com",
|
|
33517
|
+
method,
|
|
33518
|
+
url: parsed?.toString() ?? requestedPath.slice(0, 200),
|
|
33519
|
+
path: parsed?.pathname ?? requestedPath.slice(0, 200),
|
|
33520
|
+
status,
|
|
33521
|
+
durationMs: Date.now() - started
|
|
33522
|
+
});
|
|
33523
|
+
return reply(status, { error });
|
|
33524
|
+
};
|
|
33525
|
+
let target;
|
|
33526
|
+
try {
|
|
33527
|
+
target = new URL(requestedPath, "https://www.wixapis.com");
|
|
33528
|
+
} catch {
|
|
33529
|
+
return refuseEarly(400, "webwix_bad_path");
|
|
33465
33530
|
}
|
|
33466
|
-
if (
|
|
33467
|
-
|
|
33468
|
-
if (
|
|
33469
|
-
|
|
33531
|
+
if (ownerRung) {
|
|
33532
|
+
if (!isSafeMsid(msid)) return refuseEarly(400, "webwix_owner_bad_msid", target);
|
|
33533
|
+
if (!/wixSession2=/.test(cookie)) return refuseEarly(501, "webwix_owner_no_session", target);
|
|
33534
|
+
}
|
|
33535
|
+
const body = b.body === void 0 ? void 0 : typeof b.body === "string" ? b.body : JSON.stringify(b.body);
|
|
33536
|
+
const forwardedHeaders = normalizeWixForwardedHeaders(b.headers, requestedPath);
|
|
33537
|
+
const record2 = (source, status, respBody, mockRuleId, respHeaders) => {
|
|
33538
|
+
const redactBodies = source === "proxy" || mockRuleId === UNMATCHED_FAIL_CLOSED_ID;
|
|
33470
33539
|
recordWixTraffic(state.wix, state.appName, state.adminUrl, {
|
|
33471
33540
|
ts: started,
|
|
33472
|
-
source
|
|
33473
|
-
capability
|
|
33541
|
+
source,
|
|
33542
|
+
capability,
|
|
33474
33543
|
host: target.host,
|
|
33475
33544
|
method,
|
|
33476
33545
|
url: target.toString(),
|
|
33477
33546
|
path: target.pathname,
|
|
33478
|
-
status
|
|
33547
|
+
status,
|
|
33479
33548
|
durationMs: Date.now() - started,
|
|
33480
|
-
reqBody: body,
|
|
33481
|
-
respHeaders:
|
|
33482
|
-
respBody:
|
|
33483
|
-
mockRuleId
|
|
33549
|
+
reqBody: redactBodies ? void 0 : body,
|
|
33550
|
+
respHeaders: redactBodies ? void 0 : respHeaders,
|
|
33551
|
+
respBody: redactBodies ? void 0 : respBody,
|
|
33552
|
+
mockRuleId
|
|
33484
33553
|
});
|
|
33485
|
-
|
|
33554
|
+
};
|
|
33555
|
+
if (b.checkOwnerSession !== true && state.wix.mode === "mock" && (!ownerRung || failsClosed(state.wix))) {
|
|
33556
|
+
const matchCtx = { host: target.host, query: Object.fromEntries(target.searchParams.entries()), headers: forwardedHeaders, body };
|
|
33557
|
+
let match = matchRuleEx(state.wix.rules, method, target.pathname, matchCtx);
|
|
33558
|
+
if (match && (match.rule.kind ?? "mock") !== "mock") {
|
|
33559
|
+
console.error(`[himalaya-dev] net-mocks: rule "${match.rule.id}" is kind:"${match.rule.kind}", which the web bridge cannot apply \u2014 ignoring it for ${method} ${target.pathname}`);
|
|
33560
|
+
match = matchRuleEx(state.wix.rules.filter((r) => (r.kind ?? "mock") === "mock"), method, target.pathname, matchCtx);
|
|
33561
|
+
}
|
|
33562
|
+
if (match) {
|
|
33563
|
+
const mocked = match.rule.response;
|
|
33564
|
+
if (mocked.delayMs) await new Promise((resolve48) => setTimeout(resolve48, mocked.delayMs));
|
|
33565
|
+
const responseBody = mocked.template ? renderTemplate(mocked.body, match.captures) : mocked.body;
|
|
33566
|
+
record2("mock", mocked.status, responseBody, match.rule.id, mocked.headers);
|
|
33567
|
+
return reply(200, { status: mocked.status, body: responseBody ?? "" });
|
|
33568
|
+
}
|
|
33569
|
+
if (failsClosed(state.wix)) {
|
|
33570
|
+
const refusal = hermeticRefusal(method, target.pathname);
|
|
33571
|
+
record2("mock", refusal.status, refusal.body, UNMATCHED_FAIL_CLOSED_ID, refusal.headers);
|
|
33572
|
+
return reply(200, { status: refusal.status, body: refusal.body });
|
|
33573
|
+
}
|
|
33574
|
+
}
|
|
33575
|
+
if (ownerRung) {
|
|
33576
|
+
try {
|
|
33577
|
+
if (b.checkOwnerSession !== true && method === "POST" && isOwnerSitesPath(requestedPath)) {
|
|
33578
|
+
const result2 = await wixOwnerSitesCall(requestedPath, cookie, body, fetch);
|
|
33579
|
+
record2("proxy", result2.status, result2.body);
|
|
33580
|
+
return reply(200, result2);
|
|
33581
|
+
}
|
|
33582
|
+
let instance = await webOwnerPreviewInstances.instance(msid, cookie);
|
|
33583
|
+
res.setHeader("cache-control", "no-store");
|
|
33584
|
+
if (b.checkOwnerSession === true) {
|
|
33585
|
+
record2("proxy", 200, void 0);
|
|
33586
|
+
return reply(200, { status: 200, body: JSON.stringify({ ready: true }) });
|
|
33587
|
+
}
|
|
33588
|
+
let result = await wixVisitorCall(method, requestedPath, body, instance, fetch, forwardedHeaders);
|
|
33589
|
+
if (result.status === 401) {
|
|
33590
|
+
webOwnerPreviewInstances.invalidate(msid, cookie);
|
|
33591
|
+
instance = await webOwnerPreviewInstances.instance(msid, cookie);
|
|
33592
|
+
result = await wixVisitorCall(method, requestedPath, body, instance, fetch, forwardedHeaders);
|
|
33593
|
+
}
|
|
33594
|
+
record2("proxy", result.status, result.body);
|
|
33595
|
+
return reply(200, result);
|
|
33596
|
+
} catch (e) {
|
|
33597
|
+
const absolute = String(e).includes("absolute URLs");
|
|
33598
|
+
const auth2 = /owner mint failed \(40[13]\)/.test(String(e?.message ?? e));
|
|
33599
|
+
const status = absolute ? 400 : auth2 ? 501 : 502;
|
|
33600
|
+
record2("proxy", status, void 0);
|
|
33601
|
+
if (absolute) return reply(400, { error: "absolute_urls_not_allowed" });
|
|
33602
|
+
return reply(status, { error: auth2 ? "webwix_owner_mint_failed" : "webwix_bridge_upstream_failed" });
|
|
33603
|
+
}
|
|
33486
33604
|
}
|
|
33487
33605
|
if (!session.visitorToken && !session.memberToken) {
|
|
33488
33606
|
try {
|
|
@@ -33500,9 +33618,12 @@ async function handleWebWix(req, res, state) {
|
|
|
33500
33618
|
} catch {
|
|
33501
33619
|
}
|
|
33502
33620
|
}
|
|
33621
|
+
record2("proxy", r.status, r.body);
|
|
33503
33622
|
return reply(200, { status: r.status, body: r.body });
|
|
33504
33623
|
} catch (e) {
|
|
33505
|
-
|
|
33624
|
+
const message = JSON.stringify({ error: String(e?.message ?? e) });
|
|
33625
|
+
record2("proxy", 0, message);
|
|
33626
|
+
return reply(200, { status: 0, body: message });
|
|
33506
33627
|
}
|
|
33507
33628
|
}
|
|
33508
33629
|
if (path2 === "/v1/__webwix/logout" && req.method === "POST") {
|
|
@@ -34664,7 +34785,7 @@ function createDevServer(opts = {}) {
|
|
|
34664
34785
|
}
|
|
34665
34786
|
const appScenario = state.app?.meta.devGateway;
|
|
34666
34787
|
if (!netMocksDisabled && appScenario?.rules?.length && state.wix.rules.length === 0) {
|
|
34667
|
-
const seeded = applyNetMocks(state.wix, { mode: appScenario.mode, rules: appScenario.rules });
|
|
34788
|
+
const seeded = applyNetMocks(state.wix, { mode: appScenario.mode, rules: appScenario.rules, unmatched: appScenario.unmatched });
|
|
34668
34789
|
state.wixSeededOn = todayYmd();
|
|
34669
34790
|
state.wixSeededFromApp = true;
|
|
34670
34791
|
console.error(`[himalaya-dev] net-mocks: seeded ${seeded.rules} rule(s), mode=${seeded.mode} from the app's devGateway scenario`);
|
|
@@ -48365,7 +48486,7 @@ ${releaseId}`;
|
|
|
48365
48486
|
if ((request.method === "GET" || request.method === "HEAD") && path2 === "/v1/__webwix/identity") {
|
|
48366
48487
|
const headers2 = { "content-type": JSON_CT, "cache-control": "no-store" };
|
|
48367
48488
|
if (request.method === "HEAD") return new Response(null, { status: 200, headers: headers2 });
|
|
48368
|
-
const webwixDirect = opts.webwixBridge !== false;
|
|
48489
|
+
const webwixDirect = opts.webwixDirect ? await opts.webwixDirect() === true : opts.webwixBridge !== false;
|
|
48369
48490
|
if (memberAuthOn()) {
|
|
48370
48491
|
const app2 = memberApp(request);
|
|
48371
48492
|
const store2 = memberSessions();
|
|
@@ -49310,6 +49431,32 @@ var init_node_adapter = __esm({
|
|
|
49310
49431
|
}
|
|
49311
49432
|
});
|
|
49312
49433
|
|
|
49434
|
+
// src/wix-client-id.ts
|
|
49435
|
+
function authConfigOf(appConfig) {
|
|
49436
|
+
if (!appConfig) return void 0;
|
|
49437
|
+
try {
|
|
49438
|
+
const text5 = typeof appConfig === "string" ? appConfig : new TextDecoder().decode(appConfig);
|
|
49439
|
+
return JSON.parse(text5)?.authConfig ?? void 0;
|
|
49440
|
+
} catch {
|
|
49441
|
+
return void 0;
|
|
49442
|
+
}
|
|
49443
|
+
}
|
|
49444
|
+
function appConfigWixClientId(appConfig) {
|
|
49445
|
+
const clientId = authConfigOf(appConfig)?.config?.clientId;
|
|
49446
|
+
return typeof clientId === "string" && clientId ? clientId : void 0;
|
|
49447
|
+
}
|
|
49448
|
+
function liveWixClientId(appConfig) {
|
|
49449
|
+
const auth = authConfigOf(appConfig);
|
|
49450
|
+
if (typeof auth?.providerId !== "string" || !auth.providerId.startsWith("wix")) return void 0;
|
|
49451
|
+
const clientId = appConfigWixClientId(appConfig);
|
|
49452
|
+
return clientId && clientId !== PLACEHOLDER_CLIENT_ID ? clientId : void 0;
|
|
49453
|
+
}
|
|
49454
|
+
var init_wix_client_id = __esm({
|
|
49455
|
+
"src/wix-client-id.ts"() {
|
|
49456
|
+
init_wix_placeholders();
|
|
49457
|
+
}
|
|
49458
|
+
});
|
|
49459
|
+
|
|
49313
49460
|
// ../../packages/serve/src/preview-assets-format.ts
|
|
49314
49461
|
function hasPreviewBlobMagic(blob) {
|
|
49315
49462
|
if (blob.length < PREVIEW_BLOB_MAGIC.length) return false;
|
|
@@ -49351,21 +49498,21 @@ var init_preview_assets_generated = __esm({
|
|
|
49351
49498
|
"../../packages/serve/src/preview-assets.generated.ts"() {
|
|
49352
49499
|
init_preview_assets_format();
|
|
49353
49500
|
PREVIEW_ASSET_MANIFEST = [
|
|
49354
|
-
{ key: "assets/index-
|
|
49355
|
-
{ key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset:
|
|
49356
|
-
{ key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset:
|
|
49357
|
-
{ key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset:
|
|
49358
|
-
{ key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset:
|
|
49359
|
-
{ key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset:
|
|
49360
|
-
{ key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset:
|
|
49361
|
-
{ key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset:
|
|
49362
|
-
{ key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset:
|
|
49363
|
-
{ key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset:
|
|
49364
|
-
{ key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset:
|
|
49365
|
-
{ key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset:
|
|
49366
|
-
{ key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset:
|
|
49367
|
-
{ key: "index.html", contentType: "text/html; charset=utf-8", offset:
|
|
49368
|
-
{ key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset:
|
|
49501
|
+
{ key: "assets/index-VOdBPMHE.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 1048280, sha256: "7351282bf52e78ef541a7dabe577e46b46daafe19a730aaff590c027ab919818" },
|
|
49502
|
+
{ key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset: 1048288, length: 4610, sha256: "994062dd7af4186a739de55dd9e151c63b6301f8e2cbafc608d35c2e87da0cd2" },
|
|
49503
|
+
{ key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset: 1052898, length: 488584, sha256: "d7598e12c5dbef095ff8272cfc55da0250bd07fbdecbac8a530b9b277872a134" },
|
|
49504
|
+
{ key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 1541482, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
|
|
49505
|
+
{ key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 1632406, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
|
|
49506
|
+
{ key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 1723390, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
|
|
49507
|
+
{ key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 1814370, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
|
|
49508
|
+
{ key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 1905242, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
|
|
49509
|
+
{ key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 1996222, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
|
|
49510
|
+
{ key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 2104858, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
|
|
49511
|
+
{ key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 2213942, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
|
|
49512
|
+
{ key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 2322990, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
|
|
49513
|
+
{ key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 2430690, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
|
|
49514
|
+
{ key: "index.html", contentType: "text/html; charset=utf-8", offset: 2518798, length: 4947, sha256: "5bdaf36e319850247a522b19051ace779fb34d67f14211c3197761610d3a81e6" },
|
|
49515
|
+
{ key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 2523745, length: 17209, sha256: "dffc9718e2faa63ae2cc919e0a842f585ed565aaaa7c53778e90379442c731b6" }
|
|
49369
49516
|
];
|
|
49370
49517
|
}
|
|
49371
49518
|
});
|
|
@@ -49386,13 +49533,22 @@ import { tmpdir as tmpdir4 } from "node:os";
|
|
|
49386
49533
|
import { dirname as dirname27, join as join51 } from "node:path";
|
|
49387
49534
|
import { fileURLToPath as fileURLToPath22 } from "node:url";
|
|
49388
49535
|
function makePackageRunHandler(opts) {
|
|
49536
|
+
const store = new FileReleaseStore(opts.releaseRoot);
|
|
49537
|
+
const webwixDirect = async () => {
|
|
49538
|
+
try {
|
|
49539
|
+
return liveWixClientId(await store.getAppConfig(opts.app)) !== void 0;
|
|
49540
|
+
} catch {
|
|
49541
|
+
return false;
|
|
49542
|
+
}
|
|
49543
|
+
};
|
|
49389
49544
|
return makeRunHandler({
|
|
49390
|
-
store
|
|
49545
|
+
store,
|
|
49391
49546
|
app: opts.app,
|
|
49392
49547
|
assets: opts.assets,
|
|
49393
49548
|
...opts.chrome ? { chrome: opts.chrome } : {},
|
|
49394
49549
|
header: opts.header ?? null,
|
|
49395
|
-
...opts.screenEvents ? { screenEvents: opts.screenEvents } : {}
|
|
49550
|
+
...opts.screenEvents ? { screenEvents: opts.screenEvents } : {},
|
|
49551
|
+
...opts.liveWix ? { serve: { webwixDirect } } : {}
|
|
49396
49552
|
});
|
|
49397
49553
|
}
|
|
49398
49554
|
async function fetchBytes(url) {
|
|
@@ -49493,7 +49649,8 @@ async function runPackage(source, opts = {}) {
|
|
|
49493
49649
|
assets,
|
|
49494
49650
|
chrome: opts.chrome,
|
|
49495
49651
|
header: resolved2.header,
|
|
49496
|
-
...opts.screenEvents ? { screenEvents: opts.screenEvents } : {}
|
|
49652
|
+
...opts.screenEvents ? { screenEvents: opts.screenEvents } : {},
|
|
49653
|
+
...opts.liveWix ? { liveWix: true } : {}
|
|
49497
49654
|
});
|
|
49498
49655
|
const extra = opts.extraRoutes;
|
|
49499
49656
|
const handler = extra ? (request) => extra(request) ?? plane(request) : plane;
|
|
@@ -49533,6 +49690,7 @@ var init_run = __esm({
|
|
|
49533
49690
|
init_file_store();
|
|
49534
49691
|
init_run_handler();
|
|
49535
49692
|
init_node_adapter();
|
|
49693
|
+
init_wix_client_id();
|
|
49536
49694
|
init_pack();
|
|
49537
49695
|
init_himi_package();
|
|
49538
49696
|
init_himi_package();
|
|
@@ -49631,7 +49789,7 @@ function watchFlagConflict(opts) {
|
|
|
49631
49789
|
return { error: "watch_needs_source", message: "--watch rebuilds a content package on every save, so it cannot watch a packaged release or a URL. Pass the app's directory (the one with himalaya.content.json), --content <dir>, or run it from there with no argument." };
|
|
49632
49790
|
}
|
|
49633
49791
|
if (opts.browser) {
|
|
49634
|
-
return { error: "watch_with_browser", message: "--watch
|
|
49792
|
+
return { error: "watch_with_browser", message: "--watch already opens the app in your browser, so drop --browser. (--browser is a different mode: it runs the whole serve plane inside the tab, leaving no process here to rebuild on save.) Under --watch a site-bound app shows the site's live data on its own." };
|
|
49635
49793
|
}
|
|
49636
49794
|
if (opts.spa) {
|
|
49637
49795
|
return { error: "watch_with_spa", message: "--watch pushes each rebuild to the open tab over this server's own origin, and a hosted SPA (--spa) listens on its origin instead, so it would never repaint. Drop --spa to watch with the bundled web host, or drop --watch." };
|
|
@@ -49864,12 +50022,7 @@ async function releasePayloadFromDir(root, app, header) {
|
|
|
49864
50022
|
if (w !== void 0) widgets[id] = w;
|
|
49865
50023
|
}
|
|
49866
50024
|
const appConfig = text5(await store.getAppConfig(app));
|
|
49867
|
-
|
|
49868
|
-
try {
|
|
49869
|
-
const cfg = appConfig ? JSON.parse(appConfig) : null;
|
|
49870
|
-
wixClientId = cfg?.authConfig?.config?.clientId;
|
|
49871
|
-
} catch {
|
|
49872
|
-
}
|
|
50025
|
+
const wixClientId = appConfigWixClientId(appConfig);
|
|
49873
50026
|
return {
|
|
49874
50027
|
app,
|
|
49875
50028
|
manifest,
|
|
@@ -49950,6 +50103,7 @@ var init_run_browser = __esm({
|
|
|
49950
50103
|
"src/run-browser.ts"() {
|
|
49951
50104
|
init_open_url();
|
|
49952
50105
|
init_file_store();
|
|
50106
|
+
init_wix_client_id();
|
|
49953
50107
|
HERE = dirname28(fileURLToPath23(import.meta.url));
|
|
49954
50108
|
REPO = resolve43(HERE, "..", "..", "..");
|
|
49955
50109
|
SERVED = /* @__PURE__ */ new Set(["host.html", "sw.js", "package-reader.js"]);
|
|
@@ -69164,7 +69318,9 @@ default (no --glyph): ${DEFAULT_GLYPH2} \u2014 a mark that claims nothing, so th
|
|
|
69164
69318
|
open: flags["no-open"] !== true,
|
|
69165
69319
|
// The build board on the preview's own origin, for any run of this content package.
|
|
69166
69320
|
...recordKit ? { extraRoutes: (request) => recordKit.boardFile(dir, new URL(request.url).pathname) } : {},
|
|
69167
|
-
|
|
69321
|
+
// `liveWix` only with --watch: that is the "click around while you work" window, and a
|
|
69322
|
+
// site-bound app shows the site's data there (#3273). A packaged `himi run` stays offline.
|
|
69323
|
+
...watchKit && served && bus ? { workDir: served, screenEvents: bus, liveWix: true } : {}
|
|
69168
69324
|
});
|
|
69169
69325
|
let watcher2;
|
|
69170
69326
|
let rebuild;
|
|
Binary file
|