@farm.js/plugin 0.1.0-beta.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/LICENSE +22 -0
- package/README.md +11 -0
- package/dist/api/index.d.ts +42 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/index.js +567 -0
- package/dist/context/index.d.ts +61 -0
- package/dist/context/index.d.ts.map +1 -0
- package/dist/context/index.js +75 -0
- package/dist/index.d.ts +43 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +49 -0
- package/dist/middleware/index.d.ts +97 -0
- package/dist/middleware/index.d.ts.map +1 -0
- package/dist/middleware/index.js +469 -0
- package/dist/observability/index.d.ts +190 -0
- package/dist/observability/index.d.ts.map +1 -0
- package/dist/observability/index.js +399 -0
- package/dist/rsc/build-paths.d.ts +3 -0
- package/dist/rsc/build-paths.d.ts.map +1 -0
- package/dist/rsc/build-paths.js +8 -0
- package/dist/rsc/entries/client.d.ts +14 -0
- package/dist/rsc/entries/client.d.ts.map +1 -0
- package/dist/rsc/entries/client.js +283 -0
- package/dist/rsc/entries/rsc.d.ts +13 -0
- package/dist/rsc/entries/rsc.d.ts.map +1 -0
- package/dist/rsc/entries/rsc.js +932 -0
- package/dist/rsc/entries/ssr.d.ts +13 -0
- package/dist/rsc/entries/ssr.d.ts.map +1 -0
- package/dist/rsc/entries/ssr.js +245 -0
- package/dist/rsc/index.d.ts +78 -0
- package/dist/rsc/index.d.ts.map +1 -0
- package/dist/rsc/index.js +1368 -0
- package/dist/rsc/nitro-build.d.ts +36 -0
- package/dist/rsc/nitro-build.d.ts.map +1 -0
- package/dist/rsc/nitro-build.js +396 -0
- package/dist/rsc/optimized-boundary.d.ts +20 -0
- package/dist/rsc/optimized-boundary.d.ts.map +1 -0
- package/dist/rsc/optimized-boundary.js +15 -0
- package/dist/rsc/server-fn-transform.d.ts +6 -0
- package/dist/rsc/server-fn-transform.d.ts.map +1 -0
- package/dist/rsc/server-fn-transform.js +152 -0
- package/dist/rsc/types.d.ts +123 -0
- package/dist/rsc/types.d.ts.map +1 -0
- package/dist/rsc/types.js +1 -0
- package/dist/rsc/vite-plugin-nitro.d.ts +33 -0
- package/dist/rsc/vite-plugin-nitro.d.ts.map +1 -0
- package/dist/rsc/vite-plugin-nitro.js +163 -0
- package/package.json +94 -0
- package/scripts/build.js +7 -0
- package/scripts/clean.js +6 -0
- package/scripts/run-nitro.mjs +18 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { EntryContext } from "../types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Generates the SSR environment entry file.
|
|
4
|
+
*
|
|
5
|
+
* This entry file:
|
|
6
|
+
* - Receives the RSC stream from the RSC environment
|
|
7
|
+
* - Tees (duplicates) the stream - one copy for SSR, one for client hydration
|
|
8
|
+
* - Deserializes the RSC stream back to React elements
|
|
9
|
+
* - Renders those elements to HTML using React DOM's SSR
|
|
10
|
+
* - Injects the RSC payload into the HTML so the client can hydrate
|
|
11
|
+
*/
|
|
12
|
+
export declare function generateSsrEntry(ctx: EntryContext): string;
|
|
13
|
+
//# sourceMappingURL=ssr.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ssr.d.ts","sourceRoot":"","sources":["../../../src/rsc/entries/ssr.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,YAAY,GAAG,MAAM,CA6O1D"}
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generates the SSR environment entry file.
|
|
3
|
+
*
|
|
4
|
+
* This entry file:
|
|
5
|
+
* - Receives the RSC stream from the RSC environment
|
|
6
|
+
* - Tees (duplicates) the stream - one copy for SSR, one for client hydration
|
|
7
|
+
* - Deserializes the RSC stream back to React elements
|
|
8
|
+
* - Renders those elements to HTML using React DOM's SSR
|
|
9
|
+
* - Injects the RSC payload into the HTML so the client can hydrate
|
|
10
|
+
*/
|
|
11
|
+
export function generateSsrEntry(ctx) {
|
|
12
|
+
const debugLog = `// Debug disabled`;
|
|
13
|
+
const routesDir = ctx.routesDir === undefined ? "app" : ctx.routesDir.trim();
|
|
14
|
+
const routesPath = routesDir ? `/${routesDir}` : "";
|
|
15
|
+
const globalsCssPath = ctx.globalCssPath ?? `/${ctx.srcDir}${routesPath}/globals.css`;
|
|
16
|
+
return `
|
|
17
|
+
import React from 'react';
|
|
18
|
+
import { createFromReadableStream } from '@vitejs/plugin-rsc/ssr';
|
|
19
|
+
import { injectRSCPayload } from 'rsc-html-stream/server';
|
|
20
|
+
import { renderToPipeableStream } from 'react-dom/server';
|
|
21
|
+
|
|
22
|
+
function debug(...args) {
|
|
23
|
+
${debugLog}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const DEV_GLOBAL_CSS_HREF = ${JSON.stringify(globalsCssPath)};
|
|
27
|
+
const CLIENT_CSS_HREF = "__FARM_CLIENT_CSS_HREF__";
|
|
28
|
+
const PLACEHOLDER_CSS_HREF = "__FARM_CLIENT_CSS_HREF__";
|
|
29
|
+
const resolvedCssHref =
|
|
30
|
+
typeof CLIENT_CSS_HREF === "string" &&
|
|
31
|
+
CLIENT_CSS_HREF.indexOf(PLACEHOLDER_CSS_HREF) < 0
|
|
32
|
+
? CLIENT_CSS_HREF
|
|
33
|
+
: DEV_GLOBAL_CSS_HREF;
|
|
34
|
+
|
|
35
|
+
function escapeHtmlAttribute(value) {
|
|
36
|
+
return String(value).replace(/[&"]/g, (char) => (char === '&' ? '&' : '"'));
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const cssLinkTag = resolvedCssHref
|
|
40
|
+
? '<link rel="stylesheet" href="' + escapeHtmlAttribute(resolvedCssHref) + '" as="style" data-precedence="default">'
|
|
41
|
+
: '';
|
|
42
|
+
|
|
43
|
+
function injectIntoHeadStream(tag) {
|
|
44
|
+
const encoder = new TextEncoder();
|
|
45
|
+
const decoder = new TextDecoder();
|
|
46
|
+
const marker = '</head>';
|
|
47
|
+
let buffer = '';
|
|
48
|
+
let injected = false;
|
|
49
|
+
|
|
50
|
+
return new TransformStream({
|
|
51
|
+
transform(chunk, controller) {
|
|
52
|
+
const str = typeof chunk === "string" ? chunk : decoder.decode(chunk);
|
|
53
|
+
if (injected || !tag) {
|
|
54
|
+
controller.enqueue(typeof chunk === "string" ? encoder.encode(str) : chunk);
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
buffer += str;
|
|
59
|
+
const index = buffer.indexOf(marker);
|
|
60
|
+
if (index >= 0) {
|
|
61
|
+
const before = buffer.slice(0, index);
|
|
62
|
+
const after = buffer.slice(index + marker.length);
|
|
63
|
+
controller.enqueue(encoder.encode(before + tag + marker + after));
|
|
64
|
+
buffer = '';
|
|
65
|
+
injected = true;
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
if (buffer.length > marker.length) {
|
|
70
|
+
controller.enqueue(encoder.encode(buffer.slice(0, buffer.length - marker.length)));
|
|
71
|
+
buffer = buffer.slice(-marker.length);
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
flush(controller) {
|
|
75
|
+
if (buffer) controller.enqueue(encoder.encode(buffer));
|
|
76
|
+
},
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/** Collect Node stream (from renderToPipeableStream) into a single string. Supports Suspense. */
|
|
81
|
+
function pipeableStreamToString(stream) {
|
|
82
|
+
return new Promise((resolve, reject) => {
|
|
83
|
+
const chunks = [];
|
|
84
|
+
stream.on('data', (c) => chunks.push(c));
|
|
85
|
+
stream.on('end', () => resolve(Buffer.concat(chunks).toString('utf-8')));
|
|
86
|
+
stream.on('error', reject);
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Renders an RSC stream to HTML
|
|
92
|
+
* Called by the RSC environment's handler
|
|
93
|
+
* @param { { payload, rscStream } | ReadableStream } firstArg - Either { payload, rscStream } for initial load (stream tree so loading.tsx shows first) or legacy rscStream only
|
|
94
|
+
*/
|
|
95
|
+
export async function renderHTML(firstArg, options = {}) {
|
|
96
|
+
debug('Starting SSR render');
|
|
97
|
+
|
|
98
|
+
const hasPayload = firstArg && typeof firstArg === 'object' && firstArg.payload != null && firstArg.rscStream != null;
|
|
99
|
+
const rscStream = hasPayload ? firstArg.rscStream : firstArg;
|
|
100
|
+
const [s1, s2] = rscStream.tee();
|
|
101
|
+
|
|
102
|
+
// Always deserialize the RSC stream before SSR. Rendering the raw payload directly
|
|
103
|
+
// calls client references on the server (for example, a "use client" Counter).
|
|
104
|
+
const payload = await createFromReadableStream(s1);
|
|
105
|
+
const rootElement = payload.root;
|
|
106
|
+
|
|
107
|
+
function Root() {
|
|
108
|
+
return rootElement;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// Get the bootstrap script that loads the client bundle (for hydration).
|
|
112
|
+
// In dev: Farm sets globalThis.__FARM_VITE_RSC_LOAD_BOOTSTRAP__ or import.meta.viteRsc.
|
|
113
|
+
// In production: __FARM_BOOTSTRAP_SCRIPT__ is replaced at build time by nitro-build from the manifest.
|
|
114
|
+
const PROD_BOOTSTRAP = "__FARM_BOOTSTRAP_SCRIPT__";
|
|
115
|
+
let bootstrap = '';
|
|
116
|
+
try {
|
|
117
|
+
if (typeof globalThis.__FARM_VITE_RSC_LOAD_BOOTSTRAP__ === 'function') {
|
|
118
|
+
bootstrap = await globalThis.__FARM_VITE_RSC_LOAD_BOOTSTRAP__();
|
|
119
|
+
} else if (typeof import.meta.viteRsc?.loadBootstrapScriptContent === 'function') {
|
|
120
|
+
bootstrap = await import.meta.viteRsc.loadBootstrapScriptContent('index');
|
|
121
|
+
}
|
|
122
|
+
} catch (e) {
|
|
123
|
+
debug('Could not load bootstrap script:', e);
|
|
124
|
+
}
|
|
125
|
+
if (!bootstrap && PROD_BOOTSTRAP !== "__FARM_BOOTSTRAP_SCRIPT__") bootstrap = PROD_BOOTSTRAP;
|
|
126
|
+
|
|
127
|
+
// Use renderToPipeableStream so Suspense streams: fallback (loading.tsx) first, then resolved content.
|
|
128
|
+
const { pipe } = renderToPipeableStream(React.createElement(Root), {
|
|
129
|
+
...(bootstrap && { bootstrapScriptContent: bootstrap }),
|
|
130
|
+
formState: options.formState,
|
|
131
|
+
});
|
|
132
|
+
const { PassThrough, Readable } = await import('stream');
|
|
133
|
+
const passThrough = new PassThrough();
|
|
134
|
+
pipe(passThrough);
|
|
135
|
+
|
|
136
|
+
const CLIENT_ENTRY_HREF = "__FARM_CLIENT_ENTRY_HREF__";
|
|
137
|
+
const PLACEHOLDER_STR = "__FARM_CLIENT_ENTRY_HREF__";
|
|
138
|
+
const injectClientScriptInStream = typeof CLIENT_ENTRY_HREF === "string" && CLIENT_ENTRY_HREF.length > 0 && CLIENT_ENTRY_HREF.indexOf(PLACEHOLDER_STR) < 0;
|
|
139
|
+
const clientScriptTag = injectClientScriptInStream ? '<script type="module" src="' + CLIENT_ENTRY_HREF + '"></script>' : '';
|
|
140
|
+
|
|
141
|
+
if (hasPayload) {
|
|
142
|
+
// Stream HTML to the client while preserving the RSC payload for hydration.
|
|
143
|
+
debug('Streaming HTML (loading fallback then content)');
|
|
144
|
+
const BODY_HTML_END = '</body></html>';
|
|
145
|
+
const TAG_LEN = BODY_HTML_END.length;
|
|
146
|
+
const encoder = new TextEncoder();
|
|
147
|
+
let streamBuf = '';
|
|
148
|
+
const streamingClientScriptInjector = new TransformStream({
|
|
149
|
+
transform(chunk, controller) {
|
|
150
|
+
const str = typeof chunk === "string" ? chunk : new TextDecoder().decode(chunk);
|
|
151
|
+
if (!injectClientScriptInStream || !clientScriptTag) {
|
|
152
|
+
controller.enqueue(typeof chunk === "string" ? encoder.encode(str) : chunk);
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
streamBuf += str;
|
|
156
|
+
while (streamBuf.length > TAG_LEN) {
|
|
157
|
+
const tail = streamBuf.slice(-TAG_LEN);
|
|
158
|
+
if (tail === BODY_HTML_END) {
|
|
159
|
+
const before = streamBuf.slice(0, streamBuf.length - TAG_LEN);
|
|
160
|
+
controller.enqueue(encoder.encode(before + clientScriptTag + BODY_HTML_END));
|
|
161
|
+
streamBuf = '';
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
controller.enqueue(encoder.encode(streamBuf.slice(0, streamBuf.length - TAG_LEN)));
|
|
165
|
+
streamBuf = streamBuf.slice(-TAG_LEN);
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
flush(controller) {
|
|
169
|
+
if (streamBuf) controller.enqueue(encoder.encode(streamBuf));
|
|
170
|
+
}
|
|
171
|
+
});
|
|
172
|
+
const webStream = typeof Readable.toWeb === 'function'
|
|
173
|
+
? Readable.toWeb(passThrough)
|
|
174
|
+
: new ReadableStream({
|
|
175
|
+
start(controller) {
|
|
176
|
+
passThrough.on('data', (c) => controller.enqueue(c instanceof Buffer ? c : new TextEncoder().encode(String(c))));
|
|
177
|
+
passThrough.on('end', () => controller.close());
|
|
178
|
+
passThrough.on('error', (e) => controller.error(e));
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
let out = webStream.pipeThrough(injectIntoHeadStream(cssLinkTag));
|
|
182
|
+
out = out.pipeThrough(injectRSCPayload(s2));
|
|
183
|
+
out = out.pipeThrough(streamingClientScriptInjector);
|
|
184
|
+
return out;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
// Legacy path: buffer full HTML then send (no loading streaming)
|
|
188
|
+
debug('Rendering to HTML stream (then buffering)');
|
|
189
|
+
const fullHtmlRaw = await pipeableStreamToString(passThrough);
|
|
190
|
+
let fullHtml = fullHtmlRaw;
|
|
191
|
+
if (cssLinkTag && fullHtml.includes("</head>")) {
|
|
192
|
+
fullHtml = fullHtml.replace("</head>", cssLinkTag + "</head>");
|
|
193
|
+
}
|
|
194
|
+
${ctx.actionsEnabled
|
|
195
|
+
? `// Ensure __viteRscCallServer is set before any module runs (fixes "is not a function" when form submits)
|
|
196
|
+
if (fullHtml.includes("<body")) {
|
|
197
|
+
fullHtml = fullHtml.replace(/<body[^>]*>/, function(m) {
|
|
198
|
+
return m + "<script>(function(){if(typeof globalThis.__viteRscCallServer!=='function'){globalThis.__viteRscCallServer=function(){return Promise.reject(new Error('Farm.js: server actions not ready'));}}})();</script>";
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
`
|
|
202
|
+
: ""}
|
|
203
|
+
debug('Injecting RSC payload into HTML');
|
|
204
|
+
const streamFromHtml = new ReadableStream({
|
|
205
|
+
start(controller) {
|
|
206
|
+
controller.enqueue(new TextEncoder().encode(fullHtml));
|
|
207
|
+
controller.close();
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
let clientBuffer = "";
|
|
211
|
+
let clientScriptInjected = false;
|
|
212
|
+
const injectClientScriptStream = new TransformStream({
|
|
213
|
+
transform(chunk, controller) {
|
|
214
|
+
const str = typeof chunk === "string" ? chunk : new TextDecoder().decode(chunk);
|
|
215
|
+
if (!injectClientScriptInStream || clientScriptInjected) {
|
|
216
|
+
controller.enqueue(chunk);
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
219
|
+
clientBuffer += str;
|
|
220
|
+
if (clientBuffer.includes("</body></html>")) {
|
|
221
|
+
const href = (typeof CLIENT_ENTRY_HREF === "string" && CLIENT_ENTRY_HREF.length > 0 && CLIENT_ENTRY_HREF.indexOf(PLACEHOLDER_STR) < 0) ? CLIENT_ENTRY_HREF : "";
|
|
222
|
+
const out = href ? clientBuffer.replace("</body></html>", '<script type="module" src="' + href + '"></script></body></html>') : clientBuffer;
|
|
223
|
+
controller.enqueue(new TextEncoder().encode(out));
|
|
224
|
+
clientBuffer = "";
|
|
225
|
+
clientScriptInjected = true;
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
flush(controller) {
|
|
229
|
+
if (clientBuffer) {
|
|
230
|
+
controller.enqueue(new TextEncoder().encode(clientBuffer));
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
});
|
|
234
|
+
|
|
235
|
+
let out = streamFromHtml.pipeThrough(injectRSCPayload(s2));
|
|
236
|
+
out = out.pipeThrough(injectClientScriptStream);
|
|
237
|
+
return out;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
// Enable HMR
|
|
241
|
+
if (import.meta.hot) {
|
|
242
|
+
import.meta.hot.accept();
|
|
243
|
+
}
|
|
244
|
+
`;
|
|
245
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Farm.js RSC Plugin
|
|
3
|
+
*
|
|
4
|
+
* Provides React Server Components support for Farm.js.
|
|
5
|
+
* When enabled, this plugin:
|
|
6
|
+
* - Configures three build environments (rsc, ssr, client)
|
|
7
|
+
* - Generates virtual entry files for routing, rendering, and hydration
|
|
8
|
+
* - Supports server actions when experimental.serverActions is true
|
|
9
|
+
* - Integrates with @vitejs/plugin-rsc for core RSC transforms
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* import { defineConfig } from '@farm.js/plugin/rsc'
|
|
14
|
+
*
|
|
15
|
+
* export default defineConfig({
|
|
16
|
+
* srcDir: 'src',
|
|
17
|
+
* experimental: {
|
|
18
|
+
* serverComponents: true,
|
|
19
|
+
* serverActions: true,
|
|
20
|
+
* },
|
|
21
|
+
* })
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
import { type Plugin, type UserConfig } from "vite";
|
|
25
|
+
import type { FarmRscPluginOptions, EntryContext } from "./types.js";
|
|
26
|
+
import type { FarmServerActionsConfig } from "@farm.js/core/server-action-security";
|
|
27
|
+
import type { FarmLayerEntry, ResolvedFarmLayer } from "@farm.js/core/server";
|
|
28
|
+
export type { FarmRscPluginOptions, EntryContext };
|
|
29
|
+
export { buildRscNitro, waitForRscManifest, waitForRscOutputs } from "./nitro-build.js";
|
|
30
|
+
export type { BuildRscNitroOptions } from "./nitro-build.js";
|
|
31
|
+
export { default as nitro } from "./vite-plugin-nitro.js";
|
|
32
|
+
export type { NitroPluginOptions } from "./vite-plugin-nitro.js";
|
|
33
|
+
export interface FarmRscConfig {
|
|
34
|
+
srcDir?: string;
|
|
35
|
+
extends?: readonly FarmLayerEntry[];
|
|
36
|
+
layers?: readonly ResolvedFarmLayer[];
|
|
37
|
+
outDir?: string;
|
|
38
|
+
basePath?: string;
|
|
39
|
+
port?: number;
|
|
40
|
+
experimental?: {
|
|
41
|
+
serverComponents?: boolean;
|
|
42
|
+
serverActions?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Enable server-only optimized boundaries through
|
|
45
|
+
* `@farm.js/plugin/rsc/optimized-boundary`.
|
|
46
|
+
*
|
|
47
|
+
* @experimental
|
|
48
|
+
* @default false
|
|
49
|
+
*/
|
|
50
|
+
optimizedBoundary?: boolean;
|
|
51
|
+
};
|
|
52
|
+
debug?: boolean;
|
|
53
|
+
encryptActions?: boolean;
|
|
54
|
+
serverActions?: FarmServerActionsConfig;
|
|
55
|
+
deploymentId?: string;
|
|
56
|
+
generateBuildId?: () => string | Promise<string>;
|
|
57
|
+
routesDir?: string;
|
|
58
|
+
entries?: {
|
|
59
|
+
rsc?: string;
|
|
60
|
+
ssr?: string;
|
|
61
|
+
client?: string;
|
|
62
|
+
};
|
|
63
|
+
/** Extra Vite plugins (e.g. rsc() with entries so client build resolves virtual:vite-rsc/client-references). */
|
|
64
|
+
plugins?: any[];
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Define a Farm.js RSC configuration
|
|
68
|
+
* This is the recommended way to configure your RSC app
|
|
69
|
+
*/
|
|
70
|
+
export declare function defineConfig(config?: FarmRscConfig): UserConfig;
|
|
71
|
+
/**
|
|
72
|
+
* Farm.js RSC Plugin
|
|
73
|
+
*
|
|
74
|
+
* @param options - Plugin configuration options
|
|
75
|
+
* @returns Array of Vite plugins
|
|
76
|
+
*/
|
|
77
|
+
export default function farmRsc(options?: FarmRscPluginOptions): Plugin[];
|
|
78
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/rsc/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAA4B,KAAK,MAAM,EAAE,KAAK,UAAU,EAAE,MAAM,MAAM,CAAC;AAE9E,OAAO,KAAK,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AACrE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AACpF,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AA0B9E,YAAY,EAAE,oBAAoB,EAAE,YAAY,EAAE,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAExF,YAAY,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAC1D,YAAY,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAGjE,MAAM,WAAW,aAAa;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,SAAS,cAAc,EAAE,CAAC;IACpC,MAAM,CAAC,EAAE,SAAS,iBAAiB,EAAE,CAAC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE;QACb,gBAAgB,CAAC,EAAE,OAAO,CAAC;QAC3B,aAAa,CAAC,EAAE,OAAO,CAAC;QACxB;;;;;;WAMG;QACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;KAC7B,CAAC;IACF,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,aAAa,CAAC,EAAE,uBAAuB,CAAC;IACxC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE;QACR,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,gHAAgH;IAChH,OAAO,CAAC,EAAE,GAAG,EAAE,CAAC;CACjB;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,MAAM,GAAE,aAAkB,GAAG,UAAU,CAiDnE;AA8TD;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,OAAO,GAAE,oBAAyB,GAAG,MAAM,EAAE,CAqnC5E"}
|