@farm.js/core 0.1.86 → 0.2.0-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/dist/{agent-mcp.d-7uKdOttc.d.ts → agent-mcp.d-BdM0pIrD.d.ts} +1 -1
- package/dist/{agent-mcp.d-LChlR2au.d.mts → agent-mcp.d-CMGqpUbk.d.mts} +1 -1
- package/dist/agent-runtime.d.mts +1 -1
- package/dist/agent-runtime.d.ts +1 -1
- package/dist/analyzer-B2TRJT3B.cjs +17 -0
- package/dist/{analyzer-I5S5YKHM.mjs → analyzer-PWHYGER6.mjs} +2 -2
- package/dist/api/node.d.mts +3 -3
- package/dist/api/node.d.ts +3 -3
- package/dist/api/route-manager.cjs +4 -4
- package/dist/api/route-manager.d.mts +3 -3
- package/dist/api/route-manager.d.ts +3 -3
- package/dist/api/route-manager.mjs +3 -3
- package/dist/api/runtime.d.mts +2 -2
- package/dist/api/runtime.d.ts +2 -2
- package/dist/api.cjs +5 -5
- package/dist/api.d.mts +4 -4
- package/dist/api.d.ts +4 -4
- package/dist/api.mjs +4 -4
- package/dist/{app-manifest.d-QMdmqqCr.d.mts → app-manifest.d-BeDB2OVm.d.mts} +1 -1
- package/dist/{app-manifest.d-CRp21oAz.d.ts → app-manifest.d-COhjPgHn.d.ts} +1 -1
- package/dist/app-markdown.d.mts +2 -2
- package/dist/app-markdown.d.ts +2 -2
- package/dist/{app.d-Bvpc2eJq.d.mts → app.d-AVZXCfcO.d.mts} +5 -4
- package/dist/{app.d-DEKpJEp4.d.ts → app.d-b3A4cca5.d.ts} +5 -4
- package/dist/{chunk-B7L24VPX.cjs → chunk-22KXTL3I.cjs} +6 -4
- package/dist/chunk-2HTNASSB.cjs +134 -0
- package/dist/{chunk-FULX5RYX.cjs → chunk-2OR5WAD5.cjs} +19 -13
- package/dist/{chunk-5P65LXGU.cjs → chunk-3MY6TNNE.cjs} +15 -14
- package/dist/{chunk-A4WWKG2B.cjs → chunk-5ZWXTIGE.cjs} +2 -2
- package/dist/{chunk-2NKNP4AH.cjs → chunk-6266WH6X.cjs} +1 -1
- package/dist/chunk-65LZRVCZ.mjs +18 -0
- package/dist/{chunk-L2IULWKV.cjs → chunk-7LBNWL3L.cjs} +3 -3
- package/dist/{chunk-KHIEGVG7.mjs → chunk-BGEA4K7C.mjs} +10 -4
- package/dist/{chunk-CVKTYG4L.mjs → chunk-BJHXFEAF.mjs} +2 -2
- package/dist/chunk-BQHIJOZM.cjs +13 -0
- package/dist/{chunk-IAERD73G.cjs → chunk-CFLRUCN7.cjs} +384 -339
- package/dist/{chunk-NXOZRI3B.cjs → chunk-CNGGEHXY.cjs} +2 -2
- package/dist/{chunk-3RVLJTFZ.mjs → chunk-D7LXBLUW.mjs} +1 -1
- package/dist/{chunk-B5QRNCIE.mjs → chunk-DATICPTO.mjs} +1 -1
- package/dist/{chunk-XMVZXZ32.cjs → chunk-ERV422FO.cjs} +2 -2
- package/dist/{chunk-BAD6T5NU.cjs → chunk-FEWCWBOF.cjs} +4 -4
- package/dist/{chunk-FLMALEY2.mjs → chunk-GGD57DJA.mjs} +3 -25
- package/dist/{chunk-HQ2VAJLW.mjs → chunk-GV5D5EM6.mjs} +1 -1
- package/dist/{chunk-6MZSTPD2.mjs → chunk-H47EH24T.mjs} +1 -1
- package/dist/{chunk-OBVBII5K.cjs → chunk-HU4R2PPW.cjs} +2 -2
- package/dist/{chunk-7H2TXT2K.mjs → chunk-HX5HLFBZ.mjs} +7 -0
- package/dist/{chunk-N3VMHPIY.mjs → chunk-HZY63K5C.mjs} +2 -2
- package/dist/{chunk-25JGHAGH.cjs → chunk-I2RBHZF7.cjs} +15 -8
- package/dist/{chunk-FDU4Q4QP.cjs → chunk-IRPXOTEN.cjs} +10 -4
- package/dist/{chunk-NAHDG6UX.mjs → chunk-JDO3X7RB.mjs} +6 -5
- package/dist/{chunk-TQJ35BBW.cjs → chunk-JGUMFTZT.cjs} +4 -4
- package/dist/chunk-JIGWHFA5.mjs +32 -0
- package/dist/{chunk-YBXIVQCE.cjs → chunk-JP5TWUK2.cjs} +4 -4
- package/dist/chunk-K6RMOB25.mjs +134 -0
- package/dist/{chunk-UGD53SNO.cjs → chunk-KQ6TYQU7.cjs} +16 -12
- package/dist/{chunk-6QYPP5KC.mjs → chunk-L6ZL35ZJ.mjs} +7 -5
- package/dist/{chunk-7UTRNV6R.mjs → chunk-LUGQUU4S.mjs} +1 -1
- package/dist/{chunk-QYWP5KDY.mjs → chunk-M4CNAZMS.mjs} +74 -29
- package/dist/{chunk-3TKGMIPX.mjs → chunk-MM4U2NNI.mjs} +91 -12
- package/dist/{chunk-CFKAYV7B.mjs → chunk-MRULVIH3.mjs} +1 -1
- package/dist/{chunk-UAQQUQWE.mjs → chunk-MZPPT5NA.mjs} +1 -1
- package/dist/{chunk-2UYYXSUS.mjs → chunk-N5NRXLCX.mjs} +4 -2
- package/dist/chunk-NDMPGFKL.cjs +47 -0
- package/dist/{chunk-YHM4PXJY.mjs → chunk-O5YM6GU3.mjs} +1 -1
- package/dist/{chunk-QYDGIXQ5.cjs → chunk-PA3VZNWU.cjs} +9 -9
- package/dist/{chunk-2PJVEL56.cjs → chunk-PCAEJNQF.cjs} +5 -27
- package/dist/{chunk-P253SZJF.cjs → chunk-PQ6DBVJ2.cjs} +360 -281
- package/dist/chunk-PTAGDZ7I.mjs +13 -0
- package/dist/{chunk-3AV4DCXY.mjs → chunk-PWTBXYJY.mjs} +12 -6
- package/dist/{chunk-PO5MZIWK.mjs → chunk-QBXS4TNG.mjs} +6 -2
- package/dist/chunk-QZUCVJZJ.cjs +18 -0
- package/dist/{chunk-45ANSCTO.mjs → chunk-SCOKBXHS.mjs} +98 -56
- package/dist/{chunk-BLZCAFGJ.cjs → chunk-SG5RFGV6.cjs} +2 -2
- package/dist/{chunk-U54REWMJ.cjs → chunk-SUACCCZG.cjs} +18 -16
- package/dist/chunk-TCGPBSVY.mjs +47 -0
- package/dist/{chunk-CN2JOTRO.cjs → chunk-THGSPDFD.cjs} +7 -7
- package/dist/{chunk-FWLXYNWA.cjs → chunk-TQFIZRON.cjs} +387 -345
- package/dist/{chunk-VGHDPEPQ.cjs → chunk-UA77C2ZA.cjs} +2 -2
- package/dist/{chunk-Q3YWQEUS.cjs → chunk-VMGQOP7X.cjs} +2 -2
- package/dist/{chunk-4SJ22WTT.mjs → chunk-W3ZBLFLU.mjs} +1 -1
- package/dist/{chunk-SB74WCKC.mjs → chunk-WOTAU3BN.mjs} +4 -4
- package/dist/{chunk-JB4BHRFK.cjs → chunk-WP77JDKI.cjs} +16 -16
- package/dist/{chunk-YMAE32O7.mjs → chunk-WPB6HJC7.mjs} +1 -1
- package/dist/{chunk-VPGEYX5Y.mjs → chunk-WX752VMN.mjs} +2 -2
- package/dist/{chunk-VTEAUQMT.mjs → chunk-X2SMVPLH.mjs} +19 -3
- package/dist/{chunk-DJ3PVHTW.cjs → chunk-XGPRM7OK.cjs} +3 -3
- package/dist/{chunk-GWPANDW3.mjs → chunk-XJJQAFZX.mjs} +1 -1
- package/dist/{chunk-UDWBTABT.cjs → chunk-XRYLMTYF.cjs} +3 -3
- package/dist/{chunk-PAENAKTC.mjs → chunk-YCHIR3X6.mjs} +1 -1
- package/dist/chunk-YIGUFJMR.cjs +32 -0
- package/dist/{chunk-CPSFDQKJ.cjs → chunk-Z43CIBUR.cjs} +20 -4
- package/dist/{chunk-RA5OUXOJ.mjs → chunk-ZOD6EYWE.mjs} +2 -2
- package/dist/{cli-runtime.d-DaElKjaL.d.ts → cli-runtime.d-jqZ7YCsm.d.ts} +5 -5
- package/dist/{cli-runtime.d-C7aMfoTq.d.mts → cli-runtime.d-qL44rqYO.d.mts} +5 -5
- package/dist/{client-component.d-miqIXyQv.d.mts → client-component.d-B2L2LyAr.d.mts} +1 -1
- package/dist/{client-component.d-CZG02pIh.d.ts → client-component.d-BDD5aiUb.d.ts} +1 -1
- package/dist/{client-plugins.d-BVXjyIkY.d.ts → client-plugins.d-Crct3m_r.d.ts} +14 -5
- package/dist/{client-plugins.d-BwKwuO_0.d.mts → client-plugins.d-Dzc3vOw_.d.mts} +14 -5
- package/dist/client-plugins.d.mts +1 -1
- package/dist/client-plugins.d.ts +1 -1
- package/dist/client.cjs +8 -6
- package/dist/client.d.mts +8 -7
- package/dist/client.d.ts +8 -7
- package/dist/client.mjs +7 -5
- package/dist/config.d.mts +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/desktop.d.mts +2 -2
- package/dist/desktop.d.ts +2 -2
- package/dist/{devtools-DGC2247E.mjs → devtools-2CRVXV7E.mjs} +4 -2
- package/dist/{devtools-A3L7WNTB.cjs → devtools-RL4AU5KD.cjs} +5 -3
- package/dist/docs.cjs +6 -4
- package/dist/docs.d.mts +3 -3
- package/dist/docs.d.ts +3 -3
- package/dist/docs.mjs +5 -3
- package/dist/environment/vite.cjs +4 -4
- package/dist/environment/vite.mjs +3 -3
- package/dist/font.cjs +4 -2
- package/dist/font.d.mts +13 -1
- package/dist/font.d.ts +13 -1
- package/dist/font.mjs +3 -1
- package/dist/{handler.d-BKTWzzNA.d.mts → handler.d-B1S1ZBqS.d.mts} +1 -1
- package/dist/{handler.d-Dzpyg3-N.d.ts → handler.d-ZweCBJD4.d.ts} +1 -1
- package/dist/{headers.d-PZyXcDAH.d.ts → headers.d-BgBdQN8x.d.ts} +1 -1
- package/dist/{headers.d-5opjyhXw.d.mts → headers.d-C-yGl_f6.d.mts} +1 -1
- package/dist/i18n/client.cjs +11 -10
- package/dist/i18n/client.mjs +3 -2
- package/dist/image-attributes.d-BMPDQO1q.d.mts +55 -0
- package/dist/image-attributes.d-BMPDQO1q.d.ts +55 -0
- package/dist/image.cjs +5 -127
- package/dist/image.d.mts +3 -13
- package/dist/image.d.ts +3 -13
- package/dist/image.mjs +5 -127
- package/dist/index.cjs +40 -36
- package/dist/{index.d-C0Mie66f.d.mts → index.d-13h3oDu7.d.mts} +1 -1
- package/dist/{index.d-DV2q-0mE.d.ts → index.d-CtoniAXT.d.ts} +1 -1
- package/dist/index.d.mts +24 -23
- package/dist/index.d.ts +24 -23
- package/dist/index.mjs +35 -31
- package/dist/integrations/orm.d.mts +1 -1
- package/dist/integrations/orm.d.ts +1 -1
- 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 +22 -22
- package/dist/internal/build-runtime.d.mts +4 -4
- package/dist/internal/build-runtime.d.ts +4 -4
- package/dist/internal/build-runtime.mjs +21 -21
- package/dist/internal/cli-runtime.cjs +8 -6
- package/dist/internal/cli-runtime.d.mts +7 -7
- package/dist/internal/cli-runtime.d.ts +7 -7
- package/dist/internal/cli-runtime.mjs +7 -5
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/client-runtime.cjs +77 -52
- package/dist/internal/client-runtime.d.mts +9 -7
- package/dist/internal/client-runtime.d.ts +9 -7
- package/dist/internal/client-runtime.mjs +64 -39
- package/dist/internal/compression-runtime.d.mts +1 -1
- package/dist/internal/compression-runtime.d.ts +1 -1
- package/dist/internal/config-runtime.cjs +6 -4
- package/dist/internal/config-runtime.d.mts +3 -3
- package/dist/internal/config-runtime.d.ts +3 -3
- package/dist/internal/config-runtime.mjs +5 -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 +51 -18
- package/dist/internal/islands-boot.d.mts +3 -1
- package/dist/internal/islands-boot.d.ts +3 -1
- package/dist/internal/islands-boot.mjs +34 -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-runtime.cjs +6 -6
- package/dist/internal/production-runtime.d.mts +10 -10
- package/dist/internal/production-runtime.d.ts +10 -10
- package/dist/internal/production-runtime.mjs +5 -5
- package/dist/internal/renderer-islands.cjs +35 -8
- package/dist/internal/renderer-islands.d.mts +9 -1
- package/dist/internal/renderer-islands.d.ts +9 -1
- package/dist/internal/renderer-islands.mjs +35 -8
- package/dist/internal/spa-router.cjs +4 -3
- package/dist/internal/spa-router.d.mts +3 -3
- package/dist/internal/spa-router.d.ts +3 -3
- package/dist/internal/spa-router.mjs +3 -2
- package/dist/internal/start-manifest.d.mts +1 -1
- package/dist/internal/start-manifest.d.ts +1 -1
- package/dist/{island-runtime.d-BA7EPo1v.d.ts → island-runtime.d-D2Mh5eTU.d.ts} +5 -1
- package/dist/{island-runtime.d-BBS_YUSX.d.mts → island-runtime.d-lrpEJlgg.d.mts} +5 -1
- package/dist/{manager-PX4QN4HK.cjs → manager-D4DZRBRS.cjs} +4 -4
- package/dist/{manager-OMTC5FOJ.mjs → manager-PKPQGBAE.mjs} +3 -3
- package/dist/markdown.d.mts +1 -1
- package/dist/markdown.d.ts +1 -1
- package/dist/middleware.cjs +4 -4
- package/dist/middleware.d.mts +1 -1
- package/dist/middleware.d.ts +1 -1
- package/dist/middleware.mjs +3 -3
- package/dist/{mount.d-gWul1GA1.d.ts → mount.d-DyKlRR6z.d.ts} +1 -1
- package/dist/{mount.d-CZ_qL1iS.d.mts → mount.d-_6Un9wdK.d.mts} +1 -1
- package/dist/{navigation-delegate.d-BBTzhJLj.d.mts → navigation-delegate.d-B9GjWbov.d.mts} +1 -1
- package/dist/{navigation-delegate.d-BZsYEAet.d.ts → navigation-delegate.d-BbW1_pf_.d.ts} +1 -1
- package/dist/navigation.cjs +6 -5
- package/dist/navigation.d.mts +4 -4
- package/dist/navigation.d.ts +4 -4
- package/dist/navigation.mjs +5 -4
- package/dist/{plugin-QOTAPTVV.mjs → plugin-EVKQZBNW.mjs} +1 -1
- package/dist/{plugin-3PT7I26P.cjs → plugin-MWO3G2XM.cjs} +2 -2
- package/dist/plugin.cjs +19 -19
- package/dist/plugin.d.mts +5 -5
- package/dist/plugin.d.ts +5 -5
- package/dist/plugin.mjs +18 -18
- package/dist/query/client.cjs +8 -7
- package/dist/query/client.mjs +3 -2
- package/dist/{render-plan.d-AaJsYPX-.d.ts → render-plan.d-D0FV9lDT.d.ts} +1 -1
- package/dist/{render-plan.d-bnWxS12w.d.mts → render-plan.d-DaM1NPnm.d.mts} +1 -1
- package/dist/renderer-client.cjs +19 -13
- package/dist/renderer-client.d.mts +6 -5
- package/dist/renderer-client.d.ts +6 -5
- package/dist/renderer-client.mjs +10 -4
- package/dist/renderer.cjs +3 -3
- package/dist/renderer.mjs +2 -2
- package/dist/{request.d-CAeitOG1.d.ts → request.d-CrXC7voZ.d.ts} +1 -1
- package/dist/{request.d-C2HOn3Hi.d.mts → request.d-DVSLilGx.d.mts} +1 -1
- package/dist/request.d.mts +2 -2
- package/dist/request.d.ts +2 -2
- package/dist/{route-rendering.d-CYA-ulnX.d.mts → route-rendering.d-CWi3UYtR.d.mts} +1 -1
- package/dist/{route-rendering.d-A1dIkUK5.d.ts → route-rendering.d-OfbM_rj8.d.ts} +1 -1
- package/dist/{router.d-A_Yt6jYz.d.ts → router.d-Bm9FNSu3.d.ts} +1 -1
- package/dist/{router.d-8lxnzlkr.d.mts → router.d-YKVirmj4.d.mts} +1 -1
- package/dist/routes.d.mts +1 -1
- package/dist/routes.d.ts +1 -1
- package/dist/{rsc-pipeline-SNGPAXGW.cjs → rsc-pipeline-3DYC5ZXW.cjs} +6 -4
- package/dist/{rsc-pipeline-BROS3NEB.mjs → rsc-pipeline-LRB4ZG6I.mjs} +5 -3
- package/dist/{runtime-SLJLW37A.mjs → runtime-3WJNNAAR.mjs} +5 -3
- package/dist/{runtime-7T5TRAWL.cjs → runtime-CRFF32H6.cjs} +7 -5
- package/dist/{runtime.d-C_rZ9_DD.d.mts → runtime.d-BVj6apd0.d.mts} +1 -1
- package/dist/{runtime.d-BPyvWrgQ.d.ts → runtime.d-D7QYVJGO.d.ts} +1 -1
- package/dist/{server-components-status.d-BpxiEMQE.d.mts → server-components-status.d-BDVcxi0z.d.mts} +1 -1
- package/dist/{server-components-status.d-C2UEKJn7.d.ts → server-components-status.d-CfKDpmCH.d.ts} +1 -1
- package/dist/server-plugins.d.mts +3 -3
- package/dist/server-plugins.d.ts +3 -3
- package/dist/server.cjs +54 -40
- package/dist/server.d.mts +11 -11
- package/dist/server.d.ts +11 -11
- package/dist/server.mjs +34 -20
- package/dist/{spa-router.d-BD-6WX1R.d.mts → spa-router.d-DGmropfK.d.mts} +5 -3
- package/dist/{spa-router.d-Cw5i_15e.d.ts → spa-router.d-nE1jHNGt.d.ts} +5 -3
- package/dist/{ssg.d-CCE9aob5.d.mts → ssg.d-DS-gXUbf.d.mts} +2 -2
- package/dist/{ssg.d-Bifiq0EL.d.ts → ssg.d-jXlUAKzg.d.ts} +2 -2
- package/dist/{store-core.d-5tVn5vi1.d.ts → store-core.d-B5cwOd8g.d.ts} +3 -2
- package/dist/{store-core.d-BN2MxSG9.d.mts → store-core.d-C-gATBwd.d.mts} +3 -2
- package/dist/testing.cjs +3 -3
- package/dist/testing.d.mts +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/testing.mjs +3 -3
- package/dist/{utils.d-BUjpSNIO.d.ts → utils.d-BODwBtkz.d.ts} +1 -1
- package/dist/{utils.d-wGPLeVbq.d.mts → utils.d-Cmj-fzds.d.mts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +24 -22
- package/dist/vite.d.mts +21 -7
- package/dist/vite.d.ts +21 -7
- package/dist/vite.mjs +23 -21
- package/package.json +3 -3
- package/dist/analyzer-OEMQSLYT.cjs +0 -17
- package/dist/chunk-7EPYN7GW.cjs +0 -30
- package/dist/chunk-HZOMT5DY.mjs +0 -30
- package/dist/chunk-SBDWCDS6.cjs +0 -8
- package/dist/chunk-YX6AFPXC.mjs +0 -8
- package/dist/{chunk-4B6YJ5DS.cjs → chunk-4ZVKDHS6.cjs} +3 -3
- package/dist/{chunk-4EEAPBNV.mjs → chunk-PEQJ4UUT.mjs} +3 -3
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// src/api/route-files.ts
|
|
2
|
+
function hasPolyroutePlugin(plugins) {
|
|
3
|
+
return plugins?.some((plugin) => plugin.name === "polyroute") === true;
|
|
4
|
+
}
|
|
5
|
+
function isFarmAPIRouteFileName(fileName, polyroute = false) {
|
|
6
|
+
if (polyroute && fileName === "route.rs") return true;
|
|
7
|
+
return /^route\.(?:ts|tsx|js|jsx)$/.test(fileName);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export {
|
|
11
|
+
hasPolyroutePlugin,
|
|
12
|
+
isFarmAPIRouteFileName
|
|
13
|
+
};
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
targetsCurrentContext
|
|
3
|
+
} from "./chunk-65LZRVCZ.mjs";
|
|
1
4
|
import {
|
|
2
5
|
invokeMutationWithRetry
|
|
3
6
|
} from "./chunk-GL3ZDHKI.mjs";
|
|
@@ -17,13 +20,15 @@ import {
|
|
|
17
20
|
normalizeStoreKeys,
|
|
18
21
|
pickStoreState,
|
|
19
22
|
resolveFarmLink
|
|
20
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-N5NRXLCX.mjs";
|
|
21
24
|
import {
|
|
22
|
-
isFarmBlockedNavigationURL,
|
|
23
25
|
isFarmLocaleChangeHref,
|
|
24
|
-
rememberFarmLinkLocale
|
|
26
|
+
rememberFarmLinkLocale
|
|
27
|
+
} from "./chunk-GGD57DJA.mjs";
|
|
28
|
+
import {
|
|
29
|
+
isFarmBlockedNavigationURL,
|
|
25
30
|
resolveFarmNavigationURL
|
|
26
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-JIGWHFA5.mjs";
|
|
27
32
|
import {
|
|
28
33
|
getFarmClientDataCache
|
|
29
34
|
} from "./chunk-C64XOPBZ.mjs";
|
|
@@ -1115,10 +1120,12 @@ function LinkInner({
|
|
|
1115
1120
|
if (event.defaultPrevented) return;
|
|
1116
1121
|
if (isExternal) return;
|
|
1117
1122
|
if (event.currentTarget.hasAttribute("download")) return;
|
|
1118
|
-
if (
|
|
1123
|
+
if (!targetsCurrentContext(event.currentTarget)) return;
|
|
1119
1124
|
if (isModifierEvent(event)) return;
|
|
1120
1125
|
if (event.button !== 0) return;
|
|
1121
1126
|
if (typeof window !== "undefined") {
|
|
1127
|
+
if (!event.currentTarget.target && window.__FARM_RSC_HYDRATED)
|
|
1128
|
+
return;
|
|
1122
1129
|
event.preventDefault();
|
|
1123
1130
|
if (isFarmLocaleChangeHref(localizedHref)) {
|
|
1124
1131
|
rememberFarmLinkLocale(event.currentTarget);
|
|
@@ -1140,7 +1147,6 @@ function LinkInner({
|
|
|
1140
1147
|
replace,
|
|
1141
1148
|
scroll,
|
|
1142
1149
|
viewTransition,
|
|
1143
|
-
target,
|
|
1144
1150
|
isExternal,
|
|
1145
1151
|
isScriptHref,
|
|
1146
1152
|
onClick
|
|
@@ -4,11 +4,14 @@ import {
|
|
|
4
4
|
} from "./chunk-RSEAX5MW.mjs";
|
|
5
5
|
import {
|
|
6
6
|
_hydrateFarmI18n,
|
|
7
|
+
isFarmLocaleChangeHref
|
|
8
|
+
} from "./chunk-GGD57DJA.mjs";
|
|
9
|
+
import {
|
|
7
10
|
isFarmBlockedNavigationURL,
|
|
8
11
|
isFarmExternalNavigationURL,
|
|
9
|
-
|
|
12
|
+
isFarmSameDocumentFragment,
|
|
10
13
|
resolveFarmNavigationURL
|
|
11
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-JIGWHFA5.mjs";
|
|
12
15
|
import {
|
|
13
16
|
createClientCancellation
|
|
14
17
|
} from "./chunk-H227LYHT.mjs";
|
|
@@ -468,6 +471,7 @@ var SPARouter = class {
|
|
|
468
471
|
if (isFarmLocaleChangeHref(href)) return;
|
|
469
472
|
const url = resolveFarmNavigationURL(href, window.location.href);
|
|
470
473
|
if (isFarmExternalNavigationURL(url, window.location.origin)) return;
|
|
474
|
+
if (isFarmSameDocumentFragment(url.href, window.location.href)) return;
|
|
471
475
|
if (this.options.shouldUseDocumentNavigation(url.pathname)) return;
|
|
472
476
|
const fullPath = url.pathname + url.search;
|
|
473
477
|
const interceptFrom = window.location.pathname + window.location.search;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); 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; }// src/client/link-navigation.ts
|
|
2
|
+
function targetsCurrentContext(anchor) {
|
|
3
|
+
const target = anchor.target || _optionalChain([anchor, 'access', _ => _.ownerDocument, 'access', _2 => _2.querySelector, 'call', _3 => _3("base[target]"), 'optionalAccess', _4 => _4.target]);
|
|
4
|
+
return !target || target === "_self";
|
|
5
|
+
}
|
|
6
|
+
function readFarmLinkNavigateOptions(anchor) {
|
|
7
|
+
const viewTransition = anchor.getAttribute("data-view-transition");
|
|
8
|
+
return {
|
|
9
|
+
replace: anchor.hasAttribute("data-replace"),
|
|
10
|
+
scroll: !anchor.hasAttribute("data-no-scroll"),
|
|
11
|
+
viewTransition: viewTransition === "auto" ? "auto" : viewTransition === "true"
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
exports.targetsCurrentContext = targetsCurrentContext; exports.readFarmLinkNavigateOptions = readFarmLinkNavigateOptions;
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
import {
|
|
33
33
|
collectFarmNativeServerFns,
|
|
34
34
|
findFarmNativeScreenFiles
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-WPB6HJC7.mjs";
|
|
36
36
|
import {
|
|
37
37
|
assertFarmDocsAdapterServesNoGuardedPages,
|
|
38
38
|
compileFarmDocsAdapterEdgeManifest,
|
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
farmDocsAdapterServesGuardedPages,
|
|
41
41
|
listFarmDocsAdapterPages,
|
|
42
42
|
listFarmDocsPagePaths
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-YCHIR3X6.mjs";
|
|
44
44
|
import {
|
|
45
45
|
FARM_DOCS_LAST_MODIFIED_MANIFEST,
|
|
46
46
|
createFarmDocsHandler,
|
|
@@ -70,7 +70,7 @@ import {
|
|
|
70
70
|
getDeployTargetForPreset,
|
|
71
71
|
hasCustomFarmRouteContext,
|
|
72
72
|
resolveDeployOutputPath
|
|
73
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-BGEA4K7C.mjs";
|
|
74
74
|
import {
|
|
75
75
|
resolveFarmInstrumentationFile
|
|
76
76
|
} from "./chunk-QRNYSISP.mjs";
|
|
@@ -103,6 +103,7 @@ import {
|
|
|
103
103
|
generateClientCachePersistenceCode,
|
|
104
104
|
generateFarmIntegrationProviderClientCode,
|
|
105
105
|
generateFarmIntegrationProviderServerModules,
|
|
106
|
+
isFarmLayoutModule,
|
|
106
107
|
isRendererCompiledComponent,
|
|
107
108
|
mergeFarmFontCss,
|
|
108
109
|
mergeFarmProductionViteConfig,
|
|
@@ -115,7 +116,7 @@ import {
|
|
|
115
116
|
resolveFarmNotFoundComponentPath,
|
|
116
117
|
resolveFarmRouteRootStrategy,
|
|
117
118
|
toBakedMarkdownSourcePath
|
|
118
|
-
} from "./chunk-
|
|
119
|
+
} from "./chunk-MM4U2NNI.mjs";
|
|
119
120
|
import {
|
|
120
121
|
TAILWIND_CSS_BROWSER_TARGET,
|
|
121
122
|
generateFarmClientPluginEntryCode,
|
|
@@ -131,14 +132,11 @@ import {
|
|
|
131
132
|
readRouteRenderingDirectiveFromFile,
|
|
132
133
|
resolveRouteRenderingConfig,
|
|
133
134
|
resolveRouteRenderingConfigFromFile
|
|
134
|
-
} from "./chunk-
|
|
135
|
-
import {
|
|
136
|
-
usesFarmRendererIslands
|
|
137
|
-
} from "./chunk-VTEAUQMT.mjs";
|
|
135
|
+
} from "./chunk-W3ZBLFLU.mjs";
|
|
138
136
|
import {
|
|
139
137
|
FARM_PRERENDER_ENV,
|
|
140
138
|
_farmWebMCPReportsEnabled
|
|
141
|
-
} from "./chunk-
|
|
139
|
+
} from "./chunk-MRULVIH3.mjs";
|
|
142
140
|
import {
|
|
143
141
|
HOISTED_HEAD_ELEMENT,
|
|
144
142
|
appMiddlewareMayHandlePath,
|
|
@@ -151,7 +149,7 @@ import {
|
|
|
151
149
|
layoutsCanCoverSamePage,
|
|
152
150
|
routeBoundaryCoversDirectory,
|
|
153
151
|
stripRouteGroups
|
|
154
|
-
} from "./chunk-
|
|
152
|
+
} from "./chunk-PEQJ4UUT.mjs";
|
|
155
153
|
import {
|
|
156
154
|
FARM_NATIVE_TREE_CONTENT_TYPE
|
|
157
155
|
} from "./chunk-LLZSYFOM.mjs";
|
|
@@ -165,7 +163,7 @@ import {
|
|
|
165
163
|
listFarmBuiltInRoutePaths,
|
|
166
164
|
resolveFarmApiCatalogInput,
|
|
167
165
|
resolveFarmAppManifestInput
|
|
168
|
-
} from "./chunk-
|
|
166
|
+
} from "./chunk-BJHXFEAF.mjs";
|
|
169
167
|
import {
|
|
170
168
|
FARM_DEFAULT_MCP_PATH,
|
|
171
169
|
createFarmDefaultMCPServer,
|
|
@@ -173,7 +171,7 @@ import {
|
|
|
173
171
|
} from "./chunk-HR4N2K4V.mjs";
|
|
174
172
|
import {
|
|
175
173
|
isFarmPreviewDeploymentEnvironment
|
|
176
|
-
} from "./chunk-
|
|
174
|
+
} from "./chunk-LUGQUU4S.mjs";
|
|
177
175
|
import {
|
|
178
176
|
FARM_NATIVE_SERVER_FN_PLUGIN
|
|
179
177
|
} from "./chunk-L4RTTTVE.mjs";
|
|
@@ -194,7 +192,7 @@ import {
|
|
|
194
192
|
withFarmSourceSnapshot,
|
|
195
193
|
withFarmSourceSnapshotOf,
|
|
196
194
|
withPackageClientBoundaryCache
|
|
197
|
-
} from "./chunk-
|
|
195
|
+
} from "./chunk-WOTAU3BN.mjs";
|
|
198
196
|
import {
|
|
199
197
|
generateFarmDocsAdapterClientRuntime,
|
|
200
198
|
getFarmDocsAdapterConfigModule
|
|
@@ -212,6 +210,9 @@ import {
|
|
|
212
210
|
nitroRouteRulesBelowBasePath,
|
|
213
211
|
routeRulesToNitroRouteRules
|
|
214
212
|
} from "./chunk-YVVY276M.mjs";
|
|
213
|
+
import {
|
|
214
|
+
usesFarmRendererIslands
|
|
215
|
+
} from "./chunk-X2SMVPLH.mjs";
|
|
215
216
|
import {
|
|
216
217
|
applyFarmCspHashesToHtml,
|
|
217
218
|
createFarmCspNonce
|
|
@@ -280,7 +281,10 @@ import {
|
|
|
280
281
|
} from "./chunk-QD34VE4N.mjs";
|
|
281
282
|
import {
|
|
282
283
|
APIRouteManager
|
|
283
|
-
} from "./chunk-
|
|
284
|
+
} from "./chunk-JDO3X7RB.mjs";
|
|
285
|
+
import {
|
|
286
|
+
hasPolyroutePlugin
|
|
287
|
+
} from "./chunk-PTAGDZ7I.mjs";
|
|
284
288
|
import {
|
|
285
289
|
readFarmI18nCatalogs
|
|
286
290
|
} from "./chunk-VO55MMBX.mjs";
|
|
@@ -308,7 +312,7 @@ import {
|
|
|
308
312
|
} from "./chunk-2I6PUKWJ.mjs";
|
|
309
313
|
import {
|
|
310
314
|
FARM_VERSION
|
|
311
|
-
} from "./chunk-
|
|
315
|
+
} from "./chunk-XJJQAFZX.mjs";
|
|
312
316
|
import {
|
|
313
317
|
FARM_VIDEO_PLAYER_PATH
|
|
314
318
|
} from "./chunk-AG27TI6Q.mjs";
|
|
@@ -893,15 +897,26 @@ function encodeFarmBuildJSONPlaceholder(value) {
|
|
|
893
897
|
|
|
894
898
|
// src/nitro/islands-react-chunk.ts
|
|
895
899
|
var REACT_MODULE = /[\\/]node_modules[\\/](?:react|react-dom|scheduler)[\\/]/;
|
|
896
|
-
|
|
900
|
+
var REACT_DOM_MODULE = /[\\/]node_modules[\\/]react-dom[\\/]/;
|
|
901
|
+
var FARM_EAGER_COMPILE_HINT = "//# allFunctionsCalledOnLoad";
|
|
902
|
+
function createFarmIslandsReactOutput() {
|
|
897
903
|
let entryImportsReact;
|
|
898
904
|
return {
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
+
codeSplitting: {
|
|
906
|
+
groups: [
|
|
907
|
+
{
|
|
908
|
+
debugName: "react",
|
|
909
|
+
name(moduleId, context) {
|
|
910
|
+
if (!REACT_MODULE.test(moduleId)) return null;
|
|
911
|
+
entryImportsReact ?? (entryImportsReact = reactLoadsWithAnEntry(moduleId, context));
|
|
912
|
+
return entryImportsReact ? null : "react";
|
|
913
|
+
}
|
|
914
|
+
}
|
|
915
|
+
]
|
|
916
|
+
},
|
|
917
|
+
// After minification, so the hint stays the chunk's first line; its source map accounts for it.
|
|
918
|
+
// Rolldown adds a line after any string, an empty one too, so other chunks get none.
|
|
919
|
+
postBanner: ((chunk) => entryImportsReact === false && chunk.moduleIds.some((id) => REACT_DOM_MODULE.test(id)) ? FARM_EAGER_COMPILE_HINT : void 0)
|
|
905
920
|
};
|
|
906
921
|
}
|
|
907
922
|
function reactLoadsWithAnEntry(moduleId, context) {
|
|
@@ -925,14 +940,25 @@ function reactLoadsWithAnEntry(moduleId, context) {
|
|
|
925
940
|
}
|
|
926
941
|
return false;
|
|
927
942
|
}
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
943
|
+
var CHUNKING_OPTIONS = [
|
|
944
|
+
"manualChunks",
|
|
945
|
+
"advancedChunks",
|
|
946
|
+
"codeSplitting",
|
|
947
|
+
"inlineDynamicImports"
|
|
948
|
+
];
|
|
949
|
+
function createFarmIslandsReactChunkPlugin() {
|
|
950
|
+
return {
|
|
951
|
+
name: "farm-islands-react-chunk",
|
|
952
|
+
enforce: "post",
|
|
953
|
+
outputOptions: {
|
|
954
|
+
order: "post",
|
|
955
|
+
handler(options) {
|
|
956
|
+
if (CHUNKING_OPTIONS.some((key) => options[key] !== void 0)) return null;
|
|
957
|
+
const { codeSplitting, postBanner } = createFarmIslandsReactOutput();
|
|
958
|
+
return { ...options, codeSplitting, postBanner: options.postBanner ?? postBanner };
|
|
959
|
+
}
|
|
960
|
+
}
|
|
961
|
+
};
|
|
936
962
|
}
|
|
937
963
|
|
|
938
964
|
// src/nitro/client-route-table.ts
|
|
@@ -1480,7 +1506,7 @@ function collectServerReadSSRAssets(bundle) {
|
|
|
1480
1506
|
}
|
|
1481
1507
|
return assets;
|
|
1482
1508
|
}
|
|
1483
|
-
function collectServerOnlySSRAssets(bundle) {
|
|
1509
|
+
function collectServerOnlySSRAssets(bundle, polyroute = false) {
|
|
1484
1510
|
const serverOnly = /* @__PURE__ */ new Set();
|
|
1485
1511
|
const publicReferenceSources = [];
|
|
1486
1512
|
for (const [fileName, output] of Object.entries(bundle)) {
|
|
@@ -1503,6 +1529,7 @@ function collectServerOnlySSRAssets(bundle) {
|
|
|
1503
1529
|
}
|
|
1504
1530
|
}
|
|
1505
1531
|
for (const fileName of serverOnly) {
|
|
1532
|
+
if (polyroute && /(?:^|\/)polyroute\/[a-f0-9]+\/[^/]+\.wasm$/.test(fileName)) continue;
|
|
1506
1533
|
const name = path10.posix.basename(fileName);
|
|
1507
1534
|
if (publicReferenceSources.some((source) => source.includes(name))) {
|
|
1508
1535
|
serverOnly.delete(fileName);
|
|
@@ -3012,7 +3039,7 @@ ${islandsErrors.map((error) => ` - ${error}`).join("\n")}`
|
|
|
3012
3039
|
}
|
|
3013
3040
|
const { bundle: ssrBundle, entryFile: ssrEntryFile, configuredHeaderRoutes } = ssrResult;
|
|
3014
3041
|
assertServerReadSSRAssetsSupported(ssrBundle, preset, root);
|
|
3015
|
-
await writeSSRAssetsToClient(ssrBundle, clientOutputDir);
|
|
3042
|
+
await writeSSRAssetsToClient(ssrBundle, clientOutputDir, ssrResult.polyroute);
|
|
3016
3043
|
if (!rendererDisabled) {
|
|
3017
3044
|
await writeFarmVideoPlayerToClient(clientOutputDir);
|
|
3018
3045
|
}
|
|
@@ -3090,9 +3117,9 @@ function varyFarmNitroCacheRules(rules, headerNames) {
|
|
|
3090
3117
|
})
|
|
3091
3118
|
);
|
|
3092
3119
|
}
|
|
3093
|
-
async function writeSSRAssetsToClient(bundle, outputDir) {
|
|
3120
|
+
async function writeSSRAssetsToClient(bundle, outputDir, polyroute) {
|
|
3094
3121
|
const fs5 = await import("fs/promises");
|
|
3095
|
-
const serverOnlyAssets = collectServerOnlySSRAssets(bundle);
|
|
3122
|
+
const serverOnlyAssets = collectServerOnlySSRAssets(bundle, polyroute);
|
|
3096
3123
|
for (const [fileName, output] of Object.entries(bundle)) {
|
|
3097
3124
|
if (output.type !== "asset" || serverOnlyAssets.has(fileName)) continue;
|
|
3098
3125
|
if (fileName === "farm-fonts.css") {
|
|
@@ -3210,7 +3237,7 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
3210
3237
|
farmPlugin,
|
|
3211
3238
|
farmServerOnlyEntriesPlugin
|
|
3212
3239
|
} = await import("./vite.mjs");
|
|
3213
|
-
const { PluginManager: PluginManager2 } = await import("./plugin-
|
|
3240
|
+
const { PluginManager: PluginManager2 } = await import("./plugin-EVKQZBNW.mjs");
|
|
3214
3241
|
const fs5 = await import("fs/promises");
|
|
3215
3242
|
const pluginManager = new PluginManager2({
|
|
3216
3243
|
config,
|
|
@@ -3595,7 +3622,6 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
3595
3622
|
entryFileNames: "[name]-h[hash].js",
|
|
3596
3623
|
chunkFileNames: "chunks/[name]-h[hash].js",
|
|
3597
3624
|
hashCharacters: "hex",
|
|
3598
|
-
...islandsMode && isReactRenderer(config.renderer) && !configuresFarmClientChunks(config.vite) ? { codeSplitting: { groups: [createFarmIslandsReactChunkGroup()] } } : {},
|
|
3599
3625
|
// Use predictable name for CSS so we can reference it in SSR HTML
|
|
3600
3626
|
assetFileNames: (assetInfo) => {
|
|
3601
3627
|
if (assetInfo.name?.endsWith(".css")) {
|
|
@@ -3665,6 +3691,8 @@ async function buildClient(productionVite, config, root, srcDir, outputDir, page
|
|
|
3665
3691
|
...tailwindVitePlugin ? [tailwindVitePlugin] : [],
|
|
3666
3692
|
...rendererVitePlugins,
|
|
3667
3693
|
...config.vite.plugins || [],
|
|
3694
|
+
// React in one chunk, unless the app's config or one of its plugins splits chunks.
|
|
3695
|
+
...islandsMode && isReactRenderer(config.renderer) ? [createFarmIslandsReactChunkPlugin()] : [],
|
|
3668
3696
|
farmServerOnlyEntriesPlugin({ platform, distDir: config.distDir || ".farm" }),
|
|
3669
3697
|
farmNavigationPlugin(config.renderer),
|
|
3670
3698
|
farmDocsClientConfigPlugin(
|
|
@@ -5308,7 +5336,7 @@ function isFarmDocsPath() {
|
|
|
5308
5336
|
// Farm.js Client Runtime (no client components)
|
|
5309
5337
|
${cssImport}
|
|
5310
5338
|
${layoutImports}
|
|
5311
|
-
import { createClientCancellation, createClientPluginManager, createPluginlessClientRuntime, getFarmIslandValueHeaders, getHashTargetElement, installChunkErrorRecovery, installFarmLinkPrefetch, isFarmBlockedNavigationURL, isFarmExternalNavigationURL, readFarmLinkNavigateOptions, rememberFarmLinkLocale, reconcileFarmDocumentHead, runFarmNavigationDelegates, setFarmBasePath, setFarmTrailingSlashPreference, stripFarmBasePath } from "@farm.js/core/internal/client-runtime";
|
|
5339
|
+
import { createClientCancellation, createClientPluginManager, createPluginlessClientRuntime, getFarmIslandValueHeaders, getHashTargetElement, installChunkErrorRecovery, installFarmLinkPrefetch, isFarmBlockedNavigationURL, isFarmExternalNavigationURL, isFarmSameDocumentFragment, readFarmLinkNavigateOptions, targetsCurrentContext, rememberFarmLinkLocale, reconcileFarmDocumentHead, runFarmNavigationDelegates, setFarmBasePath, setFarmTrailingSlashPreference, stripFarmBasePath } from "@farm.js/core/internal/client-runtime";
|
|
5312
5340
|
import { createFarmDeploymentMismatchError, createFarmDeploymentRequestHeaders, isFarmDeploymentMismatchResponse } from "@farm.js/core/deployment";
|
|
5313
5341
|
${clientPluginEntry.imports}
|
|
5314
5342
|
${clientCachePersistence.imports}
|
|
@@ -5524,6 +5552,7 @@ ${generateUniversalRouterStateProperties()}
|
|
|
5524
5552
|
}
|
|
5525
5553
|
});
|
|
5526
5554
|
}
|
|
5555
|
+
if (isFarmSameDocumentFragment(url.href, window.location.href)) return;
|
|
5527
5556
|
|
|
5528
5557
|
const pathname = url.pathname + url.search;
|
|
5529
5558
|
if (this.readFreshPrefetch(pathname) !== undefined) return;
|
|
@@ -5595,7 +5624,7 @@ document.addEventListener("click", function(e) {
|
|
|
5595
5624
|
if (anchor.hasAttribute("download")) return;
|
|
5596
5625
|
if (hasAbsoluteNavigationHref(href)) return;
|
|
5597
5626
|
if (href.startsWith("#")) return;
|
|
5598
|
-
if (anchor
|
|
5627
|
+
if (!targetsCurrentContext(anchor)) return;
|
|
5599
5628
|
if (document.documentElement.dataset.farmDocsRuntime === "true") return;
|
|
5600
5629
|
if (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) return;
|
|
5601
5630
|
if (e.button !== 0) return;
|
|
@@ -5644,8 +5673,9 @@ let hydrateRoot;
|
|
|
5644
5673
|
let farmRendererLoading = null;
|
|
5645
5674
|
let farmRendererLoaded = false;${isolatedHydrationEnabled ? `
|
|
5646
5675
|
// The boot stops holding interactions once this entry runs. Until islx loads, islands that have not
|
|
5647
|
-
// hydrated hold them here, for their schedulers to replay
|
|
5648
|
-
|
|
5676
|
+
// hydrated hold them here, for their schedulers to replay, and a server component's form waits for
|
|
5677
|
+
// islx to post it without a page load.
|
|
5678
|
+
const releaseFarmIslandInteractions = holdFarmIslandInteractions("f-island", loadFarmRenderer);` : ""}
|
|
5649
5679
|
function loadFarmRenderer() {
|
|
5650
5680
|
return farmRendererLoading || (farmRendererLoading = Promise.all([
|
|
5651
5681
|
import("react"),
|
|
@@ -5819,7 +5849,7 @@ ${lazyRoot ? "" : layoutImports}
|
|
|
5819
5849
|
${rendererClientImports}
|
|
5820
5850
|
${isolatedHydrationImport}
|
|
5821
5851
|
${providerClientCode.imports}
|
|
5822
|
-
import { createClientCancellation, createClientPluginManager, createPluginlessClientRuntime, getFarmIslandValueHeaders, getHashTargetElement, keepFarmIslandValues, installChunkErrorRecovery, installFarmLinkPrefetch, isFarmBlockedNavigationURL, isFarmExternalNavigationURL, readFarmLinkNavigateOptions, rememberFarmLinkLocale, reconcileFarmDocumentHead, replayFarmQueuedInteraction, runFarmNavigationDelegates, scheduleFarmIslandHydration, createFarmSearchParams, searchParamsToObject, setFarmBasePath, setFarmTrailingSlashPreference, stripFarmBasePath } from "@farm.js/core/internal/client-runtime";
|
|
5852
|
+
import { createClientCancellation, createClientPluginManager, createPluginlessClientRuntime, getFarmIslandValueHeaders, getHashTargetElement, keepFarmIslandValues, installChunkErrorRecovery, installFarmLinkPrefetch, isFarmBlockedNavigationURL, isFarmExternalNavigationURL, isFarmSameDocumentFragment, readFarmLinkNavigateOptions, targetsCurrentContext, rememberFarmLinkLocale, reconcileFarmDocumentHead, replayFarmQueuedInteraction, runFarmNavigationDelegates, scheduleFarmIslandHydration, createFarmSearchParams, searchParamsToObject, setFarmBasePath, setFarmTrailingSlashPreference, stripFarmBasePath } from "@farm.js/core/internal/client-runtime";
|
|
5823
5853
|
import { createFarmDeploymentMismatchError, createFarmDeploymentRequestHeaders, isFarmDeploymentMismatchResponse } from "@farm.js/core/deployment";
|
|
5824
5854
|
${lazyMatcher ? "" : 'import { createFarmRouter, isFarmRouteActive, matchFarmRoute } from "@farm.js/core/router";'}
|
|
5825
5855
|
${clientPluginEntry.imports}
|
|
@@ -7212,6 +7242,7 @@ ${islandValues ? ` // Islands mode: navigations name the layouts on screen, and
|
|
|
7212
7242
|
}
|
|
7213
7243
|
});
|
|
7214
7244
|
}
|
|
7245
|
+
if (isFarmSameDocumentFragment(url.href, window.location.href)) return;
|
|
7215
7246
|
prefetchFarmClientRouteTable();
|
|
7216
7247
|
|
|
7217
7248
|
// A prefetch warms an ordinary future navigation, which reads the bare
|
|
@@ -7293,7 +7324,7 @@ document.addEventListener("click", function(e) {
|
|
|
7293
7324
|
if (anchor.hasAttribute("download")) return;
|
|
7294
7325
|
if (hasAbsoluteNavigationHref(href)) return;
|
|
7295
7326
|
if (href.startsWith("#")) return;
|
|
7296
|
-
if (anchor
|
|
7327
|
+
if (!targetsCurrentContext(anchor)) return;
|
|
7297
7328
|
if (document.documentElement.dataset.farmDocsRuntime === "true") return;
|
|
7298
7329
|
if (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) return;
|
|
7299
7330
|
if (e.button !== 0) return;
|
|
@@ -7319,7 +7350,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
7319
7350
|
farmPlugin,
|
|
7320
7351
|
farmServerOnlyEntriesPlugin
|
|
7321
7352
|
} = await import("./vite.mjs");
|
|
7322
|
-
const { PluginManager: PluginManager2 } = await import("./plugin-
|
|
7353
|
+
const { PluginManager: PluginManager2 } = await import("./plugin-EVKQZBNW.mjs");
|
|
7323
7354
|
const fs5 = await import("fs/promises");
|
|
7324
7355
|
const pluginManager = new PluginManager2({
|
|
7325
7356
|
config,
|
|
@@ -7345,6 +7376,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
7345
7376
|
label: "for SSR"
|
|
7346
7377
|
});
|
|
7347
7378
|
}
|
|
7379
|
+
let polyroute = false;
|
|
7348
7380
|
let ssrBundle;
|
|
7349
7381
|
let ssrEntryFile;
|
|
7350
7382
|
const pageRoutes = collectedPageRoutes.map((route) => ({ ...route }));
|
|
@@ -7422,7 +7454,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
7422
7454
|
const appDirs = getFarmAppDirectories(config);
|
|
7423
7455
|
let openAPIReference = null;
|
|
7424
7456
|
if (config.openapi.enabled && config.openapi.route) {
|
|
7425
|
-
const { OpenAPIManager, renderOpenAPIReferenceHTML } = await import("./manager-
|
|
7457
|
+
const { OpenAPIManager, renderOpenAPIReferenceHTML } = await import("./manager-PKPQGBAE.mjs");
|
|
7426
7458
|
const openAPIManager = new OpenAPIManager(appDirs, config.openapi, {
|
|
7427
7459
|
mode: "production",
|
|
7428
7460
|
apiBaseURL: config.api.baseURL,
|
|
@@ -7727,16 +7759,24 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
7727
7759
|
},
|
|
7728
7760
|
{
|
|
7729
7761
|
name: "capture-ssr-bundle",
|
|
7730
|
-
|
|
7731
|
-
|
|
7732
|
-
|
|
7733
|
-
|
|
7734
|
-
|
|
7735
|
-
|
|
7762
|
+
configResolved(config2) {
|
|
7763
|
+
polyroute = hasPolyroutePlugin(config2.plugins);
|
|
7764
|
+
},
|
|
7765
|
+
enforce: "post",
|
|
7766
|
+
generateBundle: {
|
|
7767
|
+
// Retain assets emitted by user plugins, including post-generateBundle hooks.
|
|
7768
|
+
order: "post",
|
|
7769
|
+
handler(_options, bundle) {
|
|
7770
|
+
ssrBundle = bundle;
|
|
7771
|
+
for (const [fileName, file] of Object.entries(bundle)) {
|
|
7772
|
+
if (file.type === "chunk" && file.isEntry) {
|
|
7773
|
+
ssrEntryFile = fileName;
|
|
7774
|
+
break;
|
|
7775
|
+
}
|
|
7776
|
+
}
|
|
7777
|
+
if (!ssrEntryFile) {
|
|
7778
|
+
throw new Error("No entry point found in SSR bundle");
|
|
7736
7779
|
}
|
|
7737
|
-
}
|
|
7738
|
-
if (!ssrEntryFile) {
|
|
7739
|
-
throw new Error("No entry point found in SSR bundle");
|
|
7740
7780
|
}
|
|
7741
7781
|
}
|
|
7742
7782
|
}
|
|
@@ -7766,6 +7806,7 @@ async function buildSSRInMemory(productionVite, config, root, routeManager, apiR
|
|
|
7766
7806
|
}
|
|
7767
7807
|
}
|
|
7768
7808
|
return {
|
|
7809
|
+
polyroute,
|
|
7769
7810
|
bundle: ssrBundle,
|
|
7770
7811
|
entryFile: ssrEntryFile,
|
|
7771
7812
|
configuredHeaderRoutes
|
|
@@ -15711,7 +15752,8 @@ async function createProjectModuleServer(createViteServer, config, root, buildLi
|
|
|
15711
15752
|
farmFontImportsPlugin({
|
|
15712
15753
|
root,
|
|
15713
15754
|
basePath: config.basePath,
|
|
15714
|
-
publicDir: config.publicDir
|
|
15755
|
+
publicDir: config.publicDir,
|
|
15756
|
+
isLayoutModule: (id) => isFarmLayoutModule(id, getFarmAppDirectories(config))
|
|
15715
15757
|
}),
|
|
15716
15758
|
farmEnvironmentFunctionsPlugin({ renderer: config.renderer }),
|
|
15717
15759
|
// Route modules load here at build time (rendering config, prerendering): `server-only`
|
|
@@ -15785,7 +15827,7 @@ async function buildClient2(viteBuild, config, root, srcDir, outputDir) {
|
|
|
15785
15827
|
farmPlugin,
|
|
15786
15828
|
farmServerOnlyEntriesPlugin
|
|
15787
15829
|
} = await import("./vite.mjs");
|
|
15788
|
-
const { PluginManager: PluginManager2 } = await import("./plugin-
|
|
15830
|
+
const { PluginManager: PluginManager2 } = await import("./plugin-EVKQZBNW.mjs");
|
|
15789
15831
|
const pluginManager = new PluginManager2({
|
|
15790
15832
|
config,
|
|
15791
15833
|
isDev: false,
|
|
@@ -15814,7 +15856,7 @@ async function buildClient2(viteBuild, config, root, srcDir, outputDir) {
|
|
|
15814
15856
|
}
|
|
15815
15857
|
async function buildSSR(viteBuild, config, root, srcDir, outputDir) {
|
|
15816
15858
|
const { farmI18nClientBridgePlugin, farmIslandContainersPlugin, farmPlugin } = await import("./vite.mjs");
|
|
15817
|
-
const { PluginManager: PluginManager2 } = await import("./plugin-
|
|
15859
|
+
const { PluginManager: PluginManager2 } = await import("./plugin-EVKQZBNW.mjs");
|
|
15818
15860
|
const pluginManager = new PluginManager2({
|
|
15819
15861
|
config,
|
|
15820
15862
|
isDev: false,
|
|
@@ -18,7 +18,7 @@ var _chunkHR5GU4UUcjs = require('./chunk-HR5GU4UU.cjs');
|
|
|
18
18
|
var _chunkNDOE76QCcjs = require('./chunk-NDOE76QC.cjs');
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
var
|
|
21
|
+
var _chunkIRPXOTENcjs = require('./chunk-IRPXOTEN.cjs');
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
@@ -599,7 +599,7 @@ async function resolveAPIContext(options) {
|
|
|
599
599
|
config: options.config,
|
|
600
600
|
configPath: options.configPath
|
|
601
601
|
}));
|
|
602
|
-
const docs = isResolvedDocsConfig(docsInput) ? docsInput : await
|
|
602
|
+
const docs = isResolvedDocsConfig(docsInput) ? docsInput : await _chunkIRPXOTENcjs.resolveDocsConfig.call(void 0, docsInput, { root, srcDir });
|
|
603
603
|
const guardedPaths = new Set(_nullishCoalesce(_optionalChain([runtimeConfig, 'optionalAccess', _25 => _25.guardedPaths]), () => ( [])));
|
|
604
604
|
return {
|
|
605
605
|
root,
|