@farm.js/core 0.1.51-beta.2 → 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-WWCC4GLG.mjs → agent-mcp-handler-7QMX2LUY.mjs} +7 -7
- package/dist/agent-mcp-handler-OV4WRFBL.cjs +18 -0
- package/dist/{agent-mcp.d-Z5DuwrqW.d.mts → agent-mcp.d-C-2S9bnP.d.mts} +1 -1
- package/dist/{agent-mcp.d-CR5Ov83o.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-Z6TNEAET.mjs → analyzer-22BEYV7S.mjs} +126 -12
- package/dist/{analyzer-T76CN3S7.cjs → analyzer-LCSI3NSH.cjs} +132 -18
- 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-CAHkOBFa.d.mts → app-manifest.d-DrSAHskY.d.mts} +1 -1
- package/dist/{app-manifest.d-DiWr_Jfx.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-DmapqkbV.d.ts → app.d-CmWlYpZJ.d.ts} +9 -4
- package/dist/{app.d-BfgJCsTQ.d.mts → app.d-D6QQM_kk.d.mts} +9 -4
- package/dist/{chunk-SN5VSO3Q.mjs → chunk-25T5VXOE.mjs} +7 -9
- package/dist/{chunk-GUJTVM36.cjs → chunk-2FRLSDBT.cjs} +1 -1
- package/dist/{chunk-LM2YOGDK.mjs → chunk-2I6PUKWJ.mjs} +1 -1
- package/dist/{chunk-EIMK7D2D.mjs → chunk-2KTYMMWT.mjs} +34 -4
- package/dist/{chunk-B5BBTPJQ.cjs → chunk-2OF5RPVU.cjs} +14 -14
- package/dist/chunk-37PYUEK5.mjs +533 -0
- package/dist/chunk-3HLQTOVU.cjs +6 -0
- 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-QXPSWMUD.cjs → chunk-4P23B7DU.cjs} +5 -5
- package/dist/{chunk-YVJV7Q2X.mjs → chunk-55U5QIXQ.mjs} +1 -1
- package/dist/{chunk-5N7QAGEA.cjs → chunk-5JNUYGNF.cjs} +37 -7
- package/dist/{chunk-NJLTQR5P.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-BOVGCUDZ.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-J3LBO2O4.cjs → chunk-DPJ66FSI.cjs} +22 -22
- package/dist/{chunk-NYQSC4DX.cjs → chunk-DZPR2W6U.cjs} +5 -5
- package/dist/{chunk-GW4YUIHW.mjs → chunk-E72UD6ME.mjs} +1 -1
- package/dist/chunk-EFZGB7JC.cjs +114 -0
- 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-FM2UEKS2.mjs → chunk-F6Y7ZAPQ.mjs} +2 -2
- package/dist/{chunk-LMFJCXDD.mjs → chunk-FN5UEC7I.mjs} +1 -1
- package/dist/{chunk-E6LTONL4.mjs → chunk-FORSVMEJ.mjs} +2 -2
- package/dist/{chunk-6CYQQQGR.mjs → chunk-HPWB57PZ.mjs} +1 -1
- package/dist/{chunk-Y2G5SJFB.mjs → chunk-IFHPDLIS.mjs} +1 -1
- package/dist/{chunk-GNJIYJMS.cjs → chunk-IFXSBJPN.cjs} +16 -16
- package/dist/{chunk-74Z5KX4A.mjs → chunk-ILMTRGBG.mjs} +309 -56
- package/dist/{chunk-NXBHYO7S.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-LAZK6UV7.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-LLZSYFOM.mjs +6 -0
- package/dist/{chunk-X2AMN2WV.cjs → chunk-LQNW3ABP.cjs} +10 -10
- package/dist/{chunk-6ONBZGVH.cjs → chunk-LRB5OVRT.cjs} +3 -3
- package/dist/{chunk-WJFFPXCV.cjs → chunk-LT4VAF5Z.cjs} +12 -10
- package/dist/{chunk-F6TLUMH7.mjs → chunk-M53MIIXY.mjs} +1 -1
- package/dist/{chunk-HIFIG6HL.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-DTU4PX7V.cjs → chunk-MTWXOEI4.cjs} +927 -629
- package/dist/chunk-NHD7BAKD.mjs +1457 -0
- package/dist/{chunk-NPQLMP7M.cjs → chunk-NQJDO7K7.cjs} +32 -31
- package/dist/{chunk-76GHW3WI.cjs → chunk-O27PLNQZ.cjs} +10 -10
- package/dist/{chunk-PIHKO25G.mjs → chunk-OM7WILES.mjs} +1 -1
- package/dist/{chunk-7UPCJDB5.mjs → chunk-PCXIJKPM.mjs} +8 -8
- package/dist/{chunk-IWFV5ZED.cjs → chunk-PMJSG4JS.cjs} +1 -1
- package/dist/{chunk-JATTVAHA.cjs → chunk-PRFNLQSP.cjs} +4 -4
- package/dist/{chunk-SBABQKPT.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-IBSAYAWB.mjs → chunk-SX7EECTS.mjs} +8 -5
- package/dist/{chunk-KBRZAYI7.mjs → chunk-T4TBK5NY.mjs} +2 -2
- package/dist/{chunk-4SSRBCBR.mjs → chunk-T7I62A4C.mjs} +619 -321
- package/dist/{chunk-E36C43IX.cjs → chunk-U4BJKNIR.cjs} +6 -6
- package/dist/{chunk-YU42A5MA.cjs → chunk-UDJY2ZGY.cjs} +533 -280
- package/dist/{chunk-SHS6KXOZ.mjs → chunk-UR25Z5Z6.mjs} +1 -1
- package/dist/{chunk-WZW6LEHM.cjs → chunk-UYSTTPYJ.cjs} +1590 -1019
- package/dist/{chunk-KRRZJ77U.mjs → chunk-UZZ6IEQP.mjs} +3 -3
- package/dist/{chunk-EKJYE4Y7.cjs → chunk-VGG74PSU.cjs} +25 -25
- package/dist/{chunk-CTM4SPB3.mjs → chunk-VPTWKOCY.mjs} +20 -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-XTG73QZA.cjs +533 -0
- package/dist/{chunk-XPMC4E2G.cjs → chunk-XVSBALOY.cjs} +3 -3
- package/dist/{chunk-XYL4HSVC.cjs → chunk-YI6FKTTN.cjs} +38 -7
- package/dist/{chunk-N77JBPLC.mjs → chunk-YSXTNSXS.mjs} +10 -8
- package/dist/{chunk-EHB77D5U.cjs → chunk-ZDAEHG2O.cjs} +3 -3
- package/dist/{chunk-PMKUU273.mjs → chunk-ZFUKPWFC.mjs} +1226 -655
- package/dist/{chunk-E73PGHSR.mjs → chunk-ZMHAFH4R.mjs} +8 -8
- package/dist/{chunk-ZOWNWHK6.cjs → chunk-ZNH6NR3H.cjs} +2 -2
- package/dist/chunk-ZNXTU4YH.mjs +114 -0
- package/dist/{chunk-PFV2KPDZ.cjs → chunk-ZOYKJBP5.cjs} +3 -3
- package/dist/{chunk-CECUDGXQ.cjs → chunk-ZP32GNJQ.cjs} +13 -13
- package/dist/{chunk-72D2NX77.mjs → chunk-ZZ2QKCKW.mjs} +1 -1
- package/dist/{client-plugins.d-Bx3FXpqm.d.mts → client-plugins.d-CgQQ-EAv.d.mts} +25 -4
- package/dist/{client-plugins.d-TiLbS5j4.d.ts → client-plugins.d-vXrbcfJ1.d.ts} +25 -4
- 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-iRPI16ku.d.mts → config.d-DqZkLwef.d.mts} +146 -1
- package/dist/{config.d-iRPI16ku.d.ts → config.d-DqZkLwef.d.ts} +146 -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-UQLDAOEI.mjs → devtools-KQZ6SRCJ.mjs} +16 -16
- package/dist/{devtools-6XWCZIGO.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 +99 -95
- package/dist/{index.d-yueUNipJ.d.ts → index.d-DlCELfhf.d.ts} +1 -1
- package/dist/{index.d-YxJ2AiDF.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 -135
- 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 +52 -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 +51 -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 +119 -7
- package/dist/internal/config-runtime.d.ts +119 -7
- 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 +42 -28
- package/dist/internal/production-runtime.d.mts +50 -12
- package/dist/internal/production-runtime.d.ts +50 -12
- package/dist/internal/production-runtime.mjs +52 -38
- package/dist/markdown.cjs +7 -5
- package/dist/markdown.d.mts +2 -2
- package/dist/markdown.d.ts +2 -2
- package/dist/markdown.mjs +6 -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 +43 -5
- package/dist/mobile.d.ts +43 -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-VWNW2MQ2.mjs +27 -0
- 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-HnDXhlyP.d.mts → navigation-delegate.d-CnOTWOyi.d.mts} +1 -1
- package/dist/{navigation-delegate.d-BY1e_Xrh.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 +43 -42
- package/dist/plugin.d.mts +5 -4
- package/dist/plugin.d.ts +5 -4
- package/dist/plugin.mjs +42 -41
- package/dist/port-C6GBH4C6.cjs +419 -0
- package/dist/port-WOOQ3V56.mjs +419 -0
- package/dist/{production-runtime.d-BpJUDzP8.d.mts → production-runtime.d-CP5s6RuY.d.mts} +1 -1
- package/dist/{production-runtime.d-lMjvE9cf.d.ts → production-runtime.d-N-cE3pmy.d.ts} +1 -1
- package/dist/{programmatic-routes-client.d-BlFp5hv4.d.ts → programmatic-routes-client.d-CLG2N1yH.d.ts} +2 -2
- package/dist/{programmatic-routes-client.d-6CGQ3TCk.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-DhP0mTHF.d.ts → render-plan.d-B9lAP3uX.d.ts} +1 -1
- package/dist/{render-plan.d-BH9edqKs.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-BVZrsR1v.d.ts → request.d-BiicaNxb.d.ts} +1 -1
- package/dist/{request.d-DJFRdKi8.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-Bpmw7PED.d.mts → route-rendering.d-BrIKA51A.d.mts} +1 -1
- package/dist/{route-rendering.d-B00JtK_-.d.ts → route-rendering.d-Iss0C7GR.d.ts} +1 -1
- package/dist/{router.d-Bd1x9XxQ.d.ts → router.d-DjGn_al7.d.ts} +1 -1
- package/dist/{router.d-e0jQ3jQ-.d.mts → router.d-mNTbOGV_.d.mts} +1 -1
- package/dist/{routes.d-D96Dq9lz.d.ts → routes.d-BKSjHuH9.d.ts} +27 -4
- package/dist/{routes.d-Cmv8TgVq.d.mts → routes.d-qd8Qf4LG.d.mts} +27 -4
- package/dist/routes.d.mts +2 -2
- package/dist/routes.d.ts +2 -2
- package/dist/{rsc-pipeline-DX4OC5FN.cjs → rsc-pipeline-SVLBTY7H.cjs} +21 -21
- package/dist/{rsc-pipeline-ZQ4CTVEG.mjs → rsc-pipeline-WBLBDQXA.mjs} +20 -20
- package/dist/{runtime-NQ3EDSA7.cjs → runtime-DGUOWSMF.cjs} +307 -48
- package/dist/{runtime-NPDRDV6R.mjs → runtime-HFZTVNFF.mjs} +298 -39
- package/dist/{runtime.d-CgB3IJDq.d.mts → runtime.d-BNVbojF1.d.mts} +1 -1
- package/dist/{runtime.d-D-td-RR3.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 +82 -81
- package/dist/server.d.mts +12 -11
- package/dist/server.d.ts +12 -11
- package/dist/server.mjs +65 -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-CO01mVOM.d.ts → spa-router.d-DAtnNoBe.d.ts} +11 -2
- package/dist/{spa-router.d-BWDhS0FK.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-B77__yh8.d.ts → utils.d-DwZ-KLSB.d.ts} +7 -1
- package/dist/{utils.d-DRDazhCA.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 +43 -42
- package/dist/vite.d.mts +17 -6
- package/dist/vite.d.ts +17 -6
- package/dist/vite.mjs +42 -41
- package/dist/workflows.cjs +3 -3
- package/dist/workflows.mjs +2 -2
- package/package.json +17 -3
- package/dist/agent-mcp-handler-RT3COCEL.cjs +0 -18
- 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,7 +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
3
|
|
|
4
|
-
|
|
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
|
+
|
|
16
|
+
var _chunkEFZGB7JCcjs = require('./chunk-EFZGB7JC.cjs');
|
|
17
|
+
require('./chunk-RAWWCDCT.cjs');
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
var _chunkNQJDO7K7cjs = require('./chunk-NQJDO7K7.cjs');
|
|
5
22
|
require('./chunk-OZC2JPW6.cjs');
|
|
6
23
|
|
|
7
24
|
|
|
@@ -13,7 +30,7 @@ require('./chunk-OZC2JPW6.cjs');
|
|
|
13
30
|
var _chunkYKHRCY4Tcjs = require('./chunk-YKHRCY4T.cjs');
|
|
14
31
|
|
|
15
32
|
|
|
16
|
-
var
|
|
33
|
+
var _chunkU4BJKNIRcjs = require('./chunk-U4BJKNIR.cjs');
|
|
17
34
|
require('./chunk-5YPBFMBN.cjs');
|
|
18
35
|
|
|
19
36
|
|
|
@@ -24,53 +41,56 @@ require('./chunk-STF6VDYQ.cjs');
|
|
|
24
41
|
|
|
25
42
|
|
|
26
43
|
var _chunkRD623KW4cjs = require('./chunk-RD623KW4.cjs');
|
|
27
|
-
require('./chunk-
|
|
28
|
-
require('./chunk-SG57PX7K.cjs');
|
|
29
|
-
require('./chunk-HIFIG6HL.cjs');
|
|
44
|
+
require('./chunk-DZPR2W6U.cjs');
|
|
30
45
|
require('./chunk-6JHZPB52.cjs');
|
|
31
|
-
require('./chunk-
|
|
32
|
-
require('./chunk-
|
|
46
|
+
require('./chunk-SG57PX7K.cjs');
|
|
47
|
+
require('./chunk-MEQN6DDA.cjs');
|
|
33
48
|
|
|
34
49
|
|
|
35
50
|
var _chunk5Y2P454Ocjs = require('./chunk-5Y2P454O.cjs');
|
|
51
|
+
require('./chunk-HEPJIKKQ.cjs');
|
|
52
|
+
require('./chunk-3EIPOTZV.cjs');
|
|
36
53
|
require('./chunk-2HW5LWAH.cjs');
|
|
54
|
+
require('./chunk-LT4VAF5Z.cjs');
|
|
37
55
|
require('./chunk-DQJ2CIH7.cjs');
|
|
38
|
-
require('./chunk-
|
|
39
|
-
require('./chunk-
|
|
56
|
+
require('./chunk-QRX4JRBO.cjs');
|
|
57
|
+
require('./chunk-YI6FKTTN.cjs');
|
|
40
58
|
require('./chunk-2KMIJDY6.cjs');
|
|
41
59
|
require('./chunk-FK25QSVC.cjs');
|
|
42
|
-
require('./chunk-WT6RAN2I.cjs');
|
|
43
|
-
require('./chunk-WJFFPXCV.cjs');
|
|
44
60
|
require('./chunk-SHIWRBFI.cjs');
|
|
45
|
-
require('./chunk-
|
|
61
|
+
require('./chunk-WT6RAN2I.cjs');
|
|
62
|
+
require('./chunk-ZP32GNJQ.cjs');
|
|
46
63
|
require('./chunk-DUIP64BF.cjs');
|
|
47
|
-
require('./chunk-
|
|
64
|
+
require('./chunk-ZOYKJBP5.cjs');
|
|
48
65
|
require('./chunk-ZXK2EYQW.cjs');
|
|
49
|
-
require('./chunk-
|
|
66
|
+
require('./chunk-ZDAEHG2O.cjs');
|
|
67
|
+
require('./chunk-UPYIFH2H.cjs');
|
|
50
68
|
require('./chunk-5DX3O6TT.cjs');
|
|
51
69
|
require('./chunk-NWUHS6GV.cjs');
|
|
52
|
-
require('./chunk-
|
|
70
|
+
require('./chunk-LRB5OVRT.cjs');
|
|
53
71
|
require('./chunk-E7QOEV5Z.cjs');
|
|
54
72
|
require('./chunk-OYZXVBZP.cjs');
|
|
55
73
|
require('./chunk-ITV4QQL2.cjs');
|
|
56
74
|
require('./chunk-FEFCISOX.cjs');
|
|
57
75
|
require('./chunk-LNVGXUL3.cjs');
|
|
58
|
-
require('./chunk-
|
|
76
|
+
require('./chunk-QMNWKQL4.cjs');
|
|
59
77
|
require('./chunk-SUCDVKUB.cjs');
|
|
60
78
|
require('./chunk-EVIWKPJV.cjs');
|
|
61
79
|
require('./chunk-YIHRZBD7.cjs');
|
|
80
|
+
require('./chunk-2OF5RPVU.cjs');
|
|
62
81
|
require('./chunk-LIFUPCXW.cjs');
|
|
63
82
|
require('./chunk-JYT7AN37.cjs');
|
|
64
|
-
require('./chunk-B5BBTPJQ.cjs');
|
|
65
83
|
require('./chunk-HA7YRO53.cjs');
|
|
66
84
|
require('./chunk-CA7DNRHO.cjs');
|
|
67
|
-
require('./chunk-
|
|
85
|
+
require('./chunk-PMJSG4JS.cjs');
|
|
86
|
+
require('./chunk-R5U7OIPI.cjs');
|
|
68
87
|
require('./chunk-6FXBJPF5.cjs');
|
|
69
88
|
require('./chunk-E552H232.cjs');
|
|
70
89
|
require('./chunk-UZCMMJJT.cjs');
|
|
71
90
|
require('./chunk-6XQSPIN6.cjs');
|
|
72
|
-
require('./chunk-7JUIK547.cjs');
|
|
73
91
|
require('./chunk-A25FXJ7D.cjs');
|
|
92
|
+
require('./chunk-7JUIK547.cjs');
|
|
93
|
+
require('./chunk-HNAISJFD.cjs');
|
|
74
94
|
require('./chunk-6CTFVBAT.cjs');
|
|
75
95
|
require('./chunk-3BIASUGR.cjs');
|
|
76
96
|
require('./chunk-OWQV6MLM.cjs');
|
|
@@ -88,7 +108,16 @@ var _promises = require('fs/promises');
|
|
|
88
108
|
var _path = require('path'); var path2 = _interopRequireWildcard(_path); var path = _interopRequireWildcard(_path);
|
|
89
109
|
|
|
90
110
|
// src/mobile/config.ts
|
|
91
|
-
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
|
+
]);
|
|
92
121
|
var ROUTE_KEYS = /* @__PURE__ */ new Set(["presentation"]);
|
|
93
122
|
var TAB_KEYS = /* @__PURE__ */ new Set(["path", "title", "icon"]);
|
|
94
123
|
var NATIVE_KEYS = /* @__PURE__ */ new Set(["engine", "auto", "routes", "islands", "prefetch", "budgets"]);
|
|
@@ -317,6 +346,14 @@ function validateFarmMobileConfig(input, context) {
|
|
|
317
346
|
}
|
|
318
347
|
}
|
|
319
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
|
+
}
|
|
320
357
|
if (_chunkYKHRCY4Tcjs.isPlainObject.call(void 0, input.routes) && _chunkYKHRCY4Tcjs.isPlainObject.call(void 0, input.native)) {
|
|
321
358
|
const nativeRoutes = _chunkYKHRCY4Tcjs.isPlainObject.call(void 0, input.native.routes) ? input.native.routes : {};
|
|
322
359
|
const presented = new Map(
|
|
@@ -424,7 +461,9 @@ function resolveFarmMobileConfig(input, options, context) {
|
|
|
424
461
|
islands: [...new Set(_nullishCoalesce(native.islands, () => ( [])))].sort(),
|
|
425
462
|
prefetch: _nullishCoalesce(native.prefetch, () => ( "intent")),
|
|
426
463
|
budgets: { ...native.budgets }
|
|
427
|
-
}
|
|
464
|
+
},
|
|
465
|
+
shells: config.shells === true,
|
|
466
|
+
modules: _chunkKPOMS5ROcjs.resolveFarmMobileModules.call(void 0, config.modules, options, fail)
|
|
428
467
|
};
|
|
429
468
|
}
|
|
430
469
|
function createFarmMobileContext(options) {
|
|
@@ -639,13 +678,7 @@ ${analysis.nativeBlockers.map((blocker) => ` - ${blocker}`).join("\n")}
|
|
|
639
678
|
` + (analysis.tier === "react-native" ? "It needs JavaScript on the device: add page.native.tsx next to the page, or " : "Remove the blockers, add page.native.tsx next to the page, or ") + "remove mobile.native."
|
|
640
679
|
);
|
|
641
680
|
}
|
|
642
|
-
screens[route] = {
|
|
643
|
-
screen: "web",
|
|
644
|
-
source: "page",
|
|
645
|
-
file: page.file,
|
|
646
|
-
requested: "native",
|
|
647
|
-
...base
|
|
648
|
-
};
|
|
681
|
+
screens[route] = analysis ? { screen: "server", source: "page", file: page.file, module, ...base } : { screen: "web", source: "page", file: page.file, requested: "native", ...base };
|
|
649
682
|
continue;
|
|
650
683
|
}
|
|
651
684
|
if (tier === "web") {
|
|
@@ -678,9 +711,25 @@ ${analysis.nativeBlockers.map((blocker) => ` - ${blocker}`).join("\n")}
|
|
|
678
711
|
};
|
|
679
712
|
continue;
|
|
680
713
|
}
|
|
681
|
-
|
|
714
|
+
if (_optionalChain([options, 'access', _35 => _35.analyzerTiers, 'optionalAccess', _36 => _36.get, 'call', _37 => _37(route), 'optionalAccess', _38 => _38.tier]) === "native") {
|
|
715
|
+
screens[route] = { screen: "server", source: "config", module, ...base };
|
|
716
|
+
continue;
|
|
717
|
+
}
|
|
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)]);
|
|
682
731
|
warnings.push(
|
|
683
|
-
`${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."
|
|
684
733
|
);
|
|
685
734
|
screens[route] = { screen: "web", source: "config", requested: nativeTier, ...base };
|
|
686
735
|
continue;
|
|
@@ -696,7 +745,28 @@ ${analysis.nativeBlockers.map((blocker) => ` - ${blocker}`).join("\n")}
|
|
|
696
745
|
};
|
|
697
746
|
continue;
|
|
698
747
|
}
|
|
699
|
-
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") {
|
|
749
|
+
screens[route] = { screen: "server", source: "analyzer", module, ...base };
|
|
750
|
+
continue;
|
|
751
|
+
}
|
|
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
|
+
}
|
|
700
770
|
screens[route] = { screen: "web", source: "analyzer", requested: nativeTier, ...base };
|
|
701
771
|
continue;
|
|
702
772
|
}
|
|
@@ -756,7 +826,7 @@ function readFarmMobilePageExport(source, file, parse, context) {
|
|
|
756
826
|
const value = literalValue(declarator.init, fail);
|
|
757
827
|
return validateFarmMobilePageConfig(value, file, context);
|
|
758
828
|
}
|
|
759
|
-
} else if (_optionalChain([declaration, 'access',
|
|
829
|
+
} else if (_optionalChain([declaration, 'access', _64 => _64.id, 'optionalAccess', _65 => _65.name]) === "mobile") {
|
|
760
830
|
fail('must be an object, such as export const mobile = { presentation: "modal" }');
|
|
761
831
|
}
|
|
762
832
|
}
|
|
@@ -841,7 +911,109 @@ function createFarmMobileRouteManifest(mobile, options) {
|
|
|
841
911
|
path: basePath ? tab.path === "/" ? basePath : `${basePath}${tab.path}` : tab.path
|
|
842
912
|
})),
|
|
843
913
|
prefetch: mobile.native.prefetch,
|
|
844
|
-
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
|
|
845
1017
|
};
|
|
846
1018
|
}
|
|
847
1019
|
|
|
@@ -862,7 +1034,9 @@ function getFarmMobileOutputDirs(distDir) {
|
|
|
862
1034
|
ios: path2.join(root, "ios"),
|
|
863
1035
|
dist: path2.join(root, "dist"),
|
|
864
1036
|
report: path2.join(root, "native-report.json"),
|
|
865
|
-
|
|
1037
|
+
ports: path2.join(root, "ports"),
|
|
1038
|
+
analyzerCache: path2.join(distDir, "cache", "mobile", "analyzer.json"),
|
|
1039
|
+
client: path2.join(distDir, "client")
|
|
866
1040
|
};
|
|
867
1041
|
}
|
|
868
1042
|
var SCRIPT_PAGE = /\.(?:tsx|ts|jsx|js)$/;
|
|
@@ -895,11 +1069,11 @@ async function readPageExports(root, pageFiles, os) {
|
|
|
895
1069
|
return exports;
|
|
896
1070
|
}
|
|
897
1071
|
async function resolveFarmMobileApp(options = {}) {
|
|
898
|
-
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())));
|
|
899
1073
|
const command = _nullishCoalesce(options.command, () => ( "build"));
|
|
900
1074
|
const mode = command === "dev" ? "development" : "production";
|
|
901
|
-
const userConfig = options.userConfig === void 0 ? await
|
|
902
|
-
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) {
|
|
903
1077
|
throw new FarmMobileError(
|
|
904
1078
|
'farm.config.ts has no `mobile` entry. Add one, such as `mobile: { id: "com.example.notes", server: "https://notes.example.com" }`.'
|
|
905
1079
|
);
|
|
@@ -912,8 +1086,8 @@ async function resolveFarmMobileApp(options = {}) {
|
|
|
912
1086
|
mode
|
|
913
1087
|
});
|
|
914
1088
|
const block = await resolveFarmMobileBlock(userConfig.mobile, context, options.cache);
|
|
915
|
-
const config = await _asyncNullishCoalesce(options.config, async () => ( await
|
|
916
|
-
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, {
|
|
917
1091
|
root,
|
|
918
1092
|
srcDir: config.srcDir,
|
|
919
1093
|
sourceRoots: _chunk5Y2P454Ocjs.getFarmSourceRoots.call(void 0, config),
|
|
@@ -921,7 +1095,35 @@ async function resolveFarmMobileApp(options = {}) {
|
|
|
921
1095
|
platformFiles: true
|
|
922
1096
|
});
|
|
923
1097
|
const routes = [...scan.pages].sort();
|
|
924
|
-
|
|
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
|
+
}
|
|
925
1127
|
const pageExports = await readPageExports(root, scan.pageFiles, context.os);
|
|
926
1128
|
for (const [route, page] of pageExports) {
|
|
927
1129
|
if (page.config.presentation !== void 0 && mobile.tabs.some((tab) => tab.path === route)) {
|
|
@@ -941,6 +1143,8 @@ async function resolveFarmMobileApp(options = {}) {
|
|
|
941
1143
|
let { screens, warnings } = resolveFarmMobileScreens(screenOptions);
|
|
942
1144
|
let report;
|
|
943
1145
|
let analyzerStats;
|
|
1146
|
+
const ports = /* @__PURE__ */ new Map();
|
|
1147
|
+
const portProblems = /* @__PURE__ */ new Map();
|
|
944
1148
|
const asserted = [...pageExports.values()].some((page) => page.config.native === true);
|
|
945
1149
|
const analyze = options.analyze === "always" || asserted || options.analyze === true && mobile.native.auto !== "off";
|
|
946
1150
|
if (analyze) {
|
|
@@ -948,18 +1152,53 @@ async function resolveFarmMobileApp(options = {}) {
|
|
|
948
1152
|
const decision = screens[route];
|
|
949
1153
|
return decision.source === "default" || decision.requested !== void 0;
|
|
950
1154
|
});
|
|
951
|
-
const
|
|
952
|
-
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({
|
|
953
1158
|
root,
|
|
954
1159
|
srcDir: config.srcDir,
|
|
955
|
-
routes: candidates,
|
|
1160
|
+
routes: portable ? routes : candidates,
|
|
956
1161
|
pageFiles: scan.pageFiles,
|
|
957
|
-
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,
|
|
958
1163
|
cacheFile: path2.resolve(root, getFarmMobileOutputDirs(config.distDir).analyzerCache)
|
|
959
1164
|
});
|
|
960
|
-
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
|
+
}
|
|
961
1193
|
({ screens, warnings } = resolveFarmMobileScreens({
|
|
962
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,
|
|
963
1202
|
analyzerPorts: new Set(
|
|
964
1203
|
Object.values(result.routes).filter((route) => route.decision === "port").map((route) => route.route)
|
|
965
1204
|
),
|
|
@@ -1005,7 +1244,8 @@ async function resolveFarmMobileApp(options = {}) {
|
|
|
1005
1244
|
server,
|
|
1006
1245
|
basePath: config.basePath,
|
|
1007
1246
|
i18n,
|
|
1008
|
-
screens
|
|
1247
|
+
screens,
|
|
1248
|
+
...options.shells ? { shells: options.shells } : {}
|
|
1009
1249
|
});
|
|
1010
1250
|
return {
|
|
1011
1251
|
context,
|
|
@@ -1016,7 +1256,9 @@ async function resolveFarmMobileApp(options = {}) {
|
|
|
1016
1256
|
warnings,
|
|
1017
1257
|
nativeLayouts,
|
|
1018
1258
|
pageFiles: scan.pageFiles,
|
|
1019
|
-
|
|
1259
|
+
ports: Object.fromEntries(ports),
|
|
1260
|
+
...report ? { report, analyzerStats } : {},
|
|
1261
|
+
...appModules ? { appModules } : {}
|
|
1020
1262
|
};
|
|
1021
1263
|
}
|
|
1022
1264
|
async function generateFarmMobileRoutes(options = {}) {
|
|
@@ -1026,6 +1268,15 @@ async function generateFarmMobileRoutes(options = {}) {
|
|
|
1026
1268
|
await _promises.mkdir.call(void 0, path2.dirname(file), { recursive: true });
|
|
1027
1269
|
await _promises.writeFile.call(void 0, file, `${JSON.stringify(app.manifest, null, 2)}
|
|
1028
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
|
+
}
|
|
1029
1280
|
if (!app.report) return { ...app, file };
|
|
1030
1281
|
const reportFile = path2.resolve(app.config.root, dirs.report);
|
|
1031
1282
|
await _promises.writeFile.call(void 0, reportFile, `${JSON.stringify(app.report, null, 2)}
|
|
@@ -1051,4 +1302,12 @@ async function generateFarmMobileRoutes(options = {}) {
|
|
|
1051
1302
|
|
|
1052
1303
|
|
|
1053
1304
|
|
|
1054
|
-
|
|
1305
|
+
|
|
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;
|