@farm.js/plugin 0.1.64 → 0.1.65
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/rsc.d.ts.map +1 -1
- package/dist/rsc/entries/rsc.js +57 -4
- package/dist/rsc/mobile-client.d.ts +8 -0
- package/dist/rsc/mobile-client.d.ts.map +1 -1
- package/dist/rsc/mobile-client.js +61 -0
- package/dist/rsc/nitro-build.d.ts.map +1 -1
- package/dist/rsc/nitro-build.js +2 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rsc.d.ts","sourceRoot":"","sources":["../../../src/rsc/entries/rsc.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"rsc.d.ts","sourceRoot":"","sources":["../../../src/rsc/entries/rsc.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAgBhD;;;GAGG;AACH,wBAAgB,mCAAmC,IAAI,MAAM,CAe5D;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,YAAY,GAAG,MAAM,CAgkD1D"}
|
package/dist/rsc/entries/rsc.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from "node:module";
|
|
2
|
-
import { FARM_RSC_MOBILE_SHELL_CLIENT_PLACEHOLDER } from "../mobile-client.js";
|
|
2
|
+
import { FARM_RSC_MOBILE_SHELL_CLIENT_PLACEHOLDER, FARM_RSC_NATIVE_STYLESHEETS_PLACEHOLDER, } from "../mobile-client.js";
|
|
3
3
|
const require_ = createRequire(import.meta.url);
|
|
4
4
|
/** Core's production source for the \`mcp\` plugin, so both servers merge config the same way. */
|
|
5
5
|
function generateMCPPluginSource() {
|
|
@@ -91,7 +91,7 @@ import {
|
|
|
91
91
|
createProductionMiddlewareRunner,
|
|
92
92
|
} from '@farm.js/core/middleware';
|
|
93
93
|
import { _withFarmGuardedResponseCache } from '@farm.js/core/internal/production-runtime';
|
|
94
|
-
${ctx.mobileClient === "entry" ? "import { _applyFarmMobileShellClient } from '@farm.js/core/internal/production-runtime';\n" : ""}import {
|
|
94
|
+
${ctx.mobileClient === "entry" ? "import { _applyFarmMobileShellClient, createFarmNativeTreeResponse } from '@farm.js/core/internal/production-runtime';\n" : ctx.mobileClient === "inline" ? "import { createFarmNativeTreeResponse } from '@farm.js/core/internal/production-runtime';\n" : ""}import {
|
|
95
95
|
getAllowedAPIRouteMethods,
|
|
96
96
|
invokeAPIRouteEndpoint,
|
|
97
97
|
isFarmAPIPathname,
|
|
@@ -1103,6 +1103,12 @@ async function resolveFarmRequest(farmCacheGuard, request, context) {
|
|
|
1103
1103
|
});
|
|
1104
1104
|
}
|
|
1105
1105
|
|
|
1106
|
+
// A native-tier screen reads only the page (RFC 0004): mark it, for the server's own render of
|
|
1107
|
+
// the tree only (the handler strips this header from every other request).
|
|
1108
|
+
if (request.headers.get('x-farm-native-tree') === '1') {
|
|
1109
|
+
pageContent = h('div', { id: '__farm_page__', 'data-farm-segment': 'page' }, pageContent);
|
|
1110
|
+
}
|
|
1111
|
+
|
|
1106
1112
|
// Render layouts inside out so every ancestor wraps its descendants.
|
|
1107
1113
|
let layoutContent = pageContent;
|
|
1108
1114
|
for (let index = LayoutModules.length - 1; index >= 0; index--) {
|
|
@@ -1459,7 +1465,18 @@ function isFarmPrerenderRequest(request) {
|
|
|
1459
1465
|
return globalThis.process?.env?.FARM_RSC_PRERENDER === '1' && request.headers.has('x-nitro-prerender');
|
|
1460
1466
|
}
|
|
1461
1467
|
|
|
1462
|
-
|
|
1468
|
+
${ctx.mobileClient
|
|
1469
|
+
? `// The server's own renders of a page for a native-tree answer: only these mark the page.
|
|
1470
|
+
const farmNativeTreeRenders = new WeakSet();
|
|
1471
|
+
`
|
|
1472
|
+
: ""}async function handler(request, context) {${ctx.mobileClient
|
|
1473
|
+
? `
|
|
1474
|
+
if (request.headers.has('x-farm-native-tree') && !farmNativeTreeRenders.has(request)) {
|
|
1475
|
+
const headers = new Headers(request.headers);
|
|
1476
|
+
headers.delete('x-farm-native-tree');
|
|
1477
|
+
request = new Request(request, { headers });
|
|
1478
|
+
}`
|
|
1479
|
+
: ""}
|
|
1463
1480
|
const prerendering = isFarmPrerenderRequest(request);
|
|
1464
1481
|
if (prerendering && new URL(request.url).pathname === FARM_PRERENDER_ROUTES_PATH) {
|
|
1465
1482
|
const pages = await collectFarmStaticPages();
|
|
@@ -1470,7 +1487,35 @@ async function handler(request, context) {
|
|
|
1470
1487
|
},
|
|
1471
1488
|
});
|
|
1472
1489
|
}
|
|
1473
|
-
|
|
1490
|
+
${ctx.mobileClient
|
|
1491
|
+
? ` // A native-tier screen of the mobile app (RFC 0004): the page, rendered as for a browser,
|
|
1492
|
+
// read into a tree of native views. A POST is a form the screen submitted, such as a server
|
|
1493
|
+
// action's: it runs as the browser's no-JavaScript submission would.
|
|
1494
|
+
if (
|
|
1495
|
+
(request.method === 'GET' || request.method === 'HEAD' || request.method === 'POST') &&
|
|
1496
|
+
(request.headers.get('accept') || '').includes('application/vnd.farm.native+json')
|
|
1497
|
+
) {
|
|
1498
|
+
return createFarmNativeTreeResponse({
|
|
1499
|
+
request,
|
|
1500
|
+
renderPage: (target) => {
|
|
1501
|
+
farmNativeTreeRenders.add(target);
|
|
1502
|
+
return handler(target, context);
|
|
1503
|
+
},
|
|
1504
|
+
loadStylesheet: ${ctx.mobileClient === "entry"
|
|
1505
|
+
? "(href) => farmNativeStylesheets[href]"
|
|
1506
|
+
: `async (href) => {
|
|
1507
|
+
// farm dev: Vite serves the CSS, so ask this dev server for it over loopback.
|
|
1508
|
+
const url = new URL(href, request.url);
|
|
1509
|
+
url.hostname = '127.0.0.1';
|
|
1510
|
+
const response = await fetch(url, { headers: { accept: 'text/css,*/*;q=0.1' } }).catch(() => null);
|
|
1511
|
+
return response?.ok && (response.headers.get('content-type') || '').includes('text/css')
|
|
1512
|
+
? response.text()
|
|
1513
|
+
: undefined;
|
|
1514
|
+
}`},
|
|
1515
|
+
});
|
|
1516
|
+
}
|
|
1517
|
+
`
|
|
1518
|
+
: ""} const pageRequest = toFarmPayloadRequest(request);
|
|
1474
1519
|
const response = await handleFarmRequestWithRuntime(pageRequest, context);
|
|
1475
1520
|
if (
|
|
1476
1521
|
prerendering &&
|
|
@@ -1497,6 +1542,14 @@ function readFarmMobileShellClient() {
|
|
|
1497
1542
|
}
|
|
1498
1543
|
}
|
|
1499
1544
|
const farmMobileShellClient = readFarmMobileShellClient();
|
|
1545
|
+
// The client CSS by href, embedded by the build for native-tier screens.
|
|
1546
|
+
const farmNativeStylesheets = (() => {
|
|
1547
|
+
try {
|
|
1548
|
+
return JSON.parse("${FARM_RSC_NATIVE_STYLESHEETS_PLACEHOLDER}");
|
|
1549
|
+
} catch {
|
|
1550
|
+
return {};
|
|
1551
|
+
}
|
|
1552
|
+
})();
|
|
1500
1553
|
`
|
|
1501
1554
|
: ""}
|
|
1502
1555
|
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
export declare const FARM_RSC_MOBILE_CLIENT_ENTRY_NAME = "farm-mobile-client";
|
|
3
3
|
/** The server entry's stand-in for the shell client, replaced once the client is built. */
|
|
4
4
|
export declare const FARM_RSC_MOBILE_SHELL_CLIENT_PLACEHOLDER = "__farm_mobile_shell_client__";
|
|
5
|
+
/** The client CSS by href, embedded so the RSC server can draw native-tier screens (RFC 0004). */
|
|
6
|
+
export declare const FARM_RSC_NATIVE_STYLESHEETS_PLACEHOLDER = "__farm_native_stylesheets__";
|
|
5
7
|
/** What the server needs to point a document at the mobile client (core's `FarmMobileShellClient`). */
|
|
6
8
|
export interface FarmRscMobileShellClient {
|
|
7
9
|
webEntry: string;
|
|
@@ -59,6 +61,12 @@ export declare function finalizeFarmRscMobileClient(options: {
|
|
|
59
61
|
}): FarmRscMobileShellClient | null;
|
|
60
62
|
/** The shell client as the contents of a JavaScript string literal of any quote. */
|
|
61
63
|
export declare function encodeFarmRscMobileShellClient(client: FarmRscMobileShellClient | null): string;
|
|
64
|
+
/**
|
|
65
|
+
* Embed the client CSS, by href, wherever the RSC server bundle has the native-stylesheets
|
|
66
|
+
* placeholder (only a build with the mobile entry): a native-tier screen is drawn with the page's
|
|
67
|
+
* own stylesheets, and the server cannot fetch the static files Nitro serves around it.
|
|
68
|
+
*/
|
|
69
|
+
export declare function patchFarmRscNativeStylesheets(rscDir: string, publicDir: string): void;
|
|
62
70
|
/**
|
|
63
71
|
* Fill in the shell client wherever the RSC server bundle has the placeholder, which only a build
|
|
64
72
|
* with the mobile entry has. `resolve` runs only then, once: a patched bundle has none left.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mobile-client.d.ts","sourceRoot":"","sources":["../../src/rsc/mobile-client.ts"],"names":[],"mappings":"AAqBA,0GAA0G;AAC1G,eAAO,MAAM,iCAAiC,uBAAuB,CAAC;AAEtE,2FAA2F;AAC3F,eAAO,MAAM,wCAAwC,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"mobile-client.d.ts","sourceRoot":"","sources":["../../src/rsc/mobile-client.ts"],"names":[],"mappings":"AAqBA,0GAA0G;AAC1G,eAAO,MAAM,iCAAiC,uBAAuB,CAAC;AAEtE,2FAA2F;AAC3F,eAAO,MAAM,wCAAwC,iCAAiC,CAAC;AACvF,kGAAkG;AAClG,eAAO,MAAM,uCAAuC,gCAAgC,CAAC;AAKrF,uGAAuG;AACvG,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,8EAA8E;AAC9E,MAAM,WAAW,2BAA2B;IAC1C,OAAO,EAAE,CAAC,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,mGAAmG;IACnG,SAAS,EAAE,MAAM,CAAC;CACnB;AAWD,wBAAgB,+BAA+B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEpE;AAED,iFAAiF;AACjF,wBAAgB,iCAAiC,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAEpE;AAED;;;;;GAKG;AACH,wBAAgB,6BAA6B,IAAI,MAAM,CAgBtD;AAED,sGAAsG;AACtG,wBAAgB,yBAAyB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAItE;AAED,2FAA2F;AAC3F,wBAAgB,uCAAuC,CAAC,OAAO,EAAE,MAAM,MAAM,GAAG,SAAS;;;;yBAM7E;QAAE,WAAW,CAAC,EAAE;YAAE,IAAI,CAAC,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,WAChC,OAAO,UACR,MAAM,CAAC,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;EAuB/E;AAaD;;;GAGG;AACH,wBAAgB,2BAA2B,CAAC,OAAO,EAAE;IACnD,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,qFAAqF;IACrF,QAAQ,EAAE,MAAM,CAAC;IACjB,4CAA4C;IAC5C,UAAU,EAAE,MAAM,CAAC;CACpB,GAAG,wBAAwB,GAAG,IAAI,CAsBlC;AAED,oFAAoF;AACpF,wBAAgB,8BAA8B,CAAC,MAAM,EAAE,wBAAwB,GAAG,IAAI,GAAG,MAAM,CAQ9F;AAkBD;;;;GAIG;AACH,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAwBrF;AAED;;;GAGG;AACH,wBAAgB,6BAA6B,CAC3C,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,wBAAwB,GAAG,IAAI,GAC7C,IAAI,CAsBN"}
|
|
@@ -14,6 +14,8 @@ import path from "path";
|
|
|
14
14
|
export const FARM_RSC_MOBILE_CLIENT_ENTRY_NAME = "farm-mobile-client";
|
|
15
15
|
/** The server entry's stand-in for the shell client, replaced once the client is built. */
|
|
16
16
|
export const FARM_RSC_MOBILE_SHELL_CLIENT_PLACEHOLDER = "__farm_mobile_shell_client__";
|
|
17
|
+
/** The client CSS by href, embedded so the RSC server can draw native-tier screens (RFC 0004). */
|
|
18
|
+
export const FARM_RSC_NATIVE_STYLESHEETS_PLACEHOLDER = "__farm_native_stylesheets__";
|
|
17
19
|
/** Next to the RSC entries, as core writes it to its build directory (`.farm/`); never served. */
|
|
18
20
|
const MANIFEST_FILE = "mobile-client.json";
|
|
19
21
|
/** Vite names every client output file `name-<hash>.ext`, the hash taken from its content. */
|
|
@@ -38,6 +40,14 @@ const farmOfferNavigation = farmMobileShellBridge?.offerNavigation;
|
|
|
38
40
|
if (typeof farmOfferNavigation === 'function') {
|
|
39
41
|
farmDelegateNavigation((context) => farmOfferNavigation.call(farmMobileShellBridge, context) === true);
|
|
40
42
|
}
|
|
43
|
+
// RSC pages install no SPA router, which is what tells the shell a web screen is ready (its
|
|
44
|
+
// first screen, a warm pool WebView), so say so once the document has loaded.
|
|
45
|
+
const farmMobileShellReady = farmMobileShellBridge?.ready;
|
|
46
|
+
if (typeof farmMobileShellReady === 'function') {
|
|
47
|
+
const farmSignalReady = () => farmMobileShellReady.call(farmMobileShellBridge);
|
|
48
|
+
if (document.readyState === 'complete') queueMicrotask(farmSignalReady);
|
|
49
|
+
else addEventListener('load', farmSignalReady, { once: true });
|
|
50
|
+
}
|
|
41
51
|
`;
|
|
42
52
|
}
|
|
43
53
|
/** The mobile entry's source: install the shell's navigation delegate, then run the browser entry. */
|
|
@@ -118,6 +128,57 @@ export function encodeFarmRscMobileShellClient(client) {
|
|
|
118
128
|
.replace(/\u2028/g, "\\u2028")
|
|
119
129
|
.replace(/\u2029/g, "\\u2029");
|
|
120
130
|
}
|
|
131
|
+
function serverBundleFiles(rscDir, placeholder) {
|
|
132
|
+
const files = [];
|
|
133
|
+
const visit = (dir) => {
|
|
134
|
+
if (!existsSync(dir))
|
|
135
|
+
return;
|
|
136
|
+
for (const name of readdirSync(dir)) {
|
|
137
|
+
const file = path.join(dir, name);
|
|
138
|
+
if (statSync(file).isDirectory())
|
|
139
|
+
visit(file);
|
|
140
|
+
else if (/\.(?:m|c)?js$/.test(name) && readFileSync(file, "utf8").includes(placeholder)) {
|
|
141
|
+
files.push(file);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
visit(rscDir);
|
|
146
|
+
return files;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Embed the client CSS, by href, wherever the RSC server bundle has the native-stylesheets
|
|
150
|
+
* placeholder (only a build with the mobile entry): a native-tier screen is drawn with the page's
|
|
151
|
+
* own stylesheets, and the server cannot fetch the static files Nitro serves around it.
|
|
152
|
+
*/
|
|
153
|
+
export function patchFarmRscNativeStylesheets(rscDir, publicDir) {
|
|
154
|
+
const files = serverBundleFiles(rscDir, FARM_RSC_NATIVE_STYLESHEETS_PLACEHOLDER);
|
|
155
|
+
if (files.length === 0)
|
|
156
|
+
return;
|
|
157
|
+
const stylesheets = {};
|
|
158
|
+
const visit = (dir, prefix) => {
|
|
159
|
+
if (!existsSync(dir))
|
|
160
|
+
return;
|
|
161
|
+
for (const name of readdirSync(dir)) {
|
|
162
|
+
const file = path.join(dir, name);
|
|
163
|
+
if (statSync(file).isDirectory())
|
|
164
|
+
visit(file, `${prefix}${name}/`);
|
|
165
|
+
else if (name.endsWith(".css"))
|
|
166
|
+
stylesheets[`/${prefix}${name}`] = readFileSync(file, "utf8");
|
|
167
|
+
}
|
|
168
|
+
};
|
|
169
|
+
visit(publicDir, "");
|
|
170
|
+
const encoded = JSON.stringify(JSON.stringify(stylesheets))
|
|
171
|
+
.slice(1, -1)
|
|
172
|
+
.replace(/'/g, "\\u0027")
|
|
173
|
+
.replace(/`/g, "\\u0060")
|
|
174
|
+
.replace(/\$/g, "\\u0024")
|
|
175
|
+
.replace(/\u2028/g, "\\u2028")
|
|
176
|
+
.replace(/\u2029/g, "\\u2029");
|
|
177
|
+
for (const file of files) {
|
|
178
|
+
const code = readFileSync(file, "utf8");
|
|
179
|
+
writeFileSync(file, code.split(FARM_RSC_NATIVE_STYLESHEETS_PLACEHOLDER).join(encoded));
|
|
180
|
+
}
|
|
181
|
+
}
|
|
121
182
|
/**
|
|
122
183
|
* Fill in the shell client wherever the RSC server bundle has the placeholder, which only a build
|
|
123
184
|
* with the mobile entry has. `resolve` runs only then, once: a patched bundle has none left.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nitro-build.d.ts","sourceRoot":"","sources":["../../src/rsc/nitro-build.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"nitro-build.d.ts","sourceRoot":"","sources":["../../src/rsc/nitro-build.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAoCH;;;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;AAuGD;;;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,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AA2NF,wBAAsB,aAAa,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC,CAwIhF"}
|
package/dist/rsc/nitro-build.js
CHANGED
|
@@ -8,7 +8,7 @@ import { createRequire } from "node:module";
|
|
|
8
8
|
import { writeFileSync, readFileSync, mkdirSync, copyFileSync, existsSync, readdirSync, lstatSync, rmSync, statSync, symlinkSync, } from "fs";
|
|
9
9
|
import { FARM_NODE_ENV_MODULE_FILE, FARM_NODE_ENV_MODULE_SOURCE, } from "@farm.js/core/internal/production-node-env";
|
|
10
10
|
import { resolveRscBuildOutputPath } from "./build-paths.js";
|
|
11
|
-
import { finalizeFarmRscMobileClient, patchFarmRscMobileShellClient } from "./mobile-client.js";
|
|
11
|
+
import { finalizeFarmRscMobileClient, patchFarmRscMobileShellClient, patchFarmRscNativeStylesheets, } from "./mobile-client.js";
|
|
12
12
|
const MANIFEST_FILENAME = "__vite_rsc_assets_manifest.js";
|
|
13
13
|
const MIN_MANIFEST_BYTES = 100; // real manifest is ~500+, stub is 64
|
|
14
14
|
const POLL_INTERVAL_MS = 50;
|
|
@@ -422,6 +422,7 @@ function patchRscServerBundles(root, rscDir, ssrDir, publicDir, assetsDir) {
|
|
|
422
422
|
webEntry: clientEntryHref,
|
|
423
423
|
stylesheet: clientCssHref,
|
|
424
424
|
}));
|
|
425
|
+
patchFarmRscNativeStylesheets(rscDir, publicDir);
|
|
425
426
|
if (existsSync(ssrIndexPath)) {
|
|
426
427
|
try {
|
|
427
428
|
let ssrCode = readFileSync(ssrIndexPath, "utf-8");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@farm.js/plugin",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.65",
|
|
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.65"
|
|
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.65"
|
|
88
88
|
},
|
|
89
89
|
"peerDependenciesMeta": {
|
|
90
90
|
"@vitejs/plugin-rsc": {
|