@farm.js/core 0.1.0-beta.21 → 0.1.0-beta.23
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 +97 -0
- package/dist/agent-runtime.d.ts +97 -0
- package/dist/api/route-manager.d.mts +68 -0
- package/dist/api/route-manager.d.ts +68 -0
- package/dist/api/runtime.d.mts +3 -0
- package/dist/api/runtime.d.ts +3 -0
- package/dist/api.cjs +22 -19
- package/dist/api.cjs.map +1 -1
- package/dist/api.d.mts +50 -0
- package/dist/api.d.ts +50 -0
- package/dist/api.mjs +2 -1
- package/dist/app-CTFnOJaI.d.ts +308 -0
- package/dist/app-DA6ospIq.d.mts +308 -0
- package/dist/app-markdown.d.mts +25 -0
- package/dist/app-markdown.d.ts +25 -0
- package/dist/cache.d.mts +192 -0
- package/dist/cache.d.ts +192 -0
- package/dist/{chunk-MIUW47JX.mjs → chunk-2PEJGY5V.mjs} +15 -20
- package/dist/chunk-2PEJGY5V.mjs.map +1 -0
- package/dist/{chunk-RIXKJPGI.mjs → chunk-42325TLU.mjs} +2 -2
- package/dist/chunk-4IVNW5QD.mjs +82 -0
- package/dist/chunk-4IVNW5QD.mjs.map +1 -0
- package/dist/{chunk-I3UWA2P2.mjs → chunk-5NOVWCFL.mjs} +2 -2
- package/dist/chunk-5NOVWCFL.mjs.map +1 -0
- package/dist/chunk-D42BNPZH.mjs +79 -0
- package/dist/chunk-D42BNPZH.mjs.map +1 -0
- package/dist/{chunk-LLPN5SEZ.mjs → chunk-DVPRBMU2.mjs} +2 -2
- package/dist/{chunk-VIC7NJ77.mjs → chunk-FJGTYLCO.mjs} +67 -20
- package/dist/chunk-FJGTYLCO.mjs.map +1 -0
- package/dist/chunk-GIELMNBG.mjs +15 -0
- package/dist/chunk-GIELMNBG.mjs.map +1 -0
- package/dist/chunk-GQVQESLY.mjs +25 -0
- package/dist/chunk-GQVQESLY.mjs.map +1 -0
- package/dist/chunk-H53KVQUU.mjs +48 -0
- package/dist/chunk-H53KVQUU.mjs.map +1 -0
- package/dist/chunk-HCGQYYHI.mjs +1 -0
- package/dist/chunk-HCGQYYHI.mjs.map +1 -0
- package/dist/{chunk-4EATUJFO.mjs → chunk-ICTGDDV4.mjs} +20 -22
- package/dist/chunk-ICTGDDV4.mjs.map +1 -0
- package/dist/{chunk-UCYWGN2P.mjs → chunk-OHNSROHS.mjs} +1 -1
- package/dist/{chunk-FRPWCMMG.mjs → chunk-SBWOTAX4.mjs} +63 -2
- package/dist/chunk-SBWOTAX4.mjs.map +1 -0
- package/dist/{chunk-FKKM7HVF.mjs → chunk-TX54PXAJ.mjs} +109 -58
- package/dist/chunk-TX54PXAJ.mjs.map +1 -0
- package/dist/{chunk-CEVMYGDL.mjs → chunk-YD5IRKVS.mjs} +13 -9
- package/dist/chunk-YD5IRKVS.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-CCilIb_G.d.mts +2092 -0
- package/dist/client-plugins-DuuleQKk.d.ts +2092 -0
- package/dist/client-plugins.d.mts +25 -0
- package/dist/client-plugins.d.ts +25 -0
- package/dist/client.cjs +122 -35
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.mts +454 -0
- package/dist/client.d.ts +454 -0
- package/dist/client.mjs +13 -2
- package/dist/config.d.mts +32 -0
- package/dist/config.d.ts +32 -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.d.mts +36 -0
- package/dist/deployment.d.ts +36 -0
- package/dist/{devtools-52FYXIEK.mjs → devtools-326RBQCN.mjs} +7 -6
- package/dist/{devtools-52FYXIEK.mjs.map → devtools-326RBQCN.mjs.map} +1 -1
- 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 +6 -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 +496 -123
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +480 -0
- package/dist/index.d.ts +480 -0
- package/dist/index.mjs +70 -52
- 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 +25 -0
- package/dist/integrations.d.ts +25 -0
- package/dist/internal/build-runtime.cjs +386 -83
- package/dist/internal/build-runtime.cjs.map +1 -1
- package/dist/internal/build-runtime.d.mts +42 -0
- package/dist/internal/build-runtime.d.ts +42 -0
- package/dist/internal/build-runtime.mjs +17 -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 +41 -0
- package/dist/internal/config-runtime.cjs.map +1 -1
- package/dist/internal/config-runtime.d.mts +42 -0
- package/dist/internal/config-runtime.d.ts +42 -0
- package/dist/internal/config-runtime.mjs +5 -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.cjs +178 -0
- package/dist/internal/production-runtime.cjs.map +1 -1
- package/dist/internal/production-runtime.d.mts +80 -0
- package/dist/internal/production-runtime.d.ts +80 -0
- package/dist/internal/production-runtime.mjs +13 -1
- package/dist/internal/production-runtime.mjs.map +1 -1
- 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-DyPRG0wX.d.ts +22 -0
- package/dist/metadata-_GHcAySx.d.mts +22 -0
- package/dist/middleware.cjs +17 -17
- package/dist/middleware.cjs.map +1 -1
- package/dist/middleware.d.mts +172 -0
- package/dist/middleware.d.ts +172 -0
- package/dist/middleware.mjs +3 -2
- package/dist/navigation-errors-Dvwpzaer.d.mts +13 -0
- package/dist/navigation-errors-Dvwpzaer.d.ts +13 -0
- package/dist/navigation.d.mts +14 -0
- package/dist/navigation.d.ts +14 -0
- 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 +261 -62
- package/dist/plugin.cjs.map +1 -1
- package/dist/plugin.d.mts +25 -0
- package/dist/plugin.d.ts +25 -0
- package/dist/plugin.mjs +13 -9
- package/dist/production-runtime-C4cO3esK.d.mts +81 -0
- package/dist/production-runtime-DrEy8kBO.d.ts +81 -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-B2PpOxYK.d.mts +6 -0
- package/dist/request-D40lt6aN.d.ts +6 -0
- package/dist/request.d.mts +26 -0
- package/dist/request.d.ts +26 -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 +227 -0
- package/dist/routes.d.ts +227 -0
- package/dist/runtime-Bpp-c28k.d.ts +231 -0
- package/dist/runtime-Cxpq6xZN.d.mts +27 -0
- package/dist/runtime-Q3u74Nbq.d.mts +231 -0
- package/dist/runtime-bv63eUiO.d.ts +27 -0
- package/dist/server-action-security.d.mts +45 -0
- package/dist/server-action-security.d.ts +45 -0
- package/dist/server-fn-client.d.mts +33 -0
- package/dist/server-fn-client.d.ts +33 -0
- package/dist/server-fn-error-DDh14a0V.d.mts +26 -0
- package/dist/server-fn-error-DDh14a0V.d.ts +26 -0
- package/dist/server-fn.d.mts +121 -0
- package/dist/server-fn.d.ts +121 -0
- package/dist/server-plugins.d.mts +58 -0
- package/dist/server-plugins.d.ts +58 -0
- package/dist/server-query-client.d.mts +51 -0
- package/dist/server-query-client.d.ts +51 -0
- package/dist/server-query.d.mts +37 -0
- package/dist/server-query.d.ts +37 -0
- package/dist/server.cjs +285 -85
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.mts +53 -0
- package/dist/server.d.ts +53 -0
- package/dist/server.mjs +26 -31
- 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 +104 -0
- package/dist/testing.d.ts +104 -0
- package/dist/theme/client.cjs +115 -0
- package/dist/theme/client.cjs.map +1 -0
- package/dist/theme/client.d.mts +17 -0
- package/dist/theme/client.d.ts +17 -0
- package/dist/theme/client.mjs +16 -0
- package/dist/theme/client.mjs.map +1 -0
- package/dist/theme/index.cjs +71 -0
- package/dist/theme/index.cjs.map +1 -0
- package/dist/theme/index.d.mts +6 -0
- package/dist/theme/index.d.ts +6 -0
- package/dist/theme/index.mjs +9 -0
- package/dist/theme/index.mjs.map +1 -0
- package/dist/theme/server.cjs +191 -0
- package/dist/theme/server.cjs.map +1 -0
- package/dist/theme/server.d.mts +8 -0
- package/dist/theme/server.d.ts +8 -0
- package/dist/theme/server.mjs +18 -0
- package/dist/theme/server.mjs.map +1 -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-CsR8fpgF.d.mts +30 -0
- package/dist/types-CsR8fpgF.d.ts +30 -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-3sQgfkya.d.ts +23 -0
- package/dist/utils-Bop7bly-.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 +285 -64
- package/dist/vite.cjs.map +1 -1
- package/dist/vite.d.mts +25 -0
- package/dist/vite.d.ts +25 -0
- package/dist/vite.mjs +13 -9
- package/dist/workflows-CusFV6mn.d.mts +153 -0
- package/dist/workflows-CusFV6mn.d.ts +153 -0
- package/dist/workflows.d.mts +1 -0
- package/dist/workflows.d.ts +1 -0
- package/package.json +25 -1
- package/dist/chunk-4EATUJFO.mjs.map +0 -1
- package/dist/chunk-CEVMYGDL.mjs.map +0 -1
- package/dist/chunk-FKKM7HVF.mjs.map +0 -1
- package/dist/chunk-FRPWCMMG.mjs.map +0 -1
- package/dist/chunk-I3UWA2P2.mjs.map +0 -1
- package/dist/chunk-MIUW47JX.mjs.map +0 -1
- package/dist/chunk-VIC7NJ77.mjs.map +0 -1
- /package/dist/{chunk-RIXKJPGI.mjs.map → chunk-42325TLU.mjs.map} +0 -0
- /package/dist/{chunk-LLPN5SEZ.mjs.map → chunk-DVPRBMU2.mjs.map} +0 -0
- /package/dist/{chunk-UCYWGN2P.mjs.map → chunk-OHNSROHS.mjs.map} +0 -0
package/dist/index.mjs
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createIntegrationOrm,
|
|
3
|
-
farmIntegrationSchemaToOrmSchema,
|
|
4
|
-
resolveIntegrationOrmRuntimeClient
|
|
5
|
-
} from "./chunk-5ZGPRGWV.mjs";
|
|
6
1
|
import {
|
|
7
2
|
OpenAPIGenerator,
|
|
8
3
|
OpenAPIManager
|
|
9
4
|
} from "./chunk-VCANOYFI.mjs";
|
|
10
5
|
import {
|
|
11
6
|
build
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-4S3ORGFA.mjs";
|
|
7
|
+
} from "./chunk-FJGTYLCO.mjs";
|
|
14
8
|
import "./chunk-SL6HTIOK.mjs";
|
|
9
|
+
import "./chunk-4S3ORGFA.mjs";
|
|
10
|
+
import {
|
|
11
|
+
createIntegrationOrm,
|
|
12
|
+
farmIntegrationSchemaToOrmSchema,
|
|
13
|
+
resolveIntegrationOrmRuntimeClient
|
|
14
|
+
} from "./chunk-5ZGPRGWV.mjs";
|
|
15
15
|
import {
|
|
16
16
|
useServerFn
|
|
17
17
|
} from "./chunk-KFTGPFRD.mjs";
|
|
@@ -19,6 +19,7 @@ import {
|
|
|
19
19
|
cookies,
|
|
20
20
|
headers
|
|
21
21
|
} from "./chunk-AZ7YUVNR.mjs";
|
|
22
|
+
import "./chunk-HCGQYYHI.mjs";
|
|
22
23
|
import {
|
|
23
24
|
createDocsAPI,
|
|
24
25
|
createFarmDocsAPIHandler,
|
|
@@ -30,7 +31,7 @@ import {
|
|
|
30
31
|
isFarmDocsRequest,
|
|
31
32
|
loadFarmDocsPage,
|
|
32
33
|
resolveFarmDocsContentDir
|
|
33
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-DVPRBMU2.mjs";
|
|
34
35
|
import "./chunk-V7RBCSDJ.mjs";
|
|
35
36
|
import {
|
|
36
37
|
UnsupportedRateLimitStorageError,
|
|
@@ -41,14 +42,14 @@ import {
|
|
|
41
42
|
memoryRateLimitStorage,
|
|
42
43
|
middleware,
|
|
43
44
|
unwrapMiddleware
|
|
44
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-42325TLU.mjs";
|
|
45
46
|
import {
|
|
46
47
|
applyProductionMiddlewareHeaders,
|
|
47
48
|
createProductionMiddlewareRunner
|
|
48
49
|
} from "./chunk-DXV2Y4HU.mjs";
|
|
49
50
|
import {
|
|
50
51
|
farmApiPlugin
|
|
51
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-ICTGDDV4.mjs";
|
|
52
53
|
import {
|
|
53
54
|
FarmEnvironmentError,
|
|
54
55
|
createClientOnlyFn,
|
|
@@ -74,7 +75,7 @@ import {
|
|
|
74
75
|
resolveDeployConfig,
|
|
75
76
|
resolveDeployOutputPath,
|
|
76
77
|
resolveMigrationsConfig
|
|
77
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-YD5IRKVS.mjs";
|
|
78
79
|
import {
|
|
79
80
|
defineConfig,
|
|
80
81
|
defineFarmConfig
|
|
@@ -99,7 +100,7 @@ import {
|
|
|
99
100
|
createStore,
|
|
100
101
|
useFetcher,
|
|
101
102
|
useMutation
|
|
102
|
-
} from "./chunk-
|
|
103
|
+
} from "./chunk-OHNSROHS.mjs";
|
|
103
104
|
import {
|
|
104
105
|
installChunkErrorRecovery,
|
|
105
106
|
isChunkLoadError
|
|
@@ -111,6 +112,12 @@ import {
|
|
|
111
112
|
prefetchServerQuery,
|
|
112
113
|
useServerQuery
|
|
113
114
|
} from "./chunk-J5YWQVI5.mjs";
|
|
115
|
+
import {
|
|
116
|
+
getTheme,
|
|
117
|
+
setTheme,
|
|
118
|
+
toggleTheme,
|
|
119
|
+
useTheme
|
|
120
|
+
} from "./chunk-D42BNPZH.mjs";
|
|
114
121
|
import {
|
|
115
122
|
APIClientError,
|
|
116
123
|
FARM_API_ROUTE_META_SYMBOL,
|
|
@@ -150,12 +157,18 @@ import {
|
|
|
150
157
|
parseRouteRenderingDirective,
|
|
151
158
|
resolveRouteRenderingConfig,
|
|
152
159
|
resolveRouteRenderingConfigFromFile
|
|
153
|
-
} from "./chunk-
|
|
160
|
+
} from "./chunk-TX54PXAJ.mjs";
|
|
154
161
|
import {
|
|
155
162
|
APITypeGenerator
|
|
156
163
|
} from "./chunk-LGHEOHBU.mjs";
|
|
157
|
-
import "./chunk-FRPWCMMG.mjs";
|
|
158
164
|
import "./chunk-53MVSX3R.mjs";
|
|
165
|
+
import "./chunk-3XNTL3FQ.mjs";
|
|
166
|
+
import "./chunk-SBWOTAX4.mjs";
|
|
167
|
+
import {
|
|
168
|
+
createEnvTypeDeclarations,
|
|
169
|
+
generateEnvTypes
|
|
170
|
+
} from "./chunk-CGIXMLSY.mjs";
|
|
171
|
+
import "./chunk-USWZZUEH.mjs";
|
|
159
172
|
import {
|
|
160
173
|
defineLayoutFonts,
|
|
161
174
|
localFont,
|
|
@@ -163,12 +176,6 @@ import {
|
|
|
163
176
|
resolveFarmLayoutFonts
|
|
164
177
|
} from "./chunk-6ZXIQSXE.mjs";
|
|
165
178
|
import "./chunk-V6WE6JSZ.mjs";
|
|
166
|
-
import "./chunk-3XNTL3FQ.mjs";
|
|
167
|
-
import {
|
|
168
|
-
createEnvTypeDeclarations,
|
|
169
|
-
generateEnvTypes
|
|
170
|
-
} from "./chunk-CGIXMLSY.mjs";
|
|
171
|
-
import "./chunk-USWZZUEH.mjs";
|
|
172
179
|
import {
|
|
173
180
|
usePathname,
|
|
174
181
|
useSearchParams
|
|
@@ -181,6 +188,7 @@ import {
|
|
|
181
188
|
permanentRedirect,
|
|
182
189
|
redirect
|
|
183
190
|
} from "./chunk-7HO6AEOP.mjs";
|
|
191
|
+
import "./chunk-4IVNW5QD.mjs";
|
|
184
192
|
import "./chunk-USLFXFFH.mjs";
|
|
185
193
|
import "./chunk-E257KFBU.mjs";
|
|
186
194
|
import {
|
|
@@ -201,8 +209,37 @@ import {
|
|
|
201
209
|
getFarmSourceRoots,
|
|
202
210
|
resolveFarmLayers
|
|
203
211
|
} from "./chunk-74YTBPTY.mjs";
|
|
204
|
-
import "./chunk-7ZVN3YZI.mjs";
|
|
205
212
|
import "./chunk-GY2STC2S.mjs";
|
|
213
|
+
import "./chunk-7ZVN3YZI.mjs";
|
|
214
|
+
import {
|
|
215
|
+
DEFAULT_FARM_WORKFLOW_DIRS,
|
|
216
|
+
DEFAULT_FARM_WORKFLOW_ROUTE,
|
|
217
|
+
DEFAULT_FARM_WORKFLOW_SECRET_ENV,
|
|
218
|
+
applyFarmWorkflowVercelCrons,
|
|
219
|
+
createFarmWorkflowRequestHandler,
|
|
220
|
+
createFarmWorkflowVercelCrons,
|
|
221
|
+
defineCron,
|
|
222
|
+
defineTask,
|
|
223
|
+
defineWorkflow,
|
|
224
|
+
discoverFarmWorkflows,
|
|
225
|
+
prepareFarmWorkflowsForNitro,
|
|
226
|
+
resolveWorkflowsConfig,
|
|
227
|
+
runFarmWorkflowModule
|
|
228
|
+
} from "./chunk-4E6VRJ6P.mjs";
|
|
229
|
+
import {
|
|
230
|
+
DEFAULT_FARM_CRON_SECRET_ENV,
|
|
231
|
+
FARM_CRON_MANIFEST,
|
|
232
|
+
applyFarmCronVercelCrons,
|
|
233
|
+
createFarmCronCloudflareConfig,
|
|
234
|
+
createFarmCronCloudflareTriggers,
|
|
235
|
+
createFarmCronManifest,
|
|
236
|
+
createFarmCronVercelCrons,
|
|
237
|
+
cronRoute,
|
|
238
|
+
isCronRequestAuthorized,
|
|
239
|
+
mergeScheduledTasks,
|
|
240
|
+
prepareFarmCronForNitro,
|
|
241
|
+
resolveCronConfig
|
|
242
|
+
} from "./chunk-GXASWWJU.mjs";
|
|
206
243
|
import {
|
|
207
244
|
DEFAULT_SERVER_ACTION_BODY_SIZE_LIMIT,
|
|
208
245
|
FARM_SERVER_FN_FAILURE_SYMBOL,
|
|
@@ -221,6 +258,9 @@ import {
|
|
|
221
258
|
sanitizeServerActionError,
|
|
222
259
|
validateServerActionRequest
|
|
223
260
|
} from "./chunk-WORFTBLU.mjs";
|
|
261
|
+
import {
|
|
262
|
+
resolveFarmThemeConfig
|
|
263
|
+
} from "./chunk-H53KVQUU.mjs";
|
|
224
264
|
import {
|
|
225
265
|
createFarmMarkdownRouteModule,
|
|
226
266
|
createFarmMarkdownRouteModuleFromFile,
|
|
@@ -241,35 +281,6 @@ import {
|
|
|
241
281
|
resolveMarkdownConfig,
|
|
242
282
|
resolveMarkdownMirrorTarget
|
|
243
283
|
} from "./chunk-7FBJLMQH.mjs";
|
|
244
|
-
import {
|
|
245
|
-
DEFAULT_FARM_WORKFLOW_DIRS,
|
|
246
|
-
DEFAULT_FARM_WORKFLOW_ROUTE,
|
|
247
|
-
DEFAULT_FARM_WORKFLOW_SECRET_ENV,
|
|
248
|
-
applyFarmWorkflowVercelCrons,
|
|
249
|
-
createFarmWorkflowRequestHandler,
|
|
250
|
-
createFarmWorkflowVercelCrons,
|
|
251
|
-
defineCron,
|
|
252
|
-
defineTask,
|
|
253
|
-
defineWorkflow,
|
|
254
|
-
discoverFarmWorkflows,
|
|
255
|
-
prepareFarmWorkflowsForNitro,
|
|
256
|
-
resolveWorkflowsConfig,
|
|
257
|
-
runFarmWorkflowModule
|
|
258
|
-
} from "./chunk-4E6VRJ6P.mjs";
|
|
259
|
-
import {
|
|
260
|
-
DEFAULT_FARM_CRON_SECRET_ENV,
|
|
261
|
-
FARM_CRON_MANIFEST,
|
|
262
|
-
applyFarmCronVercelCrons,
|
|
263
|
-
createFarmCronCloudflareConfig,
|
|
264
|
-
createFarmCronCloudflareTriggers,
|
|
265
|
-
createFarmCronManifest,
|
|
266
|
-
createFarmCronVercelCrons,
|
|
267
|
-
cronRoute,
|
|
268
|
-
isCronRequestAuthorized,
|
|
269
|
-
mergeScheduledTasks,
|
|
270
|
-
prepareFarmCronForNitro,
|
|
271
|
-
resolveCronConfig
|
|
272
|
-
} from "./chunk-GXASWWJU.mjs";
|
|
273
284
|
import {
|
|
274
285
|
FARM_INTEGRATION_INTERNAL_DISPATCH_CONTEXT_KEY,
|
|
275
286
|
createIntegrationRoute,
|
|
@@ -322,7 +333,7 @@ import {
|
|
|
322
333
|
import {
|
|
323
334
|
MiddlewareManager,
|
|
324
335
|
createContext
|
|
325
|
-
} from "./chunk-
|
|
336
|
+
} from "./chunk-2PEJGY5V.mjs";
|
|
326
337
|
import {
|
|
327
338
|
_runWithMiddlewareContext,
|
|
328
339
|
_runWithMiddlewareData,
|
|
@@ -336,6 +347,7 @@ import {
|
|
|
336
347
|
_withAfterNodeMiddleware,
|
|
337
348
|
after
|
|
338
349
|
} from "./chunk-E6EPN5BT.mjs";
|
|
350
|
+
import "./chunk-GIELMNBG.mjs";
|
|
339
351
|
import "./chunk-QGOHVJ6J.mjs";
|
|
340
352
|
import {
|
|
341
353
|
APIRouteManager,
|
|
@@ -403,7 +415,7 @@ import {
|
|
|
403
415
|
getCurrentRequest
|
|
404
416
|
} from "./chunk-RHIFZZUI.mjs";
|
|
405
417
|
import "./chunk-LM2YNO4U.mjs";
|
|
406
|
-
import "./chunk-
|
|
418
|
+
import "./chunk-5NOVWCFL.mjs";
|
|
407
419
|
import {
|
|
408
420
|
SPARouter,
|
|
409
421
|
getRouter,
|
|
@@ -419,6 +431,7 @@ import {
|
|
|
419
431
|
useScrollRestoration
|
|
420
432
|
} from "./chunk-B3FFOIWS.mjs";
|
|
421
433
|
import "./chunk-ITN462YM.mjs";
|
|
434
|
+
import "./chunk-GQVQESLY.mjs";
|
|
422
435
|
import {
|
|
423
436
|
FARM_DEPLOYMENT_COOKIE,
|
|
424
437
|
FARM_DEPLOYMENT_ID_HEADER,
|
|
@@ -922,6 +935,7 @@ export {
|
|
|
922
935
|
getServerActionInvalidations,
|
|
923
936
|
getServerActionSignal,
|
|
924
937
|
getStorage,
|
|
938
|
+
getTheme,
|
|
925
939
|
globFiles,
|
|
926
940
|
hasFarmRouteRuntimeControls,
|
|
927
941
|
hasISR,
|
|
@@ -1038,6 +1052,7 @@ export {
|
|
|
1038
1052
|
resolveFarmLayoutFonts,
|
|
1039
1053
|
resolveFarmRouteRuleRuntimeConfig,
|
|
1040
1054
|
resolveFarmRouteRuntimeConfig,
|
|
1055
|
+
resolveFarmThemeConfig,
|
|
1041
1056
|
resolveIntegrationOrmRuntimeClient,
|
|
1042
1057
|
resolveIntegrationPlugins,
|
|
1043
1058
|
resolveMarkdownConfig,
|
|
@@ -1064,12 +1079,14 @@ export {
|
|
|
1064
1079
|
segmentsToPattern,
|
|
1065
1080
|
serverEnv,
|
|
1066
1081
|
setEnv,
|
|
1082
|
+
setTheme,
|
|
1067
1083
|
snapshotDeferredData,
|
|
1068
1084
|
sqliteStorage,
|
|
1069
1085
|
storageCacheAdapter,
|
|
1070
1086
|
titleFromMarkdown,
|
|
1071
1087
|
toFormData,
|
|
1072
1088
|
toViteModuleId,
|
|
1089
|
+
toggleTheme,
|
|
1073
1090
|
unstable_cache,
|
|
1074
1091
|
unwrapMiddleware,
|
|
1075
1092
|
updateTag,
|
|
@@ -1085,6 +1102,7 @@ export {
|
|
|
1085
1102
|
useSearchParams,
|
|
1086
1103
|
useServerFn,
|
|
1087
1104
|
useServerQuery,
|
|
1105
|
+
useTheme,
|
|
1088
1106
|
validateServerActionRequest,
|
|
1089
1107
|
vercelBlobStorage,
|
|
1090
1108
|
vercelKVStorage,
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/provider.tsx","../src/hmr.ts","../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 type { ViteDevServer, ModuleNode } from \"vite\";\nimport { logger } from \"./utils\";\n\nexport class HMRManager {\n private server: ViteDevServer;\n\n constructor(server: ViteDevServer) {\n this.server = server;\n }\n\n /**\n * Send HMR update to client\n */\n async send(payload: any) {\n this.server.ws.send(payload);\n }\n\n /**\n * Trigger full page reload\n */\n async reloadPage() {\n this.server.ws.send({\n type: \"full-reload\",\n path: \"*\",\n });\n }\n\n /**\n * Handle file change and trigger HMR\n */\n async handleFileChange(file: string) {\n const module = await this.server.moduleGraph.getModuleByUrl(file);\n\n if (!module) {\n return;\n }\n\n // Invalidate module\n this.server.moduleGraph.invalidateModule(module);\n\n // Get affected modules\n const affectedModules = this.getAffectedModules(module);\n\n if (affectedModules.size === 0) {\n return;\n }\n\n if (file.includes(\"/app/\") && (file.endsWith(\"page.tsx\") || file.endsWith(\"page.ts\"))) {\n await this.reloadPage();\n return;\n }\n\n if (file.includes(\"/app/\") && (file.endsWith(\"layout.tsx\") || file.endsWith(\"layout.ts\"))) {\n await this.reloadPage();\n return;\n }\n // Send update for other files\n this.send({\n type: \"update\",\n updates: Array.from(affectedModules).map((m) => ({\n type: m.type === \"css\" ? \"css-update\" : \"js-update\",\n path: m.url,\n acceptedPath: m.url,\n timestamp: Date.now(),\n })),\n });\n }\n\n /**\n * Get all affected modules in the dependency graph\n */\n private getAffectedModules(module: ModuleNode): Set<ModuleNode> {\n const affected = new Set<ModuleNode>();\n const seen = new Set<ModuleNode>();\n\n const traverse = (mod: ModuleNode) => {\n if (seen.has(mod)) return;\n seen.add(mod);\n affected.add(mod);\n\n // Traverse importers\n for (const importer of mod.importers) {\n if (!importer.isSelfAccepting) {\n traverse(importer);\n }\n }\n };\n\n traverse(module);\n return affected;\n }\n\n /**\n * Handle custom HMR events from client\n */\n onClientMessage(event: string, callback: (data: any) => void) {\n // Vite handles this via ws.on\n }\n}\n\n/**\n * Create HMR client code for injection\n */\nexport function createHMRClientCode(): string {\n return `\n// Farm.js HMR Client\nif (import.meta.hot) {\n // Accept HMR updates for this module\n import.meta.hot.accept((newModule) => {\n if (newModule) {\n // Module updated, trigger re-render\n window.location.reload();\n }\n });\n\n // Listen for custom Farm.js events\n import.meta.hot.on('farm:route-update', (data) => {\n console.log('Route updated:', data.path);\n window.location.reload();\n });\n\n // Handle CSS updates\n import.meta.hot.on('vite:beforeUpdate', () => {\n console.log('[Farm.js] HMR update incoming...');\n });\n\n import.meta.hot.on('vite:afterUpdate', () => {\n console.log('[Farm.js] HMR update applied ✓');\n });\n\n // Handle errors\n import.meta.hot.on('vite:error', (err) => {\n console.error('[Farm.js] HMR error:', err);\n });\n}\n`;\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;;;ACfT,IAAM,cAAN,MAAM,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ACjD,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"]}
|
|
1
|
+
{"version":3,"sources":["../src/provider.tsx","../src/hmr.ts","../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 type { ViteDevServer, ModuleNode } from \"vite\";\nimport { logger } from \"./utils\";\n\nexport class HMRManager {\n private server: ViteDevServer;\n\n constructor(server: ViteDevServer) {\n this.server = server;\n }\n\n /**\n * Send HMR update to client\n */\n async send(payload: any) {\n this.server.ws.send(payload);\n }\n\n /**\n * Trigger full page reload\n */\n async reloadPage() {\n this.server.ws.send({\n type: \"full-reload\",\n path: \"*\",\n });\n }\n\n /**\n * Handle file change and trigger HMR\n */\n async handleFileChange(file: string) {\n const module = await this.server.moduleGraph.getModuleByUrl(file);\n\n if (!module) {\n return;\n }\n\n // Invalidate module\n this.server.moduleGraph.invalidateModule(module);\n\n // Get affected modules\n const affectedModules = this.getAffectedModules(module);\n\n if (affectedModules.size === 0) {\n return;\n }\n\n if (file.includes(\"/app/\") && (file.endsWith(\"page.tsx\") || file.endsWith(\"page.ts\"))) {\n await this.reloadPage();\n return;\n }\n\n if (file.includes(\"/app/\") && (file.endsWith(\"layout.tsx\") || file.endsWith(\"layout.ts\"))) {\n await this.reloadPage();\n return;\n }\n // Send update for other files\n this.send({\n type: \"update\",\n updates: Array.from(affectedModules).map((m) => ({\n type: m.type === \"css\" ? \"css-update\" : \"js-update\",\n path: m.url,\n acceptedPath: m.url,\n timestamp: Date.now(),\n })),\n });\n }\n\n /**\n * Get all affected modules in the dependency graph\n */\n private getAffectedModules(module: ModuleNode): Set<ModuleNode> {\n const affected = new Set<ModuleNode>();\n const seen = new Set<ModuleNode>();\n\n const traverse = (mod: ModuleNode) => {\n if (seen.has(mod)) return;\n seen.add(mod);\n affected.add(mod);\n\n // Traverse importers\n for (const importer of mod.importers) {\n if (!importer.isSelfAccepting) {\n traverse(importer);\n }\n }\n };\n\n traverse(module);\n return affected;\n }\n\n /**\n * Handle custom HMR events from client\n */\n onClientMessage(event: string, callback: (data: any) => void) {\n // Vite handles this via ws.on\n }\n}\n\n/**\n * Create HMR client code for injection\n */\nexport function createHMRClientCode(): string {\n return `\n// Farm.js HMR Client\nif (import.meta.hot) {\n // Accept HMR updates for this module\n import.meta.hot.accept((newModule) => {\n if (newModule) {\n // Module updated, trigger re-render\n window.location.reload();\n }\n });\n\n // Listen for custom Farm.js events\n import.meta.hot.on('farm:route-update', (data) => {\n console.log('Route updated:', data.path);\n window.location.reload();\n });\n\n // Handle CSS updates\n import.meta.hot.on('vite:beforeUpdate', () => {\n console.log('[Farm.js] HMR update incoming...');\n });\n\n import.meta.hot.on('vite:afterUpdate', () => {\n console.log('[Farm.js] HMR update applied ✓');\n });\n\n // Handle errors\n import.meta.hot.on('vite:error', (err) => {\n console.error('[Farm.js] HMR error:', err);\n });\n}\n`;\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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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,25 @@
|
|
|
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 { cq as DefinedIntegration, bG as FARM_INTEGRATION_INTERNAL_DISPATCH_CONTEXT_KEY, a0 as FarmIntegration, br as FarmIntegrationCategory, bK as FarmIntegrationConfigContext, bL as FarmIntegrationConfigDefinition, bM as FarmIntegrationConfigInput, cd as FarmIntegrationContributedPlugin, bR as FarmIntegrationData, b$ as FarmIntegrationDocumentNavigation, ck as FarmIntegrationEndpointValue, cl as FarmIntegrationEndpoints, cn as FarmIntegrationEndpointsFactory, cm as FarmIntegrationEndpointsFactoryContext, bS as FarmIntegrationHandlerContext, bD as FarmIntegrationInputSchema, bP as FarmIntegrationLifecycleContext, bQ as FarmIntegrationLifecycleHook, bN as FarmIntegrationLifecycleLogLevel, bO as FarmIntegrationLifecycleLogger, ca as FarmIntegrationLogEvent, c9 as FarmIntegrationLogPhase, cb as FarmIntegrationLogger, bY as FarmIntegrationMiddleware, cc as FarmIntegrationPluginOwner, b_ as FarmIntegrationProvider, bZ as FarmIntegrationProviderProps, bF as FarmIntegrationRequestContextStore, bV as FarmIntegrationRoute, bJ as FarmIntegrationRouteArgs, bH as FarmIntegrationRouteDb, ch as FarmIntegrationRouteFactory, bU as FarmIntegrationRouteHook, bT as FarmIntegrationRouteHookContext, by as FarmIntegrationRouteInput, bE as FarmIntegrationRouteInputSchemas, bw as FarmIntegrationRouteInputSource, bv as FarmIntegrationRouteMethod, bX as FarmIntegrationRouteMiddleware, bt as FarmIntegrationRouteParamValue, bu as FarmIntegrationRouteParams, bI as FarmIntegrationRouteStorageArgs, cj as FarmIntegrationRoutesFactory, ci as FarmIntegrationRoutesFactoryContext, c7 as FarmIntegrationSchema, c3 as FarmIntegrationSchemaConstraint, c2 as FarmIntegrationSchemaField, c0 as FarmIntegrationSchemaFieldType, c4 as FarmIntegrationSchemaModel, c5 as FarmIntegrationSchemaModelExtension, c6 as FarmIntegrationSchemaModelOverride, c1 as FarmIntegrationSchemaReference, bs as FarmIntegrationSlot, bC as FarmIntegrationStandardValidationResult, bA as FarmIntegrationValidationErrorLike, bz as FarmIntegrationValidationIssue, bx as FarmIntegrationValidationPathSegment, bB as FarmIntegrationValidationResult, ce as FarmIntegrationsUserConfig, bW as FarmTypedIntegrationRoute, co as createIntegrationRoute, cr as defineIntegration, c8 as defineIntegrationSchema, cD as dispatchIntegrationRequest, cg as getFarmIntegrationPluginOwner, cf as getFarmIntegrationPluginServerRuntime, cv as getIntegrationDocumentNavigationMatchers, cu as getIntegrationProviders, cw as getIntegrationSchemas, cC as getRegisteredIntegrationAPIManifest, cx as getRegisteredIntegrationRuntime, cz as getRegisteredIntegrationSchemas, cy as getRegisteredIntegrations, cp as integrationRoute, cs as isFarmIntegration, cA as matchIntegrationRoute, cB as matchRegisteredIntegrationRoute, ct as resolveIntegrationPlugins } from './client-plugins-CCilIb_G.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-CusFV6mn.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 './types-CsR8fpgF.mjs';
|
|
24
|
+
import './route-runtime-DoOHzCAD.mjs';
|
|
25
|
+
import './font.mjs';
|
|
@@ -0,0 +1,25 @@
|
|
|
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 { cq as DefinedIntegration, bG as FARM_INTEGRATION_INTERNAL_DISPATCH_CONTEXT_KEY, a0 as FarmIntegration, br as FarmIntegrationCategory, bK as FarmIntegrationConfigContext, bL as FarmIntegrationConfigDefinition, bM as FarmIntegrationConfigInput, cd as FarmIntegrationContributedPlugin, bR as FarmIntegrationData, b$ as FarmIntegrationDocumentNavigation, ck as FarmIntegrationEndpointValue, cl as FarmIntegrationEndpoints, cn as FarmIntegrationEndpointsFactory, cm as FarmIntegrationEndpointsFactoryContext, bS as FarmIntegrationHandlerContext, bD as FarmIntegrationInputSchema, bP as FarmIntegrationLifecycleContext, bQ as FarmIntegrationLifecycleHook, bN as FarmIntegrationLifecycleLogLevel, bO as FarmIntegrationLifecycleLogger, ca as FarmIntegrationLogEvent, c9 as FarmIntegrationLogPhase, cb as FarmIntegrationLogger, bY as FarmIntegrationMiddleware, cc as FarmIntegrationPluginOwner, b_ as FarmIntegrationProvider, bZ as FarmIntegrationProviderProps, bF as FarmIntegrationRequestContextStore, bV as FarmIntegrationRoute, bJ as FarmIntegrationRouteArgs, bH as FarmIntegrationRouteDb, ch as FarmIntegrationRouteFactory, bU as FarmIntegrationRouteHook, bT as FarmIntegrationRouteHookContext, by as FarmIntegrationRouteInput, bE as FarmIntegrationRouteInputSchemas, bw as FarmIntegrationRouteInputSource, bv as FarmIntegrationRouteMethod, bX as FarmIntegrationRouteMiddleware, bt as FarmIntegrationRouteParamValue, bu as FarmIntegrationRouteParams, bI as FarmIntegrationRouteStorageArgs, cj as FarmIntegrationRoutesFactory, ci as FarmIntegrationRoutesFactoryContext, c7 as FarmIntegrationSchema, c3 as FarmIntegrationSchemaConstraint, c2 as FarmIntegrationSchemaField, c0 as FarmIntegrationSchemaFieldType, c4 as FarmIntegrationSchemaModel, c5 as FarmIntegrationSchemaModelExtension, c6 as FarmIntegrationSchemaModelOverride, c1 as FarmIntegrationSchemaReference, bs as FarmIntegrationSlot, bC as FarmIntegrationStandardValidationResult, bA as FarmIntegrationValidationErrorLike, bz as FarmIntegrationValidationIssue, bx as FarmIntegrationValidationPathSegment, bB as FarmIntegrationValidationResult, ce as FarmIntegrationsUserConfig, bW as FarmTypedIntegrationRoute, co as createIntegrationRoute, cr as defineIntegration, c8 as defineIntegrationSchema, cD as dispatchIntegrationRequest, cg as getFarmIntegrationPluginOwner, cf as getFarmIntegrationPluginServerRuntime, cv as getIntegrationDocumentNavigationMatchers, cu as getIntegrationProviders, cw as getIntegrationSchemas, cC as getRegisteredIntegrationAPIManifest, cx as getRegisteredIntegrationRuntime, cz as getRegisteredIntegrationSchemas, cy as getRegisteredIntegrations, cp as integrationRoute, cs as isFarmIntegration, cA as matchIntegrationRoute, cB as matchRegisteredIntegrationRoute, ct as resolveIntegrationPlugins } from './client-plugins-DuuleQKk.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-CusFV6mn.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 './types-CsR8fpgF.js';
|
|
24
|
+
import './route-runtime-DoOHzCAD.js';
|
|
25
|
+
import './font.js';
|