@farm.js/core 0.1.0-beta.1 → 0.1.0-beta.3
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/README.md +1 -1
- package/dist/agent-runtime.d.mts +1 -1
- package/dist/agent-runtime.d.ts +1 -1
- package/dist/api/route-manager.cjs +97 -5
- 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 +8 -8
- package/dist/api/runtime.cjs +441 -5
- package/dist/api/runtime.cjs.map +1 -1
- package/dist/api/runtime.d.mts +2 -16
- package/dist/api/runtime.d.ts +2 -16
- package/dist/api/runtime.mjs +7 -1
- package/dist/api.cjs +579 -263
- package/dist/api.cjs.map +1 -1
- package/dist/api.d.mts +4 -147
- package/dist/api.d.ts +4 -147
- package/dist/api.mjs +30 -20
- package/dist/{app-BiX4qb-d.d.mts → app-BB3Iu3xh.d.mts} +2 -2
- package/dist/{app-CFRNJXP1.d.ts → app-DOKxo-LH.d.ts} +2 -2
- package/dist/app-markdown.cjs +1 -1
- package/dist/app-markdown.cjs.map +1 -1
- package/dist/app-markdown.d.mts +1 -1
- package/dist/app-markdown.d.ts +1 -1
- package/dist/app-markdown.mjs +1 -1
- package/dist/cache.cjs +19 -0
- package/dist/cache.cjs.map +1 -1
- package/dist/cache.d.mts +21 -1
- package/dist/cache.d.ts +21 -1
- package/dist/cache.mjs +5 -3
- package/dist/{chunk-QF4PHCMA.mjs → chunk-2ED5Q2GH.mjs} +3 -3
- package/dist/chunk-2ED5Q2GH.mjs.map +1 -0
- package/dist/{chunk-GZP5W4K3.mjs → chunk-32W4QEJP.mjs} +1 -1
- package/dist/chunk-32W4QEJP.mjs.map +1 -0
- package/dist/{chunk-AGS7UJ52.mjs → chunk-45LKHSHJ.mjs} +2 -2
- package/dist/{chunk-TU4YJICB.mjs → chunk-5FW6PQ3J.mjs} +1 -1
- package/dist/{chunk-TU4YJICB.mjs.map → chunk-5FW6PQ3J.mjs.map} +1 -1
- package/dist/{chunk-TRORP7E4.mjs → chunk-5QH4IKY3.mjs} +2 -2
- package/dist/{chunk-RKI6TN3A.mjs → chunk-6VS6CKAV.mjs} +2 -2
- package/dist/chunk-6VS6CKAV.mjs.map +1 -0
- package/dist/{chunk-25D7G34K.mjs → chunk-6WXJ54TC.mjs} +4 -4
- package/dist/{chunk-3QJO55ZF.mjs → chunk-BIOIOWXZ.mjs} +5 -3
- package/dist/{chunk-3QJO55ZF.mjs.map → chunk-BIOIOWXZ.mjs.map} +1 -1
- package/dist/{chunk-QFQRHRZS.mjs → chunk-C33RALN7.mjs} +75 -11
- package/dist/chunk-C33RALN7.mjs.map +1 -0
- package/dist/{chunk-B6N4ZB2H.mjs → chunk-CSU4KJJF.mjs} +3 -3
- package/dist/{chunk-JN3UU635.mjs → chunk-EJ7T4TPB.mjs} +2 -2
- package/dist/chunk-EJ7T4TPB.mjs.map +1 -0
- package/dist/{chunk-ZJQNATYV.mjs → chunk-FRPWCMMG.mjs} +3 -3
- package/dist/chunk-FRPWCMMG.mjs.map +1 -0
- package/dist/{chunk-PRNYWD7K.mjs → chunk-G5I34UA6.mjs} +67 -239
- package/dist/chunk-G5I34UA6.mjs.map +1 -0
- package/dist/{chunk-QM6VV26B.mjs → chunk-GQVGIUSN.mjs} +3 -3
- package/dist/{chunk-QM6VV26B.mjs.map → chunk-GQVGIUSN.mjs.map} +1 -1
- package/dist/{chunk-UREJA4GZ.mjs → chunk-GXASWWJU.mjs} +1 -1
- package/dist/{chunk-UREJA4GZ.mjs.map → chunk-GXASWWJU.mjs.map} +1 -1
- package/dist/{chunk-4PTK6KT4.mjs → chunk-GZWT6VI5.mjs} +22 -4
- package/dist/chunk-GZWT6VI5.mjs.map +1 -0
- package/dist/{chunk-JLWMCADZ.mjs → chunk-HZYXGV4K.mjs} +2 -2
- package/dist/chunk-JNYVN7YP.mjs +10 -0
- package/dist/chunk-JNYVN7YP.mjs.map +1 -0
- package/dist/{chunk-YHU7SS6L.mjs → chunk-LG3YINQN.mjs} +11 -11
- package/dist/chunk-LWMGIEJA.mjs +593 -0
- package/dist/chunk-LWMGIEJA.mjs.map +1 -0
- package/dist/{chunk-HXP3ZSPC.mjs → chunk-MH6FKW2I.mjs} +3 -3
- package/dist/{chunk-O3HADRW6.mjs → chunk-MIUW47JX.mjs} +2 -2
- package/dist/{chunk-O3HADRW6.mjs.map → chunk-MIUW47JX.mjs.map} +1 -1
- package/dist/{chunk-6XDUHOEM.mjs → chunk-NRRFGX45.mjs} +3 -3
- package/dist/{chunk-G3B5BRDY.mjs → chunk-OHC6VCDI.mjs} +24 -25
- package/dist/{chunk-G3B5BRDY.mjs.map → chunk-OHC6VCDI.mjs.map} +1 -1
- package/dist/{chunk-S2XHZS7W.mjs → chunk-QGQX7SFC.mjs} +2 -2
- package/dist/chunk-QGQX7SFC.mjs.map +1 -0
- package/dist/{chunk-TXCFGOHW.mjs → chunk-SHRJG6OG.mjs} +25 -1
- package/dist/chunk-SHRJG6OG.mjs.map +1 -0
- package/dist/{chunk-UHE2TTLK.mjs → chunk-T543TMFY.mjs} +8 -8
- package/dist/chunk-T543TMFY.mjs.map +1 -0
- package/dist/{chunk-SXZTEK3V.mjs → chunk-UXUAWNO5.mjs} +2 -2
- package/dist/{chunk-Y2OJJD7R.mjs → chunk-XIVV5IWN.mjs} +7 -9
- package/dist/chunk-XIVV5IWN.mjs.map +1 -0
- package/dist/{chunk-CHFHNEMO.mjs → chunk-XJSHJN4M.mjs} +41 -42
- package/dist/chunk-XJSHJN4M.mjs.map +1 -0
- package/dist/{chunk-Y7A27276.mjs → chunk-XUBZ7JI4.mjs} +178 -15
- package/dist/chunk-XUBZ7JI4.mjs.map +1 -0
- package/dist/{chunk-OYXO65LI.mjs → chunk-YW7OBE6Q.mjs} +4 -4
- package/dist/chunk-YW7OBE6Q.mjs.map +1 -0
- package/dist/{chunk-SOU3Q3ZA.mjs → chunk-ZZ57EH5Z.mjs} +1 -1
- package/dist/chunk-ZZ57EH5Z.mjs.map +1 -0
- package/dist/{client-D_yUjVhe.d.mts → client-DiViK9yK.d.mts} +33 -7
- package/dist/{client-Dkc03WP8.d.ts → client-DpEBJbts.d.ts} +33 -7
- package/dist/{client-plugins-BZnpeTGA.d.ts → client-plugins-CTnsZz_A.d.ts} +1 -0
- package/dist/{client-plugins-g4bzuCmo.d.mts → client-plugins-Cnr0D3kk.d.mts} +1 -0
- package/dist/client-plugins.d.mts +1 -1
- package/dist/client-plugins.d.ts +1 -1
- package/dist/client.cjs +302 -54
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.mts +54 -2
- package/dist/client.d.ts +54 -2
- package/dist/client.mjs +20 -16
- package/dist/config.d.mts +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/cron.cjs.map +1 -1
- package/dist/cron.mjs +1 -1
- package/dist/{devtools-AE4RVXCM.mjs → devtools-HE4FTUDN.mjs} +10 -10
- package/dist/{devtools-client-6WPY2AQU.mjs → devtools-client-3XRTBND5.mjs} +2 -11
- package/dist/devtools-client-3XRTBND5.mjs.map +1 -0
- package/dist/docs.cjs +3 -1
- package/dist/docs.cjs.map +1 -1
- package/dist/docs.mjs +10 -10
- package/dist/i18n/server.cjs +2 -2
- package/dist/i18n/server.cjs.map +1 -1
- package/dist/i18n/server.mjs +1 -1
- package/dist/index.cjs +791 -317
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +11 -11
- package/dist/index.d.ts +11 -11
- package/dist/index.mjs +125 -110
- package/dist/index.mjs.map +1 -1
- package/dist/integrations.d.mts +1 -1
- package/dist/integrations.d.ts +1 -1
- package/dist/internal/build-runtime.cjs +162 -60
- package/dist/internal/build-runtime.cjs.map +1 -1
- package/dist/internal/build-runtime.d.mts +3 -3
- package/dist/internal/build-runtime.d.ts +3 -3
- package/dist/internal/build-runtime.mjs +26 -25
- package/dist/internal/client-runtime.cjs.map +1 -1
- package/dist/internal/client-runtime.mjs +1 -1
- package/dist/internal/config-runtime.cjs +1 -1
- package/dist/internal/config-runtime.cjs.map +1 -1
- package/dist/internal/config-runtime.d.mts +2 -2
- package/dist/internal/config-runtime.d.ts +2 -2
- package/dist/internal/config-runtime.mjs +9 -9
- package/dist/internal/production-runtime.cjs +3 -3
- package/dist/internal/production-runtime.cjs.map +1 -1
- package/dist/internal/production-runtime.d.mts +3 -3
- package/dist/internal/production-runtime.d.ts +3 -3
- package/dist/internal/production-runtime.mjs +8 -8
- package/dist/{metadata-C9NZxMDW.d.mts → metadata-Dp8AdvsB.d.mts} +1 -1
- package/dist/{metadata-DAXRaOHx.d.ts → metadata-eoVmHoyv.d.ts} +1 -1
- package/dist/middleware.cjs +2 -2
- package/dist/middleware.cjs.map +1 -1
- package/dist/middleware.d.mts +3 -3
- package/dist/middleware.d.ts +3 -3
- package/dist/middleware.mjs +3 -3
- package/dist/navigation.cjs.map +1 -1
- package/dist/navigation.mjs +3 -3
- package/dist/{nitro-KME62MWG.mjs → nitro-QO5LV6QK.mjs} +11 -13
- package/dist/{nitro-KME62MWG.mjs.map → nitro-QO5LV6QK.mjs.map} +1 -1
- package/dist/plugin.cjs +119 -39
- package/dist/plugin.cjs.map +1 -1
- package/dist/plugin.d.mts +1 -1
- package/dist/plugin.d.ts +1 -1
- package/dist/plugin.mjs +22 -21
- package/dist/{production-runtime-DRkCHUvJ.d.ts → production-runtime-BqTnUTai.d.ts} +1 -1
- package/dist/{production-runtime-flrjp_nC.d.mts → production-runtime-DtDdG9fc.d.mts} +1 -1
- 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 +4 -4
- package/dist/runtime-C1B7pSGT.d.mts +207 -0
- package/dist/runtime-CdPHt0bv.d.ts +207 -0
- package/dist/server-action-security.cjs.map +1 -1
- package/dist/server-action-security.mjs +2 -2
- package/dist/server-fn-client.cjs.map +1 -1
- package/dist/server-fn-client.mjs +1 -1
- package/dist/server-fn.cjs.map +1 -1
- package/dist/server-fn.mjs +3 -3
- package/dist/server-plugins.d.mts +2 -2
- package/dist/server-plugins.d.ts +2 -2
- package/dist/server-query-client.cjs.map +1 -1
- package/dist/server-query-client.mjs +4 -4
- package/dist/server-query.cjs.map +1 -1
- package/dist/server-query.mjs +5 -5
- package/dist/server.cjs +148 -43
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.mts +6 -6
- package/dist/server.d.ts +6 -6
- package/dist/server.mjs +36 -31
- package/dist/server.mjs.map +1 -1
- package/dist/testing.cjs +95 -5
- package/dist/testing.cjs.map +1 -1
- package/dist/testing.d.mts +3 -3
- package/dist/testing.d.ts +3 -3
- package/dist/testing.mjs +18 -18
- package/dist/{utils-DOXXivjL.d.mts → utils-8USa5BiY.d.mts} +1 -1
- package/dist/{utils-DA1yo54_.d.ts → utils-DKJb6K6G.d.ts} +1 -1
- package/dist/version.cjs +36 -0
- package/dist/version.cjs.map +1 -0
- package/dist/version.d.mts +3 -0
- package/dist/version.d.ts +3 -0
- package/dist/version.mjs +8 -0
- package/dist/version.mjs.map +1 -0
- package/dist/vite.cjs +126 -40
- package/dist/vite.cjs.map +1 -1
- package/dist/vite.d.mts +1 -1
- package/dist/vite.d.ts +1 -1
- package/dist/vite.mjs +22 -21
- package/dist/workflows.cjs +6 -8
- package/dist/workflows.cjs.map +1 -1
- package/dist/workflows.mjs +1 -1
- package/package.json +12 -5
- package/types/client.d.ts +136 -13
- package/dist/chunk-4PTK6KT4.mjs.map +0 -1
- package/dist/chunk-CHFHNEMO.mjs.map +0 -1
- package/dist/chunk-EVGBEZDF.mjs +0 -215
- package/dist/chunk-EVGBEZDF.mjs.map +0 -1
- package/dist/chunk-GZP5W4K3.mjs.map +0 -1
- package/dist/chunk-JN3UU635.mjs.map +0 -1
- package/dist/chunk-OYXO65LI.mjs.map +0 -1
- package/dist/chunk-PRNYWD7K.mjs.map +0 -1
- package/dist/chunk-QF4PHCMA.mjs.map +0 -1
- package/dist/chunk-QFQRHRZS.mjs.map +0 -1
- package/dist/chunk-RKI6TN3A.mjs.map +0 -1
- package/dist/chunk-S2XHZS7W.mjs.map +0 -1
- package/dist/chunk-SOU3Q3ZA.mjs.map +0 -1
- package/dist/chunk-TXCFGOHW.mjs.map +0 -1
- package/dist/chunk-UHE2TTLK.mjs.map +0 -1
- package/dist/chunk-Y2OJJD7R.mjs.map +0 -1
- package/dist/chunk-Y7A27276.mjs.map +0 -1
- package/dist/chunk-ZJQNATYV.mjs.map +0 -1
- package/dist/devtools-client-6WPY2AQU.mjs.map +0 -1
- /package/dist/{chunk-AGS7UJ52.mjs.map → chunk-45LKHSHJ.mjs.map} +0 -0
- /package/dist/{chunk-TRORP7E4.mjs.map → chunk-5QH4IKY3.mjs.map} +0 -0
- /package/dist/{chunk-25D7G34K.mjs.map → chunk-6WXJ54TC.mjs.map} +0 -0
- /package/dist/{chunk-B6N4ZB2H.mjs.map → chunk-CSU4KJJF.mjs.map} +0 -0
- /package/dist/{chunk-JLWMCADZ.mjs.map → chunk-HZYXGV4K.mjs.map} +0 -0
- /package/dist/{chunk-YHU7SS6L.mjs.map → chunk-LG3YINQN.mjs.map} +0 -0
- /package/dist/{chunk-HXP3ZSPC.mjs.map → chunk-MH6FKW2I.mjs.map} +0 -0
- /package/dist/{chunk-6XDUHOEM.mjs.map → chunk-NRRFGX45.mjs.map} +0 -0
- /package/dist/{chunk-SXZTEK3V.mjs.map → chunk-UXUAWNO5.mjs.map} +0 -0
- /package/dist/{devtools-AE4RVXCM.mjs.map → devtools-HE4FTUDN.mjs.map} +0 -0
|
@@ -1,5 +1,6 @@
|
|
|
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
|
+
import { DefinedCacheKey, RouteDataCacheKey, InferCacheKeyData } from './cache.js';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Small per-call integration metadata. When sent from a browser, values are
|
|
@@ -165,6 +166,7 @@ declare function integrationClients<TSources extends Record<string, any>>(source
|
|
|
165
166
|
integrations: TSources;
|
|
166
167
|
}, clientOptions?: IntegrationClientOptions, serverOptions?: Omit<IntegrationServerClientOptions, "isServer">): IntegrationClients<TSources>;
|
|
167
168
|
|
|
169
|
+
declare const FARM_API_ROUTE_REF_SYMBOL: unique symbol;
|
|
168
170
|
type APIClientOptions = {
|
|
169
171
|
baseURL?: string;
|
|
170
172
|
headers?: Record<string, string>;
|
|
@@ -201,6 +203,18 @@ type APIResult<TData = unknown, TError = Error> = {
|
|
|
201
203
|
error: TError | null;
|
|
202
204
|
key: CacheKey<TData>;
|
|
203
205
|
};
|
|
206
|
+
declare class APIClientError<TCode extends string = string, TData = unknown, TStatus extends number = number> extends Error {
|
|
207
|
+
readonly code: TCode;
|
|
208
|
+
readonly data: TData;
|
|
209
|
+
readonly status: TStatus;
|
|
210
|
+
readonly response?: Response;
|
|
211
|
+
constructor(code: TCode, data: TData, options: {
|
|
212
|
+
status: TStatus;
|
|
213
|
+
message: string;
|
|
214
|
+
response?: Response;
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
type APIClientSystemError = APIClientError<"http_error", unknown, number> | APIClientError<"network_error", unknown, 0>;
|
|
204
218
|
type RequestEvent = {
|
|
205
219
|
requestId: string;
|
|
206
220
|
method: StatusEvent["method"];
|
|
@@ -236,7 +250,7 @@ type RetryOptions = {
|
|
|
236
250
|
count?: number;
|
|
237
251
|
delay?: number | ((attempt: number) => number);
|
|
238
252
|
};
|
|
239
|
-
type InvalidateTarget =
|
|
253
|
+
type InvalidateTarget = FarmClientCacheKey | {
|
|
240
254
|
key: FarmClientCacheKey;
|
|
241
255
|
} | {
|
|
242
256
|
path: string;
|
|
@@ -247,7 +261,7 @@ type InvalidateOptions = InvalidateTarget[] | {
|
|
|
247
261
|
targets: InvalidateTarget[];
|
|
248
262
|
refetch?: boolean;
|
|
249
263
|
};
|
|
250
|
-
type OptimisticUpdate = [CallableRouteRef<any>, unknown, (prev: any) => any] | [CacheKey<any> | string, (prev: any) => any];
|
|
264
|
+
type OptimisticUpdate = [CallableRouteRef<any>, unknown, (prev: any) => any] | [CacheKey<any> | DefinedCacheKey<any> | string, (prev: any) => any];
|
|
251
265
|
type OptimisticOptions<TUpdates extends readonly unknown[] = readonly OptimisticUpdate[]> = {
|
|
252
266
|
update: TUpdates & NormalizeOptimisticUpdates<TUpdates>;
|
|
253
267
|
rollbackOnError?: boolean;
|
|
@@ -285,7 +299,7 @@ type NormalizeOptimisticUpdate<TUpdate> = TUpdate extends readonly [
|
|
|
285
299
|
TRoute,
|
|
286
300
|
InferRouteInput<TRoute> | undefined,
|
|
287
301
|
(prev: InferRouteData<TRoute> | undefined) => InferRouteData<TRoute>
|
|
288
|
-
] : never : TUpdate extends readonly [infer TKey, (prev: any) => any] ? TKey extends CacheKey<infer TData> ? [TKey, (prev: TData | undefined) => TData] : TKey extends string ? [TKey, (prev: unknown) => unknown] : never : never;
|
|
302
|
+
] : never : TUpdate extends readonly [infer TKey, (prev: any) => any] ? TKey extends DefinedCacheKey<any, RouteDataCacheKey> ? [TKey, (prev: InferCacheKeyData<TKey> | undefined) => InferCacheKeyData<TKey>] : TKey extends CacheKey<infer TData> ? [TKey, (prev: TData | undefined) => TData] : TKey extends string ? [TKey, (prev: unknown) => unknown] : never : never;
|
|
289
303
|
type NormalizeOptimisticUpdates<TUpdates extends readonly unknown[]> = {
|
|
290
304
|
[K in keyof TUpdates]: NormalizeOptimisticUpdate<TUpdates[K]>;
|
|
291
305
|
};
|
|
@@ -294,6 +308,7 @@ type TypedEndpointLike = {
|
|
|
294
308
|
body: any;
|
|
295
309
|
query: any;
|
|
296
310
|
response: any;
|
|
311
|
+
errors?: any;
|
|
297
312
|
};
|
|
298
313
|
};
|
|
299
314
|
type Simplify<T> = {
|
|
@@ -332,13 +347,23 @@ type InferEndpointOutput<T> = T extends {
|
|
|
332
347
|
response: infer R;
|
|
333
348
|
};
|
|
334
349
|
} ? R : any;
|
|
350
|
+
type InferEndpointError<T> = T extends {
|
|
351
|
+
__types: {
|
|
352
|
+
errors: infer TErrors;
|
|
353
|
+
};
|
|
354
|
+
} ? keyof TErrors extends never ? Error : {
|
|
355
|
+
[TCode in keyof TErrors]: TErrors[TCode] extends {
|
|
356
|
+
data: infer TData;
|
|
357
|
+
status: infer TStatus extends number;
|
|
358
|
+
} ? APIClientError<TCode & string, TData, TStatus> : never;
|
|
359
|
+
}[keyof TErrors] | APIClientSystemError : Error;
|
|
335
360
|
type EndpointMethod<T = any> = (<TUpdates extends readonly unknown[] = readonly OptimisticUpdate[]>(...args: HasRequiredKeys<InferEndpointInput<T>> extends true ? [
|
|
336
361
|
options: InferEndpointInput<T>,
|
|
337
|
-
clientOptions?: ClientOptions<InferEndpointOutput<T>,
|
|
362
|
+
clientOptions?: ClientOptions<InferEndpointOutput<T>, InferEndpointError<T>, TUpdates>
|
|
338
363
|
] : [
|
|
339
364
|
options?: InferEndpointInput<T>,
|
|
340
|
-
clientOptions?: ClientOptions<InferEndpointOutput<T>,
|
|
341
|
-
]) => Promise<APIResult<InferEndpointOutput<T>,
|
|
365
|
+
clientOptions?: ClientOptions<InferEndpointOutput<T>, InferEndpointError<T>, TUpdates>
|
|
366
|
+
]) => Promise<APIResult<InferEndpointOutput<T>, InferEndpointError<T>>>) & RouteRef<InferEndpointOutput<T>, InferEndpointInput<T>>;
|
|
342
367
|
type RouterToClient<T> = {
|
|
343
368
|
[K in keyof T]: T[K] extends TypedEndpointLike ? EndpointMethod<T[K]> : T[K] extends Record<string, any> ? RouterToClient<T[K]> : EndpointMethod<T[K]>;
|
|
344
369
|
};
|
|
@@ -380,6 +405,7 @@ type ServerAPIClient<TEndpoints extends Record<string, any>, TIntegrations exten
|
|
|
380
405
|
*/
|
|
381
406
|
declare function createAPIClient<TRouter extends Record<string, any>>(options: APIClientWithoutIntegrationsOptions): RouteAPIClient<TRouter>;
|
|
382
407
|
declare function createAPIClient<TRouter extends Record<string, any>, TIntegrations extends Record<string, any> = {}>(options?: APIClientOptions): APIClient<TRouter, TIntegrations>;
|
|
408
|
+
declare function isAPIRouteRef(value: unknown): value is CallableRouteRef;
|
|
383
409
|
/**
|
|
384
410
|
* Server-side API client that calls endpoints directly as functions
|
|
385
411
|
* No HTTP overhead for app endpoints, and registered integration routes can be exposed at
|
|
@@ -399,4 +425,4 @@ declare function createServerAPIClient<TEndpoints extends Record<string, any>>(e
|
|
|
399
425
|
declare function createServerAPIClient<TEndpoints extends Record<string, any>>(endpoints: TEndpoints, options: ServerAPIClientWithoutIntegrationsOptions): TEndpoints;
|
|
400
426
|
declare function createServerAPIClient<TEndpoints extends Record<string, any>, TIntegrations extends Record<string, any> = {}>(endpoints: TEndpoints, options?: ServerAPIClientOptions): ServerAPIClient<TEndpoints, TIntegrations>;
|
|
401
427
|
|
|
402
|
-
export { type APIClientOptions as A,
|
|
428
|
+
export { type IntegrationServerClientRoot as $, type APIClientOptions as A, getIntegrationAPIManifest as B, type CacheKey as C, integrationClients as D, integrationsClient as E, FARM_API_ROUTE_REF_SYMBOL as F, integrationsServer as G, type IntegrationClient as H, type InvalidateTarget as I, type IntegrationClientAliases as J, type IntegrationClientRoot as K, type IntegrationClientOptions as L, type IntegrationClientRequestOptions as M, type IntegrationAPI as N, type OptimisticUpdate as O, type IntegrationClients as P, type IntegrationClientData as Q, type RequestEvent as R, type ServerAPIClientOptions as S, type IntegrationOperationResult as T, type InferIntegrationOperationBody as U, type InferIntegrationOperationQuery as V, type InferIntegrationOperationResponse as W, type IntegrationServerClient as X, type IntegrationServerClientAliases as Y, type IntegrationServerClientOptions as Z, type IntegrationServerClientRequestOptions as _, type APIClientWithoutIntegrationsOptions as a, type IntegrationServerRequestLike as a0, type ServerAPIClientWithoutIntegrationsOptions as b, type StatusPhase as c, type StatusEvent as d, type APIResult as e, APIClientError as f, type APIClientSystemError as g, type ResponseEvent as h, type CachePolicy as i, type CacheOptions as j, type RetryOptions as k, type InvalidateOptions as l, type OptimisticOptions as m, type ClientOptions as n, type RouteAPIClient as o, type APIClient as p, type ServerAPIClient as q, createAPIClient as r, isAPIRouteRef as s, createServerAPIClient as t, createIntegrationClient as u, IntegrationClientError as v, createIntegrationApi as w, createIntegrationClients as x, createIntegrations as y, createIntegrationServerClient as z };
|
|
@@ -548,6 +548,7 @@ interface ResolvedFarmConfig extends Required<Omit<FarmUserConfig, "extends" | "
|
|
|
548
548
|
devtools: ResolvedFarmDevtoolsConfig;
|
|
549
549
|
images: ResolvedFarmImageConfig;
|
|
550
550
|
i18n: ResolvedFarmI18nConfig;
|
|
551
|
+
routeRules: FarmRouteRules;
|
|
551
552
|
}
|
|
552
553
|
type FarmLayerConfig = Omit<FarmUserConfig, "root" | "outDir" | "distDir" | "deploy" | "output" | "preset" | "publicDir" | "generateBuildId" | "deploymentId">;
|
|
553
554
|
|
|
@@ -548,6 +548,7 @@ interface ResolvedFarmConfig extends Required<Omit<FarmUserConfig, "extends" | "
|
|
|
548
548
|
devtools: ResolvedFarmDevtoolsConfig;
|
|
549
549
|
images: ResolvedFarmImageConfig;
|
|
550
550
|
i18n: ResolvedFarmI18nConfig;
|
|
551
|
+
routeRules: FarmRouteRules;
|
|
551
552
|
}
|
|
552
553
|
type FarmLayerConfig = Omit<FarmUserConfig, "root" | "outDir" | "distDir" | "deploy" | "output" | "preset" | "publicDir" | "generateBuildId" | "deploymentId">;
|
|
553
554
|
|
|
@@ -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-Cnr0D3kk.mjs';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'http';
|
|
5
5
|
import './types-D1A6-XvH.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-CTnsZz_A.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'http';
|
|
5
5
|
import './types-D1A6-XvH.js';
|