@farm.js/core 0.1.48 → 0.1.50
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-DAjB8Eyu.d.ts → agent-mcp-9BMbRgg_.d.ts} +1 -1
- package/dist/{agent-mcp-CXN3g0eX.d.mts → agent-mcp-CIMH324y.d.mts} +1 -1
- package/dist/agent-runtime.cjs +3 -3
- package/dist/agent-runtime.d.mts +6 -6
- package/dist/agent-runtime.d.ts +6 -6
- package/dist/agent-runtime.mjs +2 -2
- package/dist/analyzer-CN7C74WX.cjs +1066 -0
- package/dist/analyzer-DDW34OMC.mjs +1066 -0
- package/dist/api/client.d.mts +0 -1
- package/dist/api/client.d.ts +0 -1
- package/dist/api/route-manager.cjs +5 -5
- package/dist/api/route-manager.d.mts +10 -10
- package/dist/api/route-manager.d.ts +10 -10
- package/dist/api/route-manager.mjs +4 -4
- package/dist/api/runtime.cjs +3 -3
- package/dist/api/runtime.d.mts +7 -7
- package/dist/api/runtime.d.ts +7 -7
- package/dist/api/runtime.mjs +2 -2
- package/dist/api.cjs +6 -6
- package/dist/api.d.mts +10 -10
- package/dist/api.d.ts +10 -10
- package/dist/api.mjs +5 -5
- package/dist/{app-VK9sHDn5.d.ts → app-BWibTHVT.d.ts} +7 -7
- package/dist/{app-DytgRPjJ.d.mts → app-DVJ13FPA.d.mts} +7 -7
- package/dist/{app-manifest-DPgW5ke5.d.mts → app-manifest-CQDJOKL2.d.mts} +1 -1
- package/dist/{app-manifest-BUu7YGAx.d.ts → app-manifest-D0kaXdwu.d.ts} +1 -1
- package/dist/app-markdown.d.mts +7 -7
- package/dist/app-markdown.d.ts +7 -7
- package/dist/cache.d.mts +4 -3
- package/dist/cache.d.ts +4 -3
- package/dist/{chunk-VJXLUTBM.mjs → chunk-2DEPNLXK.mjs} +7 -7
- package/dist/chunk-2G63BIRL.mjs +227 -0
- package/dist/chunk-2GLQSIZD.mjs +55 -0
- package/dist/{chunk-HRLYO2XJ.mjs → chunk-2VCC3GVC.mjs} +1 -1
- package/dist/chunk-3ATXWZPH.cjs +227 -0
- package/dist/{chunk-YSPMY4B7.cjs → chunk-474FO3UE.cjs} +233 -157
- package/dist/{chunk-QNQEK3OF.cjs → chunk-4T25YCZ5.cjs} +14 -14
- package/dist/{chunk-ATHPRVP2.mjs → chunk-5V4KZOZO.mjs} +1 -1
- package/dist/{chunk-FGJQS4EC.cjs → chunk-6QA2SXVH.cjs} +2 -2
- package/dist/{chunk-XLYXG73A.mjs → chunk-75WWOZ5C.mjs} +22 -0
- package/dist/{chunk-QFQDRJKJ.mjs → chunk-76R5GJER.mjs} +2 -2
- package/dist/{chunk-NG44F7AH.mjs → chunk-7ONZDKVY.mjs} +2 -2
- package/dist/{chunk-MZZA6ZQV.mjs → chunk-7PZVXMWG.mjs} +4 -4
- package/dist/{chunk-4IICUBQX.cjs → chunk-A5BJKSZE.cjs} +2 -2
- package/dist/{chunk-TTYXOAB7.mjs → chunk-ANHZ6SUL.mjs} +1 -1
- package/dist/{chunk-ZBS3GOQZ.cjs → chunk-AQLHD6HZ.cjs} +35 -61
- package/dist/{chunk-Q2ZKQ6GD.cjs → chunk-B5S2JS6M.cjs} +127 -125
- package/dist/{chunk-AXRNEVCS.cjs → chunk-B6PREBN6.cjs} +8 -8
- package/dist/{chunk-JOHXK4BB.mjs → chunk-BW6SCVYX.mjs} +1 -1
- package/dist/{chunk-LZBM35DH.mjs → chunk-C73RIAEF.mjs} +4 -4
- package/dist/chunk-CGCJ2TJU.cjs +55 -0
- package/dist/{chunk-UYQOIPXE.mjs → chunk-CPXDDWGL.mjs} +1 -1
- package/dist/{chunk-JPAVNDZH.cjs → chunk-CY7H5KS4.cjs} +25 -25
- package/dist/{chunk-4S7M63WX.cjs → chunk-DGOLAZLV.cjs} +22 -1
- package/dist/{chunk-73XBJRZW.cjs → chunk-E2BMCNMJ.cjs} +2 -2
- package/dist/{chunk-WUEDTW6E.cjs → chunk-F5LERVY3.cjs} +23 -5
- package/dist/{chunk-A7DK663W.cjs → chunk-FACTMUPI.cjs} +27 -27
- package/dist/chunk-G2KTRMWA.mjs +40 -0
- package/dist/{chunk-C6U66WWF.mjs → chunk-GFT5AHAT.mjs} +13 -0
- package/dist/{chunk-ZGS3ZDF7.cjs → chunk-GOOK2J2W.cjs} +7 -7
- package/dist/{chunk-NW2BKDVT.mjs → chunk-HHFMECFO.mjs} +1 -1
- package/dist/{chunk-6M3HXUBQ.mjs → chunk-HWCHIBJZ.mjs} +21 -3
- package/dist/{chunk-HUL4LTC6.cjs → chunk-HYN3LLG7.cjs} +63 -20
- package/dist/{chunk-HELQXYVI.cjs → chunk-I2DQGS56.cjs} +11 -9
- package/dist/{chunk-SSNN55Q6.cjs → chunk-IQXGHGZF.cjs} +5 -5
- package/dist/{chunk-ZSIGEHSE.cjs → chunk-IUBDMDZZ.cjs} +21 -180
- package/dist/{chunk-TQWGOQ7O.mjs → chunk-IWJKJDNW.mjs} +116 -40
- package/dist/{chunk-NRFUVDTH.mjs → chunk-JJOWY3XD.mjs} +2 -2
- package/dist/{chunk-6XFGJBYX.cjs → chunk-JYNNIGQO.cjs} +16 -7
- package/dist/{chunk-XO6WL6NL.mjs → chunk-KGP76FSV.mjs} +1 -1
- package/dist/{chunk-GXSMF7UR.mjs → chunk-KO2NWUKN.mjs} +1 -1
- package/dist/{chunk-VDLF2DJA.cjs → chunk-KZH6YLND.cjs} +375 -162
- package/dist/{chunk-5566GNEG.cjs → chunk-LIFUPCXW.cjs} +13 -0
- package/dist/{chunk-I2SWKWO7.mjs → chunk-LJDIFIJ2.mjs} +1 -1
- package/dist/{chunk-KZT2VHRQ.cjs → chunk-LYWAGXXW.cjs} +11 -11
- package/dist/{chunk-N6SIQJEJ.mjs → chunk-M7LKA632.mjs} +54 -11
- package/dist/{chunk-6LH33DLL.cjs → chunk-NJVFPJ2Y.cjs} +2 -2
- package/dist/{chunk-JWP56HCP.mjs → chunk-OD6WM3I7.mjs} +2 -2
- package/dist/{chunk-MJ6IC4K2.mjs → chunk-OTOOJIUB.mjs} +1 -1
- package/dist/{chunk-TFA6BUAE.cjs → chunk-OY5XDG24.cjs} +4 -4
- package/dist/{chunk-R2SEZEBC.cjs → chunk-OYNNA4DD.cjs} +4 -4
- package/dist/{chunk-GBPDSUFE.mjs → chunk-OZK2DS44.mjs} +1 -1
- package/dist/chunk-QXJADAQB.cjs +40 -0
- package/dist/{chunk-JLS6ZLFM.cjs → chunk-RHOR2J6V.cjs} +1 -1
- package/dist/{chunk-YQGZLCT4.cjs → chunk-RWT2BTJT.cjs} +6 -6
- package/dist/{chunk-3HBFI373.cjs → chunk-S5AQ7CAC.cjs} +14 -14
- package/dist/{chunk-HNAUK3SC.mjs → chunk-SHJJM6OG.mjs} +40 -199
- package/dist/{chunk-LL7TDMOM.mjs → chunk-SMUW7UST.mjs} +33 -59
- package/dist/{chunk-VCFBQFOV.mjs → chunk-SN5VSO3Q.mjs} +9 -7
- package/dist/{chunk-DM3TFCC2.cjs → chunk-SUV6YO4Q.cjs} +5 -5
- package/dist/{chunk-JUMPFVMK.mjs → chunk-TUOO6IK3.mjs} +9 -0
- package/dist/chunk-UB7RVEMX.mjs +73 -0
- package/dist/{chunk-CDTIXBKN.mjs → chunk-UN6N623E.mjs} +2 -2
- package/dist/{chunk-BEXYFR2R.cjs → chunk-UY6HS5PF.cjs} +2 -2
- package/dist/{chunk-HAH4FBTA.mjs → chunk-VAHBCI6X.mjs} +1 -1
- package/dist/{chunk-C2R5RVLA.cjs → chunk-VCKGOXFI.cjs} +73 -1
- package/dist/{chunk-N25RPPO5.cjs → chunk-WAPQWAE6.cjs} +10 -10
- package/dist/{chunk-NE33FRQ5.mjs → chunk-WVBUXNBX.mjs} +274 -61
- package/dist/{chunk-ALD2WMLA.mjs → chunk-WXHDVXJE.mjs} +2 -2
- package/dist/{chunk-EVCQX243.cjs → chunk-X2EL3BLH.cjs} +2 -2
- package/dist/{chunk-EA5PMJDU.mjs → chunk-X3HOVNHI.mjs} +1 -1
- package/dist/{chunk-XXB37YET.cjs → chunk-XLRLSTJ6.cjs} +7 -7
- package/dist/{chunk-DRFADSKY.mjs → chunk-XXXRRVY6.mjs} +4 -4
- package/dist/{chunk-EXHEPWFJ.cjs → chunk-YAXOEAND.cjs} +10 -10
- package/dist/{chunk-PEHL3IZL.cjs → chunk-YB44NKC2.cjs} +2 -2
- package/dist/chunk-YKHRCY4T.cjs +73 -0
- package/dist/{chunk-NIPKC4DA.mjs → chunk-ZIBIE7AH.mjs} +72 -0
- package/dist/{chunk-N7SPZJLY.mjs → chunk-ZLOQQ2UF.mjs} +33 -31
- package/dist/client/lifecycle.d.mts +1 -1
- package/dist/client/lifecycle.d.ts +1 -1
- package/dist/{client-plugins-DqjCsKMN.d.ts → client-plugins-BPfltM5m.d.ts} +19 -10
- package/dist/{client-plugins-BlEzV5FO.d.mts → client-plugins-D4RO59f0.d.mts} +19 -10
- package/dist/client-plugins.d.mts +6 -6
- package/dist/client-plugins.d.ts +6 -6
- package/dist/client.cjs +11 -8
- package/dist/client.d.mts +11 -10
- package/dist/client.d.ts +11 -10
- package/dist/client.mjs +12 -9
- package/dist/client.react-server.mjs +1 -1
- package/dist/config-CnhyvvmT.d.mts +188 -0
- package/dist/config-CnhyvvmT.d.ts +188 -0
- package/dist/config.d.mts +6 -6
- package/dist/config.d.ts +6 -6
- package/dist/desktop.d.mts +7 -7
- package/dist/desktop.d.ts +7 -7
- package/dist/{dev-guard-MPZUJFIV.mjs → dev-guard-4PFQNXQX.mjs} +4 -2
- package/dist/{dev-guard-4NQ3LFO5.cjs → dev-guard-YLO5DE3H.cjs} +7 -5
- package/dist/{devtools-A37WWJZL.cjs → devtools-N5XTOECL.cjs} +8 -8
- package/dist/{devtools-BLKHPY3C.mjs → devtools-STG7HPRV.mjs} +7 -7
- package/dist/docs.cjs +10 -10
- package/dist/docs.d.mts +7 -7
- package/dist/docs.d.ts +7 -7
- package/dist/docs.mjs +9 -9
- package/dist/environment/vite.d.mts +1 -1
- package/dist/environment/vite.d.ts +1 -1
- package/dist/generate-route-types-DQP0cUzk.d.ts +33 -0
- package/dist/generate-route-types-TF5Wwtvz.d.mts +33 -0
- package/dist/i18n/client.d.mts +2 -2
- package/dist/i18n/client.d.ts +2 -2
- package/dist/i18n/index.d.mts +3 -3
- package/dist/i18n/index.d.ts +3 -3
- package/dist/i18n/server.d.mts +5 -5
- package/dist/i18n/server.d.ts +5 -5
- package/dist/image/server.cjs +3 -3
- package/dist/image/server.mjs +2 -2
- package/dist/image/sharp.cjs +10 -10
- package/dist/image/sharp.mjs +2 -2
- package/dist/{index-CMigAr9f.d.mts → index-C-N3Pwg-.d.ts} +2 -2
- package/dist/{index-MocnSP3a.d.ts → index-D3l4tREW.d.ts} +2 -2
- package/dist/{index-Cl3akY5U.d.mts → index-DPUAPho_.d.mts} +2 -2
- package/dist/{index-n3hjOvVC.d.ts → index-k8o8eUOd.d.mts} +2 -2
- package/dist/index.cjs +73 -66
- package/dist/index.d.mts +29 -45
- package/dist/index.d.ts +29 -45
- package/dist/index.mjs +78 -71
- package/dist/integrations.cjs +3 -3
- package/dist/integrations.d.mts +6 -6
- package/dist/integrations.d.ts +6 -6
- package/dist/integrations.mjs +2 -2
- package/dist/internal/app-markdown-runtime.d.mts +7 -7
- package/dist/internal/app-markdown-runtime.d.ts +7 -7
- package/dist/internal/build-runtime.cjs +36 -32
- package/dist/internal/build-runtime.d.mts +9 -9
- package/dist/internal/build-runtime.d.ts +9 -9
- package/dist/internal/build-runtime.mjs +35 -31
- package/dist/internal/cli-runtime.cjs +16 -15
- package/dist/internal/cli-runtime.mjs +16 -15
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/client-runtime.cjs +19 -2
- package/dist/internal/client-runtime.d.mts +45 -3
- package/dist/internal/client-runtime.d.ts +45 -3
- package/dist/internal/client-runtime.mjs +19 -2
- package/dist/internal/compression-runtime.d.mts +6 -6
- package/dist/internal/compression-runtime.d.ts +6 -6
- package/dist/internal/config-runtime.cjs +17 -10
- package/dist/internal/config-runtime.d.mts +259 -18
- package/dist/internal/config-runtime.d.ts +259 -18
- package/dist/internal/config-runtime.mjs +15 -8
- package/dist/internal/desktop-guard.cjs +2 -2
- package/dist/internal/desktop-guard.d.mts +7 -0
- package/dist/internal/desktop-guard.d.ts +7 -0
- package/dist/internal/desktop-guard.mjs +1 -1
- package/dist/internal/form-actions.cjs +4 -4
- package/dist/internal/form-actions.mjs +3 -3
- package/dist/internal/infra-analytics-runtime.cjs +6 -6
- package/dist/internal/infra-analytics-runtime.mjs +4 -4
- package/dist/internal/islands-runtime.cjs +4 -1
- package/dist/internal/islands-runtime.d.mts +9 -12
- package/dist/internal/islands-runtime.d.ts +9 -12
- package/dist/internal/islands-runtime.mjs +5 -2
- package/dist/internal/metadata-image-runtime.cjs +3 -3
- package/dist/internal/metadata-image-runtime.mjs +2 -2
- package/dist/internal/product-telemetry-runtime.cjs +2 -2
- package/dist/internal/product-telemetry-runtime.mjs +1 -1
- package/dist/internal/production-runtime.cjs +13 -13
- package/dist/internal/production-runtime.d.mts +19 -19
- package/dist/internal/production-runtime.d.ts +19 -19
- package/dist/internal/production-runtime.mjs +15 -15
- package/dist/{layers-D9fbe-rz.d.ts → layers-CcS42OGR.d.mts} +1 -1
- package/dist/{layers-D9fbe-rz.d.mts → layers-CcS42OGR.d.ts} +1 -1
- package/dist/{lifecycle-DK06VuKP.d.ts → lifecycle-C2aLBOwu.d.mts} +1 -1
- package/dist/{lifecycle-DK06VuKP.d.mts → lifecycle-C2aLBOwu.d.ts} +1 -1
- package/dist/markdown.d.mts +6 -6
- package/dist/markdown.d.ts +6 -6
- package/dist/middleware.cjs +7 -7
- package/dist/middleware.d.mts +8 -8
- package/dist/middleware.d.ts +8 -8
- package/dist/middleware.mjs +6 -6
- package/dist/mobile.cjs +9 -0
- package/dist/mobile.d.mts +67 -0
- package/dist/mobile.d.ts +67 -0
- package/dist/mobile.mjs +9 -0
- package/dist/navigation-delegate-8xg3Zvp4.d.ts +29 -0
- package/dist/navigation-delegate-ji6elCKy.d.mts +29 -0
- package/dist/navigation.cjs +5 -5
- package/dist/navigation.d.mts +9 -9
- package/dist/navigation.d.ts +9 -9
- package/dist/navigation.mjs +4 -4
- package/dist/{nitro-UT2J5A5D.mjs → nitro-2Q5NVY7L.mjs} +2 -2
- package/dist/{nitro-BIXIKJZS.cjs → nitro-YPSZBYDK.cjs} +3 -3
- package/dist/platform.cjs +2 -1
- package/dist/platform.d.mts +4 -3
- package/dist/platform.d.ts +4 -3
- package/dist/platform.mjs +2 -1
- package/dist/{plugin-4KYXV7BB.mjs → plugin-53SY5YBS.mjs} +1 -1
- package/dist/{plugin-WBANOZQM.cjs → plugin-HZIBL3DW.cjs} +2 -2
- package/dist/plugin.cjs +31 -29
- package/dist/plugin.d.mts +13 -8
- package/dist/plugin.d.ts +13 -8
- package/dist/plugin.mjs +30 -28
- package/dist/{production-runtime-bWZJMcQb.d.mts → production-runtime-DXnQQkQf.d.mts} +3 -3
- package/dist/{production-runtime-YVDGYWBG.d.ts → production-runtime-TdKaYRj0.d.ts} +3 -3
- package/dist/production-vite-BQFAlG7n.d.mts +13 -0
- package/dist/production-vite-BQFAlG7n.d.ts +13 -0
- package/dist/{programmatic-routes-client-DviwGeAv.d.ts → programmatic-routes-client-BwiTndEC.d.ts} +2 -2
- package/dist/{programmatic-routes-client-BFKOTEXN.d.mts → programmatic-routes-client-Dh1SDLSM.d.mts} +2 -2
- package/dist/query/client.cjs +6 -6
- package/dist/query/client.mjs +2 -2
- package/dist/{render-plan-DqWXo3-B.d.ts → render-plan-BPbwRbuN.d.ts} +1 -1
- package/dist/{render-plan-CS8l0zaK.d.mts → render-plan-BvCGXF6K.d.mts} +1 -1
- package/dist/renderer-client.cjs +9 -6
- package/dist/renderer-client.d.mts +9 -8
- package/dist/renderer-client.d.ts +9 -8
- package/dist/renderer-client.mjs +6 -3
- package/dist/{request-CBrHpaCC.d.ts → request-B8PGTZNR.d.ts} +1 -1
- package/dist/{request-D4XqmnJF.d.mts → request-C_xTkJib.d.mts} +1 -1
- package/dist/request.d.mts +7 -7
- package/dist/request.d.ts +7 -7
- package/dist/{resolver-DC57A4vz.d.ts → resolver-CJ-D9nP-.d.ts} +1 -1
- package/dist/{resolver-C2G-3Tm6.d.mts → resolver-TDyZKgKI.d.mts} +1 -1
- package/dist/{route-rendering-3pRPtyO2.d.mts → route-rendering-DlddURL1.d.mts} +1 -1
- package/dist/{route-rendering-Bltnu8a3.d.ts → route-rendering-RNtcj607.d.ts} +1 -1
- package/dist/{router-BFSmKGtI.d.mts → router-B97eB0Mq.d.mts} +1 -1
- package/dist/{router-DDT7bkg7.d.ts → router-qUVaoEN8.d.ts} +1 -1
- package/dist/routes-8PT9cl60.d.ts +121 -0
- package/dist/routes-kEUsXHx3.d.mts +121 -0
- package/dist/routes.d.mts +6 -6
- package/dist/routes.d.ts +6 -6
- package/dist/{rsc-pipeline-4KOITP64.cjs → rsc-pipeline-L4XOZ2TE.cjs} +13 -10
- package/dist/{rsc-pipeline-ULFIB3UT.mjs → rsc-pipeline-T3775JUA.mjs} +12 -9
- package/dist/runtime-BIBGJO7V.cjs +1005 -0
- package/dist/{runtime-B9HmxiZc.d.ts → runtime-C4CmlOOh.d.ts} +2 -2
- package/dist/{runtime-C6yG64je.d.ts → runtime-C8GUnNeP.d.ts} +1 -1
- package/dist/{runtime-Cpylaypt.d.mts → runtime-CaDswfWi.d.mts} +1 -1
- package/dist/{runtime-CCxTmGuf.d.mts → runtime-CihDZ2Rn.d.mts} +2 -2
- package/dist/runtime-HRSFC4ZC.mjs +1005 -0
- package/dist/{schema-dev-notice-O3I5HLXK.mjs → schema-dev-notice-LZ5NXGLN.mjs} +2 -2
- package/dist/{schema-dev-notice-Z73J3NJ6.cjs → schema-dev-notice-XV7GZ3QJ.cjs} +4 -4
- package/dist/server-action-security.cjs +3 -3
- package/dist/server-action-security.mjs +2 -2
- package/dist/server-fn-client.d.mts +0 -1
- package/dist/server-fn-client.d.ts +0 -1
- package/dist/server-fn.cjs +4 -4
- package/dist/server-fn.d.mts +0 -1
- package/dist/server-fn.d.ts +0 -1
- package/dist/server-fn.mjs +3 -3
- package/dist/server-plugins.cjs +1 -1
- package/dist/server-plugins.d.mts +7 -7
- package/dist/server-plugins.d.ts +7 -7
- package/dist/server-plugins.mjs +1 -1
- package/dist/server-query-client.d.mts +0 -1
- package/dist/server-query-client.d.ts +0 -1
- package/dist/server-query.cjs +5 -5
- package/dist/server-query.d.mts +0 -1
- package/dist/server-query.d.ts +0 -1
- package/dist/server-query.mjs +4 -4
- package/dist/server.cjs +89 -66
- package/dist/server.d.mts +22 -17
- package/dist/server.d.ts +22 -17
- package/dist/server.mjs +64 -41
- package/dist/{spa-router-CkTPnA4L.d.mts → spa-router-Dlv5ofg0.d.mts} +4 -4
- package/dist/{spa-router-CKuS81mi.d.ts → spa-router-qapSboKz.d.ts} +4 -4
- package/dist/testing.cjs +7 -7
- package/dist/testing.d.mts +6 -6
- package/dist/testing.d.ts +6 -6
- package/dist/testing.mjs +5 -5
- package/dist/{types--Wh02r5_.d.mts → types-C41ePjvP.d.mts} +1 -1
- package/dist/{types--Wh02r5_.d.ts → types-C41ePjvP.d.ts} +1 -1
- package/dist/{utils-C0ORLYXc.d.ts → utils-A-cYF81u.d.ts} +1 -1
- package/dist/{utils-IA9wVkef.d.mts → utils-DyvlSxFk.d.mts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +31 -29
- package/dist/vite.d.mts +9 -9
- package/dist/vite.d.ts +9 -9
- package/dist/vite.mjs +30 -28
- package/dist/{workflows-Df1C_7OG.d.mts → workflows-CRMzQZ3k.d.mts} +2 -1
- package/dist/{workflows-Df1C_7OG.d.ts → workflows-CRMzQZ3k.d.ts} +2 -1
- package/dist/workflows.cjs +3 -3
- package/dist/workflows.d.mts +1 -1
- package/dist/workflows.d.ts +1 -1
- package/dist/workflows.mjs +2 -2
- package/package.json +10 -2
- package/dist/cache-invalidation-BD0z_lfu.d.mts +0 -4
- package/dist/cache-invalidation-BD0z_lfu.d.ts +0 -4
- package/dist/chunk-45EUIICW.mjs +0 -15
- package/dist/chunk-V7KTQR4C.cjs +0 -15
- package/dist/{chunk-BR5FSKZ5.cjs → chunk-EQWWOQTK.cjs} +0 -0
- package/dist/{chunk-5OJVKXFV.cjs → chunk-N7JQXQAV.cjs} +2 -2
- package/dist/{chunk-VR4SEDEM.mjs → chunk-VOZ5DI7D.mjs} +0 -0
- package/dist/{chunk-72KABRWN.mjs → chunk-WSDKXV4E.mjs} +4 -4
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkX2EL3BLHcjs = require('./chunk-X2EL3BLH.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
var _chunkV3UOEWCBcjs = require('./chunk-V3UOEWCB.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkLYWAGXXWcjs = require('./chunk-LYWAGXXW.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
@@ -26,7 +26,7 @@ function hasFarmDocsRuntimeAdapter(docs) {
|
|
|
26
26
|
}
|
|
27
27
|
function assertFarmDocsAdapterServesNoGuardedPages(docs, options, isPathGuarded) {
|
|
28
28
|
if (!isPathGuarded || !hasFarmDocsRuntimeAdapter(docs)) return;
|
|
29
|
-
const guarded =
|
|
29
|
+
const guarded = _chunkX2EL3BLHcjs.discoverFarmDocsPages.call(void 0, _chunkX2EL3BLHcjs.resolveFarmDocsContentDir.call(void 0, docs, options), docs).filter((page) => isPathGuarded(page.href) || isPathGuarded(_chunkX2EL3BLHcjs.getFarmDocsMarkdownPath.call(void 0, page.href))).map((page) => page.href);
|
|
30
30
|
if (guarded.length === 0) return;
|
|
31
31
|
throw new Error(
|
|
32
32
|
`Docs pages behind a path guard (${guarded.join(", ")}) would be public: the docs adapter ${JSON.stringify(docs.adapter.id)} serves their content in llms-full.txt, search, Markdown, and MCP without running the app's guards. Move those pages out of the docs content directory, or set docs.adapter = false to use Farm's built-in docs runtime, which keeps guarded pages off anonymous surfaces.`
|
|
@@ -44,7 +44,7 @@ function createFarmDocsAdapterRuntimeConfig(docs, options, moduleConfig) {
|
|
|
44
44
|
...moduleConfig ? { ...moduleConfig, ...docs.configOverrides } : _nullishCoalesce(docs.runtimeConfig, () => ( docs.config)),
|
|
45
45
|
entry: docs.config.entry || docs.entry.replace(/^\/+|\/+$/g, "") || "docs",
|
|
46
46
|
docsPath: docs.entry,
|
|
47
|
-
contentDir:
|
|
47
|
+
contentDir: _chunkX2EL3BLHcjs.resolveFarmDocsContentDir.call(void 0, docs, options)
|
|
48
48
|
};
|
|
49
49
|
}
|
|
50
50
|
function getFarmDocsAdapterStylesheets(options) {
|
|
@@ -260,22 +260,22 @@ function getDocsDescription(docs) {
|
|
|
260
260
|
return _optionalChain([docs, 'access', _11 => _11.config, 'access', _12 => _12.metadata, 'optionalAccess', _13 => _13.description]);
|
|
261
261
|
}
|
|
262
262
|
function getLoadedDocsPages(context) {
|
|
263
|
-
return
|
|
263
|
+
return _chunkX2EL3BLHcjs.discoverFarmDocsPages.call(void 0, context.contentDir, context.docs).filter((page) => !context.isPathGuarded(page.href)).map((page) => _chunkX2EL3BLHcjs.loadFarmDocsPage.call(void 0, context.contentDir, context.docs, page.slug)).filter((page) => Boolean(page));
|
|
264
264
|
}
|
|
265
265
|
function toDocsSourcePage(page) {
|
|
266
266
|
return {
|
|
267
|
-
...
|
|
267
|
+
..._chunkX2EL3BLHcjs.toFarmDocsMarkdownPage.call(void 0, page),
|
|
268
268
|
sourcePath: page.sourcePath
|
|
269
269
|
};
|
|
270
270
|
}
|
|
271
271
|
function toDocsSitemapPage(page) {
|
|
272
272
|
return {
|
|
273
|
-
...
|
|
273
|
+
..._chunkX2EL3BLHcjs.toFarmDocsMarkdownPage.call(void 0, page),
|
|
274
274
|
sourcePath: page.sourcePath
|
|
275
275
|
};
|
|
276
276
|
}
|
|
277
277
|
function toDocsLlmsPage(page) {
|
|
278
|
-
return
|
|
278
|
+
return _chunkX2EL3BLHcjs.toFarmDocsMarkdownPage.call(void 0, page);
|
|
279
279
|
}
|
|
280
280
|
function getDocsLlmsOptions(context, request) {
|
|
281
281
|
const configured = isRecord(context.docs.config.llmsTxt) ? context.docs.config.llmsTxt : {};
|
|
@@ -362,7 +362,7 @@ function renderAgentsDocument(context, request) {
|
|
|
362
362
|
function buildAgentSpec(context, request) {
|
|
363
363
|
const url = new URL(request.url);
|
|
364
364
|
const origin = url.origin;
|
|
365
|
-
const pages =
|
|
365
|
+
const pages = _chunkX2EL3BLHcjs.discoverFarmDocsPages.call(void 0, context.contentDir, context.docs).filter(
|
|
366
366
|
(page) => !context.isPathGuarded(page.href)
|
|
367
367
|
);
|
|
368
368
|
const spec = _chunkV3UOEWCBcjs.docsEngine.call(void 0, ).buildDocsAgentDiscoverySpec(getDocsDiscoveryOptions(context, request));
|
|
@@ -450,7 +450,7 @@ function buildPublicConfig(context) {
|
|
|
450
450
|
};
|
|
451
451
|
}
|
|
452
452
|
function buildDiagnostics(context) {
|
|
453
|
-
const pages =
|
|
453
|
+
const pages = _chunkX2EL3BLHcjs.discoverFarmDocsPages.call(void 0, context.contentDir, context.docs);
|
|
454
454
|
const diagnostics = _chunkV3UOEWCBcjs.docsEngine.call(void 0, ).buildDocsDiagnostics(context.docs.config, {
|
|
455
455
|
entry: context.docs.entry,
|
|
456
456
|
mcp: {
|
|
@@ -520,13 +520,13 @@ async function resolveAPIContext(options) {
|
|
|
520
520
|
config: options.config,
|
|
521
521
|
configPath: options.configPath
|
|
522
522
|
}));
|
|
523
|
-
const docs = isResolvedDocsConfig(docsInput) ? docsInput : await
|
|
523
|
+
const docs = isResolvedDocsConfig(docsInput) ? docsInput : await _chunkLYWAGXXWcjs.resolveDocsConfig.call(void 0, docsInput, { root, srcDir });
|
|
524
524
|
const guardedPaths = new Set(_nullishCoalesce(_optionalChain([runtimeConfig, 'optionalAccess', _20 => _20.guardedPaths]), () => ( [])));
|
|
525
525
|
return {
|
|
526
526
|
root,
|
|
527
527
|
srcDir,
|
|
528
528
|
docs,
|
|
529
|
-
contentDir:
|
|
529
|
+
contentDir: _chunkX2EL3BLHcjs.resolveFarmDocsContentDir.call(void 0, docs, { root, srcDir }),
|
|
530
530
|
diagnostics: options.diagnostics === true,
|
|
531
531
|
isPathGuarded: _nullishCoalesce(options.isPathGuarded, () => ( ((pathname) => guardedPaths.has(pathname))))
|
|
532
532
|
};
|
|
@@ -585,12 +585,12 @@ async function handleDocsAPIGet(request, context) {
|
|
|
585
585
|
if (format === "markdown" || url.pathname.endsWith(".md")) {
|
|
586
586
|
const pathParam = url.searchParams.get("path") || url.searchParams.get("slug");
|
|
587
587
|
const slug = normalizeDocsApiSlug(_nullishCoalesce(_nullishCoalesce(pathParam, () => ( pathTarget.slug)), () => ( "")), context.docs);
|
|
588
|
-
const page =
|
|
588
|
+
const page = _chunkX2EL3BLHcjs.loadFarmDocsPage.call(void 0, context.contentDir, context.docs, slug);
|
|
589
589
|
if (!page || context.isPathGuarded(page.href)) {
|
|
590
590
|
return text("Docs page not found\n", "text/plain; charset=utf-8", { status: 404 });
|
|
591
591
|
}
|
|
592
592
|
return text(
|
|
593
|
-
_chunkV3UOEWCBcjs.docsEngine.call(void 0, ).renderDocsMarkdownDocument(
|
|
593
|
+
_chunkV3UOEWCBcjs.docsEngine.call(void 0, ).renderDocsMarkdownDocument(_chunkX2EL3BLHcjs.toFarmDocsMarkdownPage.call(void 0, page), {
|
|
594
594
|
origin: new URL(request.url).origin,
|
|
595
595
|
llms: getDocsLlmsOptions(context, request),
|
|
596
596
|
sitemap: context.docs.config.sitemap
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
var _chunkFEFCISOXcjs = require('./chunk-FEFCISOX.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkLIFUPCXWcjs = require('./chunk-LIFUPCXW.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
@@ -94,7 +94,7 @@ function resolveServerActionsConfig(config) {
|
|
|
94
94
|
const allowedOrigins = (_nullishCoalesce(_optionalChain([config, 'optionalAccess', _ => _.allowedOrigins]), () => ( []))).map(
|
|
95
95
|
(value) => _chunkFEFCISOXcjs.normalizeAllowedOriginPattern.call(void 0, value, SERVER_ACTION_ALLOWED_ORIGINS_LABEL)
|
|
96
96
|
);
|
|
97
|
-
const bodySizeLimit =
|
|
97
|
+
const bodySizeLimit = _chunkLIFUPCXWcjs.parseBodySizeLimit.call(void 0,
|
|
98
98
|
_nullishCoalesce(_optionalChain([config, 'optionalAccess', _2 => _2.bodySizeLimit]), () => ( DEFAULT_SERVER_ACTION_BODY_SIZE_LIMIT)),
|
|
99
99
|
"serverActions.bodySizeLimit"
|
|
100
100
|
);
|
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
import {
|
|
2
|
+
resolveFarmPlatform
|
|
3
|
+
} from "./chunk-SMUW7UST.mjs";
|
|
4
|
+
|
|
5
|
+
// src/desktop/dev-guard-plugin.ts
|
|
6
|
+
function farmDesktopDevGuardPlugin(basePath) {
|
|
7
|
+
return {
|
|
8
|
+
name: "farm:desktop-dev-guard",
|
|
9
|
+
enforce: "pre",
|
|
10
|
+
apply: "serve",
|
|
11
|
+
configureServer: {
|
|
12
|
+
order: "pre",
|
|
13
|
+
async handler(server) {
|
|
14
|
+
if (resolveFarmPlatform() !== "desktop") return;
|
|
15
|
+
const { createFarmDesktopDevGuard } = await import("./dev-guard-4PFQNXQX.mjs");
|
|
16
|
+
server.middlewares.use(createFarmDesktopDevGuard(server, { basePath: basePath || "" }));
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
|
|
1
22
|
// src/react-refresh.ts
|
|
2
23
|
import { createRequire } from "module";
|
|
3
24
|
import { pathToFileURL } from "url";
|
|
@@ -81,6 +102,7 @@ async function createFarmReactRefreshPlugins() {
|
|
|
81
102
|
}
|
|
82
103
|
|
|
83
104
|
export {
|
|
105
|
+
farmDesktopDevGuardPlugin,
|
|
84
106
|
isFarmReactRefreshActive,
|
|
85
107
|
loadFarmReactPlugin,
|
|
86
108
|
createFarmReactRefreshPlugins
|
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
loadFarmDocsPage,
|
|
5
5
|
resolveFarmDocsContentDir,
|
|
6
6
|
toFarmDocsMarkdownPage
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-KO2NWUKN.mjs";
|
|
8
8
|
import {
|
|
9
9
|
docsEngine,
|
|
10
10
|
loadFarmDocsEngine
|
|
11
11
|
} from "./chunk-VE3FWJBO.mjs";
|
|
12
12
|
import {
|
|
13
13
|
resolveDocsConfig
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-2DEPNLXK.mjs";
|
|
15
15
|
import {
|
|
16
16
|
getFarmDocsAdapterConfigModule,
|
|
17
17
|
isSecretDocsConfigKey
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
_runServerFunctionForCaller,
|
|
5
5
|
createServerFn,
|
|
6
6
|
createServerFunctionDescriptor
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-CPXDDWGL.mjs";
|
|
8
8
|
import {
|
|
9
9
|
createFarmServerQueryResult
|
|
10
10
|
} from "./chunk-N7XWC6BN.mjs";
|
|
11
11
|
import {
|
|
12
12
|
getServerActionExecutionContext
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-BW6SCVYX.mjs";
|
|
14
14
|
import {
|
|
15
15
|
createRouteDataCacheTag,
|
|
16
16
|
getFarmDataCache
|
|
@@ -56,8 +56,8 @@ function createFarmDesktopGuard(options) {
|
|
|
56
56
|
if (options.secret === options.handshakeToken) {
|
|
57
57
|
throw new TypeError("[Farm] The desktop secret and handshake token must be different values.");
|
|
58
58
|
}
|
|
59
|
-
const { secret } = options;
|
|
60
|
-
|
|
59
|
+
const { secret, handshakeToken } = options;
|
|
60
|
+
const handshakeState = options.handshakeState ?? {};
|
|
61
61
|
const basePath = normalizeBasePath(options.basePath);
|
|
62
62
|
const handshakePath = `${basePath}${FARM_DESKTOP_HANDSHAKE_PATH}`;
|
|
63
63
|
const home = `${basePath}/`;
|
|
@@ -81,10 +81,10 @@ function createFarmDesktopGuard(options) {
|
|
|
81
81
|
if (pathname === handshakePath) {
|
|
82
82
|
if (method !== "GET") return forbidden("handshake must be a GET");
|
|
83
83
|
const token = new URLSearchParams(search).get(FARM_DESKTOP_HANDSHAKE_PARAM) ?? "";
|
|
84
|
-
if (
|
|
84
|
+
if (handshakeState.handshakeUsed || !farmSecretsMatch(token, handshakeToken)) {
|
|
85
85
|
return forbidden("invalid or used handshake token");
|
|
86
86
|
}
|
|
87
|
-
|
|
87
|
+
handshakeState.handshakeUsed = true;
|
|
88
88
|
return new Response(null, {
|
|
89
89
|
status: 303,
|
|
90
90
|
headers: {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var _chunkUNJZGVPUcjs = require('./chunk-UNJZGVPU.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkLIFUPCXWcjs = require('./chunk-LIFUPCXW.cjs');
|
|
7
7
|
|
|
8
8
|
// src/image-pattern.ts
|
|
9
9
|
var compiledPatterns = /* @__PURE__ */ new WeakMap();
|
|
@@ -582,7 +582,7 @@ function createOptimizedImageResponse(request, image) {
|
|
|
582
582
|
// document, it still cannot run script or load anything.
|
|
583
583
|
"content-security-policy": "default-src 'none'; sandbox"
|
|
584
584
|
});
|
|
585
|
-
if (
|
|
585
|
+
if (_chunkLIFUPCXWcjs.matchesFarmIfNoneMatch.call(void 0, request.headers.get("if-none-match"), image.etag)) {
|
|
586
586
|
headers.delete("content-length");
|
|
587
587
|
return new Response(null, { status: 304, headers });
|
|
588
588
|
}
|
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
var _chunkYKHRCY4Tcjs = require('./chunk-YKHRCY4T.cjs');
|
|
9
|
+
|
|
10
|
+
// src/desktop/config.ts
|
|
2
11
|
var _fs = require('fs');
|
|
3
12
|
var _path = require('path'); var path = _interopRequireWildcard(_path);
|
|
4
13
|
var FARM_PLATFORM_ENV = "FARM_PLATFORM";
|
|
@@ -9,33 +18,18 @@ function setFarmDesktopDevSession(session) {
|
|
|
9
18
|
else delete store[FARM_DESKTOP_DEV_SESSION];
|
|
10
19
|
}
|
|
11
20
|
function resolveFarmPlatform(env = process.env) {
|
|
12
|
-
|
|
21
|
+
const value = env[FARM_PLATFORM_ENV];
|
|
22
|
+
return value === "desktop" || value === "mobile" ? value : "web";
|
|
13
23
|
}
|
|
14
24
|
var DESKTOP_KEYS = /* @__PURE__ */ new Set(["name", "id", "version", "icon", "window", "shell"]);
|
|
15
25
|
var WINDOW_KEYS = /* @__PURE__ */ new Set(["width", "height", "title"]);
|
|
16
26
|
var APP_ID = /^[A-Za-z][A-Za-z0-9-]*(?:\.[A-Za-z0-9][A-Za-z0-9-]*)+$/;
|
|
17
27
|
var SHELL_NAME = /^[a-z][a-z0-9-]*$/;
|
|
18
28
|
var SHELL_PACKAGE = /^(?:@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*(?:\/[a-z0-9][a-z0-9._-]*)*$/;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
throw new TypeError(`${failPrefix}: ${message}`);
|
|
22
|
-
}
|
|
23
|
-
function isPlainObject(value) {
|
|
24
|
-
return !!value && typeof value === "object" && !Array.isArray(value);
|
|
29
|
+
function desktopChecker(context) {
|
|
30
|
+
return _chunkYKHRCY4Tcjs.createPlatformBlockChecker.call(void 0, context ? `desktop (os: ${context.os})` : "desktop");
|
|
25
31
|
}
|
|
26
|
-
function
|
|
27
|
-
for (const key of Object.keys(value)) {
|
|
28
|
-
if (!allowed.has(key)) {
|
|
29
|
-
fail(`unknown option ${where}${key}. Supported: ${[...allowed].join(", ")}.`);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
function optionalString(value, key) {
|
|
34
|
-
if (value === void 0) return void 0;
|
|
35
|
-
if (typeof value !== "string" || !value.trim()) fail(`${key} must be a non-empty string.`);
|
|
36
|
-
return value.trim();
|
|
37
|
-
}
|
|
38
|
-
function optionalSize(value, key) {
|
|
32
|
+
function optionalSize({ fail }, value, key) {
|
|
39
33
|
if (value === void 0) return void 0;
|
|
40
34
|
if (typeof value !== "number" || !Number.isInteger(value) || value < 100 || value > 16384) {
|
|
41
35
|
fail(`${key} must be a whole number of points between 100 and 16384.`);
|
|
@@ -43,9 +37,13 @@ function optionalSize(value, key) {
|
|
|
43
37
|
return value;
|
|
44
38
|
}
|
|
45
39
|
function validateFarmDesktopConfig(input, context) {
|
|
46
|
-
|
|
40
|
+
const check = desktopChecker(context);
|
|
41
|
+
const { checkKeys, optionalString } = check;
|
|
42
|
+
function fail(message) {
|
|
43
|
+
return check.fail(message);
|
|
44
|
+
}
|
|
47
45
|
if (input === void 0) return void 0;
|
|
48
|
-
if (!isPlainObject(input)) {
|
|
46
|
+
if (!_chunkYKHRCY4Tcjs.isPlainObject.call(void 0, input)) {
|
|
49
47
|
fail(
|
|
50
48
|
context ? 'the function must return an object, such as { name: "Notes" }.' : 'must be an object, such as { name: "Notes" }, or a function that returns one.'
|
|
51
49
|
);
|
|
@@ -62,10 +60,10 @@ function validateFarmDesktopConfig(input, context) {
|
|
|
62
60
|
fail(`icon must be a PNG file, such as "src/app-icon.png", got "${icon}".`);
|
|
63
61
|
}
|
|
64
62
|
if (input.window !== void 0) {
|
|
65
|
-
if (!isPlainObject(input.window)) fail("window must be an object, such as { width: 1024 }.");
|
|
63
|
+
if (!_chunkYKHRCY4Tcjs.isPlainObject.call(void 0, input.window)) fail("window must be an object, such as { width: 1024 }.");
|
|
66
64
|
checkKeys(input.window, WINDOW_KEYS, "window.");
|
|
67
|
-
optionalSize(input.window.width, "window.width");
|
|
68
|
-
optionalSize(input.window.height, "window.height");
|
|
65
|
+
optionalSize(check, input.window.width, "window.width");
|
|
66
|
+
optionalSize(check, input.window.height, "window.height");
|
|
69
67
|
optionalString(input.window.title, "window.title");
|
|
70
68
|
}
|
|
71
69
|
const shell = optionalString(input.shell, "shell");
|
|
@@ -77,14 +75,6 @@ function validateFarmDesktopConfig(input, context) {
|
|
|
77
75
|
}
|
|
78
76
|
return input;
|
|
79
77
|
}
|
|
80
|
-
function readPackageJson(root) {
|
|
81
|
-
try {
|
|
82
|
-
const parsed = JSON.parse(_fs.readFileSync.call(void 0, path.join(root, "package.json"), "utf8"));
|
|
83
|
-
return isPlainObject(parsed) ? parsed : {};
|
|
84
|
-
} catch (e) {
|
|
85
|
-
return {};
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
78
|
function slug(value) {
|
|
89
79
|
return value.replace(/^@[^/]+\//, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || "app";
|
|
90
80
|
}
|
|
@@ -93,12 +83,13 @@ function resolveFarmDesktopShellPackage(shell) {
|
|
|
93
83
|
}
|
|
94
84
|
function resolveFarmDesktopConfig(input, root, context) {
|
|
95
85
|
const config = _nullishCoalesce(validateFarmDesktopConfig(input, context), () => ( {}));
|
|
96
|
-
const pkg =
|
|
97
|
-
const packageName =
|
|
86
|
+
const pkg = _chunkYKHRCY4Tcjs.readAppPackageJson.call(void 0, root);
|
|
87
|
+
const packageName = _chunkYKHRCY4Tcjs.resolveAppPackageName.call(void 0, root, pkg);
|
|
98
88
|
const name = _optionalChain([config, 'access', _ => _.name, 'optionalAccess', _2 => _2.trim, 'call', _3 => _3()]) || packageName || "Farm App";
|
|
99
89
|
const shell = _optionalChain([config, 'access', _4 => _4.shell, 'optionalAccess', _5 => _5.trim, 'call', _6 => _6()]) || "electrobun";
|
|
100
90
|
const icon = config.icon ? path.resolve(root, config.icon.trim()) : void 0;
|
|
101
|
-
if (icon && !_fs.existsSync.call(void 0, icon))
|
|
91
|
+
if (icon && !_fs.existsSync.call(void 0, icon))
|
|
92
|
+
desktopChecker(context).fail(`icon ${config.icon} was not found in ${root}.`);
|
|
102
93
|
return {
|
|
103
94
|
name,
|
|
104
95
|
id: _optionalChain([config, 'access', _7 => _7.id, 'optionalAccess', _8 => _8.trim, 'call', _9 => _9()]) || `local.farm.${slug(name)}`,
|
|
@@ -132,10 +123,7 @@ function createFarmDesktopContext(options) {
|
|
|
132
123
|
if (!DESKTOP_OS.has(os)) {
|
|
133
124
|
throw new TypeError(`--os must be macos, windows, or linux, got "${os}".`);
|
|
134
125
|
}
|
|
135
|
-
const profile =
|
|
136
|
-
if (typeof profile !== "string" || !/^[A-Za-z0-9][A-Za-z0-9._-]*$/.test(profile)) {
|
|
137
|
-
throw new TypeError(`--profile must be a name such as "beta", got "${String(profile)}".`);
|
|
138
|
-
}
|
|
126
|
+
const profile = _chunkYKHRCY4Tcjs.resolvePlatformProfile.call(void 0, options.profile);
|
|
139
127
|
return Object.freeze({
|
|
140
128
|
os,
|
|
141
129
|
mode: options.mode,
|
|
@@ -146,26 +134,12 @@ function createFarmDesktopContext(options) {
|
|
|
146
134
|
});
|
|
147
135
|
}
|
|
148
136
|
async function resolveFarmDesktopBlock(input, context, cache) {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
context.os,
|
|
156
|
-
context.mode,
|
|
157
|
-
context.command,
|
|
158
|
-
context.profile,
|
|
159
|
-
context.root,
|
|
160
|
-
String(input)
|
|
161
|
-
].join("\0");
|
|
162
|
-
let resolved = cache.get(key);
|
|
163
|
-
if (!resolved) {
|
|
164
|
-
resolved = call();
|
|
165
|
-
cache.set(key, resolved);
|
|
166
|
-
resolved.catch(() => cache.delete(key));
|
|
167
|
-
}
|
|
168
|
-
return resolved;
|
|
137
|
+
return _chunkYKHRCY4Tcjs.resolvePlatformBlock.call(void 0,
|
|
138
|
+
input,
|
|
139
|
+
context,
|
|
140
|
+
(value, ctx) => _nullishCoalesce(validateFarmDesktopConfig(value, ctx), () => ( {})),
|
|
141
|
+
cache
|
|
142
|
+
);
|
|
169
143
|
}
|
|
170
144
|
var FARM_DESKTOP_SETUP = /* @__PURE__ */ Symbol.for("@farm.js/core/desktop-setup");
|
|
171
145
|
async function createFarmDesktopSetup(userConfig, root, mode, options, cache) {
|