@farm.js/core 0.1.0-beta.3 → 0.1.0-beta.4
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/agent-runtime.d.mts +2 -1
- package/dist/agent-runtime.d.ts +2 -1
- package/dist/api/route-manager.cjs +313 -10
- package/dist/api/route-manager.cjs.map +1 -1
- package/dist/api/route-manager.d.mts +3 -2
- package/dist/api/route-manager.d.ts +3 -2
- package/dist/api/route-manager.mjs +6 -5
- package/dist/api/runtime.cjs +313 -10
- package/dist/api/runtime.cjs.map +1 -1
- package/dist/api/runtime.d.mts +2 -1
- package/dist/api/runtime.d.ts +2 -1
- package/dist/api/runtime.mjs +4 -3
- package/dist/api.cjs +642 -57
- package/dist/api.cjs.map +1 -1
- package/dist/api.d.mts +3 -2
- package/dist/api.d.ts +3 -2
- package/dist/api.mjs +29 -9
- package/dist/{app-DOKxo-LH.d.ts → app-BjN-da13.d.ts} +38 -3
- package/dist/{app-BB3Iu3xh.d.mts → app-CakAr8Be.d.mts} +38 -3
- package/dist/app-markdown.d.mts +2 -1
- package/dist/app-markdown.d.ts +2 -1
- package/dist/cache.cjs +395 -12
- package/dist/cache.cjs.map +1 -1
- package/dist/cache.d.mts +100 -6
- package/dist/cache.d.ts +100 -6
- package/dist/cache.mjs +8 -2
- package/dist/{chunk-XUBZ7JI4.mjs → chunk-2CUKEMVR.mjs} +187 -16
- package/dist/chunk-2CUKEMVR.mjs.map +1 -0
- package/dist/{chunk-5QH4IKY3.mjs → chunk-3U3ZUQAQ.mjs} +2 -2
- package/dist/{chunk-6WXJ54TC.mjs → chunk-65A7QIKI.mjs} +5 -5
- package/dist/{chunk-6WXJ54TC.mjs.map → chunk-65A7QIKI.mjs.map} +1 -1
- package/dist/{chunk-OHC6VCDI.mjs → chunk-AJWRO5WE.mjs} +521 -42
- package/dist/chunk-AJWRO5WE.mjs.map +1 -0
- package/dist/chunk-ALCLXXTY.mjs +187 -0
- package/dist/chunk-ALCLXXTY.mjs.map +1 -0
- package/dist/{chunk-XJSHJN4M.mjs → chunk-AOBXKNS5.mjs} +593 -49
- package/dist/chunk-AOBXKNS5.mjs.map +1 -0
- package/dist/{chunk-CSU4KJJF.mjs → chunk-C2ROET2V.mjs} +2 -2
- package/dist/{chunk-BIOIOWXZ.mjs → chunk-HNIQFZKB.mjs} +2 -2
- package/dist/{chunk-G5I34UA6.mjs → chunk-JDEOUK5V.mjs} +4 -4
- package/dist/{chunk-T543TMFY.mjs → chunk-NM3CRAAL.mjs} +3 -2
- package/dist/chunk-NM3CRAAL.mjs.map +1 -0
- package/dist/{chunk-LWMGIEJA.mjs → chunk-PFE6GMNE.mjs} +47 -37
- package/dist/chunk-PFE6GMNE.mjs.map +1 -0
- package/dist/{chunk-6VS6CKAV.mjs → chunk-QM746KUO.mjs} +8 -1
- package/dist/chunk-QM746KUO.mjs.map +1 -0
- package/dist/{chunk-SHRJG6OG.mjs → chunk-RBRLLZL5.mjs} +18 -3
- package/dist/chunk-RBRLLZL5.mjs.map +1 -0
- package/dist/{chunk-MH6FKW2I.mjs → chunk-SADGIRS2.mjs} +3 -3
- package/dist/{chunk-NRRFGX45.mjs → chunk-TQAEEJB4.mjs} +3 -3
- package/dist/{chunk-45LKHSHJ.mjs → chunk-UB5UOSHB.mjs} +24 -12
- package/dist/chunk-UB5UOSHB.mjs.map +1 -0
- package/dist/chunk-V3XURYJO.mjs +756 -0
- package/dist/chunk-V3XURYJO.mjs.map +1 -0
- package/dist/{chunk-5FW6PQ3J.mjs → chunk-VVKWFZAH.mjs} +41 -16
- package/dist/chunk-VVKWFZAH.mjs.map +1 -0
- package/dist/{chunk-HZYXGV4K.mjs → chunk-VY2UYN5R.mjs} +24 -4
- package/dist/chunk-VY2UYN5R.mjs.map +1 -0
- package/dist/{chunk-C33RALN7.mjs → chunk-W2CRQFF6.mjs} +79 -15
- package/dist/chunk-W2CRQFF6.mjs.map +1 -0
- package/dist/{chunk-JNYVN7YP.mjs → chunk-W4UIVMVI.mjs} +2 -2
- package/dist/{chunk-JNYVN7YP.mjs.map → chunk-W4UIVMVI.mjs.map} +1 -1
- package/dist/{chunk-LG3YINQN.mjs → chunk-Z5CQMP54.mjs} +3 -3
- package/dist/{client-DiViK9yK.d.mts → client-BT1mFQas.d.mts} +23 -4
- package/dist/{client-DpEBJbts.d.ts → client-Nn0q4eO4.d.ts} +23 -4
- package/dist/{client-plugins-CTnsZz_A.d.ts → client-plugins-Cw4qUGsw.d.ts} +6 -0
- package/dist/{client-plugins-Cnr0D3kk.d.mts → client-plugins-DQQ1adXM.d.mts} +6 -0
- package/dist/client-plugins.d.mts +2 -1
- package/dist/client-plugins.d.ts +2 -1
- package/dist/client.cjs +665 -82
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.mts +70 -4
- package/dist/client.d.ts +70 -4
- package/dist/client.mjs +10 -7
- package/dist/config.d.mts +2 -1
- package/dist/config.d.ts +2 -1
- package/dist/{devtools-HE4FTUDN.mjs → devtools-LVC3VB5P.mjs} +4 -4
- package/dist/docs.cjs +11 -1
- package/dist/docs.cjs.map +1 -1
- package/dist/docs.mjs +4 -4
- package/dist/index.cjs +2112 -197
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +12 -11
- package/dist/index.d.ts +12 -11
- package/dist/index.mjs +49 -21
- package/dist/index.mjs.map +1 -1
- package/dist/integrations.d.mts +2 -1
- package/dist/integrations.d.ts +2 -1
- package/dist/internal/build-runtime.cjs +1455 -90
- package/dist/internal/build-runtime.cjs.map +1 -1
- package/dist/internal/build-runtime.d.mts +4 -3
- package/dist/internal/build-runtime.d.ts +4 -3
- package/dist/internal/build-runtime.mjs +15 -14
- package/dist/internal/config-runtime.cjs +12 -1
- package/dist/internal/config-runtime.cjs.map +1 -1
- package/dist/internal/config-runtime.d.mts +3 -2
- package/dist/internal/config-runtime.d.ts +3 -2
- package/dist/internal/config-runtime.mjs +3 -3
- package/dist/internal/production-runtime.cjs +282 -6
- package/dist/internal/production-runtime.cjs.map +1 -1
- package/dist/internal/production-runtime.d.mts +4 -4
- package/dist/internal/production-runtime.d.ts +4 -4
- package/dist/internal/production-runtime.mjs +4 -2
- package/dist/{metadata-eoVmHoyv.d.ts → metadata-BAPg_Nmo.d.ts} +1 -1
- package/dist/{metadata-Dp8AdvsB.d.mts → metadata-_6i9oFG3.d.mts} +1 -1
- package/dist/middleware.d.mts +4 -3
- package/dist/middleware.d.ts +4 -3
- package/dist/navigation.cjs +40 -15
- package/dist/navigation.cjs.map +1 -1
- package/dist/navigation.mjs +2 -2
- package/dist/plugin.cjs +913 -53
- package/dist/plugin.cjs.map +1 -1
- package/dist/plugin.d.mts +2 -1
- package/dist/plugin.d.ts +2 -1
- package/dist/plugin.mjs +11 -10
- package/dist/{production-runtime-BqTnUTai.d.ts → production-runtime-BoJDc5mc.d.ts} +1 -1
- package/dist/{production-runtime-DtDdG9fc.d.mts → production-runtime-DPfgMV9Y.d.mts} +1 -1
- package/dist/routes.cjs +276 -6
- package/dist/routes.cjs.map +1 -1
- package/dist/routes.d.mts +1 -1
- package/dist/routes.d.ts +1 -1
- package/dist/routes.mjs +3 -3
- package/dist/{runtime-C1B7pSGT.d.mts → runtime-9nQjVM7X.d.mts} +8 -9
- package/dist/{runtime-CdPHt0bv.d.ts → runtime-DgeS2skB.d.ts} +8 -9
- package/dist/server-action-security.cjs +28 -10
- package/dist/server-action-security.cjs.map +1 -1
- package/dist/server-action-security.d.mts +2 -1
- package/dist/server-action-security.d.ts +2 -1
- package/dist/server-action-security.mjs +2 -2
- package/dist/server-fn-client.d.mts +1 -0
- package/dist/server-fn-client.d.ts +1 -0
- package/dist/server-fn.cjs +785 -3
- package/dist/server-fn.cjs.map +1 -1
- package/dist/server-fn.d.mts +10 -1
- package/dist/server-fn.d.ts +10 -1
- package/dist/server-fn.mjs +6 -3
- package/dist/server-plugins.d.mts +3 -2
- package/dist/server-plugins.d.ts +3 -2
- package/dist/server-query-client.cjs +278 -7
- package/dist/server-query-client.cjs.map +1 -1
- package/dist/server-query-client.mjs +4 -4
- package/dist/server-query.cjs +381 -10
- package/dist/server-query.cjs.map +1 -1
- package/dist/server-query.mjs +5 -5
- package/dist/server.cjs +1086 -76
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.mts +8 -7
- package/dist/server.d.ts +8 -7
- package/dist/server.mjs +31 -16
- package/dist/server.mjs.map +1 -1
- package/dist/testing.cjs +341 -20
- package/dist/testing.cjs.map +1 -1
- package/dist/testing.d.mts +3 -2
- package/dist/testing.d.ts +3 -2
- package/dist/testing.mjs +7 -6
- package/dist/testing.mjs.map +1 -1
- package/dist/transport-BmbGTXA5.d.mts +49 -0
- package/dist/transport-BmbGTXA5.d.ts +49 -0
- package/dist/{utils-8USa5BiY.d.mts → utils-CHXlMDkg.d.mts} +1 -1
- package/dist/{utils-DKJb6K6G.d.ts → utils-Drsyz1Vj.d.ts} +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 +914 -54
- package/dist/vite.cjs.map +1 -1
- package/dist/vite.d.mts +2 -1
- package/dist/vite.d.ts +2 -1
- package/dist/vite.mjs +11 -10
- package/package.json +1 -1
- package/types/api.d.ts +44 -0
- package/types/client.d.ts +85 -4
- package/dist/chunk-45LKHSHJ.mjs.map +0 -1
- package/dist/chunk-5FW6PQ3J.mjs.map +0 -1
- package/dist/chunk-6VS6CKAV.mjs.map +0 -1
- package/dist/chunk-C33RALN7.mjs.map +0 -1
- package/dist/chunk-GZWT6VI5.mjs +0 -382
- package/dist/chunk-GZWT6VI5.mjs.map +0 -1
- package/dist/chunk-HZYXGV4K.mjs.map +0 -1
- package/dist/chunk-LWMGIEJA.mjs.map +0 -1
- package/dist/chunk-OHC6VCDI.mjs.map +0 -1
- package/dist/chunk-SHRJG6OG.mjs.map +0 -1
- package/dist/chunk-T543TMFY.mjs.map +0 -1
- package/dist/chunk-XJSHJN4M.mjs.map +0 -1
- package/dist/chunk-XUBZ7JI4.mjs.map +0 -1
- /package/dist/{chunk-5QH4IKY3.mjs.map → chunk-3U3ZUQAQ.mjs.map} +0 -0
- /package/dist/{chunk-CSU4KJJF.mjs.map → chunk-C2ROET2V.mjs.map} +0 -0
- /package/dist/{chunk-BIOIOWXZ.mjs.map → chunk-HNIQFZKB.mjs.map} +0 -0
- /package/dist/{chunk-G5I34UA6.mjs.map → chunk-JDEOUK5V.mjs.map} +0 -0
- /package/dist/{chunk-MH6FKW2I.mjs.map → chunk-SADGIRS2.mjs.map} +0 -0
- /package/dist/{chunk-NRRFGX45.mjs.map → chunk-TQAEEJB4.mjs.map} +0 -0
- /package/dist/{chunk-LG3YINQN.mjs.map → chunk-Z5CQMP54.mjs.map} +0 -0
- /package/dist/{devtools-HE4FTUDN.mjs.map → devtools-LVC3VB5P.mjs.map} +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { F as FarmIntegrationAPI, a as FarmIntegrationAPIOperation } from './integration-api-CHT2OKAf.mjs';
|
|
2
2
|
import { F as FarmClientCacheKey } from './client-cache-D-EZ7XVW.mjs';
|
|
3
3
|
import { DefinedCacheKey, RouteDataCacheKey, InferCacheKeyData } from './cache.mjs';
|
|
4
|
+
import { F as FarmAPIStream } from './transport-BmbGTXA5.mjs';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Small per-call integration metadata. When sent from a browser, values are
|
|
@@ -167,6 +168,13 @@ declare function integrationClients<TSources extends Record<string, any>>(source
|
|
|
167
168
|
}, clientOptions?: IntegrationClientOptions, serverOptions?: Omit<IntegrationServerClientOptions, "isServer">): IntegrationClients<TSources>;
|
|
168
169
|
|
|
169
170
|
declare const FARM_API_ROUTE_REF_SYMBOL: unique symbol;
|
|
171
|
+
declare const FARM_API_ROUTE_META_SYMBOL: unique symbol;
|
|
172
|
+
type APIRouteRefMetadata = {
|
|
173
|
+
path: string;
|
|
174
|
+
method: string;
|
|
175
|
+
baseURL: string;
|
|
176
|
+
sameOrigin: boolean;
|
|
177
|
+
};
|
|
170
178
|
type APIClientOptions = {
|
|
171
179
|
baseURL?: string;
|
|
172
180
|
headers?: Record<string, string>;
|
|
@@ -336,17 +344,27 @@ type QueryInputProp<TValue> = IsNever<TValue> extends true ? {} : IsAny<TValue>
|
|
|
336
344
|
query: TValue;
|
|
337
345
|
};
|
|
338
346
|
type HasRequiredKeys<T> = RequiredKeys<T> extends never ? false : true;
|
|
339
|
-
type
|
|
347
|
+
type InferEndpointBody<T> = T extends {
|
|
348
|
+
__types: {
|
|
349
|
+
inputBody: infer TInputBody;
|
|
350
|
+
};
|
|
351
|
+
} ? TInputBody : T extends {
|
|
340
352
|
__types: {
|
|
341
353
|
body: infer TBody;
|
|
354
|
+
};
|
|
355
|
+
} ? TBody : never;
|
|
356
|
+
type InferEndpointInput<T> = T extends {
|
|
357
|
+
__types: {
|
|
342
358
|
query: infer TQuery;
|
|
343
359
|
};
|
|
344
|
-
} ? Simplify<BodyInputProp<
|
|
360
|
+
} ? Simplify<BodyInputProp<InferEndpointBody<T>> & QueryInputProp<TQuery>> : {};
|
|
345
361
|
type InferEndpointOutput<T> = T extends {
|
|
346
362
|
__types: {
|
|
347
363
|
response: infer R;
|
|
348
364
|
};
|
|
349
|
-
} ? R
|
|
365
|
+
} ? R extends {
|
|
366
|
+
readonly __farmStreamItem: infer TItem;
|
|
367
|
+
} ? FarmAPIStream<TItem> : R : any;
|
|
350
368
|
type InferEndpointError<T> = T extends {
|
|
351
369
|
__types: {
|
|
352
370
|
errors: infer TErrors;
|
|
@@ -406,6 +424,7 @@ type ServerAPIClient<TEndpoints extends Record<string, any>, TIntegrations exten
|
|
|
406
424
|
declare function createAPIClient<TRouter extends Record<string, any>>(options: APIClientWithoutIntegrationsOptions): RouteAPIClient<TRouter>;
|
|
407
425
|
declare function createAPIClient<TRouter extends Record<string, any>, TIntegrations extends Record<string, any> = {}>(options?: APIClientOptions): APIClient<TRouter, TIntegrations>;
|
|
408
426
|
declare function isAPIRouteRef(value: unknown): value is CallableRouteRef;
|
|
427
|
+
declare function getAPIRouteRefMetadata(value: unknown): APIRouteRefMetadata | null;
|
|
409
428
|
/**
|
|
410
429
|
* Server-side API client that calls endpoints directly as functions
|
|
411
430
|
* No HTTP overhead for app endpoints, and registered integration routes can be exposed at
|
|
@@ -425,4 +444,4 @@ declare function createServerAPIClient<TEndpoints extends Record<string, any>>(e
|
|
|
425
444
|
declare function createServerAPIClient<TEndpoints extends Record<string, any>>(endpoints: TEndpoints, options: ServerAPIClientWithoutIntegrationsOptions): TEndpoints;
|
|
426
445
|
declare function createServerAPIClient<TEndpoints extends Record<string, any>, TIntegrations extends Record<string, any> = {}>(endpoints: TEndpoints, options?: ServerAPIClientOptions): ServerAPIClient<TEndpoints, TIntegrations>;
|
|
427
446
|
|
|
428
|
-
export { type
|
|
447
|
+
export { type IntegrationServerClientAliases as $, type APIRouteRefMetadata as A, createIntegrationClients as B, type CacheKey as C, createIntegrations as D, createIntegrationServerClient as E, FARM_API_ROUTE_REF_SYMBOL as F, getIntegrationAPIManifest as G, integrationClients as H, type InvalidateTarget as I, integrationsClient as J, integrationsServer as K, type IntegrationClient as L, type IntegrationClientAliases as M, type IntegrationClientRoot as N, type OptimisticUpdate as O, type IntegrationClientOptions as P, type IntegrationClientRequestOptions as Q, type RequestEvent as R, type ServerAPIClientOptions as S, type IntegrationAPI as T, type IntegrationClients as U, type IntegrationClientData as V, type IntegrationOperationResult as W, type InferIntegrationOperationBody as X, type InferIntegrationOperationQuery as Y, type InferIntegrationOperationResponse as Z, type IntegrationServerClient as _, FARM_API_ROUTE_META_SYMBOL as a, type IntegrationServerClientOptions as a0, type IntegrationServerClientRequestOptions as a1, type IntegrationServerClientRoot as a2, type IntegrationServerRequestLike as a3, type APIClientOptions as b, type APIClientWithoutIntegrationsOptions as c, type ServerAPIClientWithoutIntegrationsOptions as d, type StatusPhase as e, type StatusEvent as f, type APIResult as g, APIClientError as h, type APIClientSystemError as i, type ResponseEvent as j, type CachePolicy as k, type CacheOptions as l, type RetryOptions as m, type InvalidateOptions as n, type OptimisticOptions as o, type ClientOptions as p, type RouteAPIClient as q, type APIClient as r, type ServerAPIClient as s, createAPIClient as t, isAPIRouteRef as u, getAPIRouteRefMetadata as v, createServerAPIClient as w, createIntegrationClient as x, IntegrationClientError as y, createIntegrationApi as z };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { F as FarmIntegrationAPI, a as FarmIntegrationAPIOperation } from './integration-api-CHT2OKAf.js';
|
|
2
2
|
import { F as FarmClientCacheKey } from './client-cache-CIlyBlmx.js';
|
|
3
3
|
import { DefinedCacheKey, RouteDataCacheKey, InferCacheKeyData } from './cache.js';
|
|
4
|
+
import { F as FarmAPIStream } from './transport-BmbGTXA5.js';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Small per-call integration metadata. When sent from a browser, values are
|
|
@@ -167,6 +168,13 @@ declare function integrationClients<TSources extends Record<string, any>>(source
|
|
|
167
168
|
}, clientOptions?: IntegrationClientOptions, serverOptions?: Omit<IntegrationServerClientOptions, "isServer">): IntegrationClients<TSources>;
|
|
168
169
|
|
|
169
170
|
declare const FARM_API_ROUTE_REF_SYMBOL: unique symbol;
|
|
171
|
+
declare const FARM_API_ROUTE_META_SYMBOL: unique symbol;
|
|
172
|
+
type APIRouteRefMetadata = {
|
|
173
|
+
path: string;
|
|
174
|
+
method: string;
|
|
175
|
+
baseURL: string;
|
|
176
|
+
sameOrigin: boolean;
|
|
177
|
+
};
|
|
170
178
|
type APIClientOptions = {
|
|
171
179
|
baseURL?: string;
|
|
172
180
|
headers?: Record<string, string>;
|
|
@@ -336,17 +344,27 @@ type QueryInputProp<TValue> = IsNever<TValue> extends true ? {} : IsAny<TValue>
|
|
|
336
344
|
query: TValue;
|
|
337
345
|
};
|
|
338
346
|
type HasRequiredKeys<T> = RequiredKeys<T> extends never ? false : true;
|
|
339
|
-
type
|
|
347
|
+
type InferEndpointBody<T> = T extends {
|
|
348
|
+
__types: {
|
|
349
|
+
inputBody: infer TInputBody;
|
|
350
|
+
};
|
|
351
|
+
} ? TInputBody : T extends {
|
|
340
352
|
__types: {
|
|
341
353
|
body: infer TBody;
|
|
354
|
+
};
|
|
355
|
+
} ? TBody : never;
|
|
356
|
+
type InferEndpointInput<T> = T extends {
|
|
357
|
+
__types: {
|
|
342
358
|
query: infer TQuery;
|
|
343
359
|
};
|
|
344
|
-
} ? Simplify<BodyInputProp<
|
|
360
|
+
} ? Simplify<BodyInputProp<InferEndpointBody<T>> & QueryInputProp<TQuery>> : {};
|
|
345
361
|
type InferEndpointOutput<T> = T extends {
|
|
346
362
|
__types: {
|
|
347
363
|
response: infer R;
|
|
348
364
|
};
|
|
349
|
-
} ? R
|
|
365
|
+
} ? R extends {
|
|
366
|
+
readonly __farmStreamItem: infer TItem;
|
|
367
|
+
} ? FarmAPIStream<TItem> : R : any;
|
|
350
368
|
type InferEndpointError<T> = T extends {
|
|
351
369
|
__types: {
|
|
352
370
|
errors: infer TErrors;
|
|
@@ -406,6 +424,7 @@ type ServerAPIClient<TEndpoints extends Record<string, any>, TIntegrations exten
|
|
|
406
424
|
declare function createAPIClient<TRouter extends Record<string, any>>(options: APIClientWithoutIntegrationsOptions): RouteAPIClient<TRouter>;
|
|
407
425
|
declare function createAPIClient<TRouter extends Record<string, any>, TIntegrations extends Record<string, any> = {}>(options?: APIClientOptions): APIClient<TRouter, TIntegrations>;
|
|
408
426
|
declare function isAPIRouteRef(value: unknown): value is CallableRouteRef;
|
|
427
|
+
declare function getAPIRouteRefMetadata(value: unknown): APIRouteRefMetadata | null;
|
|
409
428
|
/**
|
|
410
429
|
* Server-side API client that calls endpoints directly as functions
|
|
411
430
|
* No HTTP overhead for app endpoints, and registered integration routes can be exposed at
|
|
@@ -425,4 +444,4 @@ declare function createServerAPIClient<TEndpoints extends Record<string, any>>(e
|
|
|
425
444
|
declare function createServerAPIClient<TEndpoints extends Record<string, any>>(endpoints: TEndpoints, options: ServerAPIClientWithoutIntegrationsOptions): TEndpoints;
|
|
426
445
|
declare function createServerAPIClient<TEndpoints extends Record<string, any>, TIntegrations extends Record<string, any> = {}>(endpoints: TEndpoints, options?: ServerAPIClientOptions): ServerAPIClient<TEndpoints, TIntegrations>;
|
|
427
446
|
|
|
428
|
-
export { type
|
|
447
|
+
export { type IntegrationServerClientAliases as $, type APIRouteRefMetadata as A, createIntegrationClients as B, type CacheKey as C, createIntegrations as D, createIntegrationServerClient as E, FARM_API_ROUTE_REF_SYMBOL as F, getIntegrationAPIManifest as G, integrationClients as H, type InvalidateTarget as I, integrationsClient as J, integrationsServer as K, type IntegrationClient as L, type IntegrationClientAliases as M, type IntegrationClientRoot as N, type OptimisticUpdate as O, type IntegrationClientOptions as P, type IntegrationClientRequestOptions as Q, type RequestEvent as R, type ServerAPIClientOptions as S, type IntegrationAPI as T, type IntegrationClients as U, type IntegrationClientData as V, type IntegrationOperationResult as W, type InferIntegrationOperationBody as X, type InferIntegrationOperationQuery as Y, type InferIntegrationOperationResponse as Z, type IntegrationServerClient as _, FARM_API_ROUTE_META_SYMBOL as a, type IntegrationServerClientOptions as a0, type IntegrationServerClientRequestOptions as a1, type IntegrationServerClientRoot as a2, type IntegrationServerRequestLike as a3, type APIClientOptions as b, type APIClientWithoutIntegrationsOptions as c, type ServerAPIClientWithoutIntegrationsOptions as d, type StatusPhase as e, type StatusEvent as f, type APIResult as g, APIClientError as h, type APIClientSystemError as i, type ResponseEvent as j, type CachePolicy as k, type CacheOptions as l, type RetryOptions as m, type InvalidateOptions as n, type OptimisticOptions as o, type ClientOptions as p, type RouteAPIClient as q, type APIClient as r, type ServerAPIClient as s, createAPIClient as t, isAPIRouteRef as u, getAPIRouteRefMetadata as v, createServerAPIClient as w, createIntegrationClient as x, IntegrationClientError as y, createIntegrationApi as z };
|
|
@@ -15,6 +15,7 @@ import { FarmEnvConfig, ResolvedFarmEnv } from './env.js';
|
|
|
15
15
|
import { FarmServerActionsConfig, ResolvedFarmServerActionsConfig } from './server-action-security.js';
|
|
16
16
|
import { F as FarmImageConfig, R as ResolvedFarmImageConfig } from './image-config-Duob7wER.js';
|
|
17
17
|
import { k as FarmI18nUserConfig, R as ResolvedFarmI18nConfig } from './types-BH1lhg5G.js';
|
|
18
|
+
import { FarmCacheUserConfig } from './cache.js';
|
|
18
19
|
import { F as FarmRouteRuntimeConfig, a as FarmRouteRuntime, b as FarmRouteRegions, c as FarmRouteMaxDuration } from './route-runtime-DoOHzCAD.js';
|
|
19
20
|
|
|
20
21
|
type RuntimeClientFactory<TClient> = () => TClient | Promise<TClient>;
|
|
@@ -486,6 +487,8 @@ interface FarmUserConfig extends Omit<FarmConfig, "vite" | "docs" | "env" | "lay
|
|
|
486
487
|
extends?: readonly FarmLayerEntry[];
|
|
487
488
|
plugins?: FarmPlugin[];
|
|
488
489
|
integrations?: FarmIntegrationsUserConfig;
|
|
490
|
+
/** Shared application data, route, ISR, and PPR cache. */
|
|
491
|
+
cache?: FarmCacheUserConfig;
|
|
489
492
|
migrations?: FarmMigrationsUserConfig;
|
|
490
493
|
/** Map portable cron schedules to ordinary GET API routes. */
|
|
491
494
|
cron?: FarmCronUserConfig | FarmCronResolvedConfig | false;
|
|
@@ -1409,6 +1412,7 @@ interface FarmAppContext {
|
|
|
1409
1412
|
}
|
|
1410
1413
|
interface FarmConfig {
|
|
1411
1414
|
root?: string;
|
|
1415
|
+
/** App source directory. @default "src" */
|
|
1412
1416
|
srcDir?: string;
|
|
1413
1417
|
extends?: readonly FarmLayerEntry[];
|
|
1414
1418
|
/** Resolved layer graph. Populated by config resolution. */
|
|
@@ -1438,6 +1442,8 @@ interface FarmConfig {
|
|
|
1438
1442
|
};
|
|
1439
1443
|
};
|
|
1440
1444
|
storage?: FarmStorageUserConfig;
|
|
1445
|
+
/** Shared application data, route, ISR, and PPR cache. */
|
|
1446
|
+
cache?: FarmCacheUserConfig;
|
|
1441
1447
|
integrations?: FarmIntegrationsUserConfig;
|
|
1442
1448
|
plugins?: FarmPlugin[];
|
|
1443
1449
|
migrations?: FarmMigrationsUserConfig;
|
|
@@ -15,6 +15,7 @@ import { FarmEnvConfig, ResolvedFarmEnv } from './env.mjs';
|
|
|
15
15
|
import { FarmServerActionsConfig, ResolvedFarmServerActionsConfig } from './server-action-security.mjs';
|
|
16
16
|
import { F as FarmImageConfig, R as ResolvedFarmImageConfig } from './image-config-Duob7wER.mjs';
|
|
17
17
|
import { k as FarmI18nUserConfig, R as ResolvedFarmI18nConfig } from './types-BH1lhg5G.mjs';
|
|
18
|
+
import { FarmCacheUserConfig } from './cache.mjs';
|
|
18
19
|
import { F as FarmRouteRuntimeConfig, a as FarmRouteRuntime, b as FarmRouteRegions, c as FarmRouteMaxDuration } from './route-runtime-DoOHzCAD.mjs';
|
|
19
20
|
|
|
20
21
|
type RuntimeClientFactory<TClient> = () => TClient | Promise<TClient>;
|
|
@@ -486,6 +487,8 @@ interface FarmUserConfig extends Omit<FarmConfig, "vite" | "docs" | "env" | "lay
|
|
|
486
487
|
extends?: readonly FarmLayerEntry[];
|
|
487
488
|
plugins?: FarmPlugin[];
|
|
488
489
|
integrations?: FarmIntegrationsUserConfig;
|
|
490
|
+
/** Shared application data, route, ISR, and PPR cache. */
|
|
491
|
+
cache?: FarmCacheUserConfig;
|
|
489
492
|
migrations?: FarmMigrationsUserConfig;
|
|
490
493
|
/** Map portable cron schedules to ordinary GET API routes. */
|
|
491
494
|
cron?: FarmCronUserConfig | FarmCronResolvedConfig | false;
|
|
@@ -1409,6 +1412,7 @@ interface FarmAppContext {
|
|
|
1409
1412
|
}
|
|
1410
1413
|
interface FarmConfig {
|
|
1411
1414
|
root?: string;
|
|
1415
|
+
/** App source directory. @default "src" */
|
|
1412
1416
|
srcDir?: string;
|
|
1413
1417
|
extends?: readonly FarmLayerEntry[];
|
|
1414
1418
|
/** Resolved layer graph. Populated by config resolution. */
|
|
@@ -1438,6 +1442,8 @@ interface FarmConfig {
|
|
|
1438
1442
|
};
|
|
1439
1443
|
};
|
|
1440
1444
|
storage?: FarmStorageUserConfig;
|
|
1445
|
+
/** Shared application data, route, ISR, and PPR cache. */
|
|
1446
|
+
cache?: FarmCacheUserConfig;
|
|
1441
1447
|
integrations?: FarmIntegrationsUserConfig;
|
|
1442
1448
|
plugins?: FarmPlugin[];
|
|
1443
1449
|
migrations?: FarmMigrationsUserConfig;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { a as FarmClientHydrationCompleteEvent, b as FarmClientHydrationEvent, d as FarmClientHydrationMode, e as FarmClientHydrationSession, f as FarmClientLocation, g as FarmClientNavigationAction, h as FarmClientNavigationErrorEvent, i as FarmClientNavigationEvent, j as FarmClientNavigationLoadedEvent, k as FarmClientNavigationResolvedEvent, l as FarmClientNavigationSession, m as FarmClientPerformanceEvent, n as FarmClientPlugin, o as FarmClientPluginCloseEvent, p as FarmClientPluginEnforce, q as FarmClientPluginErrorEvent, r as FarmClientPluginErrorPhase, F as FarmClientPluginManager, s as FarmClientPluginManagerOptions, t as FarmClientPluginMetadata, u as FarmClientPluginRegistration, v as FarmClientPluginRouter, w as FarmClientPluginSetupEvent, x as FarmClientPluginStateEvent, c as createClientPluginManager } from './plugin-BJDf43dc.mjs';
|
|
2
|
-
export { V as FarmPlugin, ad as FarmPluginContext, ae as FarmRequestPluginContext, af as FarmRequestStore } from './client-plugins-
|
|
2
|
+
export { V as FarmPlugin, ad as FarmPluginContext, ae as FarmRequestPluginContext, af as FarmRequestStore } from './client-plugins-DQQ1adXM.mjs';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'http';
|
|
5
5
|
import './types-D1A6-XvH.mjs';
|
|
@@ -18,4 +18,5 @@ import './env.mjs';
|
|
|
18
18
|
import './server-action-security.mjs';
|
|
19
19
|
import './image-config-Duob7wER.mjs';
|
|
20
20
|
import './types-BH1lhg5G.mjs';
|
|
21
|
+
import './cache.mjs';
|
|
21
22
|
import './route-runtime-DoOHzCAD.mjs';
|
package/dist/client-plugins.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { a as FarmClientHydrationCompleteEvent, b as FarmClientHydrationEvent, d as FarmClientHydrationMode, e as FarmClientHydrationSession, f as FarmClientLocation, g as FarmClientNavigationAction, h as FarmClientNavigationErrorEvent, i as FarmClientNavigationEvent, j as FarmClientNavigationLoadedEvent, k as FarmClientNavigationResolvedEvent, l as FarmClientNavigationSession, m as FarmClientPerformanceEvent, n as FarmClientPlugin, o as FarmClientPluginCloseEvent, p as FarmClientPluginEnforce, q as FarmClientPluginErrorEvent, r as FarmClientPluginErrorPhase, F as FarmClientPluginManager, s as FarmClientPluginManagerOptions, t as FarmClientPluginMetadata, u as FarmClientPluginRegistration, v as FarmClientPluginRouter, w as FarmClientPluginSetupEvent, x as FarmClientPluginStateEvent, c as createClientPluginManager } from './plugin-BJDf43dc.js';
|
|
2
|
-
export { V as FarmPlugin, ad as FarmPluginContext, ae as FarmRequestPluginContext, af as FarmRequestStore } from './client-plugins-
|
|
2
|
+
export { V as FarmPlugin, ad as FarmPluginContext, ae as FarmRequestPluginContext, af as FarmRequestStore } from './client-plugins-Cw4qUGsw.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'http';
|
|
5
5
|
import './types-D1A6-XvH.js';
|
|
@@ -18,4 +18,5 @@ import './env.js';
|
|
|
18
18
|
import './server-action-security.js';
|
|
19
19
|
import './image-config-Duob7wER.js';
|
|
20
20
|
import './types-BH1lhg5G.js';
|
|
21
|
+
import './cache.js';
|
|
21
22
|
import './route-runtime-DoOHzCAD.js';
|