@vitejs/plugin-rsc 0.5.0 → 0.5.1
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-D8OPzpF5.js → browser-B4C0Zb4m.js} +1 -1
- package/dist/{browser-STIFJSFF.d.ts → browser-C8KlM-b7.d.ts} +2 -2
- package/dist/{browser-CXHICuDc.d.ts → browser-CDBRiZjk.d.ts} +1 -1
- package/dist/{browser-7NhxQxuk.js → browser-U86erGOy.js} +3 -3
- package/dist/browser.d.ts +3 -3
- package/dist/browser.js +4 -4
- package/dist/chunk-Cdb3zUqJ.js +30 -0
- package/dist/{cjs-C5-IrxV9.js → cjs-zUv66MZg.js} +3 -3
- package/dist/core/browser.d.ts +1 -1
- package/dist/core/browser.js +3 -3
- package/dist/core/plugin.js +1 -1
- package/dist/core/rsc.d.ts +2 -2
- package/dist/core/rsc.js +3 -3
- package/dist/core/ssr.d.ts +2 -2
- package/dist/core/ssr.js +3 -3
- package/dist/{dist-DiJnRA1C.js → dist-CNbFy2EZ.js} +1 -1
- package/dist/{encryption-runtime-DwihLkYv.d.ts → encryption-runtime-BDgc4dBr.d.ts} +1 -1
- package/dist/{encryption-runtime-FhNKiASK.js → encryption-runtime-D5_PLt4C.js} +4 -4
- package/dist/{encryption-utils-CoE0gWjC.js → encryption-utils-DdqSKS_O.js} +1 -1
- package/dist/{index-kBz3NvVt.d.ts → index-BY8KUQhI.d.ts} +1 -1
- package/dist/{index-DYBWAuKP.d.ts → index-DJ0AhQ9B.d.ts} +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +8 -8
- package/dist/picocolors-BRKobevN.js +74 -0
- package/dist/{plugin-BwI7mYXI.js → plugin-4UFT-s0w.js} +1 -1
- package/dist/{plugin-CrduXSyi.js → plugin-DNwmUjn4.js} +32 -14
- package/dist/{plugin-DGhnAIi6.d.ts → plugin-fbbM1muv.d.ts} +2 -2
- package/dist/plugin.d.ts +2 -2
- package/dist/plugin.js +8 -8
- package/dist/plugins/cjs.js +3 -3
- package/dist/react/browser.d.ts +3 -3
- package/dist/react/browser.js +4 -4
- package/dist/react/rsc.d.ts +3 -3
- package/dist/react/rsc.js +4 -4
- package/dist/react/ssr.d.ts +3 -3
- package/dist/react/ssr.js +4 -4
- package/dist/{rpc-D7cb_Wd5.js → rpc-nwJuNojy.js} +1 -1
- package/dist/{rsc-Fgmk6j0z.d.ts → rsc-03j1e3xp.d.ts} +4 -4
- package/dist/{rsc-DdBcg-Lb.js → rsc-B_DQ_Sju.js} +2 -2
- package/dist/{rsc-Cg31p8XR.d.ts → rsc-OCbFObYE.d.ts} +2 -2
- package/dist/{rsc-cp4EenMG.js → rsc-bL1QvQCm.js} +3 -3
- package/dist/rsc.d.ts +4 -4
- package/dist/rsc.js +6 -6
- package/dist/{shared-CXg_u-4h.js → shared-C8PSRwR2.js} +1 -1
- package/dist/{shared-CceFFukJ.js → shared-DlspEItJ.js} +1 -1
- package/dist/{ssr-BnYZ8xo9.d.ts → ssr-Dgbl_mOS.d.ts} +1 -1
- package/dist/{ssr-CE8X2HyS.js → ssr-DzY6rnEv.js} +2 -2
- package/dist/{ssr-C468YlFl.js → ssr-EH7rBPkK.js} +3 -3
- package/dist/{ssr-00tY_Tdf.d.ts → ssr-fBV4xXen.d.ts} +2 -2
- package/dist/ssr.d.ts +3 -3
- package/dist/ssr.js +5 -5
- package/dist/transforms/index.d.ts +1 -1
- package/dist/transforms/index.js +2 -2
- package/dist/{transforms-wFF-pWF7.js → transforms-CSPqW3RX.js} +3 -2
- package/dist/utils/encryption-runtime.d.ts +1 -1
- package/dist/utils/encryption-runtime.js +6 -6
- package/dist/utils/rpc.js +1 -1
- package/package.json +7 -5
|
@@ -32,4 +32,4 @@ function findSourceMapURL(filename, environmentName) {
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
//#endregion
|
|
35
|
-
export {
|
|
35
|
+
export { createTemporaryReferenceSet as a, setServerCallback as c, createServerReference as i, createFromFetch as n, encodeReply as o, createFromReadableStream as r, findSourceMapURL as s, callServer as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CallServerCallback } from "./index-
|
|
1
|
+
import { n as CallServerCallback } from "./index-BY8KUQhI.js";
|
|
2
2
|
|
|
3
3
|
//#region src/react/browser.d.ts
|
|
4
4
|
declare function createFromReadableStream<T>(stream: ReadableStream<Uint8Array>, options?: object): Promise<T>;
|
|
@@ -10,4 +10,4 @@ declare function setServerCallback(fn: CallServerCallback): void;
|
|
|
10
10
|
declare const createTemporaryReferenceSet: () => unknown;
|
|
11
11
|
declare function findSourceMapURL(filename: string, environmentName: string): string | null;
|
|
12
12
|
//#endregion
|
|
13
|
-
export {
|
|
13
|
+
export { createTemporaryReferenceSet as a, setServerCallback as c, createServerReference as i, createFromFetch as n, encodeReply as o, createFromReadableStream as r, findSourceMapURL as s, callServer as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { memoize } from "./dist-
|
|
2
|
-
import {
|
|
1
|
+
import { n as memoize } from "./dist-CNbFy2EZ.js";
|
|
2
|
+
import { a as setInternalRequire, i as removeReferenceCacheTag } from "./shared-C8PSRwR2.js";
|
|
3
3
|
|
|
4
4
|
//#region src/core/browser.ts
|
|
5
5
|
let init = false;
|
|
@@ -14,4 +14,4 @@ function setRequireModule(options) {
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
//#endregion
|
|
17
|
-
export { setRequireModule };
|
|
17
|
+
export { setRequireModule as t };
|
package/dist/browser.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CallServerCallback } from "./index-
|
|
2
|
-
import { setRequireModule } from "./browser-
|
|
3
|
-
import {
|
|
1
|
+
import { n as CallServerCallback } from "./index-BY8KUQhI.js";
|
|
2
|
+
import { t as setRequireModule } from "./browser-CDBRiZjk.js";
|
|
3
|
+
import { a as createTemporaryReferenceSet, c as setServerCallback, i as createServerReference, n as createFromFetch, o as encodeReply, r as createFromReadableStream, s as findSourceMapURL, t as callServer } from "./browser-C8KlM-b7.js";
|
|
4
4
|
export { CallServerCallback, callServer, createFromFetch, createFromReadableStream, createServerReference, createTemporaryReferenceSet, encodeReply, findSourceMapURL, setRequireModule, setServerCallback };
|
package/dist/browser.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "./dist-
|
|
2
|
-
import "./shared-
|
|
3
|
-
import { setRequireModule } from "./browser-
|
|
4
|
-
import {
|
|
1
|
+
import "./dist-CNbFy2EZ.js";
|
|
2
|
+
import "./shared-C8PSRwR2.js";
|
|
3
|
+
import { t as setRequireModule } from "./browser-U86erGOy.js";
|
|
4
|
+
import { a as createTemporaryReferenceSet, c as setServerCallback, i as createServerReference, n as createFromFetch, o as encodeReply, r as createFromReadableStream, s as findSourceMapURL, t as callServer } from "./browser-B4C0Zb4m.js";
|
|
5
5
|
import * as clientReferences from "virtual:vite-rsc/client-references";
|
|
6
6
|
|
|
7
7
|
//#region src/browser.ts
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
|
|
3
|
+
//#region rolldown:runtime
|
|
4
|
+
var __create = Object.create;
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __commonJS = (cb, mod) => function() {
|
|
11
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
15
|
+
key = keys[i];
|
|
16
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
17
|
+
get: ((k) => from[k]).bind(null, key),
|
|
18
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
return to;
|
|
22
|
+
};
|
|
23
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
24
|
+
value: mod,
|
|
25
|
+
enumerable: true
|
|
26
|
+
}) : target, mod));
|
|
27
|
+
var __toDynamicImportESM = (isNodeMode) => (mod) => __toESM(mod.default, isNodeMode);
|
|
28
|
+
|
|
29
|
+
//#endregion
|
|
30
|
+
export { __toDynamicImportESM as n, __commonJS as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createDebug } from "./dist-
|
|
2
|
-
import { parseIdQuery } from "./shared-
|
|
1
|
+
import { t as createDebug } from "./dist-CNbFy2EZ.js";
|
|
2
|
+
import { n as parseIdQuery } from "./shared-DlspEItJ.js";
|
|
3
3
|
import fs from "node:fs";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
@@ -107,4 +107,4 @@ function extractPackageKey(id) {
|
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
//#endregion
|
|
110
|
-
export { cjsModuleRunnerPlugin };
|
|
110
|
+
export { cjsModuleRunnerPlugin as t };
|
package/dist/core/browser.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { setRequireModule } from "../browser-
|
|
1
|
+
import { t as setRequireModule } from "../browser-CDBRiZjk.js";
|
|
2
2
|
export { setRequireModule };
|
package/dist/core/browser.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../dist-
|
|
2
|
-
import "../shared-
|
|
3
|
-
import { setRequireModule } from "../browser-
|
|
1
|
+
import "../dist-CNbFy2EZ.js";
|
|
2
|
+
import "../shared-C8PSRwR2.js";
|
|
3
|
+
import { t as setRequireModule } from "../browser-U86erGOy.js";
|
|
4
4
|
|
|
5
5
|
export { setRequireModule };
|
package/dist/core/plugin.js
CHANGED
package/dist/core/rsc.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "../index-
|
|
2
|
-
import {
|
|
1
|
+
import "../index-BY8KUQhI.js";
|
|
2
|
+
import { a as setRequireModule, i as loadServerAction, n as createServerDecodeClientManifest, r as createServerManifest, t as createClientManifest } from "../rsc-OCbFObYE.js";
|
|
3
3
|
export { createClientManifest, createServerDecodeClientManifest, createServerManifest, loadServerAction, setRequireModule };
|
package/dist/core/rsc.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../dist-
|
|
2
|
-
import "../shared-
|
|
3
|
-
import {
|
|
1
|
+
import "../dist-CNbFy2EZ.js";
|
|
2
|
+
import "../shared-C8PSRwR2.js";
|
|
3
|
+
import { a as setRequireModule, i as loadServerAction, n as createServerDecodeClientManifest, r as createServerManifest, t as createClientManifest } from "../rsc-bL1QvQCm.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 {
|
|
1
|
+
import "../index-BY8KUQhI.js";
|
|
2
|
+
import { n as setRequireModule, t as createServerConsumerManifest } from "../ssr-fBV4xXen.js";
|
|
3
3
|
export { createServerConsumerManifest, setRequireModule };
|
package/dist/core/ssr.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../dist-
|
|
2
|
-
import "../shared-
|
|
3
|
-
import {
|
|
1
|
+
import "../dist-CNbFy2EZ.js";
|
|
2
|
+
import "../shared-C8PSRwR2.js";
|
|
3
|
+
import { n as setRequireModule, t as createServerConsumerManifest } from "../ssr-EH7rBPkK.js";
|
|
4
4
|
|
|
5
5
|
export { createServerConsumerManifest, setRequireModule };
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
declare function encryptActionBoundArgs(originalValue: unknown): Promise<string>;
|
|
3
3
|
declare function decryptActionBoundArgs(encrypted: ReturnType<typeof encryptActionBoundArgs>): Promise<unknown>;
|
|
4
4
|
//#endregion
|
|
5
|
-
export {
|
|
5
|
+
export { encryptActionBoundArgs as n, decryptActionBoundArgs as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { once } from "./dist-
|
|
2
|
-
import {
|
|
3
|
-
import { createFromReadableStream, renderToReadableStream } from "./rsc-
|
|
1
|
+
import { r as once } from "./dist-CNbFy2EZ.js";
|
|
2
|
+
import { a as fromBase64, i as encryptBuffer, n as concatArrayStream, r as decryptBuffer, t as arrayToStream } from "./encryption-utils-DdqSKS_O.js";
|
|
3
|
+
import { n as createFromReadableStream, u as renderToReadableStream } from "./rsc-B_DQ_Sju.js";
|
|
4
4
|
import encryptionKeySource from "virtual:vite-rsc/encryption-key";
|
|
5
5
|
|
|
6
6
|
//#region src/utils/encryption-runtime.ts
|
|
@@ -17,4 +17,4 @@ const getEncryptionKey = /* @__PURE__ */ once(async () => {
|
|
|
17
17
|
});
|
|
18
18
|
|
|
19
19
|
//#endregion
|
|
20
|
-
export {
|
|
20
|
+
export { encryptActionBoundArgs as n, decryptActionBoundArgs as t };
|
|
@@ -70,4 +70,4 @@ async function decryptBuffer(encryptedString, key) {
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
//#endregion
|
|
73
|
-
export {
|
|
73
|
+
export { fromBase64 as a, encryptBuffer as i, concatArrayStream as n, generateEncryptionKey as o, decryptBuffer as r, toBase64 as s, arrayToStream as t };
|
|
@@ -23,4 +23,4 @@ interface ServerConsumerManifest {
|
|
|
23
23
|
}
|
|
24
24
|
type CallServerCallback = (id: string, args: unknown[]) => unknown;
|
|
25
25
|
//#endregion
|
|
26
|
-
export {
|
|
26
|
+
export { ServerConsumerManifest as i, CallServerCallback as n, ModuleMap as r, BundlerConfig as t };
|
|
@@ -87,4 +87,4 @@ declare function transformServerActionServer(input: string, ast: Program, option
|
|
|
87
87
|
names: string[];
|
|
88
88
|
};
|
|
89
89
|
//#endregion
|
|
90
|
-
export {
|
|
90
|
+
export { transformDirectiveProxyExport as a, TransformWrapExportOptions as c, transformHoistInlineDirective as d, TransformProxyExportOptions as i, transformWrapExport as l, getExportNames as n, transformProxyExport as o, hasDirective as r, TransformWrapExportFilter as s, transformServerActionServer as t, findDirectives as u };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "./index-
|
|
2
|
-
import { PluginApi, RscPluginOptions,
|
|
1
|
+
import "./index-DJ0AhQ9B.js";
|
|
2
|
+
import { c as getPluginApi, r as PluginApi, s as RscPluginOptions, u as vitePluginRsc } from "./plugin-fbbM1muv.js";
|
|
3
3
|
export { type PluginApi, type RscPluginOptions, vitePluginRsc as default, getPluginApi };
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import "./dist-
|
|
2
|
-
import "./plugin-
|
|
3
|
-
import "./transforms-
|
|
4
|
-
import "./encryption-utils-
|
|
5
|
-
import "./rpc-
|
|
6
|
-
import {
|
|
7
|
-
import "./cjs-
|
|
8
|
-
import "./shared-
|
|
1
|
+
import "./dist-CNbFy2EZ.js";
|
|
2
|
+
import "./plugin-4UFT-s0w.js";
|
|
3
|
+
import "./transforms-CSPqW3RX.js";
|
|
4
|
+
import "./encryption-utils-DdqSKS_O.js";
|
|
5
|
+
import "./rpc-nwJuNojy.js";
|
|
6
|
+
import { r as vitePluginRsc, t as getPluginApi } from "./plugin-DNwmUjn4.js";
|
|
7
|
+
import "./cjs-zUv66MZg.js";
|
|
8
|
+
import "./shared-DlspEItJ.js";
|
|
9
9
|
|
|
10
10
|
export { vitePluginRsc as default, getPluginApi };
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { t as __commonJS } from "./chunk-Cdb3zUqJ.js";
|
|
2
|
+
|
|
3
|
+
//#region ../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js
|
|
4
|
+
var require_picocolors = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js": ((exports, module) => {
|
|
5
|
+
let p = process || {}, argv = p.argv || [], env = p.env || {};
|
|
6
|
+
let isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
|
|
7
|
+
let formatter = (open, close, replace = open) => (input) => {
|
|
8
|
+
let string = "" + input, index = string.indexOf(close, open.length);
|
|
9
|
+
return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
|
|
10
|
+
};
|
|
11
|
+
let replaceClose = (string, close, replace, index) => {
|
|
12
|
+
let result = "", cursor = 0;
|
|
13
|
+
do {
|
|
14
|
+
result += string.substring(cursor, index) + replace;
|
|
15
|
+
cursor = index + close.length;
|
|
16
|
+
index = string.indexOf(close, cursor);
|
|
17
|
+
} while (~index);
|
|
18
|
+
return result + string.substring(cursor);
|
|
19
|
+
};
|
|
20
|
+
let createColors = (enabled = isColorSupported) => {
|
|
21
|
+
let f = enabled ? formatter : () => String;
|
|
22
|
+
return {
|
|
23
|
+
isColorSupported: enabled,
|
|
24
|
+
reset: f("\x1B[0m", "\x1B[0m"),
|
|
25
|
+
bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
|
|
26
|
+
dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
|
|
27
|
+
italic: f("\x1B[3m", "\x1B[23m"),
|
|
28
|
+
underline: f("\x1B[4m", "\x1B[24m"),
|
|
29
|
+
inverse: f("\x1B[7m", "\x1B[27m"),
|
|
30
|
+
hidden: f("\x1B[8m", "\x1B[28m"),
|
|
31
|
+
strikethrough: f("\x1B[9m", "\x1B[29m"),
|
|
32
|
+
black: f("\x1B[30m", "\x1B[39m"),
|
|
33
|
+
red: f("\x1B[31m", "\x1B[39m"),
|
|
34
|
+
green: f("\x1B[32m", "\x1B[39m"),
|
|
35
|
+
yellow: f("\x1B[33m", "\x1B[39m"),
|
|
36
|
+
blue: f("\x1B[34m", "\x1B[39m"),
|
|
37
|
+
magenta: f("\x1B[35m", "\x1B[39m"),
|
|
38
|
+
cyan: f("\x1B[36m", "\x1B[39m"),
|
|
39
|
+
white: f("\x1B[37m", "\x1B[39m"),
|
|
40
|
+
gray: f("\x1B[90m", "\x1B[39m"),
|
|
41
|
+
bgBlack: f("\x1B[40m", "\x1B[49m"),
|
|
42
|
+
bgRed: f("\x1B[41m", "\x1B[49m"),
|
|
43
|
+
bgGreen: f("\x1B[42m", "\x1B[49m"),
|
|
44
|
+
bgYellow: f("\x1B[43m", "\x1B[49m"),
|
|
45
|
+
bgBlue: f("\x1B[44m", "\x1B[49m"),
|
|
46
|
+
bgMagenta: f("\x1B[45m", "\x1B[49m"),
|
|
47
|
+
bgCyan: f("\x1B[46m", "\x1B[49m"),
|
|
48
|
+
bgWhite: f("\x1B[47m", "\x1B[49m"),
|
|
49
|
+
blackBright: f("\x1B[90m", "\x1B[39m"),
|
|
50
|
+
redBright: f("\x1B[91m", "\x1B[39m"),
|
|
51
|
+
greenBright: f("\x1B[92m", "\x1B[39m"),
|
|
52
|
+
yellowBright: f("\x1B[93m", "\x1B[39m"),
|
|
53
|
+
blueBright: f("\x1B[94m", "\x1B[39m"),
|
|
54
|
+
magentaBright: f("\x1B[95m", "\x1B[39m"),
|
|
55
|
+
cyanBright: f("\x1B[96m", "\x1B[39m"),
|
|
56
|
+
whiteBright: f("\x1B[97m", "\x1B[39m"),
|
|
57
|
+
bgBlackBright: f("\x1B[100m", "\x1B[49m"),
|
|
58
|
+
bgRedBright: f("\x1B[101m", "\x1B[49m"),
|
|
59
|
+
bgGreenBright: f("\x1B[102m", "\x1B[49m"),
|
|
60
|
+
bgYellowBright: f("\x1B[103m", "\x1B[49m"),
|
|
61
|
+
bgBlueBright: f("\x1B[104m", "\x1B[49m"),
|
|
62
|
+
bgMagentaBright: f("\x1B[105m", "\x1B[49m"),
|
|
63
|
+
bgCyanBright: f("\x1B[106m", "\x1B[49m"),
|
|
64
|
+
bgWhiteBright: f("\x1B[107m", "\x1B[49m")
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
module.exports = createColors();
|
|
68
|
+
module.exports.createColors = createColors;
|
|
69
|
+
}) });
|
|
70
|
+
|
|
71
|
+
//#endregion
|
|
72
|
+
export default require_picocolors();
|
|
73
|
+
|
|
74
|
+
export { };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import { n as __toDynamicImportESM } from "./chunk-Cdb3zUqJ.js";
|
|
2
|
+
import { t as createDebug } from "./dist-CNbFy2EZ.js";
|
|
3
|
+
import { t as vitePluginRscCore } from "./plugin-4UFT-s0w.js";
|
|
4
|
+
import { a as hasDirective, n as transformDirectiveProxyExport, o as transformWrapExport, s as findDirectives, t as transformServerActionServer } from "./transforms-CSPqW3RX.js";
|
|
5
|
+
import { o as generateEncryptionKey, s as toBase64 } from "./encryption-utils-DdqSKS_O.js";
|
|
6
|
+
import { n as createRpcServer } from "./rpc-nwJuNojy.js";
|
|
7
|
+
import { t as cjsModuleRunnerPlugin } from "./cjs-zUv66MZg.js";
|
|
8
|
+
import { n as parseIdQuery, r as toCssVirtual, t as parseCssVirtual } from "./shared-DlspEItJ.js";
|
|
8
9
|
import { createRequire } from "node:module";
|
|
9
10
|
import assert from "node:assert";
|
|
10
11
|
import fs from "node:fs";
|
|
@@ -19,6 +20,7 @@ import { crawlFrameworkPkgs } from "vitefu";
|
|
|
19
20
|
import { walk } from "estree-walker";
|
|
20
21
|
import { stripVTControlCharacters } from "node:util";
|
|
21
22
|
import { createHash } from "node:crypto";
|
|
23
|
+
import { stripLiteral } from "strip-literal";
|
|
22
24
|
|
|
23
25
|
//#region src/plugins/vite-utils.ts
|
|
24
26
|
const VALID_ID_PREFIX = `/@id/`;
|
|
@@ -387,17 +389,25 @@ function vitePluginRscMinimal(rscPluginOptions = {}, manager = new RscPluginMana
|
|
|
387
389
|
function vitePluginRsc(rscPluginOptions = {}) {
|
|
388
390
|
const manager = new RscPluginManager();
|
|
389
391
|
const buildApp = async (builder) => {
|
|
392
|
+
const colors = await import("./picocolors-BRKobevN.js").then(__toDynamicImportESM(1));
|
|
393
|
+
const logStep = (msg) => {
|
|
394
|
+
builder.config.logger.info(colors.blue(msg));
|
|
395
|
+
};
|
|
390
396
|
if (!builder.environments.ssr?.config.build.rollupOptions.input) {
|
|
391
397
|
manager.isScanBuild = true;
|
|
392
398
|
builder.environments.rsc.config.build.write = false;
|
|
393
399
|
builder.environments.client.config.build.write = false;
|
|
400
|
+
logStep("[1/4] analyze client references...");
|
|
394
401
|
await builder.build(builder.environments.rsc);
|
|
402
|
+
logStep("[2/4] analyze server references...");
|
|
395
403
|
await builder.build(builder.environments.client);
|
|
396
404
|
manager.isScanBuild = false;
|
|
397
405
|
builder.environments.rsc.config.build.write = true;
|
|
398
406
|
builder.environments.client.config.build.write = true;
|
|
407
|
+
logStep("[3/4] build rsc environment...");
|
|
399
408
|
await builder.build(builder.environments.rsc);
|
|
400
409
|
manager.stabilize();
|
|
410
|
+
logStep("[4/4] build client environment...");
|
|
401
411
|
await builder.build(builder.environments.client);
|
|
402
412
|
writeAssetsManifest(["rsc"]);
|
|
403
413
|
return;
|
|
@@ -405,14 +415,19 @@ function vitePluginRsc(rscPluginOptions = {}) {
|
|
|
405
415
|
manager.isScanBuild = true;
|
|
406
416
|
builder.environments.rsc.config.build.write = false;
|
|
407
417
|
builder.environments.ssr.config.build.write = false;
|
|
418
|
+
logStep("[1/5] analyze client references...");
|
|
408
419
|
await builder.build(builder.environments.rsc);
|
|
420
|
+
logStep("[2/5] analyze server references...");
|
|
409
421
|
await builder.build(builder.environments.ssr);
|
|
410
422
|
manager.isScanBuild = false;
|
|
411
423
|
builder.environments.rsc.config.build.write = true;
|
|
412
424
|
builder.environments.ssr.config.build.write = true;
|
|
425
|
+
logStep("[3/5] build rsc environment...");
|
|
413
426
|
await builder.build(builder.environments.rsc);
|
|
414
427
|
manager.stabilize();
|
|
428
|
+
logStep("[4/5] build client environment...");
|
|
415
429
|
await builder.build(builder.environments.client);
|
|
430
|
+
logStep("[5/5] build ssr environment...");
|
|
416
431
|
await builder.build(builder.environments.ssr);
|
|
417
432
|
writeAssetsManifest(["ssr", "rsc"]);
|
|
418
433
|
};
|
|
@@ -653,8 +668,9 @@ function vitePluginRsc(rscPluginOptions = {}) {
|
|
|
653
668
|
if (!code.includes("import.meta.viteRsc.loadModule")) return;
|
|
654
669
|
const { server } = manager;
|
|
655
670
|
const s = new MagicString(code);
|
|
656
|
-
for (const match of code.matchAll(/import\.meta\.viteRsc\.loadModule\(([\s\S]*?)\)/dg)) {
|
|
657
|
-
const [
|
|
671
|
+
for (const match of stripLiteral(code).matchAll(/import\.meta\.viteRsc\.loadModule\(([\s\S]*?)\)/dg)) {
|
|
672
|
+
const [argStart, argEnd] = match.indices[1];
|
|
673
|
+
const [environmentName, entryName] = evalValue(`[${code.slice(argStart, argEnd).trim()}]`);
|
|
658
674
|
let replacement;
|
|
659
675
|
if (this.environment.mode === "dev" && rscPluginOptions.loadModuleDevProxy) {
|
|
660
676
|
const origin = server.resolvedUrls?.local[0];
|
|
@@ -816,8 +832,9 @@ export default assetsManifest.bootstrapScriptContent;
|
|
|
816
832
|
if (!code.includes("loadBootstrapScriptContent") || !/import\s*\.\s*meta\s*\.\s*viteRsc\s*\.\s*loadBootstrapScriptContent/.test(code)) return;
|
|
817
833
|
assert(this.environment.name !== "client");
|
|
818
834
|
const output = new MagicString(code);
|
|
819
|
-
for (const match of code.matchAll(/import\s*\.\s*meta\s*\.\s*viteRsc\s*\.\s*loadBootstrapScriptContent\(([\s\S]*?)\)/dg)) {
|
|
820
|
-
const
|
|
835
|
+
for (const match of stripLiteral(code).matchAll(/import\s*\.\s*meta\s*\.\s*viteRsc\s*\.\s*loadBootstrapScriptContent\(([\s\S]*?)\)/dg)) {
|
|
836
|
+
const [argStart, argEnd] = match.indices[1];
|
|
837
|
+
const argCode = code.slice(argStart, argEnd).trim();
|
|
821
838
|
assert(evalValue(argCode), `[vite-rsc] expected 'loadBootstrapScriptContent("index")' but got ${argCode}`);
|
|
822
839
|
let replacement = `Promise.resolve(__vite_rsc_assets_manifest.bootstrapScriptContent)`;
|
|
823
840
|
const [start, end] = match.indices[0];
|
|
@@ -1479,9 +1496,10 @@ function vitePluginRscCss(rscCssOptions = {}, manager) {
|
|
|
1479
1496
|
assert(this.environment.name === "rsc");
|
|
1480
1497
|
const output = new MagicString(code);
|
|
1481
1498
|
let importAdded = false;
|
|
1482
|
-
for (const match of code.matchAll(/import\.meta\.viteRsc\.loadCss\(([\s\S]*?)\)/dg)) {
|
|
1499
|
+
for (const match of stripLiteral(code).matchAll(/import\.meta\.viteRsc\.loadCss\(([\s\S]*?)\)/dg)) {
|
|
1483
1500
|
const [start, end] = match.indices[0];
|
|
1484
|
-
const
|
|
1501
|
+
const [argStart, argEnd] = match.indices[1];
|
|
1502
|
+
const argCode = code.slice(argStart, argEnd).trim();
|
|
1485
1503
|
let importer = id;
|
|
1486
1504
|
if (argCode) {
|
|
1487
1505
|
const argValue = evalValue(argCode);
|
|
@@ -1618,4 +1636,4 @@ function __vite_rsc_wrap_css__(value, name) {
|
|
|
1618
1636
|
}
|
|
1619
1637
|
|
|
1620
1638
|
//#endregion
|
|
1621
|
-
export {
|
|
1639
|
+
export { vitePluginRscMinimal as i, transformRscCssExport as n, vitePluginRsc as r, getPluginApi as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TransformWrapExportFilter } from "./index-
|
|
1
|
+
import { s as TransformWrapExportFilter } from "./index-DJ0AhQ9B.js";
|
|
2
2
|
import MagicString from "magic-string";
|
|
3
3
|
import { Plugin, ResolvedConfig, Rollup, ViteDevServer, parseAstAsync } from "vite";
|
|
4
4
|
|
|
@@ -144,4 +144,4 @@ declare function transformRscCssExport(options: {
|
|
|
144
144
|
output: MagicString;
|
|
145
145
|
} | undefined>;
|
|
146
146
|
//#endregion
|
|
147
|
-
export {
|
|
147
|
+
export { ResolvedAssetsManifest as a, getPluginApi as c, vitePluginRscMinimal as d, ResolvedAssetDeps as i, transformRscCssExport as l, AssetsManifest as n, RscPluginManager as o, PluginApi as r, RscPluginOptions as s, AssetDeps as t, vitePluginRsc as u };
|
package/dist/plugin.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "./index-
|
|
2
|
-
import {
|
|
1
|
+
import "./index-DJ0AhQ9B.js";
|
|
2
|
+
import { a as ResolvedAssetsManifest, c as getPluginApi, d as vitePluginRscMinimal, i as ResolvedAssetDeps, l as transformRscCssExport, n as AssetsManifest, o as RscPluginManager, r as PluginApi, s as RscPluginOptions, t as AssetDeps, u as vitePluginRsc } from "./plugin-fbbM1muv.js";
|
|
3
3
|
export { AssetDeps, AssetsManifest, PluginApi, ResolvedAssetDeps, ResolvedAssetsManifest, RscPluginManager, RscPluginOptions, vitePluginRsc as default, getPluginApi, transformRscCssExport, vitePluginRscMinimal };
|
package/dist/plugin.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import "./dist-
|
|
2
|
-
import "./plugin-
|
|
3
|
-
import "./transforms-
|
|
4
|
-
import "./encryption-utils-
|
|
5
|
-
import "./rpc-
|
|
6
|
-
import {
|
|
7
|
-
import "./cjs-
|
|
8
|
-
import "./shared-
|
|
1
|
+
import "./dist-CNbFy2EZ.js";
|
|
2
|
+
import "./plugin-4UFT-s0w.js";
|
|
3
|
+
import "./transforms-CSPqW3RX.js";
|
|
4
|
+
import "./encryption-utils-DdqSKS_O.js";
|
|
5
|
+
import "./rpc-nwJuNojy.js";
|
|
6
|
+
import { i as vitePluginRscMinimal, n as transformRscCssExport, r as vitePluginRsc, t as getPluginApi } from "./plugin-DNwmUjn4.js";
|
|
7
|
+
import "./cjs-zUv66MZg.js";
|
|
8
|
+
import "./shared-DlspEItJ.js";
|
|
9
9
|
|
|
10
10
|
export { vitePluginRsc as default, getPluginApi, transformRscCssExport, vitePluginRscMinimal };
|
package/dist/plugins/cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../dist-
|
|
2
|
-
import { cjsModuleRunnerPlugin } from "../cjs-
|
|
3
|
-
import "../shared-
|
|
1
|
+
import "../dist-CNbFy2EZ.js";
|
|
2
|
+
import { t as cjsModuleRunnerPlugin } from "../cjs-zUv66MZg.js";
|
|
3
|
+
import "../shared-DlspEItJ.js";
|
|
4
4
|
|
|
5
5
|
export { cjsModuleRunnerPlugin };
|
package/dist/react/browser.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CallServerCallback } from "../index-
|
|
2
|
-
import { setRequireModule } from "../browser-
|
|
3
|
-
import {
|
|
1
|
+
import { n as CallServerCallback } from "../index-BY8KUQhI.js";
|
|
2
|
+
import { t as setRequireModule } from "../browser-CDBRiZjk.js";
|
|
3
|
+
import { a as createTemporaryReferenceSet, c as setServerCallback, i as createServerReference, n as createFromFetch, o as encodeReply, r as createFromReadableStream, s as findSourceMapURL, t as callServer } from "../browser-C8KlM-b7.js";
|
|
4
4
|
export { CallServerCallback, callServer, createFromFetch, createFromReadableStream, createServerReference, createTemporaryReferenceSet, encodeReply, findSourceMapURL, setRequireModule, setServerCallback };
|
package/dist/react/browser.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "../dist-
|
|
2
|
-
import "../shared-
|
|
3
|
-
import { setRequireModule } from "../browser-
|
|
4
|
-
import {
|
|
1
|
+
import "../dist-CNbFy2EZ.js";
|
|
2
|
+
import "../shared-C8PSRwR2.js";
|
|
3
|
+
import { t as setRequireModule } from "../browser-U86erGOy.js";
|
|
4
|
+
import { a as createTemporaryReferenceSet, c as setServerCallback, i as createServerReference, n as createFromFetch, o as encodeReply, r as createFromReadableStream, s as findSourceMapURL, t as callServer } from "../browser-B4C0Zb4m.js";
|
|
5
5
|
|
|
6
6
|
export { callServer, createFromFetch, createFromReadableStream, createServerReference, createTemporaryReferenceSet, encodeReply, findSourceMapURL, setRequireModule, setServerCallback };
|
package/dist/react/rsc.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../index-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import "../index-BY8KUQhI.js";
|
|
2
|
+
import { a as setRequireModule, i as loadServerAction } from "../rsc-OCbFObYE.js";
|
|
3
|
+
import { a as decodeFormState, c as registerClientReference, i as decodeAction, l as registerServerReference, n as createFromReadableStream, o as decodeReply, r as createTemporaryReferenceSet, s as encodeReply, t as createClientTemporaryReferenceSet, u as renderToReadableStream } from "../rsc-03j1e3xp.js";
|
|
4
4
|
export { createClientTemporaryReferenceSet, createFromReadableStream, createTemporaryReferenceSet, decodeAction, decodeFormState, decodeReply, encodeReply, loadServerAction, registerClientReference, registerServerReference, renderToReadableStream, setRequireModule };
|
package/dist/react/rsc.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "../dist-
|
|
2
|
-
import "../shared-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import "../dist-CNbFy2EZ.js";
|
|
2
|
+
import "../shared-C8PSRwR2.js";
|
|
3
|
+
import { a as setRequireModule, i as loadServerAction } from "../rsc-bL1QvQCm.js";
|
|
4
|
+
import { a as decodeFormState, c as registerClientReference, i as decodeAction, l as registerServerReference, n as createFromReadableStream, o as decodeReply, r as createTemporaryReferenceSet, s as encodeReply, t as createClientTemporaryReferenceSet, u as renderToReadableStream } from "../rsc-B_DQ_Sju.js";
|
|
5
5
|
|
|
6
6
|
export { createClientTemporaryReferenceSet, createFromReadableStream, createTemporaryReferenceSet, decodeAction, decodeFormState, decodeReply, encodeReply, loadServerAction, registerClientReference, registerServerReference, renderToReadableStream, setRequireModule };
|
package/dist/react/ssr.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../index-
|
|
2
|
-
import { setRequireModule } from "../ssr-
|
|
3
|
-
import {
|
|
1
|
+
import "../index-BY8KUQhI.js";
|
|
2
|
+
import { n as setRequireModule } from "../ssr-fBV4xXen.js";
|
|
3
|
+
import { i as findSourceMapURL, n as createFromReadableStream, r as createServerReference, t as callServer } from "../ssr-Dgbl_mOS.js";
|
|
4
4
|
export { callServer, createFromReadableStream, createServerReference, findSourceMapURL, setRequireModule };
|
package/dist/react/ssr.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "../dist-
|
|
2
|
-
import "../shared-
|
|
3
|
-
import { setRequireModule } from "../ssr-
|
|
4
|
-
import {
|
|
1
|
+
import "../dist-CNbFy2EZ.js";
|
|
2
|
+
import "../shared-C8PSRwR2.js";
|
|
3
|
+
import { n as setRequireModule } from "../ssr-EH7rBPkK.js";
|
|
4
|
+
import { i as findSourceMapURL, n as createFromReadableStream, r as createServerReference, t as callServer } from "../ssr-DzY6rnEv.js";
|
|
5
5
|
|
|
6
6
|
export { callServer, createFromReadableStream, createServerReference, findSourceMapURL, setRequireModule };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ReactFormState } from "react-dom/client";
|
|
2
2
|
|
|
3
3
|
//#region src/react/rsc.d.ts
|
|
4
|
-
declare function renderToReadableStream<T>(data: T, options?: object): ReadableStream<Uint8Array>;
|
|
5
|
-
declare function createFromReadableStream<T>(stream: ReadableStream<Uint8Array>, options?: object): Promise<T>;
|
|
6
|
-
declare function registerClientReference<T>(proxy: T, id: string, name: string): T;
|
|
4
|
+
declare function renderToReadableStream<T$1>(data: T$1, options?: object): ReadableStream<Uint8Array>;
|
|
5
|
+
declare function createFromReadableStream<T$1>(stream: ReadableStream<Uint8Array>, options?: object): Promise<T$1>;
|
|
6
|
+
declare function registerClientReference<T$1>(proxy: T$1, id: string, name: string): T$1;
|
|
7
7
|
declare const registerServerReference: <T>(ref: T, id: string, name: string) => T;
|
|
8
8
|
declare function decodeReply(body: string | FormData, options?: unknown): Promise<unknown[]>;
|
|
9
9
|
declare function decodeAction(body: FormData): Promise<() => Promise<void>>;
|
|
@@ -12,4 +12,4 @@ declare const createTemporaryReferenceSet: () => unknown;
|
|
|
12
12
|
declare const encodeReply: (v: unknown[], options?: unknown) => Promise<string | FormData>;
|
|
13
13
|
declare const createClientTemporaryReferenceSet: () => unknown;
|
|
14
14
|
//#endregion
|
|
15
|
-
export {
|
|
15
|
+
export { decodeFormState as a, registerClientReference as c, decodeAction as i, registerServerReference as l, createFromReadableStream as n, decodeReply as o, createTemporaryReferenceSet as r, encodeReply as s, createClientTemporaryReferenceSet as t, renderToReadableStream as u };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as createServerDecodeClientManifest, r as createServerManifest, t as createClientManifest } from "./rsc-bL1QvQCm.js";
|
|
2
2
|
import * as ReactServer from "@vitejs/plugin-rsc/vendor/react-server-dom/server.edge";
|
|
3
3
|
import * as ReactClient from "@vitejs/plugin-rsc/vendor/react-server-dom/client.edge";
|
|
4
4
|
|
|
@@ -33,4 +33,4 @@ const encodeReply = ReactClient.encodeReply;
|
|
|
33
33
|
const createClientTemporaryReferenceSet = ReactClient.createTemporaryReferenceSet;
|
|
34
34
|
|
|
35
35
|
//#endregion
|
|
36
|
-
export {
|
|
36
|
+
export { decodeFormState as a, registerClientReference as c, decodeAction as i, registerServerReference as l, createFromReadableStream as n, decodeReply as o, createTemporaryReferenceSet as r, encodeReply as s, createClientTemporaryReferenceSet as t, renderToReadableStream as u };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as ModuleMap, t as BundlerConfig } from "./index-BY8KUQhI.js";
|
|
2
2
|
|
|
3
3
|
//#region src/core/rsc.d.ts
|
|
4
4
|
declare function setRequireModule(options: {
|
|
@@ -9,4 +9,4 @@ declare function createServerManifest(): BundlerConfig;
|
|
|
9
9
|
declare function createServerDecodeClientManifest(): ModuleMap;
|
|
10
10
|
declare function createClientManifest(): BundlerConfig;
|
|
11
11
|
//#endregion
|
|
12
|
-
export {
|
|
12
|
+
export { setRequireModule as a, loadServerAction as i, createServerDecodeClientManifest as n, createServerManifest as r, createClientManifest as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { i as tinyassert, n as memoize } from "./dist-CNbFy2EZ.js";
|
|
2
|
+
import { a as setInternalRequire, i as removeReferenceCacheTag, n as SERVER_REFERENCE_PREFIX, r as createReferenceCacheTag, t as SERVER_DECODE_CLIENT_PREFIX } from "./shared-C8PSRwR2.js";
|
|
3
3
|
import * as ReactServer from "@vitejs/plugin-rsc/vendor/react-server-dom/server.edge";
|
|
4
4
|
|
|
5
5
|
//#region src/core/rsc.ts
|
|
@@ -74,4 +74,4 @@ function createClientManifest() {
|
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
//#endregion
|
|
77
|
-
export {
|
|
77
|
+
export { setRequireModule as a, loadServerAction as i, createServerDecodeClientManifest as n, createServerManifest as r, createClientManifest as t };
|
package/dist/rsc.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./index-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import "./index-BY8KUQhI.js";
|
|
2
|
+
import { a as setRequireModule, i as loadServerAction, r as createServerManifest, t as createClientManifest } from "./rsc-OCbFObYE.js";
|
|
3
|
+
import { a as decodeFormState, c as registerClientReference, i as decodeAction, l as registerServerReference, n as createFromReadableStream, o as decodeReply, r as createTemporaryReferenceSet, s as encodeReply, t as createClientTemporaryReferenceSet, u as renderToReadableStream } from "./rsc-03j1e3xp.js";
|
|
4
|
+
import { n as encryptActionBoundArgs, t as decryptActionBoundArgs } from "./encryption-runtime-BDgc4dBr.js";
|
|
5
5
|
export { createClientManifest, createClientTemporaryReferenceSet, createFromReadableStream, createServerManifest, createTemporaryReferenceSet, decodeAction, decodeFormState, decodeReply, decryptActionBoundArgs, encodeReply, encryptActionBoundArgs, loadServerAction, registerClientReference, registerServerReference, renderToReadableStream, setRequireModule };
|
package/dist/rsc.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import "./dist-
|
|
2
|
-
import "./shared-
|
|
3
|
-
import "./encryption-utils-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import "./dist-CNbFy2EZ.js";
|
|
2
|
+
import "./shared-C8PSRwR2.js";
|
|
3
|
+
import "./encryption-utils-DdqSKS_O.js";
|
|
4
|
+
import { a as setRequireModule, i as loadServerAction, r as createServerManifest, t as createClientManifest } from "./rsc-bL1QvQCm.js";
|
|
5
|
+
import { a as decodeFormState, c as registerClientReference, i as decodeAction, l as registerServerReference, n as createFromReadableStream, o as decodeReply, r as createTemporaryReferenceSet, s as encodeReply, t as createClientTemporaryReferenceSet, u as renderToReadableStream } from "./rsc-B_DQ_Sju.js";
|
|
6
|
+
import { n as encryptActionBoundArgs, t as decryptActionBoundArgs } from "./encryption-runtime-D5_PLt4C.js";
|
|
7
7
|
import serverReferences from "virtual:vite-rsc/server-references";
|
|
8
8
|
|
|
9
9
|
//#region src/rsc.tsx
|
|
@@ -18,4 +18,4 @@ function setInternalRequire() {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
//#endregion
|
|
21
|
-
export {
|
|
21
|
+
export { setInternalRequire as a, removeReferenceCacheTag as i, SERVER_REFERENCE_PREFIX as n, createReferenceCacheTag as r, SERVER_DECODE_CLIENT_PREFIX as t };
|
|
@@ -4,4 +4,4 @@ declare function createServerReference(id: string): unknown;
|
|
|
4
4
|
declare const callServer: null;
|
|
5
5
|
declare const findSourceMapURL: null;
|
|
6
6
|
//#endregion
|
|
7
|
-
export {
|
|
7
|
+
export { findSourceMapURL as i, createFromReadableStream as n, createServerReference as r, callServer as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createServerConsumerManifest } from "./ssr-
|
|
1
|
+
import { t as createServerConsumerManifest } from "./ssr-EH7rBPkK.js";
|
|
2
2
|
import * as ReactClient from "@vitejs/plugin-rsc/vendor/react-server-dom/client.edge";
|
|
3
3
|
|
|
4
4
|
//#region src/react/ssr.ts
|
|
@@ -15,4 +15,4 @@ const callServer = null;
|
|
|
15
15
|
const findSourceMapURL = null;
|
|
16
16
|
|
|
17
17
|
//#endregion
|
|
18
|
-
export {
|
|
18
|
+
export { findSourceMapURL as i, createFromReadableStream as n, createServerReference as r, callServer as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { memoize } from "./dist-
|
|
2
|
-
import {
|
|
1
|
+
import { n as memoize } from "./dist-CNbFy2EZ.js";
|
|
2
|
+
import { a as setInternalRequire, i as removeReferenceCacheTag } from "./shared-C8PSRwR2.js";
|
|
3
3
|
|
|
4
4
|
//#region src/core/ssr.ts
|
|
5
5
|
let init = false;
|
|
@@ -20,4 +20,4 @@ function createServerConsumerManifest() {
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
//#endregion
|
|
23
|
-
export {
|
|
23
|
+
export { setRequireModule as n, createServerConsumerManifest as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ServerConsumerManifest } from "./index-
|
|
1
|
+
import { i as ServerConsumerManifest } from "./index-BY8KUQhI.js";
|
|
2
2
|
|
|
3
3
|
//#region src/core/ssr.d.ts
|
|
4
4
|
declare function setRequireModule(options: {
|
|
@@ -6,4 +6,4 @@ declare function setRequireModule(options: {
|
|
|
6
6
|
}): void;
|
|
7
7
|
declare function createServerConsumerManifest(): ServerConsumerManifest;
|
|
8
8
|
//#endregion
|
|
9
|
-
export {
|
|
9
|
+
export { setRequireModule as n, createServerConsumerManifest as t };
|
package/dist/ssr.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./index-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import "./index-BY8KUQhI.js";
|
|
2
|
+
import { n as setRequireModule, t as createServerConsumerManifest } from "./ssr-fBV4xXen.js";
|
|
3
|
+
import { i as findSourceMapURL, n as createFromReadableStream, r as createServerReference, t as callServer } from "./ssr-Dgbl_mOS.js";
|
|
4
4
|
export { callServer, createFromReadableStream, createServerConsumerManifest, createServerReference, findSourceMapURL, setRequireModule };
|
package/dist/ssr.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "./dist-
|
|
2
|
-
import "./shared-
|
|
3
|
-
import { toCssVirtual } from "./shared-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import "./dist-CNbFy2EZ.js";
|
|
2
|
+
import "./shared-C8PSRwR2.js";
|
|
3
|
+
import { r as toCssVirtual } from "./shared-DlspEItJ.js";
|
|
4
|
+
import { n as setRequireModule, t as createServerConsumerManifest } from "./ssr-EH7rBPkK.js";
|
|
5
|
+
import { i as findSourceMapURL, n as createFromReadableStream, r as createServerReference, t as callServer } from "./ssr-DzY6rnEv.js";
|
|
6
6
|
import * as clientReferences from "virtual:vite-rsc/client-references";
|
|
7
7
|
import assetsManifest from "virtual:vite-rsc/assets-manifest";
|
|
8
8
|
import * as ReactDOM from "react-dom";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as transformDirectiveProxyExport, c as TransformWrapExportOptions, d as transformHoistInlineDirective, i as TransformProxyExportOptions, l as transformWrapExport, n as getExportNames, o as transformProxyExport, r as hasDirective, s as TransformWrapExportFilter, t as transformServerActionServer, u as findDirectives } from "../index-DJ0AhQ9B.js";
|
|
2
2
|
export { TransformProxyExportOptions, TransformWrapExportFilter, TransformWrapExportOptions, findDirectives, getExportNames, hasDirective, transformDirectiveProxyExport, transformHoistInlineDirective, transformProxyExport, transformServerActionServer, transformWrapExport };
|
package/dist/transforms/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../dist-
|
|
2
|
-
import {
|
|
1
|
+
import "../dist-CNbFy2EZ.js";
|
|
2
|
+
import { a as hasDirective, c as transformHoistInlineDirective, i as getExportNames, n as transformDirectiveProxyExport, o as transformWrapExport, r as transformProxyExport, s as findDirectives, t as transformServerActionServer } from "../transforms-CSPqW3RX.js";
|
|
3
3
|
|
|
4
4
|
export { findDirectives, getExportNames, hasDirective, transformDirectiveProxyExport, transformHoistInlineDirective, transformProxyExport, transformServerActionServer, transformWrapExport };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { tinyassert } from "./dist-
|
|
1
|
+
import { i as tinyassert } from "./dist-CNbFy2EZ.js";
|
|
2
2
|
import MagicString from "magic-string";
|
|
3
3
|
import { walk } from "estree-walker";
|
|
4
4
|
import { analyze, extract_names } from "periscopic";
|
|
5
5
|
|
|
6
6
|
//#region src/transforms/hoist.ts
|
|
7
7
|
function transformHoistInlineDirective(input, ast, { runtime, rejectNonAsyncFunction,...options }) {
|
|
8
|
+
if (!input.endsWith("\n")) input += "\n";
|
|
8
9
|
const output = new MagicString(input);
|
|
9
10
|
const directive = typeof options.directive === "string" ? exactRegex(options.directive) : options.directive;
|
|
10
11
|
walk(ast, { enter(node) {
|
|
@@ -340,4 +341,4 @@ function transformServerActionServer(input, ast, options) {
|
|
|
340
341
|
}
|
|
341
342
|
|
|
342
343
|
//#endregion
|
|
343
|
-
export {
|
|
344
|
+
export { hasDirective as a, transformHoistInlineDirective as c, getExportNames as i, transformDirectiveProxyExport as n, transformWrapExport as o, transformProxyExport as r, findDirectives as s, transformServerActionServer as t };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as encryptActionBoundArgs, t as decryptActionBoundArgs } from "../encryption-runtime-BDgc4dBr.js";
|
|
2
2
|
export { decryptActionBoundArgs, encryptActionBoundArgs };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "../dist-
|
|
2
|
-
import "../shared-
|
|
3
|
-
import "../encryption-utils-
|
|
4
|
-
import "../rsc-
|
|
5
|
-
import "../rsc-
|
|
6
|
-
import {
|
|
1
|
+
import "../dist-CNbFy2EZ.js";
|
|
2
|
+
import "../shared-C8PSRwR2.js";
|
|
3
|
+
import "../encryption-utils-DdqSKS_O.js";
|
|
4
|
+
import "../rsc-bL1QvQCm.js";
|
|
5
|
+
import "../rsc-B_DQ_Sju.js";
|
|
6
|
+
import { n as encryptActionBoundArgs, t as decryptActionBoundArgs } from "../encryption-runtime-D5_PLt4C.js";
|
|
7
7
|
|
|
8
8
|
export { decryptActionBoundArgs, encryptActionBoundArgs };
|
package/dist/utils/rpc.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitejs/plugin-rsc",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "React Server Components (RSC) support for Vite.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vite",
|
|
@@ -44,24 +44,26 @@
|
|
|
44
44
|
"estree-walker": "^3.0.3",
|
|
45
45
|
"magic-string": "^0.30.19",
|
|
46
46
|
"periscopic": "^4.0.2",
|
|
47
|
+
"strip-literal": "^3.1.0",
|
|
47
48
|
"turbo-stream": "^3.1.0",
|
|
48
49
|
"vitefu": "^1.1.1"
|
|
49
50
|
},
|
|
50
51
|
"devDependencies": {
|
|
51
52
|
"@hiogawa/utils": "^1.7.0",
|
|
52
|
-
"@playwright/test": "^1.
|
|
53
|
+
"@playwright/test": "^1.56.1",
|
|
53
54
|
"@tsconfig/strictest": "^2.0.6",
|
|
54
55
|
"@types/estree": "^1.0.8",
|
|
55
|
-
"@types/node": "^22.18.
|
|
56
|
+
"@types/node": "^22.18.11",
|
|
56
57
|
"@types/react": "^19.2.2",
|
|
57
|
-
"@types/react-dom": "^19.2.
|
|
58
|
+
"@types/react-dom": "^19.2.2",
|
|
58
59
|
"@vitejs/plugin-react": "workspace:*",
|
|
59
60
|
"@vitejs/test-dep-cjs-and-esm": "./test-dep/cjs-and-esm",
|
|
61
|
+
"picocolors": "^1.1.1",
|
|
60
62
|
"react": "^19.2.0",
|
|
61
63
|
"react-dom": "^19.2.0",
|
|
62
64
|
"react-server-dom-webpack": "^19.2.0",
|
|
63
65
|
"tinyexec": "^1.0.1",
|
|
64
|
-
"tsdown": "^0.15.
|
|
66
|
+
"tsdown": "^0.15.8"
|
|
65
67
|
},
|
|
66
68
|
"peerDependencies": {
|
|
67
69
|
"react": "*",
|