@farm.js/core 0.1.0-beta.6 → 0.1.0-beta.8
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/after.cjs +227 -0
- package/dist/after.cjs.map +1 -0
- package/dist/after.d.mts +25 -0
- package/dist/after.d.ts +25 -0
- package/dist/after.mjs +14 -0
- package/dist/after.mjs.map +1 -0
- package/dist/agent-runtime.cjs +2379 -0
- package/dist/agent-runtime.cjs.map +1 -0
- package/dist/agent-runtime.d.mts +94 -0
- package/dist/agent-runtime.d.ts +94 -0
- package/dist/agent-runtime.mjs +479 -0
- package/dist/agent-runtime.mjs.map +1 -0
- package/dist/api/route-manager.d.mts +66 -0
- package/dist/api/route-manager.d.ts +66 -0
- package/dist/api/runtime.d.mts +3 -0
- package/dist/api/runtime.d.ts +3 -0
- package/dist/api.cjs +4100 -0
- package/dist/api.cjs.map +1 -0
- package/dist/api.d.mts +48 -0
- package/dist/api.d.ts +48 -0
- package/dist/api.mjs +93 -0
- package/dist/api.mjs.map +1 -0
- package/dist/app-BWtqQu3R.d.mts +302 -0
- package/dist/app-markdown.cjs +244 -0
- package/dist/app-markdown.cjs.map +1 -0
- package/dist/app-markdown.d.mts +22 -0
- package/dist/app-markdown.d.ts +22 -0
- package/dist/app-markdown.mjs +27 -0
- package/dist/app-markdown.mjs.map +1 -0
- package/dist/app-xltejvLY.d.ts +302 -0
- package/dist/cache.cjs +945 -0
- package/dist/cache.cjs.map +1 -0
- package/dist/cache.d.mts +192 -0
- package/dist/cache.d.ts +192 -0
- package/dist/cache.mjs +46 -0
- package/dist/cache.mjs.map +1 -0
- package/dist/chunk-2ED5Q2GH.mjs +422 -0
- package/dist/chunk-2ED5Q2GH.mjs.map +1 -0
- package/dist/chunk-32W4QEJP.mjs +158 -0
- package/dist/chunk-32W4QEJP.mjs.map +1 -0
- package/dist/chunk-3XNTL3FQ.mjs +452 -0
- package/dist/chunk-3XNTL3FQ.mjs.map +1 -0
- package/dist/chunk-44ZCFSKE.mjs +84 -0
- package/dist/chunk-44ZCFSKE.mjs.map +1 -0
- package/dist/chunk-4MGVSBRP.mjs +7787 -0
- package/dist/chunk-4MGVSBRP.mjs.map +1 -0
- package/dist/chunk-4S3ORGFA.mjs +44 -0
- package/dist/chunk-4S3ORGFA.mjs.map +1 -0
- package/dist/chunk-5BY76U2M.mjs +1 -0
- package/dist/chunk-5BY76U2M.mjs.map +1 -0
- package/dist/chunk-5ZGPRGWV.mjs +136 -0
- package/dist/chunk-5ZGPRGWV.mjs.map +1 -0
- package/dist/chunk-65A7QIKI.mjs +142 -0
- package/dist/chunk-65A7QIKI.mjs.map +1 -0
- package/dist/chunk-74YTBPTY.mjs +450 -0
- package/dist/chunk-74YTBPTY.mjs.map +1 -0
- package/dist/chunk-7FBJLMQH.mjs +338 -0
- package/dist/chunk-7FBJLMQH.mjs.map +1 -0
- package/dist/chunk-7HO6AEOP.mjs +74 -0
- package/dist/chunk-7HO6AEOP.mjs.map +1 -0
- package/dist/chunk-7MABZJIM.mjs +29 -0
- package/dist/chunk-7MABZJIM.mjs.map +1 -0
- package/dist/chunk-7N62DNSO.mjs +41 -0
- package/dist/chunk-7N62DNSO.mjs.map +1 -0
- package/dist/chunk-7ZY5AIJO.mjs +161 -0
- package/dist/chunk-7ZY5AIJO.mjs.map +1 -0
- package/dist/chunk-ALCLXXTY.mjs +187 -0
- package/dist/chunk-ALCLXXTY.mjs.map +1 -0
- package/dist/chunk-AZ7YUVNR.mjs +65 -0
- package/dist/chunk-AZ7YUVNR.mjs.map +1 -0
- package/dist/chunk-B232I2GP.mjs +163 -0
- package/dist/chunk-B232I2GP.mjs.map +1 -0
- package/dist/chunk-B4W3BNTL.mjs +483 -0
- package/dist/chunk-B4W3BNTL.mjs.map +1 -0
- package/dist/chunk-C2ROET2V.mjs +718 -0
- package/dist/chunk-C2ROET2V.mjs.map +1 -0
- package/dist/chunk-CGILA3WO.mjs +14 -0
- package/dist/chunk-CGILA3WO.mjs.map +1 -0
- package/dist/chunk-CGIXMLSY.mjs +184 -0
- package/dist/chunk-CGIXMLSY.mjs.map +1 -0
- package/dist/chunk-DJSGLHCN.mjs +597 -0
- package/dist/chunk-DJSGLHCN.mjs.map +1 -0
- package/dist/chunk-E2MPIBRE.mjs +149 -0
- package/dist/chunk-E2MPIBRE.mjs.map +1 -0
- package/dist/chunk-E6EPN5BT.mjs +203 -0
- package/dist/chunk-E6EPN5BT.mjs.map +1 -0
- package/dist/chunk-EI43C4RA.mjs +6277 -0
- package/dist/chunk-EI43C4RA.mjs.map +1 -0
- package/dist/chunk-EJ7T4TPB.mjs +622 -0
- package/dist/chunk-EJ7T4TPB.mjs.map +1 -0
- package/dist/chunk-FQYDHKKU.mjs +128 -0
- package/dist/chunk-FQYDHKKU.mjs.map +1 -0
- package/dist/chunk-FRPWCMMG.mjs +299 -0
- package/dist/chunk-FRPWCMMG.mjs.map +1 -0
- package/dist/chunk-GN72QAIH.mjs +146 -0
- package/dist/chunk-GN72QAIH.mjs.map +1 -0
- package/dist/chunk-GQVGIUSN.mjs +149 -0
- package/dist/chunk-GQVGIUSN.mjs.map +1 -0
- package/dist/chunk-GS6K5OCM.mjs +407 -0
- package/dist/chunk-GS6K5OCM.mjs.map +1 -0
- package/dist/chunk-GXASWWJU.mjs +364 -0
- package/dist/chunk-GXASWWJU.mjs.map +1 -0
- package/dist/chunk-GY2STC2S.mjs +180 -0
- package/dist/chunk-GY2STC2S.mjs.map +1 -0
- package/dist/chunk-H2FA2SBS.mjs +51 -0
- package/dist/chunk-H2FA2SBS.mjs.map +1 -0
- package/dist/chunk-I4CUBGVF.mjs +93 -0
- package/dist/chunk-I4CUBGVF.mjs.map +1 -0
- package/dist/chunk-ITN462YM.mjs +98 -0
- package/dist/chunk-ITN462YM.mjs.map +1 -0
- package/dist/chunk-J23HNLFY.mjs +72 -0
- package/dist/chunk-J23HNLFY.mjs.map +1 -0
- package/dist/chunk-J4FNJ5IU.mjs +179 -0
- package/dist/chunk-J4FNJ5IU.mjs.map +1 -0
- package/dist/chunk-J5YWQVI5.mjs +211 -0
- package/dist/chunk-J5YWQVI5.mjs.map +1 -0
- package/dist/chunk-JDEOUK5V.mjs +427 -0
- package/dist/chunk-JDEOUK5V.mjs.map +1 -0
- package/dist/chunk-JK25YEN6.mjs +219 -0
- package/dist/chunk-JK25YEN6.mjs.map +1 -0
- package/dist/chunk-K4667E2Q.mjs +1916 -0
- package/dist/chunk-K4667E2Q.mjs.map +1 -0
- package/dist/chunk-LGHEOHBU.mjs +218 -0
- package/dist/chunk-LGHEOHBU.mjs.map +1 -0
- package/dist/chunk-LM2YNO4U.mjs +24 -0
- package/dist/chunk-LM2YNO4U.mjs.map +1 -0
- package/dist/chunk-ME4MO2RJ.mjs +3540 -0
- package/dist/chunk-ME4MO2RJ.mjs.map +1 -0
- package/dist/chunk-MIUW47JX.mjs +639 -0
- package/dist/chunk-MIUW47JX.mjs.map +1 -0
- package/dist/chunk-NNLCAVB6.mjs +391 -0
- package/dist/chunk-NNLCAVB6.mjs.map +1 -0
- package/dist/chunk-P7QDS5AT.mjs +191 -0
- package/dist/chunk-P7QDS5AT.mjs.map +1 -0
- package/dist/chunk-PFE6GMNE.mjs +603 -0
- package/dist/chunk-PFE6GMNE.mjs.map +1 -0
- package/dist/chunk-QGOHVJ6J.mjs +63 -0
- package/dist/chunk-QGOHVJ6J.mjs.map +1 -0
- package/dist/chunk-QKVUNGAH.mjs +39 -0
- package/dist/chunk-QKVUNGAH.mjs.map +1 -0
- package/dist/chunk-QM746KUO.mjs +56 -0
- package/dist/chunk-QM746KUO.mjs.map +1 -0
- package/dist/chunk-QTZZ2ISQ.mjs +753 -0
- package/dist/chunk-QTZZ2ISQ.mjs.map +1 -0
- package/dist/chunk-RBRLLZL5.mjs +81 -0
- package/dist/chunk-RBRLLZL5.mjs.map +1 -0
- package/dist/chunk-RHIFZZUI.mjs +69 -0
- package/dist/chunk-RHIFZZUI.mjs.map +1 -0
- package/dist/chunk-RQ633A5I.mjs +187 -0
- package/dist/chunk-RQ633A5I.mjs.map +1 -0
- package/dist/chunk-SCFX4UTD.mjs +28 -0
- package/dist/chunk-SCFX4UTD.mjs.map +1 -0
- package/dist/chunk-SL6HTIOK.mjs +66 -0
- package/dist/chunk-SL6HTIOK.mjs.map +1 -0
- package/dist/chunk-SPBBQLXI.mjs +207 -0
- package/dist/chunk-SPBBQLXI.mjs.map +1 -0
- package/dist/chunk-SSA7THPX.mjs +10 -0
- package/dist/chunk-SSA7THPX.mjs.map +1 -0
- package/dist/chunk-T4QJQK76.mjs +459 -0
- package/dist/chunk-T4QJQK76.mjs.map +1 -0
- package/dist/chunk-TQAEEJB4.mjs +157 -0
- package/dist/chunk-TQAEEJB4.mjs.map +1 -0
- package/dist/chunk-UB5UOSHB.mjs +458 -0
- package/dist/chunk-UB5UOSHB.mjs.map +1 -0
- package/dist/chunk-USWZZUEH.mjs +25 -0
- package/dist/chunk-USWZZUEH.mjs.map +1 -0
- package/dist/chunk-UVCIEUJC.mjs +16 -0
- package/dist/chunk-UVCIEUJC.mjs.map +1 -0
- package/dist/chunk-UXUAWNO5.mjs +396 -0
- package/dist/chunk-UXUAWNO5.mjs.map +1 -0
- package/dist/chunk-V3XURYJO.mjs +756 -0
- package/dist/chunk-V3XURYJO.mjs.map +1 -0
- package/dist/chunk-V6WE6JSZ.mjs +352 -0
- package/dist/chunk-V6WE6JSZ.mjs.map +1 -0
- package/dist/chunk-V7RBCSDJ.mjs +170 -0
- package/dist/chunk-V7RBCSDJ.mjs.map +1 -0
- package/dist/chunk-VCANOYFI.mjs +588 -0
- package/dist/chunk-VCANOYFI.mjs.map +1 -0
- package/dist/chunk-VY2UYN5R.mjs +224 -0
- package/dist/chunk-VY2UYN5R.mjs.map +1 -0
- package/dist/chunk-W2CRQFF6.mjs +1352 -0
- package/dist/chunk-W2CRQFF6.mjs.map +1 -0
- package/dist/chunk-WDU6QXNK.mjs +872 -0
- package/dist/chunk-WDU6QXNK.mjs.map +1 -0
- package/dist/chunk-WZ5QFROO.mjs +23 -0
- package/dist/chunk-WZ5QFROO.mjs.map +1 -0
- package/dist/chunk-XIVV5IWN.mjs +541 -0
- package/dist/chunk-XIVV5IWN.mjs.map +1 -0
- package/dist/chunk-YW7OBE6Q.mjs +119 -0
- package/dist/chunk-YW7OBE6Q.mjs.map +1 -0
- package/dist/chunk-Z5CQMP54.mjs +365 -0
- package/dist/chunk-Z5CQMP54.mjs.map +1 -0
- package/dist/chunk-ZBE6MLHL.mjs +230 -0
- package/dist/chunk-ZBE6MLHL.mjs.map +1 -0
- package/dist/chunk-ZVWA4ZQ3.mjs +189 -0
- package/dist/chunk-ZVWA4ZQ3.mjs.map +1 -0
- package/dist/chunk-ZZ57EH5Z.mjs +173 -0
- package/dist/chunk-ZZ57EH5Z.mjs.map +1 -0
- package/dist/client-BT1mFQas.d.mts +447 -0
- package/dist/client-Nn0q4eO4.d.ts +447 -0
- package/dist/client-cache-CIlyBlmx.d.ts +6 -0
- package/dist/client-cache-D-EZ7XVW.d.mts +6 -0
- package/dist/client-plugins-BI2R6Eae.d.mts +1926 -0
- package/dist/client-plugins-DU9oMspX.d.ts +1926 -0
- package/dist/client-plugins.cjs +415 -0
- package/dist/client-plugins.cjs.map +1 -0
- package/dist/client-plugins.d.mts +22 -0
- package/dist/client-plugins.d.ts +22 -0
- package/dist/client-plugins.mjs +10 -0
- package/dist/client-plugins.mjs.map +1 -0
- package/dist/client.cjs +5402 -0
- package/dist/client.cjs.map +1 -0
- package/dist/client.d.mts +447 -0
- package/dist/client.d.ts +447 -0
- package/dist/client.mjs +110 -0
- package/dist/client.mjs.map +1 -0
- package/dist/config.cjs +38 -0
- package/dist/config.cjs.map +1 -0
- package/dist/config.d.mts +29 -0
- package/dist/config.d.ts +29 -0
- package/dist/config.mjs +10 -0
- package/dist/config.mjs.map +1 -0
- package/dist/cron.cjs +406 -0
- package/dist/cron.cjs.map +1 -0
- package/dist/cron.d.mts +78 -0
- package/dist/cron.d.ts +78 -0
- package/dist/cron.mjs +30 -0
- package/dist/cron.mjs.map +1 -0
- package/dist/deferred.cjs +438 -0
- package/dist/deferred.cjs.map +1 -0
- package/dist/deferred.d.mts +42 -0
- package/dist/deferred.d.ts +42 -0
- package/dist/deferred.mjs +28 -0
- package/dist/deferred.mjs.map +1 -0
- package/dist/deployment.cjs +199 -0
- package/dist/deployment.cjs.map +1 -0
- package/dist/deployment.d.mts +34 -0
- package/dist/deployment.d.ts +34 -0
- package/dist/deployment.mjs +38 -0
- package/dist/deployment.mjs.map +1 -0
- package/dist/devtools-REQTS3I7.mjs +371 -0
- package/dist/devtools-REQTS3I7.mjs.map +1 -0
- package/dist/devtools-client-3XRTBND5.mjs +216 -0
- package/dist/devtools-client-3XRTBND5.mjs.map +1 -0
- package/dist/devtools-ui-NJKFORTG.mjs +1349 -0
- package/dist/devtools-ui-NJKFORTG.mjs.map +1 -0
- package/dist/docs.cjs +5548 -0
- package/dist/docs.cjs.map +1 -0
- package/dist/docs.d.mts +69 -0
- package/dist/docs.d.ts +69 -0
- package/dist/docs.mjs +47 -0
- package/dist/docs.mjs.map +1 -0
- package/dist/env-types.cjs +232 -0
- package/dist/env-types.cjs.map +1 -0
- package/dist/env-types.d.mts +12 -0
- package/dist/env-types.d.ts +12 -0
- package/dist/env-types.mjs +11 -0
- package/dist/env-types.mjs.map +1 -0
- package/dist/env.cjs +215 -0
- package/dist/env.cjs.map +1 -0
- package/dist/env.d.mts +45 -0
- package/dist/env.d.ts +45 -0
- package/dist/env.mjs +22 -0
- package/dist/env.mjs.map +1 -0
- package/dist/environment/vite.d.mts +22 -0
- package/dist/environment/vite.d.ts +22 -0
- package/dist/environment.cjs +96 -0
- package/dist/environment.cjs.map +1 -0
- package/dist/environment.d.mts +18 -0
- package/dist/environment.d.ts +18 -0
- package/dist/environment.mjs +14 -0
- package/dist/environment.mjs.map +1 -0
- package/dist/headers.cjs +126 -0
- package/dist/headers.cjs.map +1 -0
- package/dist/headers.d.mts +22 -0
- package/dist/headers.d.ts +22 -0
- package/dist/headers.mjs +12 -0
- package/dist/headers.mjs.map +1 -0
- package/dist/i18n/client.d.mts +32 -0
- package/dist/i18n/client.d.ts +32 -0
- package/dist/i18n/index.d.mts +20 -0
- package/dist/i18n/index.d.ts +20 -0
- package/dist/i18n/server.d.mts +30 -0
- package/dist/i18n/server.d.ts +30 -0
- package/dist/image/server.d.mts +37 -0
- package/dist/image/server.d.ts +37 -0
- package/dist/image/sharp.d.mts +7 -0
- package/dist/image/sharp.d.ts +7 -0
- package/dist/image-config-Duob7wER.d.mts +50 -0
- package/dist/image-config-Duob7wER.d.ts +50 -0
- package/dist/image.cjs +209 -0
- package/dist/image.cjs.map +1 -0
- package/dist/image.d.mts +39 -0
- package/dist/image.d.ts +39 -0
- package/dist/image.mjs +165 -0
- package/dist/image.mjs.map +1 -0
- package/dist/index.cjs +42186 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.mts +454 -0
- package/dist/index.d.ts +454 -0
- package/dist/index.mjs +980 -0
- package/dist/index.mjs.map +1 -0
- package/dist/integration-api-CHT2OKAf.d.mts +93 -0
- package/dist/integration-api-CHT2OKAf.d.ts +93 -0
- package/dist/integration-orm-GQLGU66X.mjs +13 -0
- package/dist/integration-orm-GQLGU66X.mjs.map +1 -0
- package/dist/integrations.cjs +2820 -0
- package/dist/integrations.cjs.map +1 -0
- package/dist/integrations.d.mts +22 -0
- package/dist/integrations.d.ts +22 -0
- package/dist/integrations.mjs +51 -0
- package/dist/integrations.mjs.map +1 -0
- package/dist/internal/build-runtime.cjs +643 -322
- package/dist/internal/build-runtime.cjs.map +1 -1
- package/dist/internal/build-runtime.d.mts +39 -0
- package/dist/internal/build-runtime.d.ts +39 -0
- package/dist/internal/build-runtime.mjs +11 -10
- package/dist/internal/client-runtime.d.mts +2 -0
- package/dist/internal/client-runtime.d.ts +2 -0
- package/dist/internal/config-runtime.cjs +135 -39
- package/dist/internal/config-runtime.cjs.map +1 -1
- package/dist/internal/config-runtime.d.mts +39 -0
- package/dist/internal/config-runtime.d.ts +39 -0
- package/dist/internal/config-runtime.mjs +5 -4
- package/dist/internal/production-node-env.d.mts +12 -0
- package/dist/internal/production-node-env.d.ts +12 -0
- package/dist/internal/production-runtime.d.mts +39 -0
- package/dist/internal/production-runtime.d.ts +39 -0
- package/dist/layers-VWVDTPUZ.mjs +16 -0
- package/dist/layers-VWVDTPUZ.mjs.map +1 -0
- package/dist/manager-THKFTOFE.mjs +10 -0
- package/dist/manager-THKFTOFE.mjs.map +1 -0
- package/dist/markdown.cjs +364 -0
- package/dist/markdown.cjs.map +1 -0
- package/dist/markdown.d.mts +60 -0
- package/dist/markdown.d.ts +60 -0
- package/dist/markdown.mjs +18 -0
- package/dist/markdown.mjs.map +1 -0
- package/dist/metadata-Cm9ujH4I.d.ts +22 -0
- package/dist/metadata-DacXbnLA.d.mts +22 -0
- package/dist/middleware.cjs +2148 -0
- package/dist/middleware.cjs.map +1 -0
- package/dist/middleware.d.mts +164 -0
- package/dist/middleware.d.ts +164 -0
- package/dist/middleware.mjs +49 -0
- package/dist/middleware.mjs.map +1 -0
- package/dist/navigation-errors-Dvwpzaer.d.mts +13 -0
- package/dist/navigation-errors-Dvwpzaer.d.ts +13 -0
- package/dist/navigation.cjs +1329 -0
- package/dist/navigation.cjs.map +1 -0
- package/dist/navigation.d.mts +14 -0
- package/dist/navigation.d.ts +14 -0
- package/dist/navigation.mjs +33 -0
- package/dist/navigation.mjs.map +1 -0
- package/dist/nitro-QO5LV6QK.mjs +689 -0
- package/dist/nitro-QO5LV6QK.mjs.map +1 -0
- package/dist/observability.cjs +186 -0
- package/dist/observability.cjs.map +1 -0
- package/dist/observability.d.mts +335 -0
- package/dist/observability.d.ts +335 -0
- package/dist/observability.mjs +16 -0
- package/dist/observability.mjs.map +1 -0
- package/dist/params-BALtrRim.d.ts +15 -0
- package/dist/params-ry-lxqmy.d.mts +15 -0
- package/dist/plugin-BJDf43dc.d.mts +165 -0
- package/dist/plugin-BJDf43dc.d.ts +165 -0
- package/dist/plugin.cjs +23470 -0
- package/dist/plugin.cjs.map +1 -1
- package/dist/plugin.d.mts +22 -0
- package/dist/plugin.d.ts +22 -0
- package/dist/plugin.mjs +8 -7
- package/dist/production-runtime-4KKq1AVC.d.mts +79 -0
- package/dist/production-runtime-C_B79w2P.d.mts +28 -0
- package/dist/production-runtime-DDEM1D2q.d.ts +28 -0
- package/dist/production-runtime-DRsWDN2x.d.ts +79 -0
- package/dist/query/client.d.mts +61 -0
- package/dist/query/client.d.ts +61 -0
- package/dist/query/index.d.mts +90 -0
- package/dist/query/index.d.ts +90 -0
- package/dist/query/parsers.d.mts +25 -0
- package/dist/query/parsers.d.ts +25 -0
- package/dist/query/server.d.mts +55 -0
- package/dist/query/server.d.ts +55 -0
- package/dist/request-Dsq4kGW0.d.mts +6 -0
- package/dist/request-udtobOLv.d.ts +6 -0
- package/dist/request.d.mts +2 -0
- package/dist/request.d.ts +2 -0
- package/dist/resolver-DJqjLMg_.d.mts +14 -0
- package/dist/resolver-IH4RmPEl.d.ts +14 -0
- package/dist/route-runtime-DoOHzCAD.d.mts +38 -0
- package/dist/route-runtime-DoOHzCAD.d.ts +38 -0
- package/dist/router.d.mts +36 -0
- package/dist/router.d.ts +36 -0
- package/dist/routes.d.mts +224 -0
- package/dist/routes.d.ts +224 -0
- package/dist/runtime-9nQjVM7X.d.mts +206 -0
- package/dist/runtime-Cxpq6xZN.d.mts +27 -0
- package/dist/runtime-DgeS2skB.d.ts +206 -0
- package/dist/runtime-bv63eUiO.d.ts +27 -0
- package/dist/server-action-security.d.mts +43 -0
- package/dist/server-action-security.d.ts +43 -0
- package/dist/server-fn-client.d.mts +32 -0
- package/dist/server-fn-client.d.ts +32 -0
- package/dist/server-fn.d.mts +93 -0
- package/dist/server-fn.d.ts +93 -0
- package/dist/server-plugins.d.mts +55 -0
- package/dist/server-plugins.d.ts +55 -0
- package/dist/server-query-client.d.mts +50 -0
- package/dist/server-query-client.d.ts +50 -0
- package/dist/server-query.d.mts +36 -0
- package/dist/server-query.d.ts +36 -0
- package/dist/server.cjs +731 -447
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.mts +48 -0
- package/dist/server.d.ts +48 -0
- package/dist/server.mjs +9 -8
- package/dist/server.mjs.map +1 -1
- package/dist/storage.d.mts +52 -0
- package/dist/storage.d.ts +52 -0
- package/dist/testing.d.mts +101 -0
- package/dist/testing.d.ts +101 -0
- package/dist/transport-BmbGTXA5.d.mts +49 -0
- package/dist/transport-BmbGTXA5.d.ts +49 -0
- package/dist/types-BMxWr97v.d.mts +81 -0
- package/dist/types-BMxWr97v.d.ts +81 -0
- package/dist/types-C9N-nk5R.d.mts +53 -0
- package/dist/types-C9N-nk5R.d.ts +53 -0
- package/dist/types-D1A6-XvH.d.mts +73 -0
- package/dist/types-D1A6-XvH.d.ts +73 -0
- package/dist/utils-B-cUHwoK.d.ts +23 -0
- package/dist/utils-Cm41AefV.d.mts +23 -0
- package/dist/version.cjs +1 -1
- package/dist/version.cjs.map +1 -1
- package/dist/version.d.mts +3 -0
- package/dist/version.d.ts +3 -0
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +682 -437
- package/dist/vite.cjs.map +1 -1
- package/dist/vite.d.mts +22 -0
- package/dist/vite.d.ts +22 -0
- package/dist/vite.mjs +6 -5
- package/dist/workflows.d.mts +110 -0
- package/dist/workflows.d.ts +110 -0
- package/package.json +3 -2
- package/types/client.d.ts +1 -1
- package/types/image.d.ts +4 -0
- package/types/images.d.ts +59 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { aU as ResolvedFarmConfig } from '../client-plugins-BI2R6Eae.mjs';
|
|
2
|
+
export { a5 as loadConfig, a4 as resolveConfig, a6 as resolveDeployConfig } from '../client-plugins-BI2R6Eae.mjs';
|
|
3
|
+
import { FarmProductionViteRuntime } from './config-runtime.mjs';
|
|
4
|
+
export { l as logger } from '../utils-Cm41AefV.mjs';
|
|
5
|
+
import '../plugin-BJDf43dc.mjs';
|
|
6
|
+
import 'react';
|
|
7
|
+
import 'http';
|
|
8
|
+
import '../types-D1A6-XvH.mjs';
|
|
9
|
+
import 'db0';
|
|
10
|
+
import 'unstorage';
|
|
11
|
+
import '../integration-api-CHT2OKAf.mjs';
|
|
12
|
+
import '@farming-labs/orm';
|
|
13
|
+
import '../types-C9N-nk5R.mjs';
|
|
14
|
+
import '@farming-labs/docs';
|
|
15
|
+
import '../markdown.mjs';
|
|
16
|
+
import '../observability.mjs';
|
|
17
|
+
import 'vite';
|
|
18
|
+
import '../workflows.mjs';
|
|
19
|
+
import '../cron.mjs';
|
|
20
|
+
import '../env.mjs';
|
|
21
|
+
import '../server-action-security.mjs';
|
|
22
|
+
import '../image-config-Duob7wER.mjs';
|
|
23
|
+
import '../types-BMxWr97v.mjs';
|
|
24
|
+
import '../cache.mjs';
|
|
25
|
+
import '../route-runtime-DoOHzCAD.mjs';
|
|
26
|
+
|
|
27
|
+
interface BuildOptions {
|
|
28
|
+
preset?: string;
|
|
29
|
+
root?: string;
|
|
30
|
+
universal?: boolean;
|
|
31
|
+
/** @internal Production Vite preload started by the CLI. */
|
|
32
|
+
productionVite?: FarmProductionViteRuntime | Promise<FarmProductionViteRuntime>;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Build Farm.js application for production
|
|
36
|
+
*/
|
|
37
|
+
declare function build(config: ResolvedFarmConfig, options?: BuildOptions): Promise<void>;
|
|
38
|
+
|
|
39
|
+
export { build };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { aU as ResolvedFarmConfig } from '../client-plugins-DU9oMspX.js';
|
|
2
|
+
export { a5 as loadConfig, a4 as resolveConfig, a6 as resolveDeployConfig } from '../client-plugins-DU9oMspX.js';
|
|
3
|
+
import { FarmProductionViteRuntime } from './config-runtime.js';
|
|
4
|
+
export { l as logger } from '../utils-B-cUHwoK.js';
|
|
5
|
+
import '../plugin-BJDf43dc.js';
|
|
6
|
+
import 'react';
|
|
7
|
+
import 'http';
|
|
8
|
+
import '../types-D1A6-XvH.js';
|
|
9
|
+
import 'db0';
|
|
10
|
+
import 'unstorage';
|
|
11
|
+
import '../integration-api-CHT2OKAf.js';
|
|
12
|
+
import '@farming-labs/orm';
|
|
13
|
+
import '../types-C9N-nk5R.js';
|
|
14
|
+
import '@farming-labs/docs';
|
|
15
|
+
import '../markdown.js';
|
|
16
|
+
import '../observability.js';
|
|
17
|
+
import 'vite';
|
|
18
|
+
import '../workflows.js';
|
|
19
|
+
import '../cron.js';
|
|
20
|
+
import '../env.js';
|
|
21
|
+
import '../server-action-security.js';
|
|
22
|
+
import '../image-config-Duob7wER.js';
|
|
23
|
+
import '../types-BMxWr97v.js';
|
|
24
|
+
import '../cache.js';
|
|
25
|
+
import '../route-runtime-DoOHzCAD.js';
|
|
26
|
+
|
|
27
|
+
interface BuildOptions {
|
|
28
|
+
preset?: string;
|
|
29
|
+
root?: string;
|
|
30
|
+
universal?: boolean;
|
|
31
|
+
/** @internal Production Vite preload started by the CLI. */
|
|
32
|
+
productionVite?: FarmProductionViteRuntime | Promise<FarmProductionViteRuntime>;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Build Farm.js application for production
|
|
36
|
+
*/
|
|
37
|
+
declare function build(config: ResolvedFarmConfig, options?: BuildOptions): Promise<void>;
|
|
38
|
+
|
|
39
|
+
export { build };
|
|
@@ -1,35 +1,36 @@
|
|
|
1
1
|
import {
|
|
2
2
|
build
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-EI43C4RA.mjs";
|
|
4
4
|
import "../chunk-SL6HTIOK.mjs";
|
|
5
5
|
import "../chunk-4S3ORGFA.mjs";
|
|
6
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-ME4MO2RJ.mjs";
|
|
7
7
|
import "../chunk-V7RBCSDJ.mjs";
|
|
8
8
|
import "../chunk-QM746KUO.mjs";
|
|
9
9
|
import {
|
|
10
10
|
loadConfig,
|
|
11
11
|
resolveConfig,
|
|
12
12
|
resolveDeployConfig
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-B4W3BNTL.mjs";
|
|
14
14
|
import "../chunk-UVCIEUJC.mjs";
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
17
|
-
import "../chunk-
|
|
15
|
+
import "../chunk-DJSGLHCN.mjs";
|
|
16
|
+
import "../chunk-RQ633A5I.mjs";
|
|
17
|
+
import "../chunk-4MGVSBRP.mjs";
|
|
18
18
|
import "../chunk-LGHEOHBU.mjs";
|
|
19
19
|
import "../chunk-FRPWCMMG.mjs";
|
|
20
20
|
import "../chunk-V6WE6JSZ.mjs";
|
|
21
21
|
import "../chunk-3XNTL3FQ.mjs";
|
|
22
|
-
import "../chunk-
|
|
22
|
+
import "../chunk-CGIXMLSY.mjs";
|
|
23
23
|
import "../chunk-USWZZUEH.mjs";
|
|
24
24
|
import "../chunk-7N62DNSO.mjs";
|
|
25
25
|
import "../chunk-7HO6AEOP.mjs";
|
|
26
|
+
import "../chunk-I4CUBGVF.mjs";
|
|
26
27
|
import "../chunk-74YTBPTY.mjs";
|
|
27
28
|
import "../chunk-7MABZJIM.mjs";
|
|
28
29
|
import "../chunk-YW7OBE6Q.mjs";
|
|
29
30
|
import "../chunk-GY2STC2S.mjs";
|
|
30
31
|
import "../chunk-UB5UOSHB.mjs";
|
|
31
|
-
import "../chunk-
|
|
32
|
-
import "../chunk-
|
|
32
|
+
import "../chunk-ZVWA4ZQ3.mjs";
|
|
33
|
+
import "../chunk-7FBJLMQH.mjs";
|
|
33
34
|
import "../chunk-XIVV5IWN.mjs";
|
|
34
35
|
import "../chunk-GXASWWJU.mjs";
|
|
35
36
|
import "../chunk-K4667E2Q.mjs";
|
|
@@ -51,7 +52,7 @@ import {
|
|
|
51
52
|
import "../chunk-PFE6GMNE.mjs";
|
|
52
53
|
import "../chunk-RHIFZZUI.mjs";
|
|
53
54
|
import "../chunk-LM2YNO4U.mjs";
|
|
54
|
-
import "../chunk-
|
|
55
|
+
import "../chunk-SSA7THPX.mjs";
|
|
55
56
|
import "../chunk-QTZZ2ISQ.mjs";
|
|
56
57
|
import "../chunk-ITN462YM.mjs";
|
|
57
58
|
import "../chunk-B232I2GP.mjs";
|
|
@@ -778,9 +778,9 @@ var FARM_INTEGRATION_INTERNAL_DISPATCH_CONTEXT_KEY = "farm.integration.internalD
|
|
|
778
778
|
var FARM_INTEGRATION_PLUGIN_SERVER_RUNTIME = /* @__PURE__ */ Symbol.for(
|
|
779
779
|
"@farm.js/core/integration-plugin-server-runtime"
|
|
780
780
|
);
|
|
781
|
-
function defineTypedIntegrationRoute(method,
|
|
781
|
+
function defineTypedIntegrationRoute(method, path5, input) {
|
|
782
782
|
return {
|
|
783
|
-
path:
|
|
783
|
+
path: path5,
|
|
784
784
|
method,
|
|
785
785
|
middleware: input.middleware,
|
|
786
786
|
before: input.before,
|
|
@@ -790,7 +790,7 @@ function defineTypedIntegrationRoute(method, path4, input) {
|
|
|
790
790
|
input: normalizeIntegrationRouteInputSchemas(input),
|
|
791
791
|
handler: input.handler,
|
|
792
792
|
__operation: defineIntegrationAPIOperation({
|
|
793
|
-
path:
|
|
793
|
+
path: path5,
|
|
794
794
|
method,
|
|
795
795
|
bodyFormat: input.bodyFormat,
|
|
796
796
|
responseFormat: input.responseFormat,
|
|
@@ -803,52 +803,52 @@ function defineTypedIntegrationRoute(method, path4, input) {
|
|
|
803
803
|
__name(defineTypedIntegrationRoute, "defineTypedIntegrationRoute");
|
|
804
804
|
function createIntegrationRouteFactory() {
|
|
805
805
|
return {
|
|
806
|
-
get(
|
|
806
|
+
get(path5, input) {
|
|
807
807
|
return defineTypedIntegrationRoute(
|
|
808
808
|
"GET",
|
|
809
|
-
|
|
809
|
+
path5,
|
|
810
810
|
input
|
|
811
811
|
);
|
|
812
812
|
},
|
|
813
|
-
post(
|
|
813
|
+
post(path5, input) {
|
|
814
814
|
return defineTypedIntegrationRoute(
|
|
815
815
|
"POST",
|
|
816
|
-
|
|
816
|
+
path5,
|
|
817
817
|
{
|
|
818
818
|
bodyFormat: "json",
|
|
819
819
|
...input
|
|
820
820
|
}
|
|
821
821
|
);
|
|
822
822
|
},
|
|
823
|
-
put(
|
|
823
|
+
put(path5, input) {
|
|
824
824
|
return defineTypedIntegrationRoute(
|
|
825
825
|
"PUT",
|
|
826
|
-
|
|
826
|
+
path5,
|
|
827
827
|
{
|
|
828
828
|
bodyFormat: "json",
|
|
829
829
|
...input
|
|
830
830
|
}
|
|
831
831
|
);
|
|
832
832
|
},
|
|
833
|
-
patch(
|
|
834
|
-
return defineTypedIntegrationRoute("PATCH",
|
|
833
|
+
patch(path5, input) {
|
|
834
|
+
return defineTypedIntegrationRoute("PATCH", path5, {
|
|
835
835
|
bodyFormat: "json",
|
|
836
836
|
...input
|
|
837
837
|
});
|
|
838
838
|
},
|
|
839
|
-
delete(
|
|
840
|
-
return defineTypedIntegrationRoute("DELETE",
|
|
839
|
+
delete(path5, input) {
|
|
840
|
+
return defineTypedIntegrationRoute("DELETE", path5, {
|
|
841
841
|
bodyFormat: "json",
|
|
842
842
|
...input
|
|
843
843
|
});
|
|
844
844
|
},
|
|
845
|
-
options(
|
|
846
|
-
return defineTypedIntegrationRoute("OPTIONS",
|
|
845
|
+
options(path5, input) {
|
|
846
|
+
return defineTypedIntegrationRoute("OPTIONS", path5, input);
|
|
847
847
|
},
|
|
848
|
-
head(
|
|
848
|
+
head(path5, input) {
|
|
849
849
|
return defineTypedIntegrationRoute(
|
|
850
850
|
"HEAD",
|
|
851
|
-
|
|
851
|
+
path5,
|
|
852
852
|
input
|
|
853
853
|
);
|
|
854
854
|
}
|
|
@@ -971,8 +971,8 @@ __name(parseIntegrationConfigSchema, "parseIntegrationConfigSchema");
|
|
|
971
971
|
function createIntegrationConfigValidationError(integration, error) {
|
|
972
972
|
const issues = Array.isArray(error.issues) && error.issues.length > 0 ? error.issues.map((issue) => {
|
|
973
973
|
const normalizedPath = normalizeIntegrationValidationPath(issue.path);
|
|
974
|
-
const
|
|
975
|
-
return `${
|
|
974
|
+
const path5 = normalizedPath.length ? `${normalizedPath.join(".")}: ` : "";
|
|
975
|
+
return `${path5}${issue.message || "Invalid config"}`;
|
|
976
976
|
}).join("; ") : error.message || "Invalid config";
|
|
977
977
|
return new Error(`Integration "${integration.type}" config validation failed: ${issues}`);
|
|
978
978
|
}
|
|
@@ -1679,8 +1679,8 @@ function normalizeIntegrationValidationIssues(source, error) {
|
|
|
1679
1679
|
];
|
|
1680
1680
|
}
|
|
1681
1681
|
__name(normalizeIntegrationValidationIssues, "normalizeIntegrationValidationIssues");
|
|
1682
|
-
function normalizeIntegrationValidationPath(
|
|
1683
|
-
return (
|
|
1682
|
+
function normalizeIntegrationValidationPath(path5) {
|
|
1683
|
+
return (path5 || []).map((segment) => {
|
|
1684
1684
|
const key = typeof segment === "object" && segment !== null && "key" in segment ? segment.key : segment;
|
|
1685
1685
|
return typeof key === "symbol" ? key.description || key.toString() : key;
|
|
1686
1686
|
});
|
|
@@ -2378,7 +2378,7 @@ __name(normalizeMatcher, "normalizeMatcher");
|
|
|
2378
2378
|
|
|
2379
2379
|
// src/markdown.ts
|
|
2380
2380
|
function resolveMarkdownConfig(config) {
|
|
2381
|
-
if (config === false
|
|
2381
|
+
if (config === false) {
|
|
2382
2382
|
return {
|
|
2383
2383
|
enabled: false,
|
|
2384
2384
|
expose: [],
|
|
@@ -2386,7 +2386,7 @@ function resolveMarkdownConfig(config) {
|
|
|
2386
2386
|
includeMetadata: true
|
|
2387
2387
|
};
|
|
2388
2388
|
}
|
|
2389
|
-
if (config === true) {
|
|
2389
|
+
if (config === true || config === void 0) {
|
|
2390
2390
|
return {
|
|
2391
2391
|
enabled: true,
|
|
2392
2392
|
expose: true,
|
|
@@ -2394,7 +2394,7 @@ function resolveMarkdownConfig(config) {
|
|
|
2394
2394
|
includeMetadata: true
|
|
2395
2395
|
};
|
|
2396
2396
|
}
|
|
2397
|
-
const exposeInput = config.expose ?? config.routes ??
|
|
2397
|
+
const exposeInput = config.expose ?? config.routes ?? true;
|
|
2398
2398
|
const expose = exposeInput === true ? true : Array.isArray(exposeInput) ? exposeInput.map(normalizeMarkdownRouteInput) : [];
|
|
2399
2399
|
return {
|
|
2400
2400
|
enabled: config.enabled !== false && (expose === true || expose.length > 0),
|
|
@@ -2417,7 +2417,7 @@ function normalizeMarkdownRouteInput(input) {
|
|
|
2417
2417
|
}
|
|
2418
2418
|
__name(normalizeMarkdownRouteInput, "normalizeMarkdownRouteInput");
|
|
2419
2419
|
function normalizeMarkdownRoute(route) {
|
|
2420
|
-
const withoutMarkdownExtension = route.endsWith(".md") ? route.slice(0, -3) : route;
|
|
2420
|
+
const withoutMarkdownExtension = route.toLowerCase().endsWith(".md") ? route.slice(0, -3) : route;
|
|
2421
2421
|
const withSlash = withoutMarkdownExtension.startsWith("/") ? withoutMarkdownExtension : `/${withoutMarkdownExtension}`;
|
|
2422
2422
|
const normalized = withSlash.replace(/\/+/g, "/").replace(/\/$/g, "");
|
|
2423
2423
|
return normalized === "" || normalized === "/index" ? "/" : normalized;
|
|
@@ -2507,7 +2507,7 @@ function normalizeCronJob(name, job) {
|
|
|
2507
2507
|
if (!job || typeof job !== "object" || Array.isArray(job)) {
|
|
2508
2508
|
throw new TypeError(`Farm cron ${JSON.stringify(name)} must be a configuration object.`);
|
|
2509
2509
|
}
|
|
2510
|
-
const
|
|
2510
|
+
const path5 = normalizeCronPath(name, job.path);
|
|
2511
2511
|
const rawSchedule = Array.isArray(job.schedule) ? job.schedule : [job.schedule];
|
|
2512
2512
|
const schedule = [...new Set(rawSchedule.map((value) => normalizeCronExpression(name, value)))];
|
|
2513
2513
|
if (schedule.length === 0) {
|
|
@@ -2516,7 +2516,7 @@ function normalizeCronJob(name, job) {
|
|
|
2516
2516
|
return {
|
|
2517
2517
|
name,
|
|
2518
2518
|
schedule,
|
|
2519
|
-
path:
|
|
2519
|
+
path: path5,
|
|
2520
2520
|
description: job.description?.trim() || void 0
|
|
2521
2521
|
};
|
|
2522
2522
|
}
|
|
@@ -2525,13 +2525,13 @@ function normalizeCronPath(name, value) {
|
|
|
2525
2525
|
if (typeof value !== "string" || !value.trim().startsWith("/")) {
|
|
2526
2526
|
throw new TypeError(`Farm cron ${JSON.stringify(name)} path must start with "/".`);
|
|
2527
2527
|
}
|
|
2528
|
-
const
|
|
2529
|
-
if (
|
|
2528
|
+
const path5 = value.trim();
|
|
2529
|
+
if (path5.startsWith("//") || path5.includes("?") || path5.includes("#")) {
|
|
2530
2530
|
throw new TypeError(
|
|
2531
2531
|
`Farm cron ${JSON.stringify(name)} path must be an application pathname without a host, query, or hash.`
|
|
2532
2532
|
);
|
|
2533
2533
|
}
|
|
2534
|
-
return
|
|
2534
|
+
return path5.length > 1 ? path5.replace(/\/+$/, "") : path5;
|
|
2535
2535
|
}
|
|
2536
2536
|
__name(normalizeCronPath, "normalizeCronPath");
|
|
2537
2537
|
function normalizeCronExpression(name, value) {
|
|
@@ -3467,7 +3467,7 @@ var SIZE_UNITS = {
|
|
|
3467
3467
|
gib: 1073741824
|
|
3468
3468
|
};
|
|
3469
3469
|
function resolveFarmImageConfig(config) {
|
|
3470
|
-
const
|
|
3470
|
+
const path5 = normalizeImagePath(config?.path ?? DEFAULT_FARM_IMAGE_PATH);
|
|
3471
3471
|
const deviceSizes = normalizeIntegerList(
|
|
3472
3472
|
config?.deviceSizes ?? DEFAULT_FARM_IMAGE_DEVICE_SIZES,
|
|
3473
3473
|
"images.deviceSizes"
|
|
@@ -3495,7 +3495,7 @@ function resolveFarmImageConfig(config) {
|
|
|
3495
3495
|
);
|
|
3496
3496
|
return Object.freeze({
|
|
3497
3497
|
provider: config?.provider ?? "auto",
|
|
3498
|
-
path:
|
|
3498
|
+
path: path5,
|
|
3499
3499
|
domains: Object.freeze([
|
|
3500
3500
|
...new Set(
|
|
3501
3501
|
(config?.domains ?? []).map((domain) => domain.trim().toLowerCase()).filter(Boolean)
|
|
@@ -3525,11 +3525,11 @@ function resolveFarmImageConfig(config) {
|
|
|
3525
3525
|
}
|
|
3526
3526
|
__name(resolveFarmImageConfig, "resolveFarmImageConfig");
|
|
3527
3527
|
function normalizeImagePath(value) {
|
|
3528
|
-
const
|
|
3529
|
-
if (!
|
|
3528
|
+
const path5 = value.trim().replace(/\/+$/, "") || "/";
|
|
3529
|
+
if (!path5.startsWith("/") || path5.includes("?") || path5.includes("#")) {
|
|
3530
3530
|
throw new TypeError("images.path must be an absolute pathname without a query or hash");
|
|
3531
3531
|
}
|
|
3532
|
-
return
|
|
3532
|
+
return path5;
|
|
3533
3533
|
}
|
|
3534
3534
|
__name(normalizeImagePath, "normalizeImagePath");
|
|
3535
3535
|
function normalizeIntegerList(values, name, max) {
|
|
@@ -3712,6 +3712,90 @@ function normalizePositiveInteger(value, fallback, name) {
|
|
|
3712
3712
|
}
|
|
3713
3713
|
__name(normalizePositiveInteger, "normalizePositiveInteger");
|
|
3714
3714
|
|
|
3715
|
+
// src/auth-config.ts
|
|
3716
|
+
var import_node_module2 = require("module");
|
|
3717
|
+
var import_node_path3 = __toESM(require("path"));
|
|
3718
|
+
var import_node_url2 = require("url");
|
|
3719
|
+
function resolveFarmAuthConfig(input) {
|
|
3720
|
+
const config = input === true ? {} : input && typeof input === "object" ? input : {};
|
|
3721
|
+
const passwordConfig = typeof config.emailAndPassword === "object" ? config.emailAndPassword : {};
|
|
3722
|
+
const resolved = {
|
|
3723
|
+
enabled: input !== void 0 && input !== false && config.enabled !== false,
|
|
3724
|
+
appName: config.appName,
|
|
3725
|
+
basePath: normalizeBasePath(config.basePath),
|
|
3726
|
+
emailAndPassword: {
|
|
3727
|
+
enabled: config.emailAndPassword !== false,
|
|
3728
|
+
requireEmailVerification: passwordConfig.requireEmailVerification ?? false,
|
|
3729
|
+
minPasswordLength: passwordConfig.minPasswordLength ?? 8,
|
|
3730
|
+
maxPasswordLength: passwordConfig.maxPasswordLength ?? 128
|
|
3731
|
+
},
|
|
3732
|
+
session: {
|
|
3733
|
+
expiresIn: config.session?.expiresIn ?? 60 * 60 * 24 * 7,
|
|
3734
|
+
updateAge: config.session?.updateAge ?? 60 * 60 * 24
|
|
3735
|
+
},
|
|
3736
|
+
database: {
|
|
3737
|
+
url: config.database?.url,
|
|
3738
|
+
path: config.database?.path || ".farm/auth.sqlite",
|
|
3739
|
+
migrateInDevelopment: config.database?.migrateInDevelopment ?? true
|
|
3740
|
+
}
|
|
3741
|
+
};
|
|
3742
|
+
validateFarmAuthConfig(resolved);
|
|
3743
|
+
return resolved;
|
|
3744
|
+
}
|
|
3745
|
+
__name(resolveFarmAuthConfig, "resolveFarmAuthConfig");
|
|
3746
|
+
async function resolveFarmAuthIntegration(config, options) {
|
|
3747
|
+
if (!config.enabled) return void 0;
|
|
3748
|
+
const root = import_node_path3.default.resolve(options.root);
|
|
3749
|
+
let modulePath;
|
|
3750
|
+
try {
|
|
3751
|
+
const resolveFromApp = (0, import_node_module2.createRequire)(import_node_path3.default.join(root, "package.json"));
|
|
3752
|
+
modulePath = resolveFromApp.resolve("@farm.js/auth/internal");
|
|
3753
|
+
} catch {
|
|
3754
|
+
throw new Error(
|
|
3755
|
+
"The `auth` config requires @farm.js/auth. Install it with `pnpm add @farm.js/auth` and try again."
|
|
3756
|
+
);
|
|
3757
|
+
}
|
|
3758
|
+
const runtime = await import(
|
|
3759
|
+
/* @vite-ignore */
|
|
3760
|
+
(0, import_node_url2.pathToFileURL)(modulePath).href
|
|
3761
|
+
);
|
|
3762
|
+
if (typeof runtime.createFarmAuthIntegration !== "function") {
|
|
3763
|
+
throw new Error(
|
|
3764
|
+
"The installed @farm.js/auth package is incompatible with this version of @farm.js/core."
|
|
3765
|
+
);
|
|
3766
|
+
}
|
|
3767
|
+
return runtime.createFarmAuthIntegration(config, {
|
|
3768
|
+
...options,
|
|
3769
|
+
root
|
|
3770
|
+
});
|
|
3771
|
+
}
|
|
3772
|
+
__name(resolveFarmAuthIntegration, "resolveFarmAuthIntegration");
|
|
3773
|
+
function normalizeBasePath(value) {
|
|
3774
|
+
const route = (value || "/api/auth").trim();
|
|
3775
|
+
const withLeadingSlash = route.startsWith("/") ? route : `/${route}`;
|
|
3776
|
+
const normalized = withLeadingSlash.replace(/\/+/g, "/").replace(/\/+$/, "");
|
|
3777
|
+
return normalized || "/api/auth";
|
|
3778
|
+
}
|
|
3779
|
+
__name(normalizeBasePath, "normalizeBasePath");
|
|
3780
|
+
function validateFarmAuthConfig(config) {
|
|
3781
|
+
const { minPasswordLength, maxPasswordLength } = config.emailAndPassword;
|
|
3782
|
+
if (!Number.isInteger(minPasswordLength) || minPasswordLength < 1) {
|
|
3783
|
+
throw new Error("auth.emailAndPassword.minPasswordLength must be a positive integer.");
|
|
3784
|
+
}
|
|
3785
|
+
if (!Number.isInteger(maxPasswordLength) || maxPasswordLength < minPasswordLength) {
|
|
3786
|
+
throw new Error(
|
|
3787
|
+
"auth.emailAndPassword.maxPasswordLength must be an integer greater than or equal to minPasswordLength."
|
|
3788
|
+
);
|
|
3789
|
+
}
|
|
3790
|
+
if (!Number.isInteger(config.session.expiresIn) || config.session.expiresIn < 1) {
|
|
3791
|
+
throw new Error("auth.session.expiresIn must be a positive integer.");
|
|
3792
|
+
}
|
|
3793
|
+
if (!Number.isInteger(config.session.updateAge) || config.session.updateAge < 0) {
|
|
3794
|
+
throw new Error("auth.session.updateAge must be a non-negative integer.");
|
|
3795
|
+
}
|
|
3796
|
+
}
|
|
3797
|
+
__name(validateFarmAuthConfig, "validateFarmAuthConfig");
|
|
3798
|
+
|
|
3715
3799
|
// src/config.ts
|
|
3716
3800
|
var FARM_RESOLVED_CUSTOM_CONTEXT = /* @__PURE__ */ Symbol.for("farm.resolvedCustomContext");
|
|
3717
3801
|
function normalizeDeployTarget(target) {
|
|
@@ -3863,7 +3947,7 @@ async function findDocsConfigPath(rootDir, configPath) {
|
|
|
3863
3947
|
__name(findDocsConfigPath, "findDocsConfigPath");
|
|
3864
3948
|
async function loadDocsConfig(rootDir, configPath) {
|
|
3865
3949
|
const fs = await import("fs/promises");
|
|
3866
|
-
const { pathToFileURL:
|
|
3950
|
+
const { pathToFileURL: pathToFileURL3 } = await import("url");
|
|
3867
3951
|
const root = import_path.default.resolve(rootDir || process.cwd());
|
|
3868
3952
|
const resolvedPath = await findDocsConfigPath(root, configPath);
|
|
3869
3953
|
if (!resolvedPath) return void 0;
|
|
@@ -3892,7 +3976,7 @@ async function loadDocsConfig(rootDir, configPath) {
|
|
|
3892
3976
|
logLevel: "silent",
|
|
3893
3977
|
sourcemap: "inline"
|
|
3894
3978
|
});
|
|
3895
|
-
const moduleUrl =
|
|
3979
|
+
const moduleUrl = pathToFileURL3(modulePath).href + `?t=${Date.now()}`;
|
|
3896
3980
|
let importedConfig;
|
|
3897
3981
|
try {
|
|
3898
3982
|
importedConfig = await import(
|
|
@@ -3995,6 +4079,17 @@ async function resolveConfig(userConfig, mode) {
|
|
|
3995
4079
|
const mdx = resolveMdxConfig(userConfig.mdx);
|
|
3996
4080
|
const env2 = resolveEnv(userConfig.env, process.env);
|
|
3997
4081
|
setEnv(env2);
|
|
4082
|
+
const auth = resolveFarmAuthConfig(userConfig.auth);
|
|
4083
|
+
if (auth.enabled && userConfig.integrations?.auth) {
|
|
4084
|
+
throw new Error(
|
|
4085
|
+
"Choose either the top-level `auth` config or `integrations.auth`; they cannot both own the auth route."
|
|
4086
|
+
);
|
|
4087
|
+
}
|
|
4088
|
+
const nativeAuthIntegration = await resolveFarmAuthIntegration(auth, {
|
|
4089
|
+
root,
|
|
4090
|
+
mode
|
|
4091
|
+
});
|
|
4092
|
+
const integrations = nativeAuthIntegration ? { ...userConfig.integrations, auth: nativeAuthIntegration } : userConfig.integrations || {};
|
|
3998
4093
|
const generateBuildId = userConfig.generateBuildId || (() => `build-${Date.now()}`);
|
|
3999
4094
|
const deploymentId = normalizeFarmDeploymentId(
|
|
4000
4095
|
userConfig.deploymentId || process.env.FARM_DEPLOYMENT_ID || process.env.VERCEL_GIT_COMMIT_SHA || process.env.CF_PAGES_COMMIT_SHA || (mode === "production" ? await generateBuildId() : "development")
|
|
@@ -4019,14 +4114,15 @@ async function resolveConfig(userConfig, mode) {
|
|
|
4019
4114
|
devtools: resolveFarmDevtoolsConfig(userConfig.devtools, mode),
|
|
4020
4115
|
storage: userConfig.storage || {},
|
|
4021
4116
|
cache: userConfig.cache || {},
|
|
4117
|
+
auth,
|
|
4022
4118
|
suppressLintOnLink: userConfig.suppressLintOnLink ?? false,
|
|
4023
4119
|
experimental: {
|
|
4024
4120
|
serverComponents: false,
|
|
4025
4121
|
serverActions: false,
|
|
4026
4122
|
...userConfig.experimental
|
|
4027
4123
|
},
|
|
4028
|
-
plugins: [...resolveIntegrationPlugins(
|
|
4029
|
-
integrations
|
|
4124
|
+
plugins: [...resolveIntegrationPlugins(integrations), ...userConfig.plugins || []],
|
|
4125
|
+
integrations,
|
|
4030
4126
|
trailingSlash: userConfig.trailingSlash ?? false,
|
|
4031
4127
|
redirects: /* @__PURE__ */ __name(() => [...redirects, ...routeRuleRedirects], "redirects"),
|
|
4032
4128
|
rewrites: /* @__PURE__ */ __name(() => rewrites, "rewrites"),
|