@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
|
@@ -1,10 +1,24 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } async function _asyncNullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return await rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
var _chunkKPOMS5ROcjs = require('./chunk-KPOMS5RO.cjs');
|
|
6
|
+
require('./chunk-3YMLUNL2.cjs');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
var _chunk4JTQPOKOcjs = require('./chunk-4JTQPOKO.cjs');
|
|
14
|
+
|
|
15
|
+
|
|
3
16
|
var _chunkEFZGB7JCcjs = require('./chunk-EFZGB7JC.cjs');
|
|
17
|
+
require('./chunk-RAWWCDCT.cjs');
|
|
4
18
|
|
|
5
19
|
|
|
6
20
|
|
|
7
|
-
var
|
|
21
|
+
var _chunkNQJDO7K7cjs = require('./chunk-NQJDO7K7.cjs');
|
|
8
22
|
require('./chunk-OZC2JPW6.cjs');
|
|
9
23
|
|
|
10
24
|
|
|
@@ -16,7 +30,7 @@ require('./chunk-OZC2JPW6.cjs');
|
|
|
16
30
|
var _chunkYKHRCY4Tcjs = require('./chunk-YKHRCY4T.cjs');
|
|
17
31
|
|
|
18
32
|
|
|
19
|
-
var
|
|
33
|
+
var _chunkU4BJKNIRcjs = require('./chunk-U4BJKNIR.cjs');
|
|
20
34
|
require('./chunk-5YPBFMBN.cjs');
|
|
21
35
|
|
|
22
36
|
|
|
@@ -27,53 +41,56 @@ require('./chunk-STF6VDYQ.cjs');
|
|
|
27
41
|
|
|
28
42
|
|
|
29
43
|
var _chunkRD623KW4cjs = require('./chunk-RD623KW4.cjs');
|
|
30
|
-
require('./chunk-
|
|
31
|
-
require('./chunk-SG57PX7K.cjs');
|
|
32
|
-
require('./chunk-H33PJEXN.cjs');
|
|
44
|
+
require('./chunk-DZPR2W6U.cjs');
|
|
33
45
|
require('./chunk-6JHZPB52.cjs');
|
|
34
|
-
require('./chunk-
|
|
35
|
-
require('./chunk-
|
|
46
|
+
require('./chunk-SG57PX7K.cjs');
|
|
47
|
+
require('./chunk-MEQN6DDA.cjs');
|
|
36
48
|
|
|
37
49
|
|
|
38
50
|
var _chunk5Y2P454Ocjs = require('./chunk-5Y2P454O.cjs');
|
|
51
|
+
require('./chunk-HEPJIKKQ.cjs');
|
|
52
|
+
require('./chunk-3EIPOTZV.cjs');
|
|
39
53
|
require('./chunk-2HW5LWAH.cjs');
|
|
54
|
+
require('./chunk-LT4VAF5Z.cjs');
|
|
40
55
|
require('./chunk-DQJ2CIH7.cjs');
|
|
41
|
-
require('./chunk-
|
|
42
|
-
require('./chunk-
|
|
56
|
+
require('./chunk-QRX4JRBO.cjs');
|
|
57
|
+
require('./chunk-YI6FKTTN.cjs');
|
|
43
58
|
require('./chunk-2KMIJDY6.cjs');
|
|
44
59
|
require('./chunk-FK25QSVC.cjs');
|
|
45
|
-
require('./chunk-WT6RAN2I.cjs');
|
|
46
|
-
require('./chunk-D7UQC4O6.cjs');
|
|
47
60
|
require('./chunk-SHIWRBFI.cjs');
|
|
48
|
-
require('./chunk-
|
|
61
|
+
require('./chunk-WT6RAN2I.cjs');
|
|
62
|
+
require('./chunk-ZP32GNJQ.cjs');
|
|
49
63
|
require('./chunk-DUIP64BF.cjs');
|
|
50
|
-
require('./chunk-
|
|
64
|
+
require('./chunk-ZOYKJBP5.cjs');
|
|
51
65
|
require('./chunk-ZXK2EYQW.cjs');
|
|
52
|
-
require('./chunk-
|
|
66
|
+
require('./chunk-ZDAEHG2O.cjs');
|
|
67
|
+
require('./chunk-UPYIFH2H.cjs');
|
|
53
68
|
require('./chunk-5DX3O6TT.cjs');
|
|
54
69
|
require('./chunk-NWUHS6GV.cjs');
|
|
55
|
-
require('./chunk-
|
|
70
|
+
require('./chunk-LRB5OVRT.cjs');
|
|
56
71
|
require('./chunk-E7QOEV5Z.cjs');
|
|
57
72
|
require('./chunk-OYZXVBZP.cjs');
|
|
58
73
|
require('./chunk-ITV4QQL2.cjs');
|
|
59
74
|
require('./chunk-FEFCISOX.cjs');
|
|
60
75
|
require('./chunk-LNVGXUL3.cjs');
|
|
61
|
-
require('./chunk-
|
|
76
|
+
require('./chunk-QMNWKQL4.cjs');
|
|
62
77
|
require('./chunk-SUCDVKUB.cjs');
|
|
63
78
|
require('./chunk-EVIWKPJV.cjs');
|
|
64
79
|
require('./chunk-YIHRZBD7.cjs');
|
|
80
|
+
require('./chunk-2OF5RPVU.cjs');
|
|
65
81
|
require('./chunk-LIFUPCXW.cjs');
|
|
66
82
|
require('./chunk-JYT7AN37.cjs');
|
|
67
|
-
require('./chunk-B5BBTPJQ.cjs');
|
|
68
83
|
require('./chunk-HA7YRO53.cjs');
|
|
69
84
|
require('./chunk-CA7DNRHO.cjs');
|
|
70
|
-
require('./chunk-
|
|
85
|
+
require('./chunk-PMJSG4JS.cjs');
|
|
86
|
+
require('./chunk-R5U7OIPI.cjs');
|
|
71
87
|
require('./chunk-6FXBJPF5.cjs');
|
|
72
88
|
require('./chunk-E552H232.cjs');
|
|
73
89
|
require('./chunk-UZCMMJJT.cjs');
|
|
74
90
|
require('./chunk-6XQSPIN6.cjs');
|
|
75
|
-
require('./chunk-7JUIK547.cjs');
|
|
76
91
|
require('./chunk-A25FXJ7D.cjs');
|
|
92
|
+
require('./chunk-7JUIK547.cjs');
|
|
93
|
+
require('./chunk-HNAISJFD.cjs');
|
|
77
94
|
require('./chunk-6CTFVBAT.cjs');
|
|
78
95
|
require('./chunk-3BIASUGR.cjs');
|
|
79
96
|
require('./chunk-OWQV6MLM.cjs');
|
|
@@ -91,7 +108,16 @@ var _promises = require('fs/promises');
|
|
|
91
108
|
var _path = require('path'); var path2 = _interopRequireWildcard(_path); var path = _interopRequireWildcard(_path);
|
|
92
109
|
|
|
93
110
|
// src/mobile/config.ts
|
|
94
|
-
var MOBILE_KEYS = /* @__PURE__ */ new Set([
|
|
111
|
+
var MOBILE_KEYS = /* @__PURE__ */ new Set([
|
|
112
|
+
"name",
|
|
113
|
+
"id",
|
|
114
|
+
"server",
|
|
115
|
+
"tabs",
|
|
116
|
+
"routes",
|
|
117
|
+
"native",
|
|
118
|
+
"shells",
|
|
119
|
+
"modules"
|
|
120
|
+
]);
|
|
95
121
|
var ROUTE_KEYS = /* @__PURE__ */ new Set(["presentation"]);
|
|
96
122
|
var TAB_KEYS = /* @__PURE__ */ new Set(["path", "title", "icon"]);
|
|
97
123
|
var NATIVE_KEYS = /* @__PURE__ */ new Set(["engine", "auto", "routes", "islands", "prefetch", "budgets"]);
|
|
@@ -320,6 +346,14 @@ function validateFarmMobileConfig(input, context) {
|
|
|
320
346
|
}
|
|
321
347
|
}
|
|
322
348
|
if (input.native !== void 0) validateNativeConfig(input.native, check);
|
|
349
|
+
if (input.shells !== void 0 && typeof input.shells !== "boolean") {
|
|
350
|
+
fail("shells must be true or false.");
|
|
351
|
+
}
|
|
352
|
+
if (input.modules !== void 0 && !_chunkYKHRCY4Tcjs.isPlainObject.call(void 0, input.modules)) {
|
|
353
|
+
fail(
|
|
354
|
+
'modules must be an object keyed by module name, such as { Device: { permissions: ["android.permission.VIBRATE"] } }.'
|
|
355
|
+
);
|
|
356
|
+
}
|
|
323
357
|
if (_chunkYKHRCY4Tcjs.isPlainObject.call(void 0, input.routes) && _chunkYKHRCY4Tcjs.isPlainObject.call(void 0, input.native)) {
|
|
324
358
|
const nativeRoutes = _chunkYKHRCY4Tcjs.isPlainObject.call(void 0, input.native.routes) ? input.native.routes : {};
|
|
325
359
|
const presented = new Map(
|
|
@@ -427,7 +461,9 @@ function resolveFarmMobileConfig(input, options, context) {
|
|
|
427
461
|
islands: [...new Set(_nullishCoalesce(native.islands, () => ( [])))].sort(),
|
|
428
462
|
prefetch: _nullishCoalesce(native.prefetch, () => ( "intent")),
|
|
429
463
|
budgets: { ...native.budgets }
|
|
430
|
-
}
|
|
464
|
+
},
|
|
465
|
+
shells: config.shells === true,
|
|
466
|
+
modules: _chunkKPOMS5ROcjs.resolveFarmMobileModules.call(void 0, config.modules, options, fail)
|
|
431
467
|
};
|
|
432
468
|
}
|
|
433
469
|
function createFarmMobileContext(options) {
|
|
@@ -679,9 +715,21 @@ ${analysis.nativeBlockers.map((blocker) => ` - ${blocker}`).join("\n")}
|
|
|
679
715
|
screens[route] = { screen: "server", source: "config", module, ...base };
|
|
680
716
|
continue;
|
|
681
717
|
}
|
|
682
|
-
const
|
|
718
|
+
const portFile = _optionalChain([options, 'access', _39 => _39.portFiles, 'optionalAccess', _40 => _40.get, 'call', _41 => _41(route)]);
|
|
719
|
+
if (nativeTier === "native" && portFile) {
|
|
720
|
+
screens[route] = {
|
|
721
|
+
screen: "native",
|
|
722
|
+
source: "config",
|
|
723
|
+
file: relativeFile(root, portFile),
|
|
724
|
+
module,
|
|
725
|
+
...base
|
|
726
|
+
};
|
|
727
|
+
continue;
|
|
728
|
+
}
|
|
729
|
+
const blockers = _optionalChain([options, 'access', _42 => _42.analyzerBlockers, 'optionalAccess', _43 => _43.get, 'call', _44 => _44(route)]);
|
|
730
|
+
const problems = _optionalChain([options, 'access', _45 => _45.portProblems, 'optionalAccess', _46 => _46.get, 'call', _47 => _47(route)]);
|
|
683
731
|
warnings.push(
|
|
684
|
-
`${where}.${tierKey} is "native", but "${route}" has no ${nativeTier === "native" ? "page.native.tsx" : platformFileName} and Farm cannot port
|
|
732
|
+
`${where}.${tierKey} is "native", but "${route}" has no ${nativeTier === "native" ? "page.native.tsx" : platformFileName} and Farm cannot port it yet, so it stays web` + (_optionalChain([blockers, 'optionalAccess', _48 => _48.length]) ? `. The analyzer would keep it web: ${blockers.join("; ")}` : "") + (_optionalChain([problems, 'optionalAccess', _49 => _49.length]) ? `. The port would need: ${problems.join("; ")}` : "") + ". This fails the build once native screens ship."
|
|
685
733
|
);
|
|
686
734
|
screens[route] = { screen: "web", source: "config", requested: nativeTier, ...base };
|
|
687
735
|
continue;
|
|
@@ -697,11 +745,28 @@ ${analysis.nativeBlockers.map((blocker) => ` - ${blocker}`).join("\n")}
|
|
|
697
745
|
};
|
|
698
746
|
continue;
|
|
699
747
|
}
|
|
700
|
-
if (native.auto === "on" && _optionalChain([options, 'access',
|
|
748
|
+
if (native.auto === "on" && _optionalChain([options, 'access', _50 => _50.analyzerTiers, 'optionalAccess', _51 => _51.get, 'call', _52 => _52(route), 'optionalAccess', _53 => _53.tier]) === "native") {
|
|
701
749
|
screens[route] = { screen: "server", source: "analyzer", module, ...base };
|
|
702
750
|
continue;
|
|
703
751
|
}
|
|
704
|
-
if (native.auto === "on" && _optionalChain([options, 'access',
|
|
752
|
+
if (native.auto === "on" && _optionalChain([options, 'access', _54 => _54.analyzerPorts, 'optionalAccess', _55 => _55.has, 'call', _56 => _56(route)])) {
|
|
753
|
+
const portFile = _optionalChain([options, 'access', _57 => _57.portFiles, 'optionalAccess', _58 => _58.get, 'call', _59 => _59(route)]);
|
|
754
|
+
if (nativeTier === "native" && portFile) {
|
|
755
|
+
screens[route] = {
|
|
756
|
+
screen: "native",
|
|
757
|
+
source: "analyzer",
|
|
758
|
+
file: relativeFile(root, portFile),
|
|
759
|
+
module,
|
|
760
|
+
...base
|
|
761
|
+
};
|
|
762
|
+
continue;
|
|
763
|
+
}
|
|
764
|
+
const problems = _optionalChain([options, 'access', _60 => _60.portProblems, 'optionalAccess', _61 => _61.get, 'call', _62 => _62(route)]);
|
|
765
|
+
if (_optionalChain([problems, 'optionalAccess', _63 => _63.length])) {
|
|
766
|
+
warnings.push(
|
|
767
|
+
`${prefix}: "${route}" is portable, but Farm cannot port it yet, so it stays web: ${problems.join("; ")}.`
|
|
768
|
+
);
|
|
769
|
+
}
|
|
705
770
|
screens[route] = { screen: "web", source: "analyzer", requested: nativeTier, ...base };
|
|
706
771
|
continue;
|
|
707
772
|
}
|
|
@@ -761,7 +826,7 @@ function readFarmMobilePageExport(source, file, parse, context) {
|
|
|
761
826
|
const value = literalValue(declarator.init, fail);
|
|
762
827
|
return validateFarmMobilePageConfig(value, file, context);
|
|
763
828
|
}
|
|
764
|
-
} else if (_optionalChain([declaration, 'access',
|
|
829
|
+
} else if (_optionalChain([declaration, 'access', _64 => _64.id, 'optionalAccess', _65 => _65.name]) === "mobile") {
|
|
765
830
|
fail('must be an object, such as export const mobile = { presentation: "modal" }');
|
|
766
831
|
}
|
|
767
832
|
}
|
|
@@ -846,7 +911,109 @@ function createFarmMobileRouteManifest(mobile, options) {
|
|
|
846
911
|
path: basePath ? tab.path === "/" ? basePath : `${basePath}${tab.path}` : tab.path
|
|
847
912
|
})),
|
|
848
913
|
prefetch: mobile.native.prefetch,
|
|
849
|
-
rules
|
|
914
|
+
rules,
|
|
915
|
+
...options.shells && Object.keys(options.shells.routes).length > 0 ? { shells: { client: options.shells.client, routes: { ...options.shells.routes } } } : {}
|
|
916
|
+
};
|
|
917
|
+
}
|
|
918
|
+
|
|
919
|
+
// src/mobile/page-shells.ts
|
|
920
|
+
var _crypto = require('crypto');
|
|
921
|
+
var SCRIPT = /<script\b[^>]*>[\s\S]*?<\/script\s*>/gi;
|
|
922
|
+
var LINK = /<link\b[^>]*>/gi;
|
|
923
|
+
var REMOVED = "\0";
|
|
924
|
+
var REMOVED_ALL = /\u0000/g;
|
|
925
|
+
var REMOVED_LINE = /\n[ \t\u0000]*\u0000[ \t\u0000]*(?=\n|$)/g;
|
|
926
|
+
var HEAD = /<head\b[^>]*>[\s\S]*?<\/head\s*>/i;
|
|
927
|
+
var BLANK_LINE = /\n[ \t]*(?=\n)/g;
|
|
928
|
+
function attribute(tag, name) {
|
|
929
|
+
const match = tag.match(
|
|
930
|
+
new RegExp(`\\s${name}\\s*=\\s*(?:"([^"]*)"|'([^']*)'|([^\\s"'>]+))`, "i")
|
|
931
|
+
);
|
|
932
|
+
if (!match) return void 0;
|
|
933
|
+
return (_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(match[1], () => ( match[2])), () => ( match[3])), () => ( ""))).replace(/&/g, "&");
|
|
934
|
+
}
|
|
935
|
+
function relList(tag) {
|
|
936
|
+
return (_nullishCoalesce(attribute(tag, "rel"), () => ( ""))).toLowerCase().split(/\s+/).filter(Boolean);
|
|
937
|
+
}
|
|
938
|
+
function inlineStyle(css, media) {
|
|
939
|
+
const safeMedia = media && /^[\w\s(),:.-]+$/.test(media) ? ` media="${media}"` : "";
|
|
940
|
+
return `<style${safeMedia}>${css.replace(/<\/(style)/gi, "<\\/$1")}</style>`;
|
|
941
|
+
}
|
|
942
|
+
function createFarmMobilePageShell(html, options) {
|
|
943
|
+
let shell = html.replace(REMOVED_ALL, "").replace(SCRIPT, REMOVED);
|
|
944
|
+
shell = shell.replace(LINK, (tag) => {
|
|
945
|
+
const rel = relList(tag);
|
|
946
|
+
if (rel.includes("modulepreload") || rel.includes("preload") && (_nullishCoalesce(attribute(tag, "as"), () => ( ""))).toLowerCase() === "script" || !rel.includes("stylesheet") && (rel.includes("canonical") || rel.includes("alternate"))) {
|
|
947
|
+
return REMOVED;
|
|
948
|
+
}
|
|
949
|
+
if (options.os !== "ios" || !rel.includes("stylesheet")) return tag;
|
|
950
|
+
const href = attribute(tag, "href");
|
|
951
|
+
const css = href === void 0 ? void 0 : _optionalChain([options, 'access', _66 => _66.readStylesheet, 'optionalCall', _67 => _67(href)]);
|
|
952
|
+
return css === void 0 ? tag : inlineStyle(css, attribute(tag, "media"));
|
|
953
|
+
});
|
|
954
|
+
shell = shell.replace(REMOVED_LINE, "").replace(REMOVED_ALL, "");
|
|
955
|
+
shell = shell.replace(HEAD, (head) => head.replace(BLANK_LINE, ""));
|
|
956
|
+
return shell.replace(
|
|
957
|
+
/<html\b([^>]*)>/i,
|
|
958
|
+
(tag, attributes) => /\sdata-farm-page-shell\b/i.test(attributes) ? tag : `<html${attributes} data-farm-page-shell>`
|
|
959
|
+
);
|
|
960
|
+
}
|
|
961
|
+
function getFarmMobilePageShellFile(shell) {
|
|
962
|
+
return `${_crypto.createHash.call(void 0, "sha256").update(shell).digest("hex").slice(0, 16)}.html`;
|
|
963
|
+
}
|
|
964
|
+
async function renderFarmMobilePageShells(options) {
|
|
965
|
+
const routes = {};
|
|
966
|
+
const files = {};
|
|
967
|
+
const skipped = [];
|
|
968
|
+
const queue = [...new Set(options.routes)].sort();
|
|
969
|
+
const render = async (route) => {
|
|
970
|
+
const response = await options.fetch(
|
|
971
|
+
`${options.basePath}${_chunk4JTQPOKOcjs.createFarmMobileShellRenderPath.call(void 0, route)}`,
|
|
972
|
+
{
|
|
973
|
+
headers: {
|
|
974
|
+
Accept: "text/html",
|
|
975
|
+
[_chunk4JTQPOKOcjs.FARM_SHELL_HEADER]: options.os,
|
|
976
|
+
[_chunk4JTQPOKOcjs.FARM_SHELL_RENDER_HEADER]: options.token,
|
|
977
|
+
[_chunk4JTQPOKOcjs.FARM_SHELL_ROUTE_HEADER]: route
|
|
978
|
+
}
|
|
979
|
+
}
|
|
980
|
+
);
|
|
981
|
+
const body = await response.text();
|
|
982
|
+
if (response.headers.get(_chunk4JTQPOKOcjs.FARM_SHELL_RENDER_HEADER) === "none") {
|
|
983
|
+
skipped.push({ route, reason: body.trim() || "the server rendered no shell" });
|
|
984
|
+
return;
|
|
985
|
+
}
|
|
986
|
+
const type = _nullishCoalesce(_optionalChain([response, 'access', _68 => _68.headers, 'access', _69 => _69.get, 'call', _70 => _70("content-type"), 'optionalAccess', _71 => _71.toLowerCase, 'call', _72 => _72()]), () => ( ""));
|
|
987
|
+
if (response.status !== 200 || !type.includes("text/html")) {
|
|
988
|
+
const location = response.headers.get("location");
|
|
989
|
+
skipped.push({
|
|
990
|
+
route,
|
|
991
|
+
reason: `the server answered ${response.status}${location ? ` (to ${location})` : ""}`
|
|
992
|
+
});
|
|
993
|
+
return;
|
|
994
|
+
}
|
|
995
|
+
const shell = createFarmMobilePageShell(body, options);
|
|
996
|
+
const file = getFarmMobilePageShellFile(shell);
|
|
997
|
+
files[file] = shell;
|
|
998
|
+
routes[route] = file;
|
|
999
|
+
};
|
|
1000
|
+
const workers = Array.from(
|
|
1001
|
+
{ length: Math.max(1, Math.min(_nullishCoalesce(options.concurrency, () => ( 4)), queue.length)) },
|
|
1002
|
+
async () => {
|
|
1003
|
+
for (let route = queue.shift(); route !== void 0; route = queue.shift()) {
|
|
1004
|
+
await render(route);
|
|
1005
|
+
}
|
|
1006
|
+
}
|
|
1007
|
+
);
|
|
1008
|
+
await Promise.all(workers);
|
|
1009
|
+
skipped.sort((left, right) => left.route < right.route ? -1 : left.route > right.route ? 1 : 0);
|
|
1010
|
+
return {
|
|
1011
|
+
shells: {
|
|
1012
|
+
client: options.client,
|
|
1013
|
+
routes: Object.fromEntries(Object.entries(routes).sort(([a], [b]) => a < b ? -1 : 1)),
|
|
1014
|
+
files: Object.fromEntries(Object.entries(files).sort(([a], [b]) => a < b ? -1 : 1))
|
|
1015
|
+
},
|
|
1016
|
+
skipped
|
|
850
1017
|
};
|
|
851
1018
|
}
|
|
852
1019
|
|
|
@@ -867,6 +1034,7 @@ function getFarmMobileOutputDirs(distDir) {
|
|
|
867
1034
|
ios: path2.join(root, "ios"),
|
|
868
1035
|
dist: path2.join(root, "dist"),
|
|
869
1036
|
report: path2.join(root, "native-report.json"),
|
|
1037
|
+
ports: path2.join(root, "ports"),
|
|
870
1038
|
analyzerCache: path2.join(distDir, "cache", "mobile", "analyzer.json"),
|
|
871
1039
|
client: path2.join(distDir, "client")
|
|
872
1040
|
};
|
|
@@ -901,11 +1069,11 @@ async function readPageExports(root, pageFiles, os) {
|
|
|
901
1069
|
return exports;
|
|
902
1070
|
}
|
|
903
1071
|
async function resolveFarmMobileApp(options = {}) {
|
|
904
|
-
const root = path2.resolve(_nullishCoalesce(_nullishCoalesce(_optionalChain([options, 'access',
|
|
1072
|
+
const root = path2.resolve(_nullishCoalesce(_nullishCoalesce(_optionalChain([options, 'access', _73 => _73.config, 'optionalAccess', _74 => _74.root]), () => ( options.root)), () => ( process.cwd())));
|
|
905
1073
|
const command = _nullishCoalesce(options.command, () => ( "build"));
|
|
906
1074
|
const mode = command === "dev" ? "development" : "production";
|
|
907
|
-
const userConfig = options.userConfig === void 0 ? await
|
|
908
|
-
if (_optionalChain([userConfig, 'optionalAccess',
|
|
1075
|
+
const userConfig = options.userConfig === void 0 ? await _chunkNQJDO7K7cjs.loadConfig.call(void 0, root, void 0, mode) : options.userConfig;
|
|
1076
|
+
if (_optionalChain([userConfig, 'optionalAccess', _75 => _75.mobile]) === void 0) {
|
|
909
1077
|
throw new FarmMobileError(
|
|
910
1078
|
'farm.config.ts has no `mobile` entry. Add one, such as `mobile: { id: "com.example.notes", server: "https://notes.example.com" }`.'
|
|
911
1079
|
);
|
|
@@ -918,8 +1086,8 @@ async function resolveFarmMobileApp(options = {}) {
|
|
|
918
1086
|
mode
|
|
919
1087
|
});
|
|
920
1088
|
const block = await resolveFarmMobileBlock(userConfig.mobile, context, options.cache);
|
|
921
|
-
const config = await _asyncNullishCoalesce(options.config, async () => ( await
|
|
922
|
-
const scan = await
|
|
1089
|
+
const config = await _asyncNullishCoalesce(options.config, async () => ( await _chunkNQJDO7K7cjs.resolveConfig.call(void 0, { ...userConfig, root }, mode)));
|
|
1090
|
+
const scan = await _chunkU4BJKNIRcjs.scanRoutePatterns.call(void 0, {
|
|
923
1091
|
root,
|
|
924
1092
|
srcDir: config.srcDir,
|
|
925
1093
|
sourceRoots: _chunk5Y2P454Ocjs.getFarmSourceRoots.call(void 0, config),
|
|
@@ -927,7 +1095,35 @@ async function resolveFarmMobileApp(options = {}) {
|
|
|
927
1095
|
platformFiles: true
|
|
928
1096
|
});
|
|
929
1097
|
const routes = [...scan.pages].sort();
|
|
930
|
-
|
|
1098
|
+
let appModules;
|
|
1099
|
+
try {
|
|
1100
|
+
appModules = _chunkKPOMS5ROcjs.scanFarmMobileAppModules.call(void 0, { root, srcDir: config.srcDir });
|
|
1101
|
+
} catch (error) {
|
|
1102
|
+
throw Object.assign(
|
|
1103
|
+
new FarmMobileError(`mobile (os: ${context.os}): ${error.message}`),
|
|
1104
|
+
{ cause: error }
|
|
1105
|
+
);
|
|
1106
|
+
}
|
|
1107
|
+
const mobile = resolveFarmMobileConfig(
|
|
1108
|
+
block,
|
|
1109
|
+
{
|
|
1110
|
+
root,
|
|
1111
|
+
srcDir: config.srcDir,
|
|
1112
|
+
routes,
|
|
1113
|
+
appModules: _optionalChain([appModules, 'optionalAccess', _76 => _76.specs, 'access', _77 => _77.map, 'call', _78 => _78((spec) => spec.name)])
|
|
1114
|
+
},
|
|
1115
|
+
context
|
|
1116
|
+
);
|
|
1117
|
+
if (appModules && Object.values(mobile.modules).some((module) => module.web)) {
|
|
1118
|
+
try {
|
|
1119
|
+
appModules = _chunkKPOMS5ROcjs.readFarmMobileWebModules.call(void 0, appModules, mobile.modules, { root });
|
|
1120
|
+
} catch (error) {
|
|
1121
|
+
throw Object.assign(
|
|
1122
|
+
new FarmMobileError(`mobile (os: ${context.os}): ${error.message}`),
|
|
1123
|
+
{ cause: error }
|
|
1124
|
+
);
|
|
1125
|
+
}
|
|
1126
|
+
}
|
|
931
1127
|
const pageExports = await readPageExports(root, scan.pageFiles, context.os);
|
|
932
1128
|
for (const [route, page] of pageExports) {
|
|
933
1129
|
if (page.config.presentation !== void 0 && mobile.tabs.some((tab) => tab.path === route)) {
|
|
@@ -947,6 +1143,8 @@ async function resolveFarmMobileApp(options = {}) {
|
|
|
947
1143
|
let { screens, warnings } = resolveFarmMobileScreens(screenOptions);
|
|
948
1144
|
let report;
|
|
949
1145
|
let analyzerStats;
|
|
1146
|
+
const ports = /* @__PURE__ */ new Map();
|
|
1147
|
+
const portProblems = /* @__PURE__ */ new Map();
|
|
950
1148
|
const asserted = [...pageExports.values()].some((page) => page.config.native === true);
|
|
951
1149
|
const analyze = options.analyze === "always" || asserted || options.analyze === true && mobile.native.auto !== "off";
|
|
952
1150
|
if (analyze) {
|
|
@@ -954,18 +1152,53 @@ async function resolveFarmMobileApp(options = {}) {
|
|
|
954
1152
|
const decision = screens[route];
|
|
955
1153
|
return decision.source === "default" || decision.requested !== void 0;
|
|
956
1154
|
});
|
|
957
|
-
const
|
|
958
|
-
const
|
|
1155
|
+
const portable = context.os === "android" && mobile.native.engine !== "platform" && (mobile.native.auto === "on" || candidates.some((route) => screens[route].requested === "native"));
|
|
1156
|
+
const { analyzeFarmMobileRoutes } = await import("./analyzer-LCSI3NSH.cjs");
|
|
1157
|
+
const analyzed = await analyzeFarmMobileRoutes({
|
|
959
1158
|
root,
|
|
960
1159
|
srcDir: config.srcDir,
|
|
961
|
-
routes: candidates,
|
|
1160
|
+
routes: portable ? routes : candidates,
|
|
962
1161
|
pageFiles: scan.pageFiles,
|
|
963
|
-
serverComponents: _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access',
|
|
1162
|
+
serverComponents: _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _79 => _79.experimental, 'optionalAccess', _80 => _80.serverComponents])) !== void 0,
|
|
964
1163
|
cacheFile: path2.resolve(root, getFarmMobileOutputDirs(config.distDir).analyzerCache)
|
|
965
1164
|
});
|
|
966
|
-
analyzerStats =
|
|
1165
|
+
analyzerStats = analyzed.stats;
|
|
1166
|
+
const result = {
|
|
1167
|
+
...analyzed,
|
|
1168
|
+
routes: Object.fromEntries(
|
|
1169
|
+
candidates.flatMap(
|
|
1170
|
+
(route) => analyzed.routes[route] ? [[route, analyzed.routes[route]]] : []
|
|
1171
|
+
)
|
|
1172
|
+
)
|
|
1173
|
+
};
|
|
1174
|
+
if (portable) {
|
|
1175
|
+
const { emitFarmMobilePort } = await import("./port-C6GBH4C6.cjs");
|
|
1176
|
+
const portsDir = path2.resolve(root, getFarmMobileOutputDirs(config.distDir).ports);
|
|
1177
|
+
for (const analysis of Object.values(result.routes)) {
|
|
1178
|
+
const graph = result.graphs[analysis.route];
|
|
1179
|
+
const wanted = mobile.native.auto === "on" && analysis.decision === "port" || screens[analysis.route].requested === "native";
|
|
1180
|
+
if (!graph || !wanted || analysis.tier === "native") continue;
|
|
1181
|
+
const emitted = await emitFarmMobilePort({
|
|
1182
|
+
root,
|
|
1183
|
+
graph,
|
|
1184
|
+
portsDir,
|
|
1185
|
+
module: createFarmMobileModuleId(analysis.route),
|
|
1186
|
+
stylesheets: result.stylesheets,
|
|
1187
|
+
unreadStylesheets: result.unreadStylesheets
|
|
1188
|
+
});
|
|
1189
|
+
if ("problems" in emitted) portProblems.set(analysis.route, emitted.problems);
|
|
1190
|
+
else ports.set(analysis.route, emitted.port);
|
|
1191
|
+
}
|
|
1192
|
+
}
|
|
967
1193
|
({ screens, warnings } = resolveFarmMobileScreens({
|
|
968
1194
|
...screenOptions,
|
|
1195
|
+
portFiles: new Map(
|
|
1196
|
+
[...ports].map(([route, port]) => [
|
|
1197
|
+
route,
|
|
1198
|
+
path2.resolve(root, getFarmMobileOutputDirs(config.distDir).ports, port.entry)
|
|
1199
|
+
])
|
|
1200
|
+
),
|
|
1201
|
+
portProblems,
|
|
969
1202
|
analyzerPorts: new Set(
|
|
970
1203
|
Object.values(result.routes).filter((route) => route.decision === "port").map((route) => route.route)
|
|
971
1204
|
),
|
|
@@ -1011,7 +1244,8 @@ async function resolveFarmMobileApp(options = {}) {
|
|
|
1011
1244
|
server,
|
|
1012
1245
|
basePath: config.basePath,
|
|
1013
1246
|
i18n,
|
|
1014
|
-
screens
|
|
1247
|
+
screens,
|
|
1248
|
+
...options.shells ? { shells: options.shells } : {}
|
|
1015
1249
|
});
|
|
1016
1250
|
return {
|
|
1017
1251
|
context,
|
|
@@ -1022,7 +1256,9 @@ async function resolveFarmMobileApp(options = {}) {
|
|
|
1022
1256
|
warnings,
|
|
1023
1257
|
nativeLayouts,
|
|
1024
1258
|
pageFiles: scan.pageFiles,
|
|
1025
|
-
|
|
1259
|
+
ports: Object.fromEntries(ports),
|
|
1260
|
+
...report ? { report, analyzerStats } : {},
|
|
1261
|
+
...appModules ? { appModules } : {}
|
|
1026
1262
|
};
|
|
1027
1263
|
}
|
|
1028
1264
|
async function generateFarmMobileRoutes(options = {}) {
|
|
@@ -1032,6 +1268,15 @@ async function generateFarmMobileRoutes(options = {}) {
|
|
|
1032
1268
|
await _promises.mkdir.call(void 0, path2.dirname(file), { recursive: true });
|
|
1033
1269
|
await _promises.writeFile.call(void 0, file, `${JSON.stringify(app.manifest, null, 2)}
|
|
1034
1270
|
`);
|
|
1271
|
+
const portsDir = path2.resolve(app.config.root, dirs.ports);
|
|
1272
|
+
await _promises.rm.call(void 0, portsDir, { recursive: true, force: true });
|
|
1273
|
+
for (const port of Object.values(app.ports)) {
|
|
1274
|
+
for (const [relative3, source] of Object.entries(port.files)) {
|
|
1275
|
+
const target = path2.join(portsDir, relative3);
|
|
1276
|
+
await _promises.mkdir.call(void 0, path2.dirname(target), { recursive: true });
|
|
1277
|
+
await _promises.writeFile.call(void 0, target, source);
|
|
1278
|
+
}
|
|
1279
|
+
}
|
|
1035
1280
|
if (!app.report) return { ...app, file };
|
|
1036
1281
|
const reportFile = path2.resolve(app.config.root, dirs.report);
|
|
1037
1282
|
await _promises.writeFile.call(void 0, reportFile, `${JSON.stringify(app.report, null, 2)}
|
|
@@ -1058,4 +1303,11 @@ async function generateFarmMobileRoutes(options = {}) {
|
|
|
1058
1303
|
|
|
1059
1304
|
|
|
1060
1305
|
|
|
1061
|
-
|
|
1306
|
+
|
|
1307
|
+
|
|
1308
|
+
|
|
1309
|
+
|
|
1310
|
+
|
|
1311
|
+
|
|
1312
|
+
|
|
1313
|
+
exports.FARM_SHELL_PARAM_SEGMENT = _chunk4JTQPOKOcjs.FARM_SHELL_PARAM_SEGMENT; exports.FARM_SHELL_RENDER_HEADER = _chunk4JTQPOKOcjs.FARM_SHELL_RENDER_HEADER; exports.FARM_SHELL_ROUTE_HEADER = _chunk4JTQPOKOcjs.FARM_SHELL_ROUTE_HEADER; exports.FarmMobileError = FarmMobileError; exports.createFarmMobileContext = createFarmMobileContext; exports.createFarmMobileModuleId = createFarmMobileModuleId; exports.createFarmMobilePageShell = createFarmMobilePageShell; exports.createFarmMobileRouteManifest = createFarmMobileRouteManifest; exports.createFarmMobileRoutePattern = createFarmMobileRoutePattern; exports.createFarmMobileShellRenderPath = _chunk4JTQPOKOcjs.createFarmMobileShellRenderPath; exports.formatFarmMobileNativeReport = formatFarmMobileNativeReport; exports.generateFarmMobileRoutes = generateFarmMobileRoutes; exports.getFarmMobileOutputDirs = getFarmMobileOutputDirs; exports.getFarmMobilePageShellFile = getFarmMobilePageShellFile; exports.readFarmMobileClientManifest = _chunkEFZGB7JCcjs.readFarmMobileClientManifest; exports.readFarmMobilePageExport = readFarmMobilePageExport; exports.renderFarmMobilePageShells = renderFarmMobilePageShells; exports.resolveFarmMobileApp = resolveFarmMobileApp; exports.resolveFarmMobileBlock = resolveFarmMobileBlock; exports.resolveFarmMobileConfig = resolveFarmMobileConfig; exports.resolveFarmMobileScreens = resolveFarmMobileScreens; exports.validateFarmMobileConfig = validateFarmMobileConfig;
|