@vitejs/plugin-rsc 0.4.21 → 0.4.23
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/{browser-mbRygLxB.d.ts → browser-DUDACP5e.d.ts} +1 -1
- package/dist/browser.d.ts +3 -3
- package/dist/core/browser.d.ts +1 -1
- package/dist/core/rsc.d.ts +2 -2
- package/dist/core/rsc.js +1 -1
- package/dist/core/ssr.d.ts +2 -2
- package/dist/core/ssr.js +1 -1
- package/dist/{encryption-runtime-CJUalqt3.js → encryption-runtime-z7X8aRLB.js} +1 -1
- package/dist/extra/browser.d.ts +1 -1
- package/dist/extra/browser.js +1 -1
- package/dist/extra/rsc.d.ts +1 -1
- package/dist/extra/rsc.js +4 -4
- package/dist/extra/ssr.js +5 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -1
- package/dist/{plugin-BQszG7oj.d.ts → plugin-CrIhPWor.d.ts} +28 -12
- package/dist/{plugin-CzZCeIwj.js → plugin-Ddfc3b6D.js} +381 -296
- package/dist/plugin.d.ts +2 -2
- package/dist/plugin.js +3 -2
- package/dist/react/browser.d.ts +3 -3
- package/dist/react/rsc.d.ts +3 -3
- package/dist/react/rsc.js +2 -2
- package/dist/react/ssr.d.ts +3 -3
- package/dist/react/ssr.js +2 -2
- package/dist/{rsc-BwEwbLG4.js → rsc-0ugrKC93.js} +1 -1
- package/dist/{rsc-CxDPDiLz.d.ts → rsc-BeJKxeMX.d.ts} +1 -1
- package/dist/{rsc-VjVw_i-M.js → rsc-K03z8Dh0.js} +1 -1
- package/dist/rsc-html-stream/browser.js +1 -1
- package/dist/rsc-html-stream/ssr.js +1 -1
- package/dist/rsc.d.ts +4 -4
- package/dist/rsc.js +4 -4
- package/dist/shared-Cwk6fxfN.js +22 -0
- package/dist/{ssr-BMTRhW5g.js → ssr-BnEu3hbo.js} +6 -2
- package/dist/{ssr-BoNKka-5.d.ts → ssr-Bv84RACl.d.ts} +1 -1
- package/dist/{ssr-BEKKb_cw.js → ssr-D154nyka.js} +1 -1
- package/dist/ssr.d.ts +3 -3
- package/dist/ssr.js +4 -3
- package/dist/utils/encryption-runtime.d.ts +1 -1
- package/dist/utils/encryption-runtime.js +3 -3
- package/package.json +1 -1
- /package/dist/{browser-CuwQIlVY.d.ts → browser-CyGTajab.d.ts} +0 -0
- /package/dist/{client-C1J4FCf5.js → client-BPIq1kGs.js} +0 -0
- /package/dist/{encryption-runtime-SgJRa9yj.d.ts → encryption-runtime-BmDC7d-3.d.ts} +0 -0
- /package/dist/{index-QWzVHuya.d.ts → index-CrcbP1rd.d.ts} +0 -0
- /package/dist/{rsc-CFtzqEG8.d.ts → rsc-A9Zr9bEE.d.ts} +0 -0
- /package/dist/{rsc-BfBPoIV8.js → rsc-C54XEgZY.js} +0 -0
- /package/dist/{rsc-Cv3XEZqB.d.ts → rsc-D-lnfNSa.d.ts} +0 -0
- /package/dist/{server-D0-DavPP.js → server-DoWzqBNF.js} +0 -0
- /package/dist/{ssr-D6GTzOzx.d.ts → ssr-EOoYUXrM.d.ts} +0 -0
- /package/dist/{ssr--rFiBtws.js → ssr-v4qYqcXu.js} +0 -0
package/dist/browser.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CallServerCallback } from "./index-
|
|
2
|
-
import { setRequireModule } from "./browser-
|
|
3
|
-
import { callServer, createFromFetch, createFromReadableStream, createServerReference, createTemporaryReferenceSet, encodeReply, findSourceMapURL, setServerCallback } from "./browser-
|
|
1
|
+
import { CallServerCallback } from "./index-CrcbP1rd.js";
|
|
2
|
+
import { setRequireModule } from "./browser-CyGTajab.js";
|
|
3
|
+
import { callServer, createFromFetch, createFromReadableStream, createServerReference, createTemporaryReferenceSet, encodeReply, findSourceMapURL, setServerCallback } from "./browser-DUDACP5e.js";
|
|
4
4
|
export { CallServerCallback, callServer, createFromFetch, createFromReadableStream, createServerReference, createTemporaryReferenceSet, encodeReply, findSourceMapURL, setRequireModule, setServerCallback };
|
package/dist/core/browser.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { setRequireModule } from "../browser-
|
|
1
|
+
import { setRequireModule } from "../browser-CyGTajab.js";
|
|
2
2
|
export { setRequireModule };
|
package/dist/core/rsc.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "../index-
|
|
2
|
-
import { createClientManifest, createServerDecodeClientManifest, createServerManifest, loadServerAction, setRequireModule } from "../rsc-
|
|
1
|
+
import "../index-CrcbP1rd.js";
|
|
2
|
+
import { createClientManifest, createServerDecodeClientManifest, createServerManifest, loadServerAction, setRequireModule } from "../rsc-BeJKxeMX.js";
|
|
3
3
|
export { createClientManifest, createServerDecodeClientManifest, createServerManifest, loadServerAction, setRequireModule };
|
package/dist/core/rsc.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../dist-DiJnRA1C.js";
|
|
2
2
|
import "../shared-CEyKoKAb.js";
|
|
3
|
-
import { createClientManifest, createServerDecodeClientManifest, createServerManifest, loadServerAction, setRequireModule } from "../rsc-
|
|
3
|
+
import { createClientManifest, createServerDecodeClientManifest, createServerManifest, loadServerAction, setRequireModule } from "../rsc-C54XEgZY.js";
|
|
4
4
|
|
|
5
5
|
export { createClientManifest, createServerDecodeClientManifest, createServerManifest, loadServerAction, setRequireModule };
|
package/dist/core/ssr.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "../index-
|
|
2
|
-
import { createServerConsumerManifest, setRequireModule } from "../ssr-
|
|
1
|
+
import "../index-CrcbP1rd.js";
|
|
2
|
+
import { createServerConsumerManifest, setRequireModule } from "../ssr-Bv84RACl.js";
|
|
3
3
|
export { createServerConsumerManifest, setRequireModule };
|
package/dist/core/ssr.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../dist-DiJnRA1C.js";
|
|
2
2
|
import "../shared-CEyKoKAb.js";
|
|
3
|
-
import { createServerConsumerManifest, setRequireModule } from "../ssr
|
|
3
|
+
import { createServerConsumerManifest, setRequireModule } from "../ssr-v4qYqcXu.js";
|
|
4
4
|
|
|
5
5
|
export { createServerConsumerManifest, setRequireModule };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { once } from "./dist-DiJnRA1C.js";
|
|
2
2
|
import { arrayToStream, concatArrayStream, decryptBuffer, encryptBuffer, fromBase64 } from "./encryption-utils-BDwwcMVT.js";
|
|
3
|
-
import { createFromReadableStream, renderToReadableStream } from "./rsc-
|
|
3
|
+
import { createFromReadableStream, renderToReadableStream } from "./rsc-K03z8Dh0.js";
|
|
4
4
|
import encryptionKeySource from "virtual:vite-rsc/encryption-key";
|
|
5
5
|
|
|
6
6
|
//#region src/utils/encryption-runtime.ts
|
package/dist/extra/browser.d.ts
CHANGED
package/dist/extra/browser.js
CHANGED
|
@@ -3,7 +3,7 @@ import "../shared-CEyKoKAb.js";
|
|
|
3
3
|
import "../browser-BhJd-Orx.js";
|
|
4
4
|
import { createFromFetch, createFromReadableStream, createTemporaryReferenceSet, encodeReply, setServerCallback } from "../browser-D8OPzpF5.js";
|
|
5
5
|
import "../browser-QU10IP0-.js";
|
|
6
|
-
import { rscStream } from "../client-
|
|
6
|
+
import { rscStream } from "../client-BPIq1kGs.js";
|
|
7
7
|
import React from "react";
|
|
8
8
|
import ReactDomClient from "react-dom/client";
|
|
9
9
|
import { jsx } from "react/jsx-runtime";
|
package/dist/extra/rsc.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { RscPayload, renderRequest } from "../rsc-
|
|
1
|
+
import { RscPayload, renderRequest } from "../rsc-D-lnfNSa.js";
|
|
2
2
|
export { RscPayload, renderRequest };
|
package/dist/extra/rsc.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "../dist-DiJnRA1C.js";
|
|
2
2
|
import "../shared-CEyKoKAb.js";
|
|
3
3
|
import "../encryption-utils-BDwwcMVT.js";
|
|
4
|
-
import { loadServerAction } from "../rsc-
|
|
5
|
-
import { createTemporaryReferenceSet, decodeAction, decodeFormState, decodeReply, renderToReadableStream } from "../rsc-
|
|
6
|
-
import "../encryption-runtime-
|
|
7
|
-
import "../rsc-
|
|
4
|
+
import { loadServerAction } from "../rsc-C54XEgZY.js";
|
|
5
|
+
import { createTemporaryReferenceSet, decodeAction, decodeFormState, decodeReply, renderToReadableStream } from "../rsc-K03z8Dh0.js";
|
|
6
|
+
import "../encryption-runtime-z7X8aRLB.js";
|
|
7
|
+
import "../rsc-0ugrKC93.js";
|
|
8
8
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
|
|
10
10
|
//#region src/extra/rsc.tsx
|
package/dist/extra/ssr.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import "../dist-DiJnRA1C.js";
|
|
2
2
|
import "../shared-CEyKoKAb.js";
|
|
3
|
-
import "../
|
|
4
|
-
import
|
|
5
|
-
import "../ssr-
|
|
6
|
-
import
|
|
3
|
+
import "../shared-Cwk6fxfN.js";
|
|
4
|
+
import "../ssr-v4qYqcXu.js";
|
|
5
|
+
import { createFromReadableStream } from "../ssr-D154nyka.js";
|
|
6
|
+
import "../ssr-BnEu3hbo.js";
|
|
7
|
+
import { injectRSCPayload } from "../server-DoWzqBNF.js";
|
|
7
8
|
import React from "react";
|
|
8
9
|
import { jsx } from "react/jsx-runtime";
|
|
9
10
|
import ReactDomServer from "react-dom/server.edge";
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import "./dist-DiJnRA1C.js";
|
|
2
2
|
import "./plugin-CZbI4rhS.js";
|
|
3
|
-
import { transformHoistInlineDirective, vitePluginRsc } from "./plugin-
|
|
3
|
+
import { transformHoistInlineDirective, vitePluginRsc } from "./plugin-Ddfc3b6D.js";
|
|
4
4
|
import "./encryption-utils-BDwwcMVT.js";
|
|
5
5
|
import "./rpc-tGuLT8PD.js";
|
|
6
6
|
import "./vite-utils-Vzd7cqfv.js";
|
|
7
|
+
import "./shared-Cwk6fxfN.js";
|
|
7
8
|
|
|
8
9
|
export { vitePluginRsc as default, transformHoistInlineDirective };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import MagicString from "magic-string";
|
|
2
|
-
import { Plugin, ViteDevServer, parseAstAsync } from "vite";
|
|
2
|
+
import { Plugin, ResolvedConfig, Rollup, ViteDevServer, parseAstAsync } from "vite";
|
|
3
3
|
import { Program } from "estree";
|
|
4
4
|
|
|
5
5
|
//#region src/transforms/wrap-export.d.ts
|
|
@@ -11,6 +11,31 @@ type ExportMeta = {
|
|
|
11
11
|
type TransformWrapExportFilter = (name: string, meta: ExportMeta) => boolean;
|
|
12
12
|
//#endregion
|
|
13
13
|
//#region src/plugin.d.ts
|
|
14
|
+
type ClientReferenceMeta = {
|
|
15
|
+
importId: string;
|
|
16
|
+
referenceKey: string;
|
|
17
|
+
packageSource?: string;
|
|
18
|
+
exportNames: string[];
|
|
19
|
+
renderedExports: string[];
|
|
20
|
+
};
|
|
21
|
+
type ServerRerferenceMeta = {
|
|
22
|
+
importId: string;
|
|
23
|
+
referenceKey: string;
|
|
24
|
+
exportNames: string[];
|
|
25
|
+
};
|
|
26
|
+
declare class RscPluginManager {
|
|
27
|
+
server: ViteDevServer;
|
|
28
|
+
config: ResolvedConfig;
|
|
29
|
+
rscBundle: Rollup.OutputBundle;
|
|
30
|
+
buildAssetsManifest: AssetsManifest | undefined;
|
|
31
|
+
isScanBuild: boolean;
|
|
32
|
+
clientReferenceMetaMap: Record<string, ClientReferenceMeta>;
|
|
33
|
+
serverReferenceMetaMap: Record<string, ServerRerferenceMeta>;
|
|
34
|
+
serverResourcesMetaMap: Record<string, {
|
|
35
|
+
key: string;
|
|
36
|
+
}>;
|
|
37
|
+
stabilize(): void;
|
|
38
|
+
}
|
|
14
39
|
type RscPluginOptions = {
|
|
15
40
|
/**
|
|
16
41
|
* shorthand for configuring `environments.(name).build.rollupOptions.input.index`
|
|
@@ -74,7 +99,7 @@ type RscPluginOptions = {
|
|
|
74
99
|
};
|
|
75
100
|
};
|
|
76
101
|
/** @experimental */
|
|
77
|
-
declare function vitePluginRscMinimal(rscPluginOptions?: RscPluginOptions): Plugin[];
|
|
102
|
+
declare function vitePluginRscMinimal(rscPluginOptions?: RscPluginOptions, manager?: RscPluginManager): Plugin[];
|
|
78
103
|
declare function vitePluginRsc(rscPluginOptions?: RscPluginOptions): Plugin[];
|
|
79
104
|
declare class RuntimeAsset {
|
|
80
105
|
runtime: string;
|
|
@@ -98,9 +123,6 @@ type ResolvedAssetDeps = {
|
|
|
98
123
|
js: string[];
|
|
99
124
|
css: string[];
|
|
100
125
|
};
|
|
101
|
-
declare function vitePluginFindSourceMapURL(): Plugin[];
|
|
102
|
-
declare function findSourceMapURL(server: ViteDevServer, filename: string, environmentName: string): Promise<object | undefined>;
|
|
103
|
-
declare function vitePluginRscCss(rscCssOptions?: Pick<RscPluginOptions, "rscCssTransform">): Plugin[];
|
|
104
126
|
declare function transformRscCssExport(options: {
|
|
105
127
|
ast: Awaited<ReturnType<typeof parseAstAsync>>;
|
|
106
128
|
code: string;
|
|
@@ -109,11 +131,5 @@ declare function transformRscCssExport(options: {
|
|
|
109
131
|
}): Promise<{
|
|
110
132
|
output: MagicString;
|
|
111
133
|
} | undefined>;
|
|
112
|
-
/**
|
|
113
|
-
* temporary workaround for
|
|
114
|
-
* - https://github.com/cloudflare/workers-sdk/issues/9538 (fixed in @cloudflare/vite-plugin@1.8.0)
|
|
115
|
-
* - https://github.com/vitejs/vite/pull/20077 (fixed in vite@7.0.0)
|
|
116
|
-
*/
|
|
117
|
-
declare function __fix_cloudflare(): Plugin;
|
|
118
134
|
//#endregion
|
|
119
|
-
export { AssetDeps, AssetsManifest, ResolvedAssetDeps, ResolvedAssetsManifest, RscPluginOptions,
|
|
135
|
+
export { AssetDeps, AssetsManifest, ResolvedAssetDeps, ResolvedAssetsManifest, RscPluginOptions, transformRscCssExport, vitePluginRsc, vitePluginRscMinimal };
|