@farm.js/core 0.1.0-beta.11 → 0.1.0-beta.13
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/{chunk-5EVQFRL2.mjs → chunk-3WIRO3N7.mjs} +2 -2
- package/dist/chunk-3WIRO3N7.mjs.map +1 -0
- package/dist/chunk-53MVSX3R.mjs +168 -0
- package/dist/chunk-53MVSX3R.mjs.map +1 -0
- package/dist/{chunk-AW6I64AP.mjs → chunk-6ZXIQSXE.mjs} +16 -1
- package/dist/chunk-6ZXIQSXE.mjs.map +1 -0
- package/dist/chunk-7ZVN3YZI.mjs +333 -0
- package/dist/chunk-7ZVN3YZI.mjs.map +1 -0
- package/dist/{chunk-7N62DNSO.mjs → chunk-H3TE3LOV.mjs} +2 -2
- package/dist/{chunk-QTZZ2ISQ.mjs → chunk-KLA67WKG.mjs} +1 -1
- package/dist/chunk-KLA67WKG.mjs.map +1 -0
- package/dist/{chunk-K5ZTUF22.mjs → chunk-L2PE36GQ.mjs} +7 -3
- package/dist/chunk-L2PE36GQ.mjs.map +1 -0
- package/dist/{chunk-4LND3PXF.mjs → chunk-OPHK6OJN.mjs} +513 -48
- package/dist/chunk-OPHK6OJN.mjs.map +1 -0
- package/dist/chunk-USLFXFFH.mjs +46 -0
- package/dist/chunk-USLFXFFH.mjs.map +1 -0
- package/dist/{chunk-4677KXB7.mjs → chunk-VSDZEB5M.mjs} +368 -103
- package/dist/chunk-VSDZEB5M.mjs.map +1 -0
- package/dist/{chunk-77BOAQHI.mjs → chunk-Z3YG4OZT.mjs} +725 -147
- package/dist/chunk-Z3YG4OZT.mjs.map +1 -0
- package/dist/client.cjs.map +1 -1
- package/dist/client.mjs +1 -1
- package/dist/{devtools-A22KUJZT.mjs → devtools-GAZ7F3KL.mjs} +4 -3
- package/dist/{devtools-A22KUJZT.mjs.map → devtools-GAZ7F3KL.mjs.map} +1 -1
- package/dist/docs.cjs +622 -124
- package/dist/docs.cjs.map +1 -1
- package/dist/docs.mjs +5 -3
- package/dist/font.cjs +19 -2
- package/dist/font.cjs.map +1 -1
- package/dist/font.mjs +7 -3
- package/dist/index.cjs +2206 -680
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +27 -19
- package/dist/index.mjs.map +1 -1
- package/dist/internal/build-runtime.cjs +2033 -516
- package/dist/internal/build-runtime.cjs.map +1 -1
- package/dist/internal/build-runtime.mjs +13 -10
- package/dist/internal/client-runtime.cjs +169 -2
- package/dist/internal/client-runtime.cjs.map +1 -1
- package/dist/internal/client-runtime.mjs +170 -2
- package/dist/internal/client-runtime.mjs.map +1 -1
- package/dist/internal/config-runtime.cjs +22 -0
- package/dist/internal/config-runtime.cjs.map +1 -1
- package/dist/internal/config-runtime.mjs +3 -2
- package/dist/internal/metadata-image-runtime.cjs +199 -0
- package/dist/internal/metadata-image-runtime.cjs.map +1 -0
- package/dist/internal/metadata-image-runtime.mjs +8 -0
- package/dist/internal/metadata-image-runtime.mjs.map +1 -0
- package/dist/internal/production-runtime.cjs +310 -0
- package/dist/internal/production-runtime.cjs.map +1 -1
- package/dist/internal/production-runtime.mjs +10 -0
- package/dist/internal/production-runtime.mjs.map +1 -1
- package/dist/navigation.cjs.map +1 -1
- package/dist/navigation.mjs +2 -2
- package/dist/plugin.cjs +1521 -339
- package/dist/plugin.cjs.map +1 -1
- package/dist/plugin.mjs +9 -5
- package/dist/server.cjs +1634 -410
- package/dist/server.cjs.map +1 -1
- package/dist/server.mjs +17 -19
- package/dist/server.mjs.map +1 -1
- package/dist/version.cjs +1 -1
- package/dist/version.cjs.map +1 -1
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +1575 -349
- package/dist/vite.cjs.map +1 -1
- package/dist/vite.mjs +9 -5
- package/package.json +10 -1
- package/dist/after.d.mts +0 -25
- package/dist/after.d.ts +0 -25
- package/dist/agent-runtime.d.mts +0 -94
- package/dist/agent-runtime.d.ts +0 -94
- package/dist/api/route-manager.d.mts +0 -66
- package/dist/api/route-manager.d.ts +0 -66
- package/dist/api/runtime.d.mts +0 -3
- package/dist/api/runtime.d.ts +0 -3
- package/dist/api.d.mts +0 -48
- package/dist/api.d.ts +0 -48
- package/dist/app-BNE2FoZ4.d.mts +0 -302
- package/dist/app-DRGUmJ3s.d.ts +0 -302
- package/dist/app-markdown.d.mts +0 -22
- package/dist/app-markdown.d.ts +0 -22
- package/dist/cache.d.mts +0 -192
- package/dist/cache.d.ts +0 -192
- package/dist/chunk-4677KXB7.mjs.map +0 -1
- package/dist/chunk-4LND3PXF.mjs.map +0 -1
- package/dist/chunk-5EVQFRL2.mjs.map +0 -1
- package/dist/chunk-77BOAQHI.mjs.map +0 -1
- package/dist/chunk-AW6I64AP.mjs.map +0 -1
- package/dist/chunk-K5ZTUF22.mjs.map +0 -1
- package/dist/chunk-QM746KUO.mjs +0 -56
- package/dist/chunk-QM746KUO.mjs.map +0 -1
- package/dist/chunk-QTZZ2ISQ.mjs.map +0 -1
- package/dist/client-BT1mFQas.d.mts +0 -447
- package/dist/client-Nn0q4eO4.d.ts +0 -447
- package/dist/client-cache-CIlyBlmx.d.ts +0 -6
- package/dist/client-cache-D-EZ7XVW.d.mts +0 -6
- package/dist/client-plugins-Bc5jHcNr.d.ts +0 -1927
- package/dist/client-plugins-jsk-ZLzJ.d.mts +0 -1927
- package/dist/client-plugins.d.mts +0 -22
- package/dist/client-plugins.d.ts +0 -22
- package/dist/client.d.mts +0 -447
- package/dist/client.d.ts +0 -447
- package/dist/config.d.mts +0 -29
- package/dist/config.d.ts +0 -29
- package/dist/cron.d.mts +0 -78
- package/dist/cron.d.ts +0 -78
- package/dist/deferred.d.mts +0 -42
- package/dist/deferred.d.ts +0 -42
- package/dist/deployment.d.mts +0 -34
- package/dist/deployment.d.ts +0 -34
- package/dist/docs.d.mts +0 -69
- package/dist/docs.d.ts +0 -69
- package/dist/env-types.d.mts +0 -12
- package/dist/env-types.d.ts +0 -12
- package/dist/env.d.mts +0 -45
- package/dist/env.d.ts +0 -45
- package/dist/environment/vite.d.mts +0 -22
- package/dist/environment/vite.d.ts +0 -22
- package/dist/environment.d.mts +0 -18
- package/dist/environment.d.ts +0 -18
- package/dist/font.d.mts +0 -70
- package/dist/font.d.ts +0 -70
- package/dist/headers.d.mts +0 -22
- package/dist/headers.d.ts +0 -22
- package/dist/i18n/client.d.mts +0 -32
- package/dist/i18n/client.d.ts +0 -32
- package/dist/i18n/index.d.mts +0 -20
- package/dist/i18n/index.d.ts +0 -20
- package/dist/i18n/server.d.mts +0 -30
- package/dist/i18n/server.d.ts +0 -30
- package/dist/image/server.d.mts +0 -37
- package/dist/image/server.d.ts +0 -37
- package/dist/image/sharp.d.mts +0 -7
- package/dist/image/sharp.d.ts +0 -7
- package/dist/image-config-Duob7wER.d.mts +0 -50
- package/dist/image-config-Duob7wER.d.ts +0 -50
- package/dist/image.d.mts +0 -39
- package/dist/image.d.ts +0 -39
- package/dist/index.d.mts +0 -455
- package/dist/index.d.ts +0 -455
- package/dist/integration-api-CHT2OKAf.d.mts +0 -93
- package/dist/integration-api-CHT2OKAf.d.ts +0 -93
- package/dist/integrations.d.mts +0 -22
- package/dist/integrations.d.ts +0 -22
- package/dist/internal/build-runtime.d.mts +0 -39
- package/dist/internal/build-runtime.d.ts +0 -39
- package/dist/internal/client-runtime.d.mts +0 -2
- package/dist/internal/client-runtime.d.ts +0 -2
- package/dist/internal/config-runtime.d.mts +0 -39
- package/dist/internal/config-runtime.d.ts +0 -39
- package/dist/internal/production-node-env.d.mts +0 -12
- package/dist/internal/production-node-env.d.ts +0 -12
- package/dist/internal/production-runtime.d.mts +0 -41
- package/dist/internal/production-runtime.d.ts +0 -41
- package/dist/markdown.d.mts +0 -60
- package/dist/markdown.d.ts +0 -60
- package/dist/metadata-7ffpT3jr.d.mts +0 -22
- package/dist/metadata-JHn-8eht.d.ts +0 -22
- package/dist/middleware.d.mts +0 -164
- package/dist/middleware.d.ts +0 -164
- package/dist/navigation-errors-Dvwpzaer.d.mts +0 -13
- package/dist/navigation-errors-Dvwpzaer.d.ts +0 -13
- package/dist/navigation.d.mts +0 -14
- package/dist/navigation.d.ts +0 -14
- package/dist/observability.d.mts +0 -335
- package/dist/observability.d.ts +0 -335
- package/dist/params-BALtrRim.d.ts +0 -15
- package/dist/params-ry-lxqmy.d.mts +0 -15
- package/dist/plugin-BJDf43dc.d.mts +0 -165
- package/dist/plugin-BJDf43dc.d.ts +0 -165
- package/dist/plugin.d.mts +0 -22
- package/dist/plugin.d.ts +0 -22
- package/dist/production-runtime-9KG7GuvW.d.ts +0 -79
- package/dist/production-runtime-B-fweKts.d.mts +0 -79
- package/dist/production-runtime-C_B79w2P.d.mts +0 -28
- package/dist/production-runtime-DDEM1D2q.d.ts +0 -28
- package/dist/query/client.d.mts +0 -61
- package/dist/query/client.d.ts +0 -61
- package/dist/query/index.d.mts +0 -90
- package/dist/query/index.d.ts +0 -90
- package/dist/query/parsers.d.mts +0 -25
- package/dist/query/parsers.d.ts +0 -25
- package/dist/query/server.d.mts +0 -55
- package/dist/query/server.d.ts +0 -55
- package/dist/request-Dsq4kGW0.d.mts +0 -6
- package/dist/request-udtobOLv.d.ts +0 -6
- package/dist/request.d.mts +0 -2
- package/dist/request.d.ts +0 -2
- package/dist/resolver-DJqjLMg_.d.mts +0 -14
- package/dist/resolver-IH4RmPEl.d.ts +0 -14
- package/dist/route-runtime-DoOHzCAD.d.mts +0 -38
- package/dist/route-runtime-DoOHzCAD.d.ts +0 -38
- package/dist/router.d.mts +0 -36
- package/dist/router.d.ts +0 -36
- package/dist/routes.d.mts +0 -224
- package/dist/routes.d.ts +0 -224
- package/dist/runtime-9nQjVM7X.d.mts +0 -206
- package/dist/runtime-Cxpq6xZN.d.mts +0 -27
- package/dist/runtime-DgeS2skB.d.ts +0 -206
- package/dist/runtime-bv63eUiO.d.ts +0 -27
- package/dist/server-action-security.d.mts +0 -43
- package/dist/server-action-security.d.ts +0 -43
- package/dist/server-fn-client.d.mts +0 -32
- package/dist/server-fn-client.d.ts +0 -32
- package/dist/server-fn.d.mts +0 -93
- package/dist/server-fn.d.ts +0 -93
- package/dist/server-plugins.d.mts +0 -55
- package/dist/server-plugins.d.ts +0 -55
- package/dist/server-query-client.d.mts +0 -50
- package/dist/server-query-client.d.ts +0 -50
- package/dist/server-query.d.mts +0 -36
- package/dist/server-query.d.ts +0 -36
- package/dist/server.d.mts +0 -48
- package/dist/server.d.ts +0 -48
- package/dist/storage.d.mts +0 -52
- package/dist/storage.d.ts +0 -52
- package/dist/testing.d.mts +0 -101
- package/dist/testing.d.ts +0 -101
- package/dist/transport-BmbGTXA5.d.mts +0 -49
- package/dist/transport-BmbGTXA5.d.ts +0 -49
- package/dist/types-BMxWr97v.d.mts +0 -81
- package/dist/types-BMxWr97v.d.ts +0 -81
- package/dist/types-C9N-nk5R.d.mts +0 -53
- package/dist/types-C9N-nk5R.d.ts +0 -53
- package/dist/types-D1A6-XvH.d.mts +0 -73
- package/dist/types-D1A6-XvH.d.ts +0 -73
- package/dist/utils-CA0z0c-2.d.ts +0 -23
- package/dist/utils-mYVkSOt2.d.mts +0 -23
- package/dist/version.d.mts +0 -3
- package/dist/version.d.ts +0 -3
- package/dist/vite.d.mts +0 -22
- package/dist/vite.d.ts +0 -22
- package/dist/workflows.d.mts +0 -110
- package/dist/workflows.d.ts +0 -110
- /package/dist/{chunk-7N62DNSO.mjs.map → chunk-H3TE3LOV.mjs.map} +0 -0
package/dist/vite.mjs
CHANGED
|
@@ -3,19 +3,23 @@ import {
|
|
|
3
3
|
farmI18nClientBridgePlugin,
|
|
4
4
|
farmPlugin,
|
|
5
5
|
rewriteEarlySsrRelativeImports
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-Z3YG4OZT.mjs";
|
|
7
7
|
import "./chunk-LGHEOHBU.mjs";
|
|
8
8
|
import "./chunk-FRPWCMMG.mjs";
|
|
9
|
+
import "./chunk-53MVSX3R.mjs";
|
|
10
|
+
import "./chunk-6ZXIQSXE.mjs";
|
|
9
11
|
import "./chunk-V6WE6JSZ.mjs";
|
|
10
12
|
import "./chunk-3XNTL3FQ.mjs";
|
|
11
13
|
import "./chunk-CGIXMLSY.mjs";
|
|
12
14
|
import "./chunk-USWZZUEH.mjs";
|
|
13
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-H3TE3LOV.mjs";
|
|
14
16
|
import "./chunk-7HO6AEOP.mjs";
|
|
17
|
+
import "./chunk-USLFXFFH.mjs";
|
|
15
18
|
import "./chunk-I4CUBGVF.mjs";
|
|
19
|
+
import "./chunk-7MABZJIM.mjs";
|
|
16
20
|
import "./chunk-YW7OBE6Q.mjs";
|
|
17
21
|
import "./chunk-74YTBPTY.mjs";
|
|
18
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-7ZVN3YZI.mjs";
|
|
19
23
|
import "./chunk-GY2STC2S.mjs";
|
|
20
24
|
import "./chunk-UB5UOSHB.mjs";
|
|
21
25
|
import "./chunk-ZVWA4ZQ3.mjs";
|
|
@@ -39,8 +43,8 @@ import "./chunk-J4FNJ5IU.mjs";
|
|
|
39
43
|
import "./chunk-PFE6GMNE.mjs";
|
|
40
44
|
import "./chunk-RHIFZZUI.mjs";
|
|
41
45
|
import "./chunk-LM2YNO4U.mjs";
|
|
42
|
-
import "./chunk-
|
|
43
|
-
import "./chunk-
|
|
46
|
+
import "./chunk-3WIRO3N7.mjs";
|
|
47
|
+
import "./chunk-KLA67WKG.mjs";
|
|
44
48
|
import "./chunk-ITN462YM.mjs";
|
|
45
49
|
import "./chunk-B232I2GP.mjs";
|
|
46
50
|
import "./chunk-JK25YEN6.mjs";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@farm.js/core",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.13",
|
|
4
4
|
"description": "Core Farm.js framework for modern integrated apps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"@farm.js/core",
|
|
@@ -133,6 +133,9 @@
|
|
|
133
133
|
"internal/production-runtime": [
|
|
134
134
|
"./dist/internal/production-runtime.d.ts"
|
|
135
135
|
],
|
|
136
|
+
"internal/metadata-image-runtime": [
|
|
137
|
+
"./dist/internal/metadata-image-runtime.d.ts"
|
|
138
|
+
],
|
|
136
139
|
"internal/client-runtime": [
|
|
137
140
|
"./dist/internal/client-runtime.d.ts"
|
|
138
141
|
],
|
|
@@ -449,6 +452,11 @@
|
|
|
449
452
|
"import": "./dist/internal/production-runtime.mjs",
|
|
450
453
|
"require": "./dist/internal/production-runtime.cjs"
|
|
451
454
|
},
|
|
455
|
+
"./internal/metadata-image-runtime": {
|
|
456
|
+
"types": "./dist/internal/metadata-image-runtime.d.ts",
|
|
457
|
+
"import": "./dist/internal/metadata-image-runtime.mjs",
|
|
458
|
+
"require": "./dist/internal/metadata-image-runtime.cjs"
|
|
459
|
+
},
|
|
452
460
|
"./internal/client-runtime": {
|
|
453
461
|
"types": "./dist/internal/client-runtime.d.ts",
|
|
454
462
|
"import": "./dist/internal/client-runtime.mjs",
|
|
@@ -482,6 +490,7 @@
|
|
|
482
490
|
"@scalar/api-reference": "^1.38.1",
|
|
483
491
|
"@scalar/openapi-parser": "^0.22.3",
|
|
484
492
|
"@tailwindcss/vite": "4.1.18",
|
|
493
|
+
"@vercel/og": "0.11.1",
|
|
485
494
|
"@vitejs/plugin-react": "^4.2.1",
|
|
486
495
|
"better-call": "^1.0.19",
|
|
487
496
|
"db0": "^0.3.4",
|
package/dist/after.d.mts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { ServerResponse, IncomingMessage } from 'node:http';
|
|
2
|
-
|
|
3
|
-
type AfterCallback = () => void | Promise<void>;
|
|
4
|
-
/** Runtime hooks supplied by a deployment adapter. */
|
|
5
|
-
interface FarmAfterPlatformContext {
|
|
6
|
-
/** Keep a serverless invocation alive until the scheduled work settles. */
|
|
7
|
-
waitUntil?: (promise: Promise<void>) => void;
|
|
8
|
-
/** Register a callback that runs once the response has finished. */
|
|
9
|
-
onResponseFinished?: (callback: () => void) => void;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Schedule non-blocking work for after the current response finishes.
|
|
13
|
-
*
|
|
14
|
-
* Callbacks run in registration order. A callback failure is reported without
|
|
15
|
-
* changing the response or preventing later callbacks from running.
|
|
16
|
-
*/
|
|
17
|
-
declare function after(callback: AfterCallback): void;
|
|
18
|
-
/** @internal Run a Web Request handler inside Farm's post-response lifecycle. */
|
|
19
|
-
declare function _runWithAfterRequest(request: Request, handler: () => Response | Promise<Response>, context?: FarmAfterPlatformContext): Promise<Response>;
|
|
20
|
-
/** @internal Run a Node response handler inside Farm's post-response lifecycle. */
|
|
21
|
-
declare function _runWithAfterNodeResponse<T>(response: ServerResponse, handler: () => T | Promise<T>, context?: Pick<FarmAfterPlatformContext, "waitUntil">): Promise<T>;
|
|
22
|
-
/** @internal Add Farm's post-response lifecycle to a Node middleware. */
|
|
23
|
-
declare function _withAfterNodeMiddleware(handler: (request: IncomingMessage, response: ServerResponse, next: (error?: unknown) => void) => void | Promise<void>): (request: IncomingMessage, response: ServerResponse, next: (error?: unknown) => void) => Promise<void>;
|
|
24
|
-
|
|
25
|
-
export { type AfterCallback, type FarmAfterPlatformContext, _runWithAfterNodeResponse, _runWithAfterRequest, _withAfterNodeMiddleware, after };
|
package/dist/after.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { ServerResponse, IncomingMessage } from 'node:http';
|
|
2
|
-
|
|
3
|
-
type AfterCallback = () => void | Promise<void>;
|
|
4
|
-
/** Runtime hooks supplied by a deployment adapter. */
|
|
5
|
-
interface FarmAfterPlatformContext {
|
|
6
|
-
/** Keep a serverless invocation alive until the scheduled work settles. */
|
|
7
|
-
waitUntil?: (promise: Promise<void>) => void;
|
|
8
|
-
/** Register a callback that runs once the response has finished. */
|
|
9
|
-
onResponseFinished?: (callback: () => void) => void;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Schedule non-blocking work for after the current response finishes.
|
|
13
|
-
*
|
|
14
|
-
* Callbacks run in registration order. A callback failure is reported without
|
|
15
|
-
* changing the response or preventing later callbacks from running.
|
|
16
|
-
*/
|
|
17
|
-
declare function after(callback: AfterCallback): void;
|
|
18
|
-
/** @internal Run a Web Request handler inside Farm's post-response lifecycle. */
|
|
19
|
-
declare function _runWithAfterRequest(request: Request, handler: () => Response | Promise<Response>, context?: FarmAfterPlatformContext): Promise<Response>;
|
|
20
|
-
/** @internal Run a Node response handler inside Farm's post-response lifecycle. */
|
|
21
|
-
declare function _runWithAfterNodeResponse<T>(response: ServerResponse, handler: () => T | Promise<T>, context?: Pick<FarmAfterPlatformContext, "waitUntil">): Promise<T>;
|
|
22
|
-
/** @internal Add Farm's post-response lifecycle to a Node middleware. */
|
|
23
|
-
declare function _withAfterNodeMiddleware(handler: (request: IncomingMessage, response: ServerResponse, next: (error?: unknown) => void) => void | Promise<void>): (request: IncomingMessage, response: ServerResponse, next: (error?: unknown) => void) => Promise<void>;
|
|
24
|
-
|
|
25
|
-
export { type AfterCallback, type FarmAfterPlatformContext, _runWithAfterNodeResponse, _runWithAfterRequest, _withAfterNodeMiddleware, after };
|
package/dist/agent-runtime.d.mts
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import { ChildProcess } from 'node:child_process';
|
|
2
|
-
import { U as BundleResultPayload, V as FarmPlugin, W as FarmIntegration } from './client-plugins-jsk-ZLzJ.mjs';
|
|
3
|
-
import './plugin-BJDf43dc.mjs';
|
|
4
|
-
import 'react';
|
|
5
|
-
import 'http';
|
|
6
|
-
import './types-D1A6-XvH.mjs';
|
|
7
|
-
import 'db0';
|
|
8
|
-
import 'unstorage';
|
|
9
|
-
import './integration-api-CHT2OKAf.mjs';
|
|
10
|
-
import '@farming-labs/orm';
|
|
11
|
-
import './types-C9N-nk5R.mjs';
|
|
12
|
-
import '@farming-labs/docs';
|
|
13
|
-
import './markdown.mjs';
|
|
14
|
-
import './observability.mjs';
|
|
15
|
-
import 'vite';
|
|
16
|
-
import './workflows.mjs';
|
|
17
|
-
import './cron.mjs';
|
|
18
|
-
import './env.mjs';
|
|
19
|
-
import './server-action-security.mjs';
|
|
20
|
-
import './image-config-Duob7wER.mjs';
|
|
21
|
-
import './types-BMxWr97v.mjs';
|
|
22
|
-
import './cache.mjs';
|
|
23
|
-
import './route-runtime-DoOHzCAD.mjs';
|
|
24
|
-
|
|
25
|
-
interface FarmAgentRuntimeInstance {
|
|
26
|
-
readonly provider: string;
|
|
27
|
-
readonly routePrefix: string;
|
|
28
|
-
readonly routePrefixes: readonly string[];
|
|
29
|
-
getOrigin(): string | undefined;
|
|
30
|
-
}
|
|
31
|
-
interface FarmManagedAgentRuntime {
|
|
32
|
-
readonly origin: string;
|
|
33
|
-
readonly process?: ChildProcess;
|
|
34
|
-
stop(): Promise<void>;
|
|
35
|
-
}
|
|
36
|
-
interface FarmAgentRuntimeStartContext {
|
|
37
|
-
readonly root: string;
|
|
38
|
-
readonly log: {
|
|
39
|
-
info(message: string, meta?: Record<string, unknown>): void;
|
|
40
|
-
warn(message: string, meta?: Record<string, unknown>): void;
|
|
41
|
-
error(message: string, meta?: Record<string, unknown>): void;
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
interface FarmAgentRuntimeBuildContext extends BundleResultPayload {
|
|
45
|
-
readonly provider: string;
|
|
46
|
-
readonly routePrefix: string;
|
|
47
|
-
readonly routePrefixes: readonly string[];
|
|
48
|
-
}
|
|
49
|
-
interface FarmAgentRuntimeIntegrationOptions {
|
|
50
|
-
provider: string;
|
|
51
|
-
routePrefix: string;
|
|
52
|
-
/** Whether Farm's production server must dispatch this runtime's proxy routes. */
|
|
53
|
-
serverRuntime?: boolean;
|
|
54
|
-
additionalRoutePrefixes?: readonly string[];
|
|
55
|
-
origin?: string;
|
|
56
|
-
originEnv?: string | readonly string[];
|
|
57
|
-
webSockets?: boolean;
|
|
58
|
-
startDev?(context: FarmAgentRuntimeStartContext): Promise<FarmManagedAgentRuntime>;
|
|
59
|
-
afterBuild?(context: FarmAgentRuntimeBuildContext): Promise<void> | void;
|
|
60
|
-
plugins?: readonly FarmPlugin[];
|
|
61
|
-
instance?: Record<string, unknown>;
|
|
62
|
-
}
|
|
63
|
-
interface FarmManagedProcessOptions {
|
|
64
|
-
command: string;
|
|
65
|
-
args?: readonly string[];
|
|
66
|
-
cwd: string;
|
|
67
|
-
env?: Record<string, string | undefined>;
|
|
68
|
-
label: string;
|
|
69
|
-
origin?: string;
|
|
70
|
-
resolveOrigin?(output: string): string | undefined;
|
|
71
|
-
healthPath?: string;
|
|
72
|
-
timeoutMs?: number;
|
|
73
|
-
stopTimeoutMs?: number;
|
|
74
|
-
onOutput?(line: string, stream: "stdout" | "stderr"): void;
|
|
75
|
-
}
|
|
76
|
-
interface FarmAgentProxyOptions {
|
|
77
|
-
fetch?: typeof globalThis.fetch;
|
|
78
|
-
}
|
|
79
|
-
declare function createAgentRuntimeIntegration(options: FarmAgentRuntimeIntegrationOptions): FarmIntegration;
|
|
80
|
-
declare function applyAgentRuntimeViteProxy(config: {
|
|
81
|
-
vite?: Record<string, any>;
|
|
82
|
-
}, input: {
|
|
83
|
-
origin: string;
|
|
84
|
-
routePrefix: string;
|
|
85
|
-
webSockets?: boolean;
|
|
86
|
-
}): void;
|
|
87
|
-
declare function proxyAgentRuntimeRequest(request: Request, origin: string, options?: FarmAgentProxyOptions): Promise<Response>;
|
|
88
|
-
declare function startManagedAgentRuntime(options: FarmManagedProcessOptions): Promise<FarmManagedAgentRuntime>;
|
|
89
|
-
declare function findAvailableAgentRuntimePort(host?: string): Promise<number>;
|
|
90
|
-
declare function resolveProjectPackageBin(projectRoot: string, packageName: string, binName?: string): Promise<string>;
|
|
91
|
-
declare function normalizeAgentOrigin(value: string): string;
|
|
92
|
-
declare function normalizeAgentRoutePrefix(value: string): string;
|
|
93
|
-
|
|
94
|
-
export { type FarmAgentProxyOptions, type FarmAgentRuntimeBuildContext, type FarmAgentRuntimeInstance, type FarmAgentRuntimeIntegrationOptions, type FarmAgentRuntimeStartContext, type FarmManagedAgentRuntime, type FarmManagedProcessOptions, applyAgentRuntimeViteProxy, createAgentRuntimeIntegration, findAvailableAgentRuntimePort, normalizeAgentOrigin, normalizeAgentRoutePrefix, proxyAgentRuntimeRequest, resolveProjectPackageBin, startManagedAgentRuntime };
|
package/dist/agent-runtime.d.ts
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import { ChildProcess } from 'node:child_process';
|
|
2
|
-
import { U as BundleResultPayload, V as FarmPlugin, W as FarmIntegration } from './client-plugins-Bc5jHcNr.js';
|
|
3
|
-
import './plugin-BJDf43dc.js';
|
|
4
|
-
import 'react';
|
|
5
|
-
import 'http';
|
|
6
|
-
import './types-D1A6-XvH.js';
|
|
7
|
-
import 'db0';
|
|
8
|
-
import 'unstorage';
|
|
9
|
-
import './integration-api-CHT2OKAf.js';
|
|
10
|
-
import '@farming-labs/orm';
|
|
11
|
-
import './types-C9N-nk5R.js';
|
|
12
|
-
import '@farming-labs/docs';
|
|
13
|
-
import './markdown.js';
|
|
14
|
-
import './observability.js';
|
|
15
|
-
import 'vite';
|
|
16
|
-
import './workflows.js';
|
|
17
|
-
import './cron.js';
|
|
18
|
-
import './env.js';
|
|
19
|
-
import './server-action-security.js';
|
|
20
|
-
import './image-config-Duob7wER.js';
|
|
21
|
-
import './types-BMxWr97v.js';
|
|
22
|
-
import './cache.js';
|
|
23
|
-
import './route-runtime-DoOHzCAD.js';
|
|
24
|
-
|
|
25
|
-
interface FarmAgentRuntimeInstance {
|
|
26
|
-
readonly provider: string;
|
|
27
|
-
readonly routePrefix: string;
|
|
28
|
-
readonly routePrefixes: readonly string[];
|
|
29
|
-
getOrigin(): string | undefined;
|
|
30
|
-
}
|
|
31
|
-
interface FarmManagedAgentRuntime {
|
|
32
|
-
readonly origin: string;
|
|
33
|
-
readonly process?: ChildProcess;
|
|
34
|
-
stop(): Promise<void>;
|
|
35
|
-
}
|
|
36
|
-
interface FarmAgentRuntimeStartContext {
|
|
37
|
-
readonly root: string;
|
|
38
|
-
readonly log: {
|
|
39
|
-
info(message: string, meta?: Record<string, unknown>): void;
|
|
40
|
-
warn(message: string, meta?: Record<string, unknown>): void;
|
|
41
|
-
error(message: string, meta?: Record<string, unknown>): void;
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
interface FarmAgentRuntimeBuildContext extends BundleResultPayload {
|
|
45
|
-
readonly provider: string;
|
|
46
|
-
readonly routePrefix: string;
|
|
47
|
-
readonly routePrefixes: readonly string[];
|
|
48
|
-
}
|
|
49
|
-
interface FarmAgentRuntimeIntegrationOptions {
|
|
50
|
-
provider: string;
|
|
51
|
-
routePrefix: string;
|
|
52
|
-
/** Whether Farm's production server must dispatch this runtime's proxy routes. */
|
|
53
|
-
serverRuntime?: boolean;
|
|
54
|
-
additionalRoutePrefixes?: readonly string[];
|
|
55
|
-
origin?: string;
|
|
56
|
-
originEnv?: string | readonly string[];
|
|
57
|
-
webSockets?: boolean;
|
|
58
|
-
startDev?(context: FarmAgentRuntimeStartContext): Promise<FarmManagedAgentRuntime>;
|
|
59
|
-
afterBuild?(context: FarmAgentRuntimeBuildContext): Promise<void> | void;
|
|
60
|
-
plugins?: readonly FarmPlugin[];
|
|
61
|
-
instance?: Record<string, unknown>;
|
|
62
|
-
}
|
|
63
|
-
interface FarmManagedProcessOptions {
|
|
64
|
-
command: string;
|
|
65
|
-
args?: readonly string[];
|
|
66
|
-
cwd: string;
|
|
67
|
-
env?: Record<string, string | undefined>;
|
|
68
|
-
label: string;
|
|
69
|
-
origin?: string;
|
|
70
|
-
resolveOrigin?(output: string): string | undefined;
|
|
71
|
-
healthPath?: string;
|
|
72
|
-
timeoutMs?: number;
|
|
73
|
-
stopTimeoutMs?: number;
|
|
74
|
-
onOutput?(line: string, stream: "stdout" | "stderr"): void;
|
|
75
|
-
}
|
|
76
|
-
interface FarmAgentProxyOptions {
|
|
77
|
-
fetch?: typeof globalThis.fetch;
|
|
78
|
-
}
|
|
79
|
-
declare function createAgentRuntimeIntegration(options: FarmAgentRuntimeIntegrationOptions): FarmIntegration;
|
|
80
|
-
declare function applyAgentRuntimeViteProxy(config: {
|
|
81
|
-
vite?: Record<string, any>;
|
|
82
|
-
}, input: {
|
|
83
|
-
origin: string;
|
|
84
|
-
routePrefix: string;
|
|
85
|
-
webSockets?: boolean;
|
|
86
|
-
}): void;
|
|
87
|
-
declare function proxyAgentRuntimeRequest(request: Request, origin: string, options?: FarmAgentProxyOptions): Promise<Response>;
|
|
88
|
-
declare function startManagedAgentRuntime(options: FarmManagedProcessOptions): Promise<FarmManagedAgentRuntime>;
|
|
89
|
-
declare function findAvailableAgentRuntimePort(host?: string): Promise<number>;
|
|
90
|
-
declare function resolveProjectPackageBin(projectRoot: string, packageName: string, binName?: string): Promise<string>;
|
|
91
|
-
declare function normalizeAgentOrigin(value: string): string;
|
|
92
|
-
declare function normalizeAgentRoutePrefix(value: string): string;
|
|
93
|
-
|
|
94
|
-
export { type FarmAgentProxyOptions, type FarmAgentRuntimeBuildContext, type FarmAgentRuntimeInstance, type FarmAgentRuntimeIntegrationOptions, type FarmAgentRuntimeStartContext, type FarmManagedAgentRuntime, type FarmManagedProcessOptions, applyAgentRuntimeViteProxy, createAgentRuntimeIntegration, findAvailableAgentRuntimePort, normalizeAgentOrigin, normalizeAgentRoutePrefix, proxyAgentRuntimeRequest, resolveProjectPackageBin, startManagedAgentRuntime };
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { ViteDevServer } from 'vite';
|
|
2
|
-
import { F as FarmRouteRuntimeConfig } from '../route-runtime-DoOHzCAD.mjs';
|
|
3
|
-
import '../types-BMxWr97v.mjs';
|
|
4
|
-
import { F as FarmI18nRuntime } from '../runtime-Cxpq6xZN.mjs';
|
|
5
|
-
import { A as APIRouteMatch } from '../runtime-9nQjVM7X.mjs';
|
|
6
|
-
export { c as APIRouteParamValue, b as APIRouteParams, i as invokeAPIRouteEndpoint, a as isWebResponse, m as matchAPIRoute, n as normalizeRouteResponse } from '../runtime-9nQjVM7X.mjs';
|
|
7
|
-
import '../resolver-DJqjLMg_.mjs';
|
|
8
|
-
import '../cache.mjs';
|
|
9
|
-
import '../transport-BmbGTXA5.mjs';
|
|
10
|
-
|
|
11
|
-
interface APIRoute extends FarmRouteRuntimeConfig {
|
|
12
|
-
path: string;
|
|
13
|
-
filePath: string;
|
|
14
|
-
methods: string[];
|
|
15
|
-
endpoints: Record<string, any>;
|
|
16
|
-
}
|
|
17
|
-
interface APIRouteManagerOptions {
|
|
18
|
-
throwOnLoadError?: boolean;
|
|
19
|
-
i18n?: FarmI18nRuntime;
|
|
20
|
-
}
|
|
21
|
-
declare const API_ROUTE_METHODS: readonly ["GET", "HEAD", "POST", "PUT", "DELETE", "PATCH", "OPTIONS"];
|
|
22
|
-
declare class APIRouteManager {
|
|
23
|
-
private routes;
|
|
24
|
-
private viteServer?;
|
|
25
|
-
private appDirs;
|
|
26
|
-
private throwOnLoadError;
|
|
27
|
-
private i18n?;
|
|
28
|
-
constructor(appDir: string | readonly string[], viteServer?: ViteDevServer, options?: APIRouteManagerOptions);
|
|
29
|
-
/**
|
|
30
|
-
* Discover route.ts files in /app/api and explicit endpoints in root routes.ts
|
|
31
|
-
*/
|
|
32
|
-
discoverRoutes(): Promise<void>;
|
|
33
|
-
/**
|
|
34
|
-
* Recursively find all route.ts files
|
|
35
|
-
*/
|
|
36
|
-
private findRouteFiles;
|
|
37
|
-
/**
|
|
38
|
-
* Load a route.ts file and extract HTTP method exports
|
|
39
|
-
*/
|
|
40
|
-
private loadRoute;
|
|
41
|
-
/**
|
|
42
|
-
* Load explicit-path endpoints from src/routes.ts-style files.
|
|
43
|
-
*/
|
|
44
|
-
private loadRootRoutes;
|
|
45
|
-
private loadProgrammaticApiRoutes;
|
|
46
|
-
private handleLoadError;
|
|
47
|
-
private findRootRoutesFile;
|
|
48
|
-
private loadModule;
|
|
49
|
-
private addEndpoint;
|
|
50
|
-
private addProgrammaticApiRoute;
|
|
51
|
-
/**
|
|
52
|
-
* Get the handler that directly invokes endpoint handlers
|
|
53
|
-
*/
|
|
54
|
-
getHandler(): ((req: Request) => Promise<Response>) | null;
|
|
55
|
-
/**
|
|
56
|
-
* Check if a path is an API route
|
|
57
|
-
*/
|
|
58
|
-
isAPIRoute(pathname: string): boolean;
|
|
59
|
-
matchRoute(pathname: string): APIRouteMatch<APIRoute> | null;
|
|
60
|
-
/**
|
|
61
|
-
* Get all routes for client type generation
|
|
62
|
-
*/
|
|
63
|
-
getRoutes(): Map<string, APIRoute>;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export { type APIRoute, APIRouteManager, type APIRouteManagerOptions, APIRouteMatch, API_ROUTE_METHODS };
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { ViteDevServer } from 'vite';
|
|
2
|
-
import { F as FarmRouteRuntimeConfig } from '../route-runtime-DoOHzCAD.js';
|
|
3
|
-
import '../types-BMxWr97v.js';
|
|
4
|
-
import { F as FarmI18nRuntime } from '../runtime-bv63eUiO.js';
|
|
5
|
-
import { A as APIRouteMatch } from '../runtime-DgeS2skB.js';
|
|
6
|
-
export { c as APIRouteParamValue, b as APIRouteParams, i as invokeAPIRouteEndpoint, a as isWebResponse, m as matchAPIRoute, n as normalizeRouteResponse } from '../runtime-DgeS2skB.js';
|
|
7
|
-
import '../resolver-IH4RmPEl.js';
|
|
8
|
-
import '../cache.js';
|
|
9
|
-
import '../transport-BmbGTXA5.js';
|
|
10
|
-
|
|
11
|
-
interface APIRoute extends FarmRouteRuntimeConfig {
|
|
12
|
-
path: string;
|
|
13
|
-
filePath: string;
|
|
14
|
-
methods: string[];
|
|
15
|
-
endpoints: Record<string, any>;
|
|
16
|
-
}
|
|
17
|
-
interface APIRouteManagerOptions {
|
|
18
|
-
throwOnLoadError?: boolean;
|
|
19
|
-
i18n?: FarmI18nRuntime;
|
|
20
|
-
}
|
|
21
|
-
declare const API_ROUTE_METHODS: readonly ["GET", "HEAD", "POST", "PUT", "DELETE", "PATCH", "OPTIONS"];
|
|
22
|
-
declare class APIRouteManager {
|
|
23
|
-
private routes;
|
|
24
|
-
private viteServer?;
|
|
25
|
-
private appDirs;
|
|
26
|
-
private throwOnLoadError;
|
|
27
|
-
private i18n?;
|
|
28
|
-
constructor(appDir: string | readonly string[], viteServer?: ViteDevServer, options?: APIRouteManagerOptions);
|
|
29
|
-
/**
|
|
30
|
-
* Discover route.ts files in /app/api and explicit endpoints in root routes.ts
|
|
31
|
-
*/
|
|
32
|
-
discoverRoutes(): Promise<void>;
|
|
33
|
-
/**
|
|
34
|
-
* Recursively find all route.ts files
|
|
35
|
-
*/
|
|
36
|
-
private findRouteFiles;
|
|
37
|
-
/**
|
|
38
|
-
* Load a route.ts file and extract HTTP method exports
|
|
39
|
-
*/
|
|
40
|
-
private loadRoute;
|
|
41
|
-
/**
|
|
42
|
-
* Load explicit-path endpoints from src/routes.ts-style files.
|
|
43
|
-
*/
|
|
44
|
-
private loadRootRoutes;
|
|
45
|
-
private loadProgrammaticApiRoutes;
|
|
46
|
-
private handleLoadError;
|
|
47
|
-
private findRootRoutesFile;
|
|
48
|
-
private loadModule;
|
|
49
|
-
private addEndpoint;
|
|
50
|
-
private addProgrammaticApiRoute;
|
|
51
|
-
/**
|
|
52
|
-
* Get the handler that directly invokes endpoint handlers
|
|
53
|
-
*/
|
|
54
|
-
getHandler(): ((req: Request) => Promise<Response>) | null;
|
|
55
|
-
/**
|
|
56
|
-
* Check if a path is an API route
|
|
57
|
-
*/
|
|
58
|
-
isAPIRoute(pathname: string): boolean;
|
|
59
|
-
matchRoute(pathname: string): APIRouteMatch<APIRoute> | null;
|
|
60
|
-
/**
|
|
61
|
-
* Get all routes for client type generation
|
|
62
|
-
*/
|
|
63
|
-
getRoutes(): Map<string, APIRoute>;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export { type APIRoute, APIRouteManager, type APIRouteManagerOptions, APIRouteMatch, API_ROUTE_METHODS };
|
package/dist/api/runtime.d.mts
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export { A as APIRouteMatch, c as APIRouteParamValue, b as APIRouteParams, z as createEndpointFailureResponse, i as invokeAPIRouteEndpoint, a as isWebResponse, m as matchAPIRoute, n as normalizeRouteResponse } from '../runtime-9nQjVM7X.mjs';
|
|
2
|
-
import '../cache.mjs';
|
|
3
|
-
import '../transport-BmbGTXA5.mjs';
|
package/dist/api/runtime.d.ts
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export { A as APIRouteMatch, c as APIRouteParamValue, b as APIRouteParams, z as createEndpointFailureResponse, i as invokeAPIRouteEndpoint, a as isWebResponse, m as matchAPIRoute, n as normalizeRouteResponse } from '../runtime-DgeS2skB.js';
|
|
2
|
-
import '../cache.js';
|
|
3
|
-
import '../transport-BmbGTXA5.js';
|
package/dist/api.d.mts
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
export { A as APIRouteMatch, c as APIRouteParamValue, b as APIRouteParams, q as AnyEndpointMiddleware, D as DELETE, e as EndpointErrorContracts, E as EndpointErrorDefinition, d as EndpointErrorDefinitions, f as EndpointFail, g as EndpointFailure, v as EndpointHandler, s as EndpointInvalidationContext, r as EndpointInvalidationTarget, t as EndpointInvalidations, p as EndpointMiddleware, l as EndpointMiddlewareContext, o as EndpointMiddlewareResult, u as EndpointOptions, j as EndpointParamValue, k as EndpointParams, G as GET, H as HEAD, I as InferEndpointMiddlewareContext, O as OPTIONS, y as PATCH, P as POST, x as PUT, T as TypedEndpoint, w as createEndpoint, i as invokeAPIRouteEndpoint, h as isEndpointFailure, a as isWebResponse, m as matchAPIRoute, n as normalizeRouteResponse } from './runtime-9nQjVM7X.mjs';
|
|
2
|
-
export { APIRoute, APIRouteManager, APIRouteManagerOptions, API_ROUTE_METHODS } from './api/route-manager.mjs';
|
|
3
|
-
export { r as APIClient, h as APIClientError, b as APIClientOptions, i as APIClientSystemError, c as APIClientWithoutIntegrationsOptions, g as APIResult, A as APIRouteRefMetadata, C as CacheKey, l as CacheOptions, k as CachePolicy, p as ClientOptions, a as FARM_API_ROUTE_META_SYMBOL, F as FARM_API_ROUTE_REF_SYMBOL, n as InvalidateOptions, I as InvalidateTarget, o as OptimisticOptions, O as OptimisticUpdate, R as RequestEvent, j as ResponseEvent, m as RetryOptions, q as RouteAPIClient, s as ServerAPIClient, S as ServerAPIClientOptions, d as ServerAPIClientWithoutIntegrationsOptions, f as StatusEvent, e as StatusPhase, t as createAPIClient, w as createServerAPIClient, v as getAPIRouteRefMetadata, u as isAPIRouteRef } from './client-BT1mFQas.mjs';
|
|
4
|
-
export { F as FarmAPIStream, c as FarmStreamResponse, a as MultipartField, M as MultipartSchema, b as MultipartValues, T as TypedFormData, e as isFarmAPIStream, d as isJSONStreamResponse, i as isMultipartSchema, j as jsonStream, m as multipart, r as readJSONStream, t as toFormData } from './transport-BmbGTXA5.mjs';
|
|
5
|
-
import { Plugin } from 'vite';
|
|
6
|
-
import './cache.mjs';
|
|
7
|
-
import './route-runtime-DoOHzCAD.mjs';
|
|
8
|
-
import './types-BMxWr97v.mjs';
|
|
9
|
-
import './runtime-Cxpq6xZN.mjs';
|
|
10
|
-
import './resolver-DJqjLMg_.mjs';
|
|
11
|
-
import './integration-api-CHT2OKAf.mjs';
|
|
12
|
-
import './client-cache-D-EZ7XVW.mjs';
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Farm.js API Routes Vite Plugin
|
|
16
|
-
*
|
|
17
|
-
* Standalone API route support that works with any Vite setup.
|
|
18
|
-
* Discovers and handles route.ts files in the api directory.
|
|
19
|
-
* Also supports root routes.ts for custom route definitions.
|
|
20
|
-
*
|
|
21
|
-
* @example
|
|
22
|
-
* ```ts
|
|
23
|
-
* import { farmApiPlugin } from '@farm.js/core'
|
|
24
|
-
*
|
|
25
|
-
* export default defineConfig({
|
|
26
|
-
* plugins: [farmApiPlugin({ srcDir: 'src' })],
|
|
27
|
-
* })
|
|
28
|
-
* ```
|
|
29
|
-
*/
|
|
30
|
-
|
|
31
|
-
interface FarmApiPluginOptions {
|
|
32
|
-
/** Source directory containing the api folder (default: 'src') */
|
|
33
|
-
srcDir?: string;
|
|
34
|
-
/** Enable debug logging */
|
|
35
|
-
debug?: boolean;
|
|
36
|
-
}
|
|
37
|
-
interface ApiRoute {
|
|
38
|
-
path: string;
|
|
39
|
-
filePath: string;
|
|
40
|
-
methods: string[];
|
|
41
|
-
endpoints: Record<string, any>;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Farm.js API Routes Vite Plugin
|
|
45
|
-
*/
|
|
46
|
-
declare function farmApiPlugin(options?: FarmApiPluginOptions): Plugin;
|
|
47
|
-
|
|
48
|
-
export { type ApiRoute, type FarmApiPluginOptions, farmApiPlugin };
|
package/dist/api.d.ts
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
export { A as APIRouteMatch, c as APIRouteParamValue, b as APIRouteParams, q as AnyEndpointMiddleware, D as DELETE, e as EndpointErrorContracts, E as EndpointErrorDefinition, d as EndpointErrorDefinitions, f as EndpointFail, g as EndpointFailure, v as EndpointHandler, s as EndpointInvalidationContext, r as EndpointInvalidationTarget, t as EndpointInvalidations, p as EndpointMiddleware, l as EndpointMiddlewareContext, o as EndpointMiddlewareResult, u as EndpointOptions, j as EndpointParamValue, k as EndpointParams, G as GET, H as HEAD, I as InferEndpointMiddlewareContext, O as OPTIONS, y as PATCH, P as POST, x as PUT, T as TypedEndpoint, w as createEndpoint, i as invokeAPIRouteEndpoint, h as isEndpointFailure, a as isWebResponse, m as matchAPIRoute, n as normalizeRouteResponse } from './runtime-DgeS2skB.js';
|
|
2
|
-
export { APIRoute, APIRouteManager, APIRouteManagerOptions, API_ROUTE_METHODS } from './api/route-manager.js';
|
|
3
|
-
export { r as APIClient, h as APIClientError, b as APIClientOptions, i as APIClientSystemError, c as APIClientWithoutIntegrationsOptions, g as APIResult, A as APIRouteRefMetadata, C as CacheKey, l as CacheOptions, k as CachePolicy, p as ClientOptions, a as FARM_API_ROUTE_META_SYMBOL, F as FARM_API_ROUTE_REF_SYMBOL, n as InvalidateOptions, I as InvalidateTarget, o as OptimisticOptions, O as OptimisticUpdate, R as RequestEvent, j as ResponseEvent, m as RetryOptions, q as RouteAPIClient, s as ServerAPIClient, S as ServerAPIClientOptions, d as ServerAPIClientWithoutIntegrationsOptions, f as StatusEvent, e as StatusPhase, t as createAPIClient, w as createServerAPIClient, v as getAPIRouteRefMetadata, u as isAPIRouteRef } from './client-Nn0q4eO4.js';
|
|
4
|
-
export { F as FarmAPIStream, c as FarmStreamResponse, a as MultipartField, M as MultipartSchema, b as MultipartValues, T as TypedFormData, e as isFarmAPIStream, d as isJSONStreamResponse, i as isMultipartSchema, j as jsonStream, m as multipart, r as readJSONStream, t as toFormData } from './transport-BmbGTXA5.js';
|
|
5
|
-
import { Plugin } from 'vite';
|
|
6
|
-
import './cache.js';
|
|
7
|
-
import './route-runtime-DoOHzCAD.js';
|
|
8
|
-
import './types-BMxWr97v.js';
|
|
9
|
-
import './runtime-bv63eUiO.js';
|
|
10
|
-
import './resolver-IH4RmPEl.js';
|
|
11
|
-
import './integration-api-CHT2OKAf.js';
|
|
12
|
-
import './client-cache-CIlyBlmx.js';
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Farm.js API Routes Vite Plugin
|
|
16
|
-
*
|
|
17
|
-
* Standalone API route support that works with any Vite setup.
|
|
18
|
-
* Discovers and handles route.ts files in the api directory.
|
|
19
|
-
* Also supports root routes.ts for custom route definitions.
|
|
20
|
-
*
|
|
21
|
-
* @example
|
|
22
|
-
* ```ts
|
|
23
|
-
* import { farmApiPlugin } from '@farm.js/core'
|
|
24
|
-
*
|
|
25
|
-
* export default defineConfig({
|
|
26
|
-
* plugins: [farmApiPlugin({ srcDir: 'src' })],
|
|
27
|
-
* })
|
|
28
|
-
* ```
|
|
29
|
-
*/
|
|
30
|
-
|
|
31
|
-
interface FarmApiPluginOptions {
|
|
32
|
-
/** Source directory containing the api folder (default: 'src') */
|
|
33
|
-
srcDir?: string;
|
|
34
|
-
/** Enable debug logging */
|
|
35
|
-
debug?: boolean;
|
|
36
|
-
}
|
|
37
|
-
interface ApiRoute {
|
|
38
|
-
path: string;
|
|
39
|
-
filePath: string;
|
|
40
|
-
methods: string[];
|
|
41
|
-
endpoints: Record<string, any>;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Farm.js API Routes Vite Plugin
|
|
45
|
-
*/
|
|
46
|
-
declare function farmApiPlugin(options?: FarmApiPluginOptions): Plugin;
|
|
47
|
-
|
|
48
|
-
export { type ApiRoute, type FarmApiPluginOptions, farmApiPlugin };
|