vinext 1.3.1 → 1.4.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/README.md +5 -2
- package/THIRD_PARTY_LICENSES.md +47 -0
- package/dist/_virtual/_rolldown/runtime.js +3 -2
- package/dist/build/prerender.js +1 -1
- package/dist/build/report.d.ts +0 -14
- package/dist/build/report.js +1 -51
- package/dist/check.js +1 -1
- package/dist/cli.js +3 -0
- package/dist/client/dev-error-overlay.js +1 -1
- package/dist/client/navigation-runtime.d.ts +13 -1
- package/dist/client/navigation-runtime.js +1 -1
- package/dist/config/next-config.d.ts +19 -0
- package/dist/config/next-config.js +64 -1
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/encodings/dbcs-codec.js +327 -0
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/encodings/dbcs-data.js +123 -0
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/encodings/index.js +29 -0
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/encodings/internal.js +134 -0
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/encodings/sbcs-codec.js +50 -0
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/encodings/sbcs-data-generated.js +455 -0
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/encodings/sbcs-data.js +147 -0
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/encodings/tables/big5-added.json.js +169 -0
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/encodings/tables/cp936.json.js +2584 -0
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/encodings/tables/cp949.json.js +2220 -0
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/encodings/tables/cp950.json.js +227 -0
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/encodings/tables/eucjp.json.js +425 -0
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/encodings/tables/gb18030-ranges.json.js +427 -0
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/encodings/tables/gbk-added.json.js +229 -0
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/encodings/tables/shiftjis.json.js +292 -0
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/encodings/utf16.js +106 -0
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/encodings/utf7.js +182 -0
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/lib/bom-handling.js +42 -0
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/lib/extend-node.js +147 -0
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/lib/index.js +94 -0
- package/dist/deps/.pnpm/iconv-lite@0.4.24/deps/iconv-lite/lib/streams.js +95 -0
- package/dist/deps/.pnpm/safer-buffer@2.1.2/deps/safer-buffer/safer.js +45 -0
- package/dist/entries/app-rsc-entry.js +17 -48
- package/dist/entries/app-rsc-manifest.js +3 -4
- package/dist/entries/app-ssr-entry.js +1 -0
- package/dist/entries/pages-server-entry.js +33 -8
- package/dist/index.js +83 -70
- package/dist/init-cloudflare.d.ts +1 -3
- package/dist/init-cloudflare.js +10 -48
- package/dist/init-platform.d.ts +2 -0
- package/dist/init-platform.js +4 -0
- package/dist/plugins/extensionless-dynamic-import.js +6 -2
- package/dist/plugins/next-intl-catalog.d.ts +12 -0
- package/dist/plugins/next-intl-catalog.js +85 -0
- package/dist/plugins/pages-node-externals.d.ts +1 -0
- package/dist/plugins/pages-node-externals.js +1 -1
- package/dist/plugins/use-cache-callable.d.ts +1 -1
- package/dist/plugins/use-cache-callable.js +136 -94
- package/dist/routing/app-route-graph.d.ts +6 -0
- package/dist/routing/app-route-graph.js +9 -1
- package/dist/server/api-handler.js +19 -4
- package/dist/server/app-bfcache-identity.js +1 -1
- package/dist/server/app-browser-entry.js +79 -63
- package/dist/server/app-browser-history-controller.d.ts +5 -4
- package/dist/server/app-browser-history-controller.js +93 -15
- package/dist/server/app-browser-navigation-controller.d.ts +2 -2
- package/dist/server/app-browser-navigation-controller.js +1 -2
- package/dist/server/app-browser-rsc-redirect.js +4 -4
- package/dist/server/app-browser-server-action-client.d.ts +2 -0
- package/dist/server/app-browser-server-action-client.js +4 -3
- package/dist/server/app-browser-state.d.ts +2 -4
- package/dist/server/app-browser-state.js +9 -4
- package/dist/server/app-browser-supplemental-refresh.js +16 -1
- package/dist/server/app-browser-visible-commit.d.ts +1 -1
- package/dist/server/app-browser-visible-commit.js +2 -12
- package/dist/server/app-elements-wire.d.ts +6 -38
- package/dist/server/app-elements-wire.js +4 -41
- package/dist/server/app-elements.d.ts +2 -2
- package/dist/server/app-elements.js +2 -2
- package/dist/server/app-history-state.d.ts +2 -2
- package/dist/server/app-history-state.js +5 -2
- package/dist/server/app-mounted-layouts.d.ts +21 -0
- package/dist/server/app-mounted-layouts.js +67 -0
- package/dist/server/app-optimistic-routing.d.ts +19 -1
- package/dist/server/app-optimistic-routing.js +42 -2
- package/dist/server/app-page-boundary-render.js +7 -6
- package/dist/server/app-page-boundary.js +2 -2
- package/dist/server/app-page-cache-finalizer.d.ts +12 -1
- package/dist/server/app-page-cache-finalizer.js +70 -29
- package/dist/server/app-page-cache.d.ts +13 -1
- package/dist/server/app-page-cache.js +31 -9
- package/dist/server/app-page-dispatch.d.ts +5 -10
- package/dist/server/app-page-dispatch.js +84 -154
- package/dist/server/app-page-element-builder.d.ts +2 -2
- package/dist/server/app-page-element-builder.js +10 -9
- package/dist/server/app-page-execution.d.ts +17 -52
- package/dist/server/app-page-execution.js +99 -95
- package/dist/server/app-page-head.d.ts +13 -0
- package/dist/server/app-page-head.js +44 -16
- package/dist/server/app-page-http-access-fallback-metadata.d.ts +1 -0
- package/dist/server/app-page-http-access-fallback-metadata.js +2 -2
- package/dist/server/app-page-layout-gate.d.ts +35 -0
- package/dist/server/app-page-layout-gate.js +50 -0
- package/dist/server/app-page-params.d.ts +0 -1
- package/dist/server/app-page-params.js +1 -14
- package/dist/server/app-page-probe.d.ts +3 -21
- package/dist/server/app-page-probe.js +4 -37
- package/dist/server/app-page-render.d.ts +2 -12
- package/dist/server/app-page-render.js +89 -220
- package/dist/server/app-page-request.d.ts +1 -3
- package/dist/server/app-page-request.js +1 -1
- package/dist/server/app-page-response.js +3 -3
- package/dist/server/app-page-route-wiring.d.ts +13 -6
- package/dist/server/app-page-route-wiring.js +67 -61
- package/dist/server/app-page-rsc-render-status.d.ts +27 -1
- package/dist/server/app-page-rsc-render-status.js +121 -13
- package/dist/server/app-page-stream.d.ts +2 -0
- package/dist/server/app-page-stream.js +2 -2
- package/dist/server/app-pages-bridge.d.ts +4 -0
- package/dist/server/app-pages-bridge.js +7 -3
- package/dist/server/app-render-dependency.d.ts +11 -4
- package/dist/server/app-render-dependency.js +86 -38
- package/dist/server/app-request-stage-dispatch.js +1 -1
- package/dist/server/app-route-handler-cache.js +2 -2
- package/dist/server/app-route-handler-dispatch.js +14 -9
- package/dist/server/app-route-handler-execution.js +8 -3
- package/dist/server/app-route-handler-policy.d.ts +1 -1
- package/dist/server/app-route-handler-policy.js +3 -3
- package/dist/server/app-route-handler-response.js +1 -1
- package/dist/server/app-route-handler-runtime.js +17 -4
- package/dist/server/app-rsc-cache-busting.d.ts +2 -2
- package/dist/server/app-rsc-cache-busting.js +4 -4
- package/dist/server/app-rsc-error-handler.d.ts +2 -1
- package/dist/server/app-rsc-error-handler.js +9 -1
- package/dist/server/app-rsc-errors.d.ts +8 -0
- package/dist/server/app-rsc-errors.js +8 -1
- package/dist/server/app-rsc-handler.d.ts +5 -5
- package/dist/server/app-rsc-handler.js +30 -24
- package/dist/server/app-rsc-request-normalization.d.ts +0 -4
- package/dist/server/app-rsc-request-normalization.js +1 -4
- package/dist/server/app-rsc-response-finalizer.js +2 -2
- package/dist/server/app-rsc-response-stage.js +5 -3
- package/dist/server/app-server-action-execution.d.ts +3 -1
- package/dist/server/app-server-action-execution.js +7 -4
- package/dist/server/app-ssr-entry.d.ts +2 -0
- package/dist/server/app-ssr-entry.js +9 -8
- package/dist/server/app-ssr-stream.js +1 -1
- package/dist/server/app-visited-response-cache.d.ts +36 -1
- package/dist/server/app-visited-response-cache.js +46 -5
- package/dist/server/app-worker-stages.d.ts +25 -3
- package/dist/server/app-worker-stages.js +45 -6
- package/dist/server/artifact-compatibility.d.ts +0 -1
- package/dist/server/artifact-compatibility.js +1 -10
- package/dist/server/cache-proof.d.ts +1 -115
- package/dist/server/cache-proof.js +1 -544
- package/dist/server/cacheability-request.js +13 -8
- package/dist/server/dev-server.js +4 -3
- package/dist/server/headers.d.ts +6 -3
- package/dist/server/headers.js +9 -5
- package/dist/server/isr-cache.d.ts +8 -2
- package/dist/server/isr-cache.js +26 -1
- package/dist/server/metadata-route-response.js +32 -15
- package/dist/server/multi-stage.d.ts +52 -11
- package/dist/server/multi-stage.js +13 -1
- package/dist/server/navigation-planner.js +1 -1
- package/dist/server/pages-api-route.js +28 -19
- package/dist/server/pages-media-type.d.ts +21 -1
- package/dist/server/pages-media-type.js +69 -5
- package/dist/server/pages-node-compat.js +52 -27
- package/dist/server/pages-page-handler.js +11 -20
- package/dist/server/pages-request-pipeline.d.ts +8 -0
- package/dist/server/pages-request-pipeline.js +2 -2
- package/dist/server/pages-request-stage-entry.js +14 -12
- package/dist/server/pages-response-stage-entry.js +9 -3
- package/dist/server/prod-server.js +5 -1
- package/dist/server/request-pipeline.d.ts +6 -0
- package/dist/server/request-pipeline.js +21 -1
- package/dist/server/shared-cache-identity.d.ts +23 -0
- package/dist/server/shared-cache-identity.js +36 -0
- package/dist/server/worker-stages.d.ts +16 -3
- package/dist/server/worker-stages.js +23 -4
- package/dist/shims/cache-handler.js +2 -2
- package/dist/shims/cache-request-state.d.ts +17 -20
- package/dist/shims/cache-request-state.js +16 -21
- package/dist/shims/cache-runtime.js +27 -11
- package/dist/shims/cache.d.ts +8 -7
- package/dist/shims/cache.js +17 -19
- package/dist/shims/cacheability-classification.d.ts +2 -0
- package/dist/shims/cdn-cache.d.ts +22 -5
- package/dist/shims/client-page-root.js +2 -2
- package/dist/shims/dynamic.js +9 -6
- package/dist/shims/error-boundary.js +2 -2
- package/dist/shims/fetch-cache-state.d.ts +5 -1
- package/dist/shims/fetch-cache-state.js +1 -3
- package/dist/shims/fetch-cache.d.ts +2 -1
- package/dist/shims/fetch-cache.js +34 -24
- package/dist/shims/form.js +2 -2
- package/dist/shims/headers.d.ts +8 -23
- package/dist/shims/headers.js +17 -67
- package/dist/shims/internal/navigation-untracked.js +1 -1
- package/dist/shims/link.js +3 -1
- package/dist/shims/metadata.d.ts +23 -21
- package/dist/shims/metadata.js +62 -24
- package/dist/shims/navigation-server.js +1 -1
- package/dist/shims/navigation.d.ts +74 -7
- package/dist/shims/navigation.js +183 -29
- package/dist/shims/navigation.react-server.js +2 -2
- package/dist/shims/request-state-types.d.ts +2 -2
- package/dist/shims/slot.d.ts +12 -0
- package/dist/shims/slot.js +37 -9
- package/dist/shims/unified-request-context.d.ts +1 -1
- package/dist/shims/unified-request-context.js +2 -3
- package/dist/utils/cache-control-metadata.d.ts +5 -0
- package/dist/utils/cache-control-metadata.js +9 -1
- package/dist/utils/project.d.ts +2 -2
- package/dist/utils/project.js +3 -16
- package/dist/utils/regex.d.ts +5 -0
- package/dist/utils/regex.js +11 -1
- package/dist/utils/text-stream.d.ts +10 -5
- package/dist/utils/text-stream.js +6 -6
- package/package.json +2 -1
- package/dist/build/layout-classification-types.d.ts +0 -60
- package/dist/build/layout-classification-types.js +0 -1
- package/dist/build/layout-classification.d.ts +0 -62
- package/dist/build/layout-classification.js +0 -98
- package/dist/build/route-classification-injector.d.ts +0 -33
- package/dist/build/route-classification-injector.js +0 -59
- package/dist/build/route-classification-manifest.d.ts +0 -54
- package/dist/build/route-classification-manifest.js +0 -143
- package/dist/server/app-browser-client-reuse-manifest.d.ts +0 -11
- package/dist/server/app-browser-client-reuse-manifest.js +0 -101
- package/dist/server/app-layout-param-observation.d.ts +0 -42
- package/dist/server/app-layout-param-observation.js +0 -168
- package/dist/server/client-reuse-manifest.d.ts +0 -103
- package/dist/server/client-reuse-manifest.js +0 -209
- package/dist/server/skip-cache-proof.d.ts +0 -60
- package/dist/server/skip-cache-proof.js +0 -168
- package/dist/server/static-layout-client-reuse-proof.d.ts +0 -14
- package/dist/server/static-layout-client-reuse-proof.js +0 -33
- package/dist/utils/sorted-array.d.ts +0 -8
- package/dist/utils/sorted-array.js +0 -20
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { __commonJSMin, __require } from "../../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
//#region ../../node_modules/.pnpm/iconv-lite@0.4.24/node_modules/iconv-lite/lib/extend-node.js
|
|
3
|
+
var require_extend_node = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4
|
+
var Buffer = __require("buffer").Buffer;
|
|
5
|
+
module.exports = function(iconv) {
|
|
6
|
+
var original = void 0;
|
|
7
|
+
iconv.supportsNodeEncodingsExtension = !(Buffer.from || new Buffer(0) instanceof Uint8Array);
|
|
8
|
+
iconv.extendNodeEncodings = function extendNodeEncodings() {
|
|
9
|
+
if (original) return;
|
|
10
|
+
original = {};
|
|
11
|
+
if (!iconv.supportsNodeEncodingsExtension) {
|
|
12
|
+
console.error("ACTION NEEDED: require('iconv-lite').extendNodeEncodings() is not supported in your version of Node");
|
|
13
|
+
console.error("See more info at https://github.com/ashtuchkin/iconv-lite/wiki/Node-v4-compatibility");
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
var nodeNativeEncodings = {
|
|
17
|
+
"hex": true,
|
|
18
|
+
"utf8": true,
|
|
19
|
+
"utf-8": true,
|
|
20
|
+
"ascii": true,
|
|
21
|
+
"binary": true,
|
|
22
|
+
"base64": true,
|
|
23
|
+
"ucs2": true,
|
|
24
|
+
"ucs-2": true,
|
|
25
|
+
"utf16le": true,
|
|
26
|
+
"utf-16le": true
|
|
27
|
+
};
|
|
28
|
+
Buffer.isNativeEncoding = function(enc) {
|
|
29
|
+
return enc && nodeNativeEncodings[enc.toLowerCase()];
|
|
30
|
+
};
|
|
31
|
+
var SlowBuffer = __require("buffer").SlowBuffer;
|
|
32
|
+
original.SlowBufferToString = SlowBuffer.prototype.toString;
|
|
33
|
+
SlowBuffer.prototype.toString = function(encoding, start, end) {
|
|
34
|
+
encoding = String(encoding || "utf8").toLowerCase();
|
|
35
|
+
if (Buffer.isNativeEncoding(encoding)) return original.SlowBufferToString.call(this, encoding, start, end);
|
|
36
|
+
if (typeof start == "undefined") start = 0;
|
|
37
|
+
if (typeof end == "undefined") end = this.length;
|
|
38
|
+
return iconv.decode(this.slice(start, end), encoding);
|
|
39
|
+
};
|
|
40
|
+
original.SlowBufferWrite = SlowBuffer.prototype.write;
|
|
41
|
+
SlowBuffer.prototype.write = function(string, offset, length, encoding) {
|
|
42
|
+
if (isFinite(offset)) {
|
|
43
|
+
if (!isFinite(length)) {
|
|
44
|
+
encoding = length;
|
|
45
|
+
length = void 0;
|
|
46
|
+
}
|
|
47
|
+
} else {
|
|
48
|
+
var swap = encoding;
|
|
49
|
+
encoding = offset;
|
|
50
|
+
offset = length;
|
|
51
|
+
length = swap;
|
|
52
|
+
}
|
|
53
|
+
offset = +offset || 0;
|
|
54
|
+
var remaining = this.length - offset;
|
|
55
|
+
if (!length) length = remaining;
|
|
56
|
+
else {
|
|
57
|
+
length = +length;
|
|
58
|
+
if (length > remaining) length = remaining;
|
|
59
|
+
}
|
|
60
|
+
encoding = String(encoding || "utf8").toLowerCase();
|
|
61
|
+
if (Buffer.isNativeEncoding(encoding)) return original.SlowBufferWrite.call(this, string, offset, length, encoding);
|
|
62
|
+
if (string.length > 0 && (length < 0 || offset < 0)) throw new RangeError("attempt to write beyond buffer bounds");
|
|
63
|
+
var buf = iconv.encode(string, encoding);
|
|
64
|
+
if (buf.length < length) length = buf.length;
|
|
65
|
+
buf.copy(this, offset, 0, length);
|
|
66
|
+
return length;
|
|
67
|
+
};
|
|
68
|
+
original.BufferIsEncoding = Buffer.isEncoding;
|
|
69
|
+
Buffer.isEncoding = function(encoding) {
|
|
70
|
+
return Buffer.isNativeEncoding(encoding) || iconv.encodingExists(encoding);
|
|
71
|
+
};
|
|
72
|
+
original.BufferByteLength = Buffer.byteLength;
|
|
73
|
+
Buffer.byteLength = SlowBuffer.byteLength = function(str, encoding) {
|
|
74
|
+
encoding = String(encoding || "utf8").toLowerCase();
|
|
75
|
+
if (Buffer.isNativeEncoding(encoding)) return original.BufferByteLength.call(this, str, encoding);
|
|
76
|
+
return iconv.encode(str, encoding).length;
|
|
77
|
+
};
|
|
78
|
+
original.BufferToString = Buffer.prototype.toString;
|
|
79
|
+
Buffer.prototype.toString = function(encoding, start, end) {
|
|
80
|
+
encoding = String(encoding || "utf8").toLowerCase();
|
|
81
|
+
if (Buffer.isNativeEncoding(encoding)) return original.BufferToString.call(this, encoding, start, end);
|
|
82
|
+
if (typeof start == "undefined") start = 0;
|
|
83
|
+
if (typeof end == "undefined") end = this.length;
|
|
84
|
+
return iconv.decode(this.slice(start, end), encoding);
|
|
85
|
+
};
|
|
86
|
+
original.BufferWrite = Buffer.prototype.write;
|
|
87
|
+
Buffer.prototype.write = function(string, offset, length, encoding) {
|
|
88
|
+
var _offset = offset, _length = length, _encoding = encoding;
|
|
89
|
+
if (isFinite(offset)) {
|
|
90
|
+
if (!isFinite(length)) {
|
|
91
|
+
encoding = length;
|
|
92
|
+
length = void 0;
|
|
93
|
+
}
|
|
94
|
+
} else {
|
|
95
|
+
var swap = encoding;
|
|
96
|
+
encoding = offset;
|
|
97
|
+
offset = length;
|
|
98
|
+
length = swap;
|
|
99
|
+
}
|
|
100
|
+
encoding = String(encoding || "utf8").toLowerCase();
|
|
101
|
+
if (Buffer.isNativeEncoding(encoding)) return original.BufferWrite.call(this, string, _offset, _length, _encoding);
|
|
102
|
+
offset = +offset || 0;
|
|
103
|
+
var remaining = this.length - offset;
|
|
104
|
+
if (!length) length = remaining;
|
|
105
|
+
else {
|
|
106
|
+
length = +length;
|
|
107
|
+
if (length > remaining) length = remaining;
|
|
108
|
+
}
|
|
109
|
+
if (string.length > 0 && (length < 0 || offset < 0)) throw new RangeError("attempt to write beyond buffer bounds");
|
|
110
|
+
var buf = iconv.encode(string, encoding);
|
|
111
|
+
if (buf.length < length) length = buf.length;
|
|
112
|
+
buf.copy(this, offset, 0, length);
|
|
113
|
+
return length;
|
|
114
|
+
};
|
|
115
|
+
if (iconv.supportsStreams) {
|
|
116
|
+
var Readable = __require("stream").Readable;
|
|
117
|
+
original.ReadableSetEncoding = Readable.prototype.setEncoding;
|
|
118
|
+
Readable.prototype.setEncoding = function setEncoding(enc, options) {
|
|
119
|
+
this._readableState.decoder = iconv.getDecoder(enc, options);
|
|
120
|
+
this._readableState.encoding = enc;
|
|
121
|
+
};
|
|
122
|
+
Readable.prototype.collect = iconv._collect;
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
iconv.undoExtendNodeEncodings = function undoExtendNodeEncodings() {
|
|
126
|
+
if (!iconv.supportsNodeEncodingsExtension) return;
|
|
127
|
+
if (!original) throw new Error("require('iconv-lite').undoExtendNodeEncodings(): Nothing to undo; extendNodeEncodings() is not called.");
|
|
128
|
+
delete Buffer.isNativeEncoding;
|
|
129
|
+
var SlowBuffer = __require("buffer").SlowBuffer;
|
|
130
|
+
SlowBuffer.prototype.toString = original.SlowBufferToString;
|
|
131
|
+
SlowBuffer.prototype.write = original.SlowBufferWrite;
|
|
132
|
+
Buffer.isEncoding = original.BufferIsEncoding;
|
|
133
|
+
Buffer.byteLength = original.BufferByteLength;
|
|
134
|
+
Buffer.prototype.toString = original.BufferToString;
|
|
135
|
+
Buffer.prototype.write = original.BufferWrite;
|
|
136
|
+
if (iconv.supportsStreams) {
|
|
137
|
+
var Readable = __require("stream").Readable;
|
|
138
|
+
Readable.prototype.setEncoding = original.ReadableSetEncoding;
|
|
139
|
+
delete Readable.prototype.collect;
|
|
140
|
+
}
|
|
141
|
+
original = void 0;
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
}));
|
|
145
|
+
//#endregion
|
|
146
|
+
export default require_extend_node();
|
|
147
|
+
export { require_extend_node };
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { __commonJSMin } from "../../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { require_safer } from "../../../../safer-buffer@2.1.2/deps/safer-buffer/safer.js";
|
|
3
|
+
import { require_bom_handling } from "./bom-handling.js";
|
|
4
|
+
import { require_encodings } from "../encodings/index.js";
|
|
5
|
+
import { require_streams } from "./streams.js";
|
|
6
|
+
import { require_extend_node } from "./extend-node.js";
|
|
7
|
+
//#region ../../node_modules/.pnpm/iconv-lite@0.4.24/node_modules/iconv-lite/lib/index.js
|
|
8
|
+
var require_lib = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
9
|
+
var Buffer = require_safer().Buffer;
|
|
10
|
+
var bomHandling = require_bom_handling();
|
|
11
|
+
var iconv = module.exports;
|
|
12
|
+
iconv.encodings = null;
|
|
13
|
+
iconv.defaultCharUnicode = "�";
|
|
14
|
+
iconv.defaultCharSingleByte = "?";
|
|
15
|
+
iconv.encode = function encode(str, encoding, options) {
|
|
16
|
+
str = "" + (str || "");
|
|
17
|
+
var encoder = iconv.getEncoder(encoding, options);
|
|
18
|
+
var res = encoder.write(str);
|
|
19
|
+
var trail = encoder.end();
|
|
20
|
+
return trail && trail.length > 0 ? Buffer.concat([res, trail]) : res;
|
|
21
|
+
};
|
|
22
|
+
iconv.decode = function decode(buf, encoding, options) {
|
|
23
|
+
if (typeof buf === "string") {
|
|
24
|
+
if (!iconv.skipDecodeWarning) {
|
|
25
|
+
console.error("Iconv-lite warning: decode()-ing strings is deprecated. Refer to https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding");
|
|
26
|
+
iconv.skipDecodeWarning = true;
|
|
27
|
+
}
|
|
28
|
+
buf = Buffer.from("" + (buf || ""), "binary");
|
|
29
|
+
}
|
|
30
|
+
var decoder = iconv.getDecoder(encoding, options);
|
|
31
|
+
var res = decoder.write(buf);
|
|
32
|
+
var trail = decoder.end();
|
|
33
|
+
return trail ? res + trail : res;
|
|
34
|
+
};
|
|
35
|
+
iconv.encodingExists = function encodingExists(enc) {
|
|
36
|
+
try {
|
|
37
|
+
iconv.getCodec(enc);
|
|
38
|
+
return true;
|
|
39
|
+
} catch (e) {
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
iconv.toEncoding = iconv.encode;
|
|
44
|
+
iconv.fromEncoding = iconv.decode;
|
|
45
|
+
iconv._codecDataCache = {};
|
|
46
|
+
iconv.getCodec = function getCodec(encoding) {
|
|
47
|
+
if (!iconv.encodings) iconv.encodings = require_encodings();
|
|
48
|
+
var enc = iconv._canonicalizeEncoding(encoding);
|
|
49
|
+
var codecOptions = {};
|
|
50
|
+
while (true) {
|
|
51
|
+
var codec = iconv._codecDataCache[enc];
|
|
52
|
+
if (codec) return codec;
|
|
53
|
+
var codecDef = iconv.encodings[enc];
|
|
54
|
+
switch (typeof codecDef) {
|
|
55
|
+
case "string":
|
|
56
|
+
enc = codecDef;
|
|
57
|
+
break;
|
|
58
|
+
case "object":
|
|
59
|
+
for (var key in codecDef) codecOptions[key] = codecDef[key];
|
|
60
|
+
if (!codecOptions.encodingName) codecOptions.encodingName = enc;
|
|
61
|
+
enc = codecDef.type;
|
|
62
|
+
break;
|
|
63
|
+
case "function":
|
|
64
|
+
if (!codecOptions.encodingName) codecOptions.encodingName = enc;
|
|
65
|
+
codec = new codecDef(codecOptions, iconv);
|
|
66
|
+
iconv._codecDataCache[codecOptions.encodingName] = codec;
|
|
67
|
+
return codec;
|
|
68
|
+
default: throw new Error("Encoding not recognized: '" + encoding + "' (searched as: '" + enc + "')");
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
iconv._canonicalizeEncoding = function(encoding) {
|
|
73
|
+
return ("" + encoding).toLowerCase().replace(/:\d{4}$|[^0-9a-z]/g, "");
|
|
74
|
+
};
|
|
75
|
+
iconv.getEncoder = function getEncoder(encoding, options) {
|
|
76
|
+
var codec = iconv.getCodec(encoding), encoder = new codec.encoder(options, codec);
|
|
77
|
+
if (codec.bomAware && options && options.addBOM) encoder = new bomHandling.PrependBOM(encoder, options);
|
|
78
|
+
return encoder;
|
|
79
|
+
};
|
|
80
|
+
iconv.getDecoder = function getDecoder(encoding, options) {
|
|
81
|
+
var codec = iconv.getCodec(encoding), decoder = new codec.decoder(options, codec);
|
|
82
|
+
if (codec.bomAware && !(options && options.stripBOM === false)) decoder = new bomHandling.StripBOM(decoder, options);
|
|
83
|
+
return decoder;
|
|
84
|
+
};
|
|
85
|
+
var nodeVer = typeof process !== "undefined" && process.versions && process.versions.node;
|
|
86
|
+
if (nodeVer) {
|
|
87
|
+
var nodeVerArr = nodeVer.split(".").map(Number);
|
|
88
|
+
if (nodeVerArr[0] > 0 || nodeVerArr[1] >= 10) require_streams()(iconv);
|
|
89
|
+
require_extend_node()(iconv);
|
|
90
|
+
}
|
|
91
|
+
}));
|
|
92
|
+
//#endregion
|
|
93
|
+
export default require_lib();
|
|
94
|
+
export {};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { __commonJSMin, __require } from "../../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
//#region ../../node_modules/.pnpm/iconv-lite@0.4.24/node_modules/iconv-lite/lib/streams.js
|
|
3
|
+
var require_streams = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4
|
+
var Buffer = __require("buffer").Buffer;
|
|
5
|
+
var Transform = __require("stream").Transform;
|
|
6
|
+
module.exports = function(iconv) {
|
|
7
|
+
iconv.encodeStream = function encodeStream(encoding, options) {
|
|
8
|
+
return new IconvLiteEncoderStream(iconv.getEncoder(encoding, options), options);
|
|
9
|
+
};
|
|
10
|
+
iconv.decodeStream = function decodeStream(encoding, options) {
|
|
11
|
+
return new IconvLiteDecoderStream(iconv.getDecoder(encoding, options), options);
|
|
12
|
+
};
|
|
13
|
+
iconv.supportsStreams = true;
|
|
14
|
+
iconv.IconvLiteEncoderStream = IconvLiteEncoderStream;
|
|
15
|
+
iconv.IconvLiteDecoderStream = IconvLiteDecoderStream;
|
|
16
|
+
iconv._collect = IconvLiteDecoderStream.prototype.collect;
|
|
17
|
+
};
|
|
18
|
+
function IconvLiteEncoderStream(conv, options) {
|
|
19
|
+
this.conv = conv;
|
|
20
|
+
options = options || {};
|
|
21
|
+
options.decodeStrings = false;
|
|
22
|
+
Transform.call(this, options);
|
|
23
|
+
}
|
|
24
|
+
IconvLiteEncoderStream.prototype = Object.create(Transform.prototype, { constructor: { value: IconvLiteEncoderStream } });
|
|
25
|
+
IconvLiteEncoderStream.prototype._transform = function(chunk, encoding, done) {
|
|
26
|
+
if (typeof chunk != "string") return done(/* @__PURE__ */ new Error("Iconv encoding stream needs strings as its input."));
|
|
27
|
+
try {
|
|
28
|
+
var res = this.conv.write(chunk);
|
|
29
|
+
if (res && res.length) this.push(res);
|
|
30
|
+
done();
|
|
31
|
+
} catch (e) {
|
|
32
|
+
done(e);
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
IconvLiteEncoderStream.prototype._flush = function(done) {
|
|
36
|
+
try {
|
|
37
|
+
var res = this.conv.end();
|
|
38
|
+
if (res && res.length) this.push(res);
|
|
39
|
+
done();
|
|
40
|
+
} catch (e) {
|
|
41
|
+
done(e);
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
IconvLiteEncoderStream.prototype.collect = function(cb) {
|
|
45
|
+
var chunks = [];
|
|
46
|
+
this.on("error", cb);
|
|
47
|
+
this.on("data", function(chunk) {
|
|
48
|
+
chunks.push(chunk);
|
|
49
|
+
});
|
|
50
|
+
this.on("end", function() {
|
|
51
|
+
cb(null, Buffer.concat(chunks));
|
|
52
|
+
});
|
|
53
|
+
return this;
|
|
54
|
+
};
|
|
55
|
+
function IconvLiteDecoderStream(conv, options) {
|
|
56
|
+
this.conv = conv;
|
|
57
|
+
options = options || {};
|
|
58
|
+
options.encoding = this.encoding = "utf8";
|
|
59
|
+
Transform.call(this, options);
|
|
60
|
+
}
|
|
61
|
+
IconvLiteDecoderStream.prototype = Object.create(Transform.prototype, { constructor: { value: IconvLiteDecoderStream } });
|
|
62
|
+
IconvLiteDecoderStream.prototype._transform = function(chunk, encoding, done) {
|
|
63
|
+
if (!Buffer.isBuffer(chunk)) return done(/* @__PURE__ */ new Error("Iconv decoding stream needs buffers as its input."));
|
|
64
|
+
try {
|
|
65
|
+
var res = this.conv.write(chunk);
|
|
66
|
+
if (res && res.length) this.push(res, this.encoding);
|
|
67
|
+
done();
|
|
68
|
+
} catch (e) {
|
|
69
|
+
done(e);
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
IconvLiteDecoderStream.prototype._flush = function(done) {
|
|
73
|
+
try {
|
|
74
|
+
var res = this.conv.end();
|
|
75
|
+
if (res && res.length) this.push(res, this.encoding);
|
|
76
|
+
done();
|
|
77
|
+
} catch (e) {
|
|
78
|
+
done(e);
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
IconvLiteDecoderStream.prototype.collect = function(cb) {
|
|
82
|
+
var res = "";
|
|
83
|
+
this.on("error", cb);
|
|
84
|
+
this.on("data", function(chunk) {
|
|
85
|
+
res += chunk;
|
|
86
|
+
});
|
|
87
|
+
this.on("end", function() {
|
|
88
|
+
cb(null, res);
|
|
89
|
+
});
|
|
90
|
+
return this;
|
|
91
|
+
};
|
|
92
|
+
}));
|
|
93
|
+
//#endregion
|
|
94
|
+
export default require_streams();
|
|
95
|
+
export { require_streams };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { __commonJSMin, __require } from "../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
//#region ../../node_modules/.pnpm/safer-buffer@2.1.2/node_modules/safer-buffer/safer.js
|
|
3
|
+
var require_safer = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4
|
+
var buffer = __require("buffer");
|
|
5
|
+
var Buffer = buffer.Buffer;
|
|
6
|
+
var safer = {};
|
|
7
|
+
var key;
|
|
8
|
+
for (key in buffer) {
|
|
9
|
+
if (!buffer.hasOwnProperty(key)) continue;
|
|
10
|
+
if (key === "SlowBuffer" || key === "Buffer") continue;
|
|
11
|
+
safer[key] = buffer[key];
|
|
12
|
+
}
|
|
13
|
+
var Safer = safer.Buffer = {};
|
|
14
|
+
for (key in Buffer) {
|
|
15
|
+
if (!Buffer.hasOwnProperty(key)) continue;
|
|
16
|
+
if (key === "allocUnsafe" || key === "allocUnsafeSlow") continue;
|
|
17
|
+
Safer[key] = Buffer[key];
|
|
18
|
+
}
|
|
19
|
+
safer.Buffer.prototype = Buffer.prototype;
|
|
20
|
+
if (!Safer.from || Safer.from === Uint8Array.from) Safer.from = function(value, encodingOrOffset, length) {
|
|
21
|
+
if (typeof value === "number") throw new TypeError("The \"value\" argument must not be of type number. Received type " + typeof value);
|
|
22
|
+
if (value && typeof value.length === "undefined") throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof value);
|
|
23
|
+
return Buffer(value, encodingOrOffset, length);
|
|
24
|
+
};
|
|
25
|
+
if (!Safer.alloc) Safer.alloc = function(size, fill, encoding) {
|
|
26
|
+
if (typeof size !== "number") throw new TypeError("The \"size\" argument must be of type number. Received type " + typeof size);
|
|
27
|
+
if (size < 0 || size >= 2 * (1 << 30)) throw new RangeError("The value \"" + size + "\" is invalid for option \"size\"");
|
|
28
|
+
var buf = Buffer(size);
|
|
29
|
+
if (!fill || fill.length === 0) buf.fill(0);
|
|
30
|
+
else if (typeof encoding === "string") buf.fill(fill, encoding);
|
|
31
|
+
else buf.fill(fill);
|
|
32
|
+
return buf;
|
|
33
|
+
};
|
|
34
|
+
if (!safer.kStringMaxLength) try {
|
|
35
|
+
safer.kStringMaxLength = process.binding("buffer").kStringMaxLength;
|
|
36
|
+
} catch (e) {}
|
|
37
|
+
if (!safer.constants) {
|
|
38
|
+
safer.constants = { MAX_LENGTH: safer.kMaxLength };
|
|
39
|
+
if (safer.kStringMaxLength) safer.constants.MAX_STRING_LENGTH = safer.kStringMaxLength;
|
|
40
|
+
}
|
|
41
|
+
module.exports = safer;
|
|
42
|
+
}));
|
|
43
|
+
//#endregion
|
|
44
|
+
export default require_safer();
|
|
45
|
+
export { require_safer };
|
|
@@ -389,9 +389,9 @@ const __requestHandler = createAppRscRequestHandler({
|
|
|
389
389
|
publicFiles: new Set(${JSON.stringify(config?.publicFiles ?? [])}),
|
|
390
390
|
registerCacheAdapters: __registerConfiguredCacheAdapters,
|
|
391
391
|
renderNotFound: async () => null,
|
|
392
|
-
${hasPagesDir ? `async renderPagesFallback({ allowRscDocumentFallback, appRouteMatch, dispatchPagesResponseStage, initialResponseHeaders, isDataRequest, isRscRequest, matchKind, middlewareContext, pathname, pagesDataRequest, request, url }) {
|
|
392
|
+
${hasPagesDir ? `async renderPagesFallback({ allowRscDocumentFallback, appRouteMatch, dispatchPagesResponseStage, initialResponseHeaders, isDataRequest, isRscRequest, matchKind, middlewareContext, pathname, pagesDataRequest, request, sharedAcrossHosts, url }) {
|
|
393
393
|
return __renderPagesFallback(
|
|
394
|
-
{ allowRscDocumentFallback, appRouteMatch, initialResponseHeaders, isDataRequest, isRscRequest, matchKind, middlewareContext, pathname, pagesDataRequest, request, url },
|
|
394
|
+
{ allowRscDocumentFallback, appRouteMatch, initialResponseHeaders, isDataRequest, isRscRequest, matchKind, middlewareContext, pathname, pagesDataRequest, request, sharedAcrossHosts, url },
|
|
395
395
|
{
|
|
396
396
|
async loadPagesEntry() {
|
|
397
397
|
if (!dispatchPagesResponseStage) {
|
|
@@ -401,8 +401,8 @@ const __requestHandler = createAppRscRequestHandler({
|
|
|
401
401
|
...__pagesRequestEntry,
|
|
402
402
|
handleApiRoute(stageRequest) { return dispatchPagesResponseStage(stageRequest, "api"); },
|
|
403
403
|
renderPage(stageRequest, pagesUrl) {
|
|
404
|
-
const
|
|
405
|
-
return dispatchPagesResponseStage(stageRequest, "page", dataKind, __pagesRequestEntry.hasRequestAwareDocument);
|
|
404
|
+
const route = __pagesRequestEntry.matchPageRoute?.(pagesUrl, stageRequest)?.route;
|
|
405
|
+
return dispatchPagesResponseStage(stageRequest, "page", route?.dataKind, __pagesRequestEntry.hasRequestAwareDocument, route?.runsInitialProps === true);
|
|
406
406
|
},
|
|
407
407
|
};
|
|
408
408
|
},
|
|
@@ -611,7 +611,7 @@ import {
|
|
|
611
611
|
AppElementsWire as __AppElementsWire,
|
|
612
612
|
} from ${JSON.stringify(appElementsPath)};
|
|
613
613
|
import {
|
|
614
|
-
|
|
614
|
+
probeAppPageLayout as __probeAppPageLayout,
|
|
615
615
|
resolveAppPageChildSegments as __resolveAppPageChildSegments,
|
|
616
616
|
} from ${JSON.stringify(appPageRouteWiringPath)};
|
|
617
617
|
import { buildPageElements as __buildPageElements } from ${JSON.stringify(appPageElementBuilderPath)};
|
|
@@ -697,16 +697,6 @@ const __isrDebug = process.env.NEXT_PRIVATE_DEBUG_CACHE
|
|
|
697
697
|
? console.debug.bind(console, "[vinext] ISR:")
|
|
698
698
|
: undefined;
|
|
699
699
|
|
|
700
|
-
// Classification debug — opt in with VINEXT_DEBUG_CLASSIFICATION=1. Gated on
|
|
701
|
-
// the env var so the hot path pays no overhead unless an operator is actively
|
|
702
|
-
// tracing why a layout was flagged static or dynamic. The reason payload is
|
|
703
|
-
// carried by __VINEXT_CLASS_REASONS and consumed inside probeAppPageLayouts.
|
|
704
|
-
const __classDebug = process.env.VINEXT_DEBUG_CLASSIFICATION
|
|
705
|
-
? function(layoutId, reason) {
|
|
706
|
-
console.debug("[vinext] CLS:", layoutId, reason);
|
|
707
|
-
}
|
|
708
|
-
: undefined;
|
|
709
|
-
|
|
710
700
|
function __resolveRouteFetchCacheMode(route) {
|
|
711
701
|
return __resolveAppPageFetchCacheMode({
|
|
712
702
|
layouts: route.layouts,
|
|
@@ -826,24 +816,6 @@ ${instrumentationPath ? `// Lazy instrumentation initialisation is handled by en
|
|
|
826
816
|
// the user module in; all bookkeeping (initialized flag, shared promise, prerender
|
|
827
817
|
// skip) lives in the typed helper so it can be unit-tested independently.` : ""}
|
|
828
818
|
|
|
829
|
-
// Build-time layout classification dispatch. Replaced in renderChunk
|
|
830
|
-
// with a switch statement that returns a pre-computed per-layout
|
|
831
|
-
// Map<layoutIndex, "static" | "dynamic"> for each route. Until the
|
|
832
|
-
// plugin patches this stub, every route falls back to the Layer 3
|
|
833
|
-
// runtime probe, which is the current (slow) behaviour.
|
|
834
|
-
function __VINEXT_CLASS(routeIdx) {
|
|
835
|
-
return null;
|
|
836
|
-
}
|
|
837
|
-
|
|
838
|
-
// Build-time layout classification reasons dispatch. Sibling of
|
|
839
|
-
// __VINEXT_CLASS, returning a per-route Map<layoutIndex, ClassificationReason>
|
|
840
|
-
// that feeds the debug channel when VINEXT_DEBUG_CLASSIFICATION is active.
|
|
841
|
-
// Replaced in renderChunk with a real dispatch table; the stub returns
|
|
842
|
-
// null so the hot path never allocates reason maps when debug is off.
|
|
843
|
-
function __VINEXT_CLASS_REASONS(routeIdx) {
|
|
844
|
-
return null;
|
|
845
|
-
}
|
|
846
|
-
|
|
847
819
|
const routes = [
|
|
848
820
|
${routeEntries.join(",\n")}
|
|
849
821
|
];
|
|
@@ -962,7 +934,7 @@ function hasInterceptionId(interceptionId) {
|
|
|
962
934
|
return __routeMatcher.hasInterceptionId(interceptionId);
|
|
963
935
|
}
|
|
964
936
|
|
|
965
|
-
async function buildPageElements(route, params, routePath, pageRequest,
|
|
937
|
+
async function buildPageElements(route, params, routePath, pageRequest, displayPathname = routePath, scriptNonce) {
|
|
966
938
|
// Hydrate lazy page/route-handler modules before any synchronous read.
|
|
967
939
|
await __ensureRouteLoaded(route);
|
|
968
940
|
return __buildPageElements({
|
|
@@ -977,7 +949,6 @@ async function buildPageElements(route, params, routePath, pageRequest, layoutPa
|
|
|
977
949
|
rootForbiddenModule: ${rootForbiddenVar ? rootForbiddenVar : "null"},
|
|
978
950
|
rootUnauthorizedModule: ${rootUnauthorizedVar ? rootUnauthorizedVar : "null"},
|
|
979
951
|
metadataRoutes,
|
|
980
|
-
layoutParamAccess,
|
|
981
952
|
basePath: __basePath,
|
|
982
953
|
trailingSlash: __trailingSlash,
|
|
983
954
|
htmlLimitedBots: __htmlLimitedBots,
|
|
@@ -1087,7 +1058,6 @@ ${responseStageOnly ? "const __responseStageOptions = {" : "const __appRscHandle
|
|
|
1087
1058
|
dispatchMatchedPage({
|
|
1088
1059
|
bypassInterceptionContextCache,
|
|
1089
1060
|
cachePathname,
|
|
1090
|
-
clientReuseManifest,
|
|
1091
1061
|
cleanPathname,
|
|
1092
1062
|
displayPathname,
|
|
1093
1063
|
formState,
|
|
@@ -1142,7 +1112,7 @@ ${responseStageOnly ? "const __responseStageOptions = {" : "const __appRscHandle
|
|
|
1142
1112
|
ensureRouteLoaded: __ensureRouteLoaded,
|
|
1143
1113
|
clientTraceMetadata: __clientTraceMetadata,
|
|
1144
1114
|
reactMaxHeadersLength: __reactMaxHeadersLength,
|
|
1145
|
-
buildPageElement(targetRoute, targetParams, targetOpts, targetSearchParams,
|
|
1115
|
+
buildPageElement(targetRoute, targetParams, targetOpts, targetSearchParams, buildOptions) {
|
|
1146
1116
|
return buildPageElements(targetRoute, targetParams, cleanPathname, {
|
|
1147
1117
|
opts: targetOpts,
|
|
1148
1118
|
searchParams: targetSearchParams,
|
|
@@ -1154,13 +1124,13 @@ ${responseStageOnly ? "const __responseStageOptions = {" : "const __appRscHandle
|
|
|
1154
1124
|
observePageSearchParamsAccess: buildOptions?.observePageSearchParamsAccess === true,
|
|
1155
1125
|
isForceStatic: buildOptions?.isForceStatic === true,
|
|
1156
1126
|
isUncacheableRender: buildOptions?.isUncacheableRender === true,
|
|
1127
|
+
mountedLayouts: buildOptions?.mountedLayouts ?? null,
|
|
1157
1128
|
serveStreamingMetadata: buildOptions?.serveStreamingMetadata,
|
|
1158
1129
|
placeStreamedMetadataInHead: buildOptions?.placeStreamedMetadataInHead === true,
|
|
1159
1130
|
isProduction: process.env.NODE_ENV === "production",
|
|
1160
1131
|
onHeadPrepared: buildOptions?.onHeadPrepared,
|
|
1161
|
-
},
|
|
1132
|
+
}, displayPathname, scriptNonce);
|
|
1162
1133
|
},
|
|
1163
|
-
clientReuseManifest,
|
|
1164
1134
|
cleanPathname,
|
|
1165
1135
|
displayPathname,
|
|
1166
1136
|
clearRequestContext() {
|
|
@@ -1169,7 +1139,6 @@ ${responseStageOnly ? "const __responseStageOptions = {" : "const __appRscHandle
|
|
|
1169
1139
|
createRscOnErrorHandler(pathname, routePath, overrides) {
|
|
1170
1140
|
return createRscOnErrorHandler(request, pathname, routePath, overrides);
|
|
1171
1141
|
},
|
|
1172
|
-
debugClassification: __classDebug,
|
|
1173
1142
|
draftModeSecret: __draftModeSecret,
|
|
1174
1143
|
dynamicConfig: __segmentConfig.dynamicConfig,
|
|
1175
1144
|
dynamicStaleTimeSeconds: __segmentConfig.dynamicStaleTimeSeconds,
|
|
@@ -1236,10 +1205,9 @@ ${responseStageOnly ? "const __responseStageOptions = {" : "const __appRscHandle
|
|
|
1236
1205
|
skipStaticParamsValidation,
|
|
1237
1206
|
staticParamsValidationParams,
|
|
1238
1207
|
rootParams,
|
|
1239
|
-
probeLayoutAt(li
|
|
1240
|
-
return
|
|
1208
|
+
probeLayoutAt(li) {
|
|
1209
|
+
return __probeAppPageLayout({
|
|
1241
1210
|
layoutIndex: li,
|
|
1242
|
-
layoutParamAccess,
|
|
1243
1211
|
makeThenableParams,
|
|
1244
1212
|
matchedParams: params,
|
|
1245
1213
|
route,
|
|
@@ -1426,6 +1394,7 @@ ${responseStageOnly ? "const __responseStageOptions = {" : "const __appRscHandle
|
|
|
1426
1394
|
);
|
|
1427
1395
|
},
|
|
1428
1396
|
hasPageRoute: __hasPageRoute,
|
|
1397
|
+
currentRoute: routeMatch?.route ?? null,
|
|
1429
1398
|
maxActionBodySize: __MAX_ACTION_BODY_SIZE,
|
|
1430
1399
|
middlewareHeaders: middlewareContext.headers,
|
|
1431
1400
|
readFormDataWithLimit: __readFormDataWithLimit,
|
|
@@ -1515,7 +1484,7 @@ ${responseStageOnly ? "const __responseStageOptions = {" : "const __appRscHandle
|
|
|
1515
1484
|
observeMetadataSearchParamsAccess: observeMetadataSearchParamsAccess === true,
|
|
1516
1485
|
observePageSearchParamsAccess: observePageSearchParamsAccess === true,
|
|
1517
1486
|
isForceStatic: isForceStatic === true,
|
|
1518
|
-
},
|
|
1487
|
+
}, actionCleanPathname, targetScriptNonce ?? scriptNonce);
|
|
1519
1488
|
},
|
|
1520
1489
|
cleanPathname,
|
|
1521
1490
|
clearRequestContext() {
|
|
@@ -1704,9 +1673,9 @@ ${responseStageOnly ? "const __responseStageOptions = {" : "const __appRscHandle
|
|
|
1704
1673
|
const __isEdge = route ? __isEdgeRuntime(__resolveRouteRuntime(route)) : false;
|
|
1705
1674
|
return __fallbackRenderer.renderNotFound(route, isRscRequest, request, matchedParams, scriptNonce, middlewareContext, { isEdgeRuntime: __isEdge });
|
|
1706
1675
|
},
|
|
1707
|
-
${hasPagesDir ? `async renderPagesFallback({ allowRscDocumentFallback, appRouteMatch, dispatchPagesResponseStage, initialResponseHeaders, isDataRequest, isRscRequest, matchKind, middlewareContext, pathname, pagesDataRequest, request, url }) {
|
|
1676
|
+
${hasPagesDir ? `async renderPagesFallback({ allowRscDocumentFallback, appRouteMatch, dispatchPagesResponseStage, initialResponseHeaders, isDataRequest, isRscRequest, matchKind, middlewareContext, pathname, pagesDataRequest, request, sharedAcrossHosts, url }) {
|
|
1708
1677
|
return __renderPagesFallback(
|
|
1709
|
-
{ allowRscDocumentFallback, appRouteMatch, initialResponseHeaders, isDataRequest, isRscRequest, matchKind, middlewareContext, pathname, pagesDataRequest, request, url },
|
|
1678
|
+
{ allowRscDocumentFallback, appRouteMatch, initialResponseHeaders, isDataRequest, isRscRequest, matchKind, middlewareContext, pathname, pagesDataRequest, request, sharedAcrossHosts, url },
|
|
1710
1679
|
{
|
|
1711
1680
|
async loadPagesEntry() {
|
|
1712
1681
|
const __pagesEntry = await __ensureHybridPagesApplication();
|
|
@@ -1725,8 +1694,8 @@ ${responseStageOnly ? "const __responseStageOptions = {" : "const __appRscHandle
|
|
|
1725
1694
|
...(typeof __pagesEntry.renderPage === "function"
|
|
1726
1695
|
? {
|
|
1727
1696
|
renderPage(stageRequest, pagesUrl) {
|
|
1728
|
-
const
|
|
1729
|
-
return dispatchPagesResponseStage(stageRequest, "page", dataKind, __pagesEntry.hasRequestAwareDocument);
|
|
1697
|
+
const route = __pagesEntry.matchPageRoute?.(pagesUrl, stageRequest)?.route;
|
|
1698
|
+
return dispatchPagesResponseStage(stageRequest, "page", route?.dataKind, __pagesEntry.hasRequestAwareDocument, route?.runsInitialProps === true);
|
|
1730
1699
|
},
|
|
1731
1700
|
}
|
|
1732
1701
|
: {}),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { toSlash } from "../deps/.pnpm/pathslash@0.1.0/deps/pathslash/dist/index.js";
|
|
2
|
-
import { computeAppRouteStaticSiblings, convertSegmentsToRouteParts } from "../routing/app-route-graph.js";
|
|
2
|
+
import { computeAppRouteStaticSiblings, convertSegmentsToRouteParts, findSlotPageTreePosition } from "../routing/app-route-graph.js";
|
|
3
3
|
import { appRouteHasMainTreeLoadingBoundary, appRouteLayoutStaticParamsGroups } from "../routing/app-router.js";
|
|
4
4
|
import { createMetadataRouteEntriesSource } from "../server/metadata-route-build-data.js";
|
|
5
5
|
//#region src/entries/app-rsc-manifest.ts
|
|
@@ -140,7 +140,7 @@ function lazyLoaderArray(filePaths, imports) {
|
|
|
140
140
|
return `[${filePaths.map((filePath) => filePath ? imports.getLazyLoaderVar(filePath) : "null").join(", ")}]`;
|
|
141
141
|
}
|
|
142
142
|
function buildRouteEntries(routes, imports) {
|
|
143
|
-
return routes.map((route
|
|
143
|
+
return routes.map((route) => {
|
|
144
144
|
const staticSiblings = route.isDynamic ? computeAppRouteStaticSiblings(routes, route) : [];
|
|
145
145
|
const layoutLoaders = lazyLoaderArray(route.layouts, imports);
|
|
146
146
|
const templateLoaders = lazyLoaderArray(route.templates, imports);
|
|
@@ -232,6 +232,7 @@ function buildRouteEntries(routes, imports) {
|
|
|
232
232
|
configLayouts: ${moduleArray(slot.configLayoutPaths?.length ?? 0)},
|
|
233
233
|
__loadConfigLayouts: ${lazyLoaderArray(slot.configLayoutPaths ?? [], imports)},
|
|
234
234
|
configLayoutTreePositions: ${JSON.stringify(slot.configLayoutTreePositions ?? [])},
|
|
235
|
+
pageTreePosition: ${findSlotPageTreePosition(slot) ?? "null"},
|
|
235
236
|
loading: null,
|
|
236
237
|
__loadLoading: ${slot.loadingPath ? imports.getLazyLoaderVar(slot.loadingPath) : "null"},
|
|
237
238
|
loadings: ${moduleArray(slot.loadingPaths?.length ?? 0)},
|
|
@@ -264,8 +265,6 @@ ${interceptEntries.join(",\n")}
|
|
|
264
265
|
const loadPageField = route.pagePath ? imports.getLazyLoaderVar(route.pagePath) : "null";
|
|
265
266
|
const loadRouteHandlerField = route.routePath ? imports.getLazyLoaderVar(route.routePath) : "null";
|
|
266
267
|
return ` {
|
|
267
|
-
__buildTimeClassifications: __VINEXT_CLASS(${routeIdx}), // evaluated once at module load
|
|
268
|
-
__buildTimeReasons: __classDebug ? __VINEXT_CLASS_REASONS(${routeIdx}) : null,
|
|
269
268
|
canUseCanonicalLoadingShell: ${appRouteHasMainTreeLoadingBoundary(route)},
|
|
270
269
|
ids: ${JSON.stringify(route.ids ?? null)},
|
|
271
270
|
pattern: ${JSON.stringify(route.pattern)},
|