@farm.js/core 0.1.50 → 0.1.51-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/README.md +163 -3
- package/dist/{agent-mcp-9BMbRgg_.d.ts → agent-mcp-BBMfNpsC.d.ts} +1 -1
- package/dist/{agent-mcp-CIMH324y.d.mts → agent-mcp-D44ip11f.d.mts} +1 -1
- package/dist/agent-runtime.d.mts +1 -1
- package/dist/agent-runtime.d.ts +1 -1
- package/dist/{analyzer-DDW34OMC.mjs → analyzer-HOUCQR3K.mjs} +1 -1
- package/dist/{analyzer-CN7C74WX.cjs → analyzer-VKUDHNDF.cjs} +2 -2
- package/dist/api/route-manager.cjs +5 -5
- package/dist/api/route-manager.d.mts +3 -3
- package/dist/api/route-manager.d.ts +3 -3
- package/dist/api/route-manager.mjs +4 -4
- package/dist/api/runtime.d.mts +2 -2
- package/dist/api/runtime.d.ts +2 -2
- package/dist/api.cjs +6 -6
- package/dist/api.d.mts +3 -3
- package/dist/api.d.ts +3 -3
- package/dist/api.mjs +5 -5
- package/dist/{app-BWibTHVT.d.ts → app-CourU3rQ.d.ts} +4 -4
- package/dist/{app-DVJ13FPA.d.mts → app-aeD4s_mg.d.mts} +4 -4
- package/dist/{app-manifest-CQDJOKL2.d.mts → app-manifest-BC6mFn5A.d.mts} +1 -1
- package/dist/{app-manifest-D0kaXdwu.d.ts → app-manifest-LzjoNPeq.d.ts} +1 -1
- package/dist/app-markdown.d.mts +2 -2
- package/dist/app-markdown.d.ts +2 -2
- package/dist/base-path-BOUV5ozD.d.mts +10 -0
- package/dist/base-path-BOUV5ozD.d.ts +10 -0
- package/dist/{chunk-RWT2BTJT.cjs → chunk-2IAPKPEB.cjs} +6 -6
- package/dist/{chunk-2G63BIRL.mjs → chunk-2KVDHNQS.mjs} +8 -11
- package/dist/{chunk-76R5GJER.mjs → chunk-3HA7PP72.mjs} +2 -2
- package/dist/{chunk-NJVFPJ2Y.cjs → chunk-3OWVWZ6R.cjs} +28 -2
- package/dist/{chunk-KO2NWUKN.mjs → chunk-4GJJ65RB.mjs} +9 -1
- package/dist/{chunk-GERUXONA.cjs → chunk-5A77OEIG.cjs} +4 -1
- package/dist/{chunk-4HBKBHVP.mjs → chunk-5ENW27SL.mjs} +1 -1
- package/dist/{chunk-MTB57GOK.mjs → chunk-724WT3NI.mjs} +4 -2
- package/dist/{chunk-VCKGOXFI.cjs → chunk-76GHW3WI.cjs} +7 -1
- package/dist/{chunk-ZIBIE7AH.mjs → chunk-7UPCJDB5.mjs} +7 -1
- package/dist/{chunk-CPXDDWGL.mjs → chunk-AER5I65K.mjs} +1 -1
- package/dist/{chunk-WB6XES4V.mjs → chunk-ALEUMLJN.mjs} +34 -5
- package/dist/{chunk-WVBUXNBX.mjs → chunk-AMRK3P6W.mjs} +123 -47
- package/dist/{chunk-L6QDME5Z.cjs → chunk-B3GZAQSC.cjs} +3 -3
- package/dist/chunk-CKPTIEDX.cjs +12 -0
- package/dist/{chunk-B5S2JS6M.cjs → chunk-DWW3AMJX.cjs} +288 -255
- package/dist/{chunk-EQMTJBB7.cjs → chunk-DZZHTMWM.cjs} +35 -6
- package/dist/{chunk-3ATXWZPH.cjs → chunk-E36C43IX.cjs} +13 -16
- package/dist/{chunk-J2ZEVDEK.cjs → chunk-EHB77D5U.cjs} +3 -3
- package/dist/{chunk-WQGRD5BJ.cjs → chunk-EX6ZSN5P.cjs} +1 -16
- package/dist/{chunk-474FO3UE.cjs → chunk-F42U3R4F.cjs} +170 -163
- package/dist/{chunk-6QA2SXVH.cjs → chunk-FK25QSVC.cjs} +2 -1
- package/dist/{chunk-BW6SCVYX.mjs → chunk-FSQMN2MQ.mjs} +1 -0
- package/dist/{chunk-2H3FJYY6.mjs → chunk-FSXSQQTV.mjs} +3 -2
- package/dist/chunk-GNZIAJGB.mjs +358 -0
- package/dist/{chunk-TXK4D46O.mjs → chunk-H3ASZDT7.mjs} +21 -1
- package/dist/{chunk-B6PREBN6.cjs → chunk-HASX6DC7.cjs} +8 -8
- package/dist/{chunk-ZLOQQ2UF.mjs → chunk-I2ZA5SXS.mjs} +60 -27
- package/dist/{chunk-X2EL3BLH.cjs → chunk-IOUOGRDX.cjs} +11 -3
- package/dist/{chunk-CBJKDB6F.mjs → chunk-IRSS4HS4.mjs} +1 -1
- package/dist/{chunk-GOOK2J2W.cjs → chunk-J22JD5YJ.cjs} +2 -2
- package/dist/{chunk-2DEPNLXK.mjs → chunk-JF5CNHHF.mjs} +4 -4
- package/dist/{chunk-VOZ5DI7D.mjs → chunk-JWI5PUO2.mjs} +6 -2
- package/dist/{chunk-YAXOEAND.cjs → chunk-KHXAJ2KA.cjs} +6 -6
- package/dist/{chunk-WXHDVXJE.mjs → chunk-KY32FWK7.mjs} +2 -2
- package/dist/{chunk-EQWWOQTK.cjs → chunk-LEIXUFJN.cjs} +6 -2
- package/dist/{chunk-2GLQSIZD.mjs → chunk-LMFJCXDD.mjs} +1 -1
- package/dist/{chunk-IXSMFKZ2.cjs → chunk-LNM57D3H.cjs} +4 -4
- package/dist/{chunk-5V4KZOZO.mjs → chunk-LZ4SB57H.mjs} +2 -2
- package/dist/{chunk-E2BMCNMJ.cjs → chunk-MMEEXMUQ.cjs} +2 -2
- package/dist/chunk-N4AQNEXR.cjs +17 -0
- package/dist/{chunk-JZMZKABS.cjs → chunk-NWUHS6GV.cjs} +3 -2
- package/dist/{chunk-LYWAGXXW.cjs → chunk-O3MMJPC2.cjs} +12 -12
- package/dist/{chunk-FACTMUPI.cjs → chunk-PDJSL7PL.cjs} +30 -19
- package/dist/{chunk-XLLVWLWO.mjs → chunk-PIHKO25G.mjs} +1 -1
- package/dist/chunk-PIUTGRDI.cjs +358 -0
- package/dist/{chunk-KGP76FSV.mjs → chunk-PPDHCRTC.mjs} +1 -1
- package/dist/{chunk-C73RIAEF.mjs → chunk-QI5AQMEE.mjs} +17 -6
- package/dist/{chunk-F5LERVY3.cjs → chunk-QK3HBOTG.cjs} +10 -10
- package/dist/{chunk-Q3UU2KXC.mjs → chunk-QMDU6QHN.mjs} +4 -1
- package/dist/{chunk-JJOWY3XD.mjs → chunk-R5P4KFPM.mjs} +1 -1
- package/dist/{chunk-IWJKJDNW.mjs → chunk-S5ZA2T2W.mjs} +35 -28
- package/dist/{chunk-PXEXOQ5R.mjs → chunk-SHS6KXOZ.mjs} +1 -1
- package/dist/{chunk-ETF5C6HR.cjs → chunk-SJ23LJ3N.cjs} +3 -3
- package/dist/{chunk-KZH6YLND.cjs → chunk-SO3T6T4I.cjs} +427 -351
- package/dist/{chunk-JHXJBNLY.cjs → chunk-SUCDVKUB.cjs} +21 -1
- package/dist/{chunk-7ONZDKVY.mjs → chunk-T4EW7AAD.mjs} +2 -2
- package/dist/{chunk-UY6HS5PF.cjs → chunk-USL2ANCB.cjs} +8 -8
- package/dist/{chunk-4T25YCZ5.cjs → chunk-VIFPE5RG.cjs} +14 -14
- package/dist/{chunk-HYN3LLG7.cjs → chunk-VO6NLTV4.cjs} +3 -3
- package/dist/{chunk-XN2MB4QZ.cjs → chunk-VQJYGZNX.cjs} +4 -4
- package/dist/{chunk-5PKDHKQP.cjs → chunk-WFVSAT7Y.cjs} +6 -4
- package/dist/{chunk-X3HOVNHI.mjs → chunk-WSY2JD7O.mjs} +6 -6
- package/dist/{chunk-SHJJM6OG.mjs → chunk-WVX3BUNJ.mjs} +1 -1
- package/dist/chunk-X3EFRVXY.mjs +12 -0
- package/dist/{chunk-UCQ52TJY.mjs → chunk-X3JNB2TB.mjs} +1 -1
- package/dist/{chunk-RHOR2J6V.cjs → chunk-X5BCMLGP.cjs} +1 -1
- package/dist/{chunk-IQXGHGZF.cjs → chunk-XB24LZWI.cjs} +5 -5
- package/dist/{chunk-BNMHXVLL.mjs → chunk-XMHERKSE.mjs} +0 -15
- package/dist/{chunk-CGCJ2TJU.cjs → chunk-XPMC4E2G.cjs} +3 -3
- package/dist/{chunk-HWCHIBJZ.mjs → chunk-XWC5NAHV.mjs} +4 -4
- package/dist/{chunk-C7425KDG.cjs → chunk-XYL4HSVC.cjs} +2 -2
- package/dist/{chunk-2SVJGOAX.mjs → chunk-Y3N5BFRJ.mjs} +3 -3
- package/dist/{chunk-IUBDMDZZ.cjs → chunk-Y7TLL65B.cjs} +4 -4
- package/dist/{chunk-M7LKA632.mjs → chunk-YLNBWUVS.mjs} +1 -1
- package/dist/chunk-Z5A6CNV2.mjs +60 -0
- package/dist/chunk-Z64V4WZI.mjs +17 -0
- package/dist/{chunk-2VCC3GVC.mjs → chunk-ZF3GX4O7.mjs} +1 -1
- package/dist/{client-plugins-BPfltM5m.d.ts → client-plugins-CFBEfVPO.d.ts} +20 -3
- package/dist/{client-plugins-D4RO59f0.d.mts → client-plugins-cqy_dQd0.d.mts} +20 -3
- package/dist/client-plugins.d.mts +1 -1
- package/dist/client-plugins.d.ts +1 -1
- package/dist/client.cjs +5 -4
- package/dist/client.d.mts +6 -6
- package/dist/client.d.ts +6 -6
- package/dist/client.mjs +4 -3
- package/dist/config.d.mts +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/cron.cjs +4 -4
- package/dist/cron.mjs +3 -3
- package/dist/desktop.d.mts +2 -2
- package/dist/desktop.d.ts +2 -2
- package/dist/{devtools-STG7HPRV.mjs → devtools-4MLL3RAL.mjs} +6 -6
- package/dist/{devtools-N5XTOECL.cjs → devtools-4ZLMD454.cjs} +8 -8
- package/dist/docs.cjs +10 -10
- package/dist/docs.d.mts +2 -2
- package/dist/docs.d.ts +2 -2
- package/dist/docs.mjs +9 -9
- package/dist/{index-k8o8eUOd.d.mts → index-BYkNbeQV.d.mts} +1 -1
- package/dist/{index-C-N3Pwg-.d.ts → index-BxjN_UDZ.d.ts} +1 -1
- package/dist/index.cjs +42 -40
- package/dist/index.d.mts +16 -16
- package/dist/index.d.ts +16 -16
- package/dist/index.mjs +41 -39
- package/dist/integrations.d.mts +1 -1
- package/dist/integrations.d.ts +1 -1
- package/dist/internal/app-markdown-runtime.d.mts +2 -2
- package/dist/internal/app-markdown-runtime.d.ts +2 -2
- package/dist/internal/build-runtime.cjs +32 -31
- package/dist/internal/build-runtime.d.mts +3 -3
- package/dist/internal/build-runtime.d.ts +3 -3
- package/dist/internal/build-runtime.mjs +31 -30
- package/dist/internal/cli-runtime.cjs +15 -15
- package/dist/internal/cli-runtime.mjs +14 -14
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/client-runtime.cjs +4 -2
- package/dist/internal/client-runtime.d.mts +5 -5
- package/dist/internal/client-runtime.d.ts +5 -5
- package/dist/internal/client-runtime.mjs +3 -1
- package/dist/internal/compression-runtime.d.mts +1 -1
- package/dist/internal/compression-runtime.d.ts +1 -1
- package/dist/internal/config-runtime.cjs +8 -8
- package/dist/internal/config-runtime.d.mts +3 -3
- package/dist/internal/config-runtime.d.ts +3 -3
- package/dist/internal/config-runtime.mjs +7 -7
- package/dist/internal/form-actions.cjs +4 -3
- package/dist/internal/form-actions.mjs +3 -2
- package/dist/internal/infra-analytics-runtime.cjs +5 -5
- package/dist/internal/infra-analytics-runtime.mjs +3 -3
- package/dist/internal/islands-runtime.cjs +56 -0
- package/dist/internal/islands-runtime.mjs +57 -1
- package/dist/internal/product-telemetry-runtime.cjs +2 -2
- package/dist/internal/product-telemetry-runtime.mjs +1 -1
- package/dist/internal/production-runtime.cjs +11 -8
- package/dist/internal/production-runtime.d.mts +24 -11
- package/dist/internal/production-runtime.d.ts +24 -11
- package/dist/internal/production-runtime.mjs +10 -7
- package/dist/internal/server-fn-transform.cjs +13 -0
- package/dist/internal/server-fn-transform.d.mts +24 -0
- package/dist/internal/server-fn-transform.d.ts +24 -0
- package/dist/internal/server-fn-transform.mjs +13 -0
- package/dist/markdown.d.mts +1 -1
- package/dist/markdown.d.ts +1 -1
- package/dist/middleware.cjs +7 -7
- package/dist/middleware.d.mts +3 -3
- package/dist/middleware.d.ts +3 -3
- package/dist/middleware.mjs +6 -6
- package/dist/mobile.d.mts +30 -3
- package/dist/mobile.d.ts +30 -3
- package/dist/{navigation-delegate-8xg3Zvp4.d.ts → navigation-delegate-BU4xqdnw.d.ts} +1 -1
- package/dist/{navigation-delegate-ji6elCKy.d.mts → navigation-delegate-DLhbfEN4.d.mts} +1 -1
- package/dist/navigation.d.mts +4 -4
- package/dist/navigation.d.ts +4 -4
- package/dist/{nitro-YPSZBYDK.cjs → nitro-CK7M4RMY.cjs} +11 -11
- package/dist/{nitro-2Q5NVY7L.mjs → nitro-R444AF3O.mjs} +7 -7
- package/dist/plugin.cjs +25 -23
- package/dist/plugin.d.mts +3 -3
- package/dist/plugin.d.ts +3 -3
- package/dist/plugin.mjs +24 -22
- package/dist/{production-runtime-TdKaYRj0.d.ts → production-runtime-C78A8YgK.d.ts} +1 -1
- package/dist/{production-runtime-DXnQQkQf.d.mts → production-runtime-DLA4J5WG.d.mts} +1 -1
- package/dist/{programmatic-routes-client-BwiTndEC.d.ts → programmatic-routes-client-CBqkNhBy.d.ts} +2 -2
- package/dist/{programmatic-routes-client-Dh1SDLSM.d.mts → programmatic-routes-client-NpqGBn-i.d.mts} +2 -2
- package/dist/{render-plan-BvCGXF6K.d.mts → render-plan-C9sWvDTv.d.mts} +1 -1
- package/dist/{render-plan-BPbwRbuN.d.ts → render-plan-CrqcBbnV.d.ts} +1 -1
- package/dist/renderer-client.cjs +8 -6
- package/dist/renderer-client.d.mts +4 -4
- package/dist/renderer-client.d.ts +4 -4
- package/dist/renderer-client.mjs +4 -2
- package/dist/{request-B8PGTZNR.d.ts → request-BizeuqD7.d.ts} +1 -1
- package/dist/{request-C_xTkJib.d.mts → request-WwB1-Uim.d.mts} +1 -1
- package/dist/request.d.mts +2 -2
- package/dist/request.d.ts +2 -2
- package/dist/{route-rendering-RNtcj607.d.ts → route-rendering-BGhJN64l.d.ts} +1 -1
- package/dist/{route-rendering-DlddURL1.d.mts → route-rendering-S6NFjnx4.d.mts} +1 -1
- package/dist/{router-B97eB0Mq.d.mts → router-BIheIy9G.d.mts} +1 -1
- package/dist/{router-qUVaoEN8.d.ts → router-BUD_j2EL.d.ts} +1 -1
- package/dist/routes.cjs +3 -2
- package/dist/routes.d.mts +2 -2
- package/dist/routes.d.ts +2 -2
- package/dist/routes.mjs +2 -1
- package/dist/{rsc-pipeline-L4XOZ2TE.cjs → rsc-pipeline-JRGUZBYM.cjs} +11 -11
- package/dist/{rsc-pipeline-T3775JUA.mjs → rsc-pipeline-OLAVIKI3.mjs} +10 -10
- package/dist/{runtime-C8GUnNeP.d.ts → runtime-CWP-21hP.d.ts} +1 -1
- package/dist/{runtime-CaDswfWi.d.mts → runtime-CgJwe6H_.d.mts} +1 -1
- package/dist/{runtime-BIBGJO7V.cjs → runtime-G23RSLEK.cjs} +14 -14
- package/dist/{runtime-HRSFC4ZC.mjs → runtime-OGCHDACZ.mjs} +12 -12
- package/dist/{schema-dev-notice-LZ5NXGLN.mjs → schema-dev-notice-F6QYSOAI.mjs} +2 -2
- package/dist/{schema-dev-notice-XV7GZ3QJ.cjs → schema-dev-notice-UU7DMZEU.cjs} +3 -3
- package/dist/{search-client-BTXL5XWD.mjs → search-client-OXH6GBNO.mjs} +5 -3
- package/dist/search-client-ZZLKVO5R.cjs +15 -0
- package/dist/server-action-security.cjs +2 -2
- package/dist/server-action-security.mjs +1 -1
- package/dist/server-fn.cjs +3 -3
- package/dist/server-fn.mjs +2 -2
- package/dist/server-plugins.d.mts +2 -2
- package/dist/server-plugins.d.ts +2 -2
- package/dist/server-query-client.cjs +4 -3
- package/dist/server-query-client.mjs +3 -2
- package/dist/server-query.cjs +4 -4
- package/dist/server-query.mjs +3 -3
- package/dist/server.cjs +57 -55
- package/dist/server.d.mts +9 -9
- package/dist/server.d.ts +9 -9
- package/dist/server.mjs +34 -32
- package/dist/{spa-router-Dlv5ofg0.d.mts → spa-router-CVOL0Vrq.d.mts} +2 -2
- package/dist/{spa-router-qapSboKz.d.ts → spa-router-Kytv4jSB.d.ts} +2 -2
- package/dist/testing.cjs +12 -11
- package/dist/testing.d.mts +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/testing.mjs +9 -8
- package/dist/{utils-A-cYF81u.d.ts → utils-DbyXlzaj.d.ts} +1 -1
- package/dist/{utils-DyvlSxFk.d.mts → utils-Dsa1HZ7X.d.mts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +25 -23
- package/dist/vite.d.mts +4 -4
- package/dist/vite.d.ts +4 -4
- package/dist/vite.mjs +24 -22
- package/dist/workflows.cjs +4 -4
- package/dist/workflows.mjs +3 -3
- package/package.json +8 -3
- package/dist/base-path-leyrqXbX.d.mts +0 -19
- package/dist/base-path-leyrqXbX.d.ts +0 -19
- package/dist/chunk-OTOOJIUB.mjs +0 -34
- package/dist/search-client-QCYAL6AY.cjs +0 -13
|
@@ -3,6 +3,11 @@ import {
|
|
|
3
3
|
farmDesktopDevGuardPlugin,
|
|
4
4
|
isFarmReactRefreshActive
|
|
5
5
|
} from "./chunk-75WWOZ5C.mjs";
|
|
6
|
+
import {
|
|
7
|
+
createFarmServerFnBoundaryModule,
|
|
8
|
+
isFarmServerFnBoundaryId,
|
|
9
|
+
transformFarmServerFns
|
|
10
|
+
} from "./chunk-GNZIAJGB.mjs";
|
|
6
11
|
import {
|
|
7
12
|
createFarmImageHandler
|
|
8
13
|
} from "./chunk-ANHZ6SUL.mjs";
|
|
@@ -32,20 +37,20 @@ import {
|
|
|
32
37
|
resolveFarmIsolatedClientHydrationMode,
|
|
33
38
|
resolveModuleSourcePath,
|
|
34
39
|
stripUseClientDirective
|
|
35
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-S5ZA2T2W.mjs";
|
|
36
41
|
import {
|
|
37
42
|
loadTailwindVitePlugin
|
|
38
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-PIHKO25G.mjs";
|
|
39
44
|
import {
|
|
40
45
|
FARM_NODE_RESPONSE_END_PENDING
|
|
41
46
|
} from "./chunk-GHNW564E.mjs";
|
|
42
|
-
import {
|
|
43
|
-
generateFarmTypeArtifacts,
|
|
44
|
-
resolveRouteRenderingConfig
|
|
45
|
-
} from "./chunk-SHJJM6OG.mjs";
|
|
46
47
|
import {
|
|
47
48
|
resolveFarmPlatform
|
|
48
49
|
} from "./chunk-SMUW7UST.mjs";
|
|
50
|
+
import {
|
|
51
|
+
generateFarmTypeArtifacts,
|
|
52
|
+
resolveRouteRenderingConfig
|
|
53
|
+
} from "./chunk-WVX3BUNJ.mjs";
|
|
49
54
|
import {
|
|
50
55
|
createFarmRouteRenderPlan,
|
|
51
56
|
farmPathGuardCoversEndpoint,
|
|
@@ -56,7 +61,7 @@ import {
|
|
|
56
61
|
parseFarmLayoutChainHeader,
|
|
57
62
|
renderFarmLocaleAlternateLinks,
|
|
58
63
|
stripRouteGroups
|
|
59
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-7UPCJDB5.mjs";
|
|
60
65
|
import {
|
|
61
66
|
isFarmPreviewDeploymentEnvironment
|
|
62
67
|
} from "./chunk-CSLUBKGG.mjs";
|
|
@@ -74,7 +79,7 @@ import {
|
|
|
74
79
|
resolveFarmMCPRouteLabel,
|
|
75
80
|
resolveFarmMarkdownRouteLabel,
|
|
76
81
|
setFarmRouteLabel
|
|
77
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-R5P4KFPM.mjs";
|
|
78
83
|
import {
|
|
79
84
|
FARM_DEFAULT_MCP_PATH
|
|
80
85
|
} from "./chunk-KRRZJ77U.mjs";
|
|
@@ -159,7 +164,7 @@ import {
|
|
|
159
164
|
} from "./chunk-HHFMECFO.mjs";
|
|
160
165
|
import {
|
|
161
166
|
MiddlewareManager
|
|
162
|
-
} from "./chunk-
|
|
167
|
+
} from "./chunk-WSY2JD7O.mjs";
|
|
163
168
|
import {
|
|
164
169
|
_runWithMiddlewareContext,
|
|
165
170
|
_runWithMiddlewareData
|
|
@@ -175,7 +180,7 @@ import {
|
|
|
175
180
|
} from "./chunk-IYEY3JWJ.mjs";
|
|
176
181
|
import {
|
|
177
182
|
APIRouteManager
|
|
178
|
-
} from "./chunk-
|
|
183
|
+
} from "./chunk-KY32FWK7.mjs";
|
|
179
184
|
import {
|
|
180
185
|
getFarmI18nClientSnapshot
|
|
181
186
|
} from "./chunk-CV6MFQ4Y.mjs";
|
|
@@ -210,10 +215,11 @@ import {
|
|
|
210
215
|
logger,
|
|
211
216
|
toPosixPath,
|
|
212
217
|
toViteModuleId
|
|
213
|
-
} from "./chunk-
|
|
218
|
+
} from "./chunk-Y3N5BFRJ.mjs";
|
|
214
219
|
import {
|
|
220
|
+
createFarmSearchParams,
|
|
215
221
|
searchParamsToObject
|
|
216
|
-
} from "./chunk-
|
|
222
|
+
} from "./chunk-H3ASZDT7.mjs";
|
|
217
223
|
import {
|
|
218
224
|
emitFarmEvent,
|
|
219
225
|
runWithFarmRequestSpan
|
|
@@ -234,7 +240,7 @@ import {
|
|
|
234
240
|
} from "./chunk-LM2YOGDK.mjs";
|
|
235
241
|
import {
|
|
236
242
|
FARM_VERSION
|
|
237
|
-
} from "./chunk-
|
|
243
|
+
} from "./chunk-ZF3GX4O7.mjs";
|
|
238
244
|
import {
|
|
239
245
|
DEFAULT_FARM_API_BASE_PATH
|
|
240
246
|
} from "./chunk-BLD5GVCG.mjs";
|
|
@@ -745,7 +751,7 @@ function loadFarmDocsDevRuntime() {
|
|
|
745
751
|
return import("./docs.mjs");
|
|
746
752
|
}
|
|
747
753
|
function loadFarmDocsSearchDevRuntime() {
|
|
748
|
-
return import("./search-client-
|
|
754
|
+
return import("./search-client-OXH6GBNO.mjs");
|
|
749
755
|
}
|
|
750
756
|
function loadFarmOpenAPIDevRuntime() {
|
|
751
757
|
return import("./manager-H5ZM3HAM.mjs");
|
|
@@ -754,7 +760,7 @@ function loadFarmWorkflowsDevRuntime() {
|
|
|
754
760
|
return import("./workflows.mjs");
|
|
755
761
|
}
|
|
756
762
|
function loadFarmDevtoolsSnapshotRuntime() {
|
|
757
|
-
return import("./devtools-
|
|
763
|
+
return import("./devtools-4MLL3RAL.mjs");
|
|
758
764
|
}
|
|
759
765
|
function loadFarmDevtoolsUIRuntime() {
|
|
760
766
|
return import("./devtools-ui-CYBVFLPH.mjs");
|
|
@@ -1375,6 +1381,10 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
1375
1381
|
});
|
|
1376
1382
|
let farmApp;
|
|
1377
1383
|
let serverFnTransformActive = false;
|
|
1384
|
+
const islandsServerFns = () => {
|
|
1385
|
+
const config = farmApp?.getConfig() ?? options;
|
|
1386
|
+
return config.experimental?.serverActions === true && resolveFarmServerComponentsMode(config.experimental?.serverComponents) === "islands";
|
|
1387
|
+
};
|
|
1378
1388
|
let reactRefreshActive = false;
|
|
1379
1389
|
let server;
|
|
1380
1390
|
let apiRouteManager;
|
|
@@ -1434,7 +1444,7 @@ function farmPlugin(options = {}, initialPluginManager) {
|
|
|
1434
1444
|
(plugin) => plugin.name === SERVER_FN_TRANSFORM_PLUGIN
|
|
1435
1445
|
);
|
|
1436
1446
|
reactRefreshActive = isFarmReactRefreshActive(config);
|
|
1437
|
-
if (options.experimental?.serverActions === true && !serverFnTransformActive) {
|
|
1447
|
+
if (options.experimental?.serverActions === true && !serverFnTransformActive && !islandsServerFns()) {
|
|
1438
1448
|
logger.warn(
|
|
1439
1449
|
"experimental.serverActions has no effect without @farm.js/plugin/rsc in the Vite plugins. Server functions stay server-only, and importing one from client code is a build error."
|
|
1440
1450
|
);
|
|
@@ -2543,9 +2553,12 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2543
2553
|
const pathname2 = resolveFarmRequestURL(req, {
|
|
2544
2554
|
trustProxy: currentServerConfig.trustProxy
|
|
2545
2555
|
}).pathname;
|
|
2556
|
+
const servesLocalApiRoute = hasMatchedApiRoute || Boolean(
|
|
2557
|
+
farmDocsAPIHandler && farmDocsDevRuntime?.isFarmDocsAPIRequest(requestPathname)
|
|
2558
|
+
);
|
|
2546
2559
|
try {
|
|
2547
2560
|
if (pm) {
|
|
2548
|
-
if (
|
|
2561
|
+
if (servesLocalApiRoute) {
|
|
2549
2562
|
await pm.runHookParallelFiltered(
|
|
2550
2563
|
"beforeRequest",
|
|
2551
2564
|
(plugin) => plugin.name !== FARM_CONFIG_REWRITES_PLUGIN_NAME,
|
|
@@ -2578,9 +2591,14 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2578
2591
|
return;
|
|
2579
2592
|
}
|
|
2580
2593
|
const apiHandler = apiRouteManager.getHandler({ throwOnError: true });
|
|
2581
|
-
const
|
|
2594
|
+
const routedPathname = resolveFarmRequestURL(req, {
|
|
2595
|
+
trustProxy: currentServerConfig.trustProxy
|
|
2596
|
+
}).pathname;
|
|
2597
|
+
const rewritten = routedPathname !== pathname2;
|
|
2598
|
+
const routedApiRoute = rewritten ? apiRouteManager.matchRoute(routedPathname) : matchedApiRoute || apiRouteManager.matchRoute(pathname2);
|
|
2599
|
+
const hasExplicitAPIRoute = Boolean(routedApiRoute);
|
|
2582
2600
|
if (apiHandler && hasExplicitAPIRoute) {
|
|
2583
|
-
const apiRoutePattern =
|
|
2601
|
+
const apiRoutePattern = routedApiRoute?.route.path || urlPath2;
|
|
2584
2602
|
emitFarmEvent({
|
|
2585
2603
|
type: "route.matched",
|
|
2586
2604
|
pathname: pathname2,
|
|
@@ -2872,7 +2890,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2872
2890
|
props: withFarmRouteContext(
|
|
2873
2891
|
{
|
|
2874
2892
|
params,
|
|
2875
|
-
searchParams:
|
|
2893
|
+
searchParams: createFarmSearchParams(searchParams),
|
|
2876
2894
|
path: targetUrl.pathname,
|
|
2877
2895
|
middleware: middlewareMap.size > 0 ? { data: middlewareMap } : void 0
|
|
2878
2896
|
},
|
|
@@ -2921,7 +2939,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
2921
2939
|
props: withFarmRouteContext(
|
|
2922
2940
|
{
|
|
2923
2941
|
params: slot.params,
|
|
2924
|
-
searchParams:
|
|
2942
|
+
searchParams: createFarmSearchParams(searchParams),
|
|
2925
2943
|
path: targetUrl.pathname
|
|
2926
2944
|
},
|
|
2927
2945
|
slotContext
|
|
@@ -3279,6 +3297,12 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
3279
3297
|
}
|
|
3280
3298
|
},
|
|
3281
3299
|
async load(id, loadOptions) {
|
|
3300
|
+
if (isFarmServerFnBoundaryId(id) && islandsServerFns()) {
|
|
3301
|
+
const file = id.split("?", 1)[0];
|
|
3302
|
+
this.addWatchFile(file);
|
|
3303
|
+
const source = await fs2.promises.readFile(file, "utf8");
|
|
3304
|
+
return createFarmServerFnBoundaryModule(source, file) ?? "export {};\n";
|
|
3305
|
+
}
|
|
3282
3306
|
if (typeof fontImports.load === "function") {
|
|
3283
3307
|
const fontModule = await fontImports.load.call(this, id);
|
|
3284
3308
|
if (fontModule) return fontModule;
|
|
@@ -3432,6 +3456,15 @@ export const manifest = getManifest();
|
|
|
3432
3456
|
},
|
|
3433
3457
|
async transform(code, id, transformOptions) {
|
|
3434
3458
|
const actionConfig = farmApp?.getConfig() ?? options;
|
|
3459
|
+
if (islandsServerFns() && !isFarmServerFnBoundaryId(id) && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
|
|
3460
|
+
const serverFns = transformFarmServerFns(code, id, {
|
|
3461
|
+
environment: transformOptions?.ssr === true ? "rsc" : "client"
|
|
3462
|
+
});
|
|
3463
|
+
if (serverFns) {
|
|
3464
|
+
if (!serverFns.code.includes("use server")) return { code: serverFns.code, map: null };
|
|
3465
|
+
code = serverFns.code;
|
|
3466
|
+
}
|
|
3467
|
+
}
|
|
3435
3468
|
if (resolveFarmServerComponentsMode(actionConfig.experimental?.serverComponents) === "islands" && code.includes("use server") && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
|
|
3436
3469
|
const file = id.split("?", 1)[0];
|
|
3437
3470
|
const actionModule = transformFarmFormActionModule({
|
|
@@ -3453,7 +3486,7 @@ export const manifest = getManifest();
|
|
|
3453
3486
|
}
|
|
3454
3487
|
if (!transformOptions?.ssr) {
|
|
3455
3488
|
const currentConfig = farmApp?.getConfig() ?? options;
|
|
3456
|
-
if (currentConfig.experimental?.serverActions !== true || !serverFnTransformActive) {
|
|
3489
|
+
if ((currentConfig.experimental?.serverActions !== true || !serverFnTransformActive) && !islandsServerFns()) {
|
|
3457
3490
|
const violation = findClientServerFnViolation(code, id);
|
|
3458
3491
|
if (violation) {
|
|
3459
3492
|
this.error(formatServerFnBoundaryError(violation, id));
|
|
@@ -3617,7 +3650,7 @@ if (import.meta.hot) {
|
|
|
3617
3650
|
const PageComponent = mod.default;
|
|
3618
3651
|
const pageProps = {
|
|
3619
3652
|
params: page.params,
|
|
3620
|
-
searchParams:
|
|
3653
|
+
searchParams: createFarmSearchParams({}),
|
|
3621
3654
|
path: page.urlPath
|
|
3622
3655
|
};
|
|
3623
3656
|
let pageElement = React.createElement(
|
|
@@ -4206,7 +4239,7 @@ async function parseRouteModuleProps(routeModule, input) {
|
|
|
4206
4239
|
...input.props,
|
|
4207
4240
|
params,
|
|
4208
4241
|
search,
|
|
4209
|
-
searchParams:
|
|
4242
|
+
searchParams: createFarmSearchParams(search)
|
|
4210
4243
|
};
|
|
4211
4244
|
}
|
|
4212
4245
|
function parseRouteModuleSchema(schema, value, label, routePath) {
|
|
@@ -4294,7 +4327,7 @@ ${isolatedHydrationImport}
|
|
|
4294
4327
|
import { installChunkErrorRecovery, SPARouter } from '@farm.js/core/client'
|
|
4295
4328
|
import { createClientPluginManager } from '@farm.js/core/plugin/client'
|
|
4296
4329
|
import { isFarmRouteActive } from '@farm.js/core/router'
|
|
4297
|
-
import { isFarmBlockedNavigationURL, replayFarmQueuedInteraction, scheduleFarmIslandHydration, searchParamsToObject, setFarmBasePath, setFarmTrailingSlashPreference, stripFarmBasePath } from '@farm.js/core/internal/client-runtime'
|
|
4330
|
+
import { isFarmBlockedNavigationURL, replayFarmQueuedInteraction, scheduleFarmIslandHydration, createFarmSearchParams, searchParamsToObject, setFarmBasePath, setFarmTrailingSlashPreference, stripFarmBasePath } from '@farm.js/core/internal/client-runtime'
|
|
4298
4331
|
import { reviveDeferredData } from '@farm.js/core/deferred'
|
|
4299
4332
|
import {
|
|
4300
4333
|
createFarmDeploymentMismatchError,
|
|
@@ -5119,7 +5152,7 @@ async function buildRouteComponentProps(pageModule, params, searchParams, path,
|
|
|
5119
5152
|
window.__FARM_PROPS__ = revivedProps;
|
|
5120
5153
|
return {
|
|
5121
5154
|
...revivedProps,
|
|
5122
|
-
searchParams:
|
|
5155
|
+
searchParams: createFarmSearchParams(revivedProps.search ?? revivedProps.searchParams ?? {}),
|
|
5123
5156
|
path: revivedProps.path || path,
|
|
5124
5157
|
};
|
|
5125
5158
|
}
|
|
@@ -5128,7 +5161,7 @@ async function buildRouteComponentProps(pageModule, params, searchParams, path,
|
|
|
5128
5161
|
const rawProps = {
|
|
5129
5162
|
...(existingProps || {}),
|
|
5130
5163
|
params,
|
|
5131
|
-
searchParams:
|
|
5164
|
+
searchParams: createFarmSearchParams(searchParams),
|
|
5132
5165
|
path,
|
|
5133
5166
|
};
|
|
5134
5167
|
// Keep top-level route errors inside the router's navigation transaction.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkDZZHTMWMcjs = require('./chunk-DZZHTMWM.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _chunkOOJBBHYWcjs = require('./chunk-OOJBBHYW.cjs');
|
|
@@ -1307,6 +1307,13 @@ function highlightCodeBlock(code) {
|
|
|
1307
1307
|
function renderCodeCopyButton(className = "code-copy") {
|
|
1308
1308
|
return `<button class="${className}" type="button" data-code-copy data-copied="false" aria-label="Copy code" title="Copy code"><svg class="code-copy-icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></svg><svg class="code-copy-check" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M20 6 9 17l-5-5"></path></svg></button>`;
|
|
1309
1309
|
}
|
|
1310
|
+
var SCRIPT_URL_SCHEME = /^(?:javascript|vbscript|data):/i;
|
|
1311
|
+
function isScriptUrl(href) {
|
|
1312
|
+
const url = href.replace(/[\t\n\r]/g, "");
|
|
1313
|
+
let start = 0;
|
|
1314
|
+
while (start < url.length && url.charCodeAt(start) <= 32) start++;
|
|
1315
|
+
return SCRIPT_URL_SCHEME.test(url.slice(start));
|
|
1316
|
+
}
|
|
1310
1317
|
function renderMarkdownDocument(body, depth) {
|
|
1311
1318
|
const slug = createSlugger();
|
|
1312
1319
|
const renderer = new (0, _marked.Renderer)();
|
|
@@ -1342,6 +1349,7 @@ function renderMarkdownDocument(body, depth) {
|
|
|
1342
1349
|
`;
|
|
1343
1350
|
renderer.codespan = (code) => `<code>${escapeHtml(code)}</code>`;
|
|
1344
1351
|
renderer.link = (href, title, text) => {
|
|
1352
|
+
if (href && isScriptUrl(href)) return text;
|
|
1345
1353
|
const safeHref = href || "";
|
|
1346
1354
|
const titleAttribute = title ? ` title="${escapeAttribute(title)}"` : "";
|
|
1347
1355
|
return `<a href="${escapeAttribute(safeHref)}"${titleAttribute}>${text}</a>`;
|
|
@@ -1686,7 +1694,7 @@ function renderDocsSearchMount(clientEntry) {
|
|
|
1686
1694
|
${_chunk6JHZPB52cjs.stampFarmCspNonce.call(void 0, `<script type="module" src="${escapeAttribute(clientEntry)}"></script>`)}`;
|
|
1687
1695
|
}
|
|
1688
1696
|
function renderDocsSearchBootstrapScript() {
|
|
1689
|
-
return _chunk6JHZPB52cjs.stampFarmCspNonce.call(void 0, `<script>${
|
|
1697
|
+
return _chunk6JHZPB52cjs.stampFarmCspNonce.call(void 0, `<script>${_chunkDZZHTMWMcjs.generateFarmDocsSearchBootstrapRuntime.call(void 0, )}</script>`);
|
|
1690
1698
|
}
|
|
1691
1699
|
function renderPixelToc(items) {
|
|
1692
1700
|
if (items.length === 0) return '<p class="toc-empty">No sections</p>';
|
|
@@ -1742,7 +1750,7 @@ function renderPixelDocsHtml(page, pages, docs, clientEntry, faviconHref, reques
|
|
|
1742
1750
|
const renderedMarkdown = renderMarkdownDocument(page.body, getThemeTocDepth(docs));
|
|
1743
1751
|
const tocItems = renderedMarkdown.tocItems;
|
|
1744
1752
|
const themeName = getThemeName(docs);
|
|
1745
|
-
const searchEnabled =
|
|
1753
|
+
const searchEnabled = _chunkDZZHTMWMcjs.isFarmDocsSearchEnabled.call(void 0, docs);
|
|
1746
1754
|
const socialMetadata = isFarmDocsSocialImageEnabled(page, docs) ? renderFarmDocsSocialMetadata(
|
|
1747
1755
|
createFarmDocsSocialImageDescriptor(page, docs, requestUrl),
|
|
1748
1756
|
getFarmDocsCustomSocialImage(page)
|
|
@@ -23,7 +23,7 @@ var _chunkLIFUPCXWcjs = require('./chunk-LIFUPCXW.cjs');
|
|
|
23
23
|
var _chunkB5BBTPJQcjs = require('./chunk-B5BBTPJQ.cjs');
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _chunkX5BCMLGPcjs = require('./chunk-X5BCMLGP.cjs');
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
var _chunkD22BUQKWcjs = require('./chunk-D22BUQKW.cjs');
|
|
@@ -282,7 +282,7 @@ function createFarmAppManifest(input) {
|
|
|
282
282
|
return {
|
|
283
283
|
schemaVersion: 1,
|
|
284
284
|
app: app ? {
|
|
285
|
-
...app.version ? { farm:
|
|
285
|
+
...app.version ? { farm: _chunkX5BCMLGPcjs.FARM_VERSION } : {},
|
|
286
286
|
...app.renderer ? { renderer: input.renderer } : {},
|
|
287
287
|
basePath: input.basePath,
|
|
288
288
|
...app.build ? { build: input.build } : {}
|
|
@@ -56,13 +56,13 @@ import {
|
|
|
56
56
|
} from "./chunk-VFXE6NWR.mjs";
|
|
57
57
|
import {
|
|
58
58
|
resolveWorkflowsConfig
|
|
59
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-LZ4SB57H.mjs";
|
|
60
60
|
import {
|
|
61
61
|
resolveCronConfig
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-X3JNB2TB.mjs";
|
|
63
63
|
import {
|
|
64
64
|
resolveServerActionsConfig
|
|
65
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-FSQMN2MQ.mjs";
|
|
66
66
|
import {
|
|
67
67
|
resolveFarmThemeConfig
|
|
68
68
|
} from "./chunk-YWPNIYUP.mjs";
|
|
@@ -80,7 +80,7 @@ import {
|
|
|
80
80
|
} from "./chunk-MU5V7XHL.mjs";
|
|
81
81
|
import {
|
|
82
82
|
logger
|
|
83
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-Y3N5BFRJ.mjs";
|
|
84
84
|
import {
|
|
85
85
|
resolveFarmServerConfig
|
|
86
86
|
} from "./chunk-GFT5AHAT.mjs";
|
|
@@ -1086,16 +1086,20 @@ import { forwardRef, useEffect, useRef as useRef3, useCallback as useCallback3 }
|
|
|
1086
1086
|
// src/provider.tsx
|
|
1087
1087
|
import { createContext, useContext } from "react";
|
|
1088
1088
|
import { jsx } from "react/jsx-runtime";
|
|
1089
|
-
var
|
|
1089
|
+
var farmContext;
|
|
1090
|
+
function getFarmContext() {
|
|
1091
|
+
return farmContext ?? (farmContext = createContext(null));
|
|
1092
|
+
}
|
|
1090
1093
|
function FarmProvider({ children, config }) {
|
|
1091
1094
|
const value = {
|
|
1092
1095
|
config,
|
|
1093
1096
|
basePath: normalizeFarmBasePath(config.basePath)
|
|
1094
1097
|
};
|
|
1098
|
+
const FarmContext = getFarmContext();
|
|
1095
1099
|
return /* @__PURE__ */ jsx(FarmContext.Provider, { value, children });
|
|
1096
1100
|
}
|
|
1097
1101
|
function useOptionalFarm() {
|
|
1098
|
-
return useContext(
|
|
1102
|
+
return useContext(getFarmContext());
|
|
1099
1103
|
}
|
|
1100
1104
|
|
|
1101
1105
|
// src/client/link.tsx
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkNWUHS6GVcjs = require('./chunk-NWUHS6GV.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkSBDWCDS6cjs = require('./chunk-SBDWCDS6.cjs');
|
|
@@ -36,7 +36,7 @@ var _chunkSNP33A33cjs = require('./chunk-SNP33A33.cjs');
|
|
|
36
36
|
var _chunkJYNNIGQOcjs = require('./chunk-JYNNIGQO.cjs');
|
|
37
37
|
|
|
38
38
|
|
|
39
|
-
var
|
|
39
|
+
var _chunkVQJYGZNXcjs = require('./chunk-VQJYGZNX.cjs');
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
|
|
@@ -111,9 +111,9 @@ var APIRouteManager = class {
|
|
|
111
111
|
throw error;
|
|
112
112
|
}
|
|
113
113
|
if (process.env.FARM_VERBOSE) {
|
|
114
|
-
|
|
114
|
+
_chunkVQJYGZNXcjs.logger.success(`Discovered ${this.routes.size} API routes`);
|
|
115
115
|
for (const [routePath, route] of this.routes) {
|
|
116
|
-
|
|
116
|
+
_chunkVQJYGZNXcjs.logger.info(` ${route.methods.join(", ")} ${routePath}`);
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
}
|
|
@@ -217,7 +217,7 @@ var APIRouteManager = class {
|
|
|
217
217
|
async loadProgrammaticApiRoutes(appDir) {
|
|
218
218
|
const candidateRoots = [path.dirname(appDir), appDir];
|
|
219
219
|
const routeFiles = Array.from(
|
|
220
|
-
new Set(candidateRoots.flatMap((srcRoot) =>
|
|
220
|
+
new Set(candidateRoots.flatMap((srcRoot) => _chunkNWUHS6GVcjs.findProgrammaticRouteFilesInDir.call(void 0, srcRoot)))
|
|
221
221
|
);
|
|
222
222
|
if (routeFiles.length === 0) return;
|
|
223
223
|
const { getProgrammaticRouteManifest } = await import("./routes.cjs");
|
|
@@ -238,7 +238,7 @@ var APIRouteManager = class {
|
|
|
238
238
|
}
|
|
239
239
|
handleLoadError(message, loadError) {
|
|
240
240
|
const error = _chunkKORZ6PREcjs.explainMissingOptionalPeer.call(void 0, loadError, message.replace(/^Error loading /, ""));
|
|
241
|
-
|
|
241
|
+
_chunkVQJYGZNXcjs.logger.error(`${message}: ${error}`);
|
|
242
242
|
if (this.throwOnLoadError || error instanceof APIRouteConflictError || error instanceof _chunkYTVSWXEZcjs.AmbiguousRouteError || error instanceof _chunkYTVSWXEZcjs.NonTerminalCatchAllRouteError) {
|
|
243
243
|
throw error;
|
|
244
244
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
findProgrammaticRouteFilesInDir
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-FSXSQQTV.mjs";
|
|
4
4
|
import {
|
|
5
5
|
isFarmAPIRouteFileName
|
|
6
6
|
} from "./chunk-YX6AFPXC.mjs";
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
} from "./chunk-TUOO6IK3.mjs";
|
|
37
37
|
import {
|
|
38
38
|
logger
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-Y3N5BFRJ.mjs";
|
|
40
40
|
import {
|
|
41
41
|
AmbiguousRouteError,
|
|
42
42
|
NonTerminalCatchAllRouteError
|
|
@@ -1086,16 +1086,20 @@ function createStore(initialState, extend) {
|
|
|
1086
1086
|
// src/provider.tsx
|
|
1087
1087
|
|
|
1088
1088
|
var _jsxruntime = require('react/jsx-runtime');
|
|
1089
|
-
var
|
|
1089
|
+
var farmContext;
|
|
1090
|
+
function getFarmContext() {
|
|
1091
|
+
return _nullishCoalesce(farmContext, () => ( (farmContext = _react.createContext.call(void 0, null))));
|
|
1092
|
+
}
|
|
1090
1093
|
function FarmProvider({ children, config }) {
|
|
1091
1094
|
const value = {
|
|
1092
1095
|
config,
|
|
1093
1096
|
basePath: _chunkD22BUQKWcjs.normalizeFarmBasePath.call(void 0, config.basePath)
|
|
1094
1097
|
};
|
|
1098
|
+
const FarmContext = getFarmContext();
|
|
1095
1099
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FarmContext.Provider, { value, children });
|
|
1096
1100
|
}
|
|
1097
1101
|
function useOptionalFarm() {
|
|
1098
|
-
return _react.useContext.call(void 0,
|
|
1102
|
+
return _react.useContext.call(void 0, getFarmContext());
|
|
1099
1103
|
}
|
|
1100
1104
|
|
|
1101
1105
|
// src/client/link.tsx
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
var _chunkKORZ6PREcjs = require('./chunk-KORZ6PRE.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkVQJYGZNXcjs = require('./chunk-VQJYGZNX.cjs');
|
|
8
8
|
|
|
9
9
|
// src/build/tailwind.ts
|
|
10
10
|
var _path = require('path'); var _path2 = _interopRequireDefault(_path);
|
|
@@ -63,11 +63,11 @@ async function loadTailwindVitePlugin(options = {}, importTailwind = () => impor
|
|
|
63
63
|
try {
|
|
64
64
|
const tailwindVite = (await importTailwind()).default;
|
|
65
65
|
const plugin = options.builder ? adaptTailwindVitePlugin(tailwindVite(), options.builder) : tailwindVite();
|
|
66
|
-
if (options.announce)
|
|
66
|
+
if (options.announce) _chunkVQJYGZNXcjs.logger.info("\u{1F4E6} Enabled built-in Tailwind support (@tailwindcss/vite)");
|
|
67
67
|
return plugin;
|
|
68
68
|
} catch (error) {
|
|
69
69
|
if (_chunkKORZ6PREcjs.isMissingPackageError.call(void 0, error, "@tailwindcss/vite")) return createMissingTailwindPlugin();
|
|
70
|
-
|
|
70
|
+
_chunkVQJYGZNXcjs.logger.warn(
|
|
71
71
|
`Tailwind plugin auto-enable failed${options.label ? ` ${options.label}` : ""}; continuing without it: ${error.message}`
|
|
72
72
|
);
|
|
73
73
|
return void 0;
|
|
@@ -87,7 +87,7 @@ function createMissingTailwindPlugin() {
|
|
|
87
87
|
}
|
|
88
88
|
warnedMissingTailwind = true;
|
|
89
89
|
const file = _path2.default.relative(root, id.split("?", 1)[0]).replace(/\\/g, "/");
|
|
90
|
-
|
|
90
|
+
_chunkVQJYGZNXcjs.logger.warn(
|
|
91
91
|
`${file} imports Tailwind CSS, but @tailwindcss/vite is not installed; continuing without Tailwind. ${TAILWIND_VITE_INSTALL_HINT}`
|
|
92
92
|
);
|
|
93
93
|
return null;
|
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
} from "./chunk-YP7YO3S3.mjs";
|
|
8
8
|
import {
|
|
9
9
|
toPosixPath
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-Y3N5BFRJ.mjs";
|
|
11
11
|
import {
|
|
12
12
|
searchParamsToObject
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-H3ASZDT7.mjs";
|
|
14
14
|
import {
|
|
15
15
|
createFarmRequestBodyErrorResponse,
|
|
16
16
|
readFarmRequestBody,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkUSL2ANCBcjs = require('./chunk-USL2ANCB.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunk5DX3O6TTcjs = require('./chunk-5DX3O6TT.cjs');
|
|
@@ -394,7 +394,7 @@ function farmMiddlewarePlugin(options = {}) {
|
|
|
394
394
|
mode: server.config.mode === "production" ? "production" : "development",
|
|
395
395
|
basePath: _nullishCoalesce(options.basePath, () => ( "/"))
|
|
396
396
|
});
|
|
397
|
-
manager = new (0,
|
|
397
|
+
manager = new (0, _chunkUSL2ANCBcjs.MiddlewareManager)(
|
|
398
398
|
getMiddlewareAppDirectory(server.config.root, srcDir),
|
|
399
399
|
server,
|
|
400
400
|
options.middleware,
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/client-revalidation.ts
|
|
2
|
+
function attachRevalidationListeners(refresh, options = {}) {
|
|
3
|
+
if (typeof window === "undefined") return () => {
|
|
4
|
+
};
|
|
5
|
+
const onFocus = options.refetchOnWindowFocus === false ? void 0 : refresh;
|
|
6
|
+
const onOnline = options.refetchOnReconnect === false ? void 0 : refresh;
|
|
7
|
+
if (onFocus) window.addEventListener("focus", onFocus);
|
|
8
|
+
if (onOnline) window.addEventListener("online", onOnline);
|
|
9
|
+
return () => {
|
|
10
|
+
if (onFocus) window.removeEventListener("focus", onFocus);
|
|
11
|
+
if (onOnline) window.removeEventListener("online", onOnline);
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
exports.attachRevalidationListeners = attachRevalidationListeners;
|
|
@@ -52,10 +52,11 @@ async function findProgrammaticRouteSourceFiles(srcRoot) {
|
|
|
52
52
|
return [];
|
|
53
53
|
}
|
|
54
54
|
try {
|
|
55
|
-
const glob = await import("
|
|
56
|
-
return await glob
|
|
55
|
+
const { glob } = await import("tinyglobby");
|
|
56
|
+
return await glob("**/*.{ts,tsx,js,jsx}", {
|
|
57
57
|
cwd: srcRoot,
|
|
58
58
|
absolute: true,
|
|
59
|
+
expandDirectories: false,
|
|
59
60
|
ignore: [
|
|
60
61
|
"**/*.d.ts",
|
|
61
62
|
"**/node_modules/**",
|