@farm.js/plugin 0.1.42 → 0.1.44
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/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/rsc/entries/ssr.d.ts.map +1 -1
- package/dist/rsc/entries/ssr.js +2 -3
- package/dist/rsc/index.d.ts +5 -2
- package/dist/rsc/index.d.ts.map +1 -1
- package/dist/rsc/index.js +28 -1
- package/dist/rsc/nitro-build.d.ts.map +1 -1
- package/dist/rsc/nitro-build.js +14 -8
- package/dist/rsc/vite-plugin-nitro.d.ts +2 -0
- package/dist/rsc/vite-plugin-nitro.d.ts.map +1 -1
- package/dist/rsc/vite-plugin-nitro.js +2 -0
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1 +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,
|
|
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,CAgN1D"}
|
package/dist/rsc/entries/ssr.js
CHANGED
|
@@ -10,9 +10,8 @@
|
|
|
10
10
|
*/
|
|
11
11
|
export function generateSsrEntry(ctx) {
|
|
12
12
|
const debugLog = `// Debug disabled`;
|
|
13
|
-
|
|
14
|
-
const
|
|
15
|
-
const globalsCssPath = ctx.globalCssPath ?? `/${ctx.srcDir}${routesPath}/globals.css`;
|
|
13
|
+
// Only a global stylesheet the build found: a guessed path 404s in apps that import their CSS.
|
|
14
|
+
const globalsCssPath = ctx.globalCssPath ?? "";
|
|
16
15
|
return `
|
|
17
16
|
import React from 'react';
|
|
18
17
|
import { createFromReadableStream } from '@vitejs/plugin-rsc/ssr';
|
package/dist/rsc/index.d.ts
CHANGED
|
@@ -52,10 +52,13 @@ export interface FarmRscConfig {
|
|
|
52
52
|
port?: number;
|
|
53
53
|
experimental?: {
|
|
54
54
|
/**
|
|
55
|
-
* Enable React Server Components rendering.
|
|
55
|
+
* Enable React Server Components rendering. `{ mode: "rsc" }` is the same as `true`; this
|
|
56
|
+
* pipeline is the `"rsc"` engine of core's `experimental.serverComponents`.
|
|
56
57
|
* @default true
|
|
57
58
|
*/
|
|
58
|
-
serverComponents?: boolean
|
|
59
|
+
serverComponents?: boolean | {
|
|
60
|
+
mode: "rsc";
|
|
61
|
+
};
|
|
59
62
|
/**
|
|
60
63
|
* Enable React Server Actions and their public POST decoder.
|
|
61
64
|
* @default false
|
package/dist/rsc/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/rsc/index.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAIL,KAAK,MAAM,EACX,KAAK,UAAU,EAChB,MAAM,MAAM,CAAC;AAEd,OAAO,KAAK,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AACrE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AACpF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAClF,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,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Ac,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;IAChB;;;;OAIG;IACH,EAAE,CAAC,EAAE,sBAAsB,GAAG,OAAO,CAAC;IACtC;;;;;;OAMG;IACH,KAAK,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,OAAO,GAAG,qBAAqB,CAAA;KAAE,CAAC;IACtD;;;;;OAKG;IACH,GAAG,CAAC,EAAE,iBAAiB,CAAC;CACzB;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,MAAM,GAAE,aAAkB,GAAG,UAAU,CAyEnE;AAibD;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,OAAO,GAAE,oBAAyB,GAAG,MAAM,EAAE,CAgqC5E"}
|
package/dist/rsc/index.js
CHANGED
|
@@ -62,6 +62,8 @@ export { buildRscNitro, waitForRscManifest, waitForRscOutputs } from "./nitro-bu
|
|
|
62
62
|
import { registerRscNitroRuntimePackage } from "./nitro-build.js";
|
|
63
63
|
export { default as nitro } from "./vite-plugin-nitro.js";
|
|
64
64
|
const PAGE_FILE = /^page\.(tsx|jsx|ts|js)$/;
|
|
65
|
+
/** Packages the generated RSC entries import that belong to this plugin, not to the app. */
|
|
66
|
+
const PLUGIN_OWNED_ENTRY_IMPORTS = ["rsc-html-stream/server", "rsc-html-stream/client"];
|
|
65
67
|
/**
|
|
66
68
|
* Define a Farm.js RSC configuration
|
|
67
69
|
* This is the recommended way to configure your RSC app
|
|
@@ -108,6 +110,8 @@ export function defineConfig(config = {}) {
|
|
|
108
110
|
}),
|
|
109
111
|
farmApiPlugin({
|
|
110
112
|
srcDir: config.srcDir ?? "src",
|
|
113
|
+
// The production entry serves API routes from the routes directory; so does development.
|
|
114
|
+
apiDir: path.join(config.srcDir ?? "src", config.routesDir === undefined ? "app" : config.routesDir.trim(), "api"),
|
|
111
115
|
debug,
|
|
112
116
|
bodySizeLimit: config.server?.bodySizeLimit,
|
|
113
117
|
// The dev API server mounts the MCP endpoint, as core's does.
|
|
@@ -682,7 +686,15 @@ export default function farmRsc(options = {}) {
|
|
|
682
686
|
async config(config, env) {
|
|
683
687
|
const c = config;
|
|
684
688
|
// Check if user enabled RSC in their config
|
|
685
|
-
|
|
689
|
+
const serverComponents = c.experimental?.serverComponents;
|
|
690
|
+
if (typeof serverComponents === "object" &&
|
|
691
|
+
serverComponents !== null &&
|
|
692
|
+
serverComponents.mode !== "rsc") {
|
|
693
|
+
throw new Error(`[Farm.js] @farm.js/plugin/rsc runs the "rsc" engine; experimental.serverComponents.mode "${String(serverComponents.mode)}" is not supported here.`);
|
|
694
|
+
}
|
|
695
|
+
rscEnabled =
|
|
696
|
+
serverComponents === true ||
|
|
697
|
+
(typeof serverComponents === "object" && serverComponents !== null);
|
|
686
698
|
actionsEnabled = c.experimental?.serverActions === true;
|
|
687
699
|
bodySizeLimit = resolveFarmServerConfig(c.server).bodySizeLimit;
|
|
688
700
|
optimizedBoundaryEnabled = c.experimental?.optimizedBoundary === true;
|
|
@@ -917,6 +929,21 @@ export default function farmRsc(options = {}) {
|
|
|
917
929
|
resolve: {
|
|
918
930
|
dedupe: ["react", "react-dom", "react-server-dom-webpack"],
|
|
919
931
|
alias: [
|
|
932
|
+
// The generated entries import the plugin's own dependencies; resolve them from here
|
|
933
|
+
// so an app (strict pnpm layout) does not have to install them itself.
|
|
934
|
+
...PLUGIN_OWNED_ENTRY_IMPORTS.flatMap((specifier) => {
|
|
935
|
+
try {
|
|
936
|
+
return [
|
|
937
|
+
{
|
|
938
|
+
find: new RegExp(`^${specifier.replace(/[/.]/g, "\\$&")}$`),
|
|
939
|
+
replacement: require_.resolve(specifier),
|
|
940
|
+
},
|
|
941
|
+
];
|
|
942
|
+
}
|
|
943
|
+
catch {
|
|
944
|
+
return [];
|
|
945
|
+
}
|
|
946
|
+
}),
|
|
920
947
|
...Object.entries(layerAliases).map(([find, replacement]) => ({
|
|
921
948
|
find,
|
|
922
949
|
replacement,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nitro-build.d.ts","sourceRoot":"","sources":["../../src/rsc/nitro-build.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AA6BH;;;GAGG;AACH,wBAAgB,8BAA8B,CAC5C,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,GAClB,IAAI,CAKN;AAcD,gBAAgB;AAChB,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,IAAI,CAqCrF;AA4ED;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,OAAO,GAAE;IAAE,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAO,GACxD,OAAO,CAAC,IAAI,CAAC,CA0Bf;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,OAAO,GAAE;IAAE,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAO,GACxD,OAAO,CAAC,IAAI,CAAC,CAgCf;AA8FD,MAAM,MAAM,oBAAoB,GAAG;IACjC,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EA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AE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AA+MF,wBAAsB,aAAa,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC,CAiIhF"}
|
package/dist/rsc/nitro-build.js
CHANGED
|
@@ -477,12 +477,15 @@ function removeSeedOutput(nitro, fileName) {
|
|
|
477
477
|
}
|
|
478
478
|
}
|
|
479
479
|
export async function buildRscNitro(options) {
|
|
480
|
-
const { rendererPath, publicDir, ssrPath, assetsDir, root,
|
|
480
|
+
const { rendererPath, publicDir, ssrPath, assetsDir, root, preset = "vercel" } = options;
|
|
481
|
+
const outputDir = options.outputDir ?? path.join(root, ".output");
|
|
481
482
|
const { build, copyPublicAssets, createNitro, prepare, prerender } = await import("nitro/builder");
|
|
482
483
|
console.log(`[FARM] Building RSC server with Nitro (preset: ${preset})...`);
|
|
483
484
|
const buildDir = path.join(root, ".nitro");
|
|
484
|
-
|
|
485
|
-
|
|
485
|
+
// Vercel's Build Output API has its own layout (functions/, static/), which the preset owns when
|
|
486
|
+
// the caller names the deployment directory (`farm build`). Without one, the output keeps the
|
|
487
|
+
// server/ and public/ layout that hand-written post-build scripts copy from.
|
|
488
|
+
const presetOwnsLayout = options.outputDir !== undefined && (preset === "vercel" || preset === "vercel-edge");
|
|
486
489
|
// The server sets NODE_ENV to "production" unless the deployment chose one, as the core
|
|
487
490
|
// node-server output does. The RSC and SSR bundles read it at runtime: left unset, React loads
|
|
488
491
|
// its development builds and Flight responses carry server component props, stacks and paths.
|
|
@@ -515,11 +518,13 @@ export async function buildRscNitro(options) {
|
|
|
515
518
|
alias: {
|
|
516
519
|
h3: runtimeRequire.resolve("h3"),
|
|
517
520
|
},
|
|
518
|
-
output:
|
|
519
|
-
dir: outputDir
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
521
|
+
output: presetOwnsLayout
|
|
522
|
+
? { dir: outputDir }
|
|
523
|
+
: {
|
|
524
|
+
dir: outputDir,
|
|
525
|
+
serverDir: path.join(outputDir, "server"),
|
|
526
|
+
publicDir: path.join(outputDir, "public"),
|
|
527
|
+
},
|
|
523
528
|
publicAssets,
|
|
524
529
|
renderer: { handler: entryPath },
|
|
525
530
|
// The prebuilt RSC/SSR bundles are copied after Nitro finishes, so Nitro's
|
|
@@ -545,6 +550,7 @@ export async function buildRscNitro(options) {
|
|
|
545
550
|
patchRscServerBundles(path.dirname(path.resolve(rendererPath)), path.dirname(path.resolve(ssrPath)), publicDir, assetsDir);
|
|
546
551
|
}
|
|
547
552
|
const nitro = await createNitro(config);
|
|
553
|
+
const serverDir = nitro.options.output.serverDir;
|
|
548
554
|
await prepare(nitro);
|
|
549
555
|
await copyPublicAssets(nitro);
|
|
550
556
|
await prerenderRscPages(nitro, prerender, path.dirname(path.dirname(path.resolve(rendererPath))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vite-plugin-nitro.d.ts","sourceRoot":"","sources":["../../src/rsc/vite-plugin-nitro.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAenC,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE;QACP,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,4DAA4D;QAC5D,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,MAAM,CAAC,EAAE;QACP,MAAM,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"vite-plugin-nitro.d.ts","sourceRoot":"","sources":["../../src/rsc/vite-plugin-nitro.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAenC,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE;QACP,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,4DAA4D;QAC5D,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,MAAM,CAAC,EAAE;QACP,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,uDAAuD;QACvD,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,kEAAkE;IAClE,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAID,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,OAAO,GAAE,kBAAuB,GAAG,MAAM,CA8EtE;AAED,kFAAkF;AAClF,wBAAsB,oBAAoB,IAAI,OAAO,CAAC,IAAI,CAAC,CAmC1D"}
|
|
@@ -96,6 +96,7 @@ export default function nitro(options = {}) {
|
|
|
96
96
|
clientOutDir,
|
|
97
97
|
serverEntryName,
|
|
98
98
|
preset: options.config?.preset ?? process.env.NITRO_PRESET ?? "vercel",
|
|
99
|
+
outputDir: options.config?.outputDir,
|
|
99
100
|
clientAssetsDir,
|
|
100
101
|
};
|
|
101
102
|
}
|
|
@@ -152,5 +153,6 @@ async function runCapturedNitroBuild(paths, bundle) {
|
|
|
152
153
|
ssrPath: resolveRscBuildOutputPath(root, paths.ssrOutDir, "index.js"),
|
|
153
154
|
assetsDir: paths.clientAssetsDir ?? "assets",
|
|
154
155
|
preset,
|
|
156
|
+
outputDir: paths.outputDir,
|
|
155
157
|
});
|
|
156
158
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@farm.js/plugin",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.44",
|
|
4
4
|
"description": "Official plugins for Farm.js framework",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Farm.js Team",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"nitro": "3.0.260903-beta",
|
|
64
64
|
"picocolors": "^1.0.0",
|
|
65
65
|
"rsc-html-stream": "^0.0.4",
|
|
66
|
-
"@farm.js/core": "0.1.
|
|
66
|
+
"@farm.js/core": "0.1.44"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"@types/node": "^22.20.5",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"react-dom": "19.2.8",
|
|
85
85
|
"react-server-dom-webpack": "19.2.8",
|
|
86
86
|
"vite": ">=6.0.0",
|
|
87
|
-
"@farm.js/core": "0.1.
|
|
87
|
+
"@farm.js/core": "0.1.44"
|
|
88
88
|
},
|
|
89
89
|
"peerDependenciesMeta": {
|
|
90
90
|
"@vitejs/plugin-rsc": {
|