@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,22 @@
|
|
|
1
|
+
export { aO as APIHandlerLifecyclePayload, aK as APIRouteDiscoveredPayload, aR as BundleLifecyclePayload, U as BundleResultPayload, aP as ErrorLifecyclePayload, V as FarmPlugin, aE as FarmPluginBuildHooks, aG as FarmPluginClientConfig, aj as FarmPluginContext, aF as FarmPluginDevHooks, aB as FarmPluginDiscoveredRoute, aD as FarmPluginRenderHooks, an as FarmPluginRouteRuntimePayload, aC as FarmPluginRouterHooks, at as FarmPluginRuntimeAfterEvent, aq as FarmPluginRuntimeBaseEvent, as as FarmPluginRuntimeBeforeEvent, aw as FarmPluginRuntimeCloseEvent, ar as FarmPluginRuntimeContextEvent, au as FarmPluginRuntimeErrorEvent, ax as FarmPluginRuntimeHooks, am as FarmPluginRuntimeKind, az as FarmPluginRuntimeRequestHandler, ay as FarmPluginRuntimeRequestOptions, aA as FarmPluginRuntimeSession, av as FarmPluginRuntimeStartEvent, ao as FarmPluginSetupContext, ap as FarmPluginStateContext, ak as FarmRequestPluginContext, al as FarmRequestStore, aQ as HMRUpdatePayload, aJ as MiddlewareDiscoveredPayload, aS as NitroBuildLifecyclePayload, a3 as PluginManager, ai as PluginRequestContext, aN as RenderLifecyclePayload, aH as RouteDiscoveredPayload, aL as RouteMatchPayload, aM as RouteMatchResultPayload, aI as RoutesGeneratedPayload, aT as ShutdownPayload, a2 as definePlugin, f as farmPlugin } from './client-plugins-BI2R6Eae.mjs';
|
|
2
|
+
import 'vite';
|
|
3
|
+
import './plugin-BJDf43dc.mjs';
|
|
4
|
+
import './env.mjs';
|
|
5
|
+
import 'react';
|
|
6
|
+
import 'http';
|
|
7
|
+
import './types-D1A6-XvH.mjs';
|
|
8
|
+
import 'db0';
|
|
9
|
+
import 'unstorage';
|
|
10
|
+
import './integration-api-CHT2OKAf.mjs';
|
|
11
|
+
import '@farming-labs/orm';
|
|
12
|
+
import './types-C9N-nk5R.mjs';
|
|
13
|
+
import '@farming-labs/docs';
|
|
14
|
+
import './markdown.mjs';
|
|
15
|
+
import './observability.mjs';
|
|
16
|
+
import './workflows.mjs';
|
|
17
|
+
import './cron.mjs';
|
|
18
|
+
import './server-action-security.mjs';
|
|
19
|
+
import './image-config-Duob7wER.mjs';
|
|
20
|
+
import './types-BMxWr97v.mjs';
|
|
21
|
+
import './cache.mjs';
|
|
22
|
+
import './route-runtime-DoOHzCAD.mjs';
|
package/dist/plugin.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export { aO as APIHandlerLifecyclePayload, aK as APIRouteDiscoveredPayload, aR as BundleLifecyclePayload, U as BundleResultPayload, aP as ErrorLifecyclePayload, V as FarmPlugin, aE as FarmPluginBuildHooks, aG as FarmPluginClientConfig, aj as FarmPluginContext, aF as FarmPluginDevHooks, aB as FarmPluginDiscoveredRoute, aD as FarmPluginRenderHooks, an as FarmPluginRouteRuntimePayload, aC as FarmPluginRouterHooks, at as FarmPluginRuntimeAfterEvent, aq as FarmPluginRuntimeBaseEvent, as as FarmPluginRuntimeBeforeEvent, aw as FarmPluginRuntimeCloseEvent, ar as FarmPluginRuntimeContextEvent, au as FarmPluginRuntimeErrorEvent, ax as FarmPluginRuntimeHooks, am as FarmPluginRuntimeKind, az as FarmPluginRuntimeRequestHandler, ay as FarmPluginRuntimeRequestOptions, aA as FarmPluginRuntimeSession, av as FarmPluginRuntimeStartEvent, ao as FarmPluginSetupContext, ap as FarmPluginStateContext, ak as FarmRequestPluginContext, al as FarmRequestStore, aQ as HMRUpdatePayload, aJ as MiddlewareDiscoveredPayload, aS as NitroBuildLifecyclePayload, a3 as PluginManager, ai as PluginRequestContext, aN as RenderLifecyclePayload, aH as RouteDiscoveredPayload, aL as RouteMatchPayload, aM as RouteMatchResultPayload, aI as RoutesGeneratedPayload, aT as ShutdownPayload, a2 as definePlugin, f as farmPlugin } from './client-plugins-DU9oMspX.js';
|
|
2
|
+
import 'vite';
|
|
3
|
+
import './plugin-BJDf43dc.js';
|
|
4
|
+
import './env.js';
|
|
5
|
+
import 'react';
|
|
6
|
+
import 'http';
|
|
7
|
+
import './types-D1A6-XvH.js';
|
|
8
|
+
import 'db0';
|
|
9
|
+
import 'unstorage';
|
|
10
|
+
import './integration-api-CHT2OKAf.js';
|
|
11
|
+
import '@farming-labs/orm';
|
|
12
|
+
import './types-C9N-nk5R.js';
|
|
13
|
+
import '@farming-labs/docs';
|
|
14
|
+
import './markdown.js';
|
|
15
|
+
import './observability.js';
|
|
16
|
+
import './workflows.js';
|
|
17
|
+
import './cron.js';
|
|
18
|
+
import './server-action-security.js';
|
|
19
|
+
import './image-config-Duob7wER.js';
|
|
20
|
+
import './types-BMxWr97v.js';
|
|
21
|
+
import './cache.js';
|
|
22
|
+
import './route-runtime-DoOHzCAD.js';
|
package/dist/plugin.mjs
CHANGED
|
@@ -1,26 +1,27 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PluginManager,
|
|
3
3
|
definePlugin
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-DJSGLHCN.mjs";
|
|
5
|
+
import "./chunk-RQ633A5I.mjs";
|
|
6
6
|
import {
|
|
7
7
|
farmPlugin
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-4MGVSBRP.mjs";
|
|
9
9
|
import "./chunk-LGHEOHBU.mjs";
|
|
10
10
|
import "./chunk-FRPWCMMG.mjs";
|
|
11
11
|
import "./chunk-V6WE6JSZ.mjs";
|
|
12
12
|
import "./chunk-3XNTL3FQ.mjs";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-CGIXMLSY.mjs";
|
|
14
14
|
import "./chunk-USWZZUEH.mjs";
|
|
15
15
|
import "./chunk-7N62DNSO.mjs";
|
|
16
16
|
import "./chunk-7HO6AEOP.mjs";
|
|
17
|
+
import "./chunk-I4CUBGVF.mjs";
|
|
17
18
|
import "./chunk-74YTBPTY.mjs";
|
|
18
19
|
import "./chunk-7MABZJIM.mjs";
|
|
19
20
|
import "./chunk-YW7OBE6Q.mjs";
|
|
20
21
|
import "./chunk-GY2STC2S.mjs";
|
|
21
22
|
import "./chunk-UB5UOSHB.mjs";
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-ZVWA4ZQ3.mjs";
|
|
24
|
+
import "./chunk-7FBJLMQH.mjs";
|
|
24
25
|
import "./chunk-XIVV5IWN.mjs";
|
|
25
26
|
import "./chunk-GXASWWJU.mjs";
|
|
26
27
|
import "./chunk-K4667E2Q.mjs";
|
|
@@ -40,7 +41,7 @@ import "./chunk-J4FNJ5IU.mjs";
|
|
|
40
41
|
import "./chunk-PFE6GMNE.mjs";
|
|
41
42
|
import "./chunk-RHIFZZUI.mjs";
|
|
42
43
|
import "./chunk-LM2YNO4U.mjs";
|
|
43
|
-
import "./chunk-
|
|
44
|
+
import "./chunk-SSA7THPX.mjs";
|
|
44
45
|
import "./chunk-QTZZ2ISQ.mjs";
|
|
45
46
|
import "./chunk-ITN462YM.mjs";
|
|
46
47
|
import "./chunk-B232I2GP.mjs";
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { X as ReadonlyMiddlewareStore, Y as FarmMiddlewareConfig, Z as MiddlewareModule } from './client-plugins-BI2R6Eae.mjs';
|
|
2
|
+
import { R as ResolvedFarmI18nConfig } from './types-BMxWr97v.mjs';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Server-side middleware utilities for accessing middleware data in pages
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
type MiddlewareStoreInput = Record<string, any> | Map<string, any>;
|
|
9
|
+
/**
|
|
10
|
+
* Internal: Run code with middleware data available
|
|
11
|
+
* This is called by the server renderer
|
|
12
|
+
*/
|
|
13
|
+
declare function _runWithMiddlewareData<T>(data: MiddlewareStoreInput, fn: () => T | Promise<T>): Promise<T>;
|
|
14
|
+
/** Internal: Run code with server-only middleware context available. */
|
|
15
|
+
declare function _runWithMiddlewareContext<T>(context: MiddlewareStoreInput, fn: () => T | Promise<T>): Promise<T>;
|
|
16
|
+
/**
|
|
17
|
+
* Get middleware data in a server component
|
|
18
|
+
* No props needed - uses global storage!
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```tsx
|
|
22
|
+
* import { getMiddlewareData } from 'farm/middleware';
|
|
23
|
+
*
|
|
24
|
+
* export default function Page() {
|
|
25
|
+
* const data = getMiddlewareData(); // ← No props needed!
|
|
26
|
+
* const user = data.get('user');
|
|
27
|
+
* const demoInfo = data.get('demoInfo');
|
|
28
|
+
*
|
|
29
|
+
* return <div>Welcome {user?.name}</div>;
|
|
30
|
+
* }
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
declare function getMiddlewareData<T extends Record<string, any> = Record<string, any>>(): Map<keyof T, T[keyof T]>;
|
|
34
|
+
/**
|
|
35
|
+
* Get a specific value from middleware data (synchronous)
|
|
36
|
+
* Uses AsyncLocalStorage for request scoping - no props needed.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```tsx
|
|
40
|
+
* import { getMiddlewareValue } from 'farm/middleware';
|
|
41
|
+
*
|
|
42
|
+
* export default function Page() {
|
|
43
|
+
* const user = getMiddlewareValue<User>('user'); // ← No props needed!
|
|
44
|
+
* const stats = getMiddlewareValue('dashboardStats');
|
|
45
|
+
*
|
|
46
|
+
* return <div>Welcome {user?.name}</div>;
|
|
47
|
+
* }
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
declare function getMiddlewareValue<T = any>(key: string): T | undefined;
|
|
51
|
+
/**
|
|
52
|
+
* Read server-only values set by route middleware for the current request.
|
|
53
|
+
* The returned store is available to the matched page, layouts, and nested
|
|
54
|
+
* Server Components, but is never added to hydration props.
|
|
55
|
+
*/
|
|
56
|
+
declare function getMiddlewareContext<T extends Record<string, any> = Record<string, any>>(): ReadonlyMiddlewareStore<T>;
|
|
57
|
+
|
|
58
|
+
interface ProductionMiddlewareModuleEntry {
|
|
59
|
+
path: string;
|
|
60
|
+
filePath?: string;
|
|
61
|
+
module: MiddlewareModule | Record<string, any>;
|
|
62
|
+
}
|
|
63
|
+
interface ProductionMiddlewareRunnerOptions {
|
|
64
|
+
config?: FarmMiddlewareConfig | null;
|
|
65
|
+
modules?: ProductionMiddlewareModuleEntry[];
|
|
66
|
+
i18n?: ResolvedFarmI18nConfig;
|
|
67
|
+
}
|
|
68
|
+
interface ProductionMiddlewareResult {
|
|
69
|
+
request: Request;
|
|
70
|
+
response: Response | null;
|
|
71
|
+
data: Map<string, any>;
|
|
72
|
+
context: Map<string, any>;
|
|
73
|
+
headers: Headers;
|
|
74
|
+
handled: boolean;
|
|
75
|
+
}
|
|
76
|
+
declare function createProductionMiddlewareRunner(options?: ProductionMiddlewareRunnerOptions): (request: Request) => Promise<ProductionMiddlewareResult>;
|
|
77
|
+
declare function applyProductionMiddlewareHeaders(response: Response, middlewareHeaders?: Headers | null): Response;
|
|
78
|
+
|
|
79
|
+
export { _runWithMiddlewareContext as _, applyProductionMiddlewareHeaders as a, _runWithMiddlewareData as b, createProductionMiddlewareRunner as c, getMiddlewareData as d, getMiddlewareValue as e, getMiddlewareContext as g };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import './plugin-BJDf43dc.mjs';
|
|
2
|
+
|
|
3
|
+
interface FarmChunkRecoveryOptions {
|
|
4
|
+
/**
|
|
5
|
+
* How long a page is considered already recovered before another chunk
|
|
6
|
+
* failure may trigger a reload. Defaults to 30 seconds.
|
|
7
|
+
*/
|
|
8
|
+
maxAgeMs?: number;
|
|
9
|
+
/**
|
|
10
|
+
* Override the storage key. Mostly useful for tests and embedded runtimes.
|
|
11
|
+
*/
|
|
12
|
+
storageKey?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Called right before Farm reloads the page.
|
|
15
|
+
*/
|
|
16
|
+
onRecover?: (error: unknown) => void;
|
|
17
|
+
/**
|
|
18
|
+
* Test hooks for browser globals.
|
|
19
|
+
*/
|
|
20
|
+
reload?: () => void;
|
|
21
|
+
storage?: Pick<Storage, "getItem" | "setItem" | "removeItem"> | null;
|
|
22
|
+
location?: Pick<Location, "pathname" | "search" | "reload">;
|
|
23
|
+
now?: () => number;
|
|
24
|
+
}
|
|
25
|
+
declare function isChunkLoadError(errorLike: unknown): boolean;
|
|
26
|
+
declare function installChunkErrorRecovery(options?: FarmChunkRecoveryOptions): () => void;
|
|
27
|
+
|
|
28
|
+
export { type FarmChunkRecoveryOptions as F, isChunkLoadError as a, installChunkErrorRecovery as i };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import './plugin-BJDf43dc.js';
|
|
2
|
+
|
|
3
|
+
interface FarmChunkRecoveryOptions {
|
|
4
|
+
/**
|
|
5
|
+
* How long a page is considered already recovered before another chunk
|
|
6
|
+
* failure may trigger a reload. Defaults to 30 seconds.
|
|
7
|
+
*/
|
|
8
|
+
maxAgeMs?: number;
|
|
9
|
+
/**
|
|
10
|
+
* Override the storage key. Mostly useful for tests and embedded runtimes.
|
|
11
|
+
*/
|
|
12
|
+
storageKey?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Called right before Farm reloads the page.
|
|
15
|
+
*/
|
|
16
|
+
onRecover?: (error: unknown) => void;
|
|
17
|
+
/**
|
|
18
|
+
* Test hooks for browser globals.
|
|
19
|
+
*/
|
|
20
|
+
reload?: () => void;
|
|
21
|
+
storage?: Pick<Storage, "getItem" | "setItem" | "removeItem"> | null;
|
|
22
|
+
location?: Pick<Location, "pathname" | "search" | "reload">;
|
|
23
|
+
now?: () => number;
|
|
24
|
+
}
|
|
25
|
+
declare function isChunkLoadError(errorLike: unknown): boolean;
|
|
26
|
+
declare function installChunkErrorRecovery(options?: FarmChunkRecoveryOptions): () => void;
|
|
27
|
+
|
|
28
|
+
export { type FarmChunkRecoveryOptions as F, isChunkLoadError as a, installChunkErrorRecovery as i };
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { X as ReadonlyMiddlewareStore, Y as FarmMiddlewareConfig, Z as MiddlewareModule } from './client-plugins-DU9oMspX.js';
|
|
2
|
+
import { R as ResolvedFarmI18nConfig } from './types-BMxWr97v.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Server-side middleware utilities for accessing middleware data in pages
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
type MiddlewareStoreInput = Record<string, any> | Map<string, any>;
|
|
9
|
+
/**
|
|
10
|
+
* Internal: Run code with middleware data available
|
|
11
|
+
* This is called by the server renderer
|
|
12
|
+
*/
|
|
13
|
+
declare function _runWithMiddlewareData<T>(data: MiddlewareStoreInput, fn: () => T | Promise<T>): Promise<T>;
|
|
14
|
+
/** Internal: Run code with server-only middleware context available. */
|
|
15
|
+
declare function _runWithMiddlewareContext<T>(context: MiddlewareStoreInput, fn: () => T | Promise<T>): Promise<T>;
|
|
16
|
+
/**
|
|
17
|
+
* Get middleware data in a server component
|
|
18
|
+
* No props needed - uses global storage!
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```tsx
|
|
22
|
+
* import { getMiddlewareData } from 'farm/middleware';
|
|
23
|
+
*
|
|
24
|
+
* export default function Page() {
|
|
25
|
+
* const data = getMiddlewareData(); // ← No props needed!
|
|
26
|
+
* const user = data.get('user');
|
|
27
|
+
* const demoInfo = data.get('demoInfo');
|
|
28
|
+
*
|
|
29
|
+
* return <div>Welcome {user?.name}</div>;
|
|
30
|
+
* }
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
declare function getMiddlewareData<T extends Record<string, any> = Record<string, any>>(): Map<keyof T, T[keyof T]>;
|
|
34
|
+
/**
|
|
35
|
+
* Get a specific value from middleware data (synchronous)
|
|
36
|
+
* Uses AsyncLocalStorage for request scoping - no props needed.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```tsx
|
|
40
|
+
* import { getMiddlewareValue } from 'farm/middleware';
|
|
41
|
+
*
|
|
42
|
+
* export default function Page() {
|
|
43
|
+
* const user = getMiddlewareValue<User>('user'); // ← No props needed!
|
|
44
|
+
* const stats = getMiddlewareValue('dashboardStats');
|
|
45
|
+
*
|
|
46
|
+
* return <div>Welcome {user?.name}</div>;
|
|
47
|
+
* }
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
declare function getMiddlewareValue<T = any>(key: string): T | undefined;
|
|
51
|
+
/**
|
|
52
|
+
* Read server-only values set by route middleware for the current request.
|
|
53
|
+
* The returned store is available to the matched page, layouts, and nested
|
|
54
|
+
* Server Components, but is never added to hydration props.
|
|
55
|
+
*/
|
|
56
|
+
declare function getMiddlewareContext<T extends Record<string, any> = Record<string, any>>(): ReadonlyMiddlewareStore<T>;
|
|
57
|
+
|
|
58
|
+
interface ProductionMiddlewareModuleEntry {
|
|
59
|
+
path: string;
|
|
60
|
+
filePath?: string;
|
|
61
|
+
module: MiddlewareModule | Record<string, any>;
|
|
62
|
+
}
|
|
63
|
+
interface ProductionMiddlewareRunnerOptions {
|
|
64
|
+
config?: FarmMiddlewareConfig | null;
|
|
65
|
+
modules?: ProductionMiddlewareModuleEntry[];
|
|
66
|
+
i18n?: ResolvedFarmI18nConfig;
|
|
67
|
+
}
|
|
68
|
+
interface ProductionMiddlewareResult {
|
|
69
|
+
request: Request;
|
|
70
|
+
response: Response | null;
|
|
71
|
+
data: Map<string, any>;
|
|
72
|
+
context: Map<string, any>;
|
|
73
|
+
headers: Headers;
|
|
74
|
+
handled: boolean;
|
|
75
|
+
}
|
|
76
|
+
declare function createProductionMiddlewareRunner(options?: ProductionMiddlewareRunnerOptions): (request: Request) => Promise<ProductionMiddlewareResult>;
|
|
77
|
+
declare function applyProductionMiddlewareHeaders(response: Response, middlewareHeaders?: Headers | null): Response;
|
|
78
|
+
|
|
79
|
+
export { _runWithMiddlewareContext as _, applyProductionMiddlewareHeaders as a, _runWithMiddlewareData as b, createProductionMiddlewareRunner as c, getMiddlewareData as d, getMiddlewareValue as e, getMiddlewareContext as g };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
export { R as RouteParamsInput, l as loadRouteParams, p as parseRouteParams } from '../params-ry-lxqmy.mjs';
|
|
2
|
+
import { Parser } from './parsers.mjs';
|
|
3
|
+
export { asArrayOf, asBoolean, asFloat, asInteger, asIsoDate, asIsoDateTime, asJson, asString, createParser, inferParserType } from './parsers.mjs';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Farm.js Client-Side Query State Management
|
|
7
|
+
*
|
|
8
|
+
* Type-safe URL search parameter state management - Like useState, but stored in the URL query string.
|
|
9
|
+
* Client-only hooks for managing query parameters in the browser.
|
|
10
|
+
* Inspired by nuqs implementation patterns.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
type UrlUpdateType = "push" | "replace";
|
|
14
|
+
type HistoryMethod = "pushState" | "replaceState";
|
|
15
|
+
interface Options {
|
|
16
|
+
history?: HistoryMethod;
|
|
17
|
+
shallow?: boolean;
|
|
18
|
+
scroll?: boolean;
|
|
19
|
+
throttleMs?: number;
|
|
20
|
+
}
|
|
21
|
+
declare function useQueryState<TParser extends Parser<any>>(key: string, parser: TParser, options?: Options): [
|
|
22
|
+
NonNullable<ReturnType<TParser["parse"]>> | null,
|
|
23
|
+
(value: NonNullable<ReturnType<TParser["parse"]>> | null) => void
|
|
24
|
+
];
|
|
25
|
+
declare function useQueryState<T>(key: string, parser: Parser<T>, options?: Options): [T | null, (value: T | null) => void];
|
|
26
|
+
declare function useQueryStates<T extends Record<string, Parser<any>>>(parsers: T, options?: Options): [
|
|
27
|
+
{
|
|
28
|
+
[K in keyof T]: ReturnType<T[K]["parse"]>;
|
|
29
|
+
},
|
|
30
|
+
(updates: Partial<{
|
|
31
|
+
[K in keyof T]: ReturnType<T[K]["parse"]> | null;
|
|
32
|
+
}>) => void
|
|
33
|
+
];
|
|
34
|
+
declare function usePagination(options?: {
|
|
35
|
+
defaultPage?: number;
|
|
36
|
+
defaultLimit?: number;
|
|
37
|
+
pageKey?: string;
|
|
38
|
+
limitKey?: string;
|
|
39
|
+
}): {
|
|
40
|
+
page: number;
|
|
41
|
+
setPage: (value: number | null) => void;
|
|
42
|
+
limit: number;
|
|
43
|
+
setLimit: (value: number | null) => void;
|
|
44
|
+
offset: number;
|
|
45
|
+
resetPagination: () => void;
|
|
46
|
+
};
|
|
47
|
+
declare function useSearchFilters<T extends Record<string, any>>(options?: {
|
|
48
|
+
searchKey?: string;
|
|
49
|
+
defaultFilters?: T;
|
|
50
|
+
filterKeys?: (keyof T)[];
|
|
51
|
+
}): {
|
|
52
|
+
search: string | null;
|
|
53
|
+
setSearch: (value: string | null) => void;
|
|
54
|
+
filters: T;
|
|
55
|
+
setFilters: (updates: Partial<{
|
|
56
|
+
[x: string]: string | null;
|
|
57
|
+
}>) => void;
|
|
58
|
+
clearFilters: () => void;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export { type HistoryMethod, type Options, Parser, type UrlUpdateType, usePagination, useQueryState, useQueryStates, useSearchFilters };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
export { R as RouteParamsInput, l as loadRouteParams, p as parseRouteParams } from '../params-BALtrRim.js';
|
|
2
|
+
import { Parser } from './parsers.js';
|
|
3
|
+
export { asArrayOf, asBoolean, asFloat, asInteger, asIsoDate, asIsoDateTime, asJson, asString, createParser, inferParserType } from './parsers.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Farm.js Client-Side Query State Management
|
|
7
|
+
*
|
|
8
|
+
* Type-safe URL search parameter state management - Like useState, but stored in the URL query string.
|
|
9
|
+
* Client-only hooks for managing query parameters in the browser.
|
|
10
|
+
* Inspired by nuqs implementation patterns.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
type UrlUpdateType = "push" | "replace";
|
|
14
|
+
type HistoryMethod = "pushState" | "replaceState";
|
|
15
|
+
interface Options {
|
|
16
|
+
history?: HistoryMethod;
|
|
17
|
+
shallow?: boolean;
|
|
18
|
+
scroll?: boolean;
|
|
19
|
+
throttleMs?: number;
|
|
20
|
+
}
|
|
21
|
+
declare function useQueryState<TParser extends Parser<any>>(key: string, parser: TParser, options?: Options): [
|
|
22
|
+
NonNullable<ReturnType<TParser["parse"]>> | null,
|
|
23
|
+
(value: NonNullable<ReturnType<TParser["parse"]>> | null) => void
|
|
24
|
+
];
|
|
25
|
+
declare function useQueryState<T>(key: string, parser: Parser<T>, options?: Options): [T | null, (value: T | null) => void];
|
|
26
|
+
declare function useQueryStates<T extends Record<string, Parser<any>>>(parsers: T, options?: Options): [
|
|
27
|
+
{
|
|
28
|
+
[K in keyof T]: ReturnType<T[K]["parse"]>;
|
|
29
|
+
},
|
|
30
|
+
(updates: Partial<{
|
|
31
|
+
[K in keyof T]: ReturnType<T[K]["parse"]> | null;
|
|
32
|
+
}>) => void
|
|
33
|
+
];
|
|
34
|
+
declare function usePagination(options?: {
|
|
35
|
+
defaultPage?: number;
|
|
36
|
+
defaultLimit?: number;
|
|
37
|
+
pageKey?: string;
|
|
38
|
+
limitKey?: string;
|
|
39
|
+
}): {
|
|
40
|
+
page: number;
|
|
41
|
+
setPage: (value: number | null) => void;
|
|
42
|
+
limit: number;
|
|
43
|
+
setLimit: (value: number | null) => void;
|
|
44
|
+
offset: number;
|
|
45
|
+
resetPagination: () => void;
|
|
46
|
+
};
|
|
47
|
+
declare function useSearchFilters<T extends Record<string, any>>(options?: {
|
|
48
|
+
searchKey?: string;
|
|
49
|
+
defaultFilters?: T;
|
|
50
|
+
filterKeys?: (keyof T)[];
|
|
51
|
+
}): {
|
|
52
|
+
search: string | null;
|
|
53
|
+
setSearch: (value: string | null) => void;
|
|
54
|
+
filters: T;
|
|
55
|
+
setFilters: (updates: Partial<{
|
|
56
|
+
[x: string]: string | null;
|
|
57
|
+
}>) => void;
|
|
58
|
+
clearFilters: () => void;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export { type HistoryMethod, type Options, Parser, type UrlUpdateType, usePagination, useQueryState, useQueryStates, useSearchFilters };
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
export { Parser, asArrayOf, asBoolean, asFloat, asInteger, asIsoDate, asIsoDateTime, asJson, asString, createParser, inferParserType } from './parsers.mjs';
|
|
2
|
+
export { R as RouteParamsInput, l as loadRouteParams, p as parseRouteParams } from '../params-ry-lxqmy.mjs';
|
|
3
|
+
import { ReactNode, ComponentType } from 'react';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Farm.js Query State Types
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Props for Farm.js page components with search params
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Props for Farm.js layout components
|
|
14
|
+
*/
|
|
15
|
+
interface LayoutPropsSafe {
|
|
16
|
+
children: ReactNode;
|
|
17
|
+
params: Record<string, string>;
|
|
18
|
+
}
|
|
19
|
+
interface PagePropsSafe {
|
|
20
|
+
params: Record<string, string>;
|
|
21
|
+
searchParams: Promise<URLSearchParams | Record<string, string | string[] | undefined>>;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Query state configuration for Farm.js
|
|
25
|
+
*/
|
|
26
|
+
interface QueryStateConfig {
|
|
27
|
+
/**
|
|
28
|
+
* Default history method for URL updates
|
|
29
|
+
* @default 'push'
|
|
30
|
+
*/
|
|
31
|
+
defaultHistoryMethod?: "push" | "replace";
|
|
32
|
+
/**
|
|
33
|
+
* Default shallow routing behavior
|
|
34
|
+
* @default true
|
|
35
|
+
*/
|
|
36
|
+
shallow?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Default scroll behavior
|
|
39
|
+
* @default true
|
|
40
|
+
*/
|
|
41
|
+
scroll?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Custom serialization options
|
|
44
|
+
*/
|
|
45
|
+
serialization?: {
|
|
46
|
+
/**
|
|
47
|
+
* Custom URL key mappings
|
|
48
|
+
*/
|
|
49
|
+
urlKeys?: Record<string, string>;
|
|
50
|
+
/**
|
|
51
|
+
* Custom base URL for serialization
|
|
52
|
+
*/
|
|
53
|
+
baseUrl?: string;
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Farm.js specific query state context
|
|
58
|
+
*/
|
|
59
|
+
interface FarmQueryStateContext {
|
|
60
|
+
/**
|
|
61
|
+
* Current search parameters
|
|
62
|
+
*/
|
|
63
|
+
searchParams: URLSearchParams;
|
|
64
|
+
/**
|
|
65
|
+
* Current pathname
|
|
66
|
+
*/
|
|
67
|
+
pathname: string;
|
|
68
|
+
/**
|
|
69
|
+
* Update URL with new search parameters
|
|
70
|
+
*/
|
|
71
|
+
updateUrl: (params: Record<string, any>, options?: {
|
|
72
|
+
method?: "push" | "replace";
|
|
73
|
+
shallow?: boolean;
|
|
74
|
+
scroll?: boolean;
|
|
75
|
+
}) => void;
|
|
76
|
+
/**
|
|
77
|
+
* Clear all search parameters
|
|
78
|
+
*/
|
|
79
|
+
clearParams: () => void;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Higher-order component for providing query state context
|
|
83
|
+
*/
|
|
84
|
+
type QueryStateProvider = ComponentType<{
|
|
85
|
+
children: ReactNode;
|
|
86
|
+
searchParams?: URLSearchParams;
|
|
87
|
+
pathname?: string;
|
|
88
|
+
}>;
|
|
89
|
+
|
|
90
|
+
export type { FarmQueryStateContext, LayoutPropsSafe, PagePropsSafe, QueryStateConfig, QueryStateProvider };
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
export { Parser, asArrayOf, asBoolean, asFloat, asInteger, asIsoDate, asIsoDateTime, asJson, asString, createParser, inferParserType } from './parsers.js';
|
|
2
|
+
export { R as RouteParamsInput, l as loadRouteParams, p as parseRouteParams } from '../params-BALtrRim.js';
|
|
3
|
+
import { ReactNode, ComponentType } from 'react';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Farm.js Query State Types
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Props for Farm.js page components with search params
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Props for Farm.js layout components
|
|
14
|
+
*/
|
|
15
|
+
interface LayoutPropsSafe {
|
|
16
|
+
children: ReactNode;
|
|
17
|
+
params: Record<string, string>;
|
|
18
|
+
}
|
|
19
|
+
interface PagePropsSafe {
|
|
20
|
+
params: Record<string, string>;
|
|
21
|
+
searchParams: Promise<URLSearchParams | Record<string, string | string[] | undefined>>;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Query state configuration for Farm.js
|
|
25
|
+
*/
|
|
26
|
+
interface QueryStateConfig {
|
|
27
|
+
/**
|
|
28
|
+
* Default history method for URL updates
|
|
29
|
+
* @default 'push'
|
|
30
|
+
*/
|
|
31
|
+
defaultHistoryMethod?: "push" | "replace";
|
|
32
|
+
/**
|
|
33
|
+
* Default shallow routing behavior
|
|
34
|
+
* @default true
|
|
35
|
+
*/
|
|
36
|
+
shallow?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Default scroll behavior
|
|
39
|
+
* @default true
|
|
40
|
+
*/
|
|
41
|
+
scroll?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Custom serialization options
|
|
44
|
+
*/
|
|
45
|
+
serialization?: {
|
|
46
|
+
/**
|
|
47
|
+
* Custom URL key mappings
|
|
48
|
+
*/
|
|
49
|
+
urlKeys?: Record<string, string>;
|
|
50
|
+
/**
|
|
51
|
+
* Custom base URL for serialization
|
|
52
|
+
*/
|
|
53
|
+
baseUrl?: string;
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Farm.js specific query state context
|
|
58
|
+
*/
|
|
59
|
+
interface FarmQueryStateContext {
|
|
60
|
+
/**
|
|
61
|
+
* Current search parameters
|
|
62
|
+
*/
|
|
63
|
+
searchParams: URLSearchParams;
|
|
64
|
+
/**
|
|
65
|
+
* Current pathname
|
|
66
|
+
*/
|
|
67
|
+
pathname: string;
|
|
68
|
+
/**
|
|
69
|
+
* Update URL with new search parameters
|
|
70
|
+
*/
|
|
71
|
+
updateUrl: (params: Record<string, any>, options?: {
|
|
72
|
+
method?: "push" | "replace";
|
|
73
|
+
shallow?: boolean;
|
|
74
|
+
scroll?: boolean;
|
|
75
|
+
}) => void;
|
|
76
|
+
/**
|
|
77
|
+
* Clear all search parameters
|
|
78
|
+
*/
|
|
79
|
+
clearParams: () => void;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Higher-order component for providing query state context
|
|
83
|
+
*/
|
|
84
|
+
type QueryStateProvider = ComponentType<{
|
|
85
|
+
children: ReactNode;
|
|
86
|
+
searchParams?: URLSearchParams;
|
|
87
|
+
pathname?: string;
|
|
88
|
+
}>;
|
|
89
|
+
|
|
90
|
+
export type { FarmQueryStateContext, LayoutPropsSafe, PagePropsSafe, QueryStateConfig, QueryStateProvider };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Farm.js Query State Parsers
|
|
3
|
+
*
|
|
4
|
+
* Shared parsers that can be used in both client and server contexts
|
|
5
|
+
*/
|
|
6
|
+
interface Parser<T> {
|
|
7
|
+
parse: (value: string) => T | null;
|
|
8
|
+
serialize: (value: T) => string;
|
|
9
|
+
withDefault?: (defaultValue: T) => Parser<T>;
|
|
10
|
+
}
|
|
11
|
+
declare const asString: Parser<string>;
|
|
12
|
+
declare const asInteger: Parser<number>;
|
|
13
|
+
declare const asFloat: Parser<number>;
|
|
14
|
+
declare const asBoolean: Parser<boolean>;
|
|
15
|
+
declare function asArrayOf<T>(itemParser: Parser<T>): Parser<T[]>;
|
|
16
|
+
declare function asJson<T>(): Parser<T>;
|
|
17
|
+
declare const asIsoDate: Parser<Date>;
|
|
18
|
+
declare const asIsoDateTime: Parser<Date>;
|
|
19
|
+
declare function createParser<T>(config: {
|
|
20
|
+
parse: (value: string) => T | null;
|
|
21
|
+
serialize: (value: T) => string;
|
|
22
|
+
}): Parser<T>;
|
|
23
|
+
type inferParserType<T> = T extends Parser<infer U> ? U : never;
|
|
24
|
+
|
|
25
|
+
export { type Parser, asArrayOf, asBoolean, asFloat, asInteger, asIsoDate, asIsoDateTime, asJson, asString, createParser, type inferParserType };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Farm.js Query State Parsers
|
|
3
|
+
*
|
|
4
|
+
* Shared parsers that can be used in both client and server contexts
|
|
5
|
+
*/
|
|
6
|
+
interface Parser<T> {
|
|
7
|
+
parse: (value: string) => T | null;
|
|
8
|
+
serialize: (value: T) => string;
|
|
9
|
+
withDefault?: (defaultValue: T) => Parser<T>;
|
|
10
|
+
}
|
|
11
|
+
declare const asString: Parser<string>;
|
|
12
|
+
declare const asInteger: Parser<number>;
|
|
13
|
+
declare const asFloat: Parser<number>;
|
|
14
|
+
declare const asBoolean: Parser<boolean>;
|
|
15
|
+
declare function asArrayOf<T>(itemParser: Parser<T>): Parser<T[]>;
|
|
16
|
+
declare function asJson<T>(): Parser<T>;
|
|
17
|
+
declare const asIsoDate: Parser<Date>;
|
|
18
|
+
declare const asIsoDateTime: Parser<Date>;
|
|
19
|
+
declare function createParser<T>(config: {
|
|
20
|
+
parse: (value: string) => T | null;
|
|
21
|
+
serialize: (value: T) => string;
|
|
22
|
+
}): Parser<T>;
|
|
23
|
+
type inferParserType<T> = T extends Parser<infer U> ? U : never;
|
|
24
|
+
|
|
25
|
+
export { type Parser, asArrayOf, asBoolean, asFloat, asInteger, asIsoDate, asIsoDateTime, asJson, asString, createParser, type inferParserType };
|