@wix/himalaya-cli 0.1509.0 → 0.1511.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/cli.mjs +357 -70
- package/dist/preview-assets.generated.bin +0 -0
- package/package.json +2 -2
package/dist/cli.mjs
CHANGED
|
@@ -22176,7 +22176,6 @@ function resolveIdiom(tokens2, ctx = {}) {
|
|
|
22176
22176
|
var IDIOM_CONTEXTS, UNSAFE_KEYS;
|
|
22177
22177
|
var init_idiom = __esm({
|
|
22178
22178
|
"../../core/ts/src/idiom.ts"() {
|
|
22179
|
-
"use strict";
|
|
22180
22179
|
IDIOM_CONTEXTS = {
|
|
22181
22180
|
ios: { native: ["ios"] },
|
|
22182
22181
|
android: { native: ["material"] },
|
|
@@ -30373,6 +30372,47 @@ var init_circleClipBorder = __esm({
|
|
|
30373
30372
|
}
|
|
30374
30373
|
});
|
|
30375
30374
|
|
|
30375
|
+
// ../../core/web-renderer/src/glassPreview.ts
|
|
30376
|
+
function isIOSPhoneGlassPreview(context) {
|
|
30377
|
+
return context?.surface === "phone" && context.native?.includes("ios") === true;
|
|
30378
|
+
}
|
|
30379
|
+
var IOS_GLASS_PREVIEW_PALETTE, IOS_GLASS_PREVIEW_ACCESSIBILITY_DECLARATIONS;
|
|
30380
|
+
var init_glassPreview = __esm({
|
|
30381
|
+
"../../core/web-renderer/src/glassPreview.ts"() {
|
|
30382
|
+
IOS_GLASS_PREVIEW_PALETTE = {
|
|
30383
|
+
light: {
|
|
30384
|
+
"--himi-glass-fill": "rgba(250,250,254,.72)",
|
|
30385
|
+
"--himi-glass-control": "rgba(255,255,255,.72)",
|
|
30386
|
+
"--himi-glass-control-rim": "rgba(255,255,255,.72)",
|
|
30387
|
+
"--himi-glass-selection": "rgba(218,222,232,.44)",
|
|
30388
|
+
"--himi-glass-selection-rim": "rgba(255,255,255,.9)",
|
|
30389
|
+
"--himi-glass-rim": "rgba(255,255,255,.84)",
|
|
30390
|
+
"--himi-glass-highlight": "rgba(255,255,255,.82)",
|
|
30391
|
+
"--himi-glass-shadow": "rgba(24,28,40,.11)"
|
|
30392
|
+
},
|
|
30393
|
+
dark: {
|
|
30394
|
+
"--himi-glass-fill": "rgba(32,32,38,.76)",
|
|
30395
|
+
"--himi-glass-control": "rgba(36,40,50,.65)",
|
|
30396
|
+
"--himi-glass-control-rim": "rgba(255,255,255,.12)",
|
|
30397
|
+
"--himi-glass-selection": "rgba(88,82,115,.30)",
|
|
30398
|
+
"--himi-glass-selection-rim": "rgba(194,173,255,.48)",
|
|
30399
|
+
"--himi-glass-rim": "rgba(176,150,255,.32)",
|
|
30400
|
+
"--himi-glass-highlight": "rgba(255,255,255,.18)",
|
|
30401
|
+
"--himi-glass-shadow": "rgba(0,0,0,.24)"
|
|
30402
|
+
}
|
|
30403
|
+
};
|
|
30404
|
+
IOS_GLASS_PREVIEW_ACCESSIBILITY_DECLARATIONS = [
|
|
30405
|
+
"-webkit-backdrop-filter:none!important",
|
|
30406
|
+
"backdrop-filter:none!important",
|
|
30407
|
+
"background:Canvas!important",
|
|
30408
|
+
"background-image:none!important",
|
|
30409
|
+
"color:CanvasText!important",
|
|
30410
|
+
"border:1px solid CanvasText!important",
|
|
30411
|
+
"box-shadow:none!important"
|
|
30412
|
+
].join(";");
|
|
30413
|
+
}
|
|
30414
|
+
});
|
|
30415
|
+
|
|
30376
30416
|
// ../../core/web-renderer/src/shape.ts
|
|
30377
30417
|
function normalizeShapeKind(kind) {
|
|
30378
30418
|
return isKind(kind) ? kind : "rectangle";
|
|
@@ -30553,7 +30593,7 @@ function variantStyle(variant, tk, baseBackground) {
|
|
|
30553
30593
|
return {};
|
|
30554
30594
|
}
|
|
30555
30595
|
}
|
|
30556
|
-
function makeModStyle(tk, isRTL = () => false) {
|
|
30596
|
+
function makeModStyle(tk, isRTL = () => false, glassPreview = false, scheme = "light") {
|
|
30557
30597
|
return function modStyle(mods) {
|
|
30558
30598
|
if (!mods) return {};
|
|
30559
30599
|
if (mods.hidden === true) return { display: "none" };
|
|
@@ -30568,10 +30608,26 @@ function makeModStyle(tk, isRTL = () => false) {
|
|
|
30568
30608
|
const inlineGradient = gradientCss(mods.gradient, tk);
|
|
30569
30609
|
let hasSurface = false;
|
|
30570
30610
|
if (mat) {
|
|
30571
|
-
if (mat.
|
|
30572
|
-
|
|
30573
|
-
|
|
30574
|
-
|
|
30611
|
+
if (glassPreview && mat.backdropFilter) {
|
|
30612
|
+
s2["--himi-glass-material-filter"] = mat.backdropFilter;
|
|
30613
|
+
}
|
|
30614
|
+
if (glassPreview && mat.backdropFilter && scheme === "highContrast") {
|
|
30615
|
+
s2.background = "Canvas";
|
|
30616
|
+
s2.color = "CanvasText";
|
|
30617
|
+
s2.border = "1px solid CanvasText";
|
|
30618
|
+
} else {
|
|
30619
|
+
if (glassPreview && mat.backdropFilter) {
|
|
30620
|
+
s2.background = `linear-gradient(155deg, var(--himi-glass-highlight), transparent 42%), ${mat.background ?? "transparent"}`;
|
|
30621
|
+
} else if (mat.background) s2.background = mat.background;
|
|
30622
|
+
if (mat.backdropFilter) {
|
|
30623
|
+
s2.backdropFilter = mat.backdropFilter;
|
|
30624
|
+
s2.WebkitBackdropFilter = mat.backdropFilter;
|
|
30625
|
+
}
|
|
30626
|
+
}
|
|
30627
|
+
if (glassPreview && mat.backdropFilter && scheme !== "highContrast") {
|
|
30628
|
+
Object.assign(s2, IOS_GLASS_PREVIEW_PALETTE[scheme]);
|
|
30629
|
+
s2.border = "1px solid var(--himi-glass-rim)";
|
|
30630
|
+
s2.boxShadow = "inset 0 1px 0 var(--himi-glass-highlight), 0 5px 18px var(--himi-glass-shadow)";
|
|
30575
30631
|
}
|
|
30576
30632
|
hasSurface = true;
|
|
30577
30633
|
} else if (gradient) {
|
|
@@ -30698,6 +30754,7 @@ var init_modifiers = __esm({
|
|
|
30698
30754
|
"../../core/web-renderer/src/modifiers.ts"() {
|
|
30699
30755
|
init_tokens2();
|
|
30700
30756
|
init_shape();
|
|
30757
|
+
init_glassPreview();
|
|
30701
30758
|
pick = (...vals) => vals.find((v2) => v2 != null);
|
|
30702
30759
|
CSS_SIDE = {
|
|
30703
30760
|
top: "top",
|
|
@@ -33559,6 +33616,10 @@ function drawerTransition(entering, reduceMotion, dragging) {
|
|
|
33559
33616
|
const [ms2, curve, fade] = entering ? [DRAWER_ENTER_MS, "cubic-bezier(.2,.8,.2,1)", "ease-out"] : [DRAWER_EXIT_MS, "cubic-bezier(.4,0,1,1)", "ease-in"];
|
|
33560
33617
|
return `transform ${ms2}ms ${curve}, clip-path ${ms2}ms ${curve}, opacity ${ms2}ms ${fade}`;
|
|
33561
33618
|
}
|
|
33619
|
+
function drawerDetentRegionPx(clientHeight, scale, regionTop, anchorBottom) {
|
|
33620
|
+
if (![clientHeight, scale, regionTop, anchorBottom].every(Number.isFinite) || clientHeight <= 0 || scale <= 0) return null;
|
|
33621
|
+
return Math.max(0, Math.min(clientHeight, (anchorBottom - regionTop) / scale));
|
|
33622
|
+
}
|
|
33562
33623
|
function sheetIsNonModal(modal) {
|
|
33563
33624
|
return modal === false;
|
|
33564
33625
|
}
|
|
@@ -115537,7 +115598,7 @@ function makeCtx(tokens2, scheme = "light", opts = {}) {
|
|
|
115537
115598
|
sizeClass: opts.sizeClass,
|
|
115538
115599
|
isRTL: opts.isRTL,
|
|
115539
115600
|
containerWidth: opts.containerWidth,
|
|
115540
|
-
modStyle: makeModStyle(tk, () => ambientIsRTL(opts.isRTL)),
|
|
115601
|
+
modStyle: makeModStyle(tk, () => ambientIsRTL(opts.isRTL), isIOSPhoneGlassPreview(opts.idiomContext), scheme),
|
|
115541
115602
|
catalog: opts.catalog,
|
|
115542
115603
|
localeTag: opts.localeTag,
|
|
115543
115604
|
provider,
|
|
@@ -115583,7 +115644,7 @@ function withTheme(ctx, theme) {
|
|
|
115583
115644
|
spacing: { ...base.spacing ?? {}, ...theme.spacing ?? {} }
|
|
115584
115645
|
};
|
|
115585
115646
|
const tk = makeTokenResolvers(merged, ctx.scheme, ctx.idiomContext);
|
|
115586
|
-
return { ...ctx, ...tk, modStyle: makeModStyle(tk, () => layoutIsRTL(ctx)) };
|
|
115647
|
+
return { ...ctx, ...tk, modStyle: makeModStyle(tk, () => layoutIsRTL(ctx), isIOSPhoneGlassPreview(ctx.idiomContext), ctx.scheme) };
|
|
115587
115648
|
}
|
|
115588
115649
|
function ensureValueSwapKeyframes() {
|
|
115589
115650
|
ensureTransitionKeyframes();
|
|
@@ -117661,6 +117722,11 @@ function renderNodeInner(node, ctx) {
|
|
|
117661
117722
|
const el2 = renderInner(node, ctx);
|
|
117662
117723
|
if (!React11.isValidElement(el2)) return el2;
|
|
117663
117724
|
const extra = {};
|
|
117725
|
+
const material = node?.modifiers?.material;
|
|
117726
|
+
const materialName = typeof material === "string" ? material : material?.token ?? material?.name;
|
|
117727
|
+
if (isIOSPhoneGlassPreview(ctx.idiomContext) && ctx.material(materialName)?.backdropFilter) {
|
|
117728
|
+
extra["data-himi-glass-material"] = "";
|
|
117729
|
+
}
|
|
117664
117730
|
const componentId = resolvedComponentId(node?.id, ctx);
|
|
117665
117731
|
if (componentId) {
|
|
117666
117732
|
extra["data-component-id"] = componentId;
|
|
@@ -117873,7 +117939,7 @@ function renderInner(node, ctx) {
|
|
|
117873
117939
|
const ld = modifiers?.layoutDirection ?? modifiers?.layout_direction;
|
|
117874
117940
|
if ((ld === "ltr" || ld === "rtl") && layoutIsRTL(ctx) !== (ld === "rtl")) {
|
|
117875
117941
|
const pinnedRTL = ld === "rtl";
|
|
117876
|
-
ctx = { ...ctx, layoutRTL: pinnedRTL, modStyle: makeModStyle(ctx, () => pinnedRTL) };
|
|
117942
|
+
ctx = { ...ctx, layoutRTL: pinnedRTL, modStyle: makeModStyle(ctx, () => pinnedRTL, isIOSPhoneGlassPreview(ctx.idiomContext), ctx.scheme) };
|
|
117877
117943
|
}
|
|
117878
117944
|
const pkg = node.body?.package;
|
|
117879
117945
|
const C2 = ctx.color;
|
|
@@ -118625,6 +118691,7 @@ var init_renderNode = __esm({
|
|
|
118625
118691
|
init_circleClipBorder();
|
|
118626
118692
|
init_tokens2();
|
|
118627
118693
|
init_idiom_controls();
|
|
118694
|
+
init_glassPreview();
|
|
118628
118695
|
init_modifiers();
|
|
118629
118696
|
init_shape();
|
|
118630
118697
|
init_helpers();
|
|
@@ -121477,6 +121544,7 @@ var init_renderNode = __esm({
|
|
|
121477
121544
|
const resolvedTrailingIcon = isBinding(props.trailingIcon) ? boundTrailingIcon : props.trailingIcon;
|
|
121478
121545
|
const buttonStyle = props.style ?? "primary";
|
|
121479
121546
|
const variant = buttonVariant(buttonStyle);
|
|
121547
|
+
const glassPreview = variant === "glass" && isIOSPhoneGlassPreview(ctx.idiomContext);
|
|
121480
121548
|
const destructive = buttonStyle === "destructive" || props.role === "destructive";
|
|
121481
121549
|
const primary = variant === "filled";
|
|
121482
121550
|
const bt2 = resolveButtonTokens(ctx.tokens, props.size, buttonStyle);
|
|
@@ -121518,6 +121586,7 @@ var init_renderNode = __esm({
|
|
|
121518
121586
|
"aria-label": accessibleLabel,
|
|
121519
121587
|
"aria-busy": props.loading === true ? true : void 0,
|
|
121520
121588
|
"data-button-variant": variant,
|
|
121589
|
+
"data-himi-glass-material": glassPreview ? "button" : void 0,
|
|
121521
121590
|
"data-button-role": props.role,
|
|
121522
121591
|
"data-himalaya-idiom-press": idiomPress(ctx, "button"),
|
|
121523
121592
|
onClick,
|
|
@@ -121570,11 +121639,24 @@ var init_renderNode = __esm({
|
|
|
121570
121639
|
// An authored `text` token paints its own line height too — the one the hit area estimates with.
|
|
121571
121640
|
...bt2.text != null && f2.line != null ? { lineHeight: f2.line } : {},
|
|
121572
121641
|
...bt2.text != null && f2.letterSpacing != null ? { letterSpacing: f2.letterSpacing } : {},
|
|
121573
|
-
background: filled ? accent : "transparent",
|
|
121574
|
-
color: fg,
|
|
121642
|
+
background: variant === "glass" && glassPreview && ctx.scheme === "highContrast" ? "Canvas" : filled ? accent : "transparent",
|
|
121643
|
+
color: variant === "glass" && glassPreview && ctx.scheme === "highContrast" ? "CanvasText" : fg,
|
|
121644
|
+
...variant === "glass" && glassPreview && ctx.scheme !== "highContrast" ? IOS_GLASS_PREVIEW_PALETTE[ctx.scheme] : {},
|
|
121575
121645
|
...slop > 0 ? { border: "none", borderTop: `${slop}px solid transparent`, borderBottom: `${slop}px solid transparent`, backgroundClip: "padding-box", marginTop: -slop, marginBottom: -slop, ...outlined ? { boxShadow: `inset 0 0 0 ${borderWidth}px ${outlineColor}` } : {} } : { border: outlined ? `${borderWidth}px solid ${outlineColor}` : "none" },
|
|
121576
121646
|
...variant === "elevated" ? { boxShadow: `${slop > 0 && outlined ? `inset 0 0 0 ${borderWidth}px ${outlineColor}, ` : ""}0 2px 4px rgba(0,0,0,0.2)` } : {},
|
|
121577
|
-
...
|
|
121647
|
+
...glassPreview && ctx.scheme !== "highContrast" ? { "--himi-glass-material-filter": "saturate(180%) blur(18px)" } : {},
|
|
121648
|
+
...variant === "glass" && glassPreview ? ctx.scheme === "highContrast" ? {
|
|
121649
|
+
backdropFilter: "none",
|
|
121650
|
+
WebkitBackdropFilter: "none",
|
|
121651
|
+
...bt2.border == null ? slop > 0 ? { borderLeft: "1px solid CanvasText", borderRight: "1px solid CanvasText", borderTop: `${slop}px solid transparent`, borderBottom: `${slop}px solid transparent` } : { border: "1px solid CanvasText" } : {},
|
|
121652
|
+
boxShadow: "none"
|
|
121653
|
+
} : {
|
|
121654
|
+
backdropFilter: "saturate(180%) blur(18px)",
|
|
121655
|
+
WebkitBackdropFilter: "saturate(180%) blur(18px)",
|
|
121656
|
+
...bt2.border == null && borderWidth === 0 ? slop > 0 ? { borderLeft: "1px solid var(--himi-glass-rim)", borderRight: "1px solid var(--himi-glass-rim)", borderTop: `${slop}px solid transparent`, borderBottom: `${slop}px solid transparent` } : { border: "1px solid var(--himi-glass-rim)" } : {},
|
|
121657
|
+
backgroundImage: "linear-gradient(155deg, var(--himi-glass-highlight), transparent 42%)",
|
|
121658
|
+
boxShadow: `${slop > 0 && outlined ? `inset 0 0 0 ${borderWidth}px ${outlineColor}, ` : ""}inset 0 1px 0 var(--himi-glass-highlight), 0 5px 18px var(--himi-glass-shadow)`
|
|
121659
|
+
} : variant === "glass" ? { backdropFilter: "blur(12px)", WebkitBackdropFilter: "blur(12px)" } : {},
|
|
121578
121660
|
cursor: disabled ? "default" : "pointer",
|
|
121579
121661
|
opacity: disabled ? 0.55 : 1,
|
|
121580
121662
|
boxSizing: "border-box",
|
|
@@ -122006,11 +122088,28 @@ var init_renderNode = __esm({
|
|
|
122006
122088
|
useIsomorphicLayoutEffect(() => {
|
|
122007
122089
|
if (!detents.length || !mounted) return;
|
|
122008
122090
|
const region = host ? overHost ? host.parentElement : host.previousElementSibling : null;
|
|
122009
|
-
const measure2 = () =>
|
|
122091
|
+
const measure2 = () => {
|
|
122092
|
+
const fallback = typeof window !== "undefined" ? window.innerHeight : 0;
|
|
122093
|
+
if (!region) {
|
|
122094
|
+
setRegionPx(fallback);
|
|
122095
|
+
return;
|
|
122096
|
+
}
|
|
122097
|
+
const regionRect = region.getBoundingClientRect();
|
|
122098
|
+
const anchorBottom = host?.getBoundingClientRect().bottom ?? regionRect.bottom;
|
|
122099
|
+
const scale = region.offsetHeight > 0 && regionRect.height > 0 ? regionRect.height / region.offsetHeight : 1;
|
|
122100
|
+
const available = drawerDetentRegionPx(region.clientHeight, scale, regionRect.top, anchorBottom);
|
|
122101
|
+
setRegionPx(available ?? (region.clientHeight || fallback));
|
|
122102
|
+
};
|
|
122010
122103
|
measure2();
|
|
122011
122104
|
if (typeof window === "undefined") return;
|
|
122012
122105
|
window.addEventListener("resize", measure2);
|
|
122013
|
-
|
|
122106
|
+
const resizeObserver = typeof ResizeObserver !== "undefined" ? new ResizeObserver(measure2) : null;
|
|
122107
|
+
if (resizeObserver && region) resizeObserver.observe(region);
|
|
122108
|
+
if (resizeObserver && host) resizeObserver.observe(host);
|
|
122109
|
+
return () => {
|
|
122110
|
+
window.removeEventListener("resize", measure2);
|
|
122111
|
+
resizeObserver?.disconnect();
|
|
122112
|
+
};
|
|
122014
122113
|
}, [host, overHost, mounted, detents.length]);
|
|
122015
122114
|
const latest = React11.useRef({ ctx, onDismiss: props.onDismiss });
|
|
122016
122115
|
latest.current = { ctx, onDismiss: props.onDismiss };
|
|
@@ -124578,12 +124677,29 @@ function renderDescriptorToHtml(payload, tokens2, scheme = "light", provider = n
|
|
|
124578
124677
|
...opts?.assetBaseUrl ? { assetBaseUrl: opts.assetBaseUrl } : {}
|
|
124579
124678
|
});
|
|
124580
124679
|
const FOCUS_STYLE_MARKUP = `<style data-himalaya-focus-ring>${FOCUS_RING_CSS}</style>`;
|
|
124581
|
-
const
|
|
124680
|
+
const glassPreview = isIOSPhoneGlassPreview(opts?.idiomContext);
|
|
124681
|
+
const glassStyleMarkup = `<style data-himalaya-glass-preview>@media (prefers-reduced-transparency:reduce),(forced-colors:active),(prefers-contrast:more){.himi-ios-glass-preview [data-himi-glass-material]{${IOS_GLASS_PREVIEW_ACCESSIBILITY_DECLARATIONS}}}</style>`;
|
|
124682
|
+
const glassPalette = IOS_GLASS_PREVIEW_PALETTE[scheme === "dark" ? "dark" : "light"];
|
|
124683
|
+
const withRenderStyles = (markup) => {
|
|
124684
|
+
if (!markup) return markup;
|
|
124685
|
+
if (!glassPreview) return FOCUS_STYLE_MARKUP + markup;
|
|
124686
|
+
const scoped = renderToStaticMarkup(React12.createElement(
|
|
124687
|
+
"div",
|
|
124688
|
+
{
|
|
124689
|
+
className: "himi-ios-glass-preview",
|
|
124690
|
+
"data-glass-scheme": scheme,
|
|
124691
|
+
"data-glass-quality": "blur",
|
|
124692
|
+
style: { display: "contents", ...glassPalette },
|
|
124693
|
+
dangerouslySetInnerHTML: { __html: markup }
|
|
124694
|
+
}
|
|
124695
|
+
));
|
|
124696
|
+
return FOCUS_STYLE_MARKUP + glassStyleMarkup + scoped;
|
|
124697
|
+
};
|
|
124582
124698
|
const header = chrome?.stickyHeader;
|
|
124583
124699
|
const footer = chrome?.stickyFooter;
|
|
124584
124700
|
const dir = rtl ? { dir: "rtl" } : {};
|
|
124585
124701
|
if (header || footer) {
|
|
124586
|
-
return
|
|
124702
|
+
return withRenderStyles(renderToStaticMarkup(
|
|
124587
124703
|
React12.createElement(
|
|
124588
124704
|
"div",
|
|
124589
124705
|
// F-22 — same footer pin as ScreenHost: a full-height flex column + margin-top:auto
|
|
@@ -124604,11 +124720,11 @@ function renderDescriptorToHtml(payload, tokens2, scheme = "light", provider = n
|
|
|
124604
124720
|
));
|
|
124605
124721
|
}
|
|
124606
124722
|
if (rtl) {
|
|
124607
|
-
return
|
|
124723
|
+
return withRenderStyles(renderToStaticMarkup(
|
|
124608
124724
|
React12.createElement("div", dir, renderNode(payload, ctx))
|
|
124609
124725
|
));
|
|
124610
124726
|
}
|
|
124611
|
-
return
|
|
124727
|
+
return withRenderStyles(renderToStaticMarkup(
|
|
124612
124728
|
React12.createElement(React12.Fragment, null, renderNode(payload, ctx))
|
|
124613
124729
|
));
|
|
124614
124730
|
}
|
|
@@ -124617,6 +124733,7 @@ var init_renderToHtml = __esm({
|
|
|
124617
124733
|
"use strict";
|
|
124618
124734
|
init_renderNode();
|
|
124619
124735
|
init_env();
|
|
124736
|
+
init_glassPreview();
|
|
124620
124737
|
}
|
|
124621
124738
|
});
|
|
124622
124739
|
|
|
@@ -163184,6 +163301,134 @@ var init_member_exchange = __esm({
|
|
|
163184
163301
|
}
|
|
163185
163302
|
});
|
|
163186
163303
|
|
|
163304
|
+
// ../../core/serve-runtime/src/member-forward.ts
|
|
163305
|
+
function matchMemberForward(method, raw, rules = MEMBER_FORWARD_ALLOWLIST) {
|
|
163306
|
+
if (typeof method !== "string" || typeof raw !== "string" || raw.length === 0 || raw.length > 8192) return null;
|
|
163307
|
+
const verb = method.toUpperCase();
|
|
163308
|
+
let url;
|
|
163309
|
+
try {
|
|
163310
|
+
url = new URL(raw);
|
|
163311
|
+
} catch {
|
|
163312
|
+
return null;
|
|
163313
|
+
}
|
|
163314
|
+
if (url.protocol !== "https:" || url.port !== "" || url.username || url.password || url.hash) return null;
|
|
163315
|
+
const rawPath = raw.replace(/^https:\/\/[^/?#]*/i, "").split(/[?#]/, 1)[0];
|
|
163316
|
+
if (rawPath !== url.pathname || /[%\\]|\/\/|\.\./.test(rawPath)) return null;
|
|
163317
|
+
const host = url.hostname.toLowerCase();
|
|
163318
|
+
const rule = rules.find((r3) => r3.method === verb && r3.host === host && r3.path.test(url.pathname));
|
|
163319
|
+
if (!rule) return null;
|
|
163320
|
+
const seen = /* @__PURE__ */ new Set();
|
|
163321
|
+
for (const [key3, value] of url.searchParams) {
|
|
163322
|
+
const allowed2 = Object.hasOwn(rule.query, key3) ? rule.query[key3] : void 0;
|
|
163323
|
+
if (!(allowed2 instanceof RegExp) || seen.has(key3) || !allowed2.test(value)) return null;
|
|
163324
|
+
seen.add(key3);
|
|
163325
|
+
}
|
|
163326
|
+
if ((rule.required ?? []).some((key3) => !seen.has(key3))) return null;
|
|
163327
|
+
return { rule, url };
|
|
163328
|
+
}
|
|
163329
|
+
function matchForwardHeaders(rule, raw) {
|
|
163330
|
+
const allowed2 = rule.headers ?? {};
|
|
163331
|
+
const out2 = {};
|
|
163332
|
+
if (raw !== void 0 && raw !== null) {
|
|
163333
|
+
if (typeof raw !== "object" || Array.isArray(raw)) return null;
|
|
163334
|
+
for (const [name, value] of Object.entries(raw)) {
|
|
163335
|
+
const canonical7 = Object.keys(allowed2).find((k2) => k2.toLowerCase() === name.toLowerCase());
|
|
163336
|
+
if (!canonical7 || typeof value !== "string" || !allowed2[canonical7].test(value) || Object.hasOwn(out2, canonical7)) return null;
|
|
163337
|
+
out2[canonical7] = value;
|
|
163338
|
+
}
|
|
163339
|
+
}
|
|
163340
|
+
if ((rule.requiredHeaders ?? []).some((name) => !Object.hasOwn(out2, name))) return null;
|
|
163341
|
+
return out2;
|
|
163342
|
+
}
|
|
163343
|
+
async function readCapped(res, maxChars) {
|
|
163344
|
+
const declared = Number(res.headers.get("content-length"));
|
|
163345
|
+
if (Number.isFinite(declared) && declared > maxChars * 4) {
|
|
163346
|
+
await res.body?.cancel().catch(() => {
|
|
163347
|
+
});
|
|
163348
|
+
return null;
|
|
163349
|
+
}
|
|
163350
|
+
if (!res.body) {
|
|
163351
|
+
const text12 = await res.text();
|
|
163352
|
+
return text12.length > maxChars ? null : text12;
|
|
163353
|
+
}
|
|
163354
|
+
const reader = res.body.getReader();
|
|
163355
|
+
const decoder = new TextDecoder();
|
|
163356
|
+
let text11 = "";
|
|
163357
|
+
for (; ; ) {
|
|
163358
|
+
const { done, value } = await reader.read();
|
|
163359
|
+
if (done) break;
|
|
163360
|
+
text11 += decoder.decode(value, { stream: true });
|
|
163361
|
+
if (text11.length > maxChars) {
|
|
163362
|
+
await reader.cancel().catch(() => {
|
|
163363
|
+
});
|
|
163364
|
+
return null;
|
|
163365
|
+
}
|
|
163366
|
+
}
|
|
163367
|
+
text11 += decoder.decode();
|
|
163368
|
+
return text11.length > maxChars ? null : text11;
|
|
163369
|
+
}
|
|
163370
|
+
async function memberForwardCall(match, body, memberToken, fetchImpl = fetch, extraHeaders = {}) {
|
|
163371
|
+
const headers2 = { Accept: "application/json", ...extraHeaders };
|
|
163372
|
+
if (body !== void 0) headers2["Content-Type"] = "application/json";
|
|
163373
|
+
if (match.rule.auth === "member") headers2.Authorization = memberToken;
|
|
163374
|
+
try {
|
|
163375
|
+
const res = await fetchImpl(match.url.toString(), {
|
|
163376
|
+
method: match.rule.method,
|
|
163377
|
+
headers: headers2,
|
|
163378
|
+
body,
|
|
163379
|
+
redirect: "manual",
|
|
163380
|
+
credentials: "omit",
|
|
163381
|
+
signal: AbortSignal.timeout(FORWARD_TIMEOUT_MS)
|
|
163382
|
+
});
|
|
163383
|
+
const text11 = await readCapped(res, MAX_RESPONSE_CHARS);
|
|
163384
|
+
if (text11 === null) return { ok: false, code: "forward_too_large" };
|
|
163385
|
+
return { ok: true, status: res.status, body: text11 };
|
|
163386
|
+
} catch {
|
|
163387
|
+
return { ok: false, code: "forward_failed" };
|
|
163388
|
+
}
|
|
163389
|
+
}
|
|
163390
|
+
var BOOL, SMALL_INT, TOKENISH, CURSOR, ROOM, LIST_QUERY, MEMBER_FORWARD_ALLOWLIST, FORWARD_TIMEOUT_MS, MAX_RESPONSE_CHARS;
|
|
163391
|
+
var init_member_forward = __esm({
|
|
163392
|
+
"../../core/serve-runtime/src/member-forward.ts"() {
|
|
163393
|
+
BOOL = /^(true|false)$/;
|
|
163394
|
+
SMALL_INT = /^\d{1,6}$/;
|
|
163395
|
+
TOKENISH = /^[A-Za-z0-9._~-]{1,4096}$/;
|
|
163396
|
+
CURSOR = /^[A-Za-z0-9._~:=+/,-]{1,2048}$/;
|
|
163397
|
+
ROOM = "[A-Za-z0-9-]{1,64}";
|
|
163398
|
+
LIST_QUERY = { chatToken: TOKENISH, nextPointer: CURSOR, pageSize: SMALL_INT, archived: BOOL, onlyUnread: BOOL, lastMessageLimit: SMALL_INT, unreadChatroomLimit: SMALL_INT };
|
|
163399
|
+
MEMBER_FORWARD_ALLOWLIST = [
|
|
163400
|
+
// Chat: mint the chat token with the member token alone.
|
|
163401
|
+
{ method: "POST", host: "manage.wix.com", path: /^\/_api\/wix-chat-tokens-server\/v1\/chat-tokens$/, auth: "member", query: { isForUnifiedList: BOOL } },
|
|
163402
|
+
// Chat: the member's conversation list (all, or one participant type), authorised by the chat token in the query.
|
|
163403
|
+
{ method: "POST", host: "manage.wix.com", path: /^\/_api\/chat-web\/v1\/chatrooms-for-list-view(?:\/(?:business|siteMember))?$/, auth: "none", query: LIST_QUERY, required: ["chatToken"] },
|
|
163404
|
+
{ method: "GET", host: "manage.wix.com", path: /^\/_api\/chat-web\/v2\/chatrooms$/, auth: "none", query: { chatToken: TOKENISH, nextPointer: CURSOR, pageSize: SMALL_INT }, required: ["chatToken"] },
|
|
163405
|
+
// Chat: a conversation's history.
|
|
163406
|
+
{
|
|
163407
|
+
method: "GET",
|
|
163408
|
+
host: "manage.wix.com",
|
|
163409
|
+
path: new RegExp(`^/_api/chat-web/v1/chatrooms/${ROOM}/messages$`),
|
|
163410
|
+
auth: "none",
|
|
163411
|
+
query: { chatToken: TOKENISH, pageSize: SMALL_INT, ordering: /^(?:Asc|Desc)$/, nextPointer: CURSOR },
|
|
163412
|
+
required: ["chatToken"]
|
|
163413
|
+
},
|
|
163414
|
+
// Chat: send a message. The chat token rides the `ChatToken` HEADER here (the query is rejected: probed).
|
|
163415
|
+
{
|
|
163416
|
+
method: "POST",
|
|
163417
|
+
host: "manage.wix.com",
|
|
163418
|
+
path: new RegExp(`^/_api/chat-web/v2/chatrooms/${ROOM}/messages$`),
|
|
163419
|
+
auth: "none",
|
|
163420
|
+
query: {},
|
|
163421
|
+
headers: { ChatToken: TOKENISH },
|
|
163422
|
+
requiredHeaders: ["ChatToken"]
|
|
163423
|
+
},
|
|
163424
|
+
// Chat: the live-update (realtime) token. The answer carries a credential for a third party; it is returned to the caller only.
|
|
163425
|
+
{ method: "POST", host: "manage.wix.com", path: /^\/_api\/chat-web\/v1\/real-time-tokens$/, auth: "none", query: { chatToken: TOKENISH }, required: ["chatToken"] }
|
|
163426
|
+
];
|
|
163427
|
+
FORWARD_TIMEOUT_MS = 15e3;
|
|
163428
|
+
MAX_RESPONSE_CHARS = 1e6;
|
|
163429
|
+
}
|
|
163430
|
+
});
|
|
163431
|
+
|
|
163187
163432
|
// ../../core/serve-runtime/package-share.ts
|
|
163188
163433
|
function parseStored(bytes2, id) {
|
|
163189
163434
|
if (!bytes2) return null;
|
|
@@ -163740,6 +163985,27 @@ ${releaseId}`;
|
|
|
163740
163985
|
}
|
|
163741
163986
|
return new Response(body, { status: 200, headers: { "content-type": JSON_CT3, etag, "cache-control": cache, ...vary } });
|
|
163742
163987
|
}
|
|
163988
|
+
async function draftPreviewOnly(request, url, noStore) {
|
|
163989
|
+
const refuse7 = (status, error) => ({ ok: false, response: json5(status, { error }, noStore) });
|
|
163990
|
+
if (opts.webwixBridge === false) return refuse7(503, "webwix_bridge_disabled");
|
|
163991
|
+
if (!opts.previewTokenSecret) return refuse7(503, "preview_token_unavailable");
|
|
163992
|
+
const app = resolveApp(request, url);
|
|
163993
|
+
if (!app) return refuse7(400, "app_required");
|
|
163994
|
+
const pin = resolvePin(request, url);
|
|
163995
|
+
if (!pin || !resolvePreviewToken(request, url)) return refuse7(403, "draft_preview_required");
|
|
163996
|
+
const cfg = await appConfigFor(request, url, app);
|
|
163997
|
+
if (!cfg.ok) return { ok: false, response: cfg.response };
|
|
163998
|
+
let ringPinned = false;
|
|
163999
|
+
if (opts.ringReleases) {
|
|
164000
|
+
try {
|
|
164001
|
+
ringPinned = new Set(await opts.ringReleases(app)).has(pin);
|
|
164002
|
+
} catch {
|
|
164003
|
+
return refuse7(503, "ring_lookup_unavailable");
|
|
164004
|
+
}
|
|
164005
|
+
}
|
|
164006
|
+
if ((await manifest(app))?.releaseId === pin || ringPinned) return refuse7(403, "draft_preview_required");
|
|
164007
|
+
return { ok: true, app, pin, cfgBytes: cfg.bytes };
|
|
164008
|
+
}
|
|
163743
164009
|
async function authorizePinnedRead(request, url, app, releaseId, screenId) {
|
|
163744
164010
|
const denied2 = await checkPinnedRead({
|
|
163745
164011
|
secret: opts.previewTokenSecret,
|
|
@@ -164020,26 +164286,9 @@ ${releaseId}`;
|
|
|
164020
164286
|
}
|
|
164021
164287
|
if (request.method === "POST" && path2 === "/v1/__webwix/member-exchange") {
|
|
164022
164288
|
const noStore = { "cache-control": "no-store" };
|
|
164023
|
-
|
|
164024
|
-
if (!
|
|
164025
|
-
const
|
|
164026
|
-
if (!exchangeApp) return json5(400, { error: "app_required" }, noStore);
|
|
164027
|
-
const exchangePin = resolvePin(request, url);
|
|
164028
|
-
if (!exchangePin || !resolvePreviewToken(request, url)) return json5(403, { error: "draft_preview_required" }, noStore);
|
|
164029
|
-
const exchangeCfg = await appConfigFor(request, url, exchangeApp);
|
|
164030
|
-
if (!exchangeCfg.ok) return exchangeCfg.response;
|
|
164031
|
-
let ringPinned = false;
|
|
164032
|
-
if (opts.ringReleases) {
|
|
164033
|
-
try {
|
|
164034
|
-
ringPinned = new Set(await opts.ringReleases(exchangeApp)).has(exchangePin);
|
|
164035
|
-
} catch {
|
|
164036
|
-
return json5(503, { error: "ring_lookup_unavailable" }, noStore);
|
|
164037
|
-
}
|
|
164038
|
-
}
|
|
164039
|
-
if ((await manifest(exchangeApp))?.releaseId === exchangePin || ringPinned) {
|
|
164040
|
-
return json5(403, { error: "draft_preview_required" }, noStore);
|
|
164041
|
-
}
|
|
164042
|
-
const exchangeClient = wixClientIdOf(utf8Decode(exchangeCfg.bytes));
|
|
164289
|
+
const gate = await draftPreviewOnly(request, url, noStore);
|
|
164290
|
+
if (!gate.ok) return gate.response;
|
|
164291
|
+
const exchangeClient = wixClientIdOf(utf8Decode(gate.cfgBytes));
|
|
164043
164292
|
if ("error" in exchangeClient) return json5(501, { error: `member_exchange_${exchangeClient.error}` }, noStore);
|
|
164044
164293
|
const headerToken = request.headers.get("x-himalaya-member-session");
|
|
164045
164294
|
let sessionToken = headerToken ?? void 0;
|
|
@@ -164068,6 +164317,40 @@ ${releaseId}`;
|
|
|
164068
164317
|
if (exchanged.code === "bad_request") return json5(400, { error: "invalid_session_token", received }, noStore);
|
|
164069
164318
|
return json5(502, { error: exchanged.code, ...exchanged.status !== void 0 ? { status: exchanged.status } : {} }, noStore);
|
|
164070
164319
|
}
|
|
164320
|
+
if (request.method === "POST" && path2 === "/v1/__webwix/member-forward") {
|
|
164321
|
+
const noStore = { "cache-control": "no-store" };
|
|
164322
|
+
const gate = await draftPreviewOnly(request, url, noStore);
|
|
164323
|
+
if (!gate.ok) return gate.response;
|
|
164324
|
+
let raw;
|
|
164325
|
+
try {
|
|
164326
|
+
raw = await request.text();
|
|
164327
|
+
} catch {
|
|
164328
|
+
return json5(400, { error: "body_unreadable" }, noStore);
|
|
164329
|
+
}
|
|
164330
|
+
if (!raw) return json5(400, { error: "empty_body" }, noStore);
|
|
164331
|
+
if (raw.length > 256e3) return json5(413, { error: "body_too_large" }, noStore);
|
|
164332
|
+
let parsed;
|
|
164333
|
+
try {
|
|
164334
|
+
parsed = JSON.parse(raw);
|
|
164335
|
+
} catch {
|
|
164336
|
+
return json5(400, { error: "invalid_json" }, noStore);
|
|
164337
|
+
}
|
|
164338
|
+
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) return json5(400, { error: "invalid_body" }, noStore);
|
|
164339
|
+
if (typeof parsed.memberToken !== "string" || !parsed.memberToken || parsed.memberToken.length > 4096) return json5(400, { error: "member_token_required" }, noStore);
|
|
164340
|
+
const match = matchMemberForward(parsed.method, parsed.url);
|
|
164341
|
+
if (!match) return json5(403, { error: "forward_target_refused" }, noStore);
|
|
164342
|
+
const forwardHeaders = matchForwardHeaders(match.rule, parsed.headers);
|
|
164343
|
+
if (!forwardHeaders) return json5(403, { error: "forward_header_refused" }, noStore);
|
|
164344
|
+
let forwardBody;
|
|
164345
|
+
if (parsed.body !== void 0) {
|
|
164346
|
+
if (match.rule.method === "GET" || match.rule.method === "DELETE") return json5(400, { error: "body_not_allowed" }, noStore);
|
|
164347
|
+
forwardBody = typeof parsed.body === "string" ? parsed.body : JSON.stringify(parsed.body);
|
|
164348
|
+
if (forwardBody.length > 64e3) return json5(413, { error: "body_too_large" }, noStore);
|
|
164349
|
+
}
|
|
164350
|
+
const forwarded = await memberForwardCall(match, forwardBody, parsed.memberToken, webwixFetch, forwardHeaders);
|
|
164351
|
+
if (!forwarded.ok) return json5(502, { error: forwarded.code }, noStore);
|
|
164352
|
+
return json5(200, { status: forwarded.status, body: forwarded.body }, noStore);
|
|
164353
|
+
}
|
|
164071
164354
|
if (request.method === "POST" && path2 === "/v1/__webwix/call") {
|
|
164072
164355
|
const served = { rung: "none" };
|
|
164073
164356
|
let status = 500;
|
|
@@ -164693,6 +164976,7 @@ var init_server2 = __esm({
|
|
|
164693
164976
|
init_contract();
|
|
164694
164977
|
init_pinned_read();
|
|
164695
164978
|
init_member_exchange();
|
|
164979
|
+
init_member_forward();
|
|
164696
164980
|
init_package_share();
|
|
164697
164981
|
init_wix_bridge();
|
|
164698
164982
|
init_account_rung();
|
|
@@ -165152,33 +165436,36 @@ var init_preview_assets_generated = __esm({
|
|
|
165152
165436
|
"../../packages/serve/src/preview-assets.generated.ts"() {
|
|
165153
165437
|
init_preview_assets_format();
|
|
165154
165438
|
PREVIEW_ASSET_MANIFEST = [
|
|
165155
|
-
{ key: "assets/DashboardHost-
|
|
165156
|
-
{ key: "assets/DevDrawer-
|
|
165157
|
-
{ key: "assets/IdiomCompare-
|
|
165158
|
-
{ key: "assets/LightboxViewer-
|
|
165159
|
-
{ key: "assets/PhonePreviewControl-
|
|
165160
|
-
{ key: "assets/SchemeCompare-
|
|
165161
|
-
{ key: "assets/
|
|
165162
|
-
{ key: "assets/
|
|
165163
|
-
{ key: "assets/pdf
|
|
165164
|
-
{ key: "assets/pdf.worker.min-
|
|
165165
|
-
{ key: "assets/
|
|
165166
|
-
{ key: "assets/
|
|
165167
|
-
{ key: "
|
|
165168
|
-
{ key: "fonts/Roboto-
|
|
165169
|
-
{ key: "fonts/
|
|
165170
|
-
{ key: "fonts/WixMadeforDisplay-
|
|
165171
|
-
{ key: "fonts/WixMadeforDisplay-
|
|
165172
|
-
{ key: "fonts/WixMadeforDisplay-
|
|
165173
|
-
{ key: "fonts/WixMadeforDisplay-
|
|
165174
|
-
{ key: "fonts/
|
|
165175
|
-
{ key: "fonts/WixMadeforText-
|
|
165176
|
-
{ key: "fonts/WixMadeforText-
|
|
165177
|
-
{ key: "fonts/WixMadeforText-
|
|
165178
|
-
{ key: "fonts/WixMadeforText-
|
|
165179
|
-
{ key: "
|
|
165180
|
-
{ key: "
|
|
165181
|
-
{ key: "
|
|
165439
|
+
{ key: "assets/DashboardHost-bmDS1KPX.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 2916, sha256: "f1b70aebc8859dc6e90e551d70440f9ff93eba6d8de35a9915bf21ada3426ae4" },
|
|
165440
|
+
{ key: "assets/DevDrawer-b9bmp6x0.js", contentType: "application/javascript; charset=utf-8", offset: 2924, length: 16744, sha256: "f9c38bf7b1049e603dbeddad6e3f6ab64ba5ce1c8f78f065263cf3eba295936c" },
|
|
165441
|
+
{ key: "assets/IdiomCompare-CjXABUxk.js", contentType: "application/javascript; charset=utf-8", offset: 19668, length: 1892, sha256: "2a2d75e8805c6d4a90913c7b686930d520236a74a175ecd62e171046f14ee6dd" },
|
|
165442
|
+
{ key: "assets/LightboxViewer-CJY1_bay.js", contentType: "application/javascript; charset=utf-8", offset: 21560, length: 8132, sha256: "a68afa4ef72c3f2539acf9f40e98c4cf4535a6ff04382e064de3aa4c952fac2c" },
|
|
165443
|
+
{ key: "assets/PhonePreviewControl-BEQjOu5h.js", contentType: "application/javascript; charset=utf-8", offset: 29692, length: 37729, sha256: "27e70a7515e2984a21750afa75ad849ea48dd7d77ce3c2faec14140de501071c" },
|
|
165444
|
+
{ key: "assets/SchemeCompare-BL1UfDvL.js", contentType: "application/javascript; charset=utf-8", offset: 67421, length: 1824, sha256: "7fb41df81f63c1c28b6b7bf5d0d61ee70090d599810e6de38783151a682ce423" },
|
|
165445
|
+
{ key: "assets/glassPreviewBrowser-Bt5ZFmG4.js", contentType: "application/javascript; charset=utf-8", offset: 69245, length: 342, sha256: "20d73f97d38f6d9a0b79e68e24954cd6bbfe66833a6e6aecae00a9102e64cab3" },
|
|
165446
|
+
{ key: "assets/index-WPQ7BYkV.js", contentType: "application/javascript; charset=utf-8", offset: 69587, length: 1317118, sha256: "b7c6f295c05790084440f9ef8c94c86c358167199b9a424f26f04befdab9a166" },
|
|
165447
|
+
{ key: "assets/pdf-DHWUOjfi.js", contentType: "application/javascript; charset=utf-8", offset: 1386705, length: 488199, sha256: "a6df8c0d4c8b79fd3ba3c0ad5b27d872a58c18d8d99f9fa7ff2d867b14d20d88" },
|
|
165448
|
+
{ key: "assets/pdf.worker.min-BQa_JDET.js", contentType: "application/javascript; charset=utf-8", offset: 1874904, length: 73, sha256: "41bcfda4f3c8c0a81c785ea87c69afc8e7d0ed8c333324aee94c273d881bb6aa" },
|
|
165449
|
+
{ key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/javascript; charset=utf-8", offset: 1874977, length: 1317034, sha256: "a33cfe728c584fdba4fcc1fd54bcdc2f9f2f13889ddbb5b2bd1d0f8cbe49b84e" },
|
|
165450
|
+
{ key: "assets/pdfDocument-DxJ9CjyL.js", contentType: "application/javascript; charset=utf-8", offset: 3192011, length: 3379, sha256: "c25a50345b3a778e6c26ee39a9edb0d4dbf13f26ff0cc713fd8b57bb359d36ab" },
|
|
165451
|
+
{ key: "assets/pdfFetch-Cc8i1I1h.js", contentType: "application/javascript; charset=utf-8", offset: 3195390, length: 2266, sha256: "1d21ad008921942217c9eac0c35b1713773b9d89c71e3ab4412781f7bb88f463" },
|
|
165452
|
+
{ key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset: 3197656, length: 4610, sha256: "994062dd7af4186a739de55dd9e151c63b6301f8e2cbafc608d35c2e87da0cd2" },
|
|
165453
|
+
{ key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset: 3202266, length: 488584, sha256: "d7598e12c5dbef095ff8272cfc55da0250bd07fbdecbac8a530b9b277872a134" },
|
|
165454
|
+
{ key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 3690850, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
|
|
165455
|
+
{ key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 3781774, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
|
|
165456
|
+
{ key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 3872758, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
|
|
165457
|
+
{ key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 3963738, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
|
|
165458
|
+
{ key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 4054610, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
|
|
165459
|
+
{ key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 4145590, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
|
|
165460
|
+
{ key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 4254226, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
|
|
165461
|
+
{ key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 4363310, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
|
|
165462
|
+
{ key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 4472358, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
|
|
165463
|
+
{ key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 4580058, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
|
|
165464
|
+
{ key: "himi-sw.js", contentType: "application/javascript; charset=utf-8", offset: 4668166, length: 6748, sha256: "4a92459977d7cefa1a6a7e020c3a63509737f083b3f2773557c1a5771665811a" },
|
|
165465
|
+
{ key: "index.html", contentType: "text/html; charset=utf-8", offset: 4674914, length: 4947, sha256: "2ff61ed31d66505bbd1bf8d484c6515e240dbd84d2d15aeea52ca85d3cb849c0" },
|
|
165466
|
+
{ key: "ios-glass-preview.css", contentType: "text/css; charset=utf-8", offset: 4679861, length: 7193, sha256: "a482f4796147c2a3893942e10ab225bd3b6f749f7125fe0330680d4c20ea0212" },
|
|
165467
|
+
{ key: "ios-glass-preview.svg", contentType: "image/svg+xml", offset: 4687054, length: 423, sha256: "b9cd5989d31464a0422f260a332af6be5add0b04de2148944de35158f3b75efc" },
|
|
165468
|
+
{ key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 4687477, length: 18080, sha256: "937286e50af2fc4e44f7fb35b277f35254e5eb24a3d364a70cfa914d4286d0d9" }
|
|
165182
165469
|
];
|
|
165183
165470
|
}
|
|
165184
165471
|
});
|
|
@@ -176770,7 +177057,7 @@ function extOf2(url) {
|
|
|
176770
177057
|
if (/\.ico$/i.test(path2)) return "ico";
|
|
176771
177058
|
return "jpg";
|
|
176772
177059
|
}
|
|
176773
|
-
async function
|
|
177060
|
+
async function readCapped2(res, cap) {
|
|
176774
177061
|
const declared = Number(res.headers?.get?.("content-length"));
|
|
176775
177062
|
if (Number.isFinite(declared) && declared > cap) {
|
|
176776
177063
|
await discardBody(res);
|
|
@@ -176806,7 +177093,7 @@ async function fetchBrandFace(family, url, fetchImpl) {
|
|
|
176806
177093
|
await discardBody(res);
|
|
176807
177094
|
return void 0;
|
|
176808
177095
|
}
|
|
176809
|
-
const capped = await
|
|
177096
|
+
const capped = await readCapped2(res, MAX_FONT_BYTES);
|
|
176810
177097
|
if (!capped) return void 0;
|
|
176811
177098
|
woff2 = capped;
|
|
176812
177099
|
} catch {
|
|
@@ -177345,7 +177632,7 @@ function pagesFromRegistry(js2) {
|
|
|
177345
177632
|
return [...m2[1].matchAll(/["']?([A-Z][A-Za-z0-9_]*)["']?\s*:/g)].map((x2) => x2[1]).slice(0, MAX_ROUTES);
|
|
177346
177633
|
}
|
|
177347
177634
|
async function readText3(res, cap) {
|
|
177348
|
-
const buf = await
|
|
177635
|
+
const buf = await readCapped2(res, cap);
|
|
177349
177636
|
if (!buf) throw new Error(`body over the ${cap}-byte cap`);
|
|
177350
177637
|
return buf.toString("utf8");
|
|
177351
177638
|
}
|
|
@@ -180788,7 +181075,7 @@ async function createPlaywrightBrowser(load3 = () => import("playwright"), siteF
|
|
|
180788
181075
|
await route.fulfill({ status: res.status, headers: { location }, body: Buffer.alloc(0) });
|
|
180789
181076
|
return;
|
|
180790
181077
|
}
|
|
180791
|
-
const capped = await
|
|
181078
|
+
const capped = await readCapped2(res, MAX_DOCUMENT_BYTES);
|
|
180792
181079
|
if (!capped) {
|
|
180793
181080
|
await route.abort();
|
|
180794
181081
|
return;
|
|
@@ -181198,7 +181485,7 @@ function projectDownloader(apiFetch, apiBase, token, extract = systemTar) {
|
|
|
181198
181485
|
if (!res.ok) {
|
|
181199
181486
|
throw new Error(res.status === 401 || res.status === 403 ? `refused (${res.status}) \u2014 the signed-in user cannot download this app's code (editor role needed)` : `project download failed: HTTP ${res.status}`);
|
|
181200
181487
|
}
|
|
181201
|
-
const bytes2 = await
|
|
181488
|
+
const bytes2 = await readCapped2(res, MAX_TARBALL_BYTES);
|
|
181202
181489
|
if (!bytes2) throw new Error(`project download is over the ${MAX_TARBALL_BYTES}-byte cap`);
|
|
181203
181490
|
const root = mkdtempSync10(join112(tmpdir11(), "himi-base44-"));
|
|
181204
181491
|
const cleanup = () => rmSync30(root, { recursive: true, force: true });
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/himalaya-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1511.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "himi — the Himalaya authoring CLI. Build a Tier-5 content package on your own machine, push it to the production serve as a draft, preview it on web + Himi Player, and read worker logs back — the remote dev loop. Wraps @himalaya/serve-cli for transport.",
|
|
6
6
|
"keywords": [
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"artifactId": "himalaya-cli"
|
|
72
72
|
}
|
|
73
73
|
},
|
|
74
|
-
"falconPackageHash": "
|
|
74
|
+
"falconPackageHash": "9fac87f0f65ca13a47bd43f127ab2dbed75f6b66f2f0745a4530c065"
|
|
75
75
|
}
|