@vitejs/plugin-rsc 0.5.27 → 0.5.28
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 +34 -18
- package/dist/browser.d.ts +3 -3
- package/dist/{cjs-BspwazE6.js → cjs-Cxg_7upE.js} +3 -3
- package/dist/client-BrwlzXgg.d.ts +19 -0
- package/dist/core/browser.d.ts +1 -1
- package/dist/core/browser.js +2 -2
- package/dist/core/plugin.d.ts +0 -1
- package/dist/core/rsc.d.ts +1 -19
- package/dist/core/rsc.js +20 -4
- package/dist/core/ssr.d.ts +1 -2
- package/dist/core/ssr.js +2 -2
- package/dist/{encryption-utils-CRBgMeBq.js → encryption-utils-BNbYHtC4.js} +1 -1
- package/dist/{index-DViteJjw.d.ts → index-BjJe9jqG.d.ts} +35 -12
- package/dist/{index-BrXJaflA.d.ts → index-CqNlZcWp.d.ts} +12 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/{picocolors-CEw5D0BV.js → picocolors-DFVOi1sR.js} +4 -2
- package/dist/{plugin-BK29Va7z.js → plugin-BOTpkess.js} +29 -15
- package/dist/{plugin-Bm-Fb4g7.d.ts → plugin-CaLiN8ED.d.ts} +71 -64
- package/dist/plugin.d.ts +2 -2
- package/dist/plugin.js +1 -1
- package/dist/plugins/cjs.d.ts +0 -1
- package/dist/plugins/cjs.js +1 -1
- package/dist/react/browser.d.ts +2 -3
- package/dist/react/rsc/client.d.ts +2 -0
- package/dist/react/rsc/client.js +16 -0
- package/dist/react/rsc/server.d.ts +3 -0
- package/dist/react/rsc/server.js +20 -0
- package/dist/react/rsc.d.ts +3 -24
- package/dist/react/rsc.js +3 -31
- package/dist/react/ssr.d.ts +4 -3
- package/dist/react/ssr.js +3 -1
- package/dist/rsc/client.d.ts +2 -0
- package/dist/rsc/client.js +3 -0
- package/dist/rsc/server.d.ts +16 -0
- package/dist/rsc/server.js +20 -0
- package/dist/rsc-CGkkhLG3.d.ts +21 -0
- package/dist/rsc.d.ts +4 -16
- package/dist/rsc.js +4 -41
- package/dist/{scope-Bwt9GVLP.js → scope-Do08R7C2.js} +1 -1
- package/dist/server-DTkvSyJT.d.ts +20 -0
- package/dist/shared-D42sHPD1.js +25 -0
- package/dist/{shared-BVLpj0Y8.js → shared-Y4B6DJ99.js} +2 -1
- package/dist/ssr.d.ts +12 -12
- package/dist/ssr.js +12 -7
- package/dist/transforms/index.d.ts +1 -1
- package/dist/transforms/index.js +39 -28
- package/dist/utils/encryption-runtime.js +5 -5
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-client.browser.development.js +2 -2
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-server.node.development.js +70 -33
- package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-server.node.production.js +69 -29
- package/dist/vendor/react-server-dom/package.json +3 -3
- package/package.json +11 -11
- /package/dist/{browser-C_qguV-a.d.ts → browser-DI_Wyg5Y.d.ts} +0 -0
- /package/dist/{dist-rz-Bnebz.js → dist-uqdtSkzK.js} +0 -0
- /package/dist/{shared-DeahDSXi.js → shared-B6H2TbnP.js} +0 -0
package/dist/ssr.d.ts
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
+
import { s as EncodeFormActionCallback } from "./index-CqNlZcWp.js";
|
|
1
2
|
import { createServerConsumerManifest, setRequireModule } from "./core/ssr.js";
|
|
2
|
-
import { i as ResolvedAssetDeps } from "./plugin-
|
|
3
|
-
import { callServer, createFromReadableStream, createServerReference, findSourceMapURL } from "./react/ssr.js";
|
|
4
|
-
|
|
3
|
+
import { i as ResolvedAssetDeps } from "./plugin-CaLiN8ED.js";
|
|
4
|
+
import { callServer, createFromReadableStream, createServerReference, createTemporaryReferenceSet, encodeReply, findSourceMapURL } from "./react/ssr.js";
|
|
5
5
|
//#region src/ssr.d.ts
|
|
6
6
|
/**
|
|
7
|
-
* Callback type for client reference dependency notifications.
|
|
8
|
-
* Called during SSR when a client component's dependencies are loaded.
|
|
9
|
-
* @experimental
|
|
10
|
-
*/
|
|
7
|
+
* Callback type for client reference dependency notifications.
|
|
8
|
+
* Called during SSR when a client component's dependencies are loaded.
|
|
9
|
+
* @experimental
|
|
10
|
+
*/
|
|
11
11
|
type OnClientReference = (reference: {
|
|
12
12
|
id: string;
|
|
13
13
|
deps: ResolvedAssetDeps;
|
|
14
14
|
}) => void;
|
|
15
15
|
/**
|
|
16
|
-
* Register a callback to be notified when client reference dependencies are loaded.
|
|
17
|
-
* Called during SSR when a client component is accessed.
|
|
18
|
-
* @experimental
|
|
19
|
-
*/
|
|
16
|
+
* Register a callback to be notified when client reference dependencies are loaded.
|
|
17
|
+
* Called during SSR when a client component is accessed.
|
|
18
|
+
* @experimental
|
|
19
|
+
*/
|
|
20
20
|
declare function setOnClientReference(callback: OnClientReference | undefined): void;
|
|
21
21
|
//#endregion
|
|
22
|
-
export { OnClientReference, callServer, createFromReadableStream, createServerConsumerManifest, createServerReference, findSourceMapURL, setOnClientReference, setRequireModule };
|
|
22
|
+
export { type EncodeFormActionCallback, OnClientReference, callServer, createFromReadableStream, createServerConsumerManifest, createServerReference, createTemporaryReferenceSet, encodeReply, findSourceMapURL, setOnClientReference, setRequireModule };
|
package/dist/ssr.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as toReferenceValidationVirtual, i as toCssVirtual } from "./shared-
|
|
1
|
+
import { a as toReferenceValidationVirtual, i as toCssVirtual } from "./shared-B6H2TbnP.js";
|
|
2
2
|
import { createServerConsumerManifest, setRequireModule } from "./core/ssr.js";
|
|
3
|
-
import { callServer, createFromReadableStream, createServerReference, findSourceMapURL } from "./react/ssr.js";
|
|
3
|
+
import { callServer, createFromReadableStream, createServerReference, createTemporaryReferenceSet, encodeReply, findSourceMapURL } from "./react/ssr.js";
|
|
4
4
|
import * as clientReferences from "virtual:vite-rsc/client-references";
|
|
5
5
|
import * as ReactDOM from "react-dom";
|
|
6
6
|
import assetsManifest from "virtual:vite-rsc/assets-manifest";
|
|
@@ -67,14 +67,19 @@ function wrapResourceProxy(mod, id, deps) {
|
|
|
67
67
|
} });
|
|
68
68
|
}
|
|
69
69
|
function preloadDeps(deps) {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
70
|
+
const clientEntryJsSet = new Set(assetsManifest.clientEntryDeps?.js ?? []);
|
|
71
|
+
for (const href of deps.js) {
|
|
72
|
+
const options = {
|
|
73
|
+
as: "script",
|
|
74
|
+
crossOrigin: ""
|
|
75
|
+
};
|
|
76
|
+
if (!clientEntryJsSet.has(href)) options.fetchPriority = "low";
|
|
77
|
+
ReactDOM.preloadModule(href, options);
|
|
78
|
+
}
|
|
74
79
|
for (const href of deps.css) ReactDOM.preinit(href, {
|
|
75
80
|
as: "style",
|
|
76
81
|
precedence: assetsManifest.cssLinkPrecedence !== false ? "vite-rsc/client-reference" : void 0
|
|
77
82
|
});
|
|
78
83
|
}
|
|
79
84
|
//#endregion
|
|
80
|
-
export { callServer, createFromReadableStream, createServerConsumerManifest, createServerReference, findSourceMapURL, setOnClientReference, setRequireModule };
|
|
85
|
+
export { callServer, createFromReadableStream, createServerConsumerManifest, createServerReference, createTemporaryReferenceSet, encodeReply, findSourceMapURL, setOnClientReference, setRequireModule };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as extractIdentifiers, c as validateNonAsyncFunction, d as transformProxyExport, f as TransformWrapExportFilter, g as transformHoistInlineDirective, h as findDirectives, i as transformServerActionServer, l as TransformProxyExportOptions, m as transformWrapExport, n as TransformExpandExportAllOptions, o as extractNames, p as TransformWrapExportOptions, r as transformExpandExportAll, s as hasDirective, t as TransformExpandExportAllContext, u as transformDirectiveProxyExport } from "../index-
|
|
1
|
+
import { a as extractIdentifiers, c as validateNonAsyncFunction, d as transformProxyExport, f as TransformWrapExportFilter, g as transformHoistInlineDirective, h as findDirectives, i as transformServerActionServer, l as TransformProxyExportOptions, m as transformWrapExport, n as TransformExpandExportAllOptions, o as extractNames, p as TransformWrapExportOptions, r as transformExpandExportAll, s as hasDirective, t as TransformExpandExportAllContext, u as transformDirectiveProxyExport } from "../index-BjJe9jqG.js";
|
|
2
2
|
export { TransformExpandExportAllContext, TransformExpandExportAllOptions, TransformProxyExportOptions, TransformWrapExportFilter, TransformWrapExportOptions, extractIdentifiers, extractNames, findDirectives, hasDirective, transformDirectiveProxyExport, transformExpandExportAll, transformHoistInlineDirective, transformProxyExport, transformServerActionServer, transformWrapExport, validateNonAsyncFunction };
|
package/dist/transforms/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as tinyassert } from "../dist-
|
|
2
|
-
import { a as validateNonAsyncFunction, i as hasDirective, n as extractIdentifiers, r as extractNames, t as buildScopeTree } from "../scope-
|
|
1
|
+
import { i as tinyassert } from "../dist-uqdtSkzK.js";
|
|
2
|
+
import { a as validateNonAsyncFunction, i as hasDirective, n as extractIdentifiers, r as extractNames, t as buildScopeTree } from "../scope-Do08R7C2.js";
|
|
3
3
|
import MagicString from "magic-string";
|
|
4
4
|
import { walk } from "estree-walker";
|
|
5
5
|
//#region src/transforms/hoist.ts
|
|
@@ -163,17 +163,21 @@ function transformWrapExport(input, ast, options) {
|
|
|
163
163
|
const toAppend = [];
|
|
164
164
|
const filter = options.filter ?? (() => true);
|
|
165
165
|
function wrapSimple(start, end, exports) {
|
|
166
|
-
|
|
167
|
-
|
|
166
|
+
const filteredExports = exports.map((item) => ({
|
|
167
|
+
...item,
|
|
168
|
+
shouldWrap: filter(item.name, item.meta)
|
|
169
|
+
}));
|
|
170
|
+
exportNames.push(...filteredExports.filter((item) => item.shouldWrap).map((item) => item.name));
|
|
171
|
+
const newCode = filteredExports.map((e) => [e.shouldWrap && `${e.name} = /* #__PURE__ */ ${options.runtime(e.name, e.name, e.meta)};\n`, `export { ${e.name} };\n`]).flat().filter(Boolean).join("");
|
|
168
172
|
output.update(start, end, newCode);
|
|
169
173
|
output.move(start, end, input.length);
|
|
170
174
|
}
|
|
171
175
|
function wrapExport(name, exportName, meta = {}) {
|
|
172
|
-
exportNames.push(exportName);
|
|
173
176
|
if (!filter(exportName, meta)) {
|
|
174
177
|
toAppend.push(`export { ${name} as ${exportName} }`);
|
|
175
178
|
return;
|
|
176
179
|
}
|
|
180
|
+
exportNames.push(exportName);
|
|
177
181
|
toAppend.push(`const $$wrap_${name} = /* #__PURE__ */ ${options.runtime(name, exportName, meta)}`, `export { $$wrap_${name} as ${exportName} }`);
|
|
178
182
|
}
|
|
179
183
|
for (const node of ast.body) {
|
|
@@ -181,34 +185,35 @@ function transformWrapExport(input, ast, options) {
|
|
|
181
185
|
/**
|
|
182
186
|
* export function foo() {}
|
|
183
187
|
*/
|
|
184
|
-
validateNonAsyncFunction(options, node.declaration);
|
|
185
188
|
const name = node.declaration.id.name;
|
|
189
|
+
const meta = {
|
|
190
|
+
isFunction: getIsFunction(node.declaration),
|
|
191
|
+
declName: name
|
|
192
|
+
};
|
|
193
|
+
if (filter(name, meta)) validateNonAsyncFunction(options, node.declaration);
|
|
186
194
|
wrapSimple(node.start, node.declaration.start, [{
|
|
187
195
|
name,
|
|
188
|
-
meta
|
|
189
|
-
isFunction: true,
|
|
190
|
-
declName: name
|
|
191
|
-
}
|
|
196
|
+
meta
|
|
192
197
|
}]);
|
|
193
198
|
} else if (node.declaration.type === "VariableDeclaration") {
|
|
194
199
|
/**
|
|
195
200
|
* export const foo = 1, bar = 2
|
|
196
201
|
*/
|
|
197
|
-
for (const decl of node.declaration.declarations) if (decl.init) validateNonAsyncFunction(options, decl.init);
|
|
198
202
|
if (node.declaration.kind === "const") output.update(node.declaration.start, node.declaration.start + 5, "let");
|
|
199
|
-
const
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
const
|
|
203
|
-
|
|
203
|
+
const exports = [];
|
|
204
|
+
for (const decl of node.declaration.declarations) {
|
|
205
|
+
const isFunction = decl.id.type === "Identifier" && decl.init ? getIsFunction(decl.init) : void 0;
|
|
206
|
+
const declarationExports = extractNames(decl.id).map((name) => ({
|
|
207
|
+
name,
|
|
208
|
+
meta: {
|
|
209
|
+
isFunction,
|
|
210
|
+
declName: name
|
|
211
|
+
}
|
|
212
|
+
}));
|
|
213
|
+
exports.push(...declarationExports);
|
|
214
|
+
if (decl.init && declarationExports.some(({ name, meta }) => filter(name, meta))) validateNonAsyncFunction(options, decl.init);
|
|
204
215
|
}
|
|
205
|
-
wrapSimple(node.start, node.declaration.start,
|
|
206
|
-
name,
|
|
207
|
-
meta: {
|
|
208
|
-
isFunction,
|
|
209
|
-
declName: name
|
|
210
|
-
}
|
|
211
|
-
})));
|
|
216
|
+
wrapSimple(node.start, node.declaration.start, exports);
|
|
212
217
|
} else node.declaration;
|
|
213
218
|
else if (node.source) {
|
|
214
219
|
/**
|
|
@@ -246,26 +251,28 @@ function transformWrapExport(input, ast, options) {
|
|
|
246
251
|
* export default () => {}
|
|
247
252
|
*/
|
|
248
253
|
if (node.type === "ExportDefaultDeclaration") {
|
|
249
|
-
validateNonAsyncFunction(options, node.declaration);
|
|
250
254
|
let localName;
|
|
251
|
-
let isFunction
|
|
255
|
+
let isFunction;
|
|
252
256
|
let declName;
|
|
253
257
|
let defaultExportIdentifierName;
|
|
254
258
|
if ((node.declaration.type === "FunctionDeclaration" || node.declaration.type === "ClassDeclaration") && node.declaration.id) {
|
|
255
259
|
localName = node.declaration.id.name;
|
|
256
260
|
output.remove(node.start, node.declaration.start);
|
|
257
|
-
isFunction = node.declaration
|
|
261
|
+
isFunction = getIsFunction(node.declaration);
|
|
258
262
|
declName = node.declaration.id.name;
|
|
259
263
|
} else {
|
|
260
264
|
localName = "$$default";
|
|
261
265
|
output.update(node.start, node.declaration.start, "const $$default = ");
|
|
262
266
|
if (node.declaration.type === "Identifier") defaultExportIdentifierName = node.declaration.name;
|
|
267
|
+
else isFunction = getIsFunction(node.declaration);
|
|
263
268
|
}
|
|
264
|
-
|
|
269
|
+
const defaultMeta = {
|
|
265
270
|
isFunction,
|
|
266
271
|
declName,
|
|
267
272
|
defaultExportIdentifierName
|
|
268
|
-
}
|
|
273
|
+
};
|
|
274
|
+
if (filter("default", defaultMeta)) validateNonAsyncFunction(options, node.declaration);
|
|
275
|
+
wrapExport(localName, "default", defaultMeta);
|
|
269
276
|
}
|
|
270
277
|
}
|
|
271
278
|
if (toAppend.length > 0) output.append([
|
|
@@ -278,6 +285,10 @@ function transformWrapExport(input, ast, options) {
|
|
|
278
285
|
output
|
|
279
286
|
};
|
|
280
287
|
}
|
|
288
|
+
function getIsFunction(node) {
|
|
289
|
+
if (node.type === "FunctionDeclaration" || node.type === "ArrowFunctionExpression" || node.type === "FunctionExpression") return true;
|
|
290
|
+
if (node.type === "ClassDeclaration" || node.type === "Literal" || node.type === "ObjectExpression" || node.type === "ArrayExpression" || node.type === "ClassExpression") return false;
|
|
291
|
+
}
|
|
281
292
|
//#endregion
|
|
282
293
|
//#region src/transforms/proxy-export.ts
|
|
283
294
|
function transformDirectiveProxyExport(ast, options) {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { r as once } from "../dist-
|
|
2
|
-
import { a as fromBase64, i as encryptBuffer, n as concatArrayStream, r as decryptBuffer, t as arrayToStream } from "../encryption-utils-
|
|
3
|
-
import {
|
|
1
|
+
import { r as once } from "../dist-uqdtSkzK.js";
|
|
2
|
+
import { a as fromBase64, i as encryptBuffer, n as concatArrayStream, r as decryptBuffer, t as arrayToStream } from "../encryption-utils-BNbYHtC4.js";
|
|
3
|
+
import { renderToReadableStream } from "../react/rsc/server.js";
|
|
4
4
|
import encryptionKeySource from "virtual:vite-rsc/encryption-key";
|
|
5
5
|
//#region src/utils/encryption-runtime.ts
|
|
6
6
|
async function encryptActionBoundArgs(originalValue) {
|
|
7
7
|
return encryptBuffer(await concatArrayStream(renderToReadableStream(originalValue)), await getEncryptionKey());
|
|
8
8
|
}
|
|
9
9
|
async function decryptActionBoundArgs(encrypted) {
|
|
10
|
-
const serializedBuffer = await decryptBuffer(await encrypted, await getEncryptionKey());
|
|
10
|
+
const [{ createFromReadableStream }, serializedBuffer] = await Promise.all([import("../react/rsc/client.js"), decryptBuffer(await encrypted, await getEncryptionKey())]);
|
|
11
11
|
return createFromReadableStream(arrayToStream(new Uint8Array(serializedBuffer)));
|
|
12
12
|
}
|
|
13
|
-
const getEncryptionKey = /*
|
|
13
|
+
const getEncryptionKey = /* #__PURE__ */ once(async () => {
|
|
14
14
|
const resolved = await encryptionKeySource();
|
|
15
15
|
return await crypto.subtle.importKey("raw", fromBase64(resolved), { name: "AES-GCM" }, true, ["encrypt", "decrypt"]);
|
|
16
16
|
});
|
package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-client.browser.development.js
CHANGED
|
@@ -4901,10 +4901,10 @@
|
|
|
4901
4901
|
return hook.checkDCE ? !0 : !1;
|
|
4902
4902
|
})({
|
|
4903
4903
|
bundleType: 1,
|
|
4904
|
-
version: "19.2.
|
|
4904
|
+
version: "19.2.7",
|
|
4905
4905
|
rendererPackageName: "react-server-dom-webpack",
|
|
4906
4906
|
currentDispatcherRef: ReactSharedInternals,
|
|
4907
|
-
reconcilerVersion: "19.2.
|
|
4907
|
+
reconcilerVersion: "19.2.7",
|
|
4908
4908
|
getCurrentComponentInfo: function () {
|
|
4909
4909
|
return currentOwnerInDEV;
|
|
4910
4910
|
}
|
package/dist/vendor/react-server-dom/cjs/react-server-dom-webpack-server.node.development.js
CHANGED
|
@@ -6392,20 +6392,58 @@
|
|
|
6392
6392
|
webpackMap,
|
|
6393
6393
|
options
|
|
6394
6394
|
) {
|
|
6395
|
-
|
|
6395
|
+
function flush() {
|
|
6396
|
+
for (; null !== head; ) {
|
|
6397
|
+
var current = head;
|
|
6398
|
+
if (!current.complete) return;
|
|
6399
|
+
try {
|
|
6400
|
+
var response = response$jscomp$0,
|
|
6401
|
+
key = current.name,
|
|
6402
|
+
handle = current.file,
|
|
6403
|
+
blob = new Blob(handle.chunks, { type: handle.mime }),
|
|
6404
|
+
backingStore = response._formData;
|
|
6405
|
+
response = key;
|
|
6406
|
+
backingStore.data.append(response, blob, handle.filename);
|
|
6407
|
+
var keys = backingStore.keys;
|
|
6408
|
+
null === keys
|
|
6409
|
+
? ((backingStore.keys = Array.from(backingStore.data.keys())),
|
|
6410
|
+
(backingStore.keyPointer = 0))
|
|
6411
|
+
: keys.push(response);
|
|
6412
|
+
var queuedFields = current.queuedFields;
|
|
6413
|
+
if (null !== queuedFields)
|
|
6414
|
+
for (response = 0; response < queuedFields.length; response += 2)
|
|
6415
|
+
resolveField(
|
|
6416
|
+
response$jscomp$0,
|
|
6417
|
+
queuedFields[response],
|
|
6418
|
+
queuedFields[response + 1]
|
|
6419
|
+
);
|
|
6420
|
+
} catch (error) {
|
|
6421
|
+
busboyStream.destroy(error);
|
|
6422
|
+
return;
|
|
6423
|
+
}
|
|
6424
|
+
head = current.next;
|
|
6425
|
+
}
|
|
6426
|
+
tail = null;
|
|
6427
|
+
bodyFinished && !closed && ((closed = !0), close(response$jscomp$0));
|
|
6428
|
+
}
|
|
6429
|
+
var response$jscomp$0 = createResponse(
|
|
6396
6430
|
webpackMap,
|
|
6397
6431
|
"",
|
|
6398
6432
|
options ? options.temporaryReferences : void 0,
|
|
6399
6433
|
void 0,
|
|
6400
6434
|
options ? options.arraySizeLimit : void 0
|
|
6401
6435
|
),
|
|
6402
|
-
|
|
6403
|
-
|
|
6436
|
+
head = null,
|
|
6437
|
+
tail = null,
|
|
6438
|
+
bodyFinished = !1,
|
|
6439
|
+
closed = !1;
|
|
6404
6440
|
busboyStream.on("field", function (name, value) {
|
|
6405
|
-
if (
|
|
6441
|
+
if (null !== tail)
|
|
6442
|
+
null === tail.queuedFields && (tail.queuedFields = []),
|
|
6443
|
+
tail.queuedFields.push(name, value);
|
|
6406
6444
|
else
|
|
6407
6445
|
try {
|
|
6408
|
-
resolveField(response, name, value);
|
|
6446
|
+
resolveField(response$jscomp$0, name, value);
|
|
6409
6447
|
} catch (error) {
|
|
6410
6448
|
busboyStream.destroy(error);
|
|
6411
6449
|
}
|
|
@@ -6420,46 +6458,45 @@
|
|
|
6420
6458
|
)
|
|
6421
6459
|
);
|
|
6422
6460
|
else {
|
|
6423
|
-
|
|
6424
|
-
|
|
6461
|
+
var file = { chunks: [], filename: filename, mime: mimeType },
|
|
6462
|
+
pendingFile = {
|
|
6463
|
+
name: name,
|
|
6464
|
+
file: file,
|
|
6465
|
+
complete: !1,
|
|
6466
|
+
queuedFields: null,
|
|
6467
|
+
next: null
|
|
6468
|
+
};
|
|
6469
|
+
null === tail ? (head = pendingFile) : (tail.next = pendingFile);
|
|
6470
|
+
tail = pendingFile;
|
|
6425
6471
|
value.on("data", function (chunk) {
|
|
6426
|
-
JSCompiler_object_inline_chunks_266.push(chunk);
|
|
6427
|
-
});
|
|
6428
|
-
value.on("end", function () {
|
|
6429
6472
|
try {
|
|
6430
|
-
|
|
6431
|
-
type: mimeType
|
|
6432
|
-
}),
|
|
6433
|
-
backingStore = response._formData;
|
|
6434
|
-
backingStore.data.append(name, blob, filename);
|
|
6435
|
-
var keys = backingStore.keys;
|
|
6436
|
-
null === keys
|
|
6437
|
-
? ((backingStore.keys = Array.from(backingStore.data.keys())),
|
|
6438
|
-
(backingStore.keyPointer = 0))
|
|
6439
|
-
: keys.push(name);
|
|
6440
|
-
pendingFiles--;
|
|
6441
|
-
if (0 === pendingFiles) {
|
|
6442
|
-
for (blob = 0; blob < queuedFields.length; blob += 2)
|
|
6443
|
-
resolveField(
|
|
6444
|
-
response,
|
|
6445
|
-
queuedFields[blob],
|
|
6446
|
-
queuedFields[blob + 1]
|
|
6447
|
-
);
|
|
6448
|
-
queuedFields.length = 0;
|
|
6449
|
-
}
|
|
6473
|
+
file.chunks.push(chunk);
|
|
6450
6474
|
} catch (error) {
|
|
6451
6475
|
busboyStream.destroy(error);
|
|
6452
6476
|
}
|
|
6453
6477
|
});
|
|
6478
|
+
value.on("error", function (error) {
|
|
6479
|
+
busboyStream.destroy(error);
|
|
6480
|
+
});
|
|
6481
|
+
value.on("end", function () {
|
|
6482
|
+
pendingFile.complete = !0;
|
|
6483
|
+
flush();
|
|
6484
|
+
});
|
|
6454
6485
|
}
|
|
6455
6486
|
});
|
|
6456
6487
|
busboyStream.on("finish", function () {
|
|
6457
|
-
|
|
6488
|
+
bodyFinished = !0;
|
|
6489
|
+
flush();
|
|
6490
|
+
closed ||
|
|
6491
|
+
reportGlobalError(
|
|
6492
|
+
response$jscomp$0,
|
|
6493
|
+
Error("Reply finished with incomplete file part.")
|
|
6494
|
+
);
|
|
6458
6495
|
});
|
|
6459
6496
|
busboyStream.on("error", function (err) {
|
|
6460
|
-
reportGlobalError(response, err);
|
|
6497
|
+
reportGlobalError(response$jscomp$0, err);
|
|
6461
6498
|
});
|
|
6462
|
-
return getChunk(response, 0);
|
|
6499
|
+
return getChunk(response$jscomp$0, 0);
|
|
6463
6500
|
};
|
|
6464
6501
|
exports.prerender = function (model, webpackMap, options) {
|
|
6465
6502
|
return new Promise(function (resolve, reject) {
|
|
@@ -3574,6 +3574,43 @@ exports.decodeReplyFromAsyncIterable = function (
|
|
|
3574
3574
|
return getChunk(response, 0);
|
|
3575
3575
|
};
|
|
3576
3576
|
exports.decodeReplyFromBusboy = function (busboyStream, webpackMap, options) {
|
|
3577
|
+
function flush() {
|
|
3578
|
+
for (; null !== head; ) {
|
|
3579
|
+
var current = head;
|
|
3580
|
+
if (!current.complete) return;
|
|
3581
|
+
try {
|
|
3582
|
+
var key = current.name,
|
|
3583
|
+
handle = current.file,
|
|
3584
|
+
blob = new Blob(handle.chunks, { type: handle.mime }),
|
|
3585
|
+
backingStore = response._formData,
|
|
3586
|
+
key$jscomp$0 = key;
|
|
3587
|
+
backingStore.data.append(key$jscomp$0, blob, handle.filename);
|
|
3588
|
+
var keys = backingStore.keys;
|
|
3589
|
+
null === keys
|
|
3590
|
+
? ((backingStore.keys = Array.from(backingStore.data.keys())),
|
|
3591
|
+
(backingStore.keyPointer = 0))
|
|
3592
|
+
: keys.push(key$jscomp$0);
|
|
3593
|
+
var queuedFields = current.queuedFields;
|
|
3594
|
+
if (null !== queuedFields)
|
|
3595
|
+
for (
|
|
3596
|
+
key$jscomp$0 = 0;
|
|
3597
|
+
key$jscomp$0 < queuedFields.length;
|
|
3598
|
+
key$jscomp$0 += 2
|
|
3599
|
+
)
|
|
3600
|
+
resolveField(
|
|
3601
|
+
response,
|
|
3602
|
+
queuedFields[key$jscomp$0],
|
|
3603
|
+
queuedFields[key$jscomp$0 + 1]
|
|
3604
|
+
);
|
|
3605
|
+
} catch (error) {
|
|
3606
|
+
busboyStream.destroy(error);
|
|
3607
|
+
return;
|
|
3608
|
+
}
|
|
3609
|
+
head = current.next;
|
|
3610
|
+
}
|
|
3611
|
+
tail = null;
|
|
3612
|
+
bodyFinished && !closed && ((closed = !0), close(response));
|
|
3613
|
+
}
|
|
3577
3614
|
var response = createResponse(
|
|
3578
3615
|
webpackMap,
|
|
3579
3616
|
"",
|
|
@@ -3581,10 +3618,14 @@ exports.decodeReplyFromBusboy = function (busboyStream, webpackMap, options) {
|
|
|
3581
3618
|
void 0,
|
|
3582
3619
|
options ? options.arraySizeLimit : void 0
|
|
3583
3620
|
),
|
|
3584
|
-
|
|
3585
|
-
|
|
3621
|
+
head = null,
|
|
3622
|
+
tail = null,
|
|
3623
|
+
bodyFinished = !1,
|
|
3624
|
+
closed = !1;
|
|
3586
3625
|
busboyStream.on("field", function (name, value) {
|
|
3587
|
-
if (
|
|
3626
|
+
if (null !== tail)
|
|
3627
|
+
null === tail.queuedFields && (tail.queuedFields = []),
|
|
3628
|
+
tail.queuedFields.push(name, value);
|
|
3588
3629
|
else
|
|
3589
3630
|
try {
|
|
3590
3631
|
resolveField(response, name, value);
|
|
@@ -3602,41 +3643,40 @@ exports.decodeReplyFromBusboy = function (busboyStream, webpackMap, options) {
|
|
|
3602
3643
|
)
|
|
3603
3644
|
);
|
|
3604
3645
|
else {
|
|
3605
|
-
|
|
3606
|
-
|
|
3646
|
+
var file = { chunks: [], filename: filename, mime: mimeType },
|
|
3647
|
+
pendingFile = {
|
|
3648
|
+
name: name,
|
|
3649
|
+
file: file,
|
|
3650
|
+
complete: !1,
|
|
3651
|
+
queuedFields: null,
|
|
3652
|
+
next: null
|
|
3653
|
+
};
|
|
3654
|
+
null === tail ? (head = pendingFile) : (tail.next = pendingFile);
|
|
3655
|
+
tail = pendingFile;
|
|
3607
3656
|
value.on("data", function (chunk) {
|
|
3608
|
-
JSCompiler_object_inline_chunks_296.push(chunk);
|
|
3609
|
-
});
|
|
3610
|
-
value.on("end", function () {
|
|
3611
3657
|
try {
|
|
3612
|
-
|
|
3613
|
-
type: mimeType
|
|
3614
|
-
}),
|
|
3615
|
-
backingStore = response._formData;
|
|
3616
|
-
backingStore.data.append(name, blob, filename);
|
|
3617
|
-
var keys = backingStore.keys;
|
|
3618
|
-
null === keys
|
|
3619
|
-
? ((backingStore.keys = Array.from(backingStore.data.keys())),
|
|
3620
|
-
(backingStore.keyPointer = 0))
|
|
3621
|
-
: keys.push(name);
|
|
3622
|
-
pendingFiles--;
|
|
3623
|
-
if (0 === pendingFiles) {
|
|
3624
|
-
for (blob = 0; blob < queuedFields.length; blob += 2)
|
|
3625
|
-
resolveField(
|
|
3626
|
-
response,
|
|
3627
|
-
queuedFields[blob],
|
|
3628
|
-
queuedFields[blob + 1]
|
|
3629
|
-
);
|
|
3630
|
-
queuedFields.length = 0;
|
|
3631
|
-
}
|
|
3658
|
+
file.chunks.push(chunk);
|
|
3632
3659
|
} catch (error) {
|
|
3633
3660
|
busboyStream.destroy(error);
|
|
3634
3661
|
}
|
|
3635
3662
|
});
|
|
3663
|
+
value.on("error", function (error) {
|
|
3664
|
+
busboyStream.destroy(error);
|
|
3665
|
+
});
|
|
3666
|
+
value.on("end", function () {
|
|
3667
|
+
pendingFile.complete = !0;
|
|
3668
|
+
flush();
|
|
3669
|
+
});
|
|
3636
3670
|
}
|
|
3637
3671
|
});
|
|
3638
3672
|
busboyStream.on("finish", function () {
|
|
3639
|
-
|
|
3673
|
+
bodyFinished = !0;
|
|
3674
|
+
flush();
|
|
3675
|
+
closed ||
|
|
3676
|
+
reportGlobalError(
|
|
3677
|
+
response,
|
|
3678
|
+
Error("Reply finished with incomplete file part.")
|
|
3679
|
+
);
|
|
3640
3680
|
});
|
|
3641
3681
|
busboyStream.on("error", function (err) {
|
|
3642
3682
|
reportGlobalError(response, err);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-server-dom-webpack",
|
|
3
3
|
"description": "React Server Components bindings for DOM using Webpack. This is intended to be integrated into meta-frameworks. It is not intended to be imported directly.",
|
|
4
|
-
"version": "19.2.
|
|
4
|
+
"version": "19.2.7",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react"
|
|
7
7
|
],
|
|
@@ -84,8 +84,8 @@
|
|
|
84
84
|
"node": ">=0.10.0"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
|
-
"react": "^19.2.
|
|
88
|
-
"react-dom": "^19.2.
|
|
87
|
+
"react": "^19.2.7",
|
|
88
|
+
"react-dom": "^19.2.7",
|
|
89
89
|
"webpack": "^5.59.0"
|
|
90
90
|
},
|
|
91
91
|
"dependencies": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitejs/plugin-rsc",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.28",
|
|
4
4
|
"description": "React Server Components (RSC) support for Vite.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -40,31 +40,31 @@
|
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@rolldown/pluginutils": "^1.0.1",
|
|
43
|
-
"es-module-lexer": "^2.1
|
|
43
|
+
"es-module-lexer": "^2.3.1",
|
|
44
44
|
"estree-walker": "^3.0.3",
|
|
45
45
|
"magic-string": "^0.30.21",
|
|
46
|
-
"srvx": "^0.11.
|
|
46
|
+
"srvx": "^0.11.22",
|
|
47
47
|
"strip-literal": "^3.1.0",
|
|
48
48
|
"turbo-stream": "^3.2.0",
|
|
49
49
|
"vitefu": "^1.1.3"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@hiogawa/utils": "^1.7.0",
|
|
53
|
-
"@playwright/test": "^1.
|
|
53
|
+
"@playwright/test": "^1.61.1",
|
|
54
54
|
"@tsconfig/strictest": "^2.0.8",
|
|
55
55
|
"@types/estree": "^1.0.9",
|
|
56
|
-
"@types/node": "^24.
|
|
57
|
-
"@types/react": "^19.2.
|
|
56
|
+
"@types/node": "^24.13.3",
|
|
57
|
+
"@types/react": "^19.2.17",
|
|
58
58
|
"@types/react-dom": "^19.2.3",
|
|
59
59
|
"@vitejs/plugin-react": "workspace:*",
|
|
60
60
|
"@vitejs/test-dep-cjs-and-esm": "./test-dep/cjs-and-esm",
|
|
61
61
|
"@vitejs/test-dep-cjs-falsy-primitive": "./test-dep/cjs-falsy-primitive",
|
|
62
62
|
"picocolors": "^1.1.1",
|
|
63
|
-
"react": "^19.2.
|
|
64
|
-
"react-dom": "^19.2.
|
|
65
|
-
"react-server-dom-webpack": "^19.2.
|
|
66
|
-
"tinyexec": "^1.
|
|
67
|
-
"tsdown": "^0.22.
|
|
63
|
+
"react": "^19.2.7",
|
|
64
|
+
"react-dom": "^19.2.7",
|
|
65
|
+
"react-server-dom-webpack": "^19.2.7",
|
|
66
|
+
"tinyexec": "^1.2.4",
|
|
67
|
+
"tsdown": "^0.22.7"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
70
|
"react": "*",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|