@farm.js/core 0.1.83 → 0.1.84
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/{analyzer-Y6IY26HI.mjs → analyzer-7RNO3XKC.mjs} +2 -2
- package/dist/analyzer-PFKA5NI6.cjs +17 -0
- package/dist/{chunk-WCSBYQOT.cjs → chunk-22BTYPIX.cjs} +4 -4
- package/dist/{chunk-NGTZHWBG.cjs → chunk-3OKSEJ33.cjs} +31 -10
- package/dist/{chunk-VQ6IXALL.mjs → chunk-3WM7VBGW.mjs} +2 -2
- package/dist/{chunk-IABI62FH.cjs → chunk-57EEWWUS.cjs} +2 -2
- package/dist/{chunk-7X2CYE66.cjs → chunk-5I4ZGKP2.cjs} +255 -199
- package/dist/{chunk-RGTZAM6Y.mjs → chunk-BCCCPFHQ.mjs} +25 -4
- package/dist/{chunk-55UJGUBP.cjs → chunk-BOEDYXAX.cjs} +13 -13
- package/dist/{chunk-DPUZVGXH.mjs → chunk-BRDGINBB.mjs} +31 -28
- package/dist/{chunk-FFWSER54.mjs → chunk-BZY3SRRD.mjs} +1 -1
- package/dist/{chunk-3CZ4MJHW.cjs → chunk-CVZY4TLW.cjs} +1 -1
- package/dist/{chunk-IAIRQAHA.mjs → chunk-CWUQBECF.mjs} +1 -1
- package/dist/{chunk-WZV2G2A6.mjs → chunk-DFDQGHPU.mjs} +83 -27
- package/dist/{chunk-SLIXHUMS.cjs → chunk-DSWSDDP2.cjs} +230 -201
- package/dist/{chunk-EFI6QWBQ.cjs → chunk-EBSL5TW7.cjs} +15 -15
- package/dist/{chunk-U56Z3755.mjs → chunk-EDBIBO67.mjs} +9 -9
- package/dist/{chunk-BBVLOEND.cjs → chunk-F7JVO3OZ.cjs} +4 -4
- package/dist/{chunk-5X5GJU5A.cjs → chunk-GLNVLCUH.cjs} +6 -6
- package/dist/{chunk-DZTWUEBB.cjs → chunk-HOQ2MYBJ.cjs} +10 -10
- package/dist/{chunk-NKVBWPXR.mjs → chunk-I5CVJ24H.mjs} +1 -1
- package/dist/{chunk-R3VLM2MW.mjs → chunk-INU4K4U4.mjs} +5 -5
- package/dist/{chunk-43N3X6OO.mjs → chunk-IRJSZAJB.mjs} +1 -1
- package/dist/{chunk-NDWI6FDH.mjs → chunk-KXVMWLTC.mjs} +59 -30
- package/dist/{chunk-HRH7OKBQ.cjs → chunk-L3BSHASB.cjs} +4 -4
- package/dist/{chunk-ELNRKD4V.mjs → chunk-L5HDCDFT.mjs} +1 -1
- package/dist/{chunk-RNJX3MD6.mjs → chunk-M5XU22PQ.mjs} +1 -1
- package/dist/chunk-MAPHNGTF.cjs +98 -0
- package/dist/{chunk-RE5E2G5S.cjs → chunk-MNUYXZV7.cjs} +2 -18
- package/dist/{chunk-ORBBAA7B.mjs → chunk-MUUDHWQZ.mjs} +1 -1
- package/dist/{chunk-YSU3WCW6.mjs → chunk-MYSH5Y4E.mjs} +1 -1
- package/dist/{chunk-K3GHY7GY.mjs → chunk-NLHSKKTT.mjs} +1 -1
- package/dist/{chunk-JHRJ5V2F.cjs → chunk-OFVBMS6I.cjs} +165 -162
- package/dist/{chunk-3DAJXBSL.cjs → chunk-OP7BIEUW.cjs} +2 -2
- package/dist/chunk-RJBUI5AN.mjs +18 -0
- package/dist/chunk-RQ6XX5IN.mjs +98 -0
- package/dist/{chunk-LN6FAYNB.cjs → chunk-USMRAC72.cjs} +2 -2
- package/dist/{chunk-B5SJYXJK.mjs → chunk-XLULEFRW.mjs} +6 -6
- package/dist/{chunk-A5BHJHDF.cjs → chunk-YU6VL7H5.cjs} +3 -3
- package/dist/{chunk-OM6JIIJU.cjs → chunk-Z37PDUJR.cjs} +4 -4
- package/dist/{devtools-ZM2AR36W.cjs → devtools-4SVIRV4P.cjs} +6 -6
- package/dist/{devtools-OI52TCSD.mjs → devtools-MWQA5LVN.mjs} +4 -4
- package/dist/docs.cjs +6 -6
- package/dist/docs.mjs +5 -5
- package/dist/environment/vite.cjs +5 -5
- package/dist/environment/vite.mjs +4 -4
- package/dist/index.cjs +25 -24
- package/dist/index.mjs +24 -23
- package/dist/internal/build-runtime.cjs +26 -25
- package/dist/internal/build-runtime.mjs +25 -24
- package/dist/internal/cli-runtime.cjs +8 -8
- package/dist/internal/cli-runtime.mjs +7 -7
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/client-runtime.d.mts +3 -37
- package/dist/internal/client-runtime.d.ts +3 -37
- package/dist/internal/config-runtime.cjs +6 -6
- package/dist/internal/config-runtime.mjs +5 -5
- package/dist/internal/infra-analytics-runtime.cjs +6 -6
- package/dist/internal/infra-analytics-runtime.mjs +4 -4
- package/dist/internal/native-server-fns.cjs +4 -4
- package/dist/internal/native-server-fns.mjs +3 -3
- package/dist/internal/product-telemetry-runtime.cjs +3 -3
- package/dist/internal/product-telemetry-runtime.mjs +2 -2
- package/dist/internal/production-runtime.cjs +13 -13
- package/dist/internal/production-runtime.mjs +19 -19
- package/dist/internal/renderer-islands.cjs +47 -0
- package/dist/internal/renderer-islands.d.mts +32 -0
- package/dist/internal/renderer-islands.d.ts +32 -0
- package/dist/internal/renderer-islands.mjs +47 -0
- package/dist/island-runtime.d-BA7EPo1v.d.ts +38 -0
- package/dist/island-runtime.d-BBS_YUSX.d.mts +38 -0
- package/dist/plugin.cjs +20 -19
- package/dist/plugin.mjs +19 -18
- package/dist/renderer.cjs +8 -2
- package/dist/renderer.d.mts +81 -1
- package/dist/renderer.d.ts +81 -1
- package/dist/renderer.mjs +7 -1
- package/dist/{rsc-pipeline-MFJZGDPE.cjs → rsc-pipeline-OWBEZ7HB.cjs} +9 -9
- package/dist/{rsc-pipeline-TRZVFCBX.mjs → rsc-pipeline-UT3Z2GDO.mjs} +8 -8
- package/dist/{runtime-O4Y3Z6V3.mjs → runtime-F5I3WY3B.mjs} +10 -11
- package/dist/{runtime-MJUG2HGR.cjs → runtime-SRMQ46SK.cjs} +13 -14
- package/dist/server.cjs +50 -50
- package/dist/server.mjs +28 -28
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +20 -19
- package/dist/vite.d.mts +6 -0
- package/dist/vite.d.ts +6 -0
- package/dist/vite.mjs +19 -18
- package/package.json +8 -3
- package/dist/analyzer-WGH6J2HN.cjs +0 -17
- package/dist/chunk-4QENVMG7.mjs +0 -34
- package/dist/{chunk-NEKO3HM2.cjs → chunk-4B6YJ5DS.cjs} +2 -2
- package/dist/{chunk-CA2HBLXP.mjs → chunk-4EEAPBNV.mjs} +3 -3
package/dist/plugin.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
farmPlugin
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-DFDQGHPU.mjs";
|
|
4
4
|
import "./chunk-7V5M43ND.mjs";
|
|
5
5
|
import "./chunk-ZIEO3DQ3.mjs";
|
|
6
6
|
import "./chunk-UD6KTSJS.mjs";
|
|
7
7
|
import "./chunk-RDSHEHBA.mjs";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-BRDGINBB.mjs";
|
|
9
9
|
import "./chunk-MO4UTDQ6.mjs";
|
|
10
10
|
import {
|
|
11
11
|
FARM_NODE_RESPONSE_END_PENDING,
|
|
@@ -13,34 +13,35 @@ import {
|
|
|
13
13
|
PluginManager,
|
|
14
14
|
definePlugin
|
|
15
15
|
} from "./chunk-IVP5Q4BX.mjs";
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-SMUW7UST.mjs";
|
|
17
|
+
import "./chunk-UB7RVEMX.mjs";
|
|
18
|
+
import "./chunk-CWUQBECF.mjs";
|
|
19
|
+
import "./chunk-MYSH5Y4E.mjs";
|
|
18
20
|
import "./chunk-YHHOTKUT.mjs";
|
|
19
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-L5HDCDFT.mjs";
|
|
20
22
|
import "./chunk-HQ2VAJLW.mjs";
|
|
21
23
|
import "./chunk-UTUS6JUH.mjs";
|
|
24
|
+
import "./chunk-RQ6XX5IN.mjs";
|
|
25
|
+
import "./chunk-M5XU22PQ.mjs";
|
|
22
26
|
import "./chunk-EZYKV24V.mjs";
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-UB7RVEMX.mjs";
|
|
25
|
-
import "./chunk-CA2HBLXP.mjs";
|
|
27
|
+
import "./chunk-4EEAPBNV.mjs";
|
|
26
28
|
import "./chunk-LLZSYFOM.mjs";
|
|
27
29
|
import "./chunk-UUMKLGUU.mjs";
|
|
28
30
|
import "./chunk-ZXDX7VYZ.mjs";
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-RNJX3MD6.mjs";
|
|
31
|
-
import "./chunk-VQ6IXALL.mjs";
|
|
31
|
+
import "./chunk-3WM7VBGW.mjs";
|
|
32
32
|
import "./chunk-HR4N2K4V.mjs";
|
|
33
|
-
import "./chunk-
|
|
33
|
+
import "./chunk-V7HNYR76.mjs";
|
|
34
|
+
import "./chunk-IRJSZAJB.mjs";
|
|
35
|
+
import "./chunk-X3EFRVXY.mjs";
|
|
34
36
|
import "./chunk-2PFGA6PB.mjs";
|
|
35
37
|
import "./chunk-L4RTTTVE.mjs";
|
|
36
38
|
import "./chunk-GNZIAJGB.mjs";
|
|
37
|
-
import "./chunk-X3EFRVXY.mjs";
|
|
38
39
|
import "./chunk-XAXTTBUT.mjs";
|
|
39
40
|
import "./chunk-INKVDO42.mjs";
|
|
40
41
|
import "./chunk-K6HIIWUB.mjs";
|
|
41
42
|
import "./chunk-YFTGIHNC.mjs";
|
|
42
43
|
import "./chunk-HZOMT5DY.mjs";
|
|
43
|
-
import "./chunk-
|
|
44
|
+
import "./chunk-XLULEFRW.mjs";
|
|
44
45
|
import "./chunk-D2VAANBS.mjs";
|
|
45
46
|
import "./chunk-S32PDOLO.mjs";
|
|
46
47
|
import "./chunk-ZEWWZJPZ.mjs";
|
|
@@ -53,12 +54,12 @@ import {
|
|
|
53
54
|
resolveFarmDevtoolsConfig
|
|
54
55
|
} from "./chunk-CU5SYTJG.mjs";
|
|
55
56
|
import "./chunk-NQ3Y6E2T.mjs";
|
|
56
|
-
import "./chunk-22W4FNTG.mjs";
|
|
57
57
|
import "./chunk-SQ5O7I3L.mjs";
|
|
58
58
|
import "./chunk-XGL42MQ7.mjs";
|
|
59
|
-
import "./chunk-
|
|
59
|
+
import "./chunk-22W4FNTG.mjs";
|
|
60
|
+
import "./chunk-RJBUI5AN.mjs";
|
|
60
61
|
import "./chunk-Z3RM3VA2.mjs";
|
|
61
|
-
import "./chunk-
|
|
62
|
+
import "./chunk-BCCCPFHQ.mjs";
|
|
62
63
|
import "./chunk-AOIUYHPH.mjs";
|
|
63
64
|
import "./chunk-7VJXYB6S.mjs";
|
|
64
65
|
import "./chunk-NLATR3T3.mjs";
|
|
@@ -125,7 +126,7 @@ import "./chunk-YT2ZMLXK.mjs";
|
|
|
125
126
|
import "./chunk-D2LCAV6L.mjs";
|
|
126
127
|
import "./chunk-H3ASZDT7.mjs";
|
|
127
128
|
import "./chunk-EILUVBKS.mjs";
|
|
128
|
-
import "./chunk-
|
|
129
|
+
import "./chunk-I5CVJ24H.mjs";
|
|
129
130
|
import "./chunk-QPNVDSFZ.mjs";
|
|
130
131
|
import "./chunk-GYMGK467.mjs";
|
|
131
132
|
import "./chunk-5Y4GYKKH.mjs";
|
package/dist/renderer.cjs
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
+
var _chunkMAPHNGTFcjs = require('./chunk-MAPHNGTF.cjs');
|
|
4
|
+
require('./chunk-7KJJ4SBS.cjs');
|
|
3
5
|
|
|
4
6
|
|
|
5
7
|
|
|
@@ -18,7 +20,10 @@
|
|
|
18
20
|
|
|
19
21
|
|
|
20
22
|
|
|
21
|
-
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
var _chunk3OKSEJ33cjs = require('./chunk-3OKSEJ33.cjs');
|
|
26
|
+
require('./chunk-3BIASUGR.cjs');
|
|
22
27
|
require('./chunk-UZM3PDKK.cjs');
|
|
23
28
|
|
|
24
29
|
|
|
@@ -40,4 +45,5 @@ require('./chunk-UZM3PDKK.cjs');
|
|
|
40
45
|
|
|
41
46
|
|
|
42
47
|
|
|
43
|
-
|
|
48
|
+
|
|
49
|
+
exports.FARM_COMPONENT_EXTENSIONS = _chunk3OKSEJ33cjs.FARM_COMPONENT_EXTENSIONS; exports.NO_RENDERER = _chunk3OKSEJ33cjs.NO_RENDERER; exports.REACT_RENDERER = _chunk3OKSEJ33cjs.REACT_RENDERER; exports.assertFarmRendererServerModule = _chunk3OKSEJ33cjs.assertFarmRendererServerModule; exports.assertFarmRendererStreamingRuntime = _chunk3OKSEJ33cjs.assertFarmRendererStreamingRuntime; exports.createFarmRendererHookError = _chunk3OKSEJ33cjs.createFarmRendererHookError; exports.defineRenderer = _chunk3OKSEJ33cjs.defineRenderer; exports.getFarmRendererCapabilities = _chunk3OKSEJ33cjs.getFarmRendererCapabilities; exports.getFarmRendererComponentExtensions = _chunk3OKSEJ33cjs.getFarmRendererComponentExtensions; exports.getFarmRendererStreamingCapabilitiesForRuntime = _chunk3OKSEJ33cjs.getFarmRendererStreamingCapabilitiesForRuntime; exports.isFarmRendererDisabled = _chunk3OKSEJ33cjs.isFarmRendererDisabled; exports.isReactRenderer = _chunk3OKSEJ33cjs.isReactRenderer; exports.loadFarmRendererVitePlugins = _chunk3OKSEJ33cjs.loadFarmRendererVitePlugins; exports.readFarmRendererHydration = _chunk3OKSEJ33cjs.readFarmRendererHydration; exports.readFarmRendererWebStream = _chunk3OKSEJ33cjs.readFarmRendererWebStream; exports.resolveFarmComponentExtensions = _chunk3OKSEJ33cjs.resolveFarmComponentExtensions; exports.resolveFarmIsland = _chunkMAPHNGTFcjs.resolveFarmIsland; exports.resolveFarmRenderer = _chunk3OKSEJ33cjs.resolveFarmRenderer; exports.resolveFarmRendererAppSetup = _chunk3OKSEJ33cjs.resolveFarmRendererAppSetup; exports.resolveFarmRendererModule = _chunk3OKSEJ33cjs.resolveFarmRendererModule;
|
package/dist/renderer.d.mts
CHANGED
|
@@ -1,6 +1,65 @@
|
|
|
1
1
|
import { FarmPresetRuntime } from './deployment.mjs';
|
|
2
2
|
import { F as FarmIslandStrategy } from './island.d-CfGru1MO.mjs';
|
|
3
3
|
|
|
4
|
+
/** What `withIsland` gets for each export of a client module. */
|
|
5
|
+
interface FarmIslandReference {
|
|
6
|
+
/** The module id the browser imports, as `<f-island src>` carries it. */
|
|
7
|
+
readonly src: string;
|
|
8
|
+
/** The component's export in that module. */
|
|
9
|
+
readonly export: string;
|
|
10
|
+
/** The module's `island` export, or `"load"`. A `client:*` attribute overrides it. */
|
|
11
|
+
readonly strategy: FarmIslandStrategy;
|
|
12
|
+
}
|
|
13
|
+
/** A script element to write: its attributes, unescaped, and its text, already escaped. */
|
|
14
|
+
interface FarmIslandScript {
|
|
15
|
+
readonly attributes: Readonly<Record<string, string>>;
|
|
16
|
+
/** Escaped for a script element. Write it raw, not as text the renderer escapes again. */
|
|
17
|
+
readonly text: string;
|
|
18
|
+
}
|
|
19
|
+
/** An island to render: the parts to write around the component, and its props. */
|
|
20
|
+
interface FarmResolvedIsland {
|
|
21
|
+
/** The component's props, without `client:*`. */
|
|
22
|
+
readonly props: Record<string, unknown>;
|
|
23
|
+
/** Value scripts to write before the island: the values this response hasn't sent yet. */
|
|
24
|
+
readonly values: readonly FarmIslandScript[];
|
|
25
|
+
/**
|
|
26
|
+
* The island element to write around the component: its tag (`f-island`) and its attributes
|
|
27
|
+
* (src, export, props id, strategy, style), unescaped.
|
|
28
|
+
*/
|
|
29
|
+
readonly element: {
|
|
30
|
+
readonly tag: string;
|
|
31
|
+
readonly attributes: Readonly<Record<string, string>>;
|
|
32
|
+
};
|
|
33
|
+
/** The props script to write right after the element. */
|
|
34
|
+
readonly script: FarmIslandScript;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* The attributes that set one island's strategy where a client component is used. Add them to
|
|
38
|
+
* the renderer's `JSX.IntrinsicAttributes`, so `<Counter client:visible />` type-checks.
|
|
39
|
+
*/
|
|
40
|
+
interface FarmIslandAttributes {
|
|
41
|
+
"client:load"?: boolean | "";
|
|
42
|
+
"client:idle"?: boolean | "";
|
|
43
|
+
"client:visible"?: boolean | "";
|
|
44
|
+
"client:interaction"?: boolean | "";
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* The island a renderer writes for a client component rendered from server output, with
|
|
48
|
+
* `props` as written where it's used:
|
|
49
|
+
*
|
|
50
|
+
* - `client:*` is removed from the props and picks the strategy, before the module's `island`
|
|
51
|
+
* export (`reference.strategy`).
|
|
52
|
+
* - The island gets an id unique within the response.
|
|
53
|
+
* - The props go through islx's codec: JSON, `Date`, `Map`, `Set` and its other tagged types,
|
|
54
|
+
* and server actions. A value several islands of one response get is sent once.
|
|
55
|
+
*
|
|
56
|
+
* Returns `undefined` when the props can't reach the browser, such as a function that isn't a
|
|
57
|
+
* server action. Farm logs why, once, and the renderer renders the component without an island,
|
|
58
|
+
* so its server HTML stays without client code. A `client:*` attribute that isn't a strategy, has
|
|
59
|
+
* a value, or is one of two on the same element throws.
|
|
60
|
+
*/
|
|
61
|
+
declare function resolveFarmIsland(props: Record<string, unknown>, reference: FarmIslandReference): FarmResolvedIsland | undefined;
|
|
62
|
+
|
|
4
63
|
/**
|
|
5
64
|
* A rendering-library integration used by Farm's compiler, server renderer,
|
|
6
65
|
* and browser hydration runtime.
|
|
@@ -190,6 +249,16 @@ interface FarmRendererCapabilities {
|
|
|
190
249
|
* hydration leaves the server's markup there.
|
|
191
250
|
*/
|
|
192
251
|
hydrationFallback: boolean;
|
|
252
|
+
/**
|
|
253
|
+
* Whether the server module exports `withIsland`, so a client component rendered from server
|
|
254
|
+
* output hydrates as its own island when the app sets
|
|
255
|
+
* `experimental.isolatedClientHydration: "enabled"`. Experimental.
|
|
256
|
+
*
|
|
257
|
+
* Farm wraps each export of a client module in the server graph with `withIsland`, and the
|
|
258
|
+
* browser starts each island with the client module's `createElement` and `hydrateRoot`.
|
|
259
|
+
* Without it, those apps take the path they take today.
|
|
260
|
+
*/
|
|
261
|
+
islands: boolean;
|
|
193
262
|
}
|
|
194
263
|
interface FarmRendererCapabilitiesInput {
|
|
195
264
|
streaming?: Partial<FarmRendererStreamingPrimitives> & {
|
|
@@ -198,6 +267,8 @@ interface FarmRendererCapabilitiesInput {
|
|
|
198
267
|
reconcilesRerenders?: boolean;
|
|
199
268
|
functionComponents?: boolean;
|
|
200
269
|
hydrationFallback?: boolean;
|
|
270
|
+
/** The server module exports `withIsland`. Experimental; see `FarmRendererCapabilities`. */
|
|
271
|
+
islands?: boolean;
|
|
201
272
|
}
|
|
202
273
|
/** A client layout participating in a renderer-owned route update. */
|
|
203
274
|
interface FarmRendererRouteLayout {
|
|
@@ -262,6 +333,7 @@ declare function getFarmRendererStreamingCapabilitiesForRuntime(renderer: Pick<F
|
|
|
262
333
|
declare function assertFarmRendererServerModule(runtime: unknown, renderer: {
|
|
263
334
|
readonly name: string;
|
|
264
335
|
readonly server: string;
|
|
336
|
+
readonly capabilities?: Pick<FarmRendererCapabilitiesInput, "islands">;
|
|
265
337
|
}): void;
|
|
266
338
|
declare function assertFarmRendererStreamingRuntime(name: string, renderer: Pick<FarmRenderer, "capabilities"> | undefined, runtimeModule: Pick<Partial<FarmServerRendererRuntime>, "capabilities" | "renderToPipeableStream" | "renderToReadableStream">, runtime: FarmRendererRuntime | "unknown"): FarmRendererStreamingPrimitives;
|
|
267
339
|
declare const FARM_COMPONENT_EXTENSIONS: readonly [".ts", ".tsx", ".js", ".jsx"];
|
|
@@ -302,6 +374,14 @@ interface FarmServerRendererRuntime {
|
|
|
302
374
|
renderServerTreePage?(element: unknown, options?: {
|
|
303
375
|
values?: boolean;
|
|
304
376
|
}): Promise<unknown>;
|
|
377
|
+
/**
|
|
378
|
+
* Wraps a client component so that, rendered from server output, it starts an island: it calls
|
|
379
|
+
* `resolveFarmIsland` and renders the result around the component. Inside a tree that
|
|
380
|
+
* `wrapClientGraph` marks, it renders the component plain. Farm calls it on each export of a
|
|
381
|
+
* client module in the server graph. Required when the descriptor declares
|
|
382
|
+
* `capabilities.islands`.
|
|
383
|
+
*/
|
|
384
|
+
withIsland?(component: unknown, reference: FarmIslandReference): unknown;
|
|
305
385
|
/**
|
|
306
386
|
* Optional: tag a plain function component so a renderer that compiles its
|
|
307
387
|
* own components can tell the two apart. Renderers without the hook treat
|
|
@@ -416,4 +496,4 @@ declare function loadFarmRendererVitePlugins(renderer: FarmRenderer, root: strin
|
|
|
416
496
|
buildLifetime?: AbortSignal;
|
|
417
497
|
}): Promise<unknown[]>;
|
|
418
498
|
|
|
419
|
-
export { FARM_COMPONENT_EXTENSIONS, type FarmRenderer, type FarmRendererCapabilities, type FarmRendererCapabilitiesInput, type FarmRendererClientRoot, type FarmRendererClientRuntime, type FarmRendererHydration, type FarmRendererHydrationOptions, type FarmRendererRenderOptions, type FarmRendererRoute, type FarmRendererRouteFile, type FarmRendererRouteKind, type FarmRendererRouteLayout, type FarmRendererRouteState, type FarmRendererRoutes, type FarmRendererRoutesContext, type FarmRendererRuntime, type FarmRendererStreamingCapabilities, type FarmRendererStreamingPrimitives, type FarmRendererViteModule, type FarmServerRendererRuntime, NO_RENDERER, REACT_RENDERER, assertFarmRendererServerModule, assertFarmRendererStreamingRuntime, createFarmRendererHookError, defineRenderer, getFarmRendererCapabilities, getFarmRendererComponentExtensions, getFarmRendererStreamingCapabilitiesForRuntime, isFarmRendererDisabled, isReactRenderer, loadFarmRendererVitePlugins, readFarmRendererHydration, readFarmRendererWebStream, resolveFarmComponentExtensions, resolveFarmRenderer, resolveFarmRendererAppSetup, resolveFarmRendererModule };
|
|
499
|
+
export { FARM_COMPONENT_EXTENSIONS, type FarmIslandAttributes, type FarmIslandReference, type FarmIslandScript, type FarmRenderer, type FarmRendererCapabilities, type FarmRendererCapabilitiesInput, type FarmRendererClientRoot, type FarmRendererClientRuntime, type FarmRendererHydration, type FarmRendererHydrationOptions, type FarmRendererRenderOptions, type FarmRendererRoute, type FarmRendererRouteFile, type FarmRendererRouteKind, type FarmRendererRouteLayout, type FarmRendererRouteState, type FarmRendererRoutes, type FarmRendererRoutesContext, type FarmRendererRuntime, type FarmRendererStreamingCapabilities, type FarmRendererStreamingPrimitives, type FarmRendererViteModule, type FarmResolvedIsland, type FarmServerRendererRuntime, NO_RENDERER, REACT_RENDERER, assertFarmRendererServerModule, assertFarmRendererStreamingRuntime, createFarmRendererHookError, defineRenderer, getFarmRendererCapabilities, getFarmRendererComponentExtensions, getFarmRendererStreamingCapabilitiesForRuntime, isFarmRendererDisabled, isReactRenderer, loadFarmRendererVitePlugins, readFarmRendererHydration, readFarmRendererWebStream, resolveFarmComponentExtensions, resolveFarmIsland, resolveFarmRenderer, resolveFarmRendererAppSetup, resolveFarmRendererModule };
|
package/dist/renderer.d.ts
CHANGED
|
@@ -1,6 +1,65 @@
|
|
|
1
1
|
import { FarmPresetRuntime } from './deployment.js';
|
|
2
2
|
import { F as FarmIslandStrategy } from './island.d-CfGru1MO.js';
|
|
3
3
|
|
|
4
|
+
/** What `withIsland` gets for each export of a client module. */
|
|
5
|
+
interface FarmIslandReference {
|
|
6
|
+
/** The module id the browser imports, as `<f-island src>` carries it. */
|
|
7
|
+
readonly src: string;
|
|
8
|
+
/** The component's export in that module. */
|
|
9
|
+
readonly export: string;
|
|
10
|
+
/** The module's `island` export, or `"load"`. A `client:*` attribute overrides it. */
|
|
11
|
+
readonly strategy: FarmIslandStrategy;
|
|
12
|
+
}
|
|
13
|
+
/** A script element to write: its attributes, unescaped, and its text, already escaped. */
|
|
14
|
+
interface FarmIslandScript {
|
|
15
|
+
readonly attributes: Readonly<Record<string, string>>;
|
|
16
|
+
/** Escaped for a script element. Write it raw, not as text the renderer escapes again. */
|
|
17
|
+
readonly text: string;
|
|
18
|
+
}
|
|
19
|
+
/** An island to render: the parts to write around the component, and its props. */
|
|
20
|
+
interface FarmResolvedIsland {
|
|
21
|
+
/** The component's props, without `client:*`. */
|
|
22
|
+
readonly props: Record<string, unknown>;
|
|
23
|
+
/** Value scripts to write before the island: the values this response hasn't sent yet. */
|
|
24
|
+
readonly values: readonly FarmIslandScript[];
|
|
25
|
+
/**
|
|
26
|
+
* The island element to write around the component: its tag (`f-island`) and its attributes
|
|
27
|
+
* (src, export, props id, strategy, style), unescaped.
|
|
28
|
+
*/
|
|
29
|
+
readonly element: {
|
|
30
|
+
readonly tag: string;
|
|
31
|
+
readonly attributes: Readonly<Record<string, string>>;
|
|
32
|
+
};
|
|
33
|
+
/** The props script to write right after the element. */
|
|
34
|
+
readonly script: FarmIslandScript;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* The attributes that set one island's strategy where a client component is used. Add them to
|
|
38
|
+
* the renderer's `JSX.IntrinsicAttributes`, so `<Counter client:visible />` type-checks.
|
|
39
|
+
*/
|
|
40
|
+
interface FarmIslandAttributes {
|
|
41
|
+
"client:load"?: boolean | "";
|
|
42
|
+
"client:idle"?: boolean | "";
|
|
43
|
+
"client:visible"?: boolean | "";
|
|
44
|
+
"client:interaction"?: boolean | "";
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* The island a renderer writes for a client component rendered from server output, with
|
|
48
|
+
* `props` as written where it's used:
|
|
49
|
+
*
|
|
50
|
+
* - `client:*` is removed from the props and picks the strategy, before the module's `island`
|
|
51
|
+
* export (`reference.strategy`).
|
|
52
|
+
* - The island gets an id unique within the response.
|
|
53
|
+
* - The props go through islx's codec: JSON, `Date`, `Map`, `Set` and its other tagged types,
|
|
54
|
+
* and server actions. A value several islands of one response get is sent once.
|
|
55
|
+
*
|
|
56
|
+
* Returns `undefined` when the props can't reach the browser, such as a function that isn't a
|
|
57
|
+
* server action. Farm logs why, once, and the renderer renders the component without an island,
|
|
58
|
+
* so its server HTML stays without client code. A `client:*` attribute that isn't a strategy, has
|
|
59
|
+
* a value, or is one of two on the same element throws.
|
|
60
|
+
*/
|
|
61
|
+
declare function resolveFarmIsland(props: Record<string, unknown>, reference: FarmIslandReference): FarmResolvedIsland | undefined;
|
|
62
|
+
|
|
4
63
|
/**
|
|
5
64
|
* A rendering-library integration used by Farm's compiler, server renderer,
|
|
6
65
|
* and browser hydration runtime.
|
|
@@ -190,6 +249,16 @@ interface FarmRendererCapabilities {
|
|
|
190
249
|
* hydration leaves the server's markup there.
|
|
191
250
|
*/
|
|
192
251
|
hydrationFallback: boolean;
|
|
252
|
+
/**
|
|
253
|
+
* Whether the server module exports `withIsland`, so a client component rendered from server
|
|
254
|
+
* output hydrates as its own island when the app sets
|
|
255
|
+
* `experimental.isolatedClientHydration: "enabled"`. Experimental.
|
|
256
|
+
*
|
|
257
|
+
* Farm wraps each export of a client module in the server graph with `withIsland`, and the
|
|
258
|
+
* browser starts each island with the client module's `createElement` and `hydrateRoot`.
|
|
259
|
+
* Without it, those apps take the path they take today.
|
|
260
|
+
*/
|
|
261
|
+
islands: boolean;
|
|
193
262
|
}
|
|
194
263
|
interface FarmRendererCapabilitiesInput {
|
|
195
264
|
streaming?: Partial<FarmRendererStreamingPrimitives> & {
|
|
@@ -198,6 +267,8 @@ interface FarmRendererCapabilitiesInput {
|
|
|
198
267
|
reconcilesRerenders?: boolean;
|
|
199
268
|
functionComponents?: boolean;
|
|
200
269
|
hydrationFallback?: boolean;
|
|
270
|
+
/** The server module exports `withIsland`. Experimental; see `FarmRendererCapabilities`. */
|
|
271
|
+
islands?: boolean;
|
|
201
272
|
}
|
|
202
273
|
/** A client layout participating in a renderer-owned route update. */
|
|
203
274
|
interface FarmRendererRouteLayout {
|
|
@@ -262,6 +333,7 @@ declare function getFarmRendererStreamingCapabilitiesForRuntime(renderer: Pick<F
|
|
|
262
333
|
declare function assertFarmRendererServerModule(runtime: unknown, renderer: {
|
|
263
334
|
readonly name: string;
|
|
264
335
|
readonly server: string;
|
|
336
|
+
readonly capabilities?: Pick<FarmRendererCapabilitiesInput, "islands">;
|
|
265
337
|
}): void;
|
|
266
338
|
declare function assertFarmRendererStreamingRuntime(name: string, renderer: Pick<FarmRenderer, "capabilities"> | undefined, runtimeModule: Pick<Partial<FarmServerRendererRuntime>, "capabilities" | "renderToPipeableStream" | "renderToReadableStream">, runtime: FarmRendererRuntime | "unknown"): FarmRendererStreamingPrimitives;
|
|
267
339
|
declare const FARM_COMPONENT_EXTENSIONS: readonly [".ts", ".tsx", ".js", ".jsx"];
|
|
@@ -302,6 +374,14 @@ interface FarmServerRendererRuntime {
|
|
|
302
374
|
renderServerTreePage?(element: unknown, options?: {
|
|
303
375
|
values?: boolean;
|
|
304
376
|
}): Promise<unknown>;
|
|
377
|
+
/**
|
|
378
|
+
* Wraps a client component so that, rendered from server output, it starts an island: it calls
|
|
379
|
+
* `resolveFarmIsland` and renders the result around the component. Inside a tree that
|
|
380
|
+
* `wrapClientGraph` marks, it renders the component plain. Farm calls it on each export of a
|
|
381
|
+
* client module in the server graph. Required when the descriptor declares
|
|
382
|
+
* `capabilities.islands`.
|
|
383
|
+
*/
|
|
384
|
+
withIsland?(component: unknown, reference: FarmIslandReference): unknown;
|
|
305
385
|
/**
|
|
306
386
|
* Optional: tag a plain function component so a renderer that compiles its
|
|
307
387
|
* own components can tell the two apart. Renderers without the hook treat
|
|
@@ -416,4 +496,4 @@ declare function loadFarmRendererVitePlugins(renderer: FarmRenderer, root: strin
|
|
|
416
496
|
buildLifetime?: AbortSignal;
|
|
417
497
|
}): Promise<unknown[]>;
|
|
418
498
|
|
|
419
|
-
export { FARM_COMPONENT_EXTENSIONS, type FarmRenderer, type FarmRendererCapabilities, type FarmRendererCapabilitiesInput, type FarmRendererClientRoot, type FarmRendererClientRuntime, type FarmRendererHydration, type FarmRendererHydrationOptions, type FarmRendererRenderOptions, type FarmRendererRoute, type FarmRendererRouteFile, type FarmRendererRouteKind, type FarmRendererRouteLayout, type FarmRendererRouteState, type FarmRendererRoutes, type FarmRendererRoutesContext, type FarmRendererRuntime, type FarmRendererStreamingCapabilities, type FarmRendererStreamingPrimitives, type FarmRendererViteModule, type FarmServerRendererRuntime, NO_RENDERER, REACT_RENDERER, assertFarmRendererServerModule, assertFarmRendererStreamingRuntime, createFarmRendererHookError, defineRenderer, getFarmRendererCapabilities, getFarmRendererComponentExtensions, getFarmRendererStreamingCapabilitiesForRuntime, isFarmRendererDisabled, isReactRenderer, loadFarmRendererVitePlugins, readFarmRendererHydration, readFarmRendererWebStream, resolveFarmComponentExtensions, resolveFarmRenderer, resolveFarmRendererAppSetup, resolveFarmRendererModule };
|
|
499
|
+
export { FARM_COMPONENT_EXTENSIONS, type FarmIslandAttributes, type FarmIslandReference, type FarmIslandScript, type FarmRenderer, type FarmRendererCapabilities, type FarmRendererCapabilitiesInput, type FarmRendererClientRoot, type FarmRendererClientRuntime, type FarmRendererHydration, type FarmRendererHydrationOptions, type FarmRendererRenderOptions, type FarmRendererRoute, type FarmRendererRouteFile, type FarmRendererRouteKind, type FarmRendererRouteLayout, type FarmRendererRouteState, type FarmRendererRoutes, type FarmRendererRoutesContext, type FarmRendererRuntime, type FarmRendererStreamingCapabilities, type FarmRendererStreamingPrimitives, type FarmRendererViteModule, type FarmResolvedIsland, type FarmServerRendererRuntime, NO_RENDERER, REACT_RENDERER, assertFarmRendererServerModule, assertFarmRendererStreamingRuntime, createFarmRendererHookError, defineRenderer, getFarmRendererCapabilities, getFarmRendererComponentExtensions, getFarmRendererStreamingCapabilitiesForRuntime, isFarmRendererDisabled, isReactRenderer, loadFarmRendererVitePlugins, readFarmRendererHydration, readFarmRendererWebStream, resolveFarmComponentExtensions, resolveFarmIsland, resolveFarmRenderer, resolveFarmRendererAppSetup, resolveFarmRendererModule };
|
package/dist/renderer.mjs
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import {
|
|
2
|
+
resolveFarmIsland
|
|
3
|
+
} from "./chunk-RQ6XX5IN.mjs";
|
|
4
|
+
import "./chunk-S32PDOLO.mjs";
|
|
1
5
|
import {
|
|
2
6
|
FARM_COMPONENT_EXTENSIONS,
|
|
3
7
|
NO_RENDERER,
|
|
@@ -18,7 +22,8 @@ import {
|
|
|
18
22
|
resolveFarmRenderer,
|
|
19
23
|
resolveFarmRendererAppSetup,
|
|
20
24
|
resolveFarmRendererModule
|
|
21
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-BCCCPFHQ.mjs";
|
|
26
|
+
import "./chunk-VIXTAVEA.mjs";
|
|
22
27
|
import "./chunk-TIZJYHB7.mjs";
|
|
23
28
|
export {
|
|
24
29
|
FARM_COMPONENT_EXTENSIONS,
|
|
@@ -37,6 +42,7 @@ export {
|
|
|
37
42
|
readFarmRendererHydration,
|
|
38
43
|
readFarmRendererWebStream,
|
|
39
44
|
resolveFarmComponentExtensions,
|
|
45
|
+
resolveFarmIsland,
|
|
40
46
|
resolveFarmRenderer,
|
|
41
47
|
resolveFarmRendererAppSetup,
|
|
42
48
|
resolveFarmRendererModule
|
|
@@ -2,32 +2,32 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkHOQ2MYBJcjs = require('./chunk-HOQ2MYBJ.cjs');
|
|
6
6
|
require('./chunk-PWMJBCAN.cjs');
|
|
7
|
-
require('./chunk-
|
|
7
|
+
require('./chunk-BOEDYXAX.cjs');
|
|
8
8
|
require('./chunk-OZC2JPW6.cjs');
|
|
9
9
|
require('./chunk-Y2FEFQAY.cjs');
|
|
10
10
|
require('./chunk-DMSXZNQR.cjs');
|
|
11
|
+
require('./chunk-AQLHD6HZ.cjs');
|
|
12
|
+
require('./chunk-YKHRCY4T.cjs');
|
|
11
13
|
|
|
12
14
|
|
|
13
15
|
|
|
14
16
|
|
|
15
17
|
|
|
16
18
|
|
|
17
|
-
var
|
|
18
|
-
require('./chunk-AQLHD6HZ.cjs');
|
|
19
|
-
require('./chunk-YKHRCY4T.cjs');
|
|
19
|
+
var _chunkF7JVO3OZcjs = require('./chunk-F7JVO3OZ.cjs');
|
|
20
20
|
require('./chunk-L2GUEYHR.cjs');
|
|
21
21
|
require('./chunk-IIHZ2BEE.cjs');
|
|
22
22
|
require('./chunk-LSHX2H5G.cjs');
|
|
23
23
|
require('./chunk-STF6VDYQ.cjs');
|
|
24
24
|
require('./chunk-EACD6ND7.cjs');
|
|
25
|
-
require('./chunk-6JHZPB52.cjs');
|
|
26
25
|
require('./chunk-BTVDYS4B.cjs');
|
|
27
26
|
require('./chunk-OLKYHTLN.cjs');
|
|
28
|
-
require('./chunk-
|
|
27
|
+
require('./chunk-6JHZPB52.cjs');
|
|
28
|
+
require('./chunk-MNUYXZV7.cjs');
|
|
29
29
|
require('./chunk-52Q4OB4A.cjs');
|
|
30
|
-
require('./chunk-
|
|
30
|
+
require('./chunk-3OKSEJ33.cjs');
|
|
31
31
|
require('./chunk-MCSRMEQV.cjs');
|
|
32
32
|
require('./chunk-HQKCSJEH.cjs');
|
|
33
33
|
require('./chunk-XRFGOYXG.cjs');
|
|
@@ -86,4 +86,4 @@ require('./chunk-UZM3PDKK.cjs');
|
|
|
86
86
|
|
|
87
87
|
|
|
88
88
|
|
|
89
|
-
exports.FARM_RSC_PACKAGES =
|
|
89
|
+
exports.FARM_RSC_PACKAGES = _chunkF7JVO3OZcjs.FARM_RSC_PACKAGES; exports.buildFarmRsc = _chunkHOQ2MYBJcjs.buildFarmRsc; exports.createFarmRscDevServer = _chunkHOQ2MYBJcjs.createFarmRscDevServer; exports.createFarmRscViteConfig = _chunkHOQ2MYBJcjs.createFarmRscViteConfig; exports.farmAppUsesRscPipeline = _chunkF7JVO3OZcjs.farmAppUsesRscPipeline; exports.farmConfigUsesServerComponents = _chunkF7JVO3OZcjs.farmConfigUsesServerComponents; exports.inspectFarmServerComponents = _chunkF7JVO3OZcjs.inspectFarmServerComponents; exports.resolveFarmRscCheckConfig = _chunkF7JVO3OZcjs.resolveFarmRscCheckConfig;
|
|
@@ -2,32 +2,32 @@ import {
|
|
|
2
2
|
buildFarmRsc,
|
|
3
3
|
createFarmRscDevServer,
|
|
4
4
|
createFarmRscViteConfig
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-INU4K4U4.mjs";
|
|
6
6
|
import "./chunk-RLEAVG6G.mjs";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-EDBIBO67.mjs";
|
|
8
8
|
import "./chunk-VISQDC6W.mjs";
|
|
9
9
|
import "./chunk-7V5M43ND.mjs";
|
|
10
10
|
import "./chunk-MO4UTDQ6.mjs";
|
|
11
|
+
import "./chunk-SMUW7UST.mjs";
|
|
12
|
+
import "./chunk-UB7RVEMX.mjs";
|
|
11
13
|
import {
|
|
12
14
|
FARM_RSC_PACKAGES,
|
|
13
15
|
farmAppUsesRscPipeline,
|
|
14
16
|
farmConfigUsesServerComponents,
|
|
15
17
|
inspectFarmServerComponents,
|
|
16
18
|
resolveFarmRscCheckConfig
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import "./chunk-SMUW7UST.mjs";
|
|
19
|
-
import "./chunk-UB7RVEMX.mjs";
|
|
19
|
+
} from "./chunk-MYSH5Y4E.mjs";
|
|
20
20
|
import "./chunk-5V6HSJFG.mjs";
|
|
21
21
|
import "./chunk-YVVY276M.mjs";
|
|
22
22
|
import "./chunk-XR2ZIBQK.mjs";
|
|
23
23
|
import "./chunk-CU5SYTJG.mjs";
|
|
24
24
|
import "./chunk-NQ3Y6E2T.mjs";
|
|
25
|
-
import "./chunk-22W4FNTG.mjs";
|
|
26
25
|
import "./chunk-SQ5O7I3L.mjs";
|
|
27
26
|
import "./chunk-XGL42MQ7.mjs";
|
|
28
|
-
import "./chunk-
|
|
27
|
+
import "./chunk-22W4FNTG.mjs";
|
|
28
|
+
import "./chunk-RJBUI5AN.mjs";
|
|
29
29
|
import "./chunk-Z3RM3VA2.mjs";
|
|
30
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-BCCCPFHQ.mjs";
|
|
31
31
|
import "./chunk-AOIUYHPH.mjs";
|
|
32
32
|
import "./chunk-7VJXYB6S.mjs";
|
|
33
33
|
import "./chunk-NLATR3T3.mjs";
|
|
@@ -23,11 +23,8 @@ import "./chunk-UBLKPREL.mjs";
|
|
|
23
23
|
import {
|
|
24
24
|
loadConfig,
|
|
25
25
|
resolveConfig
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-EDBIBO67.mjs";
|
|
27
27
|
import "./chunk-VISQDC6W.mjs";
|
|
28
|
-
import {
|
|
29
|
-
scanRoutePatterns
|
|
30
|
-
} from "./chunk-ELNRKD4V.mjs";
|
|
31
28
|
import {
|
|
32
29
|
createPlatformBlockChecker,
|
|
33
30
|
isPlainObject,
|
|
@@ -36,24 +33,26 @@ import {
|
|
|
36
33
|
resolvePlatformBlock,
|
|
37
34
|
resolvePlatformProfile
|
|
38
35
|
} from "./chunk-UB7RVEMX.mjs";
|
|
36
|
+
import {
|
|
37
|
+
scanRoutePatterns
|
|
38
|
+
} from "./chunk-L5HDCDFT.mjs";
|
|
39
39
|
import "./chunk-YFTGIHNC.mjs";
|
|
40
40
|
import "./chunk-5V6HSJFG.mjs";
|
|
41
41
|
import "./chunk-YVVY276M.mjs";
|
|
42
42
|
import "./chunk-XR2ZIBQK.mjs";
|
|
43
43
|
import "./chunk-CU5SYTJG.mjs";
|
|
44
44
|
import "./chunk-NQ3Y6E2T.mjs";
|
|
45
|
-
import "./chunk-22W4FNTG.mjs";
|
|
46
45
|
import "./chunk-SQ5O7I3L.mjs";
|
|
47
46
|
import "./chunk-XGL42MQ7.mjs";
|
|
48
|
-
import
|
|
49
|
-
|
|
50
|
-
} from "./chunk-4QENVMG7.mjs";
|
|
47
|
+
import "./chunk-22W4FNTG.mjs";
|
|
48
|
+
import "./chunk-RJBUI5AN.mjs";
|
|
51
49
|
import {
|
|
52
50
|
getFarmSourceRoots
|
|
53
51
|
} from "./chunk-Z3RM3VA2.mjs";
|
|
54
52
|
import {
|
|
55
|
-
getFarmRendererComponentExtensions
|
|
56
|
-
|
|
53
|
+
getFarmRendererComponentExtensions,
|
|
54
|
+
resolveFarmServerComponentsMode
|
|
55
|
+
} from "./chunk-BCCCPFHQ.mjs";
|
|
57
56
|
import "./chunk-AOIUYHPH.mjs";
|
|
58
57
|
import "./chunk-7VJXYB6S.mjs";
|
|
59
58
|
import "./chunk-NLATR3T3.mjs";
|
|
@@ -1192,7 +1191,7 @@ async function resolveFarmMobileApp(options = {}) {
|
|
|
1192
1191
|
return decision.source === "default" || decision.requested !== void 0;
|
|
1193
1192
|
});
|
|
1194
1193
|
const portable = mobile.native.engine !== "platform" && (mobile.native.auto === "on" || candidates.some((route) => screens[route].requested === "native"));
|
|
1195
|
-
const { analyzeFarmMobileRoutes } = await import("./analyzer-
|
|
1194
|
+
const { analyzeFarmMobileRoutes } = await import("./analyzer-7RNO3XKC.mjs");
|
|
1196
1195
|
const analyzed = await analyzeFarmMobileRoutes({
|
|
1197
1196
|
root,
|
|
1198
1197
|
srcDir: config.srcDir,
|
|
@@ -23,37 +23,36 @@ require('./chunk-YUQUGVSV.cjs');
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _chunkBOEDYXAXcjs = require('./chunk-BOEDYXAX.cjs');
|
|
27
27
|
require('./chunk-OZC2JPW6.cjs');
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
var _chunk5X5GJU5Acjs = require('./chunk-5X5GJU5A.cjs');
|
|
31
30
|
|
|
32
31
|
|
|
33
32
|
|
|
34
33
|
|
|
35
34
|
|
|
35
|
+
var _chunkYKHRCY4Tcjs = require('./chunk-YKHRCY4T.cjs');
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
var
|
|
38
|
+
var _chunkGLNVLCUHcjs = require('./chunk-GLNVLCUH.cjs');
|
|
39
39
|
require('./chunk-AQIRXBBY.cjs');
|
|
40
40
|
require('./chunk-L2GUEYHR.cjs');
|
|
41
41
|
require('./chunk-IIHZ2BEE.cjs');
|
|
42
42
|
require('./chunk-LSHX2H5G.cjs');
|
|
43
43
|
require('./chunk-STF6VDYQ.cjs');
|
|
44
44
|
require('./chunk-EACD6ND7.cjs');
|
|
45
|
-
require('./chunk-6JHZPB52.cjs');
|
|
46
45
|
require('./chunk-BTVDYS4B.cjs');
|
|
47
46
|
require('./chunk-OLKYHTLN.cjs');
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
var _chunkRE5E2G5Scjs = require('./chunk-RE5E2G5S.cjs');
|
|
47
|
+
require('./chunk-6JHZPB52.cjs');
|
|
48
|
+
require('./chunk-MNUYXZV7.cjs');
|
|
51
49
|
|
|
52
50
|
|
|
53
51
|
var _chunk52Q4OB4Acjs = require('./chunk-52Q4OB4A.cjs');
|
|
54
52
|
|
|
55
53
|
|
|
56
|
-
|
|
54
|
+
|
|
55
|
+
var _chunk3OKSEJ33cjs = require('./chunk-3OKSEJ33.cjs');
|
|
57
56
|
require('./chunk-MCSRMEQV.cjs');
|
|
58
57
|
require('./chunk-HQKCSJEH.cjs');
|
|
59
58
|
require('./chunk-XRFGOYXG.cjs');
|
|
@@ -1109,7 +1108,7 @@ async function resolveFarmMobileApp(options = {}) {
|
|
|
1109
1108
|
const root = path2.resolve(_nullishCoalesce(_nullishCoalesce(_optionalChain([options, 'access', _76 => _76.config, 'optionalAccess', _77 => _77.root]), () => ( options.root)), () => ( process.cwd())));
|
|
1110
1109
|
const command = _nullishCoalesce(options.command, () => ( "build"));
|
|
1111
1110
|
const mode = command === "dev" ? "development" : "production";
|
|
1112
|
-
const userConfig = options.userConfig === void 0 ? await
|
|
1111
|
+
const userConfig = options.userConfig === void 0 ? await _chunkBOEDYXAXcjs.loadConfig.call(void 0, root, void 0, mode) : options.userConfig;
|
|
1113
1112
|
if (_optionalChain([userConfig, 'optionalAccess', _78 => _78.mobile]) === void 0) {
|
|
1114
1113
|
throw new FarmMobileError(
|
|
1115
1114
|
'farm.config.ts has no `mobile` entry. Add one, such as `mobile: { id: "com.example.notes", server: "https://notes.example.com" }`.'
|
|
@@ -1123,12 +1122,12 @@ async function resolveFarmMobileApp(options = {}) {
|
|
|
1123
1122
|
mode
|
|
1124
1123
|
});
|
|
1125
1124
|
const block = await resolveFarmMobileBlock(userConfig.mobile, context, options.cache);
|
|
1126
|
-
const config = await _asyncNullishCoalesce(options.config, async () => ( await
|
|
1127
|
-
const scan = await
|
|
1125
|
+
const config = await _asyncNullishCoalesce(options.config, async () => ( await _chunkBOEDYXAXcjs.resolveConfig.call(void 0, { ...userConfig, root }, mode)));
|
|
1126
|
+
const scan = await _chunkGLNVLCUHcjs.scanRoutePatterns.call(void 0, {
|
|
1128
1127
|
root,
|
|
1129
1128
|
srcDir: config.srcDir,
|
|
1130
1129
|
sourceRoots: _chunk52Q4OB4Acjs.getFarmSourceRoots.call(void 0, config),
|
|
1131
|
-
componentExtensions:
|
|
1130
|
+
componentExtensions: _chunk3OKSEJ33cjs.getFarmRendererComponentExtensions.call(void 0, config.renderer),
|
|
1132
1131
|
renderer: config.renderer,
|
|
1133
1132
|
platformFiles: true
|
|
1134
1133
|
});
|
|
@@ -1192,14 +1191,14 @@ async function resolveFarmMobileApp(options = {}) {
|
|
|
1192
1191
|
return decision.source === "default" || decision.requested !== void 0;
|
|
1193
1192
|
});
|
|
1194
1193
|
const portable = mobile.native.engine !== "platform" && (mobile.native.auto === "on" || candidates.some((route) => screens[route].requested === "native"));
|
|
1195
|
-
const { analyzeFarmMobileRoutes } = await import("./analyzer-
|
|
1194
|
+
const { analyzeFarmMobileRoutes } = await import("./analyzer-PFKA5NI6.cjs");
|
|
1196
1195
|
const analyzed = await analyzeFarmMobileRoutes({
|
|
1197
1196
|
root,
|
|
1198
1197
|
srcDir: config.srcDir,
|
|
1199
1198
|
routes: portable ? routes : candidates,
|
|
1200
1199
|
pageFiles: scan.pageFiles,
|
|
1201
1200
|
nativeOnlyRoutes: scan.nativeOnlyPages,
|
|
1202
|
-
serverComponents:
|
|
1201
|
+
serverComponents: _chunk3OKSEJ33cjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _82 => _82.experimental, 'optionalAccess', _83 => _83.serverComponents])) !== void 0,
|
|
1203
1202
|
cacheFile: path2.resolve(root, getFarmMobileOutputDirs(config.distDir).analyzerCache)
|
|
1204
1203
|
});
|
|
1205
1204
|
analyzerStats = analyzed.stats;
|