@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,137 @@
|
|
|
1
|
+
import {
|
|
2
|
+
_withFarmGuardedResponseCache
|
|
3
|
+
} from "./chunk-EGVC4LIG.mjs";
|
|
4
|
+
import {
|
|
5
|
+
_markFarmOwnedResponse,
|
|
6
|
+
_withFarmResponseHeaders
|
|
7
|
+
} from "./chunk-LM55GS4R.mjs";
|
|
8
|
+
|
|
9
|
+
// src/mobile/shell-response.ts
|
|
10
|
+
var FARM_SHELL_HEADER = "X-Farm-Shell";
|
|
11
|
+
function isFarmMobileShellRequest(request) {
|
|
12
|
+
const value = request.headers.get(FARM_SHELL_HEADER);
|
|
13
|
+
return value !== null && /^[a-z][a-z0-9-]{0,31}$/.test(value);
|
|
14
|
+
}
|
|
15
|
+
function isHtml(response) {
|
|
16
|
+
return response.headers.get("content-type")?.toLowerCase().includes("text/html") === true;
|
|
17
|
+
}
|
|
18
|
+
function appendVary(headers, name) {
|
|
19
|
+
const current = headers.get("Vary");
|
|
20
|
+
if (!current) {
|
|
21
|
+
headers.set("Vary", name);
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
const names = current.split(",").map((value) => value.trim().toLowerCase());
|
|
25
|
+
if (names.includes("*") || names.includes(name.toLowerCase())) return;
|
|
26
|
+
headers.set("Vary", `${current}, ${name}`);
|
|
27
|
+
}
|
|
28
|
+
function escapeRegExp(value) {
|
|
29
|
+
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
30
|
+
}
|
|
31
|
+
var MAX_HELD_TAG = 4096;
|
|
32
|
+
function createFarmMobileShellRewriter(client) {
|
|
33
|
+
const entry = new RegExp(`(["'])${escapeRegExp(client.webEntry)}\\1`, "g");
|
|
34
|
+
const webOnly = new Set(client.webOnly);
|
|
35
|
+
const preload = /<link rel="modulepreload" href="\/([^"]+)"[^>]*>/g;
|
|
36
|
+
let held = "";
|
|
37
|
+
return (text, final = false) => {
|
|
38
|
+
let input = held + text;
|
|
39
|
+
held = "";
|
|
40
|
+
if (!final) {
|
|
41
|
+
const open = input.lastIndexOf("<");
|
|
42
|
+
if (open !== -1 && input.indexOf(">", open) === -1 && input.length - open <= MAX_HELD_TAG) {
|
|
43
|
+
held = input.slice(open);
|
|
44
|
+
input = input.slice(0, open);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return input.replace(entry, (_match, quote) => `${quote}${client.entry}${quote}`).replace(preload, (tag, file) => webOnly.has(file) ? "" : tag);
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
function _applyFarmMobileShellClient(request, response, client, onPrivate) {
|
|
51
|
+
if (!client || !isHtml(response)) return response;
|
|
52
|
+
if (!isFarmMobileShellRequest(request) || !response.body) {
|
|
53
|
+
return _withFarmResponseHeaders(response, (headers2) => appendVary(headers2, FARM_SHELL_HEADER));
|
|
54
|
+
}
|
|
55
|
+
onPrivate?.();
|
|
56
|
+
const headers = new Headers(_withFarmGuardedResponseCache(response).headers);
|
|
57
|
+
appendVary(headers, FARM_SHELL_HEADER);
|
|
58
|
+
headers.delete("content-length");
|
|
59
|
+
headers.delete("etag");
|
|
60
|
+
const rewrite = createFarmMobileShellRewriter(client);
|
|
61
|
+
const decoder = new TextDecoder();
|
|
62
|
+
const encoder = new TextEncoder();
|
|
63
|
+
const body = response.body.pipeThrough(
|
|
64
|
+
new TransformStream({
|
|
65
|
+
transform(chunk, controller) {
|
|
66
|
+
const output = rewrite(decoder.decode(chunk, { stream: true }));
|
|
67
|
+
if (output) controller.enqueue(encoder.encode(output));
|
|
68
|
+
},
|
|
69
|
+
flush(controller) {
|
|
70
|
+
const output = rewrite(decoder.decode(), true);
|
|
71
|
+
if (output) controller.enqueue(encoder.encode(output));
|
|
72
|
+
}
|
|
73
|
+
})
|
|
74
|
+
);
|
|
75
|
+
return _markFarmOwnedResponse(
|
|
76
|
+
new Response(body, { status: response.status, statusText: response.statusText, headers })
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// src/mobile/shell-render.ts
|
|
81
|
+
var FARM_SHELL_RENDER_HEADER = "X-Farm-Shell-Render";
|
|
82
|
+
var FARM_SHELL_ROUTE_HEADER = "X-Farm-Shell-Route";
|
|
83
|
+
var FARM_SHELL_PARAM_SEGMENT = "__farm_shell__";
|
|
84
|
+
function constantTimeEqual(left, right) {
|
|
85
|
+
if (left.length !== right.length) return false;
|
|
86
|
+
let difference = 0;
|
|
87
|
+
for (let index = 0; index < left.length; index += 1) {
|
|
88
|
+
difference |= left.charCodeAt(index) ^ right.charCodeAt(index);
|
|
89
|
+
}
|
|
90
|
+
return difference === 0;
|
|
91
|
+
}
|
|
92
|
+
function _isFarmMobileShellRenderRequest(request, token) {
|
|
93
|
+
const value = request.headers.get(FARM_SHELL_RENDER_HEADER);
|
|
94
|
+
return token.length > 0 && value !== null && constantTimeEqual(value, token);
|
|
95
|
+
}
|
|
96
|
+
function stripRouteGroups(pattern) {
|
|
97
|
+
const segments = pattern.split("/").filter((segment) => segment && !(segment.startsWith("(") && segment.endsWith(")")));
|
|
98
|
+
return segments.length === 0 ? "/" : `/${segments.join("/")}`;
|
|
99
|
+
}
|
|
100
|
+
function isDynamicPattern(pattern) {
|
|
101
|
+
return pattern.split("/").some((segment) => segment.startsWith("["));
|
|
102
|
+
}
|
|
103
|
+
function _checkFarmMobileShellRoute(check) {
|
|
104
|
+
const route = stripRouteGroups(check.route);
|
|
105
|
+
if (check.requested === null || stripRouteGroups(check.requested) !== route) {
|
|
106
|
+
return `the request matched ${route}, not ${check.requested ?? "a requested route"}`;
|
|
107
|
+
}
|
|
108
|
+
if (check.loading === null) return "it has no loading file";
|
|
109
|
+
if (isDynamicPattern(check.loading)) {
|
|
110
|
+
return `its loading file is in a dynamic folder (${stripRouteGroups(check.loading)})`;
|
|
111
|
+
}
|
|
112
|
+
const layout = check.layouts.find(isDynamicPattern);
|
|
113
|
+
if (layout !== void 0) {
|
|
114
|
+
return `a layout is in a dynamic folder (${stripRouteGroups(layout)})`;
|
|
115
|
+
}
|
|
116
|
+
return null;
|
|
117
|
+
}
|
|
118
|
+
function createFarmMobileShellRenderPath(route) {
|
|
119
|
+
const segments = [];
|
|
120
|
+
for (const segment of route.split("/")) {
|
|
121
|
+
if (!segment || segment.startsWith("(") && segment.endsWith(")")) continue;
|
|
122
|
+
if (segment.startsWith("[[...") && segment.endsWith("]]")) continue;
|
|
123
|
+
segments.push(segment.startsWith("[") ? FARM_SHELL_PARAM_SEGMENT : segment);
|
|
124
|
+
}
|
|
125
|
+
return `/${segments.join("/")}`;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export {
|
|
129
|
+
FARM_SHELL_HEADER,
|
|
130
|
+
_applyFarmMobileShellClient,
|
|
131
|
+
FARM_SHELL_RENDER_HEADER,
|
|
132
|
+
FARM_SHELL_ROUTE_HEADER,
|
|
133
|
+
FARM_SHELL_PARAM_SEGMENT,
|
|
134
|
+
_isFarmMobileShellRenderRequest,
|
|
135
|
+
_checkFarmMobileShellRoute,
|
|
136
|
+
createFarmMobileShellRenderPath
|
|
137
|
+
};
|
|
@@ -20,9 +20,12 @@ function delegateNavigation(delegate) {
|
|
|
20
20
|
delegates.delete(delegate);
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
|
+
function hasFarmNavigationDelegates() {
|
|
24
|
+
return Boolean(_optionalChain([globalThis, 'access', _ => _[DELEGATES], 'optionalAccess', _2 => _2.size]));
|
|
25
|
+
}
|
|
23
26
|
async function runFarmNavigationDelegates(context) {
|
|
24
27
|
const delegates = globalThis[DELEGATES];
|
|
25
|
-
if (!_optionalChain([delegates, 'optionalAccess',
|
|
28
|
+
if (!_optionalChain([delegates, 'optionalAccess', _3 => _3.size])) return false;
|
|
26
29
|
for (const delegate of delegates) {
|
|
27
30
|
try {
|
|
28
31
|
if (await delegate(context) === true) return true;
|
|
@@ -37,4 +40,5 @@ async function runFarmNavigationDelegates(context) {
|
|
|
37
40
|
|
|
38
41
|
|
|
39
42
|
|
|
40
|
-
|
|
43
|
+
|
|
44
|
+
exports.getHashTargetElement = getHashTargetElement; exports.delegateNavigation = delegateNavigation; exports.hasFarmNavigationDelegates = hasFarmNavigationDelegates; exports.runFarmNavigationDelegates = runFarmNavigationDelegates;
|
|
@@ -173,7 +173,7 @@ async function fileExists(filePath) {
|
|
|
173
173
|
}
|
|
174
174
|
async function globFiles(pattern, cwd) {
|
|
175
175
|
const { glob } = await import("tinyglobby");
|
|
176
|
-
return glob(pattern, { cwd, expandDirectories: false });
|
|
176
|
+
return (await glob(pattern, { cwd, expandDirectories: false })).sort();
|
|
177
177
|
}
|
|
178
178
|
function parseSearchParams(searchParams) {
|
|
179
179
|
return searchParamsToObject(searchParams);
|
|
@@ -0,0 +1,237 @@
|
|
|
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
|
+
|
|
3
|
+
var _chunk3YMLUNL2cjs = require('./chunk-3YMLUNL2.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
var _chunkYKHRCY4Tcjs = require('./chunk-YKHRCY4T.cjs');
|
|
8
|
+
|
|
9
|
+
// src/mobile/modules.ts
|
|
10
|
+
var _fs = require('fs');
|
|
11
|
+
var _path = require('path'); var path = _interopRequireWildcard(_path);
|
|
12
|
+
var MODULE_KEYS = /* @__PURE__ */ new Set(["permissions", "usage", "web"]);
|
|
13
|
+
var PERMISSION = /^[A-Za-z_][A-Za-z0-9_]*(?:\.[A-Za-z_][A-Za-z0-9_]*)+$/;
|
|
14
|
+
var BARE_PERMISSION = /^[A-Z][A-Z0-9_]*$/;
|
|
15
|
+
var USAGE_KEY = /^NS[A-Za-z0-9]+UsageDescription$/;
|
|
16
|
+
var SPEC_FILE = /^Native[A-Za-z0-9_]+\.(?:ts|js)$/;
|
|
17
|
+
var SPEC_NAME = /TurboModuleRegistry\s*\.\s*(?:getEnforcing|get)\s*(?:<[^>]*>)?\s*\(\s*(["'`])([A-Za-z_$][\w$]*)\1/;
|
|
18
|
+
function relative2(root, file) {
|
|
19
|
+
return path.relative(root, file).split(path.sep).join("/");
|
|
20
|
+
}
|
|
21
|
+
function scanFarmMobileAppModules(options) {
|
|
22
|
+
const dir = path.resolve(options.root, _nullishCoalesce(options.srcDir, () => ( "src")), "native");
|
|
23
|
+
if (!_fs.existsSync.call(void 0, dir)) return void 0;
|
|
24
|
+
const entries = _fs.readdirSync.call(void 0, dir, { withFileTypes: true }).filter((entry) => entry.isFile()).map((entry) => entry.name).sort();
|
|
25
|
+
const specs = [];
|
|
26
|
+
const names = /* @__PURE__ */ new Map();
|
|
27
|
+
for (const name of entries.filter((entry) => SPEC_FILE.test(entry))) {
|
|
28
|
+
const file = path.join(dir, name);
|
|
29
|
+
const match = SPEC_NAME.exec(_fs.readFileSync.call(void 0, file, "utf8"));
|
|
30
|
+
const shown = relative2(options.root, file);
|
|
31
|
+
if (!match) {
|
|
32
|
+
throw new TypeError(
|
|
33
|
+
`${shown} is a native module spec (Native*.ts) without a registered name. Export TurboModuleRegistry.getEnforcing<Spec>("${name.replace(/^Native|\.\w+$/g, "")}") as its default, as in a React Native app.`
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
const other = names.get(match[2]);
|
|
37
|
+
if (other) {
|
|
38
|
+
throw new TypeError(
|
|
39
|
+
`${shown} and ${other} both register the native module "${match[2]}". Give each spec its own name.`
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
names.set(match[2], shown);
|
|
43
|
+
specs.push({ name: match[2], file });
|
|
44
|
+
}
|
|
45
|
+
const android = entries.filter((entry) => entry.endsWith(".kt")).map((entry) => path.join(dir, entry));
|
|
46
|
+
const ios = entries.filter((entry) => entry.endsWith(".swift")).map((entry) => path.join(dir, entry));
|
|
47
|
+
if (specs.length === 0 && android.length === 0 && ios.length === 0) return void 0;
|
|
48
|
+
return { dir, specs, android, ios };
|
|
49
|
+
}
|
|
50
|
+
function findPackage(name, from) {
|
|
51
|
+
let dir = from;
|
|
52
|
+
for (; ; ) {
|
|
53
|
+
const candidate = path.join(dir, "node_modules", name);
|
|
54
|
+
if (_fs.existsSync.call(void 0, path.join(candidate, "package.json"))) return _fs.realpathSync.call(void 0, candidate);
|
|
55
|
+
const parent = path.dirname(dir);
|
|
56
|
+
if (parent === dir) return void 0;
|
|
57
|
+
dir = parent;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
function installedModuleProblem(name, root, dependencies) {
|
|
61
|
+
if (!(name in dependencies)) return "unknown";
|
|
62
|
+
const dir = findPackage(name, root);
|
|
63
|
+
if (!dir) return "missing";
|
|
64
|
+
try {
|
|
65
|
+
const pkg = JSON.parse(_fs.readFileSync.call(void 0, path.join(dir, "package.json"), "utf8"));
|
|
66
|
+
return _chunkYKHRCY4Tcjs.isPlainObject.call(void 0, pkg) && _chunkYKHRCY4Tcjs.isPlainObject.call(void 0, pkg.codegenConfig) ? void 0 : "not-a-module";
|
|
67
|
+
} catch (e) {
|
|
68
|
+
return "not-a-module";
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
function resolveFarmMobileModules(input, options, fail) {
|
|
72
|
+
if (input === void 0) return {};
|
|
73
|
+
if (!_chunkYKHRCY4Tcjs.isPlainObject.call(void 0, input)) {
|
|
74
|
+
fail(
|
|
75
|
+
'modules must be an object keyed by module name, such as { Device: { permissions: ["android.permission.VIBRATE"] } }.'
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
const issues = [];
|
|
79
|
+
const resolved = {};
|
|
80
|
+
const appModules = new Set(_nullishCoalesce(options.appModules, () => ( [])));
|
|
81
|
+
const usageOwners = /* @__PURE__ */ new Map();
|
|
82
|
+
let dependencies;
|
|
83
|
+
const specDir = relative2(
|
|
84
|
+
options.root,
|
|
85
|
+
path.resolve(options.root, _nullishCoalesce(options.srcDir, () => ( "src")), "native")
|
|
86
|
+
);
|
|
87
|
+
for (const name of Object.keys(input).sort()) {
|
|
88
|
+
const where = `modules[${JSON.stringify(name)}]`;
|
|
89
|
+
const entry = input[name];
|
|
90
|
+
if (!appModules.has(name)) {
|
|
91
|
+
_nullishCoalesce(dependencies, () => ( (dependencies = ((value) => _chunkYKHRCY4Tcjs.isPlainObject.call(void 0, value) ? value : {})(
|
|
92
|
+
_chunkYKHRCY4Tcjs.readAppPackageJson.call(void 0, options.root).dependencies
|
|
93
|
+
))));
|
|
94
|
+
const problem = installedModuleProblem(name, options.root, dependencies);
|
|
95
|
+
if (problem === "unknown") {
|
|
96
|
+
issues.push(
|
|
97
|
+
`${where} is not one of the app's native modules or an installed React Native module. Use the name a ${specDir}/Native*.ts spec registers, or a package in dependencies in package.json.`
|
|
98
|
+
);
|
|
99
|
+
} else if (problem === "missing") {
|
|
100
|
+
issues.push(
|
|
101
|
+
`${where} is in dependencies but not installed. Install the app's dependencies, then run the command again.`
|
|
102
|
+
);
|
|
103
|
+
} else if (problem === "not-a-module") {
|
|
104
|
+
issues.push(
|
|
105
|
+
`${where} names a package with no "codegenConfig" in its package.json, so it is not a React Native module for the new architecture. Remove the entry, or upgrade the package.`
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
if (!_chunkYKHRCY4Tcjs.isPlainObject.call(void 0, entry)) {
|
|
110
|
+
issues.push(
|
|
111
|
+
`${where} must be an object, such as { permissions: ["android.permission.VIBRATE"] }.`
|
|
112
|
+
);
|
|
113
|
+
continue;
|
|
114
|
+
}
|
|
115
|
+
for (const key of Object.keys(entry)) {
|
|
116
|
+
if (!MODULE_KEYS.has(key)) {
|
|
117
|
+
issues.push(`unknown option ${where}.${key}. Supported: permissions, usage, web.`);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
const permissions = [];
|
|
121
|
+
if (entry.permissions !== void 0) {
|
|
122
|
+
if (!Array.isArray(entry.permissions)) {
|
|
123
|
+
issues.push(
|
|
124
|
+
`${where}.permissions must be an array of Android permissions, such as ["android.permission.VIBRATE"].`
|
|
125
|
+
);
|
|
126
|
+
} else {
|
|
127
|
+
entry.permissions.forEach((permission, index) => {
|
|
128
|
+
const at = `${where}.permissions[${index}]`;
|
|
129
|
+
if (typeof permission !== "string" || !PERMISSION.test(permission)) {
|
|
130
|
+
const hint = typeof permission === "string" && BARE_PERMISSION.test(permission) ? ` Use "android.permission.${permission}".` : "";
|
|
131
|
+
issues.push(
|
|
132
|
+
`${at} must be a full Android permission name such as "android.permission.VIBRATE", got ${JSON.stringify(permission)}.${hint}`
|
|
133
|
+
);
|
|
134
|
+
} else if (!permissions.includes(permission)) {
|
|
135
|
+
permissions.push(permission);
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
const usage = {};
|
|
141
|
+
if (entry.usage !== void 0) {
|
|
142
|
+
if (!_chunkYKHRCY4Tcjs.isPlainObject.call(void 0, entry.usage)) {
|
|
143
|
+
issues.push(
|
|
144
|
+
`${where}.usage must be an object of iOS usage strings, such as { NSCameraUsageDescription: "Scans receipts." }.`
|
|
145
|
+
);
|
|
146
|
+
} else {
|
|
147
|
+
for (const [key, value] of Object.entries(entry.usage)) {
|
|
148
|
+
const at = `${where}.usage.${key}`;
|
|
149
|
+
if (!USAGE_KEY.test(key)) {
|
|
150
|
+
issues.push(
|
|
151
|
+
`${at} is not an iOS usage-description key. Keys are NS...UsageDescription, such as NSCameraUsageDescription.`
|
|
152
|
+
);
|
|
153
|
+
} else if (typeof value !== "string" || !value.trim()) {
|
|
154
|
+
issues.push(
|
|
155
|
+
`${at} must be a non-empty string: the sentence iOS shows when it asks for access.`
|
|
156
|
+
);
|
|
157
|
+
} else {
|
|
158
|
+
const owner = usageOwners.get(key);
|
|
159
|
+
if (owner && owner.value !== value.trim()) {
|
|
160
|
+
issues.push(
|
|
161
|
+
`${at} and modules[${JSON.stringify(owner.name)}].usage.${key} set different strings, and Info.plist has one per key. Set it on one module.`
|
|
162
|
+
);
|
|
163
|
+
}
|
|
164
|
+
usageOwners.set(key, { name, value: value.trim() });
|
|
165
|
+
usage[key] = value.trim();
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
let web = false;
|
|
171
|
+
if (entry.web !== void 0) {
|
|
172
|
+
if (typeof entry.web !== "boolean") {
|
|
173
|
+
issues.push(`${where}.web must be true or false.`);
|
|
174
|
+
} else if (entry.web && !appModules.has(name)) {
|
|
175
|
+
issues.push(
|
|
176
|
+
`${where}.web is true, but web screens reach only the app's own modules in ${specDir}. "${name}" needs the React Native JS runtime, which web screens do not have. Remove web, and call the module from a native screen (page.native.tsx).`
|
|
177
|
+
);
|
|
178
|
+
} else {
|
|
179
|
+
web = entry.web;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
resolved[name] = { permissions, usage, web };
|
|
183
|
+
}
|
|
184
|
+
if (issues.length === 1) fail(issues[0]);
|
|
185
|
+
if (issues.length > 1) {
|
|
186
|
+
fail(
|
|
187
|
+
`modules has ${issues.length} problems:
|
|
188
|
+
${issues.map((issue) => ` - ${issue}`).join("\n")}`
|
|
189
|
+
);
|
|
190
|
+
}
|
|
191
|
+
return resolved;
|
|
192
|
+
}
|
|
193
|
+
function readFarmMobileWebModules(appModules, modules, options) {
|
|
194
|
+
const issues = [];
|
|
195
|
+
const specs = appModules.specs.map((spec) => {
|
|
196
|
+
if (!_optionalChain([modules, 'access', _ => _[spec.name], 'optionalAccess', _2 => _2.web])) return spec;
|
|
197
|
+
const shown = relative2(options.root, spec.file);
|
|
198
|
+
const where = `modules[${JSON.stringify(spec.name)}].web`;
|
|
199
|
+
let web;
|
|
200
|
+
try {
|
|
201
|
+
web = _chunk3YMLUNL2cjs.readFarmNativeWebSpec.call(void 0, { root: options.root, file: spec.file });
|
|
202
|
+
} catch (error) {
|
|
203
|
+
issues.push(`${where}: ${error.message}`);
|
|
204
|
+
return spec;
|
|
205
|
+
}
|
|
206
|
+
for (const { method, reason } of web.unsupported) {
|
|
207
|
+
issues.push(
|
|
208
|
+
`${where}: ${shown} declares ${method}(), but ${reason}. Change the parameter to a string, number, boolean, object, or array, or remove web and call the module from a native screen (page.native.tsx).`
|
|
209
|
+
);
|
|
210
|
+
}
|
|
211
|
+
if (web.methods.some((method) => method.name === "available")) {
|
|
212
|
+
issues.push(
|
|
213
|
+
`${where}: ${shown} declares available(), which web screens use to check for the module (native.<module>.available()). Rename the method.`
|
|
214
|
+
);
|
|
215
|
+
}
|
|
216
|
+
if (web.methods.length === 0 && web.unsupported.length === 0) {
|
|
217
|
+
issues.push(
|
|
218
|
+
`${where}: ${shown} declares no method that returns a Promise, and web screens call only those. Remove web, or declare one, such as model(): Promise<string>.`
|
|
219
|
+
);
|
|
220
|
+
}
|
|
221
|
+
return { ...spec, web };
|
|
222
|
+
});
|
|
223
|
+
if (issues.length === 1) throw new TypeError(issues[0]);
|
|
224
|
+
if (issues.length > 1) {
|
|
225
|
+
throw new TypeError(
|
|
226
|
+
`modules has ${issues.length} problems:
|
|
227
|
+
${issues.map((issue) => ` - ${issue}`).join("\n")}`
|
|
228
|
+
);
|
|
229
|
+
}
|
|
230
|
+
return { ...appModules, specs };
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
exports.scanFarmMobileAppModules = scanFarmMobileAppModules; exports.resolveFarmMobileModules = resolveFarmMobileModules; exports.readFarmMobileWebModules = readFarmMobileWebModules;
|
|
@@ -9,7 +9,7 @@ var _chunkKBGZ5FD6cjs = require('./chunk-KBGZ5FD6.cjs');
|
|
|
9
9
|
var _chunkP2355C6Ecjs = require('./chunk-P2355C6E.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkW2RZ73IUcjs = require('./chunk-W2RZ73IU.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
var _chunkNWUHS6GVcjs = require('./chunk-NWUHS6GV.cjs');
|
|
@@ -24,7 +24,7 @@ var _chunkSBDWCDS6cjs = require('./chunk-SBDWCDS6.cjs');
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
var
|
|
27
|
+
var _chunkCBKRS3M4cjs = require('./chunk-CBKRS3M4.cjs');
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
var _chunkE7QOEV5Zcjs = require('./chunk-E7QOEV5Z.cjs');
|
|
@@ -37,7 +37,7 @@ var _chunkJYNNIGQOcjs = require('./chunk-JYNNIGQO.cjs');
|
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
|
|
40
|
-
var
|
|
40
|
+
var _chunkQMNWKQL4cjs = require('./chunk-QMNWKQL4.cjs');
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
var _chunkYIHRZBD7cjs = require('./chunk-YIHRZBD7.cjs');
|
|
@@ -114,7 +114,7 @@ function farmApiPlugin(options = {}) {
|
|
|
114
114
|
const existing = apiRoutesCache.get(routePath);
|
|
115
115
|
const existingFile = _optionalChain([endpointSources, 'access', _ => _.get, 'call', _2 => _2(routePath), 'optionalAccess', _3 => _3.get, 'call', _4 => _4(normalizedMethod)]);
|
|
116
116
|
if (existingFile) {
|
|
117
|
-
throw new (0,
|
|
117
|
+
throw new (0, _chunkW2RZ73IUcjs.APIRouteConflictError)(routePath, normalizedMethod, existingFile, filePath);
|
|
118
118
|
}
|
|
119
119
|
if (existing) {
|
|
120
120
|
if (!existing.methods.includes(normalizedMethod)) {
|
|
@@ -190,7 +190,7 @@ function farmApiPlugin(options = {}) {
|
|
|
190
190
|
const createRouter = async () => {
|
|
191
191
|
const plugins = options.plugins ? await (_nullishCoalesce(routePlugins, () => ( (routePlugins = Promise.resolve(options.plugins({ root: projectRoot })))))) : [];
|
|
192
192
|
pluginMergedRoutes = plugins.length ? new Map(
|
|
193
|
-
|
|
193
|
+
_chunkCBKRS3M4cjs.mergePluginAPIRoutes.call(void 0, [...apiRoutesCache.values()], plugins, void 0, {
|
|
194
194
|
bodySizeLimit,
|
|
195
195
|
// A plugin calling an app endpoint (an MCP tool, say) goes back through this server,
|
|
196
196
|
// so the middleware that guards the endpoint's path runs for it.
|
|
@@ -210,7 +210,7 @@ function farmApiPlugin(options = {}) {
|
|
|
210
210
|
const url = new URL(request.url);
|
|
211
211
|
const method = request.method.toUpperCase();
|
|
212
212
|
const pathname = url.pathname;
|
|
213
|
-
const match =
|
|
213
|
+
const match = _chunkCBKRS3M4cjs.matchAPIRouteAtBasePath.call(void 0, servedRoutes(), pathname, basePath);
|
|
214
214
|
if (!match) {
|
|
215
215
|
return new Response(JSON.stringify({ error: "Not Found" }), {
|
|
216
216
|
status: 404,
|
|
@@ -218,18 +218,18 @@ function farmApiPlugin(options = {}) {
|
|
|
218
218
|
});
|
|
219
219
|
}
|
|
220
220
|
const { route, params } = match;
|
|
221
|
-
const endpoint =
|
|
221
|
+
const endpoint = _chunkCBKRS3M4cjs.resolveAPIRouteEndpoint.call(void 0, route, method);
|
|
222
222
|
if (!endpoint) {
|
|
223
223
|
return new Response(JSON.stringify({ error: "Method Not Allowed" }), {
|
|
224
224
|
status: 405,
|
|
225
225
|
headers: {
|
|
226
|
-
Allow:
|
|
226
|
+
Allow: _chunkCBKRS3M4cjs.getAllowedAPIRouteMethods.call(void 0, route).join(", "),
|
|
227
227
|
"Content-Type": "application/json"
|
|
228
228
|
}
|
|
229
229
|
});
|
|
230
230
|
}
|
|
231
231
|
try {
|
|
232
|
-
return await
|
|
232
|
+
return await _chunkCBKRS3M4cjs.invokeAPIRouteEndpoint.call(void 0, endpoint, request, params, bodySizeLimit);
|
|
233
233
|
} catch (error) {
|
|
234
234
|
return new Response(JSON.stringify({ error: error.message || "Internal Server Error" }), {
|
|
235
235
|
status: 500,
|
|
@@ -278,7 +278,7 @@ function farmApiPlugin(options = {}) {
|
|
|
278
278
|
const routeModule = await _chunkJYNNIGQOcjs.loadFarmDevModule.call(void 0, server, filePath);
|
|
279
279
|
const endpoints = {};
|
|
280
280
|
const availableMethods = [];
|
|
281
|
-
for (const method of
|
|
281
|
+
for (const method of _chunkCBKRS3M4cjs.API_ROUTE_METHODS) {
|
|
282
282
|
if (routeModule[method]) {
|
|
283
283
|
availableMethods.push(method);
|
|
284
284
|
endpoints[method] = routeModule[method];
|
|
@@ -291,7 +291,7 @@ function farmApiPlugin(options = {}) {
|
|
|
291
291
|
log(`API route discovered: ${availableMethods.join(", ")} ${routePath}`);
|
|
292
292
|
}
|
|
293
293
|
} catch (e) {
|
|
294
|
-
if (e instanceof
|
|
294
|
+
if (e instanceof _chunkW2RZ73IUcjs.APIRouteConflictError || e instanceof _chunkYTVSWXEZcjs.AmbiguousRouteError) throw e;
|
|
295
295
|
log(`API route load failed at ${filePath}: ${e.message}`);
|
|
296
296
|
}
|
|
297
297
|
}
|
|
@@ -318,7 +318,7 @@ function farmApiPlugin(options = {}) {
|
|
|
318
318
|
}
|
|
319
319
|
}
|
|
320
320
|
} catch (e) {
|
|
321
|
-
if (e instanceof
|
|
321
|
+
if (e instanceof _chunkW2RZ73IUcjs.APIRouteConflictError || e instanceof _chunkYTVSWXEZcjs.AmbiguousRouteError) throw e;
|
|
322
322
|
log(`Root routes.ts load failed: ${e.message}`);
|
|
323
323
|
}
|
|
324
324
|
break;
|
|
@@ -335,7 +335,7 @@ function farmApiPlugin(options = {}) {
|
|
|
335
335
|
try {
|
|
336
336
|
const routesModule = await _chunkJYNNIGQOcjs.loadFarmDevModule.call(void 0,
|
|
337
337
|
server,
|
|
338
|
-
|
|
338
|
+
_chunkQMNWKQL4cjs.toViteModuleId.call(void 0, routeFile, server.config.root)
|
|
339
339
|
);
|
|
340
340
|
const manifest = getProgrammaticRouteManifest(routesModule);
|
|
341
341
|
if (!manifest) continue;
|
|
@@ -349,7 +349,7 @@ function farmApiPlugin(options = {}) {
|
|
|
349
349
|
}
|
|
350
350
|
}
|
|
351
351
|
} catch (e) {
|
|
352
|
-
if (e instanceof
|
|
352
|
+
if (e instanceof _chunkW2RZ73IUcjs.APIRouteConflictError || e instanceof _chunkYTVSWXEZcjs.AmbiguousRouteError) throw e;
|
|
353
353
|
log(`Programmatic routes file load failed at ${routeFile}: ${e.message}`);
|
|
354
354
|
}
|
|
355
355
|
}
|
|
@@ -403,15 +403,15 @@ function farmApiPlugin(options = {}) {
|
|
|
403
403
|
if (discoveryPromise) await waitForDiscovery();
|
|
404
404
|
const farmMiddleware = server.__farmMiddleware__;
|
|
405
405
|
let middlewareRan = false;
|
|
406
|
-
if (!
|
|
407
|
-
if (!farmMiddleware || !apiRouterHandler || !
|
|
406
|
+
if (!_chunkCBKRS3M4cjs.matchAPIRouteAtBasePath.call(void 0, servedRoutes(), pathname, basePath)) {
|
|
407
|
+
if (!farmMiddleware || !apiRouterHandler || !_chunkCBKRS3M4cjs.isFarmAPIPathname.call(void 0, pathname, basePath)) {
|
|
408
408
|
return next();
|
|
409
409
|
}
|
|
410
410
|
await _optionalChain([farmMiddleware, 'access', _5 => _5.waitForDiscovery, 'optionalCall', _6 => _6()]);
|
|
411
411
|
if (await farmMiddleware.execute(req, res, pathname, /* @__PURE__ */ new Map())) return;
|
|
412
412
|
middlewareRan = true;
|
|
413
413
|
const rewrittenPathname = (req.url || url).split("?")[0];
|
|
414
|
-
if (rewrittenPathname === pathname || !
|
|
414
|
+
if (rewrittenPathname === pathname || !_chunkCBKRS3M4cjs.matchAPIRouteAtBasePath.call(void 0, servedRoutes(), rewrittenPathname, basePath)) {
|
|
415
415
|
return next();
|
|
416
416
|
}
|
|
417
417
|
}
|
|
@@ -432,7 +432,7 @@ function farmApiPlugin(options = {}) {
|
|
|
432
432
|
}
|
|
433
433
|
const currentUrl = req.url || url;
|
|
434
434
|
const currentPathname = currentUrl.split("?")[0];
|
|
435
|
-
if (currentPathname !== pathname && !
|
|
435
|
+
if (currentPathname !== pathname && !_chunkCBKRS3M4cjs.matchAPIRouteAtBasePath.call(void 0, servedRoutes(), currentPathname, basePath)) {
|
|
436
436
|
return next();
|
|
437
437
|
}
|
|
438
438
|
const fullUrl = _chunkHNAISJFDcjs.resolveFarmRequestURL.call(void 0, req);
|
|
@@ -498,7 +498,7 @@ function farmApiPlugin(options = {}) {
|
|
|
498
498
|
};
|
|
499
499
|
},
|
|
500
500
|
async handleHotUpdate({ file, server, modules }) {
|
|
501
|
-
const normalizedFile =
|
|
501
|
+
const normalizedFile = _chunkQMNWKQL4cjs.toPosixPath.call(void 0, file);
|
|
502
502
|
const fileName = normalizedFile.split("/").pop() || "";
|
|
503
503
|
if (fileName === "routes.ts" || fileName === "routes.tsx" || fileName === "routes.js" || _chunkE7QOEV5Zcjs.isProgrammaticRoutesFileName.call(void 0, fileName)) {
|
|
504
504
|
log(`Root routes file updated: ${fileName}`);
|
|
@@ -536,7 +536,7 @@ function farmApiPlugin(options = {}) {
|
|
|
536
536
|
log(`API router recreated`);
|
|
537
537
|
} catch (e) {
|
|
538
538
|
restoreRouteState(previousState);
|
|
539
|
-
if (e instanceof
|
|
539
|
+
if (e instanceof _chunkW2RZ73IUcjs.APIRouteConflictError || e instanceof _chunkYTVSWXEZcjs.AmbiguousRouteError) throw e;
|
|
540
540
|
log(`Root routes.ts HMR failed: ${e.message}`);
|
|
541
541
|
}
|
|
542
542
|
return [];
|
|
@@ -564,7 +564,7 @@ function farmApiPlugin(options = {}) {
|
|
|
564
564
|
const routeModule = await _chunkJYNNIGQOcjs.loadFarmDevModule.call(void 0, server, file);
|
|
565
565
|
removeEndpointsFromFile(file);
|
|
566
566
|
const availableMethods = [];
|
|
567
|
-
for (const method of
|
|
567
|
+
for (const method of _chunkCBKRS3M4cjs.API_ROUTE_METHODS) {
|
|
568
568
|
if (!routeModule[method]) continue;
|
|
569
569
|
availableMethods.push(method);
|
|
570
570
|
addEndpoint(routePath, file, method, routeModule[method]);
|
|
@@ -574,7 +574,7 @@ function farmApiPlugin(options = {}) {
|
|
|
574
574
|
log(`API router recreated`);
|
|
575
575
|
} catch (e) {
|
|
576
576
|
restoreRouteState(previousState);
|
|
577
|
-
if (e instanceof
|
|
577
|
+
if (e instanceof _chunkW2RZ73IUcjs.APIRouteConflictError || e instanceof _chunkYTVSWXEZcjs.AmbiguousRouteError) throw e;
|
|
578
578
|
log(`API route HMR failed: ${e.message}`);
|
|
579
579
|
}
|
|
580
580
|
return [];
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createRouteTypeDeclarations,
|
|
3
3
|
generateRouteTypes
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-D7LTCK3U.mjs";
|
|
5
5
|
import {
|
|
6
6
|
readSchemaTables
|
|
7
7
|
} from "./chunk-2DLGV2ZG.mjs";
|
|
8
|
-
import {
|
|
9
|
-
resolveSchemaModels
|
|
10
|
-
} from "./chunk-F3N52U7S.mjs";
|
|
11
8
|
import {
|
|
12
9
|
APITypeGenerator
|
|
13
10
|
} from "./chunk-HPP2II4Z.mjs";
|
|
11
|
+
import {
|
|
12
|
+
resolveSchemaModels
|
|
13
|
+
} from "./chunk-F3N52U7S.mjs";
|
|
14
14
|
import {
|
|
15
15
|
getOptionalCatchAllParameterNames,
|
|
16
16
|
materializeSSGRoutePath,
|
|
@@ -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 && existsSync2(join3(root, srcDir, "native"))) {
|
|
931
|
+
const [{ scanFarmMobileAppModules }, { createFarmNativeModuleTypeDeclarations }] = await Promise.all([import("./modules-VHD7BELU.mjs"), import("./native-specs-BD7HOTMJ.mjs")]);
|
|
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(
|