@farm.js/core 0.1.51-beta.3 → 0.1.60
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-handler-7JSKGSOW.mjs → agent-mcp-handler-7QMX2LUY.mjs} +7 -7
- package/dist/agent-mcp-handler-OV4WRFBL.cjs +18 -0
- package/dist/{agent-mcp.d-BJKChOrO.d.mts → agent-mcp.d-C-2S9bnP.d.mts} +1 -1
- package/dist/{agent-mcp.d-BAR9njbJ.d.ts → agent-mcp.d-SIoCUP1I.d.ts} +1 -1
- package/dist/agent-runtime.cjs +5 -5
- package/dist/agent-runtime.d.mts +2 -2
- package/dist/agent-runtime.d.ts +2 -2
- package/dist/agent-runtime.mjs +4 -4
- package/dist/{analyzer-OTPEWH5W.mjs → analyzer-22BEYV7S.mjs} +116 -13
- package/dist/{analyzer-TSQXZCZN.cjs → analyzer-LCSI3NSH.cjs} +123 -20
- package/dist/api/client.cjs +5 -4
- package/dist/api/client.d.mts +1 -1
- package/dist/api/client.d.ts +1 -1
- package/dist/api/client.mjs +3 -2
- package/dist/api/client.native.cjs +45 -0
- package/dist/api/client.native.d.mts +23 -0
- package/dist/api/client.native.d.ts +23 -0
- package/dist/api/client.native.mjs +45 -0
- package/dist/api/route-manager.cjs +7 -7
- package/dist/api/route-manager.d.mts +4 -4
- package/dist/api/route-manager.d.ts +4 -4
- package/dist/api/route-manager.mjs +6 -6
- package/dist/api/runtime.cjs +5 -5
- package/dist/api/runtime.d.mts +3 -3
- package/dist/api/runtime.d.ts +3 -3
- package/dist/api/runtime.mjs +4 -4
- package/dist/{api-client.d-CeA6tNA6.d.mts → api-client.d-BNLXNCXJ.d.mts} +1 -1
- package/dist/{api-client.d-BWcqZciH.d.ts → api-client.d-ddQBNGtu.d.ts} +1 -1
- package/dist/api.cjs +11 -11
- package/dist/api.d.mts +5 -5
- package/dist/api.d.ts +5 -5
- package/dist/api.mjs +10 -10
- package/dist/{app-manifest.d-DEQNnNhV.d.mts → app-manifest.d-DrSAHskY.d.mts} +1 -1
- package/dist/{app-manifest.d-BLFbaqx8.d.ts → app-manifest.d-Tb3CJpL4.d.ts} +1 -1
- package/dist/app-markdown.cjs +7 -7
- package/dist/app-markdown.d.mts +3 -3
- package/dist/app-markdown.d.ts +3 -3
- package/dist/app-markdown.mjs +6 -6
- package/dist/{app.d-CNPaUYaa.d.ts → app.d-CmWlYpZJ.d.ts} +9 -4
- package/dist/{app.d-CT7xDkj2.d.mts → app.d-D6QQM_kk.d.mts} +9 -4
- package/dist/{chunk-SN5VSO3Q.mjs → chunk-25T5VXOE.mjs} +7 -9
- package/dist/{chunk-OAMUSC7H.cjs → chunk-2FRLSDBT.cjs} +1 -1
- package/dist/{chunk-LM2YOGDK.mjs → chunk-2I6PUKWJ.mjs} +1 -1
- package/dist/{chunk-ZD2VKAUI.mjs → chunk-2KTYMMWT.mjs} +1 -1
- package/dist/{chunk-B5BBTPJQ.cjs → chunk-2OF5RPVU.cjs} +14 -14
- package/dist/{chunk-UQF3OJVE.mjs → chunk-37PYUEK5.mjs} +173 -29
- package/dist/{chunk-VSLM6BHX.cjs → chunk-3OJNNCDL.cjs} +9 -9
- package/dist/{chunk-X3JNB2TB.mjs → chunk-3PX4AIXO.mjs} +36 -5
- package/dist/{chunk-UQHIWZZ6.cjs → chunk-3TL3AH25.cjs} +12 -6
- package/dist/chunk-3YMLUNL2.cjs +251 -0
- package/dist/chunk-4JTQPOKO.cjs +137 -0
- package/dist/{chunk-7MD37P5V.cjs → chunk-4P23B7DU.cjs} +5 -5
- package/dist/{chunk-3BLEXUGE.mjs → chunk-55U5QIXQ.mjs} +1 -1
- package/dist/{chunk-TWHXBMLJ.cjs → chunk-5JNUYGNF.cjs} +4 -4
- package/dist/{chunk-53SACYBY.cjs → chunk-6BJJYOFL.cjs} +7 -7
- package/dist/chunk-6UUH4N4J.mjs +251 -0
- package/dist/{chunk-2NHOYYUT.mjs → chunk-7H45IJWO.mjs} +2 -2
- package/dist/{chunk-NN3MOPSI.mjs → chunk-A2MN5PQJ.mjs} +7 -7
- package/dist/{chunk-KY32FWK7.mjs → chunk-BHJAYPYU.mjs} +2 -2
- package/dist/{chunk-VAHBCI6X.mjs → chunk-BQWBHWEW.mjs} +26 -1
- package/dist/{chunk-KJMWAUKE.mjs → chunk-C7GJDVN4.mjs} +1 -1
- package/dist/{chunk-OYNNA4DD.cjs → chunk-CBKRS3M4.cjs} +9 -9
- package/dist/{chunk-I2DQGS56.cjs → chunk-CBOEJ5Z4.cjs} +39 -41
- package/dist/{chunk-UJL4JOXV.cjs → chunk-CI4UNQHO.cjs} +2 -2
- package/dist/{chunk-S5AQ7CAC.cjs → chunk-CNNBFGL5.cjs} +39 -14
- package/dist/chunk-D2X5MUF5.cjs +1457 -0
- package/dist/{chunk-LEIXUFJN.cjs → chunk-D4MRNBVF.cjs} +10 -9
- package/dist/{chunk-2KVDHNQS.mjs → chunk-D7LTCK3U.mjs} +2 -2
- package/dist/{chunk-4SEHMBL4.cjs → chunk-DPJ66FSI.cjs} +22 -22
- package/dist/{chunk-FFE2EMF7.cjs → chunk-DZPR2W6U.cjs} +5 -5
- package/dist/{chunk-3Z63X45F.mjs → chunk-E72UD6ME.mjs} +1 -1
- package/dist/{chunk-XXXRRVY6.mjs → chunk-EGVC4LIG.mjs} +5 -5
- package/dist/{chunk-72NBDVWQ.mjs → chunk-EXUONJYV.mjs} +3 -3
- package/dist/{chunk-VS7EHLLW.mjs → chunk-EZ34EHQP.mjs} +1 -1
- package/dist/{chunk-5FXPJIOT.mjs → chunk-F6Y7ZAPQ.mjs} +2 -2
- package/dist/{chunk-LMFJCXDD.mjs → chunk-FN5UEC7I.mjs} +1 -1
- package/dist/{chunk-3SMXQNFD.mjs → chunk-FORSVMEJ.mjs} +2 -2
- package/dist/{chunk-R4PHCZ3G.mjs → chunk-HPWB57PZ.mjs} +1 -1
- package/dist/{chunk-Y2G5SJFB.mjs → chunk-IFHPDLIS.mjs} +1 -1
- package/dist/{chunk-3XQ57EFI.cjs → chunk-IFXSBJPN.cjs} +16 -16
- package/dist/{chunk-3WSIYBMG.mjs → chunk-ILMTRGBG.mjs} +279 -48
- package/dist/{chunk-HLWOWZFX.cjs → chunk-JBK7UJOI.cjs} +14 -11
- package/dist/chunk-JI5D7MXY.mjs +137 -0
- package/dist/{chunk-QXJADAQB.cjs → chunk-JIBEFLQ7.cjs} +6 -2
- package/dist/{chunk-LZ4SB57H.mjs → chunk-JPIUGDK4.mjs} +1 -1
- package/dist/{chunk-Y3N5BFRJ.mjs → chunk-JSDV2NUN.mjs} +1 -1
- package/dist/{chunk-IRSS4HS4.mjs → chunk-K3RU5MOR.mjs} +1 -1
- package/dist/chunk-KPOMS5RO.cjs +237 -0
- package/dist/{chunk-YAJTD3ZG.mjs → chunk-KVW2M6PI.mjs} +1 -1
- package/dist/{chunk-5IONBVJY.cjs → chunk-LB3DPQP6.cjs} +22 -22
- package/dist/{chunk-CZ35L6PL.mjs → chunk-LJVNMGE3.mjs} +10 -4
- package/dist/{chunk-X2AMN2WV.cjs → chunk-LQNW3ABP.cjs} +10 -10
- package/dist/{chunk-6ONBZGVH.cjs → chunk-LRB5OVRT.cjs} +3 -3
- package/dist/{chunk-D7UQC4O6.cjs → chunk-LT4VAF5Z.cjs} +2 -2
- package/dist/{chunk-F6TLUMH7.mjs → chunk-M53MIIXY.mjs} +1 -1
- package/dist/{chunk-H33PJEXN.cjs → chunk-MEQN6DDA.cjs} +5 -5
- package/dist/{chunk-XLRLSTJ6.cjs → chunk-MGKW5XZE.cjs} +7 -7
- package/dist/{chunk-B3GZAQSC.cjs → chunk-MHLNWRCJ.cjs} +3 -3
- package/dist/{chunk-5ENW27SL.mjs → chunk-MMK4MZUN.mjs} +1 -1
- package/dist/{chunk-WGUHDWT5.cjs → chunk-MTWXOEI4.cjs} +527 -366
- package/dist/chunk-NHD7BAKD.mjs +1457 -0
- package/dist/{chunk-KLNFJDFM.cjs → chunk-NQJDO7K7.cjs} +31 -31
- package/dist/{chunk-TSFMFPRU.cjs → chunk-O27PLNQZ.cjs} +10 -10
- package/dist/{chunk-PIHKO25G.mjs → chunk-OM7WILES.mjs} +1 -1
- package/dist/{chunk-YUEYBL35.mjs → chunk-PCXIJKPM.mjs} +8 -8
- package/dist/{chunk-IWFV5ZED.cjs → chunk-PMJSG4JS.cjs} +1 -1
- package/dist/{chunk-B3GM5I6N.cjs → chunk-PRFNLQSP.cjs} +4 -4
- package/dist/{chunk-46KXZBOG.cjs → chunk-QAS7KE7J.cjs} +7 -7
- package/dist/chunk-QGOZLGVP.mjs +0 -0
- package/dist/{chunk-VQJYGZNX.cjs → chunk-QMNWKQL4.cjs} +1 -1
- package/dist/{chunk-XB24LZWI.cjs → chunk-QRX4JRBO.cjs} +3 -3
- package/dist/{chunk-LNM57D3H.cjs → chunk-R53QDV6T.cjs} +4 -4
- package/dist/{chunk-SUV6YO4Q.cjs → chunk-RAWWCDCT.cjs} +5 -5
- package/dist/{chunk-LJDIFIJ2.mjs → chunk-RPUJHJHE.mjs} +4 -4
- package/dist/{chunk-G2KTRMWA.mjs → chunk-RSEAX5MW.mjs} +4 -0
- package/dist/chunk-SJRCWF4Z.mjs +237 -0
- package/dist/{chunk-4353ZRE5.mjs → chunk-SX7EECTS.mjs} +8 -5
- package/dist/{chunk-LDNSSHEG.mjs → chunk-T4TBK5NY.mjs} +2 -2
- package/dist/{chunk-NOTSHVRN.mjs → chunk-T7I62A4C.mjs} +293 -132
- package/dist/{chunk-E36C43IX.cjs → chunk-U4BJKNIR.cjs} +6 -6
- package/dist/{chunk-4CGOMZP3.cjs → chunk-UDJY2ZGY.cjs} +487 -256
- package/dist/{chunk-SHS6KXOZ.mjs → chunk-UR25Z5Z6.mjs} +1 -1
- package/dist/{chunk-TQMI6BYO.cjs → chunk-UYSTTPYJ.cjs} +1262 -936
- package/dist/{chunk-E5DXF5GE.mjs → chunk-UZZ6IEQP.mjs} +3 -3
- package/dist/{chunk-EKJYE4Y7.cjs → chunk-VGG74PSU.cjs} +25 -25
- package/dist/{chunk-GAO7MS5O.mjs → chunk-VPTWKOCY.mjs} +19 -19
- package/dist/{chunk-UN6N623E.mjs → chunk-VQJHT2ND.mjs} +2 -2
- package/dist/{chunk-SJ23LJ3N.cjs → chunk-VVTJTMGQ.cjs} +3 -3
- package/dist/{chunk-KHXAJ2KA.cjs → chunk-W2RZ73IU.cjs} +12 -12
- package/dist/{chunk-JWI5PUO2.mjs → chunk-W2ZXMMHA.mjs} +2 -1
- package/dist/{chunk-BLD5GVCG.mjs → chunk-W6QLRQ3V.mjs} +1 -1
- package/dist/{chunk-AV26KHTG.mjs → chunk-X2CZTWQA.mjs} +2 -2
- package/dist/chunk-XPIPMWY3.cjs +1 -0
- package/dist/{chunk-JXEPLIXD.cjs → chunk-XTG73QZA.cjs} +183 -39
- package/dist/{chunk-XPMC4E2G.cjs → chunk-XVSBALOY.cjs} +3 -3
- package/dist/{chunk-XYL4HSVC.cjs → chunk-YI6FKTTN.cjs} +38 -7
- package/dist/{chunk-LPDKG6RA.mjs → chunk-YSXTNSXS.mjs} +1 -1
- package/dist/{chunk-EHB77D5U.cjs → chunk-ZDAEHG2O.cjs} +3 -3
- package/dist/{chunk-3TLKUBXG.mjs → chunk-ZFUKPWFC.mjs} +912 -586
- package/dist/{chunk-4TKAIO2F.mjs → chunk-ZMHAFH4R.mjs} +8 -8
- package/dist/{chunk-ZOWNWHK6.cjs → chunk-ZNH6NR3H.cjs} +2 -2
- package/dist/{chunk-PFV2KPDZ.cjs → chunk-ZOYKJBP5.cjs} +3 -3
- package/dist/{chunk-CECUDGXQ.cjs → chunk-ZP32GNJQ.cjs} +13 -13
- package/dist/{chunk-MRNDAJEV.mjs → chunk-ZZ2QKCKW.mjs} +1 -1
- package/dist/{client-plugins.d-DllmH8eM.d.mts → client-plugins.d-CgQQ-EAv.d.mts} +10 -2
- package/dist/{client-plugins.d-n3iWY1EJ.d.ts → client-plugins.d-vXrbcfJ1.d.ts} +10 -2
- package/dist/client-plugins.d.mts +2 -2
- package/dist/client-plugins.d.ts +2 -2
- package/dist/client.cjs +9 -9
- package/dist/client.d.mts +9 -9
- package/dist/client.d.ts +9 -9
- package/dist/client.mjs +9 -9
- package/dist/{config.d-DqKaCr1r.d.ts → config.d-DqZkLwef.d.mts} +139 -1
- package/dist/{config.d-DqKaCr1r.d.mts → config.d-DqZkLwef.d.ts} +139 -1
- package/dist/config.d.mts +2 -2
- package/dist/config.d.ts +2 -2
- package/dist/cron.cjs +3 -3
- package/dist/cron.d.mts +10 -0
- package/dist/cron.d.ts +10 -0
- package/dist/cron.mjs +2 -2
- package/dist/desktop.d.mts +3 -3
- package/dist/desktop.d.ts +3 -3
- package/dist/{devtools-UESYARTF.mjs → devtools-KQZ6SRCJ.mjs} +16 -16
- package/dist/{devtools-TO6TAO32.cjs → devtools-UF6JYHUN.cjs} +18 -18
- package/dist/docs.cjs +19 -19
- package/dist/docs.d.mts +3 -3
- package/dist/docs.d.ts +3 -3
- package/dist/docs.mjs +18 -18
- package/dist/index.cjs +96 -96
- package/dist/{index.d-BXsAXm1U.d.ts → index.d-DlCELfhf.d.ts} +1 -1
- package/dist/{index.d-BL7KKiwa.d.mts → index.d-Dmfb7Kb_.d.mts} +1 -1
- package/dist/index.d.mts +18 -18
- package/dist/index.d.ts +18 -18
- package/dist/index.mjs +139 -139
- package/dist/integrations.cjs +5 -5
- package/dist/integrations.d.mts +2 -2
- package/dist/integrations.d.ts +2 -2
- package/dist/integrations.mjs +4 -4
- package/dist/internal/app-markdown-runtime.cjs +6 -6
- package/dist/internal/app-markdown-runtime.d.mts +3 -3
- package/dist/internal/app-markdown-runtime.d.ts +3 -3
- package/dist/internal/app-markdown-runtime.mjs +5 -5
- package/dist/internal/build-runtime.cjs +50 -50
- package/dist/internal/build-runtime.d.mts +4 -4
- package/dist/internal/build-runtime.d.ts +4 -4
- package/dist/internal/build-runtime.mjs +49 -49
- package/dist/internal/cli-runtime.cjs +28 -28
- package/dist/internal/cli-runtime.mjs +28 -28
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/client-runtime.cjs +20 -15
- package/dist/internal/client-runtime.d.mts +5 -5
- package/dist/internal/client-runtime.d.ts +5 -5
- package/dist/internal/client-runtime.mjs +8 -3
- package/dist/internal/compression-runtime.d.mts +2 -2
- package/dist/internal/compression-runtime.d.ts +2 -2
- package/dist/internal/config-runtime.cjs +18 -18
- package/dist/internal/config-runtime.d.mts +94 -6
- package/dist/internal/config-runtime.d.ts +94 -6
- package/dist/internal/config-runtime.mjs +17 -17
- package/dist/internal/infra-analytics-runtime.cjs +11 -11
- package/dist/internal/infra-analytics-runtime.mjs +9 -9
- package/dist/internal/islands-boot.cjs +211 -0
- package/dist/internal/islands-boot.d.mts +8 -0
- package/dist/internal/islands-boot.d.ts +8 -0
- package/dist/internal/islands-boot.mjs +211 -0
- package/dist/internal/product-telemetry-runtime.cjs +2 -2
- package/dist/internal/product-telemetry-runtime.mjs +1 -1
- package/dist/internal/production-runtime.cjs +37 -101
- package/dist/internal/production-runtime.d.mts +17 -11
- package/dist/internal/production-runtime.d.ts +17 -11
- package/dist/internal/production-runtime.mjs +47 -111
- package/dist/markdown.cjs +5 -5
- package/dist/markdown.d.mts +2 -2
- package/dist/markdown.d.ts +2 -2
- package/dist/markdown.mjs +4 -4
- package/dist/middleware.cjs +10 -10
- package/dist/middleware.d.mts +4 -4
- package/dist/middleware.d.ts +4 -4
- package/dist/middleware.mjs +9 -9
- package/dist/mobile.d.mts +27 -5
- package/dist/mobile.d.ts +27 -5
- package/dist/modules-VHD7BELU.mjs +13 -0
- package/dist/modules-WT5D3AWY.cjs +13 -0
- package/dist/native-specs-BD7HOTMJ.mjs +15 -0
- package/dist/native-specs-IQQRJOOW.cjs +15 -0
- package/dist/native-tree-6G5O53O3.cjs +27 -0
- package/dist/{native-tree-EBPDFTRW.mjs → native-tree-VWNW2MQ2.mjs} +10 -8
- package/dist/native.cjs +87 -0
- package/dist/native.d.mts +72 -0
- package/dist/native.d.ts +72 -0
- package/dist/native.mjs +87 -0
- package/dist/{navigation-delegate.d-C76gXTmO.d.mts → navigation-delegate.d-CnOTWOyi.d.mts} +1 -1
- package/dist/{navigation-delegate.d-DIyDslxt.d.ts → navigation-delegate.d-JXx40JzR.d.ts} +1 -1
- package/dist/navigation.cjs +5 -5
- package/dist/navigation.d.mts +5 -5
- package/dist/navigation.d.ts +5 -5
- package/dist/navigation.mjs +4 -4
- package/dist/{nitro-R444AF3O.mjs → nitro-FLN6DRGJ.mjs} +7 -7
- package/dist/{nitro-CK7M4RMY.cjs → nitro-HXAZZQKY.cjs} +12 -12
- package/dist/plugin.cjs +42 -42
- package/dist/plugin.d.mts +4 -4
- package/dist/plugin.d.ts +4 -4
- package/dist/plugin.mjs +41 -41
- package/dist/port-C6GBH4C6.cjs +419 -0
- package/dist/port-WOOQ3V56.mjs +419 -0
- package/dist/{production-runtime.d-CDHztggO.d.mts → production-runtime.d-CP5s6RuY.d.mts} +1 -1
- package/dist/{production-runtime.d-tyaGdbk6.d.ts → production-runtime.d-N-cE3pmy.d.ts} +1 -1
- package/dist/{programmatic-routes-client.d-XfmIrCK1.d.ts → programmatic-routes-client.d-CLG2N1yH.d.ts} +2 -2
- package/dist/{programmatic-routes-client.d-aAWiDd64.d.mts → programmatic-routes-client.d-CPbNqtIi.d.mts} +2 -2
- package/dist/query/client.cjs +6 -6
- package/dist/query/client.mjs +2 -2
- package/dist/{render-plan.d-Dr5WRjoV.d.ts → render-plan.d-B9lAP3uX.d.ts} +1 -1
- package/dist/{render-plan.d-Diwybxo8.d.mts → render-plan.d-DZ-qjjdG.d.mts} +1 -1
- package/dist/renderer/react/server.cjs +2 -2
- package/dist/renderer/react/server.mjs +3 -3
- package/dist/renderer-client.cjs +6 -6
- package/dist/renderer-client.d.mts +5 -5
- package/dist/renderer-client.d.ts +5 -5
- package/dist/renderer-client.mjs +2 -2
- package/dist/{request.d-D01fRn--.d.ts → request.d-BiicaNxb.d.ts} +1 -1
- package/dist/{request.d-Dd3AFR79.d.mts → request.d-DV0oeUit.d.mts} +1 -1
- package/dist/request.d.mts +3 -3
- package/dist/request.d.ts +3 -3
- package/dist/{route-rendering.d-BQ53lJ_D.d.mts → route-rendering.d-BrIKA51A.d.mts} +1 -1
- package/dist/{route-rendering.d-Bhx4QoJt.d.ts → route-rendering.d-Iss0C7GR.d.ts} +1 -1
- package/dist/{router.d-DQ3k7EYn.d.ts → router.d-DjGn_al7.d.ts} +1 -1
- package/dist/{router.d-Bi23a6Xc.d.mts → router.d-mNTbOGV_.d.mts} +1 -1
- package/dist/{routes.d-C7jMJFvP.d.ts → routes.d-BKSjHuH9.d.ts} +25 -2
- package/dist/{routes.d-BgTd7vI4.d.mts → routes.d-qd8Qf4LG.d.mts} +25 -2
- package/dist/routes.d.mts +2 -2
- package/dist/routes.d.ts +2 -2
- package/dist/{rsc-pipeline-OCZIT5OF.cjs → rsc-pipeline-SVLBTY7H.cjs} +21 -21
- package/dist/{rsc-pipeline-K3ER3Q4N.mjs → rsc-pipeline-WBLBDQXA.mjs} +20 -20
- package/dist/{runtime-DKNSIH7V.cjs → runtime-DGUOWSMF.cjs} +293 -41
- package/dist/{runtime-MKYDEUZT.mjs → runtime-HFZTVNFF.mjs} +283 -31
- package/dist/{runtime.d-B2Js6qZ2.d.mts → runtime.d-BNVbojF1.d.mts} +1 -1
- package/dist/{runtime.d-BL-CGwoi.d.ts → runtime.d-Bm_4hP5T.d.ts} +1 -1
- package/dist/{schema-dev-notice-F6QYSOAI.mjs → schema-dev-notice-JMXEQWIQ.mjs} +3 -3
- package/dist/{schema-dev-notice-UU7DMZEU.cjs → schema-dev-notice-PLBFDTOF.cjs} +6 -6
- package/dist/server-fn-client.d.mts +1 -1
- package/dist/server-fn-client.d.ts +1 -1
- package/dist/server-plugins.cjs +1 -1
- package/dist/server-plugins.d.mts +3 -3
- package/dist/server-plugins.d.ts +3 -3
- package/dist/server-plugins.mjs +1 -1
- package/dist/server.cjs +81 -81
- package/dist/server.d.mts +11 -11
- package/dist/server.d.ts +11 -11
- package/dist/server.mjs +64 -64
- package/dist/session-2Q72D4QV.cjs +23 -0
- package/dist/{session-IGEDQ5PY.mjs → session-QZXZOPR2.mjs} +2 -2
- package/dist/shell-render.d-CG6bPiiA.d.mts +41 -0
- package/dist/shell-render.d-CG6bPiiA.d.ts +41 -0
- package/dist/{spa-router.d-DqZ6Lfs0.d.ts → spa-router.d-DAtnNoBe.d.ts} +11 -2
- package/dist/{spa-router.d-B2rIFGs0.d.mts → spa-router.d-DHDoXxDE.d.mts} +11 -2
- package/dist/testing.cjs +7 -7
- package/dist/testing.d.mts +2 -2
- package/dist/testing.d.ts +2 -2
- package/dist/testing.mjs +6 -6
- package/dist/{utils.d-Bv2MPeLR.d.ts → utils.d-DwZ-KLSB.d.ts} +7 -1
- package/dist/{utils.d-fqXe8lNc.d.mts → utils.d-uKZcKJk4.d.mts} +7 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +42 -42
- package/dist/vite.d.mts +10 -5
- package/dist/vite.d.ts +10 -5
- package/dist/vite.mjs +41 -41
- package/dist/workflows.cjs +3 -3
- package/dist/workflows.mjs +2 -2
- package/package.json +17 -3
- package/dist/agent-mcp-handler-YE4AGWHN.cjs +0 -18
- package/dist/chunk-MIGFX2FN.mjs +0 -758
- package/dist/chunk-P6MHI5O2.cjs +0 -758
- package/dist/native-tree-MMZS7S6W.cjs +0 -25
- package/dist/session-AAU7RNRO.cjs +0 -23
- package/dist/{chunk-7FVVQEVL.cjs → chunk-4BS3HSY7.cjs} +2 -2
- package/dist/{chunk-N7JQXQAV.cjs → chunk-5OJVKXFV.cjs} +2 -2
- package/dist/{chunk-WSDKXV4E.mjs → chunk-72KABRWN.mjs} +4 -4
- package/dist/{chunk-C3BOESDW.mjs → chunk-B4CWYGCG.mjs} +3 -3
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
getHashTargetElement,
|
|
7
7
|
runFarmNavigationDelegates
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-RSEAX5MW.mjs";
|
|
9
9
|
import {
|
|
10
10
|
isFarmBlockedNavigationURL,
|
|
11
11
|
isFarmExternalNavigationURL,
|
|
@@ -155,7 +155,8 @@ var SPARouter = class {
|
|
|
155
155
|
// 30 seconds
|
|
156
156
|
scrollRestoration: options.scrollRestoration ?? true,
|
|
157
157
|
shouldUseDocumentNavigation: options.shouldUseDocumentNavigation ?? (() => false),
|
|
158
|
-
deploymentId: options.deploymentId ?? readBrowserDeploymentId()
|
|
158
|
+
deploymentId: options.deploymentId ?? readBrowserDeploymentId(),
|
|
159
|
+
fetchNavigationDocument: options.fetchNavigationDocument
|
|
159
160
|
};
|
|
160
161
|
if (typeof window !== "undefined") {
|
|
161
162
|
window.addEventListener("popstate", this.onPopState);
|
|
@@ -277,13 +278,10 @@ var SPARouter = class {
|
|
|
277
278
|
action: replace ? "replace" : "push"
|
|
278
279
|
});
|
|
279
280
|
if (!this.isCurrentNavigation(navigation, clientNavigation)) return;
|
|
280
|
-
const pageData = await this.
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
refresh,
|
|
285
|
-
navigation.controller.signal
|
|
286
|
-
);
|
|
281
|
+
const pageData = await this.options.fetchNavigationDocument?.(fullPath, {
|
|
282
|
+
signal: navigation.controller.signal,
|
|
283
|
+
refresh
|
|
284
|
+
}) ?? await this.fetchPageData(fullPath, true, from, refresh, navigation.controller.signal);
|
|
287
285
|
if (!this.isCurrentNavigation(navigation, clientNavigation)) return;
|
|
288
286
|
if (clientNavigation) {
|
|
289
287
|
await this.clientPlugins?.markNavigationLoaded(clientNavigation, pageData);
|
|
@@ -2,28 +2,28 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkPMJSG4JScjs = require('./chunk-PMJSG4JS.cjs');
|
|
6
6
|
|
|
7
7
|
// src/api/server-path.ts
|
|
8
8
|
function resolveFarmAPIServerBasePath(config) {
|
|
9
|
-
return config.baseURL.startsWith("/") ? config.basePath :
|
|
9
|
+
return config.baseURL.startsWith("/") ? config.basePath : _chunkPMJSG4JScjs.DEFAULT_FARM_API_BASE_PATH;
|
|
10
10
|
}
|
|
11
|
-
function resolveFarmAPICanonicalPathname(pathname, serverBasePath =
|
|
12
|
-
const basePath =
|
|
13
|
-
if (basePath ===
|
|
11
|
+
function resolveFarmAPICanonicalPathname(pathname, serverBasePath = _chunkPMJSG4JScjs.DEFAULT_FARM_API_BASE_PATH) {
|
|
12
|
+
const basePath = _chunkPMJSG4JScjs.normalizeFarmAPIBasePath.call(void 0, serverBasePath);
|
|
13
|
+
if (basePath === _chunkPMJSG4JScjs.DEFAULT_FARM_API_BASE_PATH) return pathname;
|
|
14
14
|
if (basePath === "/") {
|
|
15
|
-
return pathname === "/" ?
|
|
15
|
+
return pathname === "/" ? _chunkPMJSG4JScjs.DEFAULT_FARM_API_BASE_PATH : `${_chunkPMJSG4JScjs.DEFAULT_FARM_API_BASE_PATH}${pathname.startsWith("/") ? pathname : `/${pathname}`}`;
|
|
16
16
|
}
|
|
17
|
-
if (pathname === basePath) return
|
|
17
|
+
if (pathname === basePath) return _chunkPMJSG4JScjs.DEFAULT_FARM_API_BASE_PATH;
|
|
18
18
|
if (pathname.startsWith(`${basePath}/`)) {
|
|
19
|
-
return `${
|
|
19
|
+
return `${_chunkPMJSG4JScjs.DEFAULT_FARM_API_BASE_PATH}${pathname.slice(basePath.length)}`;
|
|
20
20
|
}
|
|
21
21
|
return pathname;
|
|
22
22
|
}
|
|
23
|
-
function createFarmAPIMiddlewarePathnames(serverBasePath =
|
|
24
|
-
const basePath =
|
|
25
|
-
if (basePath ===
|
|
26
|
-
const prefix =
|
|
23
|
+
function createFarmAPIMiddlewarePathnames(serverBasePath = _chunkPMJSG4JScjs.DEFAULT_FARM_API_BASE_PATH) {
|
|
24
|
+
const basePath = _chunkPMJSG4JScjs.normalizeFarmAPIBasePath.call(void 0, serverBasePath);
|
|
25
|
+
if (basePath === _chunkPMJSG4JScjs.DEFAULT_FARM_API_BASE_PATH) return (pathname) => [pathname];
|
|
26
|
+
const prefix = _chunkPMJSG4JScjs.DEFAULT_FARM_API_BASE_PATH;
|
|
27
27
|
return (pathname) => {
|
|
28
28
|
const canonical = resolveFarmAPICanonicalPathname(pathname, basePath);
|
|
29
29
|
if (canonical !== prefix && !canonical.startsWith(`${prefix}/`)) return [pathname];
|
|
@@ -32,8 +32,8 @@ function createFarmAPIMiddlewarePathnames(serverBasePath = _chunkIWFV5ZEDcjs.DEF
|
|
|
32
32
|
return [.../* @__PURE__ */ new Set([pathname, canonical, publicPath])];
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
|
-
function resolveFarmAPIServerRoutePath(routePath, serverBasePath =
|
|
36
|
-
return
|
|
35
|
+
function resolveFarmAPIServerRoutePath(routePath, serverBasePath = _chunkPMJSG4JScjs.DEFAULT_FARM_API_BASE_PATH) {
|
|
36
|
+
return _chunkPMJSG4JScjs.resolveFarmAPIRequestURL.call(void 0, routePath, serverBasePath).pathname;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
FARM_NATIVE_TEXT_KEYS,
|
|
3
|
+
cascadeFarmNativeStylesheets,
|
|
4
|
+
parseFarmNativeStylesheet,
|
|
3
5
|
resolveFarmNativeClasses,
|
|
4
6
|
resolveFarmNativeInlineStyle
|
|
5
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-NHD7BAKD.mjs";
|
|
6
8
|
import {
|
|
7
9
|
FARM_NATIVE_TREE_CONTENT_TYPE
|
|
8
10
|
} from "./chunk-LLZSYFOM.mjs";
|
|
9
11
|
import {
|
|
10
12
|
_readFarmRenderedHtml
|
|
11
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-YSXTNSXS.mjs";
|
|
12
14
|
|
|
13
15
|
// src/mobile/native-tree.ts
|
|
14
16
|
var VIEW_TAGS = new Set(
|
|
@@ -68,11 +70,26 @@ function parseHtml(html) {
|
|
|
68
70
|
attribute[2] ?? attribute[3] ?? attribute[4] ?? ""
|
|
69
71
|
);
|
|
70
72
|
}
|
|
71
|
-
const
|
|
72
|
-
|
|
73
|
+
const parent = stack.at(-1);
|
|
74
|
+
let previous;
|
|
75
|
+
for (let index = parent.children.length - 1; index >= 0 && !previous; index -= 1) {
|
|
76
|
+
const child = parent.children[index];
|
|
77
|
+
if (typeof child !== "string") previous = child;
|
|
78
|
+
}
|
|
79
|
+
const element = { tag: name, attributes, children: [], parent, previous };
|
|
80
|
+
parent.children.push(element);
|
|
73
81
|
if (!match[4] && !VOID_TAGS.has(name)) stack.push(element);
|
|
74
82
|
}
|
|
75
83
|
if (cursor < html.length) stack.at(-1).children.push(decode(html.slice(cursor)));
|
|
84
|
+
const markLast = (element) => {
|
|
85
|
+
const elements = element.children.filter(
|
|
86
|
+
(child) => typeof child !== "string"
|
|
87
|
+
);
|
|
88
|
+
const last = elements[elements.length - 1];
|
|
89
|
+
if (last) last.last = true;
|
|
90
|
+
elements.forEach(markLast);
|
|
91
|
+
};
|
|
92
|
+
markLast(root);
|
|
76
93
|
return root;
|
|
77
94
|
}
|
|
78
95
|
function find(element, test) {
|
|
@@ -102,24 +119,49 @@ function settleLineHeight(style) {
|
|
|
102
119
|
return rest;
|
|
103
120
|
}
|
|
104
121
|
var Converter = class {
|
|
105
|
-
|
|
122
|
+
/**
|
|
123
|
+
* `sheets`: the page's stylesheets. Without them, a class the Tailwind table does not know is
|
|
124
|
+
* reported; with them, only one a layered (Tailwind) rule styles is, since a class no rule
|
|
125
|
+
* styles has no effect in a browser either.
|
|
126
|
+
*/
|
|
127
|
+
constructor(pageUrl, sheets) {
|
|
106
128
|
this.pageUrl = pageUrl;
|
|
129
|
+
this.sheets = sheets;
|
|
107
130
|
this.unsupported = [];
|
|
131
|
+
/** Off while reading the ancestors above the page, which pass down text styles only. */
|
|
132
|
+
this.reporting = true;
|
|
108
133
|
}
|
|
109
134
|
problem(message) {
|
|
110
|
-
if (!this.unsupported.includes(message)) this.unsupported.push(message);
|
|
135
|
+
if (this.reporting && !this.unsupported.includes(message)) this.unsupported.push(message);
|
|
111
136
|
}
|
|
112
137
|
stylesOf(element) {
|
|
113
138
|
const classes = resolveFarmNativeClasses(element.attributes.class ?? "");
|
|
114
|
-
|
|
139
|
+
const cascade = this.sheets ? cascadeFarmNativeStylesheets(this.sheets, element) : void 0;
|
|
140
|
+
for (const token of classes.unsupported) {
|
|
141
|
+
if (!cascade || cascade.layered.includes(token.split(":").pop())) {
|
|
142
|
+
this.problem(`<${element.tag}> class "${token}"`);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
for (const problem of cascade?.unsupported ?? []) {
|
|
146
|
+
this.problem(`<${element.tag}> ${problem}`);
|
|
147
|
+
}
|
|
115
148
|
const inline = resolveFarmNativeInlineStyle(element.attributes.style ?? "");
|
|
116
149
|
for (const declaration of inline.unsupported) {
|
|
117
150
|
this.problem(`<${element.tag}> style "${declaration}"`);
|
|
118
151
|
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
152
|
+
const style = {
|
|
153
|
+
...INLINE_DEFAULTS[element.tag],
|
|
154
|
+
...classes.style,
|
|
155
|
+
...cascade?.style,
|
|
156
|
+
...inline.style
|
|
122
157
|
};
|
|
158
|
+
const dark = { ...classes.dark, ...cascade?.dark };
|
|
159
|
+
for (const target of [style, dark]) {
|
|
160
|
+
if (target.display === "flex" && target.flexDirection === void 0 && !style.flexDirection) {
|
|
161
|
+
target.flexDirection = "row";
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
return { style, dark };
|
|
123
165
|
}
|
|
124
166
|
url(value) {
|
|
125
167
|
if (!value) return void 0;
|
|
@@ -131,11 +173,12 @@ var Converter = class {
|
|
|
131
173
|
}
|
|
132
174
|
}
|
|
133
175
|
node(type, element, style, dark) {
|
|
176
|
+
const changed = dark && Object.fromEntries(Object.entries(dark).filter(([key, value]) => style?.[key] !== value));
|
|
134
177
|
return {
|
|
135
178
|
type,
|
|
136
179
|
tag: element.tag,
|
|
137
180
|
...style && Object.keys(style).length > 0 ? { style } : {},
|
|
138
|
-
...
|
|
181
|
+
...changed && Object.keys(changed).length > 0 ? { dark: changed } : {}
|
|
139
182
|
};
|
|
140
183
|
}
|
|
141
184
|
/** Inline content: runs of text, nested inline elements, and line breaks. */
|
|
@@ -177,11 +220,27 @@ var Converter = class {
|
|
|
177
220
|
const trimmed = collapse(runs);
|
|
178
221
|
if (trimmed.length === 0) return void 0;
|
|
179
222
|
const style = settleLineHeight({ ...inherited.style, ...box?.style });
|
|
180
|
-
const dark = {
|
|
223
|
+
const dark = {
|
|
224
|
+
...inherited.dark,
|
|
225
|
+
...box ? textOnly(box.style) : {},
|
|
226
|
+
...box?.dark
|
|
227
|
+
};
|
|
181
228
|
const node = this.node("Text", element, style, dark);
|
|
182
229
|
node.children = trimmed;
|
|
183
230
|
return node;
|
|
184
231
|
}
|
|
232
|
+
/** A link drawn as a box: it holds blocks, or has a box style such as a background. */
|
|
233
|
+
isBlockLink(element) {
|
|
234
|
+
if (element.tag !== "a") return false;
|
|
235
|
+
if (element.children.some((child) => typeof child !== "string" && !INLINE_TAGS.has(child.tag))) {
|
|
236
|
+
return true;
|
|
237
|
+
}
|
|
238
|
+
const reporting = this.reporting;
|
|
239
|
+
this.reporting = false;
|
|
240
|
+
const { style } = this.stylesOf(element);
|
|
241
|
+
this.reporting = reporting;
|
|
242
|
+
return withoutText(style) !== void 0;
|
|
243
|
+
}
|
|
185
244
|
/**
|
|
186
245
|
* Block content: each element a view, and each run of inline content a text block. In a flex
|
|
187
246
|
* container every child is its own item, as CSS blockifies them: a `<span>` pill there is a box.
|
|
@@ -203,7 +262,7 @@ var Converter = class {
|
|
|
203
262
|
pending = [];
|
|
204
263
|
};
|
|
205
264
|
for (const child of content) {
|
|
206
|
-
if (typeof child === "string" || INLINE_TAGS.has(child.tag) && !isBlockLink(child)) {
|
|
265
|
+
if (typeof child === "string" || INLINE_TAGS.has(child.tag) && !this.isBlockLink(child)) {
|
|
207
266
|
pending.push(child);
|
|
208
267
|
continue;
|
|
209
268
|
}
|
|
@@ -220,7 +279,9 @@ var Converter = class {
|
|
|
220
279
|
if (own.style.display === "none") return void 0;
|
|
221
280
|
const passed = {
|
|
222
281
|
style: { ...inherited.style, ...textOnly(own.style) },
|
|
223
|
-
|
|
282
|
+
// An element's own text style holds in both themes unless it sets a dark one: it overrides
|
|
283
|
+
// what the dark theme passes down, as CSS does.
|
|
284
|
+
dark: { ...inherited.dark, ...textOnly(own.style), ...textOnly(own.dark) }
|
|
224
285
|
};
|
|
225
286
|
const current = (style, color) => style && Object.fromEntries(
|
|
226
287
|
Object.entries(style).map(([key, value]) => [
|
|
@@ -289,15 +350,6 @@ var Converter = class {
|
|
|
289
350
|
return void 0;
|
|
290
351
|
}
|
|
291
352
|
};
|
|
292
|
-
function isBlockLink(element) {
|
|
293
|
-
if (element.tag !== "a") return false;
|
|
294
|
-
if (element.children.some((child) => typeof child !== "string" && !INLINE_TAGS.has(child.tag))) {
|
|
295
|
-
return true;
|
|
296
|
-
}
|
|
297
|
-
const classes = resolveFarmNativeClasses(element.attributes.class ?? "").style;
|
|
298
|
-
const inline = resolveFarmNativeInlineStyle(element.attributes.style ?? "").style;
|
|
299
|
-
return withoutText({ ...classes, ...inline }) !== void 0;
|
|
300
|
-
}
|
|
301
353
|
function textContent(element) {
|
|
302
354
|
return element.children.map((child) => typeof child === "string" ? child : textContent(child)).join("");
|
|
303
355
|
}
|
|
@@ -338,21 +390,83 @@ function collapse(runs) {
|
|
|
338
390
|
}
|
|
339
391
|
return out;
|
|
340
392
|
}
|
|
341
|
-
function
|
|
393
|
+
function firstHeading(node) {
|
|
394
|
+
if (node.tag === "h1") {
|
|
395
|
+
const text = (node.children ?? []).map(function flatten(child) {
|
|
396
|
+
return typeof child === "string" ? child : (child.children ?? []).map(flatten).join("");
|
|
397
|
+
}).join("").trim();
|
|
398
|
+
return text || void 0;
|
|
399
|
+
}
|
|
400
|
+
for (const child of node.children ?? []) {
|
|
401
|
+
if (typeof child === "string") continue;
|
|
402
|
+
const found = firstHeading(child);
|
|
403
|
+
if (found) return found;
|
|
404
|
+
}
|
|
405
|
+
return void 0;
|
|
406
|
+
}
|
|
407
|
+
var parsedSheets = /* @__PURE__ */ new Map();
|
|
408
|
+
function parsedStylesheet(css) {
|
|
409
|
+
let sheet = parsedSheets.get(css);
|
|
410
|
+
if (!sheet) {
|
|
411
|
+
sheet = parseFarmNativeStylesheet(css);
|
|
412
|
+
if (parsedSheets.size >= 16) parsedSheets.delete(parsedSheets.keys().next().value);
|
|
413
|
+
parsedSheets.set(css, sheet);
|
|
414
|
+
}
|
|
415
|
+
return sheet;
|
|
416
|
+
}
|
|
417
|
+
function createFarmNativeTree(html, pageUrl, stylesheets) {
|
|
342
418
|
const title = /<title\b[^>]*>([\s\S]*?)<\/title>/i.exec(html)?.[1];
|
|
343
419
|
const document = parseHtml(_readFarmRenderedHtml(html));
|
|
344
420
|
const page = find(document, (element) => element.attributes.id === "__farm_page__") ?? find(document, (element) => element.attributes.id === "root") ?? find(document, (element) => element.tag === "body") ?? document;
|
|
345
|
-
const converter = new Converter(pageUrl);
|
|
346
|
-
const
|
|
347
|
-
|
|
421
|
+
const converter = new Converter(pageUrl, stylesheets?.map(parsedStylesheet));
|
|
422
|
+
const ancestors = [];
|
|
423
|
+
for (let element = page.parent; element; element = element.parent) ancestors.unshift(element);
|
|
424
|
+
const inherited = { style: {}, dark: {} };
|
|
425
|
+
let background = {};
|
|
426
|
+
converter.reporting = false;
|
|
427
|
+
for (const element of [...ancestors, page]) {
|
|
428
|
+
if (element.tag === "#root") continue;
|
|
429
|
+
const own = converter.stylesOf(element);
|
|
430
|
+
Object.assign(inherited.style, textOnly(own.style));
|
|
431
|
+
Object.assign(inherited.dark, textOnly(own.dark));
|
|
432
|
+
if (own.style.backgroundColor) background = { backgroundColor: own.style.backgroundColor };
|
|
433
|
+
if (own.dark.backgroundColor)
|
|
434
|
+
background = { ...background, darkBackground: own.dark.backgroundColor };
|
|
435
|
+
}
|
|
436
|
+
converter.reporting = true;
|
|
437
|
+
const { darkBackground, ...light } = background;
|
|
438
|
+
const root = {
|
|
439
|
+
type: "View",
|
|
440
|
+
tag: page.tag,
|
|
441
|
+
...Object.keys(light).length > 0 ? { style: light } : {},
|
|
442
|
+
...darkBackground ? { dark: { backgroundColor: darkBackground } } : {}
|
|
443
|
+
};
|
|
444
|
+
const children = converter.blocks(page.children, inherited);
|
|
348
445
|
if (children.length > 0) root.children = children;
|
|
349
446
|
return {
|
|
350
447
|
version: 1,
|
|
351
|
-
...title ? { title: decode(title.trim()) } : {},
|
|
448
|
+
...title?.trim() ? { title: decode(title.trim()) } : firstHeading(root) ? { title: firstHeading(root) } : {},
|
|
352
449
|
root,
|
|
353
450
|
unsupported: converter.unsupported
|
|
354
451
|
};
|
|
355
452
|
}
|
|
453
|
+
function readFarmPageStylesheets(html, pageUrl) {
|
|
454
|
+
const out = [];
|
|
455
|
+
const head = /<head\b[^>]*>([\s\S]*?)<\/head>/i.exec(html)?.[1] ?? html;
|
|
456
|
+
for (const match of head.matchAll(/<link\b([^>]*)>|<style\b[^>]*>([\s\S]*?)<\/style>/gi)) {
|
|
457
|
+
if (match[2] !== void 0) {
|
|
458
|
+
out.push({ inline: match[2] });
|
|
459
|
+
continue;
|
|
460
|
+
}
|
|
461
|
+
const attributes = match[1];
|
|
462
|
+
if (!/\brel\s*=\s*["']?stylesheet\b/i.test(attributes)) continue;
|
|
463
|
+
const href = /\bhref\s*=\s*["']([^"']+)["']/i.exec(attributes)?.[1];
|
|
464
|
+
if (!href) continue;
|
|
465
|
+
const resolved = new URL(decode(href), pageUrl);
|
|
466
|
+
if (resolved.origin === pageUrl.origin) out.push({ href: resolved.pathname + resolved.search });
|
|
467
|
+
}
|
|
468
|
+
return out;
|
|
469
|
+
}
|
|
356
470
|
function farmRequestWantsNativeTree(request) {
|
|
357
471
|
return (request.headers.get("accept") ?? "").includes(FARM_NATIVE_TREE_CONTENT_TYPE);
|
|
358
472
|
}
|
|
@@ -369,7 +483,36 @@ async function createFarmNativeTreeResponse(options) {
|
|
|
369
483
|
);
|
|
370
484
|
const type = page.headers.get("content-type") ?? "";
|
|
371
485
|
if (page.status !== 200 || !type.includes("text/html")) return page;
|
|
372
|
-
const
|
|
486
|
+
const html = await page.text();
|
|
487
|
+
const pageUrl = new URL(options.request.url);
|
|
488
|
+
const load = options.loadStylesheet ?? (async (href) => {
|
|
489
|
+
const response = await options.renderPage(
|
|
490
|
+
new Request(new URL(href, pageUrl), {
|
|
491
|
+
headers: { accept: "text/css,*/*;q=0.1", cookie: headers.get("cookie") ?? "" },
|
|
492
|
+
signal: options.request.signal
|
|
493
|
+
})
|
|
494
|
+
);
|
|
495
|
+
return response.status === 200 && response.headers.get("content-type")?.includes("text/css") ? response.text() : void 0;
|
|
496
|
+
});
|
|
497
|
+
const stylesheets = [];
|
|
498
|
+
for (const source of readFarmPageStylesheets(html, pageUrl)) {
|
|
499
|
+
const css = source.inline ?? await load(source.href);
|
|
500
|
+
if (css === void 0) {
|
|
501
|
+
const tree2 = {
|
|
502
|
+
version: 1,
|
|
503
|
+
root: { type: "View", tag: "#root" },
|
|
504
|
+
unsupported: [`stylesheet "${source.href}" could not be read`]
|
|
505
|
+
};
|
|
506
|
+
return new Response(JSON.stringify(tree2), {
|
|
507
|
+
headers: {
|
|
508
|
+
"Content-Type": `${FARM_NATIVE_TREE_CONTENT_TYPE}; charset=utf-8`,
|
|
509
|
+
Vary: "Accept"
|
|
510
|
+
}
|
|
511
|
+
});
|
|
512
|
+
}
|
|
513
|
+
stylesheets.push(css);
|
|
514
|
+
}
|
|
515
|
+
const tree = createFarmNativeTree(html, pageUrl, stylesheets);
|
|
373
516
|
const out = new Headers({
|
|
374
517
|
"Content-Type": `${FARM_NATIVE_TREE_CONTENT_TYPE}; charset=utf-8`,
|
|
375
518
|
Vary: "Accept",
|
|
@@ -384,6 +527,7 @@ async function createFarmNativeTreeResponse(options) {
|
|
|
384
527
|
|
|
385
528
|
export {
|
|
386
529
|
createFarmNativeTree,
|
|
530
|
+
readFarmPageStylesheets,
|
|
387
531
|
farmRequestWantsNativeTree,
|
|
388
532
|
createFarmNativeTreeResponse
|
|
389
533
|
};
|
|
@@ -26,7 +26,7 @@ var _chunkCA7DNRHOcjs = require('./chunk-CA7DNRHO.cjs');
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
var
|
|
29
|
+
var _chunkPMJSG4JScjs = require('./chunk-PMJSG4JS.cjs');
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
|
|
@@ -413,7 +413,7 @@ async function executeClientOperation(operation, input, options, requestOptions)
|
|
|
413
413
|
};
|
|
414
414
|
}
|
|
415
415
|
const baseURL = options.baseURL || (typeof window !== "undefined" ? window.location.origin : "http://localhost:3000");
|
|
416
|
-
const url =
|
|
416
|
+
const url = _chunkPMJSG4JScjs.resolveFarmAPIRequestURL.call(void 0, operation.path, baseURL);
|
|
417
417
|
appendQuery(url, input.query);
|
|
418
418
|
const resolved = resolveClientHeaders(options.headers);
|
|
419
419
|
const headers = resolved instanceof Headers ? resolved : await resolved;
|
|
@@ -546,7 +546,7 @@ async function executeServerOperation(operation, input, options, requestOptions,
|
|
|
546
546
|
}
|
|
547
547
|
appendIntegrationClientDataHeader(headers, data);
|
|
548
548
|
const body = createOperationBody(operation, input.body, headers);
|
|
549
|
-
const httpURL =
|
|
549
|
+
const httpURL = _chunkPMJSG4JScjs.resolveFarmAPIRequestURL.call(void 0, operation.path, baseURL, origin);
|
|
550
550
|
appendQuery(httpURL, input.query);
|
|
551
551
|
const response = await (_nullishCoalesce(options.fetch, () => ( fetch)))(httpURL.toString(), {
|
|
552
552
|
method: operation.method,
|
|
@@ -1129,7 +1129,7 @@ function createAPIClient(options = {}) {
|
|
|
1129
1129
|
}
|
|
1130
1130
|
function createAPIClientRuntime(options = {}, transport) {
|
|
1131
1131
|
_nullishCoalesce(options, () => ( (options = {})));
|
|
1132
|
-
const baseURL = options.baseURL ||
|
|
1132
|
+
const baseURL = options.baseURL || _chunkPMJSG4JScjs.getFarmAPIBaseURL.call(void 0, );
|
|
1133
1133
|
const httpFetch = options.fetch;
|
|
1134
1134
|
const integrationOptions = options.integrations === false ? false : {
|
|
1135
1135
|
baseURL: options.baseURL,
|
|
@@ -1152,7 +1152,7 @@ function createAPIClientRuntime(options = {}, transport) {
|
|
|
1152
1152
|
const routeMeta = _nullishCoalesce(_optionalChain([transport, 'optionalAccess', _47 => _47.routeMeta]), () => ( /* @__PURE__ */ new WeakMap()));
|
|
1153
1153
|
let requestCounter = 0;
|
|
1154
1154
|
const fetchClient = async (path, requestOptions, defaultHeaders, cancellation) => {
|
|
1155
|
-
const url =
|
|
1155
|
+
const url = _chunkPMJSG4JScjs.resolveFarmAPIRequestURL.call(void 0, path, baseURL);
|
|
1156
1156
|
const method = String(requestOptions.method || "GET").toUpperCase();
|
|
1157
1157
|
if (requestOptions.query) {
|
|
1158
1158
|
appendAPIQuery(url.searchParams, requestOptions.query);
|
|
@@ -1779,7 +1779,7 @@ function createNestedProxy(path, client, routeMeta, baseURL, sameOrigin, rootAli
|
|
|
1779
1779
|
} catch (e3) {
|
|
1780
1780
|
return null;
|
|
1781
1781
|
}
|
|
1782
|
-
const requestURL =
|
|
1782
|
+
const requestURL = _chunkPMJSG4JScjs.resolveFarmAPIRequestURL.call(void 0, metadata.routePath, baseURL);
|
|
1783
1783
|
return Object.freeze({
|
|
1784
1784
|
path: `${requestURL.pathname}${requestURL.search}${requestURL.hash}`,
|
|
1785
1785
|
method: metadata.method,
|
|
@@ -2041,12 +2041,12 @@ function buildCacheKey(method, path, input, baseURL, defaultHeaders) {
|
|
|
2041
2041
|
contentEncoding: _nullishCoalesce(getHeader(input.headers, "content-encoding"), () => ( getHeader(defaultHeaders, "content-encoding")))
|
|
2042
2042
|
} : {}
|
|
2043
2043
|
} : input;
|
|
2044
|
-
const url =
|
|
2044
|
+
const url = _chunkPMJSG4JScjs.resolveFarmAPIRequestURL.call(void 0, path, baseURL);
|
|
2045
2045
|
return `${method}:${url.origin}${url.pathname}:${stableStringify(_nullishCoalesce(keyInput, () => ( {})))}`;
|
|
2046
2046
|
}
|
|
2047
2047
|
function isSameOriginAPIBaseURL(baseURL) {
|
|
2048
|
-
if (typeof window === "undefined") return baseURL.startsWith("/");
|
|
2049
|
-
return
|
|
2048
|
+
if (typeof window === "undefined" || !window.location) return baseURL.startsWith("/");
|
|
2049
|
+
return _chunkPMJSG4JScjs.resolveFarmAPIRequestURL.call(void 0, "/api", baseURL).origin === window.location.origin;
|
|
2050
2050
|
}
|
|
2051
2051
|
function stableStringify(value) {
|
|
2052
2052
|
if (value === null || value === void 0) return String(value);
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
} from "./chunk-YP7YO3S3.mjs";
|
|
8
8
|
import {
|
|
9
9
|
toPosixPath
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-JSDV2NUN.mjs";
|
|
11
11
|
|
|
12
12
|
// src/cron.ts
|
|
13
13
|
var DEFAULT_FARM_CRON_SECRET_ENV = "CRON_SECRET";
|
|
@@ -164,14 +164,45 @@ function isCronRequestAuthorized(request, options = {}) {
|
|
|
164
164
|
return farmSecretsMatch(bearer, secret) || farmSecretsMatch(headerSecret, secret);
|
|
165
165
|
}
|
|
166
166
|
function cronRoute(handler, options = {}) {
|
|
167
|
+
if (isFarmEndpoint(handler)) return guardCronEndpoint(handler, options);
|
|
168
|
+
const route = handler;
|
|
167
169
|
return (request, ...args) => {
|
|
168
170
|
if (!isCronRequestAuthorized(request, options)) {
|
|
169
|
-
return Promise.resolve(
|
|
170
|
-
Response.json({ error: "Unauthorized cron request." }, { status: 401 })
|
|
171
|
-
);
|
|
171
|
+
return Promise.resolve(unauthorizedCronResponse());
|
|
172
172
|
}
|
|
173
|
-
return
|
|
173
|
+
return route(request, ...args);
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
function unauthorizedCronResponse() {
|
|
177
|
+
return Response.json({ error: "Unauthorized cron request." }, { status: 401 });
|
|
178
|
+
}
|
|
179
|
+
function isFarmEndpoint(value) {
|
|
180
|
+
return typeof value === "function" && typeof value.__handler === "function";
|
|
181
|
+
}
|
|
182
|
+
var FUNCTION_OWN_KEYS = /* @__PURE__ */ new Set(["length", "name", "prototype", "arguments", "caller"]);
|
|
183
|
+
function guardCronEndpoint(endpoint, options) {
|
|
184
|
+
const allowed = (context) => {
|
|
185
|
+
const request = context?.request;
|
|
186
|
+
return typeof request?.headers?.get === "function" && isCronRequestAuthorized(request, options);
|
|
174
187
|
};
|
|
188
|
+
const guarded = function(context) {
|
|
189
|
+
return allowed(context) ? endpoint.call(this, context) : Promise.resolve(unauthorizedCronResponse());
|
|
190
|
+
};
|
|
191
|
+
for (const key of Reflect.ownKeys(endpoint)) {
|
|
192
|
+
if (typeof key === "string" && FUNCTION_OWN_KEYS.has(key)) continue;
|
|
193
|
+
Object.defineProperty(guarded, key, Object.getOwnPropertyDescriptor(endpoint, key));
|
|
194
|
+
}
|
|
195
|
+
guarded.__handler = (context) => allowed(context) ? endpoint.__handler(context) : unauthorizedCronResponse();
|
|
196
|
+
const invoke = endpoint.__farmInvoke;
|
|
197
|
+
if (invoke) {
|
|
198
|
+
guarded.__farmInvoke = (context) => allowed(context) ? invoke(context) : {
|
|
199
|
+
result: unauthorizedCronResponse(),
|
|
200
|
+
context: context.context,
|
|
201
|
+
handlerExecuted: false,
|
|
202
|
+
invalidations: []
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
return guarded;
|
|
175
206
|
}
|
|
176
207
|
function normalizeCronJob(name, job) {
|
|
177
208
|
if (!/^[a-zA-Z0-9][a-zA-Z0-9._-]*$/.test(name)) {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkU4BJKNIRcjs = require('./chunk-U4BJKNIR.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _chunkSYW346ZNcjs = require('./chunk-SYW346ZN.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkQISW423Scjs = require('./chunk-QISW423S.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _chunkGBMWLDCCcjs = require('./chunk-GBMWLDCC.cjs');
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
@@ -799,7 +799,7 @@ async function generateFarmTypeArtifacts(options) {
|
|
|
799
799
|
componentExtensions: options.componentExtensions,
|
|
800
800
|
sourceRoots
|
|
801
801
|
};
|
|
802
|
-
unifiedSections.push(await
|
|
802
|
+
unifiedSections.push(await _chunkU4BJKNIRcjs.createRouteTypeDeclarations.call(void 0, routeOptions, unifiedTypesPath));
|
|
803
803
|
result.routeTypesPath = unifiedTypesPath;
|
|
804
804
|
} else if (shouldGenerateRoutes) {
|
|
805
805
|
const routeOptions = {
|
|
@@ -813,11 +813,11 @@ async function generateFarmTypeArtifacts(options) {
|
|
|
813
813
|
};
|
|
814
814
|
if (options.check) {
|
|
815
815
|
const routeTypesPath = resolveGeneratedPath(root, srcDir, options.routeTypesOutFile);
|
|
816
|
-
const content = await
|
|
816
|
+
const content = await _chunkU4BJKNIRcjs.createRouteTypeDeclarations.call(void 0, routeOptions, routeTypesPath);
|
|
817
817
|
checkGeneratedFile(routeTypesPath, content, result.stalePaths);
|
|
818
818
|
result.routeTypesPath = routeTypesPath;
|
|
819
819
|
} else {
|
|
820
|
-
result.routeTypesPath = await
|
|
820
|
+
result.routeTypesPath = await _chunkU4BJKNIRcjs.generateRouteTypes.call(void 0, routeOptions);
|
|
821
821
|
}
|
|
822
822
|
}
|
|
823
823
|
if (shouldGenerateApi) {
|
|
@@ -927,6 +927,12 @@ async function generateFarmTypeArtifacts(options) {
|
|
|
927
927
|
const syncModelTypes = createSyncModelTypeDeclarations(options.plugins);
|
|
928
928
|
if (syncModelTypes) unifiedSections.push(syncModelTypes);
|
|
929
929
|
}
|
|
930
|
+
if (shouldRefreshUnifiedTypes && _fs.existsSync.call(void 0, _path.join.call(void 0, root, srcDir, "native"))) {
|
|
931
|
+
const [{ scanFarmMobileAppModules }, { createFarmNativeModuleTypeDeclarations }] = await Promise.all([import("./modules-WT5D3AWY.cjs"), import("./native-specs-IQQRJOOW.cjs")]);
|
|
932
|
+
const appModules = scanFarmMobileAppModules({ root, srcDir });
|
|
933
|
+
const nativeTypes = appModules && createFarmNativeModuleTypeDeclarations(appModules.specs, { root });
|
|
934
|
+
if (nativeTypes) unifiedSections.push(nativeTypes);
|
|
935
|
+
}
|
|
930
936
|
if (shouldRefreshUnifiedTypes) {
|
|
931
937
|
unifiedSections.push(
|
|
932
938
|
createContentTypeDeclarations(
|