@qwik.dev/core 2.0.0-beta.10 → 2.0.0-beta.11
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/backpatch/package.json +1 -1
- package/dist/build/package.json +1 -1
- package/dist/cli.cjs +2 -2
- package/dist/core-internal.d.ts +55 -101
- package/dist/core.cjs +6498 -6393
- package/dist/core.cjs.map +1 -1
- package/dist/core.min.mjs +1 -1
- package/dist/core.mjs +6498 -6389
- package/dist/core.mjs.map +1 -1
- package/dist/core.prod.cjs +2458 -2413
- package/dist/core.prod.mjs +4227 -4174
- package/dist/loader/package.json +1 -1
- package/dist/optimizer.cjs +31 -24
- package/dist/optimizer.d.ts +1 -1
- package/dist/optimizer.mjs +889 -836
- package/dist/server.cjs +22 -22
- package/dist/server.d.ts +1 -1
- package/dist/server.mjs +5 -9
- package/dist/starters/features/csr/package.json +1 -1
- package/dist/testing/index.cjs +2628 -2535
- package/dist/testing/index.d.ts +59 -82
- package/dist/testing/index.mjs +2587 -2501
- package/dist/testing/package.json +1 -1
- package/package.json +3 -3
- package/server.d.ts +2 -0
package/dist/server.cjs
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.11-dev+d7daca3
|
|
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
|
|
@@ -60,7 +60,7 @@ __export(index_exports, {
|
|
|
60
60
|
versions: () => versions
|
|
61
61
|
});
|
|
62
62
|
module.exports = __toCommonJS(index_exports);
|
|
63
|
-
var
|
|
63
|
+
var import_core3 = require("@qwik.dev/core");
|
|
64
64
|
|
|
65
65
|
// packages/qwik/src/server/platform.ts
|
|
66
66
|
var import_core = require("@qwik.dev/core");
|
|
@@ -195,7 +195,7 @@ var codeToText = (code, ...parts) => {
|
|
|
195
195
|
"Invoking 'use*()' method outside of invocation context.",
|
|
196
196
|
// 9
|
|
197
197
|
`Calling a 'use*()' method outside 'component$(() => { HERE })' is not allowed. 'use*()' methods provide hooks to the 'component$' state and lifecycle, ie 'use' hooks can only be called synchronously within the 'component$' function or another 'use' method.
|
|
198
|
-
See https://qwik.dev/docs/
|
|
198
|
+
See https://qwik.dev/docs/core/tasks/#use-method-rules`,
|
|
199
199
|
// 10
|
|
200
200
|
'The provided Context reference "{{0}}" is not a valid context created by createContextId()',
|
|
201
201
|
// 11
|
|
@@ -1179,12 +1179,12 @@ function getBuildBase(opts) {
|
|
|
1179
1179
|
return `${globalThis.BASE_URL || "/"}build/`;
|
|
1180
1180
|
}
|
|
1181
1181
|
var versions = {
|
|
1182
|
-
qwik: "2.0.0-beta.
|
|
1182
|
+
qwik: "2.0.0-beta.11-dev+d7daca3",
|
|
1183
1183
|
qwikDom: "2.1.19"
|
|
1184
1184
|
};
|
|
1185
1185
|
|
|
1186
1186
|
// packages/qwik/src/server/ssr-container.ts
|
|
1187
|
-
var
|
|
1187
|
+
var import_internal2 = require("@qwik.dev/core/internal");
|
|
1188
1188
|
var import_build8 = require("@qwik.dev/core/build");
|
|
1189
1189
|
|
|
1190
1190
|
// packages/qwik/src/server/scripts.ts
|
|
@@ -1238,7 +1238,7 @@ function getQwikBackpatchExecutorScript(opts = {}) {
|
|
|
1238
1238
|
}
|
|
1239
1239
|
|
|
1240
1240
|
// packages/qwik/src/server/ssr-node.ts
|
|
1241
|
-
var
|
|
1241
|
+
var import_internal = require("@qwik.dev/core/internal");
|
|
1242
1242
|
var import_build7 = require("@qwik.dev/core/build");
|
|
1243
1243
|
var SsrNode = class {
|
|
1244
1244
|
constructor(parentComponent, id, attributesIndex, cleanupQueue, vnodeData, currentFile) {
|
|
@@ -1250,7 +1250,7 @@ var SsrNode = class {
|
|
|
1250
1250
|
var _a;
|
|
1251
1251
|
this.id = id;
|
|
1252
1252
|
this.flags = 1 /* Updatable */;
|
|
1253
|
-
this.attrs = this.attributesIndex >= 0 ? this.vnodeData[this.attributesIndex] :
|
|
1253
|
+
this.attrs = this.attributesIndex >= 0 ? this.vnodeData[this.attributesIndex] : import_internal._EMPTY_ARRAY;
|
|
1254
1254
|
(_a = this.parentComponent) == null ? void 0 : _a.addChild(this);
|
|
1255
1255
|
if (import_build7.isDev && id.indexOf("undefined") != -1) {
|
|
1256
1256
|
throw new Error(`Invalid SSR node id: ${id}`);
|
|
@@ -1268,11 +1268,11 @@ var SsrNode = class {
|
|
|
1268
1268
|
attrs;
|
|
1269
1269
|
/** Local props which don't serialize; */
|
|
1270
1270
|
localProps = null;
|
|
1271
|
-
get [
|
|
1271
|
+
get [import_internal._EFFECT_BACK_REF]() {
|
|
1272
1272
|
return this.getProp(QBackRefs);
|
|
1273
1273
|
}
|
|
1274
1274
|
setProp(name, value) {
|
|
1275
|
-
if (this.attrs ===
|
|
1275
|
+
if (this.attrs === import_internal._EMPTY_ARRAY) {
|
|
1276
1276
|
this.setEmptyArrayAsVNodeDataAttributes();
|
|
1277
1277
|
}
|
|
1278
1278
|
if (name.startsWith(NON_SERIALIZABLE_MARKER_PREFIX)) {
|
|
@@ -1361,14 +1361,14 @@ var SsrComponentFrame = class {
|
|
|
1361
1361
|
distributeChildrenIntoSlots(children, projectionScopedStyle, projectionComponentFrame) {
|
|
1362
1362
|
this.projectionScopedStyle = projectionScopedStyle;
|
|
1363
1363
|
this.projectionComponentFrame = projectionComponentFrame;
|
|
1364
|
-
if ((0,
|
|
1364
|
+
if ((0, import_internal._isJSXNode)(children)) {
|
|
1365
1365
|
const slotName = this.getSlotName(children);
|
|
1366
1366
|
mapArray_set(this.slots, slotName, children, 0);
|
|
1367
1367
|
} else if (Array.isArray(children) && children.length > 0) {
|
|
1368
1368
|
const defaultSlot = [];
|
|
1369
1369
|
for (let i = 0; i < children.length; i++) {
|
|
1370
1370
|
const child = children[i];
|
|
1371
|
-
if ((0,
|
|
1371
|
+
if ((0, import_internal._isJSXNode)(child)) {
|
|
1372
1372
|
const slotName = this.getSlotName(child);
|
|
1373
1373
|
if (slotName === QDefaultSlot) {
|
|
1374
1374
|
defaultSlot.push(child);
|
|
@@ -1821,7 +1821,7 @@ function encodeAsAlphanumeric(value) {
|
|
|
1821
1821
|
}
|
|
1822
1822
|
|
|
1823
1823
|
// packages/qwik/src/server/preload-strategy.ts
|
|
1824
|
-
var
|
|
1824
|
+
var import_core2 = require("@qwik.dev/core");
|
|
1825
1825
|
|
|
1826
1826
|
// packages/qwik/src/server/preload-utils.ts
|
|
1827
1827
|
function flattenPrefetchResources(prefetchResources) {
|
|
@@ -1844,7 +1844,7 @@ function flattenPrefetchResources(prefetchResources) {
|
|
|
1844
1844
|
|
|
1845
1845
|
// packages/qwik/src/server/preload-strategy.ts
|
|
1846
1846
|
var getBundles = (qrls) => {
|
|
1847
|
-
const platform = (0,
|
|
1847
|
+
const platform = (0, import_core2.getPlatform)();
|
|
1848
1848
|
return qrls == null ? void 0 : qrls.map((qrl) => {
|
|
1849
1849
|
var _a;
|
|
1850
1850
|
const symbol = qrl.$symbol$;
|
|
@@ -2096,7 +2096,7 @@ var StringBufferWriter = class {
|
|
|
2096
2096
|
}
|
|
2097
2097
|
};
|
|
2098
2098
|
var EMPTY_OBJ = {};
|
|
2099
|
-
var SSRContainer = class extends
|
|
2099
|
+
var SSRContainer = class extends import_internal2._SharedContainer {
|
|
2100
2100
|
tag;
|
|
2101
2101
|
isHtml;
|
|
2102
2102
|
writer;
|
|
@@ -2180,7 +2180,7 @@ var SSRContainer = class extends import_core4._SharedContainer {
|
|
|
2180
2180
|
}
|
|
2181
2181
|
async render(jsx) {
|
|
2182
2182
|
this.openContainer();
|
|
2183
|
-
await (0,
|
|
2183
|
+
await (0, import_internal2._walkJSX)(this, jsx, {
|
|
2184
2184
|
currentStyleScoped: null,
|
|
2185
2185
|
parentComponentFrame: this.getComponentFrame()
|
|
2186
2186
|
});
|
|
@@ -2429,7 +2429,7 @@ var SSRContainer = class extends import_core4._SharedContainer {
|
|
|
2429
2429
|
}
|
|
2430
2430
|
for (let i = 0; i < injections.length; i++) {
|
|
2431
2431
|
const injection = injections[i];
|
|
2432
|
-
const jsxNode = (0,
|
|
2432
|
+
const jsxNode = (0, import_internal2._jsxSplit)(injection.tag, null, injection.attributes || {}, null, 0, null);
|
|
2433
2433
|
if (injection.location === "head") {
|
|
2434
2434
|
this.additionalHeadNodes.push(jsxNode);
|
|
2435
2435
|
} else {
|
|
@@ -2449,7 +2449,7 @@ var SSRContainer = class extends import_core4._SharedContainer {
|
|
|
2449
2449
|
this.styleIds.add(styleId);
|
|
2450
2450
|
if (((_a = this.currentElementFrame) == null ? void 0 : _a.elementName) === "html") {
|
|
2451
2451
|
this.additionalHeadNodes.push(
|
|
2452
|
-
(0,
|
|
2452
|
+
(0, import_internal2._jsxSorted)(
|
|
2453
2453
|
"style",
|
|
2454
2454
|
null,
|
|
2455
2455
|
{ dangerouslySetInnerHTML: content, [QStyle]: styleId },
|
|
@@ -2789,7 +2789,7 @@ var SSRContainer = class extends import_core4._SharedContainer {
|
|
|
2789
2789
|
lastNode.vnodeData[0] |= 16 /* SERIALIZE */;
|
|
2790
2790
|
}
|
|
2791
2791
|
ssrComponentNode == null ? void 0 : ssrComponentNode.setProp(value, lastNode.id);
|
|
2792
|
-
await (0,
|
|
2792
|
+
await (0, import_internal2._walkJSX)(this, children, {
|
|
2793
2793
|
currentStyleScoped: scopedStyleId,
|
|
2794
2794
|
parentComponentFrame: null
|
|
2795
2795
|
});
|
|
@@ -2920,7 +2920,7 @@ var SSRContainer = class extends import_core4._SharedContainer {
|
|
|
2920
2920
|
}
|
|
2921
2921
|
if (key === "ref") {
|
|
2922
2922
|
const lastNode = this.getOrCreateLastNode();
|
|
2923
|
-
if ((0,
|
|
2923
|
+
if ((0, import_internal2.isSignal)(value)) {
|
|
2924
2924
|
value.$untrackedValue$ = new DomRef(lastNode);
|
|
2925
2925
|
continue;
|
|
2926
2926
|
} else if (typeof value === "function") {
|
|
@@ -2932,9 +2932,9 @@ var SSRContainer = class extends import_core4._SharedContainer {
|
|
|
2932
2932
|
throw qError(15 /* invalidRefValue */, [currentFile]);
|
|
2933
2933
|
}
|
|
2934
2934
|
}
|
|
2935
|
-
if ((0,
|
|
2935
|
+
if ((0, import_internal2.isSignal)(value)) {
|
|
2936
2936
|
const lastNode = this.getOrCreateLastNode();
|
|
2937
|
-
const signalData = new
|
|
2937
|
+
const signalData = new import_internal2._SubscriptionData({
|
|
2938
2938
|
$scopedStyleIdPrefix$: styleScopedId,
|
|
2939
2939
|
$isConst$: isConst
|
|
2940
2940
|
});
|
|
@@ -3193,7 +3193,7 @@ var Q_FUNCS_PREFIX = 'document["qFuncs_HASH"]=';
|
|
|
3193
3193
|
// packages/qwik/src/server/index.ts
|
|
3194
3194
|
async function setServerPlatform2(manifest) {
|
|
3195
3195
|
const platform = createPlatform({ manifest }, resolveManifest(manifest));
|
|
3196
|
-
(0,
|
|
3196
|
+
(0, import_core3.setPlatform)(platform);
|
|
3197
3197
|
}
|
|
3198
3198
|
// Annotate the CommonJS export names for ESM import in node:
|
|
3199
3199
|
0 && (module.exports = {
|
package/dist/server.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import type { QwikManifest } from './optimizer';
|
|
|
4
4
|
import type { ResolvedManifest } from './optimizer';
|
|
5
5
|
import type { ServerQwikManifest } from './optimizer';
|
|
6
6
|
import type { SnapshotResult } from '.';
|
|
7
|
-
import type { StreamWriter } from '
|
|
7
|
+
import type { StreamWriter } from './internal';
|
|
8
8
|
import type { SymbolMapperFn } from './optimizer';
|
|
9
9
|
|
|
10
10
|
/** @public */
|
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.11-dev+d7daca3
|
|
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
|
|
@@ -151,7 +151,7 @@ var codeToText = (code, ...parts) => {
|
|
|
151
151
|
"Invoking 'use*()' method outside of invocation context.",
|
|
152
152
|
// 9
|
|
153
153
|
`Calling a 'use*()' method outside 'component$(() => { HERE })' is not allowed. 'use*()' methods provide hooks to the 'component$' state and lifecycle, ie 'use' hooks can only be called synchronously within the 'component$' function or another 'use' method.
|
|
154
|
-
See https://qwik.dev/docs/
|
|
154
|
+
See https://qwik.dev/docs/core/tasks/#use-method-rules`,
|
|
155
155
|
// 10
|
|
156
156
|
'The provided Context reference "{{0}}" is not a valid context created by createContextId()',
|
|
157
157
|
// 11
|
|
@@ -1132,7 +1132,7 @@ function getBuildBase(opts) {
|
|
|
1132
1132
|
return `${import.meta.env.BASE_URL || "/"}build/`;
|
|
1133
1133
|
}
|
|
1134
1134
|
var versions = {
|
|
1135
|
-
qwik: "2.0.0-beta.
|
|
1135
|
+
qwik: "2.0.0-beta.11-dev+d7daca3",
|
|
1136
1136
|
qwikDom: "2.1.19"
|
|
1137
1137
|
};
|
|
1138
1138
|
|
|
@@ -1144,7 +1144,7 @@ import {
|
|
|
1144
1144
|
_jsxSplit,
|
|
1145
1145
|
_walkJSX,
|
|
1146
1146
|
isSignal
|
|
1147
|
-
} from "@qwik.dev/core";
|
|
1147
|
+
} from "@qwik.dev/core/internal";
|
|
1148
1148
|
import { isDev as isDev5 } from "@qwik.dev/core/build";
|
|
1149
1149
|
|
|
1150
1150
|
// packages/qwik/src/server/scripts.ts
|
|
@@ -1198,11 +1198,7 @@ function getQwikBackpatchExecutorScript(opts = {}) {
|
|
|
1198
1198
|
}
|
|
1199
1199
|
|
|
1200
1200
|
// packages/qwik/src/server/ssr-node.ts
|
|
1201
|
-
import {
|
|
1202
|
-
_isJSXNode as isJSXNode,
|
|
1203
|
-
_EMPTY_ARRAY,
|
|
1204
|
-
_EFFECT_BACK_REF
|
|
1205
|
-
} from "@qwik.dev/core";
|
|
1201
|
+
import { _isJSXNode as isJSXNode, _EMPTY_ARRAY, _EFFECT_BACK_REF } from "@qwik.dev/core/internal";
|
|
1206
1202
|
import { isDev as isDev4 } from "@qwik.dev/core/build";
|
|
1207
1203
|
var SsrNode = class {
|
|
1208
1204
|
constructor(parentComponent, id, attributesIndex, cleanupQueue, vnodeData, currentFile) {
|