@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,14 +1,16 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); 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
|
-
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
var _chunkD2X5MUF5cjs = require('./chunk-D2X5MUF5.cjs');
|
|
6
8
|
|
|
7
9
|
|
|
8
10
|
var _chunk3HLQTOVUcjs = require('./chunk-3HLQTOVU.cjs');
|
|
9
11
|
|
|
10
12
|
|
|
11
|
-
var
|
|
13
|
+
var _chunkLT4VAF5Zcjs = require('./chunk-LT4VAF5Z.cjs');
|
|
12
14
|
|
|
13
15
|
// src/mobile/native-tree.ts
|
|
14
16
|
var VIEW_TAGS = new Set(
|
|
@@ -68,11 +70,26 @@ function parseHtml(html) {
|
|
|
68
70
|
_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(attribute[2], () => ( attribute[3])), () => ( attribute[4])), () => ( ""))
|
|
69
71
|
);
|
|
70
72
|
}
|
|
71
|
-
const
|
|
72
|
-
|
|
73
|
+
const parent = stack.at(-1);
|
|
74
|
+
let previous;
|
|
75
|
+
for (let index = parent.children.length - 1; index >= 0 && !previous; index -= 1) {
|
|
76
|
+
const child = parent.children[index];
|
|
77
|
+
if (typeof child !== "string") previous = child;
|
|
78
|
+
}
|
|
79
|
+
const element = { tag: name, attributes, children: [], parent, previous };
|
|
80
|
+
parent.children.push(element);
|
|
73
81
|
if (!match[4] && !VOID_TAGS.has(name)) stack.push(element);
|
|
74
82
|
}
|
|
75
83
|
if (cursor < html.length) stack.at(-1).children.push(decode(html.slice(cursor)));
|
|
84
|
+
const markLast = (element) => {
|
|
85
|
+
const elements = element.children.filter(
|
|
86
|
+
(child) => typeof child !== "string"
|
|
87
|
+
);
|
|
88
|
+
const last = elements[elements.length - 1];
|
|
89
|
+
if (last) last.last = true;
|
|
90
|
+
elements.forEach(markLast);
|
|
91
|
+
};
|
|
92
|
+
markLast(root);
|
|
76
93
|
return root;
|
|
77
94
|
}
|
|
78
95
|
function find(element, test) {
|
|
@@ -86,11 +103,11 @@ function find(element, test) {
|
|
|
86
103
|
}
|
|
87
104
|
function textOnly(style) {
|
|
88
105
|
return Object.fromEntries(
|
|
89
|
-
Object.entries(style).filter(([key]) =>
|
|
106
|
+
Object.entries(style).filter(([key]) => _chunkD2X5MUF5cjs.FARM_NATIVE_TEXT_KEYS.has(key))
|
|
90
107
|
);
|
|
91
108
|
}
|
|
92
109
|
function withoutText(style) {
|
|
93
|
-
const rest = Object.entries(style).filter(([key]) => !
|
|
110
|
+
const rest = Object.entries(style).filter(([key]) => !_chunkD2X5MUF5cjs.FARM_NATIVE_TEXT_KEYS.has(key));
|
|
94
111
|
return rest.length > 0 ? Object.fromEntries(rest) : void 0;
|
|
95
112
|
}
|
|
96
113
|
function settleLineHeight(style) {
|
|
@@ -102,24 +119,49 @@ function settleLineHeight(style) {
|
|
|
102
119
|
return rest;
|
|
103
120
|
}
|
|
104
121
|
var Converter = class {
|
|
105
|
-
|
|
122
|
+
/**
|
|
123
|
+
* `sheets`: the page's stylesheets. Without them, a class the Tailwind table does not know is
|
|
124
|
+
* reported; with them, only one a layered (Tailwind) rule styles is, since a class no rule
|
|
125
|
+
* styles has no effect in a browser either.
|
|
126
|
+
*/
|
|
127
|
+
constructor(pageUrl, sheets) {
|
|
106
128
|
this.pageUrl = pageUrl;
|
|
129
|
+
this.sheets = sheets;
|
|
107
130
|
this.unsupported = [];
|
|
131
|
+
/** Off while reading the ancestors above the page, which pass down text styles only. */
|
|
132
|
+
this.reporting = true;
|
|
108
133
|
}
|
|
109
134
|
problem(message) {
|
|
110
|
-
if (!this.unsupported.includes(message)) this.unsupported.push(message);
|
|
135
|
+
if (this.reporting && !this.unsupported.includes(message)) this.unsupported.push(message);
|
|
111
136
|
}
|
|
112
137
|
stylesOf(element) {
|
|
113
|
-
const classes =
|
|
114
|
-
|
|
115
|
-
const
|
|
138
|
+
const classes = _chunkD2X5MUF5cjs.resolveFarmNativeClasses.call(void 0, _nullishCoalesce(element.attributes.class, () => ( "")));
|
|
139
|
+
const cascade = this.sheets ? _chunkD2X5MUF5cjs.cascadeFarmNativeStylesheets.call(void 0, this.sheets, element) : void 0;
|
|
140
|
+
for (const token of classes.unsupported) {
|
|
141
|
+
if (!cascade || cascade.layered.includes(token.split(":").pop())) {
|
|
142
|
+
this.problem(`<${element.tag}> class "${token}"`);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
for (const problem of _nullishCoalesce(_optionalChain([cascade, 'optionalAccess', _ => _.unsupported]), () => ( []))) {
|
|
146
|
+
this.problem(`<${element.tag}> ${problem}`);
|
|
147
|
+
}
|
|
148
|
+
const inline = _chunkD2X5MUF5cjs.resolveFarmNativeInlineStyle.call(void 0, _nullishCoalesce(element.attributes.style, () => ( "")));
|
|
116
149
|
for (const declaration of inline.unsupported) {
|
|
117
150
|
this.problem(`<${element.tag}> style "${declaration}"`);
|
|
118
151
|
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
152
|
+
const style = {
|
|
153
|
+
...INLINE_DEFAULTS[element.tag],
|
|
154
|
+
...classes.style,
|
|
155
|
+
..._optionalChain([cascade, 'optionalAccess', _2 => _2.style]),
|
|
156
|
+
...inline.style
|
|
122
157
|
};
|
|
158
|
+
const dark = { ...classes.dark, ..._optionalChain([cascade, 'optionalAccess', _3 => _3.dark]) };
|
|
159
|
+
for (const target of [style, dark]) {
|
|
160
|
+
if (target.display === "flex" && target.flexDirection === void 0 && !style.flexDirection) {
|
|
161
|
+
target.flexDirection = "row";
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
return { style, dark };
|
|
123
165
|
}
|
|
124
166
|
url(value) {
|
|
125
167
|
if (!value) return void 0;
|
|
@@ -131,11 +173,12 @@ var Converter = class {
|
|
|
131
173
|
}
|
|
132
174
|
}
|
|
133
175
|
node(type, element, style, dark) {
|
|
176
|
+
const changed = dark && Object.fromEntries(Object.entries(dark).filter(([key, value]) => _optionalChain([style, 'optionalAccess', _4 => _4[key]]) !== value));
|
|
134
177
|
return {
|
|
135
178
|
type,
|
|
136
179
|
tag: element.tag,
|
|
137
180
|
...style && Object.keys(style).length > 0 ? { style } : {},
|
|
138
|
-
...
|
|
181
|
+
...changed && Object.keys(changed).length > 0 ? { dark: changed } : {}
|
|
139
182
|
};
|
|
140
183
|
}
|
|
141
184
|
/** Inline content: runs of text, nested inline elements, and line breaks. */
|
|
@@ -176,12 +219,28 @@ var Converter = class {
|
|
|
176
219
|
const runs = this.inline(content, inherited);
|
|
177
220
|
const trimmed = collapse(runs);
|
|
178
221
|
if (trimmed.length === 0) return void 0;
|
|
179
|
-
const style = settleLineHeight({ ...inherited.style, ..._optionalChain([box, 'optionalAccess',
|
|
180
|
-
const dark = {
|
|
222
|
+
const style = settleLineHeight({ ...inherited.style, ..._optionalChain([box, 'optionalAccess', _5 => _5.style]) });
|
|
223
|
+
const dark = {
|
|
224
|
+
...inherited.dark,
|
|
225
|
+
...box ? textOnly(box.style) : {},
|
|
226
|
+
..._optionalChain([box, 'optionalAccess', _6 => _6.dark])
|
|
227
|
+
};
|
|
181
228
|
const node = this.node("Text", element, style, dark);
|
|
182
229
|
node.children = trimmed;
|
|
183
230
|
return node;
|
|
184
231
|
}
|
|
232
|
+
/** A link drawn as a box: it holds blocks, or has a box style such as a background. */
|
|
233
|
+
isBlockLink(element) {
|
|
234
|
+
if (element.tag !== "a") return false;
|
|
235
|
+
if (element.children.some((child) => typeof child !== "string" && !INLINE_TAGS.has(child.tag))) {
|
|
236
|
+
return true;
|
|
237
|
+
}
|
|
238
|
+
const reporting = this.reporting;
|
|
239
|
+
this.reporting = false;
|
|
240
|
+
const { style } = this.stylesOf(element);
|
|
241
|
+
this.reporting = reporting;
|
|
242
|
+
return withoutText(style) !== void 0;
|
|
243
|
+
}
|
|
185
244
|
/**
|
|
186
245
|
* Block content: each element a view, and each run of inline content a text block. In a flex
|
|
187
246
|
* container every child is its own item, as CSS blockifies them: a `<span>` pill there is a box.
|
|
@@ -203,7 +262,7 @@ var Converter = class {
|
|
|
203
262
|
pending = [];
|
|
204
263
|
};
|
|
205
264
|
for (const child of content) {
|
|
206
|
-
if (typeof child === "string" || INLINE_TAGS.has(child.tag) && !isBlockLink(child)) {
|
|
265
|
+
if (typeof child === "string" || INLINE_TAGS.has(child.tag) && !this.isBlockLink(child)) {
|
|
207
266
|
pending.push(child);
|
|
208
267
|
continue;
|
|
209
268
|
}
|
|
@@ -220,7 +279,9 @@ var Converter = class {
|
|
|
220
279
|
if (own.style.display === "none") return void 0;
|
|
221
280
|
const passed = {
|
|
222
281
|
style: { ...inherited.style, ...textOnly(own.style) },
|
|
223
|
-
|
|
282
|
+
// An element's own text style holds in both themes unless it sets a dark one: it overrides
|
|
283
|
+
// what the dark theme passes down, as CSS does.
|
|
284
|
+
dark: { ...inherited.dark, ...textOnly(own.style), ...textOnly(own.dark) }
|
|
224
285
|
};
|
|
225
286
|
const current = (style, color) => style && Object.fromEntries(
|
|
226
287
|
Object.entries(style).map(([key, value]) => [
|
|
@@ -289,15 +350,6 @@ var Converter = class {
|
|
|
289
350
|
return void 0;
|
|
290
351
|
}
|
|
291
352
|
};
|
|
292
|
-
function isBlockLink(element) {
|
|
293
|
-
if (element.tag !== "a") return false;
|
|
294
|
-
if (element.children.some((child) => typeof child !== "string" && !INLINE_TAGS.has(child.tag))) {
|
|
295
|
-
return true;
|
|
296
|
-
}
|
|
297
|
-
const classes = _chunkP6MHI5O2cjs.resolveFarmNativeClasses.call(void 0, _nullishCoalesce(element.attributes.class, () => ( ""))).style;
|
|
298
|
-
const inline = _chunkP6MHI5O2cjs.resolveFarmNativeInlineStyle.call(void 0, _nullishCoalesce(element.attributes.style, () => ( ""))).style;
|
|
299
|
-
return withoutText({ ...classes, ...inline }) !== void 0;
|
|
300
|
-
}
|
|
301
353
|
function textContent(element) {
|
|
302
354
|
return element.children.map((child) => typeof child === "string" ? child : textContent(child)).join("");
|
|
303
355
|
}
|
|
@@ -338,21 +390,83 @@ function collapse(runs) {
|
|
|
338
390
|
}
|
|
339
391
|
return out;
|
|
340
392
|
}
|
|
341
|
-
function
|
|
342
|
-
|
|
343
|
-
|
|
393
|
+
function firstHeading(node) {
|
|
394
|
+
if (node.tag === "h1") {
|
|
395
|
+
const text = (_nullishCoalesce(node.children, () => ( []))).map(function flatten(child) {
|
|
396
|
+
return typeof child === "string" ? child : (_nullishCoalesce(child.children, () => ( []))).map(flatten).join("");
|
|
397
|
+
}).join("").trim();
|
|
398
|
+
return text || void 0;
|
|
399
|
+
}
|
|
400
|
+
for (const child of _nullishCoalesce(node.children, () => ( []))) {
|
|
401
|
+
if (typeof child === "string") continue;
|
|
402
|
+
const found = firstHeading(child);
|
|
403
|
+
if (found) return found;
|
|
404
|
+
}
|
|
405
|
+
return void 0;
|
|
406
|
+
}
|
|
407
|
+
var parsedSheets = /* @__PURE__ */ new Map();
|
|
408
|
+
function parsedStylesheet(css) {
|
|
409
|
+
let sheet = parsedSheets.get(css);
|
|
410
|
+
if (!sheet) {
|
|
411
|
+
sheet = _chunkD2X5MUF5cjs.parseFarmNativeStylesheet.call(void 0, css);
|
|
412
|
+
if (parsedSheets.size >= 16) parsedSheets.delete(parsedSheets.keys().next().value);
|
|
413
|
+
parsedSheets.set(css, sheet);
|
|
414
|
+
}
|
|
415
|
+
return sheet;
|
|
416
|
+
}
|
|
417
|
+
function createFarmNativeTree(html, pageUrl, stylesheets) {
|
|
418
|
+
const title = _optionalChain([/<title\b[^>]*>([\s\S]*?)<\/title>/i, 'access', _7 => _7.exec, 'call', _8 => _8(html), 'optionalAccess', _9 => _9[1]]);
|
|
419
|
+
const document = parseHtml(_chunkLT4VAF5Zcjs._readFarmRenderedHtml.call(void 0, html));
|
|
344
420
|
const page = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(find(document, (element) => element.attributes.id === "__farm_page__"), () => ( find(document, (element) => element.attributes.id === "root"))), () => ( find(document, (element) => element.tag === "body"))), () => ( document));
|
|
345
|
-
const converter = new Converter(pageUrl);
|
|
346
|
-
const
|
|
347
|
-
|
|
421
|
+
const converter = new Converter(pageUrl, _optionalChain([stylesheets, 'optionalAccess', _10 => _10.map, 'call', _11 => _11(parsedStylesheet)]));
|
|
422
|
+
const ancestors = [];
|
|
423
|
+
for (let element = page.parent; element; element = element.parent) ancestors.unshift(element);
|
|
424
|
+
const inherited = { style: {}, dark: {} };
|
|
425
|
+
let background = {};
|
|
426
|
+
converter.reporting = false;
|
|
427
|
+
for (const element of [...ancestors, page]) {
|
|
428
|
+
if (element.tag === "#root") continue;
|
|
429
|
+
const own = converter.stylesOf(element);
|
|
430
|
+
Object.assign(inherited.style, textOnly(own.style));
|
|
431
|
+
Object.assign(inherited.dark, textOnly(own.dark));
|
|
432
|
+
if (own.style.backgroundColor) background = { backgroundColor: own.style.backgroundColor };
|
|
433
|
+
if (own.dark.backgroundColor)
|
|
434
|
+
background = { ...background, darkBackground: own.dark.backgroundColor };
|
|
435
|
+
}
|
|
436
|
+
converter.reporting = true;
|
|
437
|
+
const { darkBackground, ...light } = background;
|
|
438
|
+
const root = {
|
|
439
|
+
type: "View",
|
|
440
|
+
tag: page.tag,
|
|
441
|
+
...Object.keys(light).length > 0 ? { style: light } : {},
|
|
442
|
+
...darkBackground ? { dark: { backgroundColor: darkBackground } } : {}
|
|
443
|
+
};
|
|
444
|
+
const children = converter.blocks(page.children, inherited);
|
|
348
445
|
if (children.length > 0) root.children = children;
|
|
349
446
|
return {
|
|
350
447
|
version: 1,
|
|
351
|
-
...title ? { title: decode(title.trim()) } : {},
|
|
448
|
+
..._optionalChain([title, 'optionalAccess', _12 => _12.trim, 'call', _13 => _13()]) ? { title: decode(title.trim()) } : firstHeading(root) ? { title: firstHeading(root) } : {},
|
|
352
449
|
root,
|
|
353
450
|
unsupported: converter.unsupported
|
|
354
451
|
};
|
|
355
452
|
}
|
|
453
|
+
function readFarmPageStylesheets(html, pageUrl) {
|
|
454
|
+
const out = [];
|
|
455
|
+
const head = _nullishCoalesce(_optionalChain([/<head\b[^>]*>([\s\S]*?)<\/head>/i, 'access', _14 => _14.exec, 'call', _15 => _15(html), 'optionalAccess', _16 => _16[1]]), () => ( html));
|
|
456
|
+
for (const match of head.matchAll(/<link\b([^>]*)>|<style\b[^>]*>([\s\S]*?)<\/style>/gi)) {
|
|
457
|
+
if (match[2] !== void 0) {
|
|
458
|
+
out.push({ inline: match[2] });
|
|
459
|
+
continue;
|
|
460
|
+
}
|
|
461
|
+
const attributes = match[1];
|
|
462
|
+
if (!/\brel\s*=\s*["']?stylesheet\b/i.test(attributes)) continue;
|
|
463
|
+
const href = _optionalChain([/\bhref\s*=\s*["']([^"']+)["']/i, 'access', _17 => _17.exec, 'call', _18 => _18(attributes), 'optionalAccess', _19 => _19[1]]);
|
|
464
|
+
if (!href) continue;
|
|
465
|
+
const resolved = new URL(decode(href), pageUrl);
|
|
466
|
+
if (resolved.origin === pageUrl.origin) out.push({ href: resolved.pathname + resolved.search });
|
|
467
|
+
}
|
|
468
|
+
return out;
|
|
469
|
+
}
|
|
356
470
|
function farmRequestWantsNativeTree(request) {
|
|
357
471
|
return (_nullishCoalesce(request.headers.get("accept"), () => ( ""))).includes(_chunk3HLQTOVUcjs.FARM_NATIVE_TREE_CONTENT_TYPE);
|
|
358
472
|
}
|
|
@@ -369,13 +483,42 @@ async function createFarmNativeTreeResponse(options) {
|
|
|
369
483
|
);
|
|
370
484
|
const type = _nullishCoalesce(page.headers.get("content-type"), () => ( ""));
|
|
371
485
|
if (page.status !== 200 || !type.includes("text/html")) return page;
|
|
372
|
-
const
|
|
486
|
+
const html = await page.text();
|
|
487
|
+
const pageUrl = new URL(options.request.url);
|
|
488
|
+
const load = _nullishCoalesce(options.loadStylesheet, () => ( (async (href) => {
|
|
489
|
+
const response = await options.renderPage(
|
|
490
|
+
new Request(new URL(href, pageUrl), {
|
|
491
|
+
headers: { accept: "text/css,*/*;q=0.1", cookie: _nullishCoalesce(headers.get("cookie"), () => ( "")) },
|
|
492
|
+
signal: options.request.signal
|
|
493
|
+
})
|
|
494
|
+
);
|
|
495
|
+
return response.status === 200 && _optionalChain([response, 'access', _20 => _20.headers, 'access', _21 => _21.get, 'call', _22 => _22("content-type"), 'optionalAccess', _23 => _23.includes, 'call', _24 => _24("text/css")]) ? response.text() : void 0;
|
|
496
|
+
})));
|
|
497
|
+
const stylesheets = [];
|
|
498
|
+
for (const source of readFarmPageStylesheets(html, pageUrl)) {
|
|
499
|
+
const css = await _asyncNullishCoalesce(source.inline, async () => ( await load(source.href)));
|
|
500
|
+
if (css === void 0) {
|
|
501
|
+
const tree2 = {
|
|
502
|
+
version: 1,
|
|
503
|
+
root: { type: "View", tag: "#root" },
|
|
504
|
+
unsupported: [`stylesheet "${source.href}" could not be read`]
|
|
505
|
+
};
|
|
506
|
+
return new Response(JSON.stringify(tree2), {
|
|
507
|
+
headers: {
|
|
508
|
+
"Content-Type": `${_chunk3HLQTOVUcjs.FARM_NATIVE_TREE_CONTENT_TYPE}; charset=utf-8`,
|
|
509
|
+
Vary: "Accept"
|
|
510
|
+
}
|
|
511
|
+
});
|
|
512
|
+
}
|
|
513
|
+
stylesheets.push(css);
|
|
514
|
+
}
|
|
515
|
+
const tree = createFarmNativeTree(html, pageUrl, stylesheets);
|
|
373
516
|
const out = new Headers({
|
|
374
517
|
"Content-Type": `${_chunk3HLQTOVUcjs.FARM_NATIVE_TREE_CONTENT_TYPE}; charset=utf-8`,
|
|
375
518
|
Vary: "Accept",
|
|
376
519
|
"Cache-Control": _nullishCoalesce(page.headers.get("cache-control"), () => ( "no-store"))
|
|
377
520
|
});
|
|
378
|
-
for (const cookie of _nullishCoalesce(_optionalChain([page, 'access',
|
|
521
|
+
for (const cookie of _nullishCoalesce(_optionalChain([page, 'access', _25 => _25.headers, 'access', _26 => _26.getSetCookie, 'optionalCall', _27 => _27()]), () => ( []))) out.append("Set-Cookie", cookie);
|
|
379
522
|
return new Response(options.request.method === "HEAD" ? null : JSON.stringify(tree), {
|
|
380
523
|
status: 200,
|
|
381
524
|
headers: out
|
|
@@ -386,4 +529,5 @@ async function createFarmNativeTreeResponse(options) {
|
|
|
386
529
|
|
|
387
530
|
|
|
388
531
|
|
|
389
|
-
|
|
532
|
+
|
|
533
|
+
exports.createFarmNativeTree = createFarmNativeTree; exports.readFarmPageStylesheets = readFarmPageStylesheets; exports.farmRequestWantsNativeTree = farmRequestWantsNativeTree; exports.createFarmNativeTreeResponse = createFarmNativeTreeResponse;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 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
|
-
var
|
|
3
|
+
var _chunkQMNWKQL4cjs = require('./chunk-QMNWKQL4.cjs');
|
|
4
4
|
|
|
5
5
|
// src/server/dev-loopback.ts
|
|
6
6
|
var _net = require('net'); var _net2 = _interopRequireDefault(_net);
|
|
@@ -30,7 +30,7 @@ async function listenOnOtherLoopback(server) {
|
|
|
30
30
|
const listening = await new Promise((resolve) => {
|
|
31
31
|
const onError = (error) => {
|
|
32
32
|
if (error.code === "EADDRINUSE") {
|
|
33
|
-
|
|
33
|
+
_chunkQMNWKQL4cjs.logger.warn(
|
|
34
34
|
`Another process is listening on ${formatHost(other)}:${address.port}; the dev server answers on ${formatHost(address.address)}:${address.port} only.`
|
|
35
35
|
);
|
|
36
36
|
}
|
|
@@ -43,7 +43,7 @@ async function listenOnOtherLoopback(server) {
|
|
|
43
43
|
});
|
|
44
44
|
});
|
|
45
45
|
if (!listening) return;
|
|
46
|
-
loopback.on("error", (error) =>
|
|
46
|
+
loopback.on("error", (error) => _chunkQMNWKQL4cjs.logger.warn(`Dev loopback listener failed: ${String(error)}`));
|
|
47
47
|
httpServer.once("close", () => loopback.close());
|
|
48
48
|
}
|
|
49
49
|
function formatHost(address) {
|
|
@@ -7,7 +7,7 @@ var _chunk2KMIJDY6cjs = require('./chunk-2KMIJDY6.cjs');
|
|
|
7
7
|
var _chunkSHIWRBFIcjs = require('./chunk-SHIWRBFI.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkQMNWKQL4cjs = require('./chunk-QMNWKQL4.cjs');
|
|
11
11
|
|
|
12
12
|
// src/cron.ts
|
|
13
13
|
var DEFAULT_FARM_CRON_SECRET_ENV = "CRON_SECRET";
|
|
@@ -67,7 +67,7 @@ async function prepareFarmCronForNitro(config) {
|
|
|
67
67
|
const wrapperNames = resolveCronWrapperFileNames(cron.jobs.map((job) => job.name));
|
|
68
68
|
for (const job of cron.jobs) {
|
|
69
69
|
const taskName = getFarmCronTaskName(job.name);
|
|
70
|
-
const wrapperPath =
|
|
70
|
+
const wrapperPath = _chunkQMNWKQL4cjs.toPosixPath.call(void 0, path.join(generatedDir, `${wrapperNames.get(job.name)}.mjs`));
|
|
71
71
|
await fs.writeFile(wrapperPath, createNitroCronTaskWrapper(job, cron.secretEnv), "utf8");
|
|
72
72
|
tasks[taskName] = {
|
|
73
73
|
handler: wrapperPath,
|
|
@@ -164,14 +164,45 @@ function isCronRequestAuthorized(request, options = {}) {
|
|
|
164
164
|
return _chunkSHIWRBFIcjs.farmSecretsMatch.call(void 0, bearer, secret) || _chunkSHIWRBFIcjs.farmSecretsMatch.call(void 0, headerSecret, secret);
|
|
165
165
|
}
|
|
166
166
|
function cronRoute(handler, options = {}) {
|
|
167
|
+
if (isFarmEndpoint(handler)) return guardCronEndpoint(handler, options);
|
|
168
|
+
const route = handler;
|
|
167
169
|
return (request, ...args) => {
|
|
168
170
|
if (!isCronRequestAuthorized(request, options)) {
|
|
169
|
-
return Promise.resolve(
|
|
170
|
-
Response.json({ error: "Unauthorized cron request." }, { status: 401 })
|
|
171
|
-
);
|
|
171
|
+
return Promise.resolve(unauthorizedCronResponse());
|
|
172
172
|
}
|
|
173
|
-
return
|
|
173
|
+
return route(request, ...args);
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
function unauthorizedCronResponse() {
|
|
177
|
+
return Response.json({ error: "Unauthorized cron request." }, { status: 401 });
|
|
178
|
+
}
|
|
179
|
+
function isFarmEndpoint(value) {
|
|
180
|
+
return typeof value === "function" && typeof value.__handler === "function";
|
|
181
|
+
}
|
|
182
|
+
var FUNCTION_OWN_KEYS = /* @__PURE__ */ new Set(["length", "name", "prototype", "arguments", "caller"]);
|
|
183
|
+
function guardCronEndpoint(endpoint, options) {
|
|
184
|
+
const allowed = (context) => {
|
|
185
|
+
const request = _optionalChain([context, 'optionalAccess', _4 => _4.request]);
|
|
186
|
+
return typeof _optionalChain([request, 'optionalAccess', _5 => _5.headers, 'optionalAccess', _6 => _6.get]) === "function" && isCronRequestAuthorized(request, options);
|
|
174
187
|
};
|
|
188
|
+
const guarded = function(context) {
|
|
189
|
+
return allowed(context) ? endpoint.call(this, context) : Promise.resolve(unauthorizedCronResponse());
|
|
190
|
+
};
|
|
191
|
+
for (const key of Reflect.ownKeys(endpoint)) {
|
|
192
|
+
if (typeof key === "string" && FUNCTION_OWN_KEYS.has(key)) continue;
|
|
193
|
+
Object.defineProperty(guarded, key, Object.getOwnPropertyDescriptor(endpoint, key));
|
|
194
|
+
}
|
|
195
|
+
guarded.__handler = (context) => allowed(context) ? endpoint.__handler(context) : unauthorizedCronResponse();
|
|
196
|
+
const invoke = endpoint.__farmInvoke;
|
|
197
|
+
if (invoke) {
|
|
198
|
+
guarded.__farmInvoke = (context) => allowed(context) ? invoke(context) : {
|
|
199
|
+
result: unauthorizedCronResponse(),
|
|
200
|
+
context: context.context,
|
|
201
|
+
handlerExecuted: false,
|
|
202
|
+
invalidations: []
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
return guarded;
|
|
175
206
|
}
|
|
176
207
|
function normalizeCronJob(name, job) {
|
|
177
208
|
if (!/^[a-zA-Z0-9][a-zA-Z0-9._-]*$/.test(name)) {
|
|
@@ -192,7 +223,7 @@ function normalizeCronJob(name, job) {
|
|
|
192
223
|
name,
|
|
193
224
|
schedule,
|
|
194
225
|
path,
|
|
195
|
-
description: _optionalChain([job, 'access',
|
|
226
|
+
description: _optionalChain([job, 'access', _7 => _7.description, 'optionalAccess', _8 => _8.trim, 'call', _9 => _9()]) || void 0
|
|
196
227
|
};
|
|
197
228
|
}
|
|
198
229
|
function normalizeCronPath(name, value) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkQMNWKQL4cjs = require('./chunk-QMNWKQL4.cjs');
|
|
4
4
|
|
|
5
5
|
// src/routing/route-slots.ts
|
|
6
6
|
var SLOT_SEGMENT = /^@([A-Za-z][A-Za-z0-9_-]*)$/;
|
|
@@ -38,8 +38,8 @@ function parseRouteSlotFile(filePath) {
|
|
|
38
38
|
].join("/");
|
|
39
39
|
return {
|
|
40
40
|
name,
|
|
41
|
-
ownerRoute:
|
|
42
|
-
route:
|
|
41
|
+
ownerRoute: _chunkQMNWKQL4cjs.parseRoutePath.call(void 0, ownerFile || "layout.tsx"),
|
|
42
|
+
route: _chunkQMNWKQL4cjs.parseRoutePath.call(void 0, routeFile || "page.tsx"),
|
|
43
43
|
interception: marker !== null,
|
|
44
44
|
fallback: baseName === "default"
|
|
45
45
|
};
|