@farm.js/core 0.1.0-beta.14 → 0.1.0-beta.17
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.d.mts +25 -0
- package/dist/after.d.ts +25 -0
- package/dist/agent-runtime.d.mts +96 -0
- package/dist/agent-runtime.d.ts +96 -0
- package/dist/api/route-manager.cjs.map +1 -1
- package/dist/api/route-manager.d.mts +66 -0
- package/dist/api/route-manager.d.ts +66 -0
- package/dist/api/route-manager.mjs +2 -2
- package/dist/api/runtime.cjs.map +1 -1
- package/dist/api/runtime.d.mts +3 -0
- package/dist/api/runtime.d.ts +3 -0
- package/dist/api/runtime.mjs +1 -1
- package/dist/api.cjs +18 -10
- package/dist/api.cjs.map +1 -1
- package/dist/api.d.mts +48 -0
- package/dist/api.d.ts +48 -0
- package/dist/api.mjs +3 -3
- package/dist/app-B0tE1I3o.d.ts +306 -0
- package/dist/app-Dv2JJb7X.d.mts +306 -0
- package/dist/app-markdown.d.mts +24 -0
- package/dist/app-markdown.d.ts +24 -0
- package/dist/cache.d.mts +192 -0
- package/dist/cache.d.ts +192 -0
- package/dist/{chunk-VUL55IAX.mjs → chunk-2FLBZFPG.mjs} +19 -19
- package/dist/chunk-2FLBZFPG.mjs.map +1 -0
- package/dist/{chunk-B232I2GP.mjs → chunk-3HIVDX7J.mjs} +12 -1
- package/dist/chunk-3HIVDX7J.mjs.map +1 -0
- package/dist/{chunk-JDEOUK5V.mjs → chunk-6YXKHAFU.mjs} +3 -3
- package/dist/{chunk-Z5CQMP54.mjs → chunk-ARRYKOI5.mjs} +2 -2
- package/dist/{chunk-KLA67WKG.mjs → chunk-B3FFOIWS.mjs} +2 -2
- package/dist/chunk-E257KFBU.mjs +227 -0
- package/dist/chunk-E257KFBU.mjs.map +1 -0
- package/dist/{chunk-PFE6GMNE.mjs → chunk-HMRFYJK6.mjs} +19 -11
- package/dist/chunk-HMRFYJK6.mjs.map +1 -0
- package/dist/{chunk-OPHK6OJN.mjs → chunk-JAEAE27K.mjs} +2 -2
- package/dist/{chunk-32W4QEJP.mjs → chunk-KFTGPFRD.mjs} +1 -1
- package/dist/chunk-KFTGPFRD.mjs.map +1 -0
- package/dist/{chunk-L2PE36GQ.mjs → chunk-PZXBQKCH.mjs} +15 -6
- package/dist/chunk-PZXBQKCH.mjs.map +1 -0
- package/dist/{chunk-UXUAWNO5.mjs → chunk-RIXKJPGI.mjs} +117 -55
- package/dist/chunk-RIXKJPGI.mjs.map +1 -0
- package/dist/{chunk-PNFQQSRA.mjs → chunk-T2M5QANG.mjs} +143 -41
- package/dist/chunk-T2M5QANG.mjs.map +1 -0
- package/dist/{chunk-WDU6QXNK.mjs → chunk-UCYWGN2P.mjs} +1 -1
- package/dist/chunk-UCYWGN2P.mjs.map +1 -0
- package/dist/{chunk-65A7QIKI.mjs → chunk-UMVLB3PN.mjs} +3 -3
- package/dist/chunk-UMVLB3PN.mjs.map +1 -0
- package/dist/{chunk-ARCGE2VT.mjs → chunk-VFDBC3W7.mjs} +2 -2
- package/dist/{chunk-ARCGE2VT.mjs.map → chunk-VFDBC3W7.mjs.map} +1 -1
- package/dist/{chunk-VY2UYN5R.mjs → chunk-VPCFICID.mjs} +82 -3
- package/dist/chunk-VPCFICID.mjs.map +1 -0
- package/dist/{chunk-H3TE3LOV.mjs → chunk-XMFTIVJH.mjs} +2 -2
- package/dist/{chunk-UB5UOSHB.mjs → chunk-ZVMV3THA.mjs} +71 -2
- package/dist/chunk-ZVMV3THA.mjs.map +1 -0
- package/dist/chunk-recovery-lnQFzcQP.d.mts +26 -0
- package/dist/chunk-recovery-lnQFzcQP.d.ts +26 -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-278AvYHE.d.mts +2021 -0
- package/dist/client-plugins-CTQAkr7R.d.ts +2021 -0
- package/dist/client-plugins.d.mts +24 -0
- package/dist/client-plugins.d.ts +24 -0
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.mts +452 -0
- package/dist/client.d.ts +452 -0
- package/dist/client.mjs +3 -3
- package/dist/config.d.mts +31 -0
- package/dist/config.d.ts +31 -0
- package/dist/cron.d.mts +78 -0
- package/dist/cron.d.ts +78 -0
- package/dist/deferred.d.mts +42 -0
- package/dist/deferred.d.ts +42 -0
- package/dist/deployment.cjs +12 -0
- package/dist/deployment.cjs.map +1 -1
- package/dist/deployment.d.mts +36 -0
- package/dist/deployment.d.ts +36 -0
- package/dist/deployment.mjs +3 -1
- package/dist/{devtools-GAZ7F3KL.mjs → devtools-K2ERKGNI.mjs} +5 -5
- package/dist/docs.cjs.map +1 -1
- package/dist/docs.d.mts +80 -0
- package/dist/docs.d.ts +80 -0
- package/dist/docs.mjs +5 -5
- package/dist/env-types.d.mts +12 -0
- package/dist/env-types.d.ts +12 -0
- package/dist/env.d.mts +45 -0
- package/dist/env.d.ts +45 -0
- package/dist/environment/vite.d.mts +22 -0
- package/dist/environment/vite.d.ts +22 -0
- package/dist/environment.d.mts +18 -0
- package/dist/environment.d.ts +18 -0
- package/dist/font.d.mts +95 -0
- package/dist/font.d.ts +95 -0
- package/dist/headers.d.mts +22 -0
- package/dist/headers.d.ts +22 -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.d.mts +39 -0
- package/dist/image.d.ts +39 -0
- package/dist/index.cjs +598 -109
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +477 -0
- package/dist/index.d.ts +477 -0
- package/dist/index.mjs +45 -29
- package/dist/index.mjs.map +1 -1
- package/dist/integration-api-CHT2OKAf.d.mts +93 -0
- package/dist/integration-api-CHT2OKAf.d.ts +93 -0
- package/dist/integrations.d.mts +24 -0
- package/dist/integrations.d.ts +24 -0
- package/dist/internal/build-runtime.cjs +438 -176
- package/dist/internal/build-runtime.cjs.map +1 -1
- package/dist/internal/build-runtime.d.mts +41 -0
- package/dist/internal/build-runtime.d.ts +41 -0
- package/dist/internal/build-runtime.mjs +13 -13
- package/dist/internal/client-runtime.d.mts +17 -0
- package/dist/internal/client-runtime.d.ts +17 -0
- package/dist/internal/config-runtime.cjs +140 -1
- package/dist/internal/config-runtime.cjs.map +1 -1
- package/dist/internal/config-runtime.d.mts +41 -0
- package/dist/internal/config-runtime.d.ts +41 -0
- package/dist/internal/config-runtime.mjs +4 -4
- package/dist/internal/metadata-image-runtime.d.mts +25 -0
- package/dist/internal/metadata-image-runtime.d.ts +25 -0
- 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 +44 -0
- package/dist/internal/production-runtime.d.ts +44 -0
- package/dist/island-CfGru1MO.d.mts +9 -0
- package/dist/island-CfGru1MO.d.ts +9 -0
- package/dist/markdown.d.mts +60 -0
- package/dist/markdown.d.ts +60 -0
- package/dist/metadata-DmCudMw_.d.mts +22 -0
- package/dist/metadata-xghtOlbR.d.ts +22 -0
- package/dist/middleware.cjs +116 -98
- package/dist/middleware.cjs.map +1 -1
- package/dist/middleware.d.mts +171 -0
- package/dist/middleware.d.ts +171 -0
- package/dist/middleware.mjs +5 -2
- package/dist/navigation-errors-Dvwpzaer.d.mts +13 -0
- package/dist/navigation-errors-Dvwpzaer.d.ts +13 -0
- package/dist/navigation.cjs.map +1 -1
- package/dist/navigation.d.mts +14 -0
- package/dist/navigation.d.ts +14 -0
- package/dist/navigation.mjs +3 -3
- package/dist/observability.d.mts +335 -0
- package/dist/observability.d.ts +335 -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 +247 -28
- package/dist/plugin.cjs.map +1 -1
- package/dist/plugin.d.mts +24 -0
- package/dist/plugin.d.ts +24 -0
- package/dist/plugin.mjs +10 -10
- package/dist/production-runtime-BLxSv9cU.d.ts +79 -0
- package/dist/production-runtime-DFN2_RXq.d.mts +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-Cq5d6qmE.d.mts +6 -0
- package/dist/request-LoxDW3lp.d.ts +6 -0
- package/dist/request.d.mts +25 -0
- package/dist/request.d.ts +25 -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 +226 -0
- package/dist/routes.d.ts +226 -0
- package/dist/runtime-BA9TOSu1.d.mts +231 -0
- package/dist/runtime-Cxpq6xZN.d.mts +27 -0
- package/dist/runtime-DTAQ2HDv.d.ts +231 -0
- package/dist/runtime-bv63eUiO.d.ts +27 -0
- package/dist/server-action-security.cjs +23 -1
- package/dist/server-action-security.cjs.map +1 -1
- package/dist/server-action-security.d.mts +45 -0
- package/dist/server-action-security.d.ts +45 -0
- package/dist/server-action-security.mjs +1 -1
- package/dist/server-fn-client.cjs.map +1 -1
- package/dist/server-fn-client.d.mts +33 -0
- package/dist/server-fn-client.d.ts +33 -0
- package/dist/server-fn-client.mjs +1 -1
- package/dist/server-fn-error-DDh14a0V.d.mts +26 -0
- package/dist/server-fn-error-DDh14a0V.d.ts +26 -0
- package/dist/server-fn.cjs +140 -3
- package/dist/server-fn.cjs.map +1 -1
- package/dist/server-fn.d.mts +121 -0
- package/dist/server-fn.d.ts +121 -0
- package/dist/server-fn.mjs +14 -3
- package/dist/server-plugins.d.mts +57 -0
- package/dist/server-plugins.d.ts +57 -0
- package/dist/server-query-client.d.mts +51 -0
- package/dist/server-query-client.d.ts +51 -0
- package/dist/server-query.cjs +99 -1
- package/dist/server-query.cjs.map +1 -1
- package/dist/server-query.d.mts +37 -0
- package/dist/server-query.d.ts +37 -0
- package/dist/server-query.mjs +3 -3
- package/dist/server.cjs +403 -33
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.mts +51 -0
- package/dist/server.d.ts +51 -0
- package/dist/server.mjs +14 -14
- package/dist/storage.d.mts +52 -0
- package/dist/storage.d.ts +52 -0
- package/dist/testing.cjs.map +1 -1
- package/dist/testing.d.mts +103 -0
- package/dist/testing.d.ts +103 -0
- package/dist/testing.mjs +3 -3
- 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-D1A6-XvH.d.mts +73 -0
- package/dist/types-D1A6-XvH.d.ts +73 -0
- package/dist/types-DTzm4TCl.d.mts +78 -0
- package/dist/types-DTzm4TCl.d.ts +78 -0
- package/dist/utils-B6GaYNJL.d.ts +23 -0
- package/dist/utils-CKSHiip6.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 +255 -30
- package/dist/vite.cjs.map +1 -1
- package/dist/vite.d.mts +24 -0
- package/dist/vite.d.ts +24 -0
- package/dist/vite.mjs +10 -10
- package/dist/workflows.d.mts +110 -0
- package/dist/workflows.d.ts +110 -0
- package/package.json +1 -1
- package/types/middleware.d.ts +36 -11
- package/dist/chunk-32W4QEJP.mjs.map +0 -1
- package/dist/chunk-65A7QIKI.mjs.map +0 -1
- package/dist/chunk-B232I2GP.mjs.map +0 -1
- package/dist/chunk-I4CUBGVF.mjs +0 -93
- package/dist/chunk-I4CUBGVF.mjs.map +0 -1
- package/dist/chunk-L2PE36GQ.mjs.map +0 -1
- package/dist/chunk-PFE6GMNE.mjs.map +0 -1
- package/dist/chunk-PNFQQSRA.mjs.map +0 -1
- package/dist/chunk-UB5UOSHB.mjs.map +0 -1
- package/dist/chunk-UXUAWNO5.mjs.map +0 -1
- package/dist/chunk-VUL55IAX.mjs.map +0 -1
- package/dist/chunk-VY2UYN5R.mjs.map +0 -1
- package/dist/chunk-WDU6QXNK.mjs.map +0 -1
- /package/dist/{chunk-JDEOUK5V.mjs.map → chunk-6YXKHAFU.mjs.map} +0 -0
- /package/dist/{chunk-Z5CQMP54.mjs.map → chunk-ARRYKOI5.mjs.map} +0 -0
- /package/dist/{chunk-KLA67WKG.mjs.map → chunk-B3FFOIWS.mjs.map} +0 -0
- /package/dist/{chunk-OPHK6OJN.mjs.map → chunk-JAEAE27K.mjs.map} +0 -0
- /package/dist/{chunk-H3TE3LOV.mjs.map → chunk-XMFTIVJH.mjs.map} +0 -0
- /package/dist/{devtools-GAZ7F3KL.mjs.map → devtools-K2ERKGNI.mjs.map} +0 -0
package/dist/index.mjs
CHANGED
|
@@ -9,12 +9,12 @@ import {
|
|
|
9
9
|
} from "./chunk-VCANOYFI.mjs";
|
|
10
10
|
import {
|
|
11
11
|
build
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-2FLBZFPG.mjs";
|
|
13
13
|
import "./chunk-4S3ORGFA.mjs";
|
|
14
14
|
import "./chunk-SL6HTIOK.mjs";
|
|
15
15
|
import {
|
|
16
16
|
useServerFn
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-KFTGPFRD.mjs";
|
|
18
18
|
import {
|
|
19
19
|
cookies,
|
|
20
20
|
headers
|
|
@@ -30,23 +30,25 @@ import {
|
|
|
30
30
|
isFarmDocsRequest,
|
|
31
31
|
loadFarmDocsPage,
|
|
32
32
|
resolveFarmDocsContentDir
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-JAEAE27K.mjs";
|
|
34
34
|
import "./chunk-V7RBCSDJ.mjs";
|
|
35
35
|
import {
|
|
36
|
+
UnsupportedRateLimitStorageError,
|
|
36
37
|
farmMiddlewarePlugin,
|
|
37
38
|
getFromMiddleware,
|
|
38
39
|
getRateLimitStatus,
|
|
39
40
|
hasMiddlewareData,
|
|
41
|
+
memoryRateLimitStorage,
|
|
40
42
|
middleware,
|
|
41
43
|
unwrapMiddleware
|
|
42
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-RIXKJPGI.mjs";
|
|
43
45
|
import {
|
|
44
46
|
applyProductionMiddlewareHeaders,
|
|
45
47
|
createProductionMiddlewareRunner
|
|
46
48
|
} from "./chunk-EJ7T4TPB.mjs";
|
|
47
49
|
import {
|
|
48
50
|
farmApiPlugin
|
|
49
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-6YXKHAFU.mjs";
|
|
50
52
|
import {
|
|
51
53
|
FarmEnvironmentError,
|
|
52
54
|
createClientOnlyFn,
|
|
@@ -56,13 +58,13 @@ import {
|
|
|
56
58
|
import {
|
|
57
59
|
FARM_SERVER_QUERY_SYMBOL,
|
|
58
60
|
createServerQuery
|
|
59
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-UMVLB3PN.mjs";
|
|
60
62
|
import {
|
|
61
63
|
FARM_SERVER_FN_SYMBOL,
|
|
62
64
|
_parseServerFnSchema,
|
|
63
65
|
createServerFn,
|
|
64
66
|
createServerMiddleware
|
|
65
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-VPCFICID.mjs";
|
|
66
68
|
import {
|
|
67
69
|
getDeployTargetForPreset,
|
|
68
70
|
getPresetForDeployTarget,
|
|
@@ -72,7 +74,7 @@ import {
|
|
|
72
74
|
resolveDeployConfig,
|
|
73
75
|
resolveDeployOutputPath,
|
|
74
76
|
resolveMigrationsConfig
|
|
75
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-PZXBQKCH.mjs";
|
|
76
78
|
import {
|
|
77
79
|
defineConfig,
|
|
78
80
|
defineFarmConfig
|
|
@@ -96,7 +98,7 @@ import {
|
|
|
96
98
|
createStore,
|
|
97
99
|
useFetcher,
|
|
98
100
|
useMutation
|
|
99
|
-
} from "./chunk-
|
|
101
|
+
} from "./chunk-UCYWGN2P.mjs";
|
|
100
102
|
import {
|
|
101
103
|
installChunkErrorRecovery,
|
|
102
104
|
isChunkLoadError
|
|
@@ -148,7 +150,7 @@ import {
|
|
|
148
150
|
parseRouteRenderingDirective,
|
|
149
151
|
resolveRouteRenderingConfig,
|
|
150
152
|
resolveRouteRenderingConfigFromFile
|
|
151
|
-
} from "./chunk-
|
|
153
|
+
} from "./chunk-T2M5QANG.mjs";
|
|
152
154
|
import {
|
|
153
155
|
APITypeGenerator
|
|
154
156
|
} from "./chunk-LGHEOHBU.mjs";
|
|
@@ -170,7 +172,7 @@ import "./chunk-USWZZUEH.mjs";
|
|
|
170
172
|
import {
|
|
171
173
|
usePathname,
|
|
172
174
|
useSearchParams
|
|
173
|
-
} from "./chunk-
|
|
175
|
+
} from "./chunk-XMFTIVJH.mjs";
|
|
174
176
|
import {
|
|
175
177
|
getFarmRedirectError,
|
|
176
178
|
isFarmNotFoundError,
|
|
@@ -180,7 +182,7 @@ import {
|
|
|
180
182
|
redirect
|
|
181
183
|
} from "./chunk-7HO6AEOP.mjs";
|
|
182
184
|
import "./chunk-USLFXFFH.mjs";
|
|
183
|
-
import "./chunk-
|
|
185
|
+
import "./chunk-E257KFBU.mjs";
|
|
184
186
|
import {
|
|
185
187
|
DEFAULT_FARM_DEVTOOLS_SHORTCUT,
|
|
186
188
|
FARM_DEVTOOLS_LAUNCH_PARAM,
|
|
@@ -203,17 +205,22 @@ import "./chunk-7ZVN3YZI.mjs";
|
|
|
203
205
|
import "./chunk-GY2STC2S.mjs";
|
|
204
206
|
import {
|
|
205
207
|
DEFAULT_SERVER_ACTION_BODY_SIZE_LIMIT,
|
|
208
|
+
FARM_SERVER_FN_FAILURE_SYMBOL,
|
|
209
|
+
ServerActionError,
|
|
206
210
|
ServerActionRequestError,
|
|
211
|
+
ServerFnFailure,
|
|
207
212
|
createServerActionRequestErrorResponse,
|
|
213
|
+
createServerFnTransportError,
|
|
208
214
|
getServerActionExecutionContext,
|
|
209
215
|
getServerActionInvalidations,
|
|
210
216
|
getServerActionSignal,
|
|
217
|
+
isServerFnFailure,
|
|
211
218
|
prepareServerActionRequest,
|
|
212
219
|
resolveServerActionsConfig,
|
|
213
220
|
runWithServerActionRequest,
|
|
214
221
|
sanitizeServerActionError,
|
|
215
222
|
validateServerActionRequest
|
|
216
|
-
} from "./chunk-
|
|
223
|
+
} from "./chunk-ZVMV3THA.mjs";
|
|
217
224
|
import {
|
|
218
225
|
createFarmMarkdownRouteModule,
|
|
219
226
|
createFarmMarkdownRouteModuleFromFile,
|
|
@@ -283,17 +290,6 @@ import {
|
|
|
283
290
|
matchRegisteredIntegrationRoute,
|
|
284
291
|
resolveIntegrationPlugins
|
|
285
292
|
} from "./chunk-K4667E2Q.mjs";
|
|
286
|
-
import {
|
|
287
|
-
MiddlewareManager,
|
|
288
|
-
createContext
|
|
289
|
-
} from "./chunk-MIUW47JX.mjs";
|
|
290
|
-
import {
|
|
291
|
-
_runWithMiddlewareContext,
|
|
292
|
-
_runWithMiddlewareData,
|
|
293
|
-
getMiddlewareContext,
|
|
294
|
-
getMiddlewareData,
|
|
295
|
-
getMiddlewareValue
|
|
296
|
-
} from "./chunk-P7QDS5AT.mjs";
|
|
297
293
|
import {
|
|
298
294
|
createFarmStorage,
|
|
299
295
|
createStorageClient,
|
|
@@ -322,6 +318,17 @@ import {
|
|
|
322
318
|
vercelBlobStorage,
|
|
323
319
|
vercelKVStorage
|
|
324
320
|
} from "./chunk-T4QJQK76.mjs";
|
|
321
|
+
import {
|
|
322
|
+
MiddlewareManager,
|
|
323
|
+
createContext
|
|
324
|
+
} from "./chunk-MIUW47JX.mjs";
|
|
325
|
+
import {
|
|
326
|
+
_runWithMiddlewareContext,
|
|
327
|
+
_runWithMiddlewareData,
|
|
328
|
+
getMiddlewareContext,
|
|
329
|
+
getMiddlewareData,
|
|
330
|
+
getMiddlewareValue
|
|
331
|
+
} from "./chunk-P7QDS5AT.mjs";
|
|
325
332
|
import {
|
|
326
333
|
_runWithAfterNodeResponse,
|
|
327
334
|
_runWithAfterRequest,
|
|
@@ -332,7 +339,7 @@ import "./chunk-QGOHVJ6J.mjs";
|
|
|
332
339
|
import {
|
|
333
340
|
APIRouteManager,
|
|
334
341
|
API_ROUTE_METHODS
|
|
335
|
-
} from "./chunk-
|
|
342
|
+
} from "./chunk-ARRYKOI5.mjs";
|
|
336
343
|
import "./chunk-2ED5Q2GH.mjs";
|
|
337
344
|
import "./chunk-GN72QAIH.mjs";
|
|
338
345
|
import "./chunk-FQYDHKKU.mjs";
|
|
@@ -389,12 +396,12 @@ import {
|
|
|
389
396
|
isWebResponse,
|
|
390
397
|
matchAPIRoute,
|
|
391
398
|
normalizeRouteResponse
|
|
392
|
-
} from "./chunk-
|
|
399
|
+
} from "./chunk-HMRFYJK6.mjs";
|
|
393
400
|
import {
|
|
394
401
|
getCurrentRequest
|
|
395
402
|
} from "./chunk-RHIFZZUI.mjs";
|
|
396
403
|
import "./chunk-LM2YNO4U.mjs";
|
|
397
|
-
import "./chunk-
|
|
404
|
+
import "./chunk-VFDBC3W7.mjs";
|
|
398
405
|
import {
|
|
399
406
|
SPARouter,
|
|
400
407
|
getRouter,
|
|
@@ -408,7 +415,7 @@ import {
|
|
|
408
415
|
usePageState,
|
|
409
416
|
useRouter,
|
|
410
417
|
useScrollRestoration
|
|
411
|
-
} from "./chunk-
|
|
418
|
+
} from "./chunk-B3FFOIWS.mjs";
|
|
412
419
|
import "./chunk-ITN462YM.mjs";
|
|
413
420
|
import {
|
|
414
421
|
FARM_DEPLOYMENT_COOKIE,
|
|
@@ -422,12 +429,13 @@ import {
|
|
|
422
429
|
createFarmDeploymentMismatchResponse,
|
|
423
430
|
createFarmDeploymentRequestHeaders,
|
|
424
431
|
getFarmDeploymentMismatch,
|
|
432
|
+
getFarmPresetRuntime,
|
|
425
433
|
getFarmRequestDeploymentId,
|
|
426
434
|
getFarmResponseDeploymentId,
|
|
427
435
|
isFarmDeploymentMismatchResponse,
|
|
428
436
|
normalizeFarmDeploymentId,
|
|
429
437
|
withFarmDeploymentResponse
|
|
430
|
-
} from "./chunk-
|
|
438
|
+
} from "./chunk-3HIVDX7J.mjs";
|
|
431
439
|
import {
|
|
432
440
|
api,
|
|
433
441
|
defineIntegrationAPI,
|
|
@@ -633,6 +641,7 @@ export {
|
|
|
633
641
|
FARM_DEVTOOLS_LAUNCH_PARAM,
|
|
634
642
|
FARM_DEVTOOLS_PATH,
|
|
635
643
|
FARM_INTEGRATION_INTERNAL_DISPATCH_CONTEXT_KEY,
|
|
644
|
+
FARM_SERVER_FN_FAILURE_SYMBOL,
|
|
636
645
|
FARM_SERVER_FN_SYMBOL,
|
|
637
646
|
FARM_SERVER_QUERY_SYMBOL,
|
|
638
647
|
FarmClientPluginManager,
|
|
@@ -655,7 +664,10 @@ export {
|
|
|
655
664
|
PluginManager,
|
|
656
665
|
SPARouter,
|
|
657
666
|
ScalarAPIDocumentation,
|
|
667
|
+
ServerActionError,
|
|
658
668
|
ServerActionRequestError,
|
|
669
|
+
ServerFnFailure,
|
|
670
|
+
UnsupportedRateLimitStorageError,
|
|
659
671
|
_parseServerFnSchema,
|
|
660
672
|
_runWithAfterNodeResponse,
|
|
661
673
|
_runWithAfterRequest,
|
|
@@ -744,6 +756,7 @@ export {
|
|
|
744
756
|
createServerAPIClient,
|
|
745
757
|
createServerActionRequestErrorResponse,
|
|
746
758
|
createServerFn,
|
|
759
|
+
createServerFnTransportError,
|
|
747
760
|
createServerMiddleware,
|
|
748
761
|
createServerOnlyFn,
|
|
749
762
|
createServerQuery,
|
|
@@ -797,6 +810,7 @@ export {
|
|
|
797
810
|
getFarmDocsRouteTypeEntries,
|
|
798
811
|
getFarmIntegrationPluginServerRuntime,
|
|
799
812
|
getFarmLayerAliases,
|
|
813
|
+
getFarmPresetRuntime,
|
|
800
814
|
getFarmRedirectError,
|
|
801
815
|
getFarmRequestDeploymentId,
|
|
802
816
|
getFarmResponseDeploymentId,
|
|
@@ -860,6 +874,7 @@ export {
|
|
|
860
874
|
isProgrammaticRouteManifest,
|
|
861
875
|
isProgrammaticRoutesFileName,
|
|
862
876
|
isSSGModule,
|
|
877
|
+
isServerFnFailure,
|
|
863
878
|
isWebResponse,
|
|
864
879
|
jsonStream,
|
|
865
880
|
layout,
|
|
@@ -877,6 +892,7 @@ export {
|
|
|
877
892
|
matchRegisteredIntegrationRoute,
|
|
878
893
|
matchRoute,
|
|
879
894
|
matchSSGPage,
|
|
895
|
+
memoryRateLimitStorage,
|
|
880
896
|
memoryStorage,
|
|
881
897
|
mergeFarmRouteRuntimeConfigs,
|
|
882
898
|
mergeScheduledTasks,
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/provider.tsx","../src/openapi/scalar-component.tsx","../src/openapi/docs-route.tsx"],"sourcesContent":["import React, { createContext, useContext, type ReactNode } from \"react\";\nimport type { FarmConfig } from \"./types\";\n\ninterface FarmContextValue {\n config: FarmConfig;\n basePath: string;\n}\n\nconst FarmContext = createContext<FarmContextValue | null>(null);\n\ninterface FarmProviderProps {\n children: ReactNode;\n config: FarmConfig;\n}\n\n/**\n * Farm.js context provider for client-side components\n */\nexport function FarmProvider({ children, config }: FarmProviderProps) {\n const value: FarmContextValue = {\n config,\n basePath: config.basePath || \"/\",\n };\n\n return <FarmContext.Provider value={value}>{children}</FarmContext.Provider>;\n}\n\n/**\n * Hook to access Farm.js configuration and utilities\n */\nexport function useFarm(): FarmContextValue {\n const context = useContext(FarmContext);\n\n if (!context) {\n throw new Error(\"useFarm must be used within a FarmProvider\");\n }\n\n return context;\n}\n\n/**\n * Hook to get the current base path\n */\nexport function useBasePath(): string {\n const { basePath } = useFarm();\n return basePath;\n}\n","import React from \"react\";\n\ninterface ScalarAPIDocumentationProps {\n spec: any;\n config?: {\n theme?: \"default\" | \"purple\" | \"blue\" | \"green\" | \"red\" | \"yellow\";\n layout?: \"modern\" | \"classic\";\n showSidebar?: boolean;\n hideDownloadButton?: boolean;\n hideTryItPanel?: boolean;\n };\n}\n\nexport function ScalarAPIDocumentation({ spec, config = {} }: ScalarAPIDocumentationProps) {\n const [isLoaded, setIsLoaded] = React.useState(false);\n\n React.useEffect(() => {\n // Dynamically import Scalar components\n const loadScalar = async () => {\n try {\n // Load Scalar CSS\n const cssLink = document.createElement(\"link\");\n cssLink.rel = \"stylesheet\";\n cssLink.href = \"https://cdn.jsdelivr.net/npm/@scalar/api-reference@latest/dist/style.css\";\n document.head.appendChild(cssLink);\n\n // Load Scalar JS\n const script = document.createElement(\"script\");\n script.src =\n \"https://cdn.jsdelivr.net/npm/@scalar/api-reference@latest/dist/browser/standalone.js\";\n script.onload = () => setIsLoaded(true);\n document.head.appendChild(script);\n } catch (error) {\n console.error(\"Failed to load Scalar:\", error);\n }\n };\n\n loadScalar();\n }, []);\n\n React.useEffect(() => {\n if (isLoaded && window.ScalarApiReference) {\n // Initialize Scalar\n const container = document.getElementById(\"scalar-api-reference\");\n if (container) {\n window.ScalarApiReference({\n spec,\n theme: config.theme || \"default\",\n layout: config.layout || \"modern\",\n showSidebar: config.showSidebar !== false,\n hideDownloadButton: config.hideDownloadButton || false,\n hideTryItPanel: config.hideTryItPanel || false,\n });\n }\n }\n }, [isLoaded, spec, config]);\n\n return (\n <div className=\"scalar-container\">\n <div id=\"scalar-api-reference\" style={{ height: \"100vh\", width: \"100%\" }} />\n </div>\n );\n}\n\n// Extend window type for Scalar\ndeclare global {\n interface Window {\n ScalarApiReference: (config: any) => void;\n }\n}\n","import React from \"react\";\nimport { ScalarAPIDocumentation } from \"./scalar-component\";\n\ninterface DocsRouteProps {\n spec: any;\n config?: any;\n}\n\nexport function DocsRoute({ spec, config }: DocsRouteProps) {\n return (\n <html lang=\"en\">\n <head>\n <meta charSet=\"utf-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n <link rel=\"icon\" href=\"data:,\" />\n <title>{config?.title || \"API Documentation\"}</title>\n <style>{`\n body {\n margin: 0;\n padding: 0;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;\n }\n .scalar-container {\n height: 100vh;\n width: 100%;\n }\n `}</style>\n </head>\n <body>\n <ScalarAPIDocumentation spec={spec} config={config} />\n </body>\n </html>\n );\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/provider.tsx","../src/openapi/scalar-component.tsx","../src/openapi/docs-route.tsx"],"sourcesContent":["import React, { createContext, useContext, type ReactNode } from \"react\";\nimport type { FarmConfig } from \"./types\";\n\ninterface FarmContextValue {\n config: FarmConfig;\n basePath: string;\n}\n\nconst FarmContext = createContext<FarmContextValue | null>(null);\n\ninterface FarmProviderProps {\n children: ReactNode;\n config: FarmConfig;\n}\n\n/**\n * Farm.js context provider for client-side components\n */\nexport function FarmProvider({ children, config }: FarmProviderProps) {\n const value: FarmContextValue = {\n config,\n basePath: config.basePath || \"/\",\n };\n\n return <FarmContext.Provider value={value}>{children}</FarmContext.Provider>;\n}\n\n/**\n * Hook to access Farm.js configuration and utilities\n */\nexport function useFarm(): FarmContextValue {\n const context = useContext(FarmContext);\n\n if (!context) {\n throw new Error(\"useFarm must be used within a FarmProvider\");\n }\n\n return context;\n}\n\n/**\n * Hook to get the current base path\n */\nexport function useBasePath(): string {\n const { basePath } = useFarm();\n return basePath;\n}\n","import React from \"react\";\n\ninterface ScalarAPIDocumentationProps {\n spec: any;\n config?: {\n theme?: \"default\" | \"purple\" | \"blue\" | \"green\" | \"red\" | \"yellow\";\n layout?: \"modern\" | \"classic\";\n showSidebar?: boolean;\n hideDownloadButton?: boolean;\n hideTryItPanel?: boolean;\n };\n}\n\nexport function ScalarAPIDocumentation({ spec, config = {} }: ScalarAPIDocumentationProps) {\n const [isLoaded, setIsLoaded] = React.useState(false);\n\n React.useEffect(() => {\n // Dynamically import Scalar components\n const loadScalar = async () => {\n try {\n // Load Scalar CSS\n const cssLink = document.createElement(\"link\");\n cssLink.rel = \"stylesheet\";\n cssLink.href = \"https://cdn.jsdelivr.net/npm/@scalar/api-reference@latest/dist/style.css\";\n document.head.appendChild(cssLink);\n\n // Load Scalar JS\n const script = document.createElement(\"script\");\n script.src =\n \"https://cdn.jsdelivr.net/npm/@scalar/api-reference@latest/dist/browser/standalone.js\";\n script.onload = () => setIsLoaded(true);\n document.head.appendChild(script);\n } catch (error) {\n console.error(\"Failed to load Scalar:\", error);\n }\n };\n\n loadScalar();\n }, []);\n\n React.useEffect(() => {\n if (isLoaded && window.ScalarApiReference) {\n // Initialize Scalar\n const container = document.getElementById(\"scalar-api-reference\");\n if (container) {\n window.ScalarApiReference({\n spec,\n theme: config.theme || \"default\",\n layout: config.layout || \"modern\",\n showSidebar: config.showSidebar !== false,\n hideDownloadButton: config.hideDownloadButton || false,\n hideTryItPanel: config.hideTryItPanel || false,\n });\n }\n }\n }, [isLoaded, spec, config]);\n\n return (\n <div className=\"scalar-container\">\n <div id=\"scalar-api-reference\" style={{ height: \"100vh\", width: \"100%\" }} />\n </div>\n );\n}\n\n// Extend window type for Scalar\ndeclare global {\n interface Window {\n ScalarApiReference: (config: any) => void;\n }\n}\n","import React from \"react\";\nimport { ScalarAPIDocumentation } from \"./scalar-component\";\n\ninterface DocsRouteProps {\n spec: any;\n config?: any;\n}\n\nexport function DocsRoute({ spec, config }: DocsRouteProps) {\n return (\n <html lang=\"en\">\n <head>\n <meta charSet=\"utf-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n <link rel=\"icon\" href=\"data:,\" />\n <title>{config?.title || \"API Documentation\"}</title>\n <style>{`\n body {\n margin: 0;\n padding: 0;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;\n }\n .scalar-container {\n height: 100vh;\n width: 100%;\n }\n `}</style>\n </head>\n <body>\n <ScalarAPIDocumentation spec={spec} config={config} />\n </body>\n </html>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAgB,iBAAAA,gBAAe,kBAAkC;AAwBxD;AAhBT,IAAM,cAAcC,eAAuC,IAAI;AAUxD,SAAS,aAAa,EAAE,UAAU,OAAO,GAAsB;AACpE,QAAM,QAA0B;AAAA,IAC9B;AAAA,IACA,UAAU,OAAO,YAAY;AAAA,EAC/B;AAEA,SAAO,oBAAC,YAAY,UAAZ,EAAqB,OAAe,UAAS;AACvD;AAPgB;;;AClBhB,OAAOC,YAAW;AA2DZ,gBAAAC,YAAA;AA9CC,SAAS,uBAAuB,EAAE,MAAM,SAAS,CAAC,EAAE,GAAgC;AACzF,QAAM,CAAC,UAAU,WAAW,IAAIC,OAAM,SAAS,KAAK;AAEpD,EAAAA,OAAM,UAAU,MAAM;AAEpB,UAAM,aAAa,mCAAY;AAC7B,UAAI;AAEF,cAAM,UAAU,SAAS,cAAc,MAAM;AAC7C,gBAAQ,MAAM;AACd,gBAAQ,OAAO;AACf,iBAAS,KAAK,YAAY,OAAO;AAGjC,cAAM,SAAS,SAAS,cAAc,QAAQ;AAC9C,eAAO,MACL;AACF,eAAO,SAAS,MAAM,YAAY,IAAI;AACtC,iBAAS,KAAK,YAAY,MAAM;AAAA,MAClC,SAAS,OAAO;AACd,gBAAQ,MAAM,0BAA0B,KAAK;AAAA,MAC/C;AAAA,IACF,GAjBmB;AAmBnB,eAAW;AAAA,EACb,GAAG,CAAC,CAAC;AAEL,EAAAA,OAAM,UAAU,MAAM;AACpB,QAAI,YAAY,OAAO,oBAAoB;AAEzC,YAAM,YAAY,SAAS,eAAe,sBAAsB;AAChE,UAAI,WAAW;AACb,eAAO,mBAAmB;AAAA,UACxB;AAAA,UACA,OAAO,OAAO,SAAS;AAAA,UACvB,QAAQ,OAAO,UAAU;AAAA,UACzB,aAAa,OAAO,gBAAgB;AAAA,UACpC,oBAAoB,OAAO,sBAAsB;AAAA,UACjD,gBAAgB,OAAO,kBAAkB;AAAA,QAC3C,CAAC;AAAA,MACH;AAAA,IACF;AAAA,EACF,GAAG,CAAC,UAAU,MAAM,MAAM,CAAC;AAE3B,SACE,gBAAAD,KAAC,SAAI,WAAU,oBACb,0BAAAA,KAAC,SAAI,IAAG,wBAAuB,OAAO,EAAE,QAAQ,SAAS,OAAO,OAAO,GAAG,GAC5E;AAEJ;AAjDgB;;;ACFV,SACE,OAAAE,MADF;AAHC,SAAS,UAAU,EAAE,MAAM,OAAO,GAAmB;AAC1D,SACE,qBAAC,UAAK,MAAK,MACT;AAAA,yBAAC,UACC;AAAA,sBAAAA,KAAC,UAAK,SAAQ,SAAQ;AAAA,MACtB,gBAAAA,KAAC,UAAK,MAAK,YAAW,SAAQ,uCAAsC;AAAA,MACpE,gBAAAA,KAAC,UAAK,KAAI,QAAO,MAAK,UAAS;AAAA,MAC/B,gBAAAA,KAAC,WAAO,kBAAQ,SAAS,qBAAoB;AAAA,MAC7C,gBAAAA,KAAC,WAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WAUN;AAAA,OACJ;AAAA,IACA,gBAAAA,KAAC,UACC,0BAAAA,KAAC,0BAAuB,MAAY,QAAgB,GACtD;AAAA,KACF;AAEJ;AAzBgB;","names":["createContext","createContext","React","jsx","React","jsx"]}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
type FarmIntegrationAPIMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD";
|
|
2
|
+
type FarmIntegrationAPIBodyFormat = "json" | "form" | "none";
|
|
3
|
+
type FarmIntegrationAPIResponseFormat = "json" | "text" | "response";
|
|
4
|
+
interface FarmIntegrationAPIOperation<TBody = never, TQuery = never, TResponse = unknown, TServer extends boolean = false, TMethod extends FarmIntegrationAPIMethod = FarmIntegrationAPIMethod> {
|
|
5
|
+
readonly kind: "farm-integration-api-operation";
|
|
6
|
+
path: string;
|
|
7
|
+
method: TMethod;
|
|
8
|
+
bodyFormat?: FarmIntegrationAPIBodyFormat;
|
|
9
|
+
responseFormat?: FarmIntegrationAPIResponseFormat;
|
|
10
|
+
headers?: Record<string, string>;
|
|
11
|
+
credentials?: RequestCredentials;
|
|
12
|
+
isServer?: TServer;
|
|
13
|
+
__pathless?: boolean;
|
|
14
|
+
__types?: {
|
|
15
|
+
body: TBody;
|
|
16
|
+
query: TQuery;
|
|
17
|
+
response: TResponse;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
type FarmIntegrationAPI = {
|
|
21
|
+
[key: string]: FarmIntegrationAPI | FarmIntegrationAPIOperation<any, any, any, any, any>;
|
|
22
|
+
};
|
|
23
|
+
type FarmIntegrationRouteOperationCarrier<TPath extends string = string, TOperation extends FarmIntegrationAPIOperation<any, any, any, any, any> = FarmIntegrationAPIOperation<any, any, any, any, any>> = {
|
|
24
|
+
path: TPath;
|
|
25
|
+
__operation: TOperation;
|
|
26
|
+
};
|
|
27
|
+
type IntegrationAPIBuilderOptions<TServer extends boolean = false> = Omit<FarmIntegrationAPIOperation<any, any, any, TServer>, "kind" | "method" | "path" | "__pathless" | "__types">;
|
|
28
|
+
declare function defineIntegrationAPIOperation<TBody = never, TQuery = never, TResponse = unknown, TServer extends boolean = false, TMethod extends FarmIntegrationAPIMethod = FarmIntegrationAPIMethod>(operation: Omit<FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, TMethod>, "kind" | "__types">): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, TMethod>;
|
|
29
|
+
declare function defineIntegrationAPI<TAPI extends FarmIntegrationAPI>(api: TAPI): TAPI;
|
|
30
|
+
declare function get<TResponse = unknown, TServer extends boolean = false>(path: string, options?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<never, never, TResponse, TServer, "GET">;
|
|
31
|
+
declare function get<TQuery = never, TResponse = unknown, TServer extends boolean = false>(path: string, options?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<never, TQuery, TResponse, TServer, "GET">;
|
|
32
|
+
declare function get<TResponse = unknown, TServer extends boolean = false>(options?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<never, never, TResponse, TServer, "GET">;
|
|
33
|
+
declare function get<TQuery = never, TResponse = unknown, TServer extends boolean = false>(options?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<never, TQuery, TResponse, TServer, "GET">;
|
|
34
|
+
type RouteOperationsToAPI<TOperations extends readonly FarmIntegrationAPIOperation<any, any, any, any, any>[]> = {
|
|
35
|
+
[TMethod in Lowercase<TOperations[number]["method"] & string>]: Extract<TOperations[number], {
|
|
36
|
+
method: Uppercase<TMethod>;
|
|
37
|
+
}>;
|
|
38
|
+
};
|
|
39
|
+
type StripRouteClientPrefix<TPath extends string> = TPath extends `/api/${string}/${infer TRest}` ? TRest : TPath extends `/${string}/${infer TRest}` ? TRest : TPath extends `/${infer TRest}` ? TRest : TPath;
|
|
40
|
+
type NormalizeRouteSegment<TSegment extends string> = TSegment extends `[...${infer TName}]` ? TName : TSegment extends `[${infer TName}]` ? TName : TSegment extends `${infer TName}(${string}` ? TName : CamelCaseRouteSegment<TSegment>;
|
|
41
|
+
type CamelCaseRouteSegment<TSegment extends string> = TSegment extends `${infer THead}-${infer TTail}` ? `${THead}${Capitalize<CamelCaseRouteSegment<TTail>>}` : TSegment;
|
|
42
|
+
type RouteNamespaceFromPath<TPath extends string, TOperation extends FarmIntegrationAPIOperation<any, any, any, any, any>> = TPath extends `${infer THead}/${infer TTail}` ? {
|
|
43
|
+
[TKey in NormalizeRouteSegment<THead>]: RouteNamespaceFromPath<TTail, TOperation>;
|
|
44
|
+
} : {
|
|
45
|
+
[TKey in NormalizeRouteSegment<TPath>]: {
|
|
46
|
+
[TMethod in Lowercase<TOperation["method"] & string>]: TOperation;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
type UnionToIntersection<TUnion> = (TUnion extends unknown ? (value: TUnion) => void : never) extends (value: infer TIntersection) => void ? TIntersection : never;
|
|
50
|
+
type ExpandRecursively<TValue> = TValue extends (...args: any[]) => any ? TValue : TValue extends object ? {
|
|
51
|
+
[TKey in keyof TValue]: ExpandRecursively<TValue[TKey]>;
|
|
52
|
+
} : TValue;
|
|
53
|
+
type RoutesToAPI<TRoutes extends readonly FarmIntegrationRouteOperationCarrier<string, any>[]> = ExpandRecursively<UnionToIntersection<TRoutes[number] extends FarmIntegrationRouteOperationCarrier<infer TPath, infer TOperation> ? RouteNamespaceFromPath<StripRouteClientPrefix<TPath>, TOperation> : never>>;
|
|
54
|
+
type InferIntegrationAPIFromRoutes<TRoutes extends readonly FarmIntegrationRouteOperationCarrier<string, any>[]> = RoutesToAPI<TRoutes>;
|
|
55
|
+
declare function route<TAPI extends FarmIntegrationAPI>(path: string, definition: TAPI): TAPI;
|
|
56
|
+
declare function route<TOperations extends readonly FarmIntegrationAPIOperation<any, any, any, any, any>[]>(path: string, ...operations: TOperations): RouteOperationsToAPI<TOperations>;
|
|
57
|
+
declare function fromRoutes<TRoutes extends readonly FarmIntegrationRouteOperationCarrier<string, any>[]>(routes: TRoutes): RoutesToAPI<TRoutes>;
|
|
58
|
+
declare const api: {
|
|
59
|
+
get: typeof get;
|
|
60
|
+
route: typeof route;
|
|
61
|
+
fromRoutes: typeof fromRoutes;
|
|
62
|
+
post<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "POST">;
|
|
63
|
+
put<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "PUT">;
|
|
64
|
+
patch<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "PATCH">;
|
|
65
|
+
delete<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "DELETE">;
|
|
66
|
+
options<TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<never, TQuery, TResponse, TServer, "OPTIONS">;
|
|
67
|
+
head<TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<never, TQuery, TResponse, TServer, "HEAD">;
|
|
68
|
+
form: {
|
|
69
|
+
post<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "POST">;
|
|
70
|
+
put<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "PUT">;
|
|
71
|
+
patch<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "PATCH">;
|
|
72
|
+
delete<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "DELETE">;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
declare const endpoint: {
|
|
76
|
+
get: typeof get;
|
|
77
|
+
route: typeof route;
|
|
78
|
+
fromRoutes: typeof fromRoutes;
|
|
79
|
+
post<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "POST">;
|
|
80
|
+
put<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "PUT">;
|
|
81
|
+
patch<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "PATCH">;
|
|
82
|
+
delete<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "DELETE">;
|
|
83
|
+
options<TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<never, TQuery, TResponse, TServer, "OPTIONS">;
|
|
84
|
+
head<TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<never, TQuery, TResponse, TServer, "HEAD">;
|
|
85
|
+
form: {
|
|
86
|
+
post<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "POST">;
|
|
87
|
+
put<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "PUT">;
|
|
88
|
+
patch<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "PATCH">;
|
|
89
|
+
delete<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "DELETE">;
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
export { type FarmIntegrationAPI as F, type InferIntegrationAPIFromRoutes as I, type FarmIntegrationAPIOperation as a, api as b, defineIntegrationAPIOperation as c, defineIntegrationAPI as d, type FarmIntegrationAPIBodyFormat as e, type FarmIntegrationAPIMethod as f, type FarmIntegrationAPIResponseFormat as g, type FarmIntegrationRouteOperationCarrier as h, endpoint as i };
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
type FarmIntegrationAPIMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD";
|
|
2
|
+
type FarmIntegrationAPIBodyFormat = "json" | "form" | "none";
|
|
3
|
+
type FarmIntegrationAPIResponseFormat = "json" | "text" | "response";
|
|
4
|
+
interface FarmIntegrationAPIOperation<TBody = never, TQuery = never, TResponse = unknown, TServer extends boolean = false, TMethod extends FarmIntegrationAPIMethod = FarmIntegrationAPIMethod> {
|
|
5
|
+
readonly kind: "farm-integration-api-operation";
|
|
6
|
+
path: string;
|
|
7
|
+
method: TMethod;
|
|
8
|
+
bodyFormat?: FarmIntegrationAPIBodyFormat;
|
|
9
|
+
responseFormat?: FarmIntegrationAPIResponseFormat;
|
|
10
|
+
headers?: Record<string, string>;
|
|
11
|
+
credentials?: RequestCredentials;
|
|
12
|
+
isServer?: TServer;
|
|
13
|
+
__pathless?: boolean;
|
|
14
|
+
__types?: {
|
|
15
|
+
body: TBody;
|
|
16
|
+
query: TQuery;
|
|
17
|
+
response: TResponse;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
type FarmIntegrationAPI = {
|
|
21
|
+
[key: string]: FarmIntegrationAPI | FarmIntegrationAPIOperation<any, any, any, any, any>;
|
|
22
|
+
};
|
|
23
|
+
type FarmIntegrationRouteOperationCarrier<TPath extends string = string, TOperation extends FarmIntegrationAPIOperation<any, any, any, any, any> = FarmIntegrationAPIOperation<any, any, any, any, any>> = {
|
|
24
|
+
path: TPath;
|
|
25
|
+
__operation: TOperation;
|
|
26
|
+
};
|
|
27
|
+
type IntegrationAPIBuilderOptions<TServer extends boolean = false> = Omit<FarmIntegrationAPIOperation<any, any, any, TServer>, "kind" | "method" | "path" | "__pathless" | "__types">;
|
|
28
|
+
declare function defineIntegrationAPIOperation<TBody = never, TQuery = never, TResponse = unknown, TServer extends boolean = false, TMethod extends FarmIntegrationAPIMethod = FarmIntegrationAPIMethod>(operation: Omit<FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, TMethod>, "kind" | "__types">): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, TMethod>;
|
|
29
|
+
declare function defineIntegrationAPI<TAPI extends FarmIntegrationAPI>(api: TAPI): TAPI;
|
|
30
|
+
declare function get<TResponse = unknown, TServer extends boolean = false>(path: string, options?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<never, never, TResponse, TServer, "GET">;
|
|
31
|
+
declare function get<TQuery = never, TResponse = unknown, TServer extends boolean = false>(path: string, options?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<never, TQuery, TResponse, TServer, "GET">;
|
|
32
|
+
declare function get<TResponse = unknown, TServer extends boolean = false>(options?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<never, never, TResponse, TServer, "GET">;
|
|
33
|
+
declare function get<TQuery = never, TResponse = unknown, TServer extends boolean = false>(options?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<never, TQuery, TResponse, TServer, "GET">;
|
|
34
|
+
type RouteOperationsToAPI<TOperations extends readonly FarmIntegrationAPIOperation<any, any, any, any, any>[]> = {
|
|
35
|
+
[TMethod in Lowercase<TOperations[number]["method"] & string>]: Extract<TOperations[number], {
|
|
36
|
+
method: Uppercase<TMethod>;
|
|
37
|
+
}>;
|
|
38
|
+
};
|
|
39
|
+
type StripRouteClientPrefix<TPath extends string> = TPath extends `/api/${string}/${infer TRest}` ? TRest : TPath extends `/${string}/${infer TRest}` ? TRest : TPath extends `/${infer TRest}` ? TRest : TPath;
|
|
40
|
+
type NormalizeRouteSegment<TSegment extends string> = TSegment extends `[...${infer TName}]` ? TName : TSegment extends `[${infer TName}]` ? TName : TSegment extends `${infer TName}(${string}` ? TName : CamelCaseRouteSegment<TSegment>;
|
|
41
|
+
type CamelCaseRouteSegment<TSegment extends string> = TSegment extends `${infer THead}-${infer TTail}` ? `${THead}${Capitalize<CamelCaseRouteSegment<TTail>>}` : TSegment;
|
|
42
|
+
type RouteNamespaceFromPath<TPath extends string, TOperation extends FarmIntegrationAPIOperation<any, any, any, any, any>> = TPath extends `${infer THead}/${infer TTail}` ? {
|
|
43
|
+
[TKey in NormalizeRouteSegment<THead>]: RouteNamespaceFromPath<TTail, TOperation>;
|
|
44
|
+
} : {
|
|
45
|
+
[TKey in NormalizeRouteSegment<TPath>]: {
|
|
46
|
+
[TMethod in Lowercase<TOperation["method"] & string>]: TOperation;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
type UnionToIntersection<TUnion> = (TUnion extends unknown ? (value: TUnion) => void : never) extends (value: infer TIntersection) => void ? TIntersection : never;
|
|
50
|
+
type ExpandRecursively<TValue> = TValue extends (...args: any[]) => any ? TValue : TValue extends object ? {
|
|
51
|
+
[TKey in keyof TValue]: ExpandRecursively<TValue[TKey]>;
|
|
52
|
+
} : TValue;
|
|
53
|
+
type RoutesToAPI<TRoutes extends readonly FarmIntegrationRouteOperationCarrier<string, any>[]> = ExpandRecursively<UnionToIntersection<TRoutes[number] extends FarmIntegrationRouteOperationCarrier<infer TPath, infer TOperation> ? RouteNamespaceFromPath<StripRouteClientPrefix<TPath>, TOperation> : never>>;
|
|
54
|
+
type InferIntegrationAPIFromRoutes<TRoutes extends readonly FarmIntegrationRouteOperationCarrier<string, any>[]> = RoutesToAPI<TRoutes>;
|
|
55
|
+
declare function route<TAPI extends FarmIntegrationAPI>(path: string, definition: TAPI): TAPI;
|
|
56
|
+
declare function route<TOperations extends readonly FarmIntegrationAPIOperation<any, any, any, any, any>[]>(path: string, ...operations: TOperations): RouteOperationsToAPI<TOperations>;
|
|
57
|
+
declare function fromRoutes<TRoutes extends readonly FarmIntegrationRouteOperationCarrier<string, any>[]>(routes: TRoutes): RoutesToAPI<TRoutes>;
|
|
58
|
+
declare const api: {
|
|
59
|
+
get: typeof get;
|
|
60
|
+
route: typeof route;
|
|
61
|
+
fromRoutes: typeof fromRoutes;
|
|
62
|
+
post<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "POST">;
|
|
63
|
+
put<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "PUT">;
|
|
64
|
+
patch<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "PATCH">;
|
|
65
|
+
delete<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "DELETE">;
|
|
66
|
+
options<TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<never, TQuery, TResponse, TServer, "OPTIONS">;
|
|
67
|
+
head<TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<never, TQuery, TResponse, TServer, "HEAD">;
|
|
68
|
+
form: {
|
|
69
|
+
post<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "POST">;
|
|
70
|
+
put<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "PUT">;
|
|
71
|
+
patch<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "PATCH">;
|
|
72
|
+
delete<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "DELETE">;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
declare const endpoint: {
|
|
76
|
+
get: typeof get;
|
|
77
|
+
route: typeof route;
|
|
78
|
+
fromRoutes: typeof fromRoutes;
|
|
79
|
+
post<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "POST">;
|
|
80
|
+
put<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "PUT">;
|
|
81
|
+
patch<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "PATCH">;
|
|
82
|
+
delete<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "DELETE">;
|
|
83
|
+
options<TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<never, TQuery, TResponse, TServer, "OPTIONS">;
|
|
84
|
+
head<TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<never, TQuery, TResponse, TServer, "HEAD">;
|
|
85
|
+
form: {
|
|
86
|
+
post<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "POST">;
|
|
87
|
+
put<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "PUT">;
|
|
88
|
+
patch<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "PATCH">;
|
|
89
|
+
delete<TBody = never, TResponse = unknown, TQuery = never, TServer extends boolean = false>(pathOrOptions?: string | IntegrationAPIBuilderOptions<TServer>, maybeOptions?: IntegrationAPIBuilderOptions<TServer>): FarmIntegrationAPIOperation<TBody, TQuery, TResponse, TServer, "DELETE">;
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
export { type FarmIntegrationAPI as F, type InferIntegrationAPIFromRoutes as I, type FarmIntegrationAPIOperation as a, api as b, defineIntegrationAPIOperation as c, defineIntegrationAPI as d, type FarmIntegrationAPIBodyFormat as e, type FarmIntegrationAPIMethod as f, type FarmIntegrationAPIResponseFormat as g, type FarmIntegrationRouteOperationCarrier as h, endpoint as i };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import 'react';
|
|
2
|
+
export { F as FarmIntegrationAPI, e as FarmIntegrationAPIBodyFormat, f as FarmIntegrationAPIMethod, a as FarmIntegrationAPIOperation, g as FarmIntegrationAPIResponseFormat, b as api, d as defineIntegrationAPI, c as defineIntegrationAPIOperation } from './integration-api-CHT2OKAf.mjs';
|
|
3
|
+
export { ck as DefinedIntegration, bD as FARM_INTEGRATION_INTERNAL_DISPATCH_CONTEXT_KEY, a0 as FarmIntegration, bo as FarmIntegrationCategory, bH as FarmIntegrationConfigContext, bI as FarmIntegrationConfigDefinition, bJ as FarmIntegrationConfigInput, bO as FarmIntegrationData, bY as FarmIntegrationDocumentNavigation, ce as FarmIntegrationEndpointValue, cf as FarmIntegrationEndpoints, ch as FarmIntegrationEndpointsFactory, cg as FarmIntegrationEndpointsFactoryContext, bP as FarmIntegrationHandlerContext, bA as FarmIntegrationInputSchema, bM as FarmIntegrationLifecycleContext, bN as FarmIntegrationLifecycleHook, bK as FarmIntegrationLifecycleLogLevel, bL as FarmIntegrationLifecycleLogger, c7 as FarmIntegrationLogEvent, c6 as FarmIntegrationLogPhase, c8 as FarmIntegrationLogger, bV as FarmIntegrationMiddleware, bX as FarmIntegrationProvider, bW as FarmIntegrationProviderProps, bC as FarmIntegrationRequestContextStore, bS as FarmIntegrationRoute, bG as FarmIntegrationRouteArgs, bE as FarmIntegrationRouteDb, cb as FarmIntegrationRouteFactory, bR as FarmIntegrationRouteHook, bQ as FarmIntegrationRouteHookContext, bv as FarmIntegrationRouteInput, bB as FarmIntegrationRouteInputSchemas, bt as FarmIntegrationRouteInputSource, bs as FarmIntegrationRouteMethod, bU as FarmIntegrationRouteMiddleware, bq as FarmIntegrationRouteParamValue, br as FarmIntegrationRouteParams, bF as FarmIntegrationRouteStorageArgs, cd as FarmIntegrationRoutesFactory, cc as FarmIntegrationRoutesFactoryContext, c4 as FarmIntegrationSchema, c0 as FarmIntegrationSchemaConstraint, b$ as FarmIntegrationSchemaField, bZ as FarmIntegrationSchemaFieldType, c1 as FarmIntegrationSchemaModel, c2 as FarmIntegrationSchemaModelExtension, c3 as FarmIntegrationSchemaModelOverride, b_ as FarmIntegrationSchemaReference, bp as FarmIntegrationSlot, bz as FarmIntegrationStandardValidationResult, bx as FarmIntegrationValidationErrorLike, bw as FarmIntegrationValidationIssue, bu as FarmIntegrationValidationPathSegment, by as FarmIntegrationValidationResult, c9 as FarmIntegrationsUserConfig, bT as FarmTypedIntegrationRoute, ci as createIntegrationRoute, cl as defineIntegration, c5 as defineIntegrationSchema, cx as dispatchIntegrationRequest, ca as getFarmIntegrationPluginServerRuntime, cp as getIntegrationDocumentNavigationMatchers, co as getIntegrationProviders, cq as getIntegrationSchemas, cw as getRegisteredIntegrationAPIManifest, cr as getRegisteredIntegrationRuntime, ct as getRegisteredIntegrationSchemas, cs as getRegisteredIntegrations, cj as integrationRoute, cm as isFarmIntegration, cu as matchIntegrationRoute, cv as matchRegisteredIntegrationRoute, cn as resolveIntegrationPlugins } from './client-plugins-278AvYHE.mjs';
|
|
4
|
+
import './plugin-BJDf43dc.mjs';
|
|
5
|
+
import 'http';
|
|
6
|
+
import './types-D1A6-XvH.mjs';
|
|
7
|
+
import 'db0';
|
|
8
|
+
import 'unstorage';
|
|
9
|
+
import '@farming-labs/orm';
|
|
10
|
+
import './types-DTzm4TCl.mjs';
|
|
11
|
+
import '@farming-labs/docs';
|
|
12
|
+
import './markdown.mjs';
|
|
13
|
+
import './observability.mjs';
|
|
14
|
+
import 'vite';
|
|
15
|
+
import './workflows.mjs';
|
|
16
|
+
import './cron.mjs';
|
|
17
|
+
import './env.mjs';
|
|
18
|
+
import './server-action-security.mjs';
|
|
19
|
+
import './server-fn-error-DDh14a0V.mjs';
|
|
20
|
+
import './image-config-Duob7wER.mjs';
|
|
21
|
+
import './types-BMxWr97v.mjs';
|
|
22
|
+
import './cache.mjs';
|
|
23
|
+
import './route-runtime-DoOHzCAD.mjs';
|
|
24
|
+
import './font.mjs';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import 'react';
|
|
2
|
+
export { F as FarmIntegrationAPI, e as FarmIntegrationAPIBodyFormat, f as FarmIntegrationAPIMethod, a as FarmIntegrationAPIOperation, g as FarmIntegrationAPIResponseFormat, b as api, d as defineIntegrationAPI, c as defineIntegrationAPIOperation } from './integration-api-CHT2OKAf.js';
|
|
3
|
+
export { ck as DefinedIntegration, bD as FARM_INTEGRATION_INTERNAL_DISPATCH_CONTEXT_KEY, a0 as FarmIntegration, bo as FarmIntegrationCategory, bH as FarmIntegrationConfigContext, bI as FarmIntegrationConfigDefinition, bJ as FarmIntegrationConfigInput, bO as FarmIntegrationData, bY as FarmIntegrationDocumentNavigation, ce as FarmIntegrationEndpointValue, cf as FarmIntegrationEndpoints, ch as FarmIntegrationEndpointsFactory, cg as FarmIntegrationEndpointsFactoryContext, bP as FarmIntegrationHandlerContext, bA as FarmIntegrationInputSchema, bM as FarmIntegrationLifecycleContext, bN as FarmIntegrationLifecycleHook, bK as FarmIntegrationLifecycleLogLevel, bL as FarmIntegrationLifecycleLogger, c7 as FarmIntegrationLogEvent, c6 as FarmIntegrationLogPhase, c8 as FarmIntegrationLogger, bV as FarmIntegrationMiddleware, bX as FarmIntegrationProvider, bW as FarmIntegrationProviderProps, bC as FarmIntegrationRequestContextStore, bS as FarmIntegrationRoute, bG as FarmIntegrationRouteArgs, bE as FarmIntegrationRouteDb, cb as FarmIntegrationRouteFactory, bR as FarmIntegrationRouteHook, bQ as FarmIntegrationRouteHookContext, bv as FarmIntegrationRouteInput, bB as FarmIntegrationRouteInputSchemas, bt as FarmIntegrationRouteInputSource, bs as FarmIntegrationRouteMethod, bU as FarmIntegrationRouteMiddleware, bq as FarmIntegrationRouteParamValue, br as FarmIntegrationRouteParams, bF as FarmIntegrationRouteStorageArgs, cd as FarmIntegrationRoutesFactory, cc as FarmIntegrationRoutesFactoryContext, c4 as FarmIntegrationSchema, c0 as FarmIntegrationSchemaConstraint, b$ as FarmIntegrationSchemaField, bZ as FarmIntegrationSchemaFieldType, c1 as FarmIntegrationSchemaModel, c2 as FarmIntegrationSchemaModelExtension, c3 as FarmIntegrationSchemaModelOverride, b_ as FarmIntegrationSchemaReference, bp as FarmIntegrationSlot, bz as FarmIntegrationStandardValidationResult, bx as FarmIntegrationValidationErrorLike, bw as FarmIntegrationValidationIssue, bu as FarmIntegrationValidationPathSegment, by as FarmIntegrationValidationResult, c9 as FarmIntegrationsUserConfig, bT as FarmTypedIntegrationRoute, ci as createIntegrationRoute, cl as defineIntegration, c5 as defineIntegrationSchema, cx as dispatchIntegrationRequest, ca as getFarmIntegrationPluginServerRuntime, cp as getIntegrationDocumentNavigationMatchers, co as getIntegrationProviders, cq as getIntegrationSchemas, cw as getRegisteredIntegrationAPIManifest, cr as getRegisteredIntegrationRuntime, ct as getRegisteredIntegrationSchemas, cs as getRegisteredIntegrations, cj as integrationRoute, cm as isFarmIntegration, cu as matchIntegrationRoute, cv as matchRegisteredIntegrationRoute, cn as resolveIntegrationPlugins } from './client-plugins-CTQAkr7R.js';
|
|
4
|
+
import './plugin-BJDf43dc.js';
|
|
5
|
+
import 'http';
|
|
6
|
+
import './types-D1A6-XvH.js';
|
|
7
|
+
import 'db0';
|
|
8
|
+
import 'unstorage';
|
|
9
|
+
import '@farming-labs/orm';
|
|
10
|
+
import './types-DTzm4TCl.js';
|
|
11
|
+
import '@farming-labs/docs';
|
|
12
|
+
import './markdown.js';
|
|
13
|
+
import './observability.js';
|
|
14
|
+
import 'vite';
|
|
15
|
+
import './workflows.js';
|
|
16
|
+
import './cron.js';
|
|
17
|
+
import './env.js';
|
|
18
|
+
import './server-action-security.js';
|
|
19
|
+
import './server-fn-error-DDh14a0V.js';
|
|
20
|
+
import './image-config-Duob7wER.js';
|
|
21
|
+
import './types-BMxWr97v.js';
|
|
22
|
+
import './cache.js';
|
|
23
|
+
import './route-runtime-DoOHzCAD.js';
|
|
24
|
+
import './font.js';
|