@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
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
readFarmMobileWebModules,
|
|
3
|
+
resolveFarmMobileModules,
|
|
4
|
+
scanFarmMobileAppModules
|
|
5
|
+
} from "./chunk-SJRCWF4Z.mjs";
|
|
6
|
+
import "./chunk-6UUH4N4J.mjs";
|
|
7
|
+
import "./chunk-UB7RVEMX.mjs";
|
|
8
|
+
import "./chunk-Y6FXYEAI.mjs";
|
|
9
|
+
export {
|
|
10
|
+
readFarmMobileWebModules,
|
|
11
|
+
resolveFarmMobileModules,
|
|
12
|
+
scanFarmMobileAppModules
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
var _chunkKPOMS5ROcjs = require('./chunk-KPOMS5RO.cjs');
|
|
6
|
+
require('./chunk-3YMLUNL2.cjs');
|
|
7
|
+
require('./chunk-YKHRCY4T.cjs');
|
|
8
|
+
require('./chunk-BTZ5O6VM.cjs');
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
exports.readFarmMobileWebModules = _chunkKPOMS5ROcjs.readFarmMobileWebModules; exports.resolveFarmMobileModules = _chunkKPOMS5ROcjs.resolveFarmMobileModules; exports.scanFarmMobileAppModules = _chunkKPOMS5ROcjs.scanFarmMobileAppModules;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createFarmNativeModuleTypeDeclarations,
|
|
3
|
+
hasFarmNativeCodegen,
|
|
4
|
+
readFarmNativeWebSpec,
|
|
5
|
+
renderFarmNativeMethod,
|
|
6
|
+
renderFarmNativeType
|
|
7
|
+
} from "./chunk-6UUH4N4J.mjs";
|
|
8
|
+
import "./chunk-Y6FXYEAI.mjs";
|
|
9
|
+
export {
|
|
10
|
+
createFarmNativeModuleTypeDeclarations,
|
|
11
|
+
hasFarmNativeCodegen,
|
|
12
|
+
readFarmNativeWebSpec,
|
|
13
|
+
renderFarmNativeMethod,
|
|
14
|
+
renderFarmNativeType
|
|
15
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
var _chunk3YMLUNL2cjs = require('./chunk-3YMLUNL2.cjs');
|
|
8
|
+
require('./chunk-BTZ5O6VM.cjs');
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
exports.createFarmNativeModuleTypeDeclarations = _chunk3YMLUNL2cjs.createFarmNativeModuleTypeDeclarations; exports.hasFarmNativeCodegen = _chunk3YMLUNL2cjs.hasFarmNativeCodegen; exports.readFarmNativeWebSpec = _chunk3YMLUNL2cjs.readFarmNativeWebSpec; exports.renderFarmNativeMethod = _chunk3YMLUNL2cjs.renderFarmNativeMethod; exports.renderFarmNativeType = _chunk3YMLUNL2cjs.renderFarmNativeType;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _chunkXTG73QZAcjs = require('./chunk-XTG73QZA.cjs');
|
|
7
|
+
require('./chunk-D2X5MUF5.cjs');
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
var _chunk3HLQTOVUcjs = require('./chunk-3HLQTOVU.cjs');
|
|
11
|
+
require('./chunk-LT4VAF5Z.cjs');
|
|
12
|
+
require('./chunk-LRB5OVRT.cjs');
|
|
13
|
+
require('./chunk-EVIWKPJV.cjs');
|
|
14
|
+
require('./chunk-2OF5RPVU.cjs');
|
|
15
|
+
require('./chunk-CA7DNRHO.cjs');
|
|
16
|
+
require('./chunk-PMJSG4JS.cjs');
|
|
17
|
+
require('./chunk-A25FXJ7D.cjs');
|
|
18
|
+
require('./chunk-D22BUQKW.cjs');
|
|
19
|
+
require('./chunk-YTVSWXEZ.cjs');
|
|
20
|
+
require('./chunk-BTZ5O6VM.cjs');
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
exports.FARM_NATIVE_TREE_CONTENT_TYPE = _chunk3HLQTOVUcjs.FARM_NATIVE_TREE_CONTENT_TYPE; exports.createFarmNativeTree = _chunkXTG73QZAcjs.createFarmNativeTree; exports.createFarmNativeTreeResponse = _chunkXTG73QZAcjs.createFarmNativeTreeResponse; exports.farmRequestWantsNativeTree = _chunkXTG73QZAcjs.farmRequestWantsNativeTree; exports.readFarmPageStylesheets = _chunkXTG73QZAcjs.readFarmPageStylesheets;
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createFarmNativeTree,
|
|
3
3
|
createFarmNativeTreeResponse,
|
|
4
|
-
farmRequestWantsNativeTree
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
farmRequestWantsNativeTree,
|
|
5
|
+
readFarmPageStylesheets
|
|
6
|
+
} from "./chunk-37PYUEK5.mjs";
|
|
7
|
+
import "./chunk-NHD7BAKD.mjs";
|
|
7
8
|
import {
|
|
8
9
|
FARM_NATIVE_TREE_CONTENT_TYPE
|
|
9
10
|
} from "./chunk-LLZSYFOM.mjs";
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-YSXTNSXS.mjs";
|
|
12
|
+
import "./chunk-C7GJDVN4.mjs";
|
|
12
13
|
import "./chunk-2DA7CLY7.mjs";
|
|
13
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-2I6PUKWJ.mjs";
|
|
14
15
|
import "./chunk-GUZC226X.mjs";
|
|
15
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-W6QLRQ3V.mjs";
|
|
16
17
|
import "./chunk-LM55GS4R.mjs";
|
|
17
18
|
import "./chunk-SF3JB56B.mjs";
|
|
18
19
|
import "./chunk-AYP2YFVN.mjs";
|
|
@@ -21,5 +22,6 @@ export {
|
|
|
21
22
|
FARM_NATIVE_TREE_CONTENT_TYPE,
|
|
22
23
|
createFarmNativeTree,
|
|
23
24
|
createFarmNativeTreeResponse,
|
|
24
|
-
farmRequestWantsNativeTree
|
|
25
|
+
farmRequestWantsNativeTree,
|
|
26
|
+
readFarmPageStylesheets
|
|
25
27
|
};
|
package/dist/native.cjs
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
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; }require('./chunk-BTZ5O6VM.cjs');
|
|
2
|
+
|
|
3
|
+
// src/native.ts
|
|
4
|
+
var UNAVAILABLE = "native_unavailable";
|
|
5
|
+
var NativeUnavailableError = class extends Error {
|
|
6
|
+
constructor(module, method, options) {
|
|
7
|
+
super(
|
|
8
|
+
`native.${module}.${method}() is not available here. Web screens reach a native module only inside the Android shell, when mobile.modules.${module}.web is true in farm.config.ts. Check native.${module}.available() first, and show the web alternative when it is false.`
|
|
9
|
+
);
|
|
10
|
+
this.name = "NativeUnavailableError";
|
|
11
|
+
this.code = UNAVAILABLE;
|
|
12
|
+
this.module = module;
|
|
13
|
+
this.method = method;
|
|
14
|
+
this.cause = _optionalChain([options, 'optionalAccess', _ => _.cause]);
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
var NativeCallError = class extends Error {
|
|
18
|
+
constructor(module, method, code, message, options) {
|
|
19
|
+
super(`native.${module}.${method}() failed (${code}): ${message}`);
|
|
20
|
+
this.name = "NativeCallError";
|
|
21
|
+
this.cause = _optionalChain([options, 'optionalAccess', _2 => _2.cause]);
|
|
22
|
+
this.code = code;
|
|
23
|
+
this.module = module;
|
|
24
|
+
this.method = method;
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
function bridge() {
|
|
28
|
+
const candidate = globalThis.__farmBridge;
|
|
29
|
+
return candidate && typeof candidate.call === "function" && typeof candidate.has === "function" ? candidate : void 0;
|
|
30
|
+
}
|
|
31
|
+
function isAvailable(module) {
|
|
32
|
+
return _optionalChain([bridge, 'call', _3 => _3(), 'optionalAccess', _4 => _4.has, 'call', _5 => _5(module)]) === true;
|
|
33
|
+
}
|
|
34
|
+
async function invoke(module, method, input) {
|
|
35
|
+
const shell = bridge();
|
|
36
|
+
if (!shell || !shell.has(module)) throw new NativeUnavailableError(module, method);
|
|
37
|
+
const args = [...input];
|
|
38
|
+
while (args.length > 0 && args[args.length - 1] === void 0) args.pop();
|
|
39
|
+
try {
|
|
40
|
+
return await shell.call(module, method, args);
|
|
41
|
+
} catch (error) {
|
|
42
|
+
const code = _optionalChain([error, 'optionalAccess', _6 => _6.code]);
|
|
43
|
+
if (code === UNAVAILABLE) throw new NativeUnavailableError(module, method, { cause: error });
|
|
44
|
+
throw new NativeCallError(
|
|
45
|
+
module,
|
|
46
|
+
method,
|
|
47
|
+
typeof code === "string" && code ? code : "native_error",
|
|
48
|
+
String(_nullishCoalesce(_optionalChain([error, 'optionalAccess', _7 => _7.message]), () => ( error))),
|
|
49
|
+
{ cause: error }
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
var RESERVED = /* @__PURE__ */ new Set(["then", "toJSON", "constructor", "$$typeof"]);
|
|
54
|
+
function createModule(module) {
|
|
55
|
+
const methods = /* @__PURE__ */ new Map();
|
|
56
|
+
return new Proxy(/* @__PURE__ */ Object.create(null), {
|
|
57
|
+
get(_target, method) {
|
|
58
|
+
if (typeof method !== "string" || RESERVED.has(method)) return void 0;
|
|
59
|
+
let fn = methods.get(method);
|
|
60
|
+
if (!fn) {
|
|
61
|
+
fn = method === "available" ? () => isAvailable(module) : (...args) => invoke(module, method, args);
|
|
62
|
+
methods.set(method, fn);
|
|
63
|
+
}
|
|
64
|
+
return fn;
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
function createNative() {
|
|
69
|
+
const modules = /* @__PURE__ */ new Map();
|
|
70
|
+
return new Proxy(/* @__PURE__ */ Object.create(null), {
|
|
71
|
+
get(_target, module) {
|
|
72
|
+
if (typeof module !== "string" || RESERVED.has(module)) return void 0;
|
|
73
|
+
let entry = modules.get(module);
|
|
74
|
+
if (!entry) {
|
|
75
|
+
entry = createModule(module);
|
|
76
|
+
modules.set(module, entry);
|
|
77
|
+
}
|
|
78
|
+
return entry;
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
var native = /* @__PURE__ */ createNative();
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
exports.NativeCallError = NativeCallError; exports.NativeUnavailableError = NativeUnavailableError; exports.native = native;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@farm.js/core/native`: web screens call the app's own native modules (RFC 0004, 7.5).
|
|
3
|
+
*
|
|
4
|
+
* ```ts
|
|
5
|
+
* import { native } from "@farm.js/core/native";
|
|
6
|
+
*
|
|
7
|
+
* if (native.Device.available()) console.log(await native.Device.model());
|
|
8
|
+
* ```
|
|
9
|
+
*
|
|
10
|
+
* A call goes through the mobile shell's bridge to the module's Kotlin class, which checks the
|
|
11
|
+
* arguments against the module's Codegen spec before the module runs. Only modules with
|
|
12
|
+
* `mobile.modules.<name>.web: true` are reachable, and only their methods that return a Promise.
|
|
13
|
+
* In a browser, during server rendering, or in a shell without the module, every call rejects with
|
|
14
|
+
* `NativeUnavailableError`. Nothing here imports React Native.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* The app's native modules, keyed by the name each spec registers. `src/farm.d.ts` fills this in
|
|
18
|
+
* from the Codegen specs in `src/native/` (`NativeDevice.ts` registers `"Device"`).
|
|
19
|
+
*/
|
|
20
|
+
interface FarmNativeModules {
|
|
21
|
+
}
|
|
22
|
+
/** One module as web screens see it: its Promise methods, and `available()`. */
|
|
23
|
+
type FarmNativeModule<Methods> = Methods & {
|
|
24
|
+
/**
|
|
25
|
+
* True inside the mobile shell when this build registered the module for web screens. Check it
|
|
26
|
+
* before calling, and show the web alternative when it is false.
|
|
27
|
+
*/
|
|
28
|
+
available(): boolean;
|
|
29
|
+
};
|
|
30
|
+
type FarmNative = {
|
|
31
|
+
readonly [Name in keyof FarmNativeModules]: FarmNativeModule<FarmNativeModules[Name]>;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* A call that cannot reach the module: outside the mobile shell, during server rendering, in a
|
|
35
|
+
* shell built without the module for web screens, or on an OS whose shell does not host modules
|
|
36
|
+
* yet (iOS). `native.<module>.available()` is false in each of these cases.
|
|
37
|
+
*/
|
|
38
|
+
declare class NativeUnavailableError extends Error {
|
|
39
|
+
name: string;
|
|
40
|
+
readonly code = "native_unavailable";
|
|
41
|
+
readonly module: string;
|
|
42
|
+
readonly method: string;
|
|
43
|
+
/** The shell's own rejection, when the bridge answered. */
|
|
44
|
+
readonly cause: unknown;
|
|
45
|
+
constructor(module: string, method: string, options?: {
|
|
46
|
+
cause?: unknown;
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* A call the shell or the module rejected. `code` is the module's own rejection code, or one of
|
|
51
|
+
* the shell's: `invalid_args` (the arguments do not match the spec, and the module never ran),
|
|
52
|
+
* `unknown_method` (no Promise method of that name in the spec), or `native_error` (the module
|
|
53
|
+
* threw).
|
|
54
|
+
*/
|
|
55
|
+
declare class NativeCallError extends Error {
|
|
56
|
+
name: string;
|
|
57
|
+
readonly code: string;
|
|
58
|
+
readonly module: string;
|
|
59
|
+
readonly method: string;
|
|
60
|
+
/** The bridge's rejection. */
|
|
61
|
+
readonly cause: unknown;
|
|
62
|
+
constructor(module: string, method: string, code: string, message: string, options?: {
|
|
63
|
+
cause?: unknown;
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* The app's native modules for web screens: `native.Device.model()` calls the `Device` module's
|
|
68
|
+
* `model` method in the shell, and `native.Device.available()` says whether it can.
|
|
69
|
+
*/
|
|
70
|
+
declare const native: FarmNative;
|
|
71
|
+
|
|
72
|
+
export { type FarmNative, type FarmNativeModule, type FarmNativeModules, NativeCallError, NativeUnavailableError, native };
|
package/dist/native.d.ts
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@farm.js/core/native`: web screens call the app's own native modules (RFC 0004, 7.5).
|
|
3
|
+
*
|
|
4
|
+
* ```ts
|
|
5
|
+
* import { native } from "@farm.js/core/native";
|
|
6
|
+
*
|
|
7
|
+
* if (native.Device.available()) console.log(await native.Device.model());
|
|
8
|
+
* ```
|
|
9
|
+
*
|
|
10
|
+
* A call goes through the mobile shell's bridge to the module's Kotlin class, which checks the
|
|
11
|
+
* arguments against the module's Codegen spec before the module runs. Only modules with
|
|
12
|
+
* `mobile.modules.<name>.web: true` are reachable, and only their methods that return a Promise.
|
|
13
|
+
* In a browser, during server rendering, or in a shell without the module, every call rejects with
|
|
14
|
+
* `NativeUnavailableError`. Nothing here imports React Native.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* The app's native modules, keyed by the name each spec registers. `src/farm.d.ts` fills this in
|
|
18
|
+
* from the Codegen specs in `src/native/` (`NativeDevice.ts` registers `"Device"`).
|
|
19
|
+
*/
|
|
20
|
+
interface FarmNativeModules {
|
|
21
|
+
}
|
|
22
|
+
/** One module as web screens see it: its Promise methods, and `available()`. */
|
|
23
|
+
type FarmNativeModule<Methods> = Methods & {
|
|
24
|
+
/**
|
|
25
|
+
* True inside the mobile shell when this build registered the module for web screens. Check it
|
|
26
|
+
* before calling, and show the web alternative when it is false.
|
|
27
|
+
*/
|
|
28
|
+
available(): boolean;
|
|
29
|
+
};
|
|
30
|
+
type FarmNative = {
|
|
31
|
+
readonly [Name in keyof FarmNativeModules]: FarmNativeModule<FarmNativeModules[Name]>;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* A call that cannot reach the module: outside the mobile shell, during server rendering, in a
|
|
35
|
+
* shell built without the module for web screens, or on an OS whose shell does not host modules
|
|
36
|
+
* yet (iOS). `native.<module>.available()` is false in each of these cases.
|
|
37
|
+
*/
|
|
38
|
+
declare class NativeUnavailableError extends Error {
|
|
39
|
+
name: string;
|
|
40
|
+
readonly code = "native_unavailable";
|
|
41
|
+
readonly module: string;
|
|
42
|
+
readonly method: string;
|
|
43
|
+
/** The shell's own rejection, when the bridge answered. */
|
|
44
|
+
readonly cause: unknown;
|
|
45
|
+
constructor(module: string, method: string, options?: {
|
|
46
|
+
cause?: unknown;
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* A call the shell or the module rejected. `code` is the module's own rejection code, or one of
|
|
51
|
+
* the shell's: `invalid_args` (the arguments do not match the spec, and the module never ran),
|
|
52
|
+
* `unknown_method` (no Promise method of that name in the spec), or `native_error` (the module
|
|
53
|
+
* threw).
|
|
54
|
+
*/
|
|
55
|
+
declare class NativeCallError extends Error {
|
|
56
|
+
name: string;
|
|
57
|
+
readonly code: string;
|
|
58
|
+
readonly module: string;
|
|
59
|
+
readonly method: string;
|
|
60
|
+
/** The bridge's rejection. */
|
|
61
|
+
readonly cause: unknown;
|
|
62
|
+
constructor(module: string, method: string, code: string, message: string, options?: {
|
|
63
|
+
cause?: unknown;
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* The app's native modules for web screens: `native.Device.model()` calls the `Device` module's
|
|
68
|
+
* `model` method in the shell, and `native.Device.available()` says whether it can.
|
|
69
|
+
*/
|
|
70
|
+
declare const native: FarmNative;
|
|
71
|
+
|
|
72
|
+
export { type FarmNative, type FarmNativeModule, type FarmNativeModules, NativeCallError, NativeUnavailableError, native };
|
package/dist/native.mjs
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import "./chunk-Y6FXYEAI.mjs";
|
|
2
|
+
|
|
3
|
+
// src/native.ts
|
|
4
|
+
var UNAVAILABLE = "native_unavailable";
|
|
5
|
+
var NativeUnavailableError = class extends Error {
|
|
6
|
+
constructor(module, method, options) {
|
|
7
|
+
super(
|
|
8
|
+
`native.${module}.${method}() is not available here. Web screens reach a native module only inside the Android shell, when mobile.modules.${module}.web is true in farm.config.ts. Check native.${module}.available() first, and show the web alternative when it is false.`
|
|
9
|
+
);
|
|
10
|
+
this.name = "NativeUnavailableError";
|
|
11
|
+
this.code = UNAVAILABLE;
|
|
12
|
+
this.module = module;
|
|
13
|
+
this.method = method;
|
|
14
|
+
this.cause = options?.cause;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
var NativeCallError = class extends Error {
|
|
18
|
+
constructor(module, method, code, message, options) {
|
|
19
|
+
super(`native.${module}.${method}() failed (${code}): ${message}`);
|
|
20
|
+
this.name = "NativeCallError";
|
|
21
|
+
this.cause = options?.cause;
|
|
22
|
+
this.code = code;
|
|
23
|
+
this.module = module;
|
|
24
|
+
this.method = method;
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
function bridge() {
|
|
28
|
+
const candidate = globalThis.__farmBridge;
|
|
29
|
+
return candidate && typeof candidate.call === "function" && typeof candidate.has === "function" ? candidate : void 0;
|
|
30
|
+
}
|
|
31
|
+
function isAvailable(module) {
|
|
32
|
+
return bridge()?.has(module) === true;
|
|
33
|
+
}
|
|
34
|
+
async function invoke(module, method, input) {
|
|
35
|
+
const shell = bridge();
|
|
36
|
+
if (!shell || !shell.has(module)) throw new NativeUnavailableError(module, method);
|
|
37
|
+
const args = [...input];
|
|
38
|
+
while (args.length > 0 && args[args.length - 1] === void 0) args.pop();
|
|
39
|
+
try {
|
|
40
|
+
return await shell.call(module, method, args);
|
|
41
|
+
} catch (error) {
|
|
42
|
+
const code = error?.code;
|
|
43
|
+
if (code === UNAVAILABLE) throw new NativeUnavailableError(module, method, { cause: error });
|
|
44
|
+
throw new NativeCallError(
|
|
45
|
+
module,
|
|
46
|
+
method,
|
|
47
|
+
typeof code === "string" && code ? code : "native_error",
|
|
48
|
+
String(error?.message ?? error),
|
|
49
|
+
{ cause: error }
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
var RESERVED = /* @__PURE__ */ new Set(["then", "toJSON", "constructor", "$$typeof"]);
|
|
54
|
+
function createModule(module) {
|
|
55
|
+
const methods = /* @__PURE__ */ new Map();
|
|
56
|
+
return new Proxy(/* @__PURE__ */ Object.create(null), {
|
|
57
|
+
get(_target, method) {
|
|
58
|
+
if (typeof method !== "string" || RESERVED.has(method)) return void 0;
|
|
59
|
+
let fn = methods.get(method);
|
|
60
|
+
if (!fn) {
|
|
61
|
+
fn = method === "available" ? () => isAvailable(module) : (...args) => invoke(module, method, args);
|
|
62
|
+
methods.set(method, fn);
|
|
63
|
+
}
|
|
64
|
+
return fn;
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
function createNative() {
|
|
69
|
+
const modules = /* @__PURE__ */ new Map();
|
|
70
|
+
return new Proxy(/* @__PURE__ */ Object.create(null), {
|
|
71
|
+
get(_target, module) {
|
|
72
|
+
if (typeof module !== "string" || RESERVED.has(module)) return void 0;
|
|
73
|
+
let entry = modules.get(module);
|
|
74
|
+
if (!entry) {
|
|
75
|
+
entry = createModule(module);
|
|
76
|
+
modules.set(module, entry);
|
|
77
|
+
}
|
|
78
|
+
return entry;
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
var native = /* @__PURE__ */ createNative();
|
|
83
|
+
export {
|
|
84
|
+
NativeCallError,
|
|
85
|
+
NativeUnavailableError,
|
|
86
|
+
native
|
|
87
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as FarmNavigationBlockerContext } from './spa-router.d-
|
|
1
|
+
import { F as FarmNavigationBlockerContext } from './spa-router.d-DHDoXxDE.mjs';
|
|
2
2
|
|
|
3
3
|
/** A navigation offered to a delegate, after every blocker let it through. */
|
|
4
4
|
interface FarmNavigationDelegateContext extends FarmNavigationBlockerContext {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as FarmNavigationBlockerContext } from './spa-router.d-
|
|
1
|
+
import { F as FarmNavigationBlockerContext } from './spa-router.d-DAtnNoBe.js';
|
|
2
2
|
|
|
3
3
|
/** A navigation offered to a delegate, after every blocker let it through. */
|
|
4
4
|
interface FarmNavigationDelegateContext extends FarmNavigationBlockerContext {
|
package/dist/navigation.cjs
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
require('./chunk-
|
|
5
|
+
var _chunkMGKW5XZEcjs = require('./chunk-MGKW5XZE.cjs');
|
|
6
|
+
require('./chunk-CNNBFGL5.cjs');
|
|
7
7
|
require('./chunk-53EHWHT2.cjs');
|
|
8
|
-
require('./chunk-
|
|
8
|
+
require('./chunk-CBOEJ5Z4.cjs');
|
|
9
9
|
require('./chunk-RI3EVPKD.cjs');
|
|
10
|
-
require('./chunk-
|
|
10
|
+
require('./chunk-JIBEFLQ7.cjs');
|
|
11
11
|
require('./chunk-QQ44FYRO.cjs');
|
|
12
12
|
require('./chunk-PENBZAHJ.cjs');
|
|
13
13
|
require('./chunk-D4XGKF67.cjs');
|
|
@@ -40,4 +40,4 @@ require('./chunk-BTZ5O6VM.cjs');
|
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
|
|
43
|
-
exports.getFarmRedirectError = _chunk7JUIK547cjs.getFarmRedirectError; exports.isFarmNotFoundError = _chunk7JUIK547cjs.isFarmNotFoundError; exports.isFarmRedirectError = _chunk7JUIK547cjs.isFarmRedirectError; exports.notFound = _chunk7JUIK547cjs.notFound; exports.permanentRedirect = _chunk7JUIK547cjs.permanentRedirect; exports.redirect = _chunk7JUIK547cjs.redirect; exports.usePathname =
|
|
43
|
+
exports.getFarmRedirectError = _chunk7JUIK547cjs.getFarmRedirectError; exports.isFarmNotFoundError = _chunk7JUIK547cjs.isFarmNotFoundError; exports.isFarmRedirectError = _chunk7JUIK547cjs.isFarmRedirectError; exports.notFound = _chunk7JUIK547cjs.notFound; exports.permanentRedirect = _chunk7JUIK547cjs.permanentRedirect; exports.redirect = _chunk7JUIK547cjs.redirect; exports.usePathname = _chunkMGKW5XZEcjs.usePathname; exports.useRouter = _chunkMGKW5XZEcjs.useRouter; exports.useSearchParams = _chunkMGKW5XZEcjs.useSearchParams;
|
package/dist/navigation.d.mts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { F as FarmRouterNavigateOptions } from './router.d-
|
|
2
|
-
export { D as FarmRedirectSignal, E as FarmRedirectStatus, G as getFarmRedirectError, H as isFarmNotFoundError, I as isFarmRedirectError, J as notFound, K as permanentRedirect, N as redirect } from './client-plugins.d-
|
|
1
|
+
import { F as FarmRouterNavigateOptions } from './router.d-mNTbOGV_.mjs';
|
|
2
|
+
export { D as FarmRedirectSignal, E as FarmRedirectStatus, G as getFarmRedirectError, H as isFarmNotFoundError, I as isFarmRedirectError, J as notFound, K as permanentRedirect, N as redirect } from './client-plugins.d-CgQQ-EAv.mjs';
|
|
3
3
|
import 'react';
|
|
4
4
|
import './router.mjs';
|
|
5
|
-
import './spa-router.d-
|
|
5
|
+
import './spa-router.d-DHDoXxDE.mjs';
|
|
6
6
|
import './lifecycle.d-C2aLBOwu.mjs';
|
|
7
7
|
import './types.d-C41ePjvP.mjs';
|
|
8
8
|
import './island.d-CfGru1MO.mjs';
|
|
9
|
-
import './render-plan.d-
|
|
9
|
+
import './render-plan.d-DZ-qjjdG.mjs';
|
|
10
10
|
import './route.d-BaVH3V0w.mjs';
|
|
11
11
|
import './endpoint.d-BkMSCRf6.mjs';
|
|
12
12
|
import './cache.mjs';
|
|
@@ -33,7 +33,7 @@ import './layers.d-CcS42OGR.mjs';
|
|
|
33
33
|
import 'rolldown/utils';
|
|
34
34
|
import 'rolldown';
|
|
35
35
|
import './image-config.d-CeDgNyX4.mjs';
|
|
36
|
-
import './config.d-
|
|
36
|
+
import './config.d-DqZkLwef.mjs';
|
|
37
37
|
import './types.d-DQnyD3VD.mjs';
|
|
38
38
|
import './font.mjs';
|
|
39
39
|
|
package/dist/navigation.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { F as FarmRouterNavigateOptions } from './router.d-
|
|
2
|
-
export { D as FarmRedirectSignal, E as FarmRedirectStatus, G as getFarmRedirectError, H as isFarmNotFoundError, I as isFarmRedirectError, J as notFound, K as permanentRedirect, N as redirect } from './client-plugins.d-
|
|
1
|
+
import { F as FarmRouterNavigateOptions } from './router.d-DjGn_al7.js';
|
|
2
|
+
export { D as FarmRedirectSignal, E as FarmRedirectStatus, G as getFarmRedirectError, H as isFarmNotFoundError, I as isFarmRedirectError, J as notFound, K as permanentRedirect, N as redirect } from './client-plugins.d-vXrbcfJ1.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import './router.js';
|
|
5
|
-
import './spa-router.d-
|
|
5
|
+
import './spa-router.d-DAtnNoBe.js';
|
|
6
6
|
import './lifecycle.d-C2aLBOwu.js';
|
|
7
7
|
import './types.d-C41ePjvP.js';
|
|
8
8
|
import './island.d-CfGru1MO.js';
|
|
9
|
-
import './render-plan.d-
|
|
9
|
+
import './render-plan.d-B9lAP3uX.js';
|
|
10
10
|
import './route.d-DBTEqifW.js';
|
|
11
11
|
import './endpoint.d-BgHn0lhl.js';
|
|
12
12
|
import './cache.js';
|
|
@@ -33,7 +33,7 @@ import './layers.d-CcS42OGR.js';
|
|
|
33
33
|
import 'rolldown/utils';
|
|
34
34
|
import 'rolldown';
|
|
35
35
|
import './image-config.d-CeDgNyX4.js';
|
|
36
|
-
import './config.d-
|
|
36
|
+
import './config.d-DqZkLwef.js';
|
|
37
37
|
import './types.d-DQnyD3VD.js';
|
|
38
38
|
import './font.js';
|
|
39
39
|
|
package/dist/navigation.mjs
CHANGED
|
@@ -2,12 +2,12 @@ import {
|
|
|
2
2
|
usePathname,
|
|
3
3
|
useRouter,
|
|
4
4
|
useSearchParams
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-VQJHT2ND.mjs";
|
|
6
|
+
import "./chunk-BQWBHWEW.mjs";
|
|
7
7
|
import "./chunk-BPAXGCKX.mjs";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-25T5VXOE.mjs";
|
|
9
9
|
import "./chunk-PTLXHRJZ.mjs";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-RSEAX5MW.mjs";
|
|
11
11
|
import "./chunk-NCIAP562.mjs";
|
|
12
12
|
import "./chunk-H227LYHT.mjs";
|
|
13
13
|
import "./chunk-MFQGU5CC.mjs";
|
|
@@ -6,23 +6,23 @@ import {
|
|
|
6
6
|
} from "./chunk-N33DLJBC.mjs";
|
|
7
7
|
import {
|
|
8
8
|
prepareFarmWorkflowsForNitro
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-JPIUGDK4.mjs";
|
|
10
10
|
import {
|
|
11
11
|
createFarmCronCloudflareConfig,
|
|
12
12
|
mergeScheduledTasks,
|
|
13
13
|
prepareFarmCronForNitro
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-3PX4AIXO.mjs";
|
|
15
15
|
import "./chunk-WXFY5JIY.mjs";
|
|
16
16
|
import "./chunk-YP7YO3S3.mjs";
|
|
17
17
|
import "./chunk-EVMXPJCB.mjs";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-JSDV2NUN.mjs";
|
|
19
19
|
import "./chunk-H3ASZDT7.mjs";
|
|
20
|
-
import "./chunk-GFT5AHAT.mjs";
|
|
21
|
-
import "./chunk-D2LCAV6L.mjs";
|
|
22
20
|
import {
|
|
23
21
|
resolveFarmAPIServerBasePath
|
|
24
|
-
} from "./chunk-
|
|
25
|
-
import "./chunk-
|
|
22
|
+
} from "./chunk-2I6PUKWJ.mjs";
|
|
23
|
+
import "./chunk-GFT5AHAT.mjs";
|
|
24
|
+
import "./chunk-D2LCAV6L.mjs";
|
|
25
|
+
import "./chunk-W6QLRQ3V.mjs";
|
|
26
26
|
import "./chunk-ONG4RDW3.mjs";
|
|
27
27
|
import "./chunk-JNYFXL7X.mjs";
|
|
28
28
|
import "./chunk-OHWM2VI4.mjs";
|
|
@@ -6,23 +6,23 @@ var _chunkV56632LAcjs = require('./chunk-V56632LA.cjs');
|
|
|
6
6
|
var _chunk3EIPOTZVcjs = require('./chunk-3EIPOTZV.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkQRX4JRBOcjs = require('./chunk-QRX4JRBO.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkYI6FKTTNcjs = require('./chunk-YI6FKTTN.cjs');
|
|
15
15
|
require('./chunk-2KMIJDY6.cjs');
|
|
16
16
|
require('./chunk-SHIWRBFI.cjs');
|
|
17
17
|
require('./chunk-OYZXVBZP.cjs');
|
|
18
|
-
require('./chunk-
|
|
18
|
+
require('./chunk-QMNWKQL4.cjs');
|
|
19
19
|
require('./chunk-SUCDVKUB.cjs');
|
|
20
|
-
require('./chunk-LIFUPCXW.cjs');
|
|
21
|
-
require('./chunk-JYT7AN37.cjs');
|
|
22
20
|
|
|
23
21
|
|
|
24
|
-
var
|
|
25
|
-
require('./chunk-
|
|
22
|
+
var _chunk2OF5RPVUcjs = require('./chunk-2OF5RPVU.cjs');
|
|
23
|
+
require('./chunk-LIFUPCXW.cjs');
|
|
24
|
+
require('./chunk-JYT7AN37.cjs');
|
|
25
|
+
require('./chunk-PMJSG4JS.cjs');
|
|
26
26
|
require('./chunk-6XQSPIN6.cjs');
|
|
27
27
|
require('./chunk-7JUIK547.cjs');
|
|
28
28
|
require('./chunk-6CTFVBAT.cjs');
|
|
@@ -35,7 +35,7 @@ require('./chunk-BTZ5O6VM.cjs');
|
|
|
35
35
|
var _path = require('path'); var _path2 = _interopRequireDefault(_path);
|
|
36
36
|
async function createNitroConfig(config, routeManager, apiRouteManager, serverRenderer, preset = "node-server") {
|
|
37
37
|
const root = config.root || process.cwd();
|
|
38
|
-
const apiBasePath =
|
|
38
|
+
const apiBasePath = _chunk2OF5RPVUcjs.resolveFarmAPIServerBasePath.call(void 0, config.api);
|
|
39
39
|
const srcDir = config.srcDir || "src";
|
|
40
40
|
const distDir = ".farm";
|
|
41
41
|
const nitroBuildDir = _path2.default.join(root, distDir, ".nitro");
|
|
@@ -45,16 +45,16 @@ async function createNitroConfig(config, routeManager, apiRouteManager, serverRe
|
|
|
45
45
|
await mkdir(serverDir, { recursive: true });
|
|
46
46
|
await mkdir(_path2.default.join(serverDir, "api"), { recursive: true });
|
|
47
47
|
await mkdir(_path2.default.join(serverDir, "routes"), { recursive: true });
|
|
48
|
-
const farmWorkflows = await
|
|
48
|
+
const farmWorkflows = await _chunkQRX4JRBOcjs.prepareFarmWorkflowsForNitro.call(void 0, {
|
|
49
49
|
...config,
|
|
50
50
|
distDir
|
|
51
51
|
});
|
|
52
|
-
const farmCron = await
|
|
52
|
+
const farmCron = await _chunkYI6FKTTNcjs.prepareFarmCronForNitro.call(void 0, {
|
|
53
53
|
...config,
|
|
54
54
|
distDir
|
|
55
55
|
});
|
|
56
|
-
const scheduledTasks =
|
|
57
|
-
const cloudflareCronConfig =
|
|
56
|
+
const scheduledTasks = _chunkYI6FKTTNcjs.mergeScheduledTasks.call(void 0, farmWorkflows.scheduledTasks, farmCron.scheduledTasks);
|
|
57
|
+
const cloudflareCronConfig = _chunkYI6FKTTNcjs.createFarmCronCloudflareConfig.call(void 0, farmCron.jobs);
|
|
58
58
|
const registryFile = _path2.default.join(serverDir, "farm-registry.ts");
|
|
59
59
|
const routePaths = {};
|
|
60
60
|
for (const [pattern, entry] of routeManager.getRoutes()) {
|