@farm.js/core 0.1.67 → 0.1.68
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/{agent-mcp.d-BFu9xHAi.d.ts → agent-mcp.d-Uh5xr7aX.d.ts} +1 -1
- package/dist/{agent-mcp.d-DWyWkTSy.d.mts → agent-mcp.d-wkVPK1GA.d.mts} +1 -1
- package/dist/agent-runtime.d.mts +5 -3
- package/dist/agent-runtime.d.ts +5 -3
- package/dist/{analyzer-TTIIXXMQ.mjs → analyzer-CQDU7E3Y.mjs} +2 -2
- package/dist/analyzer-PPAHM4AW.cjs +16 -0
- package/dist/api/node.d.mts +7 -5
- package/dist/api/node.d.ts +7 -5
- package/dist/api/route-manager.d.mts +7 -5
- package/dist/api/route-manager.d.ts +7 -5
- package/dist/api/runtime.d.mts +6 -4
- package/dist/api/runtime.d.ts +6 -4
- package/dist/api.d.mts +8 -6
- package/dist/api.d.ts +8 -6
- package/dist/{app-manifest.d-CwfhGrVR.d.ts → app-manifest.d-BT5i2F-o.d.ts} +1 -1
- package/dist/{app-manifest.d-CRmjN5j9.d.mts → app-manifest.d-Dd4q5CFx.d.mts} +1 -1
- package/dist/app-markdown.cjs +3 -3
- package/dist/app-markdown.d.mts +10 -10
- package/dist/app-markdown.d.ts +10 -10
- package/dist/app-markdown.mjs +2 -2
- package/dist/{app.d-BX9LVTiP.d.ts → app.d-BVOpL_f2.d.ts} +6 -6
- package/dist/{app.d-uBBUxwyV.d.mts → app.d-BhiDXex_.d.mts} +6 -6
- package/dist/{chunk-23PVOIPT.cjs → chunk-225APHKC.cjs} +3 -3
- package/dist/{chunk-4JX3M4C6.cjs → chunk-23VJEGKC.cjs} +2 -1
- package/dist/{chunk-Q37INCXG.cjs → chunk-3EEINK7G.cjs} +11 -2
- package/dist/{chunk-BRWIVOV4.cjs → chunk-3GNHJ3RN.cjs} +10 -8
- package/dist/{chunk-QJVW76JG.mjs → chunk-3Y52TWYU.mjs} +2 -2
- package/dist/{chunk-OB3IFUK6.cjs → chunk-437QZIC2.cjs} +4 -4
- package/dist/{chunk-WGHY3OL5.mjs → chunk-4UAQB5LB.mjs} +232 -49
- package/dist/{chunk-JWSI5WO4.mjs → chunk-4ZXKYCYK.mjs} +1 -1
- package/dist/{chunk-N35YPV4N.mjs → chunk-57QAQU4F.mjs} +9 -7
- package/dist/{chunk-AQDLVHNF.mjs → chunk-5FBZJJGA.mjs} +17 -0
- package/dist/{chunk-PL6RTBDE.cjs → chunk-5JKDFRTK.cjs} +2 -2
- package/dist/{chunk-CO3YMZFD.mjs → chunk-6OFOIMNS.mjs} +1 -1
- package/dist/{chunk-556H7JCE.cjs → chunk-7LK5CTUM.cjs} +14 -14
- package/dist/{chunk-E6CD45JK.mjs → chunk-A3T445WK.mjs} +19 -5
- package/dist/{chunk-DQJ2CIH7.cjs → chunk-ASYOWPSR.cjs} +2 -1
- package/dist/{chunk-QGJ4FI2G.mjs → chunk-C6HGUTXB.mjs} +113 -29
- package/dist/{chunk-IRA2CZAY.mjs → chunk-CRVSYDHV.mjs} +2 -2
- package/dist/{chunk-XNZWMXCF.mjs → chunk-DIXFKAPM.mjs} +183 -76
- package/dist/{chunk-QGQP6QKO.cjs → chunk-DWLNLU55.cjs} +2 -2
- package/dist/{chunk-52Y3C3HG.mjs → chunk-E7VF3LQ5.mjs} +3 -2
- package/dist/{chunk-N5DQMOAG.cjs → chunk-F36LS2C7.cjs} +273 -90
- package/dist/{chunk-H37MDCPR.mjs → chunk-F6CMGWAL.mjs} +1 -1
- package/dist/{chunk-HNVAZGQD.cjs → chunk-FJMC24KG.cjs} +2 -2
- package/dist/{chunk-KCY52OUQ.cjs → chunk-FSODPZRT.cjs} +1 -1
- package/dist/{chunk-PPX7UOFY.cjs → chunk-FVYBEMOD.cjs} +55 -38
- package/dist/{chunk-6YBYX4K4.mjs → chunk-G7NBPP7H.mjs} +1 -1
- package/dist/{chunk-HFHJJXSV.mjs → chunk-GFPS7MNE.mjs} +1 -1
- package/dist/{chunk-3T5TLFCQ.mjs → chunk-HEJM46HQ.mjs} +11 -2
- package/dist/chunk-HHLEYA4B.cjs +17 -0
- package/dist/{chunk-F43OG25P.cjs → chunk-I7J5RLGO.cjs} +15 -1
- package/dist/chunk-ICFPTHXM.mjs +97 -0
- package/dist/{chunk-6V5YWI4W.cjs → chunk-IGDYL2IA.cjs} +2 -2
- package/dist/{chunk-TEG6HJVF.mjs → chunk-JL2YW5KX.mjs} +1 -0
- package/dist/{chunk-JVM3DKZE.mjs → chunk-KDO6T6OB.mjs} +1 -1
- package/dist/{chunk-QITSS4TD.cjs → chunk-KWCZKJYU.cjs} +352 -245
- package/dist/{chunk-DCXSIEFE.cjs → chunk-LDEXTX4I.cjs} +51 -37
- package/dist/{chunk-3T7ALZJF.cjs → chunk-LR4KP3I7.cjs} +2 -2
- package/dist/{chunk-VFXE6NWR.mjs → chunk-MGKWYPE3.mjs} +2 -1
- package/dist/{chunk-5TA63JD3.mjs → chunk-MGZVDX4R.mjs} +1 -1
- package/dist/{chunk-6SQZXRJ2.cjs → chunk-MMDKYJ5V.cjs} +7 -7
- package/dist/{chunk-HP2DQGQH.mjs → chunk-MNJDNTGO.mjs} +1 -1
- package/dist/{chunk-5Y2P454O.cjs → chunk-MTBDJ326.cjs} +6 -5
- package/dist/{chunk-XUES6OET.mjs → chunk-MV7NWU23.mjs} +1 -1
- package/dist/{chunk-4DRINDGN.cjs → chunk-MZ4CRSY7.cjs} +254 -125
- package/dist/{chunk-4IHMHFQB.cjs → chunk-NG2EZ6QS.cjs} +28 -1
- package/dist/{chunk-WDD5CTZW.mjs → chunk-NT4W4H52.mjs} +6 -6
- package/dist/{chunk-F7JKVHU2.mjs → chunk-NVOMQLI2.mjs} +15 -1
- package/dist/{chunk-22IWL4YD.cjs → chunk-OCNV4CI2.cjs} +21 -2
- package/dist/{chunk-72KCTHLV.cjs → chunk-PRL7FXG4.cjs} +113 -29
- package/dist/{chunk-YVTS3S3F.cjs → chunk-QOGIZKSO.cjs} +3 -3
- package/dist/{chunk-DB2HSHQA.cjs → chunk-QSUYB3RH.cjs} +14 -14
- package/dist/chunk-QYNZ3CTI.mjs +17 -0
- package/dist/{chunk-724MGMIL.mjs → chunk-R2ZHU37O.mjs} +19 -0
- package/dist/{chunk-YQYTQJZN.mjs → chunk-RLH5AH2M.mjs} +1 -1
- package/dist/{chunk-HM7AGSKU.cjs → chunk-SQ6IWJ3H.cjs} +1 -1
- package/dist/{chunk-V5MQMQ2P.mjs → chunk-T5XFZQCL.mjs} +1 -1
- package/dist/{chunk-Q5UX55YA.cjs → chunk-TNK2TVRS.cjs} +831 -470
- package/dist/{chunk-J7JHVCWA.cjs → chunk-UKZ6AWKZ.cjs} +2 -1
- package/dist/{chunk-V5RTHYJB.cjs → chunk-URN7VFO7.cjs} +91 -22
- package/dist/{chunk-HRPTMX5C.mjs → chunk-VFNAK6A5.mjs} +2 -2
- package/dist/{chunk-VK54PDQ6.mjs → chunk-VRGY3X2I.mjs} +86 -17
- package/dist/chunk-W44X6IC2.cjs +97 -0
- package/dist/{chunk-GTV2ABO7.mjs → chunk-WPB67LE5.mjs} +162 -33
- package/dist/{chunk-UHE5JUKB.mjs → chunk-XCAQTCGK.mjs} +1 -1
- package/dist/{chunk-DGOFR7D5.cjs → chunk-Y6KHPJDB.cjs} +2 -2
- package/dist/{chunk-LPIZMU7D.cjs → chunk-YTNBCXCW.cjs} +4 -4
- package/dist/{chunk-KWFNUODD.mjs → chunk-YVPX5PI5.mjs} +1 -0
- package/dist/{chunk-6R53ZWX2.cjs → chunk-Z3PW3DIR.cjs} +3 -3
- package/dist/{chunk-UHNSY2PQ.mjs → chunk-Z6SOXHAD.mjs} +772 -411
- package/dist/{chunk-5FE5YT2N.mjs → chunk-ZZGQD3LL.mjs} +28 -1
- package/dist/{client-component.d-CDRvRmbU.d.mts → client-component.d-BvQOxSqh.d.mts} +2 -2
- package/dist/{client-component.d-DWRKyAp5.d.ts → client-component.d-DNVSLEPi.d.ts} +2 -2
- package/dist/{client-plugins.d-BNILjfX3.d.mts → client-plugins.d-CE1lVK2R.d.mts} +23 -234
- package/dist/{client-plugins.d-CrKZiNSN.d.ts → client-plugins.d-CNDqcAuf.d.ts} +23 -234
- package/dist/client-plugins.d.mts +5 -3
- package/dist/client-plugins.d.ts +5 -3
- package/dist/client.cjs +6 -6
- package/dist/client.d.mts +10 -8
- package/dist/client.d.ts +10 -8
- package/dist/client.mjs +5 -5
- package/dist/config.d.mts +5 -3
- package/dist/config.d.ts +5 -3
- package/dist/deployment.cjs +4 -2
- package/dist/deployment.d.mts +15 -1
- package/dist/deployment.d.ts +15 -1
- package/dist/deployment.mjs +3 -1
- package/dist/desktop.d.mts +6 -4
- package/dist/desktop.d.ts +6 -4
- package/dist/{devtools-UFQYT3VA.mjs → devtools-2A2GPC7B.mjs} +6 -6
- package/dist/{devtools-RZVT4JVN.cjs → devtools-R27T3BRY.cjs} +7 -7
- package/dist/docs.cjs +9 -9
- package/dist/docs.d.mts +6 -4
- package/dist/docs.d.ts +6 -4
- package/dist/docs.mjs +8 -8
- package/dist/environment/vite.cjs +5 -5
- package/dist/environment/vite.d.mts +1 -1
- package/dist/environment/vite.d.ts +1 -1
- package/dist/environment/vite.mjs +4 -4
- package/dist/{generate-route-types.d-BL2pq6xC.d.ts → generate-route-types.d-B76M5R11.d.ts} +1 -1
- package/dist/{generate-route-types.d-BoVDU8qX.d.mts → generate-route-types.d-CaGMIaNI.d.mts} +1 -1
- package/dist/index.cjs +41 -36
- package/dist/{index.d-Bdm6866n.d.mts → index.d-Bt3kl19W.d.mts} +1 -1
- package/dist/{index.d-Dey5T14f.d.ts → index.d-Cx_-DaKV.d.ts} +1 -1
- package/dist/index.d.mts +25 -22
- package/dist/index.d.ts +25 -22
- package/dist/index.mjs +43 -38
- package/dist/instrumentation.cjs +3 -3
- package/dist/instrumentation.mjs +2 -2
- package/dist/integrations/orm.d.mts +5 -3
- package/dist/integrations/orm.d.ts +5 -3
- package/dist/integrations.d.mts +5 -3
- package/dist/integrations.d.ts +5 -3
- package/dist/internal/app-markdown-runtime.cjs +2 -2
- package/dist/internal/app-markdown-runtime.d.mts +12 -5
- package/dist/internal/app-markdown-runtime.d.ts +12 -5
- package/dist/internal/app-markdown-runtime.mjs +1 -1
- package/dist/internal/build-runtime.cjs +33 -30
- package/dist/internal/build-runtime.d.mts +7 -5
- package/dist/internal/build-runtime.d.ts +7 -5
- package/dist/internal/build-runtime.mjs +32 -29
- package/dist/internal/cli-runtime.cjs +10 -10
- package/dist/internal/cli-runtime.mjs +9 -9
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/client-runtime.cjs +31 -36
- package/dist/internal/client-runtime.d.mts +8 -6
- package/dist/internal/client-runtime.d.ts +8 -6
- package/dist/internal/client-runtime.mjs +22 -27
- package/dist/internal/compression-runtime.d.mts +5 -3
- package/dist/internal/compression-runtime.d.ts +5 -3
- package/dist/internal/config-runtime.cjs +8 -8
- package/dist/internal/config-runtime.d.mts +9 -7
- package/dist/internal/config-runtime.d.ts +9 -7
- package/dist/internal/config-runtime.mjs +7 -7
- package/dist/internal/form-actions.cjs +7 -2
- package/dist/internal/form-actions.d.mts +10 -3
- package/dist/internal/form-actions.d.ts +10 -3
- package/dist/internal/form-actions.mjs +8 -3
- package/dist/internal/infra-analytics-runtime.cjs +6 -6
- package/dist/internal/infra-analytics-runtime.mjs +4 -4
- package/dist/internal/islands-boot.cjs +6 -1
- package/dist/internal/islands-boot.mjs +6 -1
- 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-node-env.cjs +4 -2
- package/dist/internal/production-node-env.d.mts +22 -1
- package/dist/internal/production-node-env.d.ts +22 -1
- package/dist/internal/production-node-env.mjs +3 -1
- package/dist/internal/production-runtime.cjs +13 -9
- package/dist/internal/production-runtime.d.mts +21 -16
- package/dist/internal/production-runtime.d.ts +21 -16
- package/dist/internal/production-runtime.mjs +13 -9
- package/dist/internal/server-tree.cjs +2 -2
- package/dist/internal/server-tree.d.mts +0 -5
- package/dist/internal/server-tree.d.ts +0 -5
- package/dist/internal/server-tree.mjs +1 -1
- package/dist/internal/vercel-edge-middleware.cjs +87 -0
- package/dist/internal/vercel-edge-middleware.d.mts +39 -0
- package/dist/internal/vercel-edge-middleware.d.ts +39 -0
- package/dist/internal/vercel-edge-middleware.mjs +87 -0
- package/dist/layers-7P4RLKVX.cjs +20 -0
- package/dist/{layers-T55SA47E.mjs → layers-XQ7VFMWO.mjs} +4 -2
- package/dist/{layers.d-CcS42OGR.d.mts → layers.d-CH0bC4QL.d.mts} +2 -1
- package/dist/{layers.d-CcS42OGR.d.ts → layers.d-CH0bC4QL.d.ts} +2 -1
- package/dist/markdown.d.mts +5 -3
- package/dist/markdown.d.ts +5 -3
- package/dist/middleware.cjs +4 -4
- package/dist/middleware.d.mts +8 -5
- package/dist/middleware.d.ts +8 -5
- package/dist/middleware.mjs +6 -6
- package/dist/mobile.d.mts +4 -4
- package/dist/mobile.d.ts +4 -4
- package/dist/{mount.d-BP0nLYQO.d.mts → mount.d-Bki4pOaJ.d.mts} +1 -1
- package/dist/{mount.d-CkiPky_F.d.ts → mount.d-DjR5aerM.d.ts} +1 -1
- package/dist/{navigation-delegate.d-DchcGzAQ.d.ts → navigation-delegate.d-CtghaSP3.d.ts} +1 -1
- package/dist/{navigation-delegate.d-CdBP-hkZ.d.mts → navigation-delegate.d-VDkziXTK.d.mts} +1 -1
- package/dist/navigation.cjs +5 -5
- package/dist/navigation.d.mts +8 -6
- package/dist/navigation.d.ts +8 -6
- package/dist/navigation.mjs +4 -4
- package/dist/{nitro-55YOZWRA.mjs → nitro-NSTXT7LB.mjs} +2 -2
- package/dist/{nitro-EEX2J3KB.cjs → nitro-Y3LGITW3.cjs} +4 -4
- package/dist/node-module-bundle-LIZ2KMVW.cjs +13 -0
- package/dist/node-module-bundle-VR6NV6AI.mjs +13 -0
- package/dist/plugin.cjs +20 -20
- package/dist/plugin.d.mts +7 -5
- package/dist/plugin.d.ts +7 -5
- package/dist/plugin.mjs +19 -19
- package/dist/{production-runtime.d-Dou_Htas.d.ts → production-runtime.d-BMyyLGBB.d.ts} +3 -57
- package/dist/{production-runtime.d-VwsBzIee.d.mts → production-runtime.d-DMZY3OgV.d.mts} +3 -57
- package/dist/query/client.cjs +6 -6
- package/dist/query/client.mjs +2 -2
- package/dist/{render-plan.d-LKymStDJ.d.mts → render-plan.d-BSwV8PE4.d.mts} +1 -1
- package/dist/{render-plan.d-D8UakAIk.d.ts → render-plan.d-i9sI4tc9.d.ts} +1 -1
- package/dist/renderer/react/server.cjs +2 -2
- package/dist/renderer/react/server.mjs +1 -1
- package/dist/renderer-client.cjs +5 -5
- package/dist/renderer-client.d.mts +8 -6
- package/dist/renderer-client.d.ts +8 -6
- package/dist/renderer-client.mjs +2 -2
- package/dist/renderer.d.mts +5 -0
- package/dist/renderer.d.ts +5 -0
- package/dist/{request.d-KG-4d2eG.d.mts → request.d-C24FNQ_7.d.mts} +1 -1
- package/dist/{request.d-B928QjWy.d.ts → request.d-Dgln8tuI.d.ts} +1 -1
- package/dist/request.d.mts +6 -4
- package/dist/request.d.ts +6 -4
- package/dist/{route-rendering.d-DoEe_w9t.d.ts → route-rendering.d-CUylZKJA.d.ts} +1 -1
- package/dist/{route-rendering.d-NIHQeb4m.d.mts → route-rendering.d-Ds0BfwQi.d.mts} +1 -1
- package/dist/{router.d-DYnRHQwz.d.ts → router.d-B56rMOFm.d.ts} +1 -1
- package/dist/{router.d-B8PkJSGp.d.mts → router.d-CFPcbqzc.d.mts} +1 -1
- package/dist/{routes.d-uUBZyWoK.d.ts → routes.d-9GFFNioh.d.ts} +1 -1
- package/dist/{routes.d-DgZ_jgGG.d.mts → routes.d-CrEy0lJS.d.mts} +1 -1
- package/dist/routes.d.mts +5 -3
- package/dist/routes.d.ts +5 -3
- package/dist/{rsc-pipeline-7K5H2RPH.cjs → rsc-pipeline-3T7V6OUT.cjs} +10 -9
- package/dist/{rsc-pipeline-4OJ5ZQNZ.mjs → rsc-pipeline-GA4AQWZI.mjs} +9 -8
- package/dist/{runtime-X52Q7JFR.cjs → runtime-REUTNTI5.cjs} +20 -20
- package/dist/{runtime-U7O3HZOZ.mjs → runtime-ZYCKKY7L.mjs} +12 -12
- package/dist/{runtime.d-BxQIzwfy.d.mts → runtime.d-DLRO-ExG.d.mts} +1 -1
- package/dist/{runtime.d-DP7mEkEF.d.ts → runtime.d-H7k9hOQE.d.ts} +1 -1
- package/dist/server-http.d-rAe7lAQc.d.mts +70 -0
- package/dist/server-http.d-rAe7lAQc.d.ts +70 -0
- package/dist/server-plugins.d.mts +6 -4
- package/dist/server-plugins.d.ts +6 -4
- package/dist/server.cjs +46 -44
- package/dist/server.d-C5FFrZAo.d.ts +57 -0
- package/dist/server.d-DgC8xew5.d.mts +57 -0
- package/dist/server.d.mts +13 -11
- package/dist/server.d.ts +13 -11
- package/dist/server.mjs +28 -26
- package/dist/{spa-router.d-DsFDHTsv.d.ts → spa-router.d-Dr7oanhl.d.ts} +2 -2
- package/dist/{spa-router.d-BgHPVMhz.d.mts → spa-router.d-g4CzhEH1.d.mts} +2 -2
- package/dist/testing.d.mts +5 -3
- package/dist/testing.d.ts +5 -3
- package/dist/types.d-xCIhyjOq.d.mts +233 -0
- package/dist/types.d-xCIhyjOq.d.ts +233 -0
- package/dist/{utils.d-zxAVcf_V.d.ts → utils.d-BxxyDEb8.d.ts} +1 -1
- package/dist/{utils.d-BKyKDBR1.d.mts → utils.d-HIla3pD_.d.mts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +20 -20
- package/dist/vite.d.mts +10 -8
- package/dist/vite.d.ts +10 -8
- package/dist/vite.mjs +19 -19
- package/dist/workflows.cjs +2 -2
- package/dist/workflows.d.mts +121 -1
- package/dist/workflows.d.ts +121 -1
- package/dist/workflows.mjs +1 -1
- package/package.json +7 -2
- package/dist/analyzer-KVZGVY5Q.cjs +0 -16
- package/dist/chunk-CLFEQGET.cjs +0 -60
- package/dist/chunk-MK5E44WP.mjs +0 -60
- package/dist/layers-DMRXRL7F.cjs +0 -18
- package/dist/node-module-bundle-7JHPPF6B.mjs +0 -11
- package/dist/node-module-bundle-YJGYBOGK.cjs +0 -11
- package/dist/workflows.d-CRMzQZ3k.d.mts +0 -188
- package/dist/workflows.d-CRMzQZ3k.d.ts +0 -188
|
@@ -8,7 +8,9 @@ import {
|
|
|
8
8
|
} from "./chunk-3TXKFRSO.mjs";
|
|
9
9
|
import {
|
|
10
10
|
FARM_LAYOUT_ELEMENT_CLIENT_SOURCE,
|
|
11
|
+
FARM_NAVIGATION_SCRIPT_SOURCE,
|
|
11
12
|
FARM_NAVIGATION_STREAM_READER_SOURCE,
|
|
13
|
+
FARM_REFRESH_FIELDS_SOURCE,
|
|
12
14
|
FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE,
|
|
13
15
|
FarmApp,
|
|
14
16
|
collectFarmWebMCPTools,
|
|
@@ -16,6 +18,7 @@ import {
|
|
|
16
18
|
createFarmClientOptimizeDepsEntries,
|
|
17
19
|
createFarmSourceAlias,
|
|
18
20
|
createFarmThemeCssPlugin,
|
|
21
|
+
exactIdPattern,
|
|
19
22
|
farmFontImportsPlugin,
|
|
20
23
|
generateClientCachePersistenceCode,
|
|
21
24
|
generateFarmIntegrationProviderClientCode,
|
|
@@ -27,7 +30,7 @@ import {
|
|
|
27
30
|
resolveFarmClientCacheAdapterEntry,
|
|
28
31
|
resolveFarmImageProviderForRuntime,
|
|
29
32
|
resolveFarmRouteRootStrategy
|
|
30
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-4UAQB5LB.mjs";
|
|
31
34
|
import {
|
|
32
35
|
generateFarmClientPluginEntryCode,
|
|
33
36
|
loadTailwindVitePlugin
|
|
@@ -35,13 +38,13 @@ import {
|
|
|
35
38
|
import {
|
|
36
39
|
FARM_NODE_RESPONSE_END_PENDING
|
|
37
40
|
} from "./chunk-KSZK34HU.mjs";
|
|
38
|
-
import {
|
|
39
|
-
generateFarmTypeArtifacts,
|
|
40
|
-
resolveRouteRenderingConfig
|
|
41
|
-
} from "./chunk-6YBYX4K4.mjs";
|
|
42
41
|
import {
|
|
43
42
|
resolveFarmPlatform
|
|
44
43
|
} from "./chunk-SMUW7UST.mjs";
|
|
44
|
+
import {
|
|
45
|
+
generateFarmTypeArtifacts,
|
|
46
|
+
resolveRouteRenderingConfig
|
|
47
|
+
} from "./chunk-G7NBPP7H.mjs";
|
|
45
48
|
import {
|
|
46
49
|
createFarmServerFnBoundaryModule,
|
|
47
50
|
isFarmServerFnBoundaryId,
|
|
@@ -75,19 +78,21 @@ import {
|
|
|
75
78
|
resolveFarmMCPRouteLabel,
|
|
76
79
|
resolveFarmMarkdownRouteLabel,
|
|
77
80
|
setFarmRouteLabel
|
|
78
|
-
} from "./chunk-
|
|
81
|
+
} from "./chunk-VFNAK6A5.mjs";
|
|
79
82
|
import {
|
|
80
83
|
FARM_DEFAULT_MCP_PATH
|
|
81
84
|
} from "./chunk-K6SXMVXO.mjs";
|
|
82
85
|
import {
|
|
83
86
|
isFarmPreviewDeploymentEnvironment
|
|
84
|
-
} from "./chunk-
|
|
87
|
+
} from "./chunk-T5XFZQCL.mjs";
|
|
85
88
|
import {
|
|
86
89
|
resolveFarmLayoutFonts
|
|
87
90
|
} from "./chunk-HZOMT5DY.mjs";
|
|
88
91
|
import {
|
|
92
|
+
FARM_BROWSER_BUILTIN_PREFIX,
|
|
89
93
|
FARM_CLIENT_REFERENCE_DIRECTORY,
|
|
90
94
|
FARM_CLIENT_REFERENCE_PRAGMA,
|
|
95
|
+
FARM_RESOLVE_FROM_PREFIX,
|
|
91
96
|
collectFarmServerBundledPackageInfo,
|
|
92
97
|
ensureFarmInternalClientReference,
|
|
93
98
|
ensureFarmPackageClientReference,
|
|
@@ -104,6 +109,7 @@ import {
|
|
|
104
109
|
isFarmPackageClientBoundary,
|
|
105
110
|
isIsolatableClientBoundarySource,
|
|
106
111
|
loadFarmBrowserBuiltin,
|
|
112
|
+
parseFarmResolveFrom,
|
|
107
113
|
programmaticClientRouteKey,
|
|
108
114
|
resolveFarmBrowserBuiltin,
|
|
109
115
|
resolveFarmIsolatedClientHydrationMode,
|
|
@@ -113,7 +119,7 @@ import {
|
|
|
113
119
|
rewriteFarmReactServerClientModuleImports,
|
|
114
120
|
rewriteFarmReactServerImports,
|
|
115
121
|
stripUseClientDirective
|
|
116
|
-
} from "./chunk-
|
|
122
|
+
} from "./chunk-WPB67LE5.mjs";
|
|
117
123
|
import {
|
|
118
124
|
generateFarmDocsAdapterClientRuntime,
|
|
119
125
|
getFarmDocsAdapterConfigModule
|
|
@@ -127,7 +133,7 @@ import {
|
|
|
127
133
|
} from "./chunk-TPA2PV5J.mjs";
|
|
128
134
|
import {
|
|
129
135
|
resolveRouteRuleCorsPreflightHeaders
|
|
130
|
-
} from "./chunk-
|
|
136
|
+
} from "./chunk-R2ZHU37O.mjs";
|
|
131
137
|
import {
|
|
132
138
|
FARM_DEVTOOLS_LAUNCH_PARAM,
|
|
133
139
|
FARM_DEVTOOLS_PATH,
|
|
@@ -148,7 +154,7 @@ import {
|
|
|
148
154
|
getFarmAppDirectories,
|
|
149
155
|
getFarmLayerAliases,
|
|
150
156
|
getFarmSourceRoots
|
|
151
|
-
} from "./chunk-
|
|
157
|
+
} from "./chunk-E7VF3LQ5.mjs";
|
|
152
158
|
import {
|
|
153
159
|
REACT_RENDERER,
|
|
154
160
|
getFarmRendererCapabilities,
|
|
@@ -170,7 +176,7 @@ import {
|
|
|
170
176
|
createFarmMarkdownSourceResponse,
|
|
171
177
|
isFarmMarkdownPageFile,
|
|
172
178
|
normalizeFarmMarkdownRoutePath
|
|
173
|
-
} from "./chunk-
|
|
179
|
+
} from "./chunk-HEJM46HQ.mjs";
|
|
174
180
|
import {
|
|
175
181
|
FARM_MARKDOWN_CONTENT_TYPE,
|
|
176
182
|
createFarmMarkdownErrorBody,
|
|
@@ -271,7 +277,7 @@ import {
|
|
|
271
277
|
} from "./chunk-2DA7CLY7.mjs";
|
|
272
278
|
import {
|
|
273
279
|
FARM_VERSION
|
|
274
|
-
} from "./chunk-
|
|
280
|
+
} from "./chunk-F6CMGWAL.mjs";
|
|
275
281
|
import {
|
|
276
282
|
DEFAULT_FARM_API_BASE_PATH
|
|
277
283
|
} from "./chunk-W6QLRQ3V.mjs";
|
|
@@ -289,7 +295,7 @@ import {
|
|
|
289
295
|
createFarmDeploymentMismatchResponse,
|
|
290
296
|
getFarmDeploymentMismatch,
|
|
291
297
|
withFarmDeploymentResponse
|
|
292
|
-
} from "./chunk-
|
|
298
|
+
} from "./chunk-NVOMQLI2.mjs";
|
|
293
299
|
import {
|
|
294
300
|
createDeferredDataResponse
|
|
295
301
|
} from "./chunk-7BIW7VCW.mjs";
|
|
@@ -335,8 +341,9 @@ function transformFarmFormActionModule(options) {
|
|
|
335
341
|
|
|
336
342
|
// src/vite.ts
|
|
337
343
|
import { parseSync } from "vite";
|
|
344
|
+
import { initSync as initModuleLexer, parse as lexModule } from "es-module-lexer";
|
|
338
345
|
import { AsyncLocalStorage } from "async_hooks";
|
|
339
|
-
import { isBuiltin } from "module";
|
|
346
|
+
import { builtinModules, isBuiltin } from "module";
|
|
340
347
|
|
|
341
348
|
// src/dev-preview-guard.ts
|
|
342
349
|
import { promises as fsp } from "fs";
|
|
@@ -453,8 +460,8 @@ async function realpathOr(directory) {
|
|
|
453
460
|
}
|
|
454
461
|
}
|
|
455
462
|
function isInside(directory, file) {
|
|
456
|
-
const
|
|
457
|
-
return
|
|
463
|
+
const relative4 = path2.relative(directory, file);
|
|
464
|
+
return relative4 !== "" && relative4 !== ".." && !relative4.startsWith(`..${path2.sep}`) && !path2.isAbsolute(relative4);
|
|
458
465
|
}
|
|
459
466
|
|
|
460
467
|
// src/server/dev-cors.ts
|
|
@@ -1060,7 +1067,7 @@ function loadFarmWorkflowsDevRuntime() {
|
|
|
1060
1067
|
return import("./workflows.mjs");
|
|
1061
1068
|
}
|
|
1062
1069
|
function loadFarmDevtoolsSnapshotRuntime() {
|
|
1063
|
-
return import("./devtools-
|
|
1070
|
+
return import("./devtools-2A2GPC7B.mjs");
|
|
1064
1071
|
}
|
|
1065
1072
|
function loadFarmDevtoolsUIRuntime() {
|
|
1066
1073
|
return import("./devtools-ui-CYBVFLPH.mjs");
|
|
@@ -1090,6 +1097,18 @@ var farmReactServerFiles = /* @__PURE__ */ new Set();
|
|
|
1090
1097
|
var FARM_SERVER_ONLY_PACKAGE_ID = "\0farm:server-only";
|
|
1091
1098
|
var FARM_PLATFORM_ENTRY = "@farm.js/core/platform";
|
|
1092
1099
|
var FARM_PLATFORM_CLIENT_ID = "\0farm:platform-client";
|
|
1100
|
+
var FARM_SERVER_ONLY_ENTRIES_RESOLVE_FILTER = [
|
|
1101
|
+
exactIdPattern([FARM_PLATFORM_ENTRY, SERVER_ONLY_PACKAGE, ...FARM_SERVER_ONLY_ENTRIES]),
|
|
1102
|
+
new RegExp(`^${FARM_RESOLVE_FROM_PREFIX}`),
|
|
1103
|
+
// What isBuiltin() accepts: `node:` ids and the builtin names, subpaths such as fs/promises
|
|
1104
|
+
// included.
|
|
1105
|
+
/^node:/,
|
|
1106
|
+
exactIdPattern(builtinModules)
|
|
1107
|
+
];
|
|
1108
|
+
var FARM_SERVER_ONLY_ENTRIES_LOAD_FILTER = [
|
|
1109
|
+
exactIdPattern([FARM_SERVER_ONLY_PACKAGE_ID, FARM_PLATFORM_CLIENT_ID]),
|
|
1110
|
+
new RegExp(`^${FARM_BROWSER_BUILTIN_PREFIX}`)
|
|
1111
|
+
];
|
|
1093
1112
|
function createFarmPlatformClientModule(platform) {
|
|
1094
1113
|
return `export function platform() { return ${JSON.stringify(platform)}; }
|
|
1095
1114
|
export function appDataDir() {
|
|
@@ -1135,40 +1154,59 @@ function farmServerOnlyEntriesPlugin(options = {}) {
|
|
|
1135
1154
|
configResolved(config) {
|
|
1136
1155
|
root = config.root;
|
|
1137
1156
|
},
|
|
1138
|
-
resolveId
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
if (options2?.ssr
|
|
1142
|
-
|
|
1157
|
+
resolveId: {
|
|
1158
|
+
filter: { id: FARM_SERVER_ONLY_ENTRIES_RESOLVE_FILTER },
|
|
1159
|
+
handler(id, importer, options2) {
|
|
1160
|
+
if (id === FARM_PLATFORM_ENTRY) return options2?.ssr ? null : FARM_PLATFORM_CLIENT_ID;
|
|
1161
|
+
if (id === SERVER_ONLY_PACKAGE) {
|
|
1162
|
+
if (options2?.ssr || options2?.scan) {
|
|
1163
|
+
return FARM_SERVER_ONLY_PACKAGE_ID;
|
|
1164
|
+
}
|
|
1165
|
+
this.error(
|
|
1166
|
+
`${importer ?? "A module"} imports "server-only", so it must not reach the browser, but client code imports it. Move what the client needs out of that module, or call it from a server component, server function or API route.`
|
|
1167
|
+
);
|
|
1143
1168
|
}
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
)
|
|
1169
|
+
if (!options2?.ssr && isBuiltin(id)) {
|
|
1170
|
+
return resolveFarmBrowserBuiltin(this, id, importer, options2);
|
|
1171
|
+
}
|
|
1172
|
+
const resolveFrom = importer ? parseFarmResolveFrom(id, importer.split("?", 1)[0]) : null;
|
|
1173
|
+
if (resolveFrom) {
|
|
1174
|
+
const directory = path6.dirname(resolveFrom.importer);
|
|
1175
|
+
return this.resolve(resolveFrom.specifier, resolveFrom.importer, {
|
|
1176
|
+
...options2,
|
|
1177
|
+
skipSelf: true
|
|
1178
|
+
}).then((resolved) => {
|
|
1179
|
+
if (resolved) return resolved;
|
|
1180
|
+
return this.error(
|
|
1181
|
+
`Could not resolve "${resolveFrom.specifier}" from ${directory}, the package whose server component renders it. Install it in that package, or run your package manager's install again.`
|
|
1182
|
+
);
|
|
1183
|
+
});
|
|
1184
|
+
}
|
|
1185
|
+
if (!FARM_SERVER_ONLY_ENTRIES.has(id)) return null;
|
|
1186
|
+
const importedBy = importer ? ` (imported by ${importer})` : "";
|
|
1187
|
+
if (!options2?.ssr) {
|
|
1188
|
+
this.error(
|
|
1189
|
+
`${id} is server-only and cannot be imported into client code${importedBy}. Use it from an API route or another server module.`
|
|
1190
|
+
);
|
|
1191
|
+
}
|
|
1192
|
+
vercelOgInstalled || (vercelOgInstalled = isOptionalPeerInstalled(root, "@vercel/og"));
|
|
1193
|
+
if (!vercelOgInstalled) {
|
|
1194
|
+
this.error(
|
|
1195
|
+
`${id} needs @vercel/og, which is not installed${importedBy}. ${VERCEL_OG_INSTALL_HINT}`
|
|
1196
|
+
);
|
|
1197
|
+
}
|
|
1198
|
+
return null;
|
|
1163
1199
|
}
|
|
1164
|
-
return null;
|
|
1165
1200
|
},
|
|
1166
|
-
load
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1201
|
+
load: {
|
|
1202
|
+
filter: { id: FARM_SERVER_ONLY_ENTRIES_LOAD_FILTER },
|
|
1203
|
+
handler(id) {
|
|
1204
|
+
if (id === FARM_SERVER_ONLY_PACKAGE_ID) return "export {};";
|
|
1205
|
+
if (id === FARM_PLATFORM_CLIENT_ID) {
|
|
1206
|
+
return createFarmPlatformClientModule(options.platform ?? resolveFarmPlatform());
|
|
1207
|
+
}
|
|
1208
|
+
return loadFarmBrowserBuiltin(id) ?? null;
|
|
1170
1209
|
}
|
|
1171
|
-
return loadFarmBrowserBuiltin(id) ?? null;
|
|
1172
1210
|
}
|
|
1173
1211
|
};
|
|
1174
1212
|
}
|
|
@@ -1681,25 +1719,57 @@ function fileContainsProgrammaticPageRoute(file) {
|
|
|
1681
1719
|
return false;
|
|
1682
1720
|
}
|
|
1683
1721
|
}
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
if (!
|
|
1722
|
+
var moduleLexerReady = false;
|
|
1723
|
+
function lexModuleSpecifiers(code) {
|
|
1724
|
+
if (!moduleLexerReady) {
|
|
1725
|
+
initModuleLexer();
|
|
1726
|
+
moduleLexerReady = true;
|
|
1727
|
+
}
|
|
1728
|
+
let imports;
|
|
1729
|
+
try {
|
|
1730
|
+
[imports] = lexModule(code);
|
|
1731
|
+
} catch {
|
|
1687
1732
|
return null;
|
|
1688
1733
|
}
|
|
1689
|
-
const
|
|
1734
|
+
const specifiers = [];
|
|
1735
|
+
for (const entry of imports) {
|
|
1736
|
+
if (entry.n === void 0 || entry.d === -2) continue;
|
|
1737
|
+
const start = entry.d === -1 ? entry.s - 1 : entry.s;
|
|
1738
|
+
const end = entry.d === -1 ? entry.e + 1 : entry.e;
|
|
1739
|
+
const quote = code[start];
|
|
1740
|
+
if (quote !== '"' && quote !== "'" || code[end - 1] !== quote) continue;
|
|
1741
|
+
specifiers.push({ value: entry.n, start, end });
|
|
1742
|
+
}
|
|
1743
|
+
return specifiers;
|
|
1744
|
+
}
|
|
1745
|
+
function parseModuleSpecifiers(options) {
|
|
1690
1746
|
let ast;
|
|
1691
1747
|
try {
|
|
1692
1748
|
ast = options.parse(options.code);
|
|
1693
1749
|
} catch {
|
|
1694
1750
|
return null;
|
|
1695
1751
|
}
|
|
1752
|
+
const specifiers = [];
|
|
1696
1753
|
walkModuleAst(ast, (node) => {
|
|
1697
1754
|
if (node.type !== "ImportDeclaration" && node.type !== "ExportNamedDeclaration" && node.type !== "ExportAllDeclaration" && node.type !== "ImportExpression") {
|
|
1698
1755
|
return;
|
|
1699
1756
|
}
|
|
1700
1757
|
const source = node.source;
|
|
1701
1758
|
if (!isFarmModuleAstNode(source) || typeof source.value !== "string") return;
|
|
1702
|
-
|
|
1759
|
+
specifiers.push({ value: source.value, start: source.start, end: source.end });
|
|
1760
|
+
});
|
|
1761
|
+
return specifiers;
|
|
1762
|
+
}
|
|
1763
|
+
function rewriteEarlySsrRelativeImports(options) {
|
|
1764
|
+
const cleanId = options.id.split("?", 1)[0];
|
|
1765
|
+
if (!path6.isAbsolute(cleanId) || cleanId.replace(/\\/g, "/").includes("/node_modules/")) {
|
|
1766
|
+
return null;
|
|
1767
|
+
}
|
|
1768
|
+
const sources = lexModuleSpecifiers(options.code) ?? parseModuleSpecifiers(options);
|
|
1769
|
+
if (!sources) return null;
|
|
1770
|
+
const replacements = [];
|
|
1771
|
+
for (const source of sources) {
|
|
1772
|
+
if (!source.value.startsWith(".")) continue;
|
|
1703
1773
|
const suffixIndex = source.value.search(/[?#]/);
|
|
1704
1774
|
const sourcePath = suffixIndex === -1 ? source.value : source.value.slice(0, suffixIndex);
|
|
1705
1775
|
const suffix = suffixIndex === -1 ? "" : source.value.slice(suffixIndex);
|
|
@@ -1711,13 +1781,15 @@ function rewriteEarlySsrRelativeImports(options) {
|
|
|
1711
1781
|
end: source.end,
|
|
1712
1782
|
code: JSON.stringify(`${specifier}${suffix}`)
|
|
1713
1783
|
});
|
|
1714
|
-
}
|
|
1784
|
+
}
|
|
1715
1785
|
if (replacements.length === 0) return null;
|
|
1716
|
-
let output =
|
|
1717
|
-
|
|
1718
|
-
|
|
1786
|
+
let output = "";
|
|
1787
|
+
let copied = 0;
|
|
1788
|
+
for (const replacement of replacements.sort((left, right) => left.start - right.start)) {
|
|
1789
|
+
output += options.code.slice(copied, replacement.start) + replacement.code;
|
|
1790
|
+
copied = replacement.end;
|
|
1719
1791
|
}
|
|
1720
|
-
return output;
|
|
1792
|
+
return output + options.code.slice(copied);
|
|
1721
1793
|
}
|
|
1722
1794
|
function transformIsolatedClientBoundaryModule(options) {
|
|
1723
1795
|
if (options.slots) {
|
|
@@ -1837,8 +1909,13 @@ function transformIsolatedClientBoundaryModule(options) {
|
|
|
1837
1909
|
for (const replacement of replacements.sort((left, right) => right.start - left.start)) {
|
|
1838
1910
|
output = output.slice(0, replacement.start) + replacement.code + output.slice(replacement.end);
|
|
1839
1911
|
}
|
|
1840
|
-
const
|
|
1841
|
-
import {
|
|
1912
|
+
const isComponent = `(value) => typeof value === "function" || (typeof value === "object" && value !== null && [Symbol.for("react.memo"), Symbol.for("react.forward_ref"), Symbol.for("react.lazy")].includes(value.$$typeof))`;
|
|
1913
|
+
const runtimeImport = options.slots ? options.browser ? "const __farm_islx_island__ = (component) => component;" : `import { createIsland as __farm_islx_create_island__ } from "@farm.js/core/internal/islx-react";
|
|
1914
|
+
const __farm_is_component__ = ${isComponent};
|
|
1915
|
+
const __farm_islx_island__ = (component, ...rest) => __farm_is_component__(component) ? __farm_islx_create_island__(component, ...rest) : component;` : `import * as __farm_isolated_react__ from "react";
|
|
1916
|
+
import { createFarmIsolatedClientBoundary as __farm_create_boundary__ } from "@farm.js/core/internal/isolated-boundary";
|
|
1917
|
+
const __farm_is_component__ = ${isComponent};
|
|
1918
|
+
const __farm_create_isolated_boundary__ = (react, component, ...rest) => __farm_is_component__(component) ? __farm_create_boundary__(react, component, ...rest) : component;`;
|
|
1842
1919
|
return `${runtimeImport}
|
|
1843
1920
|
${output}
|
|
1844
1921
|
${wrapperStatements.join("\n")}
|
|
@@ -1869,8 +1946,8 @@ function isFarmModuleAstNode(value) {
|
|
|
1869
1946
|
function isFarmConfigFile(file, root) {
|
|
1870
1947
|
const normalized = file.replace(/\\/g, "/");
|
|
1871
1948
|
const rootSlug = root.replace(/\\/g, "/").replace(/\/+$/, "");
|
|
1872
|
-
const
|
|
1873
|
-
return FARM_CONFIG_FILENAMES.has(
|
|
1949
|
+
const relative4 = normalized.startsWith(`${rootSlug}/`) ? normalized.slice(rootSlug.length + 1) : normalized;
|
|
1950
|
+
return FARM_CONFIG_FILENAMES.has(relative4);
|
|
1874
1951
|
}
|
|
1875
1952
|
var warnedClientBoundaryIds = /* @__PURE__ */ new Set();
|
|
1876
1953
|
function warnClientBoundaryOnce(context, id, code, config) {
|
|
@@ -4184,6 +4261,16 @@ window.__FARM_MANIFEST__ = ${inlineValue({
|
|
|
4184
4261
|
};
|
|
4185
4262
|
},
|
|
4186
4263
|
async resolveId(id, importer, resolveOptions) {
|
|
4264
|
+
if (id.startsWith("@farm.js/core/internal/") && importer) {
|
|
4265
|
+
const root = farmApp?.getConfig().root || server?.config.root || options.root;
|
|
4266
|
+
const relative4 = root ? path6.relative(root, importer.split("?", 1)[0]) : "";
|
|
4267
|
+
if (root && (relative4.startsWith("..") || path6.isAbsolute(relative4))) {
|
|
4268
|
+
return this.resolve(id, path6.join(root, "package.json"), {
|
|
4269
|
+
...resolveOptions,
|
|
4270
|
+
skipSelf: true
|
|
4271
|
+
});
|
|
4272
|
+
}
|
|
4273
|
+
}
|
|
4187
4274
|
if (typeof fontImports.resolveId === "function") {
|
|
4188
4275
|
const fontId = await fontImports.resolveId.call(this, id, importer, resolveOptions);
|
|
4189
4276
|
if (fontId) return fontId;
|
|
@@ -4390,7 +4477,7 @@ export const manifest = getManifest();
|
|
|
4390
4477
|
const reactServer = !serverModule ? null : rewriteFarmReactServerImports({
|
|
4391
4478
|
code,
|
|
4392
4479
|
file,
|
|
4393
|
-
reference: (specifier, exportName) => ensureFarmPackageClientReference(projectRoot, specifier, exportName),
|
|
4480
|
+
reference: (specifier, exportName) => ensureFarmPackageClientReference(projectRoot, specifier, exportName, file),
|
|
4394
4481
|
onServerFile: (serverFile) => farmReactServerFiles.add(serverFile)
|
|
4395
4482
|
});
|
|
4396
4483
|
if (reactServer !== null) {
|
|
@@ -4766,6 +4853,7 @@ if (import.meta.hot) {
|
|
|
4766
4853
|
const planRouteManager = farmApp?.getRouteManager();
|
|
4767
4854
|
const isHydrationPlanSource = currentSrcRoot !== null && normalizedFile.startsWith(`${currentSrcRoot}/`) && /\.[cm]?[jt]sx?$/.test(normalizedFile);
|
|
4768
4855
|
const tracksAsyncOwnerIslands = isReactRenderer(currentFarmConfig?.renderer) && planRouteManager !== void 0;
|
|
4856
|
+
let clientPlanCurrent = false;
|
|
4769
4857
|
if (isHydrationPlanSource && (isolatedHydrationMode === "enabled" || isolatedHydrationMode === "analyze" || tracksAsyncOwnerIslands)) {
|
|
4770
4858
|
const routeManager = planRouteManager;
|
|
4771
4859
|
if (routeManager) {
|
|
@@ -4800,6 +4888,7 @@ if (import.meta.hot) {
|
|
|
4800
4888
|
server2.ws.send({ type: "full-reload", path: "*" });
|
|
4801
4889
|
return [];
|
|
4802
4890
|
}
|
|
4891
|
+
clientPlanCurrent = true;
|
|
4803
4892
|
} catch (error) {
|
|
4804
4893
|
logger.warn(
|
|
4805
4894
|
`[Farm.js] Could not refresh the client hydration plan after ${file}: ${error instanceof Error ? error.message : String(error)}`
|
|
@@ -4825,7 +4914,7 @@ if (import.meta.hot) {
|
|
|
4825
4914
|
}
|
|
4826
4915
|
return [];
|
|
4827
4916
|
}
|
|
4828
|
-
farmApp?.getRouteManager().invalidateClientManifest();
|
|
4917
|
+
if (!clientPlanCurrent) farmApp?.getRouteManager().invalidateClientManifest();
|
|
4829
4918
|
const manifestModule = server2.moduleGraph.getModuleById("/@farm/manifest");
|
|
4830
4919
|
if (manifestModule) {
|
|
4831
4920
|
server2.moduleGraph.invalidateModule(manifestModule);
|
|
@@ -6508,14 +6597,11 @@ function readActiveLayoutPatterns() {
|
|
|
6508
6597
|
.filter(Boolean);
|
|
6509
6598
|
}
|
|
6510
6599
|
|
|
6600
|
+
${FARM_NAVIGATION_SCRIPT_SOURCE}
|
|
6601
|
+
|
|
6511
6602
|
function activateFragmentScripts(root) {
|
|
6512
6603
|
for (const script of Array.from(root.querySelectorAll?.('script') || [])) {
|
|
6513
|
-
|
|
6514
|
-
for (const attribute of Array.from(script.attributes)) {
|
|
6515
|
-
freshScript.setAttribute(attribute.name, attribute.value);
|
|
6516
|
-
}
|
|
6517
|
-
freshScript.textContent = script.textContent || '';
|
|
6518
|
-
script.replaceWith(freshScript);
|
|
6604
|
+
script.replaceWith(createFarmNavigationScript(script));
|
|
6519
6605
|
}
|
|
6520
6606
|
}
|
|
6521
6607
|
|
|
@@ -6556,7 +6642,13 @@ function getLayoutShell(root, patterns, index, find) {
|
|
|
6556
6642
|
: shell.querySelector('#__farm_page__');
|
|
6557
6643
|
inner?.replaceChildren();
|
|
6558
6644
|
removeSuspenseContent(shell);
|
|
6559
|
-
|
|
6645
|
+
// Each island's props stay, without its id, so new props count as a change.
|
|
6646
|
+
shell.querySelectorAll('script').forEach((script) => {
|
|
6647
|
+
if (script.type !== 'f/props') return script.remove();
|
|
6648
|
+
Array.from(script.attributes).forEach((attribute) => {
|
|
6649
|
+
if (attribute.name !== 'type') script.removeAttribute(attribute.name);
|
|
6650
|
+
});
|
|
6651
|
+
});
|
|
6560
6652
|
shell.querySelectorAll('f-island').forEach((island) => {
|
|
6561
6653
|
island.replaceChildren();
|
|
6562
6654
|
Array.from(island.attributes).forEach((attribute) => island.removeAttribute(attribute.name));
|
|
@@ -6564,7 +6656,7 @@ function getLayoutShell(root, patterns, index, find) {
|
|
|
6564
6656
|
return shell.innerHTML;
|
|
6565
6657
|
}
|
|
6566
6658
|
|
|
6567
|
-
function replaceNavigationBoundary(
|
|
6659
|
+
${islandValues ? FARM_REFRESH_FIELDS_SOURCE : ""}function replaceNavigationBoundary(
|
|
6568
6660
|
container,
|
|
6569
6661
|
fragment,
|
|
6570
6662
|
currentPatterns,
|
|
@@ -6572,6 +6664,8 @@ function replaceNavigationBoundary(
|
|
|
6572
6664
|
refresh = false,
|
|
6573
6665
|
find = findLayoutBoundary,
|
|
6574
6666
|
) {
|
|
6667
|
+
// A refresh keeps the islands still on the page: the ones in streamed Suspense content too.
|
|
6668
|
+
if (refresh) revealFarmStreamedContent(fragment);
|
|
6575
6669
|
let sharedCount = 0;
|
|
6576
6670
|
while (
|
|
6577
6671
|
sharedCount < currentPatterns.length &&
|
|
@@ -6601,11 +6695,13 @@ function replaceNavigationBoundary(
|
|
|
6601
6695
|
activateFragmentScripts(container);
|
|
6602
6696
|
return container;
|
|
6603
6697
|
}
|
|
6604
|
-
|
|
6698
|
+
${islandValues ? `
|
|
6699
|
+
// A refresh renders the same layouts again: their fields keep what was typed, and the focus.
|
|
6700
|
+
const fields = refresh ? captureFarmServerFields(currentTarget) : null;` : ""}
|
|
6605
6701
|
${isolatedHydrationEnabled ? `${islandValues ? `// A refresh keeps the islands still on the page, with their state and new props.
|
|
6606
6702
|
if (refresh) farmIsolatedHydrationRuntime.carryOver(currentTarget, nextTarget);
|
|
6607
6703
|
` : ""}disposeFarmIsolatedClientBoundaries(currentTarget);` : ""}
|
|
6608
|
-
currentTarget.replaceWith(nextTarget);
|
|
6704
|
+
currentTarget.replaceWith(nextTarget);${islandValues ? "\n if (fields) restoreFarmServerFields(fields, nextTarget);" : ""}
|
|
6609
6705
|
activateFragmentScripts(nextTarget);
|
|
6610
6706
|
if (fragmentTreeRoot && fragmentTreeRoot !== nextTarget) fragmentTreeRoot.remove();
|
|
6611
6707
|
|
|
@@ -6615,7 +6711,17 @@ function replaceNavigationBoundary(
|
|
|
6615
6711
|
const support = document.createElement('div');
|
|
6616
6712
|
support.hidden = true;
|
|
6617
6713
|
support.dataset.farmFragmentSupport = 'true';
|
|
6618
|
-
|
|
6714
|
+
while (fragment.firstChild) {
|
|
6715
|
+
const node = fragment.firstChild;
|
|
6716
|
+
// React's staged Suspense content stays in the root, where a later flush of a streamed
|
|
6717
|
+
// navigation reveals it; React removes it then.
|
|
6718
|
+
if (node.nodeType === 1 && node.matches('div[hidden][id^="S:"]')) {
|
|
6719
|
+
container.appendChild(node);
|
|
6720
|
+
activateFragmentScripts(node);
|
|
6721
|
+
} else {
|
|
6722
|
+
support.appendChild(node);
|
|
6723
|
+
}
|
|
6724
|
+
}
|
|
6619
6725
|
document.body.appendChild(support);
|
|
6620
6726
|
activateFragmentScripts(support);
|
|
6621
6727
|
setTimeout(() => support.remove(), 0);
|
|
@@ -6700,7 +6806,8 @@ async function fetchFarmNavigationDocument(path, context) {
|
|
|
6700
6806
|
redirect: 'manual',
|
|
6701
6807
|
headers: createFarmDeploymentRequestHeaders(deploymentId, {
|
|
6702
6808
|
Accept: 'text/html',
|
|
6703
|
-
|
|
6809
|
+
// A refresh arrives whole, like a transition: the islands it keeps are all in it.
|
|
6810
|
+
...(context.prefetch || context.refresh ? {} : { 'F-Stream': 'flush' }),
|
|
6704
6811
|
...getFarmIslandValueHeaders(),
|
|
6705
6812
|
// A prefetch names its layouts even when it keeps none: that marks it as a navigation,
|
|
6706
6813
|
// which the server answers without loading.tsx.
|
|
@@ -7320,7 +7427,7 @@ async function defineConfig(config = {}) {
|
|
|
7320
7427
|
const tailwindVitePlugin = await loadTailwindVitePlugin();
|
|
7321
7428
|
const appRoot = path6.resolve(config.root || process.cwd());
|
|
7322
7429
|
if (config.extends?.length) {
|
|
7323
|
-
const { config: layeredConfig } = await import("./layers-
|
|
7430
|
+
const { config: layeredConfig } = await import("./layers-XQ7VFMWO.mjs").then(
|
|
7324
7431
|
({ resolveFarmLayers }) => resolveFarmLayers(config, {
|
|
7325
7432
|
root: appRoot,
|
|
7326
7433
|
mode: process.env.NODE_ENV === "production" ? "production" : "development"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); 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 _chunkUKZ6AWKZcjs = require('./chunk-UKZ6AWKZ.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -54,7 +54,7 @@ function _applyFarmMobileShellClient(request, response, client, onPrivate) {
|
|
|
54
54
|
return _chunkA25FXJ7Dcjs._withFarmResponseHeaders.call(void 0, response, (headers2) => appendVary(headers2, FARM_SHELL_HEADER));
|
|
55
55
|
}
|
|
56
56
|
_optionalChain([onPrivate, 'optionalCall', _8 => _8()]);
|
|
57
|
-
const headers = new Headers(
|
|
57
|
+
const headers = new Headers(_chunkUKZ6AWKZcjs._withFarmGuardedResponseCache.call(void 0, response).headers);
|
|
58
58
|
appendVary(headers, FARM_SHELL_HEADER);
|
|
59
59
|
headers.delete("content-length");
|
|
60
60
|
headers.delete("etag");
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
bundleNodeModule,
|
|
3
3
|
isDeclarationFile,
|
|
4
4
|
resolvePackageWithoutTsconfig
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-MGKWYPE3.mjs";
|
|
6
6
|
|
|
7
7
|
// src/layers.ts
|
|
8
8
|
import { existsSync, readFileSync, realpathSync, statSync } from "fs";
|
|
@@ -417,5 +417,6 @@ export {
|
|
|
417
417
|
getFarmAppDirectories,
|
|
418
418
|
getFarmLayerAliases,
|
|
419
419
|
createFarmConfigResolutionPlugin,
|
|
420
|
-
loadFarmConfigFile
|
|
420
|
+
loadFarmConfigFile,
|
|
421
|
+
findFarmConfigFile
|
|
421
422
|
};
|