@qwik.dev/core 2.0.0-beta.1 → 2.0.0-beta.10
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/bindings/qwik.darwin-arm64.node +0 -0
- package/bindings/qwik.darwin-x64.node +0 -0
- package/bindings/qwik.linux-x64-gnu.node +0 -0
- package/bindings/qwik.win32-x64-msvc.node +0 -0
- package/bindings/qwik_wasm_bg.wasm +0 -0
- package/dist/backpatch/index.cjs +6 -0
- package/dist/backpatch/index.d.ts +2 -0
- package/dist/backpatch/index.mjs +5 -0
- package/dist/backpatch/package.json +8 -0
- package/dist/backpatch-executor.debug.js +34 -0
- package/dist/backpatch-executor.js +1 -0
- package/dist/build/package.json +1 -1
- package/dist/cli.cjs +3031 -763
- package/dist/core-internal.d.ts +253 -78
- package/dist/core.cjs +1770 -957
- package/dist/core.cjs.map +1 -1
- package/dist/core.min.mjs +1 -1
- package/dist/core.mjs +1745 -955
- package/dist/core.mjs.map +1 -1
- package/dist/core.prod.cjs +1368 -949
- package/dist/core.prod.mjs +1435 -951
- package/dist/insights/vite/index.cjs +1 -1
- package/dist/insights/vite/index.mjs +10 -10
- package/dist/loader/index.cjs +2 -2
- package/dist/loader/index.mjs +2 -2
- package/dist/loader/package.json +1 -1
- package/dist/optimizer.cjs +201 -4016
- package/dist/optimizer.d.ts +12 -37
- package/dist/optimizer.mjs +2539 -3715
- package/dist/preloader.cjs +8 -11
- package/dist/preloader.mjs +8 -11
- package/dist/qwikloader.debug.js +1 -15
- package/dist/qwikloader.js +1 -1
- package/dist/server.cjs +309 -116
- package/dist/server.d.ts +17 -2
- package/dist/server.mjs +291 -103
- package/dist/starters/adapters/aws-lambda/adapters/aws-lambda/vite.config.mts +1 -1
- package/dist/starters/adapters/aws-lambda/package.json +1 -1
- package/dist/starters/adapters/aws-lambda/src/entry_aws-lambda.tsx +2 -6
- package/dist/starters/adapters/azure-swa/adapters/azure-swa/vite.config.mts +1 -1
- package/dist/starters/adapters/azure-swa/package.json +1 -1
- package/dist/starters/adapters/azure-swa/src/entry.azure-swa.tsx +2 -3
- package/dist/starters/adapters/bun/adapters/bun/vite.config.mts +2 -2
- package/dist/starters/adapters/bun/package.json +1 -1
- package/dist/starters/adapters/bun/src/entry.bun.ts +0 -2
- package/dist/starters/adapters/cloud-run/adapters/cloud-run/vite.config.mts +1 -1
- package/dist/starters/adapters/cloud-run/package.json +1 -1
- package/dist/starters/adapters/cloud-run/src/entry.cloud-run.tsx +1 -3
- package/dist/starters/adapters/cloudflare-pages/adapters/cloudflare-pages/vite.config.mts +1 -1
- package/dist/starters/adapters/cloudflare-pages/package.json +1 -1
- package/dist/starters/adapters/cloudflare-pages/src/entry.cloudflare-pages.tsx +2 -3
- package/dist/starters/adapters/deno/adapters/deno/vite.config.mts +1 -1
- package/dist/starters/adapters/deno/package.json +1 -1
- package/dist/starters/adapters/deno/src/entry.deno.ts +0 -2
- package/dist/starters/adapters/express/adapters/express/vite.config.mts +1 -1
- package/dist/starters/adapters/express/package.json +1 -1
- package/dist/starters/adapters/express/src/entry.express.tsx +1 -3
- package/dist/starters/adapters/fastify/adapters/fastify/vite.config.mts +1 -1
- package/dist/starters/adapters/fastify/package.json +1 -1
- package/dist/starters/adapters/fastify/src/entry.fastify.tsx +1 -1
- package/dist/starters/adapters/fastify/src/plugins/fastify-qwik.ts +1 -2
- package/dist/starters/adapters/firebase/adapters/firebase/vite.config.mts +1 -1
- package/dist/starters/adapters/firebase/package.json +1 -1
- package/dist/starters/adapters/firebase/src/entry-firebase.tsx +2 -3
- package/dist/starters/adapters/netlify-edge/adapters/netlify-edge/vite.config.mts +1 -1
- package/dist/starters/adapters/netlify-edge/package.json +1 -1
- package/dist/starters/adapters/netlify-edge/src/entry.netlify-edge.tsx +2 -3
- package/dist/starters/adapters/node-server/adapters/node-server/vite.config.mts +1 -1
- package/dist/starters/adapters/node-server/package.json +1 -1
- package/dist/starters/adapters/node-server/src/entry.node-server.tsx +0 -2
- package/dist/starters/adapters/{static/adapters/static → ssg/adapters/ssg}/vite.config.mts +2 -2
- package/dist/starters/adapters/ssg/package.json +19 -0
- package/dist/starters/adapters/vercel-edge/adapters/vercel-edge/vite.config.mts +1 -1
- package/dist/starters/adapters/vercel-edge/package.json +1 -1
- package/dist/starters/adapters/vercel-edge/src/entry.vercel-edge.tsx +2 -3
- package/dist/starters/adapters/vercel-edge/vercel.json +1 -1
- package/dist/starters/features/auth/package.json +1 -1
- package/dist/starters/features/csr/index.html +23 -0
- package/dist/starters/features/csr/package.json +29 -0
- package/dist/starters/features/csr/src/root.tsx +15 -0
- package/dist/starters/features/csr/vite.config.mts +13 -0
- package/dist/starters/features/localize/package.json +3 -3
- package/dist/starters/features/localize/src/entry.ssr.tsx +17 -21
- package/dist/starters/features/pandacss/package.json +1 -1
- package/dist/starters/features/playwright/playwright-report/index.html +953 -911
- package/dist/starters/features/postcss/postcss.config.js +1 -1
- package/dist/starters/features/tailwind/package.json +2 -2
- package/dist/starters/features/tailwind/prettier.config.js +10 -0
- package/dist/starters/features/tailwind-v3/package.json +1 -1
- package/dist/starters/features/tailwind-v3/prettier.config.js +10 -0
- package/dist/testing/index.cjs +7556 -5229
- package/dist/testing/index.d.ts +972 -1
- package/dist/testing/index.mjs +7456 -5140
- package/dist/testing/package.json +1 -1
- package/package.json +16 -10
- package/public.d.ts +1 -0
- package/dist/starters/adapters/static/package.json +0 -19
- package/dist/starters/features/tailwind/.prettierrc.js +0 -3
- /package/dist/starters/adapters/{static → ssg}/README.md +0 -0
package/dist/server.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* @qwik.dev/core/server 2.0.0-beta.
|
|
3
|
+
* @qwik.dev/core/server 2.0.0-beta.10-dev+4669425
|
|
4
4
|
* Copyright QwikDev. All Rights Reserved.
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
6
|
* found in the LICENSE file at https://github.com/QwikDev/qwik/blob/main/LICENSE
|
|
@@ -20,6 +20,7 @@ import { setPlatform as setPlatform2 } from "@qwik.dev/core";
|
|
|
20
20
|
|
|
21
21
|
// packages/qwik/src/server/platform.ts
|
|
22
22
|
import { setPlatform } from "@qwik.dev/core";
|
|
23
|
+
import { isDev as isDev3 } from "@qwik.dev/core/build";
|
|
23
24
|
|
|
24
25
|
// packages/qwik/src/core/shared/utils/qdev.ts
|
|
25
26
|
var qDev = globalThis.qDev !== false;
|
|
@@ -80,15 +81,15 @@ var mapApp_findIndx = (array, key, start) => {
|
|
|
80
81
|
}
|
|
81
82
|
return bottom << 1 ^ -1;
|
|
82
83
|
};
|
|
83
|
-
var mapArray_set = (array, key, value, start) => {
|
|
84
|
+
var mapArray_set = (array, key, value, start, allowNullValue = false) => {
|
|
84
85
|
const indx = mapApp_findIndx(array, key, start);
|
|
85
86
|
if (indx >= 0) {
|
|
86
|
-
if (value == null) {
|
|
87
|
+
if (value == null && !allowNullValue) {
|
|
87
88
|
array.splice(indx, 2);
|
|
88
89
|
} else {
|
|
89
90
|
array[indx + 1] = value;
|
|
90
91
|
}
|
|
91
|
-
} else if (value != null) {
|
|
92
|
+
} else if (value != null || allowNullValue) {
|
|
92
93
|
array.splice(indx ^ -1, 0, key, value);
|
|
93
94
|
}
|
|
94
95
|
};
|
|
@@ -114,6 +115,17 @@ var mapArray_has = (array, key, start) => {
|
|
|
114
115
|
return mapApp_findIndx(array, key, start) >= 0;
|
|
115
116
|
};
|
|
116
117
|
|
|
118
|
+
// packages/qwik/src/core/shared/utils/types.ts
|
|
119
|
+
var isObject = (v) => {
|
|
120
|
+
return typeof v === "object" && v !== null;
|
|
121
|
+
};
|
|
122
|
+
var isArray = (v) => {
|
|
123
|
+
return Array.isArray(v);
|
|
124
|
+
};
|
|
125
|
+
var isString = (v) => {
|
|
126
|
+
return typeof v === "string";
|
|
127
|
+
};
|
|
128
|
+
|
|
117
129
|
// packages/qwik/src/core/shared/error/error.ts
|
|
118
130
|
var codeToText = (code, ...parts) => {
|
|
119
131
|
if (qDev) {
|
|
@@ -194,7 +206,7 @@ See https://qwik.dev/docs/components/tasks/#use-method-rules`,
|
|
|
194
206
|
if (parts.length) {
|
|
195
207
|
text = text.replaceAll(/{{(\d+)}}/g, (_, index) => {
|
|
196
208
|
let v = parts[index];
|
|
197
|
-
if (v &&
|
|
209
|
+
if (v && isObject(v) && v.constructor === Object) {
|
|
198
210
|
v = JSON.stringify(v).slice(0, 50);
|
|
199
211
|
}
|
|
200
212
|
return v;
|
|
@@ -279,6 +291,7 @@ var ELEMENT_KEY = "q:key";
|
|
|
279
291
|
var ELEMENT_PROPS = "q:props";
|
|
280
292
|
var ELEMENT_SEQ = "q:seq";
|
|
281
293
|
var ELEMENT_SEQ_IDX = "q:seqIdx";
|
|
294
|
+
var ELEMENT_BACKPATCH_DATA = "qwik/backpatch";
|
|
282
295
|
var NON_SERIALIZABLE_MARKER_PREFIX = ":";
|
|
283
296
|
var USE_ON_LOCAL = NON_SERIALIZABLE_MARKER_PREFIX + "on";
|
|
284
297
|
var USE_ON_LOCAL_SEQ_IDX = NON_SERIALIZABLE_MARKER_PREFIX + "onIdx";
|
|
@@ -314,14 +327,6 @@ function isPreventDefault(key) {
|
|
|
314
327
|
return key.startsWith("preventdefault:");
|
|
315
328
|
}
|
|
316
329
|
|
|
317
|
-
// packages/qwik/src/core/shared/utils/types.ts
|
|
318
|
-
var isArray = (v) => {
|
|
319
|
-
return Array.isArray(v);
|
|
320
|
-
};
|
|
321
|
-
var isString = (v) => {
|
|
322
|
-
return typeof v === "string";
|
|
323
|
-
};
|
|
324
|
-
|
|
325
330
|
// packages/qwik/src/core/shared/utils/unitless_number.ts
|
|
326
331
|
var unitlessNumbers = /* @__PURE__ */ new Set([
|
|
327
332
|
"animationIterationCount",
|
|
@@ -893,12 +898,9 @@ var trigger = () => {
|
|
|
893
898
|
const bundle = queue[0];
|
|
894
899
|
const inverseProbability = bundle.$inverseProbability$;
|
|
895
900
|
const probability = 1 - inverseProbability;
|
|
896
|
-
const allowedPreloads = graph ? (
|
|
897
|
-
//
|
|
898
|
-
|
|
899
|
-
) : (
|
|
900
|
-
// While the graph is not available, we limit to 2 preloads
|
|
901
|
-
2
|
|
901
|
+
const allowedPreloads = graph ? config.$maxIdlePreloads$ : (
|
|
902
|
+
// While the graph is not available, we limit to 5 preloads
|
|
903
|
+
5
|
|
902
904
|
);
|
|
903
905
|
if (probability >= 0.99 || preloadCount < allowedPreloads) {
|
|
904
906
|
queue.shift();
|
|
@@ -954,7 +956,7 @@ var adjustProbabilities = (bundle, newInverseProbability, seen) => {
|
|
|
954
956
|
}
|
|
955
957
|
if (
|
|
956
958
|
// don't queue until we have initialized the preloader
|
|
957
|
-
base != null && bundle.$state$ < BundleImportState_Preload
|
|
959
|
+
base != null && bundle.$state$ < BundleImportState_Preload
|
|
958
960
|
) {
|
|
959
961
|
if (bundle.$state$ === BundleImportState_None) {
|
|
960
962
|
bundle.$state$ = BundleImportState_Queued;
|
|
@@ -973,7 +975,7 @@ var adjustProbabilities = (bundle, newInverseProbability, seen) => {
|
|
|
973
975
|
continue;
|
|
974
976
|
}
|
|
975
977
|
let newInverseProbability2;
|
|
976
|
-
if (
|
|
978
|
+
if (probability === 1 || probability >= 0.99 && depsCount < 100) {
|
|
977
979
|
depsCount++;
|
|
978
980
|
newInverseProbability2 = Math.min(0.01, 1 - dep.$importProbability$);
|
|
979
981
|
} else {
|
|
@@ -1027,12 +1029,30 @@ if (isBrowser3) {
|
|
|
1027
1029
|
}
|
|
1028
1030
|
|
|
1029
1031
|
// packages/qwik/src/server/platform.ts
|
|
1032
|
+
var getDevSegmentPath = (mapper, hash2, symbolName, parent) => {
|
|
1033
|
+
const existing = mapper?.[hash2];
|
|
1034
|
+
if (existing) {
|
|
1035
|
+
return existing;
|
|
1036
|
+
}
|
|
1037
|
+
if (symbolName === SYNC_QRL) {
|
|
1038
|
+
return [symbolName, ""];
|
|
1039
|
+
}
|
|
1040
|
+
if (!parent) {
|
|
1041
|
+
if (symbolName.startsWith("_") && symbolName.length < 6) {
|
|
1042
|
+
return [symbolName, `${import.meta.env.BASE_URL}@qwik-handlers`];
|
|
1043
|
+
}
|
|
1044
|
+
console.error("qwik symbolMapper: unknown qrl requested without parent:", symbolName);
|
|
1045
|
+
return [symbolName, `${import.meta.env.BASE_URL}${symbolName}.js`];
|
|
1046
|
+
}
|
|
1047
|
+
const qrlFile = `${import.meta.env.BASE_URL}${parent.startsWith("/") ? parent.slice(1) : parent}_${symbolName}.js`;
|
|
1048
|
+
return [symbolName, qrlFile];
|
|
1049
|
+
};
|
|
1030
1050
|
function createPlatform(opts, resolvedManifest) {
|
|
1031
1051
|
const mapper = resolvedManifest?.mapper;
|
|
1032
1052
|
const mapperFn = opts.symbolMapper ? opts.symbolMapper : (symbolName, _chunk, parent) => {
|
|
1033
|
-
if (mapper) {
|
|
1053
|
+
if (mapper || isDev3 && import.meta.env.MODE !== "test") {
|
|
1034
1054
|
const hash2 = getSymbolHash(symbolName);
|
|
1035
|
-
const result = mapper[hash2];
|
|
1055
|
+
const result = !isDev3 ? mapper[hash2] : getDevSegmentPath(mapper, hash2, symbolName, parent);
|
|
1036
1056
|
if (!result) {
|
|
1037
1057
|
if (hash2 === SYNC_QRL) {
|
|
1038
1058
|
return [hash2, ""];
|
|
@@ -1041,9 +1061,6 @@ function createPlatform(opts, resolvedManifest) {
|
|
|
1041
1061
|
if (isRegistered) {
|
|
1042
1062
|
return [symbolName, "_"];
|
|
1043
1063
|
}
|
|
1044
|
-
if (parent) {
|
|
1045
|
-
return [symbolName, `${parent}?qrl=${symbolName}`];
|
|
1046
|
-
}
|
|
1047
1064
|
console.error("Cannot resolve symbol", symbolName, "in", mapper, parent);
|
|
1048
1065
|
}
|
|
1049
1066
|
return result;
|
|
@@ -1071,13 +1088,6 @@ function createPlatform(opts, resolvedManifest) {
|
|
|
1071
1088
|
console.error("server can not rerender");
|
|
1072
1089
|
return Promise.resolve();
|
|
1073
1090
|
},
|
|
1074
|
-
nextTick: (fn) => {
|
|
1075
|
-
return new Promise((resolve) => {
|
|
1076
|
-
setTimeout(() => {
|
|
1077
|
-
resolve(fn());
|
|
1078
|
-
});
|
|
1079
|
-
});
|
|
1080
|
-
},
|
|
1081
1091
|
chunkForSymbol(symbolName, _chunk, parent) {
|
|
1082
1092
|
return mapperFn(symbolName, mapper, parent);
|
|
1083
1093
|
}
|
|
@@ -1122,7 +1132,7 @@ function getBuildBase(opts) {
|
|
|
1122
1132
|
return `${import.meta.env.BASE_URL || "/"}build/`;
|
|
1123
1133
|
}
|
|
1124
1134
|
var versions = {
|
|
1125
|
-
qwik: "2.0.0-beta.
|
|
1135
|
+
qwik: "2.0.0-beta.10-dev+4669425",
|
|
1126
1136
|
qwikDom: "2.1.19"
|
|
1127
1137
|
};
|
|
1128
1138
|
|
|
@@ -1135,11 +1145,46 @@ import {
|
|
|
1135
1145
|
_walkJSX,
|
|
1136
1146
|
isSignal
|
|
1137
1147
|
} from "@qwik.dev/core";
|
|
1138
|
-
import { isDev as
|
|
1148
|
+
import { isDev as isDev5 } from "@qwik.dev/core/build";
|
|
1139
1149
|
|
|
1140
1150
|
// packages/qwik/src/server/scripts.ts
|
|
1141
|
-
var QWIK_LOADER_DEFAULT_MINIFIED = 'const t=document,e=window,n=new Set,o=new Set([t]);let r;const s=(t,e)=>Array.from(t.querySelectorAll(e)),
|
|
1142
|
-
var QWIK_LOADER_DEFAULT_DEBUG = 'const doc = document;\nconst win = window;\nconst events = /* @__PURE__ */ new Set();\nconst roots = /* @__PURE__ */ new Set([doc]);\nlet hasInitialized;\nconst nativeQuerySelectorAll = (root, selector) => Array.from(root.querySelectorAll(selector));\nconst querySelectorAll = (query) => {\n const elements = [];\n roots.forEach((root) => elements.push(...nativeQuerySelectorAll(root, query)));\n return elements;\n};\nconst findShadowRoots = (fragment) => {\n processEventOrNode(fragment);\n nativeQuerySelectorAll(fragment, "[q\\\\:shadowroot]").forEach((parent) => {\n const shadowRoot = parent.shadowRoot;\n shadowRoot && findShadowRoots(shadowRoot);\n });\n};\nconst isPromise = (promise) => promise && typeof promise.then === "function";\
|
|
1151
|
+
var QWIK_LOADER_DEFAULT_MINIFIED = 'const t=document,e=window,n=new Set,o=new Set([t]);let r;const s=(t,e)=>Array.from(t.querySelectorAll(e)),a=t=>{const e=[];return o.forEach(n=>e.push(...s(n,t))),e},i=t=>{m(t),s(t,"[q\\\\:shadowroot]").forEach(t=>{const e=t.shadowRoot;e&&i(e)})},c=t=>t&&"function"==typeof t.then,l=(t,e,n=e.type)=>{a("[on"+t+"\\\\:"+n+"]").forEach(o=>{u(o,t,e,n)})},f=e=>{if(void 0===e._qwikjson_){let n=(e===t.documentElement?t.body:e).lastElementChild;for(;n;){if("SCRIPT"===n.tagName&&"qwik/json"===n.getAttribute("type")){e._qwikjson_=JSON.parse(n.textContent.replace(/\\\\x3C(\\/?script)/gi,"<$1"));break}n=n.previousElementSibling}}},p=(t,e)=>new CustomEvent(t,{detail:e}),u=async(e,n,o,r=o.type)=>{const s="on"+n+":"+r;e.hasAttribute("preventdefault:"+r)&&o.preventDefault(),e.hasAttribute("stoppropagation:"+r)&&o.stopPropagation();const a=e._qc_,i=a&&a.li.filter(t=>t[0]===s);if(i&&i.length>0){for(const t of i){const n=t[1].getFn([e,o],()=>e.isConnected)(o,e),r=o.cancelBubble;c(n)&&await n,r&&o.stopPropagation()}return}const l=e.getAttribute(s),p=e.qDispatchEvent;if(p)return p(o,n);if(l){const n=e.closest("[q\\\\:container]:not([q\\\\:container=html]):not([q\\\\:container=text])"),r=n.getAttribute("q:base"),s=n.getAttribute("q:version")||"unknown",a=n.getAttribute("q:manifest-hash")||"dev",i=new URL(r,t.baseURI);for(const p of l.split("\\n")){const l=new URL(p,i),u=l.href,q=l.hash.replace(/^#?([^?[|]*).*$/,"$1")||"default",h=performance.now();let _,d,y;const m=p.startsWith("#"),w={qBase:r,qManifest:a,qVersion:s,href:u,symbol:q,element:e,reqTime:h};if(m){const e=n.getAttribute("q:instance");_=(t["qFuncs_"+e]||[])[Number.parseInt(q)],_||(d="sync",y=Error("sym:"+q))}else{b("qsymbol",w);const t=l.href.split("#")[0];try{const e=import(t);f(n),_=(await e)[q],_||(d="no-symbol",y=Error(`${q} not in ${t}`))}catch(t){d||(d="async"),y=t}}if(!_){b("qerror",{importError:d,error:y,...w}),console.error(y);break}const g=t.__q_context__;if(e.isConnected)try{t.__q_context__=[e,o,l];const n=_(o,e);c(n)&&await n}catch(t){b("qerror",{error:t,...w})}finally{t.__q_context__=g}}}},b=(e,n)=>{t.dispatchEvent(p(e,n))},q=t=>t.replace(/([A-Z])/g,t=>"-"+t.toLowerCase()),h=async t=>{let e=q(t.type),n=t.target;for(l("-document",t,e);n&&n.getAttribute;){const o=u(n,"",t,e);let r=t.cancelBubble;c(o)&&await o,r||(r=r||t.cancelBubble||n.hasAttribute("stoppropagation:"+t.type)),n=t.bubbles&&!0!==r?n.parentElement:null}},_=t=>{l("-window",t,q(t.type))},d=()=>{const s=t.readyState;if(!r&&("interactive"==s||"complete"==s)&&(o.forEach(i),r=1,b("qinit"),(e.requestIdleCallback??e.setTimeout).bind(e)(()=>b("qidle")),n.has("qvisible"))){const t=a("[on\\\\:qvisible]"),e=new IntersectionObserver(t=>{for(const n of t)n.isIntersecting&&(e.unobserve(n.target),u(n.target,"",p("qvisible",n)))});t.forEach(t=>e.observe(t))}},y=(t,e,n,o=!1)=>{t.addEventListener(e,n,{capture:o,passive:!1})},m=(...t)=>{for(const r of t)"string"==typeof r?n.has(r)||(o.forEach(t=>y(t,r,h,!0)),y(e,r,_,!0),n.add(r)):o.has(r)||(n.forEach(t=>y(r,t,h,!0)),o.add(r))};if(!("__q_context__"in t)){t.__q_context__=0;const r=e.qwikevents;r&&(Array.isArray(r)?m(...r):m("click","input")),e.qwikevents={events:n,roots:o,push:m},y(t,"readystatechange",d),d()}';
|
|
1152
|
+
var QWIK_LOADER_DEFAULT_DEBUG = 'const doc = document;\nconst win = window;\nconst events = /* @__PURE__ */ new Set();\nconst roots = /* @__PURE__ */ new Set([doc]);\nlet hasInitialized;\nconst nativeQuerySelectorAll = (root, selector) => Array.from(root.querySelectorAll(selector));\nconst querySelectorAll = (query) => {\n const elements = [];\n roots.forEach((root) => elements.push(...nativeQuerySelectorAll(root, query)));\n return elements;\n};\nconst findShadowRoots = (fragment) => {\n processEventOrNode(fragment);\n nativeQuerySelectorAll(fragment, "[q\\\\:shadowroot]").forEach((parent) => {\n const shadowRoot = parent.shadowRoot;\n shadowRoot && findShadowRoots(shadowRoot);\n });\n};\nconst isPromise = (promise) => promise && typeof promise.then === "function";\nconst broadcast = (infix, ev, type = ev.type) => {\n querySelectorAll("[on" + infix + "\\\\:" + type + "]").forEach((el) => {\n dispatch(el, infix, ev, type);\n });\n};\nconst resolveContainer = (containerEl) => {\n if (containerEl._qwikjson_ === void 0) {\n const parentJSON = containerEl === doc.documentElement ? doc.body : containerEl;\n let script = parentJSON.lastElementChild;\n while (script) {\n if (script.tagName === "SCRIPT" && script.getAttribute("type") === "qwik/json") {\n containerEl._qwikjson_ = JSON.parse(\n script.textContent.replace(/\\\\x3C(\\/?script)/gi, "<$1")\n );\n break;\n }\n script = script.previousElementSibling;\n }\n }\n};\nconst createEvent = (eventName, detail) => new CustomEvent(eventName, {\n detail\n});\nconst dispatch = async (element, scope, ev, eventName = ev.type) => {\n const attrName = "on" + scope + ":" + eventName;\n if (element.hasAttribute("preventdefault:" + eventName)) {\n ev.preventDefault();\n }\n if (element.hasAttribute("stoppropagation:" + eventName)) {\n ev.stopPropagation();\n }\n const ctx = element._qc_;\n const relevantListeners = ctx && ctx.li.filter((li) => li[0] === attrName);\n if (relevantListeners && relevantListeners.length > 0) {\n for (const listener of relevantListeners) {\n const results = listener[1].getFn([element, ev], () => element.isConnected)(ev, element);\n const cancelBubble = ev.cancelBubble;\n if (isPromise(results)) {\n await results;\n }\n if (cancelBubble) {\n ev.stopPropagation();\n }\n }\n return;\n }\n const attrValue = element.getAttribute(attrName);\n const qDispatchEvent = element.qDispatchEvent;\n if (qDispatchEvent) {\n return qDispatchEvent(ev, scope);\n }\n if (attrValue) {\n const container = element.closest(\n "[q\\\\:container]:not([q\\\\:container=html]):not([q\\\\:container=text])"\n );\n const qBase = container.getAttribute("q:base");\n const qVersion = container.getAttribute("q:version") || "unknown";\n const qManifest = container.getAttribute("q:manifest-hash") || "dev";\n const base = new URL(qBase, doc.baseURI);\n for (const qrl of attrValue.split("\\n")) {\n const url = new URL(qrl, base);\n const href = url.href;\n const symbol = url.hash.replace(/^#?([^?[|]*).*$/, "$1") || "default";\n const reqTime = performance.now();\n let handler;\n let importError;\n let error;\n const isSync = qrl.startsWith("#");\n const eventData = {\n qBase,\n qManifest,\n qVersion,\n href,\n symbol,\n element,\n reqTime\n };\n if (isSync) {\n const hash = container.getAttribute("q:instance");\n handler = (doc["qFuncs_" + hash] || [])[Number.parseInt(symbol)];\n if (!handler) {\n importError = "sync";\n error = new Error("sym:" + symbol);\n }\n } else {\n emitEvent("qsymbol", eventData);\n const uri = url.href.split("#")[0];\n try {\n const module = import(\n uri\n );\n resolveContainer(container);\n handler = (await module)[symbol];\n if (!handler) {\n importError = "no-symbol";\n error = new Error(`${symbol} not in ${uri}`);\n }\n } catch (err) {\n importError || (importError = "async");\n error = err;\n }\n }\n if (!handler) {\n emitEvent("qerror", {\n importError,\n error,\n ...eventData\n });\n console.error(error);\n break;\n }\n const previousCtx = doc.__q_context__;\n if (element.isConnected) {\n try {\n doc.__q_context__ = [element, ev, url];\n const results = handler(ev, element);\n if (isPromise(results)) {\n await results;\n }\n } catch (error2) {\n emitEvent("qerror", { error: error2, ...eventData });\n } finally {\n doc.__q_context__ = previousCtx;\n }\n }\n }\n }\n};\nconst emitEvent = (eventName, detail) => {\n doc.dispatchEvent(createEvent(eventName, detail));\n};\nconst camelToKebab = (str) => str.replace(/([A-Z])/g, (a) => "-" + a.toLowerCase());\nconst processDocumentEvent = async (ev) => {\n let type = camelToKebab(ev.type);\n let element = ev.target;\n broadcast("-document", ev, type);\n while (element && element.getAttribute) {\n const results = dispatch(element, "", ev, type);\n let cancelBubble = ev.cancelBubble;\n if (isPromise(results)) {\n await results;\n }\n cancelBubble || (cancelBubble = cancelBubble || ev.cancelBubble || element.hasAttribute("stoppropagation:" + ev.type));\n element = ev.bubbles && cancelBubble !== true ? element.parentElement : null;\n }\n};\nconst processWindowEvent = (ev) => {\n broadcast("-window", ev, camelToKebab(ev.type));\n};\nconst processReadyStateChange = () => {\n const readyState = doc.readyState;\n if (!hasInitialized && (readyState == "interactive" || readyState == "complete")) {\n roots.forEach(findShadowRoots);\n hasInitialized = 1;\n emitEvent("qinit");\n const riC = win.requestIdleCallback ?? win.setTimeout;\n riC.bind(win)(() => emitEvent("qidle"));\n if (events.has("qvisible")) {\n const results = querySelectorAll("[on\\\\:qvisible]");\n const observer = new IntersectionObserver((entries) => {\n for (const entry of entries) {\n if (entry.isIntersecting) {\n observer.unobserve(entry.target);\n dispatch(entry.target, "", createEvent("qvisible", entry));\n }\n }\n });\n results.forEach((el) => observer.observe(el));\n }\n }\n};\nconst addEventListener = (el, eventName, handler, capture = false) => {\n el.addEventListener(eventName, handler, { capture, passive: false });\n};\nconst processEventOrNode = (...eventNames) => {\n for (const eventNameOrNode of eventNames) {\n if (typeof eventNameOrNode === "string") {\n if (!events.has(eventNameOrNode)) {\n roots.forEach(\n (root) => addEventListener(root, eventNameOrNode, processDocumentEvent, true)\n );\n addEventListener(win, eventNameOrNode, processWindowEvent, true);\n events.add(eventNameOrNode);\n }\n } else {\n if (!roots.has(eventNameOrNode)) {\n events.forEach(\n (eventName) => addEventListener(eventNameOrNode, eventName, processDocumentEvent, true)\n );\n roots.add(eventNameOrNode);\n }\n }\n }\n};\nif (!("__q_context__" in doc)) {\n doc.__q_context__ = 0;\n const qwikevents = win.qwikevents;\n if (qwikevents) {\n if (Array.isArray(qwikevents)) {\n processEventOrNode(...qwikevents);\n } else {\n processEventOrNode("click", "input");\n }\n }\n win.qwikevents = {\n events,\n roots,\n push: processEventOrNode\n };\n addEventListener(doc, "readystatechange", processReadyStateChange);\n processReadyStateChange();\n}';
|
|
1153
|
+
var QWIK_BACKPATCH_EXECUTOR_MINIFIED = `const t='script[type="qwik/backpatch"]',e=document.currentScript;if(e){const o=e.closest("[q\\\\:container]:not([q\\\\:container=html]):not([q\\\\:container=text])");if(o){const e=o.querySelector(t);if(e){const t=JSON.parse(e.textContent||"[]"),n=document.createTreeWalker(o,NodeFilter.SHOW_ELEMENT);let r=n.currentNode,c=0;for(let e=0;e<t.length;e+=3){const o=t[e],i=t[e+1];let l=t[e+2];for(;c<o;)r=n.nextNode(),c++;const s=r;null==l||!1===l?s.removeAttribute(i):("boolean"==typeof l&&(l=""),s.setAttribute(i,l))}}}}`;
|
|
1154
|
+
var QWIK_BACKPATCH_EXECUTOR_DEBUG = `const BACKPATCH_DATA_SELECTOR = 'script[type="qwik/backpatch"]';
|
|
1155
|
+
const executorScript = document.currentScript;
|
|
1156
|
+
if (executorScript) {
|
|
1157
|
+
const container = executorScript.closest(
|
|
1158
|
+
"[q\\\\:container]:not([q\\\\:container=html]):not([q\\\\:container=text])"
|
|
1159
|
+
);
|
|
1160
|
+
if (container) {
|
|
1161
|
+
const script = container.querySelector(BACKPATCH_DATA_SELECTOR);
|
|
1162
|
+
if (script) {
|
|
1163
|
+
const data = JSON.parse(script.textContent || "[]");
|
|
1164
|
+
const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT);
|
|
1165
|
+
let currentNode = walker.currentNode;
|
|
1166
|
+
let currentNodeIdx = 0;
|
|
1167
|
+
for (let i = 0; i < data.length; i += 3) {
|
|
1168
|
+
const elementIdx = data[i];
|
|
1169
|
+
const attrName = data[i + 1];
|
|
1170
|
+
let value = data[i + 2];
|
|
1171
|
+
while (currentNodeIdx < elementIdx) {
|
|
1172
|
+
currentNode = walker.nextNode();
|
|
1173
|
+
currentNodeIdx++;
|
|
1174
|
+
}
|
|
1175
|
+
const element = currentNode;
|
|
1176
|
+
if (value == null || value === false) {
|
|
1177
|
+
element.removeAttribute(attrName);
|
|
1178
|
+
} else {
|
|
1179
|
+
if (typeof value === "boolean") {
|
|
1180
|
+
value = "";
|
|
1181
|
+
}
|
|
1182
|
+
element.setAttribute(attrName, value);
|
|
1183
|
+
}
|
|
1184
|
+
}
|
|
1185
|
+
}
|
|
1186
|
+
}
|
|
1187
|
+
}`;
|
|
1143
1188
|
function getQwikLoaderScript(opts = {}) {
|
|
1144
1189
|
return opts.debug ? QWIK_LOADER_DEFAULT_DEBUG : QWIK_LOADER_DEFAULT_MINIFIED;
|
|
1145
1190
|
}
|
|
@@ -1148,6 +1193,9 @@ var QWIK_PREFETCH_DEBUG = globalThis.QWIK_PREFETCH_DEBUG;
|
|
|
1148
1193
|
function getQwikPrefetchWorkerScript(opts = {}) {
|
|
1149
1194
|
return opts.debug ? QWIK_PREFETCH_DEBUG : QWIK_PREFETCH_MINIFIED;
|
|
1150
1195
|
}
|
|
1196
|
+
function getQwikBackpatchExecutorScript(opts = {}) {
|
|
1197
|
+
return opts.debug ? QWIK_BACKPATCH_EXECUTOR_DEBUG : QWIK_BACKPATCH_EXECUTOR_MINIFIED;
|
|
1198
|
+
}
|
|
1151
1199
|
|
|
1152
1200
|
// packages/qwik/src/server/ssr-node.ts
|
|
1153
1201
|
import {
|
|
@@ -1155,12 +1203,14 @@ import {
|
|
|
1155
1203
|
_EMPTY_ARRAY,
|
|
1156
1204
|
_EFFECT_BACK_REF
|
|
1157
1205
|
} from "@qwik.dev/core";
|
|
1158
|
-
import { isDev as
|
|
1206
|
+
import { isDev as isDev4 } from "@qwik.dev/core/build";
|
|
1159
1207
|
var SsrNode = class {
|
|
1160
|
-
constructor(
|
|
1161
|
-
this.
|
|
1208
|
+
constructor(parentComponent, id, attributesIndex, cleanupQueue, vnodeData, currentFile) {
|
|
1209
|
+
this.parentComponent = parentComponent;
|
|
1210
|
+
this.attributesIndex = attributesIndex;
|
|
1162
1211
|
this.cleanupQueue = cleanupQueue;
|
|
1163
1212
|
this.vnodeData = vnodeData;
|
|
1213
|
+
this.currentFile = currentFile;
|
|
1164
1214
|
__publicField(this, "__brand__", "SsrNode");
|
|
1165
1215
|
/**
|
|
1166
1216
|
* ID which the deserialize will use to retrieve the node.
|
|
@@ -1168,14 +1218,16 @@ var SsrNode = class {
|
|
|
1168
1218
|
* @param id - Unique id for the node.
|
|
1169
1219
|
*/
|
|
1170
1220
|
__publicField(this, "id");
|
|
1171
|
-
__publicField(this, "
|
|
1221
|
+
__publicField(this, "flags");
|
|
1172
1222
|
__publicField(this, "children", null);
|
|
1223
|
+
__publicField(this, "attrs");
|
|
1173
1224
|
/** Local props which don't serialize; */
|
|
1174
1225
|
__publicField(this, "localProps", null);
|
|
1175
|
-
this.parentSsrNode = parentSsrNode;
|
|
1176
|
-
this.parentSsrNode?.addChild(this);
|
|
1177
1226
|
this.id = id;
|
|
1178
|
-
|
|
1227
|
+
this.flags = 1 /* Updatable */;
|
|
1228
|
+
this.attrs = this.attributesIndex >= 0 ? this.vnodeData[this.attributesIndex] : _EMPTY_ARRAY;
|
|
1229
|
+
this.parentComponent?.addChild(this);
|
|
1230
|
+
if (isDev4 && id.indexOf("undefined") != -1) {
|
|
1179
1231
|
throw new Error(`Invalid SSR node id: ${id}`);
|
|
1180
1232
|
}
|
|
1181
1233
|
}
|
|
@@ -1184,7 +1236,7 @@ var SsrNode = class {
|
|
|
1184
1236
|
}
|
|
1185
1237
|
setProp(name, value) {
|
|
1186
1238
|
if (this.attrs === _EMPTY_ARRAY) {
|
|
1187
|
-
this.
|
|
1239
|
+
this.setEmptyArrayAsVNodeDataAttributes();
|
|
1188
1240
|
}
|
|
1189
1241
|
if (name.startsWith(NON_SERIALIZABLE_MARKER_PREFIX)) {
|
|
1190
1242
|
mapArray_set(this.localProps || (this.localProps = []), name, value, 0);
|
|
@@ -1195,6 +1247,17 @@ var SsrNode = class {
|
|
|
1195
1247
|
this.cleanupQueue.push(value);
|
|
1196
1248
|
}
|
|
1197
1249
|
}
|
|
1250
|
+
setEmptyArrayAsVNodeDataAttributes() {
|
|
1251
|
+
if (this.attributesIndex >= 0) {
|
|
1252
|
+
this.vnodeData[this.attributesIndex] = [];
|
|
1253
|
+
this.attrs = this.vnodeData[this.attributesIndex];
|
|
1254
|
+
} else {
|
|
1255
|
+
const newAttributesIndex = this.vnodeData.length > 1 ? 1 : 0;
|
|
1256
|
+
this.vnodeData.splice(newAttributesIndex, 0, []);
|
|
1257
|
+
this.attributesIndex = newAttributesIndex;
|
|
1258
|
+
this.attrs = this.vnodeData[this.attributesIndex];
|
|
1259
|
+
}
|
|
1260
|
+
}
|
|
1198
1261
|
getProp(name) {
|
|
1199
1262
|
if (name.startsWith(NON_SERIALIZABLE_MARKER_PREFIX)) {
|
|
1200
1263
|
return this.localProps ? mapArray_get(this.localProps, name, 0) : null;
|
|
@@ -1217,18 +1280,30 @@ var SsrNode = class {
|
|
|
1217
1280
|
}
|
|
1218
1281
|
this.children.push(child);
|
|
1219
1282
|
}
|
|
1283
|
+
setTreeNonUpdatable() {
|
|
1284
|
+
this.flags &= ~1 /* Updatable */;
|
|
1285
|
+
if (this.children) {
|
|
1286
|
+
for (const child of this.children) {
|
|
1287
|
+
child.setTreeNonUpdatable();
|
|
1288
|
+
}
|
|
1289
|
+
}
|
|
1290
|
+
}
|
|
1220
1291
|
toString() {
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1292
|
+
if (isDev4) {
|
|
1293
|
+
let stringifiedAttrs = "";
|
|
1294
|
+
for (let i = 0; i < this.attrs.length; i += 2) {
|
|
1295
|
+
const key = this.attrs[i];
|
|
1296
|
+
const value = this.attrs[i + 1];
|
|
1297
|
+
stringifiedAttrs += `${key}=`;
|
|
1298
|
+
stringifiedAttrs += `${typeof value === "string" || typeof value === "number" ? JSON.stringify(value) : "*"}`;
|
|
1299
|
+
if (i < this.attrs.length - 2) {
|
|
1300
|
+
stringifiedAttrs += ", ";
|
|
1301
|
+
}
|
|
1229
1302
|
}
|
|
1303
|
+
return `<SSRNode id="${this.id}" ${stringifiedAttrs} />`;
|
|
1304
|
+
} else {
|
|
1305
|
+
return `<SSRNode id="${this.id}" />`;
|
|
1230
1306
|
}
|
|
1231
|
-
return `SSRNode [<${this.id}> ${stringifiedAttrs}]`;
|
|
1232
1307
|
}
|
|
1233
1308
|
};
|
|
1234
1309
|
var DomRef = class {
|
|
@@ -1339,6 +1414,10 @@ var allowedContent = (state) => {
|
|
|
1339
1414
|
case 514 /* PHRASING_INSIDE_INPUT */:
|
|
1340
1415
|
case 1026 /* PHRASING_CONTAINER */:
|
|
1341
1416
|
return ["phrasing content", "<a>, <b>, <img>, <input> ... (no <div>, <p> ...)"];
|
|
1417
|
+
case 2050 /* PICTURE */:
|
|
1418
|
+
return ["picture content", "<source>, <img>"];
|
|
1419
|
+
case 4098 /* BUTTON */:
|
|
1420
|
+
return ["button content", "phrasing content except interactive elements"];
|
|
1342
1421
|
case 1 /* DOCUMENT */:
|
|
1343
1422
|
return ["document", "<html>"];
|
|
1344
1423
|
}
|
|
@@ -1380,6 +1459,10 @@ function isTagAllowed(state, tag) {
|
|
|
1380
1459
|
return isInPhrasing(tag, true);
|
|
1381
1460
|
case 514 /* PHRASING_INSIDE_INPUT */:
|
|
1382
1461
|
return isInPhrasing(tag, false);
|
|
1462
|
+
case 2050 /* PICTURE */:
|
|
1463
|
+
return isInPicture(tag);
|
|
1464
|
+
case 4098 /* BUTTON */:
|
|
1465
|
+
return isInButton(tag);
|
|
1383
1466
|
case 1 /* DOCUMENT */:
|
|
1384
1467
|
if (tag === "html") {
|
|
1385
1468
|
return 32 /* HTML */;
|
|
@@ -1459,9 +1542,12 @@ function isInAnything(text) {
|
|
|
1459
1542
|
case "body":
|
|
1460
1543
|
return 0 /* NOT_ALLOWED */;
|
|
1461
1544
|
case "button":
|
|
1545
|
+
return 4098 /* BUTTON */;
|
|
1462
1546
|
case "input":
|
|
1463
1547
|
case "textarea":
|
|
1464
1548
|
return 514 /* PHRASING_INSIDE_INPUT */;
|
|
1549
|
+
case "picture":
|
|
1550
|
+
return 2050 /* PICTURE */;
|
|
1465
1551
|
default:
|
|
1466
1552
|
return 10 /* ANYTHING */;
|
|
1467
1553
|
}
|
|
@@ -1505,12 +1591,35 @@ function isInTableColGroup(text) {
|
|
|
1505
1591
|
return 0 /* NOT_ALLOWED */;
|
|
1506
1592
|
}
|
|
1507
1593
|
}
|
|
1594
|
+
function isInPicture(text) {
|
|
1595
|
+
switch (text) {
|
|
1596
|
+
case "source":
|
|
1597
|
+
return 4 /* EMPTY */;
|
|
1598
|
+
case "img":
|
|
1599
|
+
return 4 /* EMPTY */;
|
|
1600
|
+
default:
|
|
1601
|
+
return 0 /* NOT_ALLOWED */;
|
|
1602
|
+
}
|
|
1603
|
+
}
|
|
1604
|
+
function isInButton(text) {
|
|
1605
|
+
switch (text) {
|
|
1606
|
+
case "button":
|
|
1607
|
+
case "input":
|
|
1608
|
+
case "textarea":
|
|
1609
|
+
case "select":
|
|
1610
|
+
case "a":
|
|
1611
|
+
return 0 /* NOT_ALLOWED */;
|
|
1612
|
+
case "picture":
|
|
1613
|
+
return 2050 /* PICTURE */;
|
|
1614
|
+
default:
|
|
1615
|
+
return isInPhrasing(text, false);
|
|
1616
|
+
}
|
|
1617
|
+
}
|
|
1508
1618
|
function isInPhrasing(text, allowInput) {
|
|
1509
1619
|
switch (text) {
|
|
1510
1620
|
case "svg":
|
|
1511
1621
|
case "math":
|
|
1512
1622
|
return 1026 /* PHRASING_CONTAINER */;
|
|
1513
|
-
case "button":
|
|
1514
1623
|
case "input":
|
|
1515
1624
|
case "textarea":
|
|
1516
1625
|
return allowInput ? 514 /* PHRASING_INSIDE_INPUT */ : 0 /* NOT_ALLOWED */;
|
|
@@ -1522,6 +1631,7 @@ function isInPhrasing(text, allowInput) {
|
|
|
1522
1631
|
case "bdi":
|
|
1523
1632
|
case "bdo":
|
|
1524
1633
|
case "br":
|
|
1634
|
+
case "button":
|
|
1525
1635
|
case "canvas":
|
|
1526
1636
|
case "cite":
|
|
1527
1637
|
case "code":
|
|
@@ -1549,7 +1659,6 @@ function isInPhrasing(text, allowInput) {
|
|
|
1549
1659
|
case "object":
|
|
1550
1660
|
case "option":
|
|
1551
1661
|
case "output":
|
|
1552
|
-
case "picture":
|
|
1553
1662
|
case "progress":
|
|
1554
1663
|
case "q":
|
|
1555
1664
|
case "ruby":
|
|
@@ -1572,13 +1681,14 @@ function isInPhrasing(text, allowInput) {
|
|
|
1572
1681
|
return allowInput ? 258 /* PHRASING_ANY */ : 514 /* PHRASING_INSIDE_INPUT */;
|
|
1573
1682
|
case "style":
|
|
1574
1683
|
return 2 /* TEXT */;
|
|
1684
|
+
case "picture":
|
|
1685
|
+
return 2050 /* PICTURE */;
|
|
1575
1686
|
default:
|
|
1576
1687
|
return 0 /* NOT_ALLOWED */;
|
|
1577
1688
|
}
|
|
1578
1689
|
}
|
|
1579
1690
|
|
|
1580
1691
|
// packages/qwik/src/server/vnode-data.ts
|
|
1581
|
-
import { _EMPTY_ARRAY as _EMPTY_ARRAY2 } from "@qwik.dev/core";
|
|
1582
1692
|
var OPEN_FRAGMENT = Number.MAX_SAFE_INTEGER;
|
|
1583
1693
|
var CLOSE_FRAGMENT = Number.MAX_SAFE_INTEGER - 1;
|
|
1584
1694
|
var WRITE_ELEMENT_ATTRS = Number.MAX_SAFE_INTEGER - 2;
|
|
@@ -1613,14 +1723,14 @@ function vNodeData_openElement(vNodeData) {
|
|
|
1613
1723
|
vNodeData.push([], WRITE_ELEMENT_ATTRS);
|
|
1614
1724
|
vNodeData[0] |= 4 /* ELEMENT_NODE */;
|
|
1615
1725
|
}
|
|
1616
|
-
function vNodeData_createSsrNodeReference(currentComponentNode, vNodeData, depthFirstElementIdx, cleanupQueue) {
|
|
1726
|
+
function vNodeData_createSsrNodeReference(currentComponentNode, vNodeData, depthFirstElementIdx, cleanupQueue, currentFile) {
|
|
1617
1727
|
vNodeData[0] |= 8 /* REFERENCE */;
|
|
1618
|
-
let fragmentAttrs = _EMPTY_ARRAY2;
|
|
1619
1728
|
const stack = [-1];
|
|
1729
|
+
let attributesIndex = -1;
|
|
1620
1730
|
for (let i = 1; i < vNodeData.length; i++) {
|
|
1621
1731
|
const value = vNodeData[i];
|
|
1622
1732
|
if (Array.isArray(value)) {
|
|
1623
|
-
|
|
1733
|
+
attributesIndex = i;
|
|
1624
1734
|
i++;
|
|
1625
1735
|
if (vNodeData[i] !== WRITE_ELEMENT_ATTRS) {
|
|
1626
1736
|
stack[stack.length - 1]++;
|
|
@@ -1628,7 +1738,6 @@ function vNodeData_createSsrNodeReference(currentComponentNode, vNodeData, depth
|
|
|
1628
1738
|
}
|
|
1629
1739
|
} else if (value === CLOSE_FRAGMENT) {
|
|
1630
1740
|
stack.pop();
|
|
1631
|
-
fragmentAttrs = _EMPTY_ARRAY2;
|
|
1632
1741
|
} else if (value < 0) {
|
|
1633
1742
|
const numberOfElements = 0 - value;
|
|
1634
1743
|
stack[stack.length - 1] += numberOfElements;
|
|
@@ -1645,7 +1754,14 @@ function vNodeData_createSsrNodeReference(currentComponentNode, vNodeData, depth
|
|
|
1645
1754
|
}
|
|
1646
1755
|
}
|
|
1647
1756
|
}
|
|
1648
|
-
return new SsrNode(
|
|
1757
|
+
return new SsrNode(
|
|
1758
|
+
currentComponentNode,
|
|
1759
|
+
refId,
|
|
1760
|
+
attributesIndex,
|
|
1761
|
+
cleanupQueue,
|
|
1762
|
+
vNodeData,
|
|
1763
|
+
currentFile
|
|
1764
|
+
);
|
|
1649
1765
|
}
|
|
1650
1766
|
var ALPHANUMERIC = [];
|
|
1651
1767
|
function encodeAsAlphanumeric(value) {
|
|
@@ -1793,7 +1909,11 @@ var preloaderPre = (container, options, nonce) => {
|
|
|
1793
1909
|
}
|
|
1794
1910
|
}
|
|
1795
1911
|
const optsStr = opts.length ? `,{${opts.join(",")}}` : "";
|
|
1796
|
-
|
|
1912
|
+
const preloaderLinkAttrs = ["rel", "modulepreload", "href", preloaderBundle];
|
|
1913
|
+
if (nonce) {
|
|
1914
|
+
preloaderLinkAttrs.push("nonce", nonce);
|
|
1915
|
+
}
|
|
1916
|
+
container.openElement("link", null, preloaderLinkAttrs);
|
|
1797
1917
|
container.closeElement();
|
|
1798
1918
|
container.openElement("link", null, [
|
|
1799
1919
|
"rel",
|
|
@@ -1817,7 +1937,11 @@ var preloaderPre = (container, options, nonce) => {
|
|
|
1817
1937
|
}
|
|
1818
1938
|
const corePath = simplifyPath(base2, resolvedManifest?.manifest.core);
|
|
1819
1939
|
if (corePath) {
|
|
1820
|
-
|
|
1940
|
+
const linkAttrs = ["rel", "modulepreload", "href", corePath];
|
|
1941
|
+
if (nonce) {
|
|
1942
|
+
linkAttrs.push("nonce", nonce);
|
|
1943
|
+
}
|
|
1944
|
+
container.openElement("link", null, linkAttrs);
|
|
1821
1945
|
container.closeElement();
|
|
1822
1946
|
}
|
|
1823
1947
|
};
|
|
@@ -1897,6 +2021,7 @@ var preLoaderOptionsDefault = {
|
|
|
1897
2021
|
debug: false,
|
|
1898
2022
|
maxIdlePreloads: 25,
|
|
1899
2023
|
preloadProbability: 0.35
|
|
2024
|
+
// deprecated
|
|
1900
2025
|
};
|
|
1901
2026
|
|
|
1902
2027
|
// packages/qwik/src/server/ssr-container.ts
|
|
@@ -1936,18 +2061,7 @@ var StringBufferWriter = class {
|
|
|
1936
2061
|
var EMPTY_OBJ = {};
|
|
1937
2062
|
var SSRContainer = class extends _SharedContainer {
|
|
1938
2063
|
constructor(opts) {
|
|
1939
|
-
super(
|
|
1940
|
-
() => {
|
|
1941
|
-
try {
|
|
1942
|
-
return this.$scheduler$(255 /* WAIT_FOR_ALL */);
|
|
1943
|
-
} catch (e) {
|
|
1944
|
-
this.handleError(e, null);
|
|
1945
|
-
}
|
|
1946
|
-
},
|
|
1947
|
-
() => null,
|
|
1948
|
-
opts.renderOptions.serverData ?? EMPTY_OBJ,
|
|
1949
|
-
opts.locale
|
|
1950
|
-
);
|
|
2064
|
+
super(() => null, opts.renderOptions.serverData ?? EMPTY_OBJ, opts.locale);
|
|
1951
2065
|
__publicField(this, "tag");
|
|
1952
2066
|
__publicField(this, "isHtml");
|
|
1953
2067
|
__publicField(this, "writer");
|
|
@@ -1972,6 +2086,8 @@ var SSRContainer = class extends _SharedContainer {
|
|
|
1972
2086
|
__publicField(this, "lastNode", null);
|
|
1973
2087
|
__publicField(this, "currentComponentNode", null);
|
|
1974
2088
|
__publicField(this, "styleIds", /* @__PURE__ */ new Set());
|
|
2089
|
+
__publicField(this, "isBackpatchExecutorEmitted", false);
|
|
2090
|
+
__publicField(this, "backpatchMap", /* @__PURE__ */ new Map());
|
|
1975
2091
|
__publicField(this, "currentElementFrame", null);
|
|
1976
2092
|
__publicField(this, "renderTimer");
|
|
1977
2093
|
/**
|
|
@@ -2015,6 +2131,16 @@ var SSRContainer = class extends _SharedContainer {
|
|
|
2015
2131
|
handleError(err, _$host$) {
|
|
2016
2132
|
throw err;
|
|
2017
2133
|
}
|
|
2134
|
+
addBackpatchEntry(ssrNodeId, attrName, serializedValue) {
|
|
2135
|
+
const elementIndex = parseInt(ssrNodeId, 10);
|
|
2136
|
+
const entry = {
|
|
2137
|
+
attrName,
|
|
2138
|
+
value: serializedValue
|
|
2139
|
+
};
|
|
2140
|
+
const entries = this.backpatchMap.get(elementIndex) || [];
|
|
2141
|
+
entries.push(entry);
|
|
2142
|
+
this.backpatchMap.set(elementIndex, entries);
|
|
2143
|
+
}
|
|
2018
2144
|
async render(jsx) {
|
|
2019
2145
|
this.openContainer();
|
|
2020
2146
|
await _walkJSX(this, jsx, {
|
|
@@ -2026,29 +2152,26 @@ var SSRContainer = class extends _SharedContainer {
|
|
|
2026
2152
|
setContext(host, context, value) {
|
|
2027
2153
|
const ssrNode = host;
|
|
2028
2154
|
let ctx = ssrNode.getProp(QCtxAttr);
|
|
2029
|
-
if (
|
|
2155
|
+
if (ctx == null) {
|
|
2030
2156
|
ssrNode.setProp(QCtxAttr, ctx = []);
|
|
2031
2157
|
}
|
|
2032
|
-
mapArray_set(ctx, context.id, value, 0);
|
|
2158
|
+
mapArray_set(ctx, context.id, value, 0, true);
|
|
2033
2159
|
this.addRoot(ssrNode);
|
|
2034
2160
|
}
|
|
2035
2161
|
resolveContext(host, contextId) {
|
|
2036
2162
|
let ssrNode = host;
|
|
2037
2163
|
while (ssrNode) {
|
|
2038
2164
|
const ctx = ssrNode.getProp(QCtxAttr);
|
|
2039
|
-
if (ctx) {
|
|
2040
|
-
|
|
2041
|
-
if (value) {
|
|
2042
|
-
return value;
|
|
2043
|
-
}
|
|
2165
|
+
if (ctx != null && mapArray_has(ctx, contextId.id, 0)) {
|
|
2166
|
+
return mapArray_get(ctx, contextId.id, 0);
|
|
2044
2167
|
}
|
|
2045
|
-
ssrNode = ssrNode.
|
|
2168
|
+
ssrNode = ssrNode.parentComponent;
|
|
2046
2169
|
}
|
|
2047
2170
|
return void 0;
|
|
2048
2171
|
}
|
|
2049
2172
|
getParentHost(host) {
|
|
2050
2173
|
const ssrNode = host;
|
|
2051
|
-
return ssrNode.
|
|
2174
|
+
return ssrNode.parentComponent;
|
|
2052
2175
|
}
|
|
2053
2176
|
setHostProp(host, name, value) {
|
|
2054
2177
|
const ssrNode = host;
|
|
@@ -2071,7 +2194,7 @@ var SSRContainer = class extends _SharedContainer {
|
|
|
2071
2194
|
containerAttributes[QContainerAttr] = "paused" /* PAUSED */;
|
|
2072
2195
|
containerAttributes[QRuntimeAttr] = "2";
|
|
2073
2196
|
containerAttributes[QVersionAttr] = this.$version$ ?? "dev";
|
|
2074
|
-
containerAttributes[QRenderAttr] = (qRender ? qRender + "-" : "") + (
|
|
2197
|
+
containerAttributes[QRenderAttr] = (qRender ? qRender + "-" : "") + (isDev5 ? "ssr-dev" : "ssr");
|
|
2075
2198
|
containerAttributes[QBaseAttr] = this.$buildBase$ || "";
|
|
2076
2199
|
containerAttributes[QLocaleAttr] = this.$locale$;
|
|
2077
2200
|
containerAttributes[QManifestHashAttr] = this.resolvedManifest.manifest.manifestHash;
|
|
@@ -2102,16 +2225,19 @@ var SSRContainer = class extends _SharedContainer {
|
|
|
2102
2225
|
vNodeData_openElement(this.currentElementFrame.vNodeData);
|
|
2103
2226
|
this.write("<");
|
|
2104
2227
|
this.write(elementName);
|
|
2228
|
+
const lastNode = this.getOrCreateLastNode();
|
|
2105
2229
|
if (varAttrs) {
|
|
2106
2230
|
innerHTML = this.writeAttrs(elementName, varAttrs, false, currentFile);
|
|
2107
2231
|
}
|
|
2108
2232
|
this.write(" " + Q_PROPS_SEPARATOR);
|
|
2109
|
-
|
|
2233
|
+
isDev5 && this.write('=""');
|
|
2110
2234
|
if (constAttrs && constAttrs.length) {
|
|
2111
2235
|
innerHTML = this.writeAttrs(elementName, constAttrs, true, currentFile) || innerHTML;
|
|
2112
2236
|
}
|
|
2113
2237
|
this.write(">");
|
|
2114
|
-
|
|
2238
|
+
if (lastNode) {
|
|
2239
|
+
lastNode.setTreeNonUpdatable();
|
|
2240
|
+
}
|
|
2115
2241
|
return innerHTML;
|
|
2116
2242
|
}
|
|
2117
2243
|
/** Renders closing tag for DOM element */
|
|
@@ -2174,6 +2300,9 @@ var SSRContainer = class extends _SharedContainer {
|
|
|
2174
2300
|
/** Writes closing data to vNodeData for fragment boundaries */
|
|
2175
2301
|
closeFragment() {
|
|
2176
2302
|
vNodeData_closeFragment(this.currentElementFrame.vNodeData);
|
|
2303
|
+
if (this.currentComponentNode) {
|
|
2304
|
+
this.currentComponentNode.setTreeNonUpdatable();
|
|
2305
|
+
}
|
|
2177
2306
|
this.lastNode = null;
|
|
2178
2307
|
}
|
|
2179
2308
|
openProjection(attrs) {
|
|
@@ -2218,7 +2347,7 @@ var SSRContainer = class extends _SharedContainer {
|
|
|
2218
2347
|
const componentFrame = this.componentStack.pop();
|
|
2219
2348
|
componentFrame.releaseUnclaimedProjections(this.unclaimedProjections);
|
|
2220
2349
|
this.closeFragment();
|
|
2221
|
-
this.currentComponentNode = this.currentComponentNode?.
|
|
2350
|
+
this.currentComponentNode = this.currentComponentNode?.parentComponent || null;
|
|
2222
2351
|
}
|
|
2223
2352
|
/** Write a text node with correct escaping. Save the length of the text node in the vNodeData. */
|
|
2224
2353
|
textNode(text) {
|
|
@@ -2245,7 +2374,8 @@ var SSRContainer = class extends _SharedContainer {
|
|
|
2245
2374
|
this.currentElementFrame.vNodeData,
|
|
2246
2375
|
// we start at -1, so we need to add +1
|
|
2247
2376
|
this.currentElementFrame.depthFirstElementIdx + 1,
|
|
2248
|
-
this.cleanupQueue
|
|
2377
|
+
this.cleanupQueue,
|
|
2378
|
+
this.currentElementFrame.currentFile
|
|
2249
2379
|
);
|
|
2250
2380
|
}
|
|
2251
2381
|
return this.lastNode;
|
|
@@ -2307,6 +2437,8 @@ var SSRContainer = class extends _SharedContainer {
|
|
|
2307
2437
|
this.emitVNodeData();
|
|
2308
2438
|
preloaderPost(this, this.renderOptions, this.$serverData$?.nonce);
|
|
2309
2439
|
this.emitSyncFnsData();
|
|
2440
|
+
this.emitPatchDataIfNeeded();
|
|
2441
|
+
this.emitExecutorIfNeeded();
|
|
2310
2442
|
this.emitQwikLoaderAtBottomIfNeeded();
|
|
2311
2443
|
})
|
|
2312
2444
|
);
|
|
@@ -2390,6 +2522,7 @@ var SSRContainer = class extends _SharedContainer {
|
|
|
2390
2522
|
for (let i = 0; i < fragmentAttrs.length; ) {
|
|
2391
2523
|
const key = fragmentAttrs[i++];
|
|
2392
2524
|
let value = fragmentAttrs[i++];
|
|
2525
|
+
let encodeValue = false;
|
|
2393
2526
|
if (typeof value !== "string") {
|
|
2394
2527
|
const rootId = addRoot(value);
|
|
2395
2528
|
if (rootId === void 0) {
|
|
@@ -2411,6 +2544,7 @@ var SSRContainer = class extends _SharedContainer {
|
|
|
2411
2544
|
write(VNodeDataChar.PROPS_CHAR);
|
|
2412
2545
|
break;
|
|
2413
2546
|
case ELEMENT_KEY:
|
|
2547
|
+
encodeValue = true;
|
|
2414
2548
|
write(VNodeDataChar.KEY_CHAR);
|
|
2415
2549
|
break;
|
|
2416
2550
|
case ELEMENT_SEQ:
|
|
@@ -2437,7 +2571,15 @@ var SSRContainer = class extends _SharedContainer {
|
|
|
2437
2571
|
write(key);
|
|
2438
2572
|
write(VNodeDataChar.SEPARATOR_CHAR);
|
|
2439
2573
|
}
|
|
2440
|
-
|
|
2574
|
+
const encodedValue = encodeValue ? encodeURI(value) : value;
|
|
2575
|
+
const isEncoded = encodeValue ? encodedValue !== value : false;
|
|
2576
|
+
if (isEncoded) {
|
|
2577
|
+
write(VNodeDataChar.SEPARATOR_CHAR);
|
|
2578
|
+
write(encodedValue);
|
|
2579
|
+
write(VNodeDataChar.SEPARATOR_CHAR);
|
|
2580
|
+
} else {
|
|
2581
|
+
write(value);
|
|
2582
|
+
}
|
|
2441
2583
|
}
|
|
2442
2584
|
}
|
|
2443
2585
|
this.closeElement();
|
|
@@ -2466,6 +2608,38 @@ var SSRContainer = class extends _SharedContainer {
|
|
|
2466
2608
|
this.closeElement();
|
|
2467
2609
|
}
|
|
2468
2610
|
}
|
|
2611
|
+
emitPatchDataIfNeeded() {
|
|
2612
|
+
const patches = [];
|
|
2613
|
+
for (const [elementIndex, backpatchEntries] of this.backpatchMap) {
|
|
2614
|
+
for (const backpatchEntry of backpatchEntries) {
|
|
2615
|
+
patches.push(elementIndex, backpatchEntry.attrName, backpatchEntry.value);
|
|
2616
|
+
}
|
|
2617
|
+
}
|
|
2618
|
+
this.backpatchMap.clear();
|
|
2619
|
+
if (patches.length > 0) {
|
|
2620
|
+
this.isBackpatchExecutorEmitted = true;
|
|
2621
|
+
const scriptAttrs = ["type", ELEMENT_BACKPATCH_DATA];
|
|
2622
|
+
if (this.renderOptions.serverData?.nonce) {
|
|
2623
|
+
scriptAttrs.push("nonce", this.renderOptions.serverData.nonce);
|
|
2624
|
+
}
|
|
2625
|
+
this.openElement("script", scriptAttrs);
|
|
2626
|
+
this.write(JSON.stringify(patches));
|
|
2627
|
+
this.closeElement();
|
|
2628
|
+
}
|
|
2629
|
+
}
|
|
2630
|
+
emitExecutorIfNeeded() {
|
|
2631
|
+
if (!this.isBackpatchExecutorEmitted) {
|
|
2632
|
+
return;
|
|
2633
|
+
}
|
|
2634
|
+
const scriptAttrs = ["type", "text/javascript"];
|
|
2635
|
+
if (this.renderOptions.serverData?.nonce) {
|
|
2636
|
+
scriptAttrs.push("nonce", this.renderOptions.serverData.nonce);
|
|
2637
|
+
}
|
|
2638
|
+
this.openElement("script", scriptAttrs);
|
|
2639
|
+
const backpatchScript = getQwikBackpatchExecutorScript({ debug: isDev5 });
|
|
2640
|
+
this.write(backpatchScript);
|
|
2641
|
+
this.closeElement();
|
|
2642
|
+
}
|
|
2469
2643
|
emitPreloaderPre() {
|
|
2470
2644
|
preloaderPre(this, this.renderOptions.preloader, this.renderOptions.serverData?.nonce);
|
|
2471
2645
|
}
|
|
@@ -2482,9 +2656,18 @@ var SSRContainer = class extends _SharedContainer {
|
|
|
2482
2656
|
let qwikLoaderBundle = this.resolvedManifest.manifest.qwikLoader;
|
|
2483
2657
|
if (qwikLoaderBundle) {
|
|
2484
2658
|
qwikLoaderBundle = this.$buildBase$ + qwikLoaderBundle;
|
|
2485
|
-
|
|
2659
|
+
const linkAttrs = ["rel", "modulepreload", "href", qwikLoaderBundle];
|
|
2660
|
+
const nonce = this.renderOptions.serverData?.nonce;
|
|
2661
|
+
if (nonce) {
|
|
2662
|
+
linkAttrs.push("nonce", nonce);
|
|
2663
|
+
}
|
|
2664
|
+
this.openElement("link", linkAttrs);
|
|
2486
2665
|
this.closeElement();
|
|
2487
|
-
|
|
2666
|
+
const scriptAttrs = ["type", "module", "async", true, "src", qwikLoaderBundle];
|
|
2667
|
+
if (nonce) {
|
|
2668
|
+
scriptAttrs.push("nonce", nonce);
|
|
2669
|
+
}
|
|
2670
|
+
this.openElement("script", scriptAttrs);
|
|
2488
2671
|
this.closeElement();
|
|
2489
2672
|
}
|
|
2490
2673
|
}
|
|
@@ -2499,7 +2682,7 @@ var SSRContainer = class extends _SharedContainer {
|
|
|
2499
2682
|
const qwikLoaderScript = getQwikLoaderScript({
|
|
2500
2683
|
debug: this.renderOptions.debug
|
|
2501
2684
|
});
|
|
2502
|
-
const scriptAttrs = ["id", "qwikloader", "async", true];
|
|
2685
|
+
const scriptAttrs = ["id", "qwikloader", "async", true, "type", "module"];
|
|
2503
2686
|
const nonce = this.renderOptions.serverData?.nonce;
|
|
2504
2687
|
if (nonce) {
|
|
2505
2688
|
scriptAttrs.push("nonce", nonce);
|
|
@@ -2526,7 +2709,7 @@ var SSRContainer = class extends _SharedContainer {
|
|
|
2526
2709
|
if (unclaimedProjections.length) {
|
|
2527
2710
|
const previousCurrentComponentNode = this.currentComponentNode;
|
|
2528
2711
|
try {
|
|
2529
|
-
this.openElement(QTemplate, ["
|
|
2712
|
+
this.openElement(QTemplate, ["hidden", true, "aria-hidden", "true"], null);
|
|
2530
2713
|
let idx = 0;
|
|
2531
2714
|
let ssrComponentNode = null;
|
|
2532
2715
|
let ssrComponentFrame = null;
|
|
@@ -2550,7 +2733,7 @@ var SSRContainer = class extends _SharedContainer {
|
|
|
2550
2733
|
}
|
|
2551
2734
|
this.unclaimedProjectionComponentFrameQueue.shift();
|
|
2552
2735
|
this.openFragment(
|
|
2553
|
-
|
|
2736
|
+
isDev5 ? [DEBUG_TYPE, "P" /* Projection */, QSlotParent, ssrComponentNode.id] : [QSlotParent, ssrComponentNode.id]
|
|
2554
2737
|
);
|
|
2555
2738
|
const lastNode = this.getOrCreateLastNode();
|
|
2556
2739
|
if (lastNode.vnodeData) {
|
|
@@ -2599,7 +2782,7 @@ var SSRContainer = class extends _SharedContainer {
|
|
|
2599
2782
|
}
|
|
2600
2783
|
createAndPushFrame(elementName, depthFirstElementIdx, currentFile) {
|
|
2601
2784
|
let tagNesting = 10 /* ANYTHING */;
|
|
2602
|
-
if (
|
|
2785
|
+
if (isDev5) {
|
|
2603
2786
|
if (!this.currentElementFrame) {
|
|
2604
2787
|
tagNesting = initialTag(elementName);
|
|
2605
2788
|
} else {
|
|
@@ -2644,7 +2827,8 @@ var SSRContainer = class extends _SharedContainer {
|
|
|
2644
2827
|
parent: this.currentElementFrame,
|
|
2645
2828
|
elementName,
|
|
2646
2829
|
depthFirstElementIdx,
|
|
2647
|
-
vNodeData: [0 /* NONE */]
|
|
2830
|
+
vNodeData: [0 /* NONE */],
|
|
2831
|
+
currentFile: isDev5 ? currentFile || null : null
|
|
2648
2832
|
};
|
|
2649
2833
|
this.currentElementFrame = frame;
|
|
2650
2834
|
this.vNodeDatas.push(frame.vNodeData);
|
|
@@ -2675,7 +2859,7 @@ var SSRContainer = class extends _SharedContainer {
|
|
|
2675
2859
|
let value = attrs[i];
|
|
2676
2860
|
let styleScopedId = null;
|
|
2677
2861
|
if (isSSRUnsafeAttr(key)) {
|
|
2678
|
-
if (
|
|
2862
|
+
if (isDev5) {
|
|
2679
2863
|
throw qError(32 /* unsafeAttr */);
|
|
2680
2864
|
}
|
|
2681
2865
|
continue;
|
|
@@ -2708,16 +2892,18 @@ var SSRContainer = class extends _SharedContainer {
|
|
|
2708
2892
|
value = this.trackSignalValue(value, lastNode, key, signalData);
|
|
2709
2893
|
}
|
|
2710
2894
|
if (key === dangerouslySetInnerHTML) {
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2895
|
+
if (value) {
|
|
2896
|
+
innerHTML = String(value);
|
|
2897
|
+
key = QContainerAttr;
|
|
2898
|
+
value = "html" /* HTML */;
|
|
2899
|
+
}
|
|
2714
2900
|
if (tag === "style") {
|
|
2715
2901
|
continue;
|
|
2716
2902
|
}
|
|
2717
2903
|
}
|
|
2718
2904
|
if (tag === "textarea" && key === "value") {
|
|
2719
2905
|
if (value && typeof value !== "string") {
|
|
2720
|
-
if (
|
|
2906
|
+
if (isDev5) {
|
|
2721
2907
|
throw qError(23 /* wrongTextareaValue */, [currentFile, value]);
|
|
2722
2908
|
}
|
|
2723
2909
|
continue;
|
|
@@ -2812,6 +2998,7 @@ var renderToStream = async (jsx, opts) => {
|
|
|
2812
2998
|
});
|
|
2813
2999
|
await setServerPlatform(opts, resolvedManifest);
|
|
2814
3000
|
await ssrContainer.render(jsx);
|
|
3001
|
+
await ssrContainer.$scheduler$(255 /* WAIT_FOR_QUEUE */).$returnValue$;
|
|
2815
3002
|
flush();
|
|
2816
3003
|
const snapshotResult = getSnapshotResult(ssrContainer);
|
|
2817
3004
|
const isDynamic = snapshotResult.resources.some((r) => r._cache !== Infinity);
|
|
@@ -2958,6 +3145,7 @@ async function setServerPlatform2(manifest) {
|
|
|
2958
3145
|
setPlatform2(platform);
|
|
2959
3146
|
}
|
|
2960
3147
|
export {
|
|
3148
|
+
getQwikBackpatchExecutorScript,
|
|
2961
3149
|
getQwikLoaderScript,
|
|
2962
3150
|
getQwikPrefetchWorkerScript,
|
|
2963
3151
|
renderToStream,
|