@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
|
@@ -93,7 +93,7 @@ function formatFarmRscBlockingMessage(blockingKeys) {
|
|
|
93
93
|
var warnedFallback = false;
|
|
94
94
|
async function resolveFarmRscCheckConfig(config, root, mode) {
|
|
95
95
|
if (!_optionalChain([config, 'optionalAccess', _8 => _8.extends])) return config;
|
|
96
|
-
const { resolveFarmLayers } = await import("./layers-
|
|
96
|
+
const { resolveFarmLayers } = await import("./layers-7P4RLKVX.cjs");
|
|
97
97
|
return (await resolveFarmLayers(config, { root, mode })).config;
|
|
98
98
|
}
|
|
99
99
|
function farmAppUsesRscPipeline(config, root) {
|
|
@@ -127,7 +127,7 @@ function formatFarmRscIgnoredMessage(ignoredKeys) {
|
|
|
127
127
|
}
|
|
128
128
|
if (others.length < ignoredKeys.length) {
|
|
129
129
|
clauses.push(
|
|
130
|
-
"runs only the browser `client` hooks of `plugins` and ignores their other hooks."
|
|
130
|
+
"runs only the `configure` and browser `client` hooks of `plugins` and ignores their other hooks."
|
|
131
131
|
);
|
|
132
132
|
}
|
|
133
133
|
return `experimental.serverComponents runs on the RSC pipeline, which ${clauses.join(" It also ")}`;
|
|
@@ -345,7 +345,7 @@ async function loadWorkflowModule(filePath, root) {
|
|
|
345
345
|
outDir,
|
|
346
346
|
`workflow-${Date.now()}-${Math.random().toString(36).slice(2)}.mjs`
|
|
347
347
|
);
|
|
348
|
-
const { bundleNodeModule } = await import("./node-module-bundle-
|
|
348
|
+
const { bundleNodeModule } = await import("./node-module-bundle-LIZ2KMVW.cjs");
|
|
349
349
|
await bundleNodeModule({
|
|
350
350
|
root,
|
|
351
351
|
entry: filePath,
|
|
@@ -244,12 +244,15 @@ function isFarmDocsSocialImageEnabled(page, docs) {
|
|
|
244
244
|
}
|
|
245
245
|
return !isFalse(page.frontmatter.socialImage);
|
|
246
246
|
}
|
|
247
|
+
function farmDocsPageUsesRequestOrigin(page, docs) {
|
|
248
|
+
return isFarmDocsSocialImageEnabled(page, docs) && !_optionalChain([getSocialImageConfig, 'call', _7 => _7(docs), 'optionalAccess', _8 => _8.baseUrl]);
|
|
249
|
+
}
|
|
247
250
|
function getFarmDocsCustomSocialImage(page) {
|
|
248
251
|
const value = page.frontmatter.socialImage || page.frontmatter.openGraphImage || page.frontmatter.ogImage;
|
|
249
252
|
return value && !isFalse(value) && isExternalOrRootPath(value) ? value : void 0;
|
|
250
253
|
}
|
|
251
254
|
function resolveIllustration(page) {
|
|
252
|
-
const explicit = _optionalChain([page, 'access',
|
|
255
|
+
const explicit = _optionalChain([page, 'access', _9 => _9.frontmatter, 'access', _10 => _10.socialIllustration, 'optionalAccess', _11 => _11.toLowerCase, 'call', _12 => _12()]);
|
|
253
256
|
if (explicit === "auth" || explicit === "cache" || explicit === "cli" || explicit === "integrations" || explicit === "project" || explicit === "routing" || explicit === "runtime") {
|
|
254
257
|
return explicit;
|
|
255
258
|
}
|
|
@@ -272,14 +275,14 @@ function createHashValue(value) {
|
|
|
272
275
|
return _crypto.createHash.call(void 0, "sha256").update(JSON.stringify(value)).digest("hex").slice(0, 16);
|
|
273
276
|
}
|
|
274
277
|
function resolveBaseUrl(requestUrl, config) {
|
|
275
|
-
return _optionalChain([config, 'optionalAccess',
|
|
278
|
+
return _optionalChain([config, 'optionalAccess', _13 => _13.baseUrl]) ? new URL(config.baseUrl) : new URL(requestUrl.origin);
|
|
276
279
|
}
|
|
277
280
|
function createFarmDocsSocialImageDescriptor(page, docs, requestUrl, format = "svg", basePath = "") {
|
|
278
281
|
const config = getSocialImageConfig(docs);
|
|
279
|
-
const siteName = _optionalChain([config, 'optionalAccess',
|
|
280
|
-
const brand = _optionalChain([config, 'optionalAccess',
|
|
282
|
+
const siteName = _optionalChain([config, 'optionalAccess', _14 => _14.siteName]) || getNavTitle(docs);
|
|
283
|
+
const brand = _optionalChain([config, 'optionalAccess', _15 => _15.brand]) || siteName;
|
|
281
284
|
const title = page.frontmatter.socialTitle || page.title;
|
|
282
|
-
const description = page.frontmatter.socialDescription || page.description || _optionalChain([docs, 'access',
|
|
285
|
+
const description = page.frontmatter.socialDescription || page.description || _optionalChain([docs, 'access', _16 => _16.config, 'access', _17 => _17.metadata, 'optionalAccess', _18 => _18.description]) || `Documentation for ${siteName}`;
|
|
283
286
|
const section = page.frontmatter.section || page.section || "Documentation";
|
|
284
287
|
const illustration = resolveIllustration(page);
|
|
285
288
|
const entry = normalizeEntry(docs.entry);
|
|
@@ -297,7 +300,7 @@ function createFarmDocsSocialImageDescriptor(page, docs, requestUrl, format = "s
|
|
|
297
300
|
brand,
|
|
298
301
|
pageHref: page.href,
|
|
299
302
|
illustration,
|
|
300
|
-
fonts: _optionalChain([config, 'optionalAccess',
|
|
303
|
+
fonts: _optionalChain([config, 'optionalAccess', _19 => _19.fonts])
|
|
301
304
|
});
|
|
302
305
|
return {
|
|
303
306
|
title,
|
|
@@ -311,7 +314,7 @@ function createFarmDocsSocialImageDescriptor(page, docs, requestUrl, format = "s
|
|
|
311
314
|
imageUrl: new URL(`${_chunkD22BUQKWcjs.applyFarmBasePath.call(void 0, imagePath, basePath)}?v=${hash}`, baseUrl).href,
|
|
312
315
|
imageAlt,
|
|
313
316
|
illustration,
|
|
314
|
-
fonts: _optionalChain([config, 'optionalAccess',
|
|
317
|
+
fonts: _optionalChain([config, 'optionalAccess', _20 => _20.fonts]),
|
|
315
318
|
format,
|
|
316
319
|
hash
|
|
317
320
|
};
|
|
@@ -539,9 +542,9 @@ function renderFarmDocsSocialImageSvg(descriptor) {
|
|
|
539
542
|
<desc id="${titleId}-description">${escapeXml(descriptor.description)}</desc>
|
|
540
543
|
<metadata>${escapeXml(JSON.stringify({ generator: "Farm.js docs", page: descriptor.pageUrl, illustration: descriptor.illustration }))}</metadata>
|
|
541
544
|
<style type="text/css">
|
|
542
|
-
${renderEmbeddedFont("Farm Sans", _optionalChain([descriptor, 'access',
|
|
543
|
-
${renderEmbeddedFont("Farm Mono", _optionalChain([descriptor, 'access',
|
|
544
|
-
${renderEmbeddedFont("Farm Pixel", _optionalChain([descriptor, 'access',
|
|
545
|
+
${renderEmbeddedFont("Farm Sans", _optionalChain([descriptor, 'access', _21 => _21.fonts, 'optionalAccess', _22 => _22.sans]), "100 900")}
|
|
546
|
+
${renderEmbeddedFont("Farm Mono", _optionalChain([descriptor, 'access', _23 => _23.fonts, 'optionalAccess', _24 => _24.mono]), "100 900")}
|
|
547
|
+
${renderEmbeddedFont("Farm Pixel", _optionalChain([descriptor, 'access', _25 => _25.fonts, 'optionalAccess', _26 => _26.display]), "400 700")}
|
|
545
548
|
.sans{font-family:"Farm Sans","Arial",sans-serif}.mono,.label,.code,.diagram-title,.micro{font-family:"Farm Mono","Menlo","DejaVu Sans Mono",monospace}.pixel{font-family:"Farm Pixel","Farm Mono",monospace}.label{fill:#8b8b8b;font-size:10px;font-weight:600;letter-spacing:1.2px}.code{fill:#8b8b8b;font-size:11px}.diagram-title{fill:#e7e7e7;font-size:11px;font-weight:650}.micro{fill:#777;font-size:8px;letter-spacing:.45px}.bright{fill:#f5f5f4}.ink{fill:#050505}.ink-muted{fill:#4c4c4c}
|
|
546
549
|
</style>
|
|
547
550
|
<defs>
|
|
@@ -585,7 +588,7 @@ function renderFarmDocsSocialImageSvg(descriptor) {
|
|
|
585
588
|
}
|
|
586
589
|
function renderFarmDocsSocialMetadata(descriptor, customImage) {
|
|
587
590
|
const imageUrl = customImage ? new URL(customImage, descriptor.pageUrl).href : descriptor.imageUrl;
|
|
588
|
-
const customExtension = _optionalChain([customImage, 'optionalAccess',
|
|
591
|
+
const customExtension = _optionalChain([customImage, 'optionalAccess', _27 => _27.toLowerCase, 'call', _28 => _28(), 'access', _29 => _29.split, 'call', _30 => _30(/[?#]/, 1), 'access', _31 => _31[0]]);
|
|
589
592
|
const imageType = !customExtension ? descriptor.format === "png" ? "image/png" : "image/svg+xml" : customExtension.endsWith(".webp") ? "image/webp" : customExtension.endsWith(".png") ? "image/png" : customExtension.match(/\.jpe?g$/) ? "image/jpeg" : "image/svg+xml";
|
|
590
593
|
const tag = (property, content, name = false) => `<meta ${name ? "name" : "property"}="${property}" content="${escapeXml(content)}">`;
|
|
591
594
|
return [
|
|
@@ -632,7 +635,7 @@ function normalizeSlug(value) {
|
|
|
632
635
|
return trimSlashes(decodeDocsPath(value)).replace(/\.(mdx?|markdown)$/i, "");
|
|
633
636
|
}
|
|
634
637
|
function resolveFarmDocsFavicon(docs, options) {
|
|
635
|
-
const configuredFavicon = _optionalChain([docs, 'optionalAccess',
|
|
638
|
+
const configuredFavicon = _optionalChain([docs, 'optionalAccess', _32 => _32.config, 'access', _33 => _33.favicon]);
|
|
636
639
|
if (typeof configuredFavicon === "string" && configuredFavicon.trim()) {
|
|
637
640
|
return configuredFavicon.trim();
|
|
638
641
|
}
|
|
@@ -646,7 +649,7 @@ function resolveFarmDocsFavicon(docs, options) {
|
|
|
646
649
|
return FARM_DOCS_FALLBACK_FAVICON;
|
|
647
650
|
}
|
|
648
651
|
function renderFarmDocsFaviconLink(faviconHref) {
|
|
649
|
-
const normalizedHref = _optionalChain([faviconHref, 'access',
|
|
652
|
+
const normalizedHref = _optionalChain([faviconHref, 'access', _34 => _34.split, 'call', _35 => _35(/[?#]/, 1), 'access', _36 => _36[0], 'optionalAccess', _37 => _37.toLowerCase, 'call', _38 => _38()]) || "";
|
|
650
653
|
const type = normalizedHref.endsWith(".svg") || faviconHref.startsWith("data:image/svg+xml") ? "image/svg+xml" : normalizedHref.endsWith(".png") ? "image/png" : normalizedHref.endsWith(".ico") ? "image/x-icon" : void 0;
|
|
651
654
|
const metadata = type === "image/svg+xml" ? ' sizes="any" type="image/svg+xml"' : type ? ` type="${type}"` : "";
|
|
652
655
|
return `<link rel="icon" href="${escapeAttribute(faviconHref)}"${metadata}>`;
|
|
@@ -662,7 +665,7 @@ function renderFarmDocsBrandMark() {
|
|
|
662
665
|
</svg>`;
|
|
663
666
|
}
|
|
664
667
|
function renderFarmDocsBrandTitle(navTitle) {
|
|
665
|
-
const suffix = _optionalChain([navTitle, 'access',
|
|
668
|
+
const suffix = _optionalChain([navTitle, 'access', _39 => _39.match, 'call', _40 => _40(/\.js$/i), 'optionalAccess', _41 => _41[0]]);
|
|
666
669
|
if (!suffix) {
|
|
667
670
|
return `<span class="sidebar-brand-title">${escapeHtml(navTitle)}</span>`;
|
|
668
671
|
}
|
|
@@ -694,7 +697,7 @@ function resolveExistingFileInside(root, target) {
|
|
|
694
697
|
}
|
|
695
698
|
}
|
|
696
699
|
function isFarmDocsRequest(docs, request) {
|
|
697
|
-
if (!_optionalChain([docs, 'optionalAccess',
|
|
700
|
+
if (!_optionalChain([docs, 'optionalAccess', _42 => _42.enabled])) return false;
|
|
698
701
|
if (request.method !== "GET" && request.method !== "HEAD") return false;
|
|
699
702
|
const pathname = new URL(request.url).pathname;
|
|
700
703
|
const entry = normalizeEntry2(docs.entry);
|
|
@@ -728,7 +731,7 @@ function getFarmDocsRoots(docs) {
|
|
|
728
731
|
];
|
|
729
732
|
}
|
|
730
733
|
function getFarmDocsRouteTypeEntries(docs) {
|
|
731
|
-
if (!_optionalChain([docs, 'optionalAccess',
|
|
734
|
+
if (!_optionalChain([docs, 'optionalAccess', _43 => _43.enabled])) return [];
|
|
732
735
|
return getFarmDocsRoots(docs).flatMap((root) => {
|
|
733
736
|
const entry = normalizeEntry2(root.entry);
|
|
734
737
|
if (entry === "/") return ["/", "/[...docs]"];
|
|
@@ -736,7 +739,7 @@ function getFarmDocsRouteTypeEntries(docs) {
|
|
|
736
739
|
});
|
|
737
740
|
}
|
|
738
741
|
function getFarmDocsDocumentNavigationMatchers(docs) {
|
|
739
|
-
if (!_optionalChain([docs, 'optionalAccess',
|
|
742
|
+
if (!_optionalChain([docs, 'optionalAccess', _44 => _44.enabled])) return [];
|
|
740
743
|
return getFarmDocsRoots(docs).map((root) => {
|
|
741
744
|
const entry = normalizeEntry2(root.entry);
|
|
742
745
|
return entry === "/" ? "/(.*)" : `${entry}(.*)`;
|
|
@@ -817,7 +820,7 @@ function titleFromSlug(slug) {
|
|
|
817
820
|
return lastSegment.split(/[-_]/).filter(Boolean).map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join(" ");
|
|
818
821
|
}
|
|
819
822
|
function titleFromMarkdown(body, fallback) {
|
|
820
|
-
const heading = _optionalChain([body, 'access',
|
|
823
|
+
const heading = _optionalChain([body, 'access', _45 => _45.match, 'call', _46 => _46(/^#\s+(.+)$/m), 'optionalAccess', _47 => _47[1], 'optionalAccess', _48 => _48.trim, 'call', _49 => _49()]);
|
|
821
824
|
return heading || fallback;
|
|
822
825
|
}
|
|
823
826
|
function createLastModifiedResolver(contentDir, sourcePath, frontmatter) {
|
|
@@ -922,6 +925,19 @@ function discoverFarmDocsPages(contentDir, docs) {
|
|
|
922
925
|
visit(contentDir);
|
|
923
926
|
return pages.sort((a, b) => a.href.localeCompare(b.href));
|
|
924
927
|
}
|
|
928
|
+
function listFarmDocsBuiltInPrerenderPages(docs, options) {
|
|
929
|
+
const pages = [];
|
|
930
|
+
const originDependent = [];
|
|
931
|
+
for (const root of getFarmDocsRoots(docs)) {
|
|
932
|
+
const contentDir = resolveFarmDocsContentDir(root, options);
|
|
933
|
+
for (const page of discoverFarmDocsPages(contentDir, root)) {
|
|
934
|
+
const loaded = loadFarmDocsPage(contentDir, root, page.slug);
|
|
935
|
+
if (!loaded) continue;
|
|
936
|
+
(farmDocsPageUsesRequestOrigin(loaded, root) ? originDependent : pages).push(loaded.href);
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
return { pages: [...new Set(pages)], originDependent: [...new Set(originDependent)] };
|
|
940
|
+
}
|
|
925
941
|
function toFarmDocsMarkdownPage(page, basePath = "") {
|
|
926
942
|
const lastModified = page.lastModified || page.frontmatter.lastModified || page.frontmatter.lastmod;
|
|
927
943
|
return {
|
|
@@ -980,10 +996,10 @@ function getDocsTitle(docs) {
|
|
|
980
996
|
return typeof docs.config.nav === "object" && docs.config.nav && "title" in docs.config.nav ? String(docs.config.nav.title || "Documentation") : "Documentation";
|
|
981
997
|
}
|
|
982
998
|
function getDocsDescription(docs) {
|
|
983
|
-
return _optionalChain([docs, 'access',
|
|
999
|
+
return _optionalChain([docs, 'access', _50 => _50.config, 'access', _51 => _51.metadata, 'optionalAccess', _52 => _52.description]);
|
|
984
1000
|
}
|
|
985
1001
|
function getLoadedDocsPages(contentDir, docs, isPathGuarded) {
|
|
986
|
-
return discoverFarmDocsPages(contentDir, docs).filter((page) => !_optionalChain([isPathGuarded, 'optionalCall',
|
|
1002
|
+
return discoverFarmDocsPages(contentDir, docs).filter((page) => !_optionalChain([isPathGuarded, 'optionalCall', _53 => _53(page.href)])).map((page) => loadFarmDocsPage(contentDir, docs, page.slug)).filter((page) => Boolean(page));
|
|
987
1003
|
}
|
|
988
1004
|
function toDocsLlmsPage(page) {
|
|
989
1005
|
return toFarmDocsMarkdownPage(page);
|
|
@@ -1048,7 +1064,7 @@ function resolveReadingTimeDisplayConfig(docs) {
|
|
|
1048
1064
|
}
|
|
1049
1065
|
function countMarkdownWords(body, includeCode) {
|
|
1050
1066
|
const readable = (includeCode ? body : body.replace(/```[\s\S]*?```/g, " ").replace(/`[^`]*`/g, " ")).replace(/!\[[^\]]*]\([^)]*\)/g, " ").replace(/\[([^\]]+)]\([^)]*\)/g, "$1").replace(/<[^>]+>/g, " ").replace(/[#>*_~`|:-]/g, " ");
|
|
1051
|
-
return _nullishCoalesce(_optionalChain([readable, 'access',
|
|
1067
|
+
return _nullishCoalesce(_optionalChain([readable, 'access', _54 => _54.match, 'call', _55 => _55(/[A-Za-z0-9]+(?:[-'][A-Za-z0-9]+)*/g), 'optionalAccess', _56 => _56.length]), () => ( 0));
|
|
1052
1068
|
}
|
|
1053
1069
|
function renderReadingTimeMeta(page, docs) {
|
|
1054
1070
|
const config = resolveReadingTimeDisplayConfig(docs);
|
|
@@ -1293,7 +1309,7 @@ function stripHtml(value) {
|
|
|
1293
1309
|
}
|
|
1294
1310
|
function getCodeFence(line) {
|
|
1295
1311
|
const match = /^(?: {0,3})(`{3,}|~{3,})/.exec(line);
|
|
1296
|
-
const value = _optionalChain([match, 'optionalAccess',
|
|
1312
|
+
const value = _optionalChain([match, 'optionalAccess', _57 => _57[1]]);
|
|
1297
1313
|
if (!value) return null;
|
|
1298
1314
|
return { marker: value[0], length: value.length };
|
|
1299
1315
|
}
|
|
@@ -1373,15 +1389,15 @@ function isCodePathLabel(label) {
|
|
|
1373
1389
|
}
|
|
1374
1390
|
function parseCodeInfo(info) {
|
|
1375
1391
|
const source = (info || "").trim();
|
|
1376
|
-
const language = _optionalChain([source, 'access',
|
|
1377
|
-
const explicitLabel = _optionalChain([source, 'access',
|
|
1392
|
+
const language = _optionalChain([source, 'access', _58 => _58.match, 'call', _59 => _59(/^\S+/), 'optionalAccess', _60 => _60[0]]) || "text";
|
|
1393
|
+
const explicitLabel = _optionalChain([source, 'access', _61 => _61.match, 'call', _62 => _62(/\b(?:title|filename|file|label|name)=["']([^"']+)["']/), 'optionalAccess', _63 => _63[1], 'optionalAccess', _64 => _64.trim, 'call', _65 => _65()]);
|
|
1378
1394
|
return { language, label: explicitLabel || language, hasExplicitLabel: Boolean(explicitLabel) };
|
|
1379
1395
|
}
|
|
1380
1396
|
function getStandaloneCodeLabel(line) {
|
|
1381
1397
|
const trimmed = line.trim();
|
|
1382
1398
|
const match = /^(?:\*\*([^*]+)\*\*|__([^_]+)__|`([^`]+)`)$/u.exec(trimmed);
|
|
1383
|
-
const label = _optionalChain([match, 'optionalAccess',
|
|
1384
|
-
return _optionalChain([label, 'optionalAccess',
|
|
1399
|
+
const label = _optionalChain([match, 'optionalAccess', _66 => _66[1]]) || _optionalChain([match, 'optionalAccess', _67 => _67[2]]) || _optionalChain([match, 'optionalAccess', _68 => _68[3]]);
|
|
1400
|
+
return _optionalChain([label, 'optionalAccess', _69 => _69.trim, 'call', _70 => _70()]) || null;
|
|
1385
1401
|
}
|
|
1386
1402
|
function hasCodeFenceTitle(info) {
|
|
1387
1403
|
return /\b(?:title|filename|file|label|name)=["'][^"']+["']/.test(info);
|
|
@@ -1511,7 +1527,7 @@ function getThemeName(docs) {
|
|
|
1511
1527
|
return theme && typeof theme === "object" && "name" in theme ? String(theme.name || "farm-docs") : "farm-docs";
|
|
1512
1528
|
}
|
|
1513
1529
|
function getThemeTocDepth(docs) {
|
|
1514
|
-
const toc = _optionalChain([getThemeUI, 'call',
|
|
1530
|
+
const toc = _optionalChain([getThemeUI, 'call', _71 => _71(docs), 'access', _72 => _72.layout, 'optionalAccess', _73 => _73.toc]);
|
|
1515
1531
|
return toc && typeof toc === "object" && typeof toc.depth === "number" ? toc.depth : 3;
|
|
1516
1532
|
}
|
|
1517
1533
|
var SIDEBAR_SECTION_ORDER = [
|
|
@@ -1649,7 +1665,7 @@ function renderSidebarLabel(docs, icon, label, className) {
|
|
|
1649
1665
|
return `<span class="${className}">${renderSidebarIcon(docs, icon)}<span class="sidebar-label-text">${escapeHtml(label)}</span></span>`;
|
|
1650
1666
|
}
|
|
1651
1667
|
function getSidebarPageLabel(item, configured) {
|
|
1652
|
-
if (_optionalChain([configured, 'optionalAccess',
|
|
1668
|
+
if (_optionalChain([configured, 'optionalAccess', _74 => _74.label])) return configured.label;
|
|
1653
1669
|
if (item.slug === "") return "Why?";
|
|
1654
1670
|
if (item.slug === "integrations") return "Overview";
|
|
1655
1671
|
if (item.slug === "integrations/ui-registry") return "UI Registry";
|
|
@@ -1661,7 +1677,7 @@ function getSidebarPageLabel(item, configured) {
|
|
|
1661
1677
|
}
|
|
1662
1678
|
function renderSidebarLink(item, activeHref, docs, basePath, configured) {
|
|
1663
1679
|
const active = item.href === activeHref;
|
|
1664
|
-
return `<a class="fd-sidebar-link${active ? " fd-sidebar-link-active" : ""}" data-active="${active ? "true" : "false"}" href="${escapeAttribute(_chunkD22BUQKWcjs.applyFarmBasePath.call(void 0, item.href, basePath))}">${renderSidebarLabel(docs, _optionalChain([configured, 'optionalAccess',
|
|
1680
|
+
return `<a class="fd-sidebar-link${active ? " fd-sidebar-link-active" : ""}" data-active="${active ? "true" : "false"}" href="${escapeAttribute(_chunkD22BUQKWcjs.applyFarmBasePath.call(void 0, item.href, basePath))}">${renderSidebarLabel(docs, _optionalChain([configured, 'optionalAccess', _75 => _75.icon]), getSidebarPageLabel(item, configured), "sidebar-link-label fd-sidebar-link-label")}</a>`;
|
|
1665
1681
|
}
|
|
1666
1682
|
function collectConfiguredSidebarPages(items, maps, seen = /* @__PURE__ */ new Set()) {
|
|
1667
1683
|
const ordered = [];
|
|
@@ -1872,8 +1888,8 @@ function renderFarmDocsFontPreloadHeader(fontAssets) {
|
|
|
1872
1888
|
}
|
|
1873
1889
|
function getFarmLayoutFontPreloads(layoutFonts) {
|
|
1874
1890
|
const seen = /* @__PURE__ */ new Set();
|
|
1875
|
-
return [_optionalChain([layoutFonts, 'optionalAccess',
|
|
1876
|
-
(font) => (_optionalChain([font, 'optionalAccess',
|
|
1891
|
+
return [_optionalChain([layoutFonts, 'optionalAccess', _76 => _76.body]), _optionalChain([layoutFonts, 'optionalAccess', _77 => _77.code])].flatMap(
|
|
1892
|
+
(font) => (_optionalChain([font, 'optionalAccess', _78 => _78.preloads]) || []).filter(({ href }) => {
|
|
1877
1893
|
if (seen.has(href)) return false;
|
|
1878
1894
|
seen.add(href);
|
|
1879
1895
|
return true;
|
|
@@ -1885,7 +1901,7 @@ function renderFarmLayoutFontPreloadHeader(layoutFonts) {
|
|
|
1885
1901
|
}
|
|
1886
1902
|
function renderPixelDocsHtml(page, pages, docs, clientEntry, faviconHref, requestUrl, fontAssets, basePath, fontStylesheetHref, globalStylesheetHref, socialImageFormat = "svg") {
|
|
1887
1903
|
const navTitle = typeof docs.config.nav === "object" && docs.config.nav && "title" in docs.config.nav ? String(docs.config.nav.title || "Docs") : "Docs";
|
|
1888
|
-
const description = page.description || _optionalChain([docs, 'access',
|
|
1904
|
+
const description = page.description || _optionalChain([docs, 'access', _79 => _79.config, 'access', _80 => _80.metadata, 'optionalAccess', _81 => _81.description]) || "";
|
|
1889
1905
|
const renderedMarkdown = renderMarkdownDocument(page.body, getThemeTocDepth(docs));
|
|
1890
1906
|
const tocItems = renderedMarkdown.tocItems;
|
|
1891
1907
|
const themeName = getThemeName(docs);
|
|
@@ -1961,7 +1977,7 @@ function createFarmDocsHandler(docs, options) {
|
|
|
1961
1977
|
const fallbackFontPreloadHeader = renderFarmDocsFontPreloadHeader(fontAssets);
|
|
1962
1978
|
const basePath = _chunkD22BUQKWcjs.normalizeFarmBasePath.call(void 0, options.basePath);
|
|
1963
1979
|
return async function handleFarmDocsRequest(incomingRequest) {
|
|
1964
|
-
if (!_optionalChain([docs, 'optionalAccess',
|
|
1980
|
+
if (!_optionalChain([docs, 'optionalAccess', _82 => _82.enabled]) || incomingRequest.method !== "GET" && incomingRequest.method !== "HEAD") {
|
|
1965
1981
|
return null;
|
|
1966
1982
|
}
|
|
1967
1983
|
await _chunkV3UOEWCBcjs.loadFarmDocsEngine.call(void 0, );
|
|
@@ -1976,7 +1992,7 @@ function createFarmDocsHandler(docs, options) {
|
|
|
1976
1992
|
const socialImagePage = loadFarmDocsPage(contentDir, docs, socialImageTarget.slug);
|
|
1977
1993
|
if (!socialImagePage || // The image sits outside the page's URL, where its guard does not reach, and
|
|
1978
1994
|
// draws the page's title.
|
|
1979
|
-
_optionalChain([options, 'access',
|
|
1995
|
+
_optionalChain([options, 'access', _83 => _83.isPathGuarded, 'optionalCall', _84 => _84(socialImagePage.href)]) || !isFarmDocsSocialImageEnabled(socialImagePage, docs) || getFarmDocsCustomSocialImage(socialImagePage)) {
|
|
1980
1996
|
return null;
|
|
1981
1997
|
}
|
|
1982
1998
|
const descriptor = createFarmDocsSocialImageDescriptor(
|
|
@@ -2019,7 +2035,7 @@ function createFarmDocsHandler(docs, options) {
|
|
|
2019
2035
|
const page = loadPage(contentDir, docs, request);
|
|
2020
2036
|
if (!page) return null;
|
|
2021
2037
|
const negotiatesAccept = !requestUrl.pathname.endsWith(".md");
|
|
2022
|
-
if (!negotiatesAccept && _optionalChain([options, 'access',
|
|
2038
|
+
if (!negotiatesAccept && _optionalChain([options, 'access', _85 => _85.isPathGuarded, 'optionalCall', _86 => _86(page.href)]) && !options.isPathGuarded(getFarmDocsMarkdownPath(page.href))) {
|
|
2023
2039
|
return null;
|
|
2024
2040
|
}
|
|
2025
2041
|
if (shouldReturnMarkdown(request)) {
|
|
@@ -2045,8 +2061,8 @@ function createFarmDocsHandler(docs, options) {
|
|
|
2045
2061
|
}
|
|
2046
2062
|
const pathname = new URL(request.url).pathname;
|
|
2047
2063
|
const socialImageFormat = isFarmDocsSocialImageEnabled(page, docs) && !getFarmDocsCustomSocialImage(page) ? await resolveFarmDocsSocialImageFormat() : "svg";
|
|
2048
|
-
const layoutFonts = await _optionalChain([options, 'access',
|
|
2049
|
-
const usesLayoutFonts = Boolean(_optionalChain([layoutFonts, 'optionalAccess',
|
|
2064
|
+
const layoutFonts = await _optionalChain([options, 'access', _87 => _87.resolveLayoutFonts, 'optionalCall', _88 => _88(pathname)]);
|
|
2065
|
+
const usesLayoutFonts = Boolean(_optionalChain([layoutFonts, 'optionalAccess', _89 => _89.body]) || _optionalChain([layoutFonts, 'optionalAccess', _90 => _90.code]));
|
|
2050
2066
|
const activeFontAssets = usesLayoutFonts ? [] : fontAssets;
|
|
2051
2067
|
const fontPreloadHeader = usesLayoutFonts ? renderFarmLayoutFontPreloadHeader(layoutFonts) : fallbackFontPreloadHeader;
|
|
2052
2068
|
return omitFarmDocsHeadBody(
|
|
@@ -2097,4 +2113,5 @@ function createFarmDocsHandler(docs, options) {
|
|
|
2097
2113
|
|
|
2098
2114
|
|
|
2099
2115
|
|
|
2100
|
-
|
|
2116
|
+
|
|
2117
|
+
exports.FARM_DOCS_LAST_MODIFIED_MANIFEST = FARM_DOCS_LAST_MODIFIED_MANIFEST; exports.createFarmDocsLastModifiedManifest = createFarmDocsLastModifiedManifest; exports.isFarmDocsRequest = isFarmDocsRequest; exports.resolveFarmDocsContentDir = resolveFarmDocsContentDir; exports.getFarmDocsRoots = getFarmDocsRoots; exports.getFarmDocsRouteTypeEntries = getFarmDocsRouteTypeEntries; exports.getFarmDocsDocumentNavigationMatchers = getFarmDocsDocumentNavigationMatchers; exports.loadFarmDocsPage = loadFarmDocsPage; exports.getFarmDocsMarkdownPath = getFarmDocsMarkdownPath; exports.discoverFarmDocsPages = discoverFarmDocsPages; exports.listFarmDocsBuiltInPrerenderPages = listFarmDocsBuiltInPrerenderPages; exports.toFarmDocsMarkdownPage = toFarmDocsMarkdownPage; exports.getFarmDocsSiteUrl = getFarmDocsSiteUrl; exports.getFarmDocsPublicEntry = getFarmDocsPublicEntry; exports.toFarmDocsPublicSitemapConfig = toFarmDocsPublicSitemapConfig; exports.buildFarmDocsSitemapManifest = buildFarmDocsSitemapManifest; exports.renderFarmDocsRobotsTxt = renderFarmDocsRobotsTxt; exports.createFarmDocsHandler = createFarmDocsHandler;
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
createFarmDeploymentMismatchError,
|
|
30
30
|
createFarmDeploymentRequestHeaders,
|
|
31
31
|
isFarmDeploymentMismatchResponse
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-NVOMQLI2.mjs";
|
|
33
33
|
import {
|
|
34
34
|
readDeferredDataResponse
|
|
35
35
|
} from "./chunk-7BIW7VCW.mjs";
|
|
@@ -74,16 +74,25 @@ async function evaluateMdxSource(source, filePath) {
|
|
|
74
74
|
}
|
|
75
75
|
function createFarmMarkdownRouteModule(input) {
|
|
76
76
|
const { body } = parseMarkdownFrontmatter(input.source);
|
|
77
|
-
const components = input.components || {};
|
|
78
77
|
const className = input.config?.className || "farm-markdown";
|
|
79
78
|
let evaluatedPromise;
|
|
79
|
+
let componentsPromise;
|
|
80
80
|
const loadContent = async () => {
|
|
81
81
|
evaluatedPromise ?? (evaluatedPromise = evaluateMdxSource(body, input.filePath));
|
|
82
82
|
return evaluatedPromise;
|
|
83
83
|
};
|
|
84
|
+
const loadComponents = () => {
|
|
85
|
+
const configured = input.components;
|
|
86
|
+
if (typeof configured !== "function") return configured || {};
|
|
87
|
+
componentsPromise ?? (componentsPromise = configured().catch((error) => {
|
|
88
|
+
componentsPromise = void 0;
|
|
89
|
+
throw error;
|
|
90
|
+
}));
|
|
91
|
+
return componentsPromise;
|
|
92
|
+
};
|
|
84
93
|
async function FarmMarkdownPage(props) {
|
|
85
94
|
const { createElement } = await import("react");
|
|
86
|
-
const evaluated = await loadContent();
|
|
95
|
+
const [evaluated, components] = await Promise.all([loadContent(), loadComponents()]);
|
|
87
96
|
const MDXContent = evaluated.default;
|
|
88
97
|
return createElement(
|
|
89
98
|
"article",
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkBDYM2TN3cjs = require('./chunk-BDYM2TN3.cjs');
|
|
4
|
+
|
|
5
|
+
// src/plugin-server-runtime.ts
|
|
6
|
+
function hasFarmServerRuntimePlugins(plugins) {
|
|
7
|
+
return (plugins || []).some((plugin) => {
|
|
8
|
+
if (_chunkBDYM2TN3cjs.getFarmIntegrationPluginServerRuntime.call(void 0, plugin) === false) return false;
|
|
9
|
+
return Boolean(
|
|
10
|
+
plugin.setup || plugin.init || plugin.ready || plugin.shutdown || plugin.runtime || plugin.router || plugin.render || plugin.beforeRouteMatch || plugin.afterRouteMatch || plugin.beforeRender || plugin.afterRender || plugin.onError || plugin.transformHTML
|
|
11
|
+
);
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
exports.hasFarmServerRuntimePlugins = hasFarmServerRuntimePlugins;
|
|
@@ -132,6 +132,20 @@ function readCookie(cookieHeader, name) {
|
|
|
132
132
|
function isSafeRequestMethod(method) {
|
|
133
133
|
return ["GET", "HEAD", "OPTIONS", "QUERY"].includes(method.toUpperCase());
|
|
134
134
|
}
|
|
135
|
+
var CLOUDFLARE_POPULATE_PROCESS_ENV_FLAG = "nodejs_compat_populate_process_env";
|
|
136
|
+
var CLOUDFLARE_DO_NOT_POPULATE_PROCESS_ENV_FLAG = "nodejs_compat_do_not_populate_process_env";
|
|
137
|
+
var CLOUDFLARE_POPULATE_PROCESS_ENV_DATE = "2025-04-01";
|
|
138
|
+
function resolveCloudflareProcessEnvFlags(wrangler) {
|
|
139
|
+
const date = wrangler.compatibility_date;
|
|
140
|
+
const flags = wrangler.compatibility_flags;
|
|
141
|
+
if (typeof date !== "string" || date >= CLOUDFLARE_POPULATE_PROCESS_ENV_DATE) return void 0;
|
|
142
|
+
if (!Array.isArray(flags) || !flags.includes("nodejs_compat")) return void 0;
|
|
143
|
+
if (flags.includes(CLOUDFLARE_POPULATE_PROCESS_ENV_FLAG) || flags.includes(CLOUDFLARE_DO_NOT_POPULATE_PROCESS_ENV_FLAG)) {
|
|
144
|
+
return void 0;
|
|
145
|
+
}
|
|
146
|
+
return [...flags, CLOUDFLARE_POPULATE_PROCESS_ENV_FLAG];
|
|
147
|
+
}
|
|
148
|
+
|
|
135
149
|
|
|
136
150
|
|
|
137
151
|
|
|
@@ -151,4 +165,4 @@ function isSafeRequestMethod(method) {
|
|
|
151
165
|
|
|
152
166
|
|
|
153
167
|
|
|
154
|
-
exports.FARM_DEPLOYMENT_ID_HEADER = FARM_DEPLOYMENT_ID_HEADER; exports.FARM_DEPLOYMENT_MISMATCH_HEADER = FARM_DEPLOYMENT_MISMATCH_HEADER; exports.FARM_DEPLOYMENT_COOKIE = FARM_DEPLOYMENT_COOKIE; exports.FARM_DEPLOYMENT_MISMATCH_CODE = FARM_DEPLOYMENT_MISMATCH_CODE; exports.FARM_DEPLOYMENT_MISMATCH_STATUS = FARM_DEPLOYMENT_MISMATCH_STATUS; exports.getFarmPresetRuntime = getFarmPresetRuntime; exports.FarmDeploymentMismatchError = FarmDeploymentMismatchError; exports.normalizeFarmDeploymentId = normalizeFarmDeploymentId; exports.createFarmDeploymentRequestHeaders = createFarmDeploymentRequestHeaders; exports.getFarmRequestDeploymentId = getFarmRequestDeploymentId; exports.getFarmDeploymentMismatch = getFarmDeploymentMismatch; exports.createFarmDeploymentMismatchResponse = createFarmDeploymentMismatchResponse; exports.withFarmDeploymentResponse = withFarmDeploymentResponse; exports.getFarmResponseDeploymentId = getFarmResponseDeploymentId; exports.isFarmDeploymentMismatchResponse = isFarmDeploymentMismatchResponse; exports.createFarmDeploymentMismatchError = createFarmDeploymentMismatchError; exports.createFarmDeploymentCookie = createFarmDeploymentCookie;
|
|
168
|
+
exports.FARM_DEPLOYMENT_ID_HEADER = FARM_DEPLOYMENT_ID_HEADER; exports.FARM_DEPLOYMENT_MISMATCH_HEADER = FARM_DEPLOYMENT_MISMATCH_HEADER; exports.FARM_DEPLOYMENT_COOKIE = FARM_DEPLOYMENT_COOKIE; exports.FARM_DEPLOYMENT_MISMATCH_CODE = FARM_DEPLOYMENT_MISMATCH_CODE; exports.FARM_DEPLOYMENT_MISMATCH_STATUS = FARM_DEPLOYMENT_MISMATCH_STATUS; exports.getFarmPresetRuntime = getFarmPresetRuntime; exports.FarmDeploymentMismatchError = FarmDeploymentMismatchError; exports.normalizeFarmDeploymentId = normalizeFarmDeploymentId; exports.createFarmDeploymentRequestHeaders = createFarmDeploymentRequestHeaders; exports.getFarmRequestDeploymentId = getFarmRequestDeploymentId; exports.getFarmDeploymentMismatch = getFarmDeploymentMismatch; exports.createFarmDeploymentMismatchResponse = createFarmDeploymentMismatchResponse; exports.withFarmDeploymentResponse = withFarmDeploymentResponse; exports.getFarmResponseDeploymentId = getFarmResponseDeploymentId; exports.isFarmDeploymentMismatchResponse = isFarmDeploymentMismatchResponse; exports.createFarmDeploymentMismatchError = createFarmDeploymentMismatchError; exports.createFarmDeploymentCookie = createFarmDeploymentCookie; exports.resolveCloudflareProcessEnvFlags = resolveCloudflareProcessEnvFlags;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import {
|
|
2
|
+
FARM_ACTION_RESULT_KEY
|
|
3
|
+
} from "./chunk-X3EFRVXY.mjs";
|
|
4
|
+
import {
|
|
5
|
+
getServerActionInvalidations,
|
|
6
|
+
runWithServerActionRequest,
|
|
7
|
+
sanitizeServerActionError,
|
|
8
|
+
serializeServerFnFailure
|
|
9
|
+
} from "./chunk-E46NXBNJ.mjs";
|
|
10
|
+
import {
|
|
11
|
+
_peekCurrentRequest
|
|
12
|
+
} from "./chunk-VIXTAVEA.mjs";
|
|
13
|
+
import {
|
|
14
|
+
getFarmRedirectError,
|
|
15
|
+
isFarmNotFoundError
|
|
16
|
+
} from "./chunk-JNYFXL7X.mjs";
|
|
17
|
+
|
|
18
|
+
// src/form-actions.ts
|
|
19
|
+
import { encode, FORM_STATE_SCRIPT_TYPE } from "@farm.js/islx";
|
|
20
|
+
import { escapeScriptJson, handleAction, registerServerReference } from "@farm.js/islx/server";
|
|
21
|
+
var FARM_FORM_ACTION_HEADER = "F-Action";
|
|
22
|
+
function registerFarmFormAction(action, id) {
|
|
23
|
+
return registerServerReference(action, id);
|
|
24
|
+
}
|
|
25
|
+
var formStates = /* @__PURE__ */ new WeakMap();
|
|
26
|
+
function getFarmFormState() {
|
|
27
|
+
const request = _peekCurrentRequest();
|
|
28
|
+
return request ? formStates.get(request) : void 0;
|
|
29
|
+
}
|
|
30
|
+
function renderFarmFormStateScript() {
|
|
31
|
+
const formState = getFarmFormState();
|
|
32
|
+
if (formState === void 0) return "";
|
|
33
|
+
return `<script type="${FORM_STATE_SCRIPT_TYPE}">${escapeScriptJson(JSON.stringify(encode(formState)))}</script>`;
|
|
34
|
+
}
|
|
35
|
+
async function handleFarmFormActionRequest(request, config, requestedUrl = request.url) {
|
|
36
|
+
let actionRedirected = false;
|
|
37
|
+
const response = await handleAction(request, {
|
|
38
|
+
allowedOrigins: config.allowedOrigins,
|
|
39
|
+
bodySizeLimit: config.bodySizeLimit,
|
|
40
|
+
// The result islx sends is the envelope, not the action's own type.
|
|
41
|
+
run: (actionRequest, action) => runFarmFormAction(actionRequest, action),
|
|
42
|
+
mapError(error) {
|
|
43
|
+
const redirect = getFarmRedirectError(error);
|
|
44
|
+
if (redirect) {
|
|
45
|
+
actionRedirected = true;
|
|
46
|
+
return { redirect: redirect.url };
|
|
47
|
+
}
|
|
48
|
+
if (isFarmNotFoundError(error)) return { status: 404 };
|
|
49
|
+
const failure = serializeServerFnFailure(error);
|
|
50
|
+
if (failure) return { status: failure.status };
|
|
51
|
+
return void 0;
|
|
52
|
+
},
|
|
53
|
+
onError: (error) => console.error("[Farm.js] Server action failed:", error),
|
|
54
|
+
renderFormState(formState) {
|
|
55
|
+
formStates.set(request, formState);
|
|
56
|
+
return null;
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
if (!response || actionRedirected) return response;
|
|
60
|
+
return returnToRequestedUrl(response, request.url, requestedUrl);
|
|
61
|
+
}
|
|
62
|
+
function returnToRequestedUrl(response, url, requestedUrl) {
|
|
63
|
+
if (response.status !== 303 || requestedUrl === url) return response;
|
|
64
|
+
const served = new URL(url);
|
|
65
|
+
if (response.headers.get("location") !== served.pathname + served.search) return response;
|
|
66
|
+
const requested = new URL(requestedUrl);
|
|
67
|
+
const headers = new Headers(response.headers);
|
|
68
|
+
headers.set("location", requested.pathname + requested.search);
|
|
69
|
+
return new Response(response.body, { status: 303, headers });
|
|
70
|
+
}
|
|
71
|
+
async function runFarmFormAction(request, action) {
|
|
72
|
+
if (!request.headers.has(FARM_FORM_ACTION_HEADER)) {
|
|
73
|
+
return runWithServerActionRequest(request, action);
|
|
74
|
+
}
|
|
75
|
+
try {
|
|
76
|
+
return await runWithServerActionRequest(request, async () => {
|
|
77
|
+
const value = await action();
|
|
78
|
+
return {
|
|
79
|
+
[FARM_ACTION_RESULT_KEY]: { invalidations: [...getServerActionInvalidations()] },
|
|
80
|
+
value
|
|
81
|
+
};
|
|
82
|
+
});
|
|
83
|
+
} catch (error) {
|
|
84
|
+
if (!serializeServerFnFailure(error)) throw error;
|
|
85
|
+
return {
|
|
86
|
+
[FARM_ACTION_RESULT_KEY]: { invalidations: [], error: sanitizeServerActionError(error) }
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export {
|
|
92
|
+
FARM_FORM_ACTION_HEADER,
|
|
93
|
+
registerFarmFormAction,
|
|
94
|
+
getFarmFormState,
|
|
95
|
+
renderFarmFormStateScript,
|
|
96
|
+
handleFarmFormActionRequest
|
|
97
|
+
};
|
|
@@ -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 _chunkSQ6IWJ3Hcjs = require('./chunk-SQ6IWJ3H.cjs');
|
|
4
4
|
|
|
5
5
|
// src/deployment-environment.ts
|
|
6
6
|
function isFarmProductionDeploymentEnvironment(env = process.env) {
|
|
@@ -90,7 +90,7 @@ function createFarmProductionSiteReporter(options) {
|
|
|
90
90
|
schemaVersion: FARM_PRODUCTION_SITE_TELEMETRY_SCHEMA_VERSION,
|
|
91
91
|
eventType: FARM_PRODUCTION_SITE_ATTESTATION_EVENT_TYPE,
|
|
92
92
|
packageName: FARM_PRODUCTION_SITE_TELEMETRY_PACKAGE_NAME,
|
|
93
|
-
packageVersion: sanitizeDetail(
|
|
93
|
+
packageVersion: sanitizeDetail(_chunkSQ6IWJ3Hcjs.FARM_VERSION, "unknown"),
|
|
94
94
|
renderer: sanitizeDetail(options.renderer, "custom"),
|
|
95
95
|
deployTarget: sanitizeDetail(options.deployTarget, "custom")
|
|
96
96
|
};
|