@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/storage.d.mts
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { Driver, Storage } from 'unstorage';
|
|
2
|
-
export { BuiltinDriverName, BuiltinDriverOptions, Driver, Storage, StorageMeta, StorageValue, TransactionOptions } from 'unstorage';
|
|
3
|
-
import { Database } from 'db0';
|
|
4
|
-
export { ConnectorName, ConnectorOptions, Database } from 'db0';
|
|
5
|
-
import { a as FarmStorageClient, b as FarmStorageClientConfig, g as FarmStorageLocalDriverConfig, e as FarmStorageDatabaseConfig, k as FarmStorageUserConfig } from './types-D1A6-XvH.mjs';
|
|
6
|
-
export { F as FarmStorageBuiltinDriverConfig, c as FarmStorageConfigObject, d as FarmStorageCustomDriverConfig, f as FarmStorageDatabaseDriverName, i as FarmStorageMountConfig, j as FarmStorageMounts, h as FarmStorageRuntimeClient } from './types-D1A6-XvH.mjs';
|
|
7
|
-
|
|
8
|
-
type DriverResolver = () => Driver | Promise<Driver>;
|
|
9
|
-
declare function defineStorageClient(resolveDriver: DriverResolver): FarmStorageClient;
|
|
10
|
-
declare function createStorageClient(config: FarmStorageClientConfig): FarmStorageClient;
|
|
11
|
-
declare function driverStorage(driver: Driver | (() => Driver | Promise<Driver>)): FarmStorageClient;
|
|
12
|
-
declare function databaseStorage(database: Database, options?: {
|
|
13
|
-
tableName?: string;
|
|
14
|
-
}): FarmStorageClient;
|
|
15
|
-
declare function memoryStorage(): FarmStorageClient;
|
|
16
|
-
declare function localStorage(options?: Omit<FarmStorageLocalDriverConfig, "driver">): FarmStorageClient;
|
|
17
|
-
declare function sqliteStorage(options: Omit<FarmStorageDatabaseConfig, "driver">): FarmStorageClient;
|
|
18
|
-
declare function mysqlStorage(options: Omit<FarmStorageDatabaseConfig, "driver">): FarmStorageClient;
|
|
19
|
-
declare function mysql2Storage(options: Omit<FarmStorageDatabaseConfig, "driver">): FarmStorageClient;
|
|
20
|
-
declare function postgresStorage(options: Omit<FarmStorageDatabaseConfig, "driver">): FarmStorageClient;
|
|
21
|
-
declare function pgStorage(options: Omit<FarmStorageDatabaseConfig, "driver">): FarmStorageClient;
|
|
22
|
-
declare function pgliteStorage(options: Omit<FarmStorageDatabaseConfig, "driver">): FarmStorageClient;
|
|
23
|
-
declare function planetscaleStorage(options: Omit<FarmStorageDatabaseConfig, "driver">): FarmStorageClient;
|
|
24
|
-
declare function libsqlStorage(options: Omit<FarmStorageDatabaseConfig, "driver">): FarmStorageClient;
|
|
25
|
-
declare function redisStorage(options: Omit<Extract<FarmStorageClientConfig, {
|
|
26
|
-
driver: "redis";
|
|
27
|
-
}>, "driver">): FarmStorageClient;
|
|
28
|
-
declare function s3Storage(options: Omit<Extract<FarmStorageClientConfig, {
|
|
29
|
-
driver: "s3";
|
|
30
|
-
}>, "driver">): FarmStorageClient;
|
|
31
|
-
declare function mongodbStorage(options: Omit<Extract<FarmStorageClientConfig, {
|
|
32
|
-
driver: "mongodb";
|
|
33
|
-
}>, "driver">): FarmStorageClient;
|
|
34
|
-
declare function upstashStorage(options: Omit<Extract<FarmStorageClientConfig, {
|
|
35
|
-
driver: "upstash";
|
|
36
|
-
}>, "driver">): FarmStorageClient;
|
|
37
|
-
declare function netlifyBlobsStorage(options: Omit<Extract<FarmStorageClientConfig, {
|
|
38
|
-
driver: "netlify-blobs";
|
|
39
|
-
}>, "driver">): FarmStorageClient;
|
|
40
|
-
declare function vercelKVStorage(options: Omit<Extract<FarmStorageClientConfig, {
|
|
41
|
-
driver: "vercel-kv";
|
|
42
|
-
}>, "driver">): FarmStorageClient;
|
|
43
|
-
declare function vercelBlobStorage(options: Omit<Extract<FarmStorageClientConfig, {
|
|
44
|
-
driver: "vercel-blob";
|
|
45
|
-
}>, "driver">): FarmStorageClient;
|
|
46
|
-
declare function createFarmStorage(config?: FarmStorageUserConfig): Promise<Storage>;
|
|
47
|
-
declare function resolveStorageRuntimeClient(config: FarmStorageUserConfig | undefined): Promise<unknown | undefined>;
|
|
48
|
-
declare function initStorage(config?: FarmStorageUserConfig): Promise<Storage>;
|
|
49
|
-
declare function getStorage(namespace?: string): Storage;
|
|
50
|
-
declare function disposeStorage(): Promise<void>;
|
|
51
|
-
|
|
52
|
-
export { FarmStorageClient, FarmStorageClientConfig, FarmStorageDatabaseConfig, FarmStorageLocalDriverConfig, FarmStorageUserConfig, createFarmStorage, createStorageClient, databaseStorage, defineStorageClient, disposeStorage, driverStorage, getStorage, initStorage, libsqlStorage, localStorage, memoryStorage, mongodbStorage, mysql2Storage, mysqlStorage, netlifyBlobsStorage, pgStorage, pgliteStorage, planetscaleStorage, postgresStorage, redisStorage, resolveStorageRuntimeClient, s3Storage, sqliteStorage, upstashStorage, vercelBlobStorage, vercelKVStorage };
|
package/dist/storage.d.ts
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { Driver, Storage } from 'unstorage';
|
|
2
|
-
export { BuiltinDriverName, BuiltinDriverOptions, Driver, Storage, StorageMeta, StorageValue, TransactionOptions } from 'unstorage';
|
|
3
|
-
import { Database } from 'db0';
|
|
4
|
-
export { ConnectorName, ConnectorOptions, Database } from 'db0';
|
|
5
|
-
import { a as FarmStorageClient, b as FarmStorageClientConfig, g as FarmStorageLocalDriverConfig, e as FarmStorageDatabaseConfig, k as FarmStorageUserConfig } from './types-D1A6-XvH.js';
|
|
6
|
-
export { F as FarmStorageBuiltinDriverConfig, c as FarmStorageConfigObject, d as FarmStorageCustomDriverConfig, f as FarmStorageDatabaseDriverName, i as FarmStorageMountConfig, j as FarmStorageMounts, h as FarmStorageRuntimeClient } from './types-D1A6-XvH.js';
|
|
7
|
-
|
|
8
|
-
type DriverResolver = () => Driver | Promise<Driver>;
|
|
9
|
-
declare function defineStorageClient(resolveDriver: DriverResolver): FarmStorageClient;
|
|
10
|
-
declare function createStorageClient(config: FarmStorageClientConfig): FarmStorageClient;
|
|
11
|
-
declare function driverStorage(driver: Driver | (() => Driver | Promise<Driver>)): FarmStorageClient;
|
|
12
|
-
declare function databaseStorage(database: Database, options?: {
|
|
13
|
-
tableName?: string;
|
|
14
|
-
}): FarmStorageClient;
|
|
15
|
-
declare function memoryStorage(): FarmStorageClient;
|
|
16
|
-
declare function localStorage(options?: Omit<FarmStorageLocalDriverConfig, "driver">): FarmStorageClient;
|
|
17
|
-
declare function sqliteStorage(options: Omit<FarmStorageDatabaseConfig, "driver">): FarmStorageClient;
|
|
18
|
-
declare function mysqlStorage(options: Omit<FarmStorageDatabaseConfig, "driver">): FarmStorageClient;
|
|
19
|
-
declare function mysql2Storage(options: Omit<FarmStorageDatabaseConfig, "driver">): FarmStorageClient;
|
|
20
|
-
declare function postgresStorage(options: Omit<FarmStorageDatabaseConfig, "driver">): FarmStorageClient;
|
|
21
|
-
declare function pgStorage(options: Omit<FarmStorageDatabaseConfig, "driver">): FarmStorageClient;
|
|
22
|
-
declare function pgliteStorage(options: Omit<FarmStorageDatabaseConfig, "driver">): FarmStorageClient;
|
|
23
|
-
declare function planetscaleStorage(options: Omit<FarmStorageDatabaseConfig, "driver">): FarmStorageClient;
|
|
24
|
-
declare function libsqlStorage(options: Omit<FarmStorageDatabaseConfig, "driver">): FarmStorageClient;
|
|
25
|
-
declare function redisStorage(options: Omit<Extract<FarmStorageClientConfig, {
|
|
26
|
-
driver: "redis";
|
|
27
|
-
}>, "driver">): FarmStorageClient;
|
|
28
|
-
declare function s3Storage(options: Omit<Extract<FarmStorageClientConfig, {
|
|
29
|
-
driver: "s3";
|
|
30
|
-
}>, "driver">): FarmStorageClient;
|
|
31
|
-
declare function mongodbStorage(options: Omit<Extract<FarmStorageClientConfig, {
|
|
32
|
-
driver: "mongodb";
|
|
33
|
-
}>, "driver">): FarmStorageClient;
|
|
34
|
-
declare function upstashStorage(options: Omit<Extract<FarmStorageClientConfig, {
|
|
35
|
-
driver: "upstash";
|
|
36
|
-
}>, "driver">): FarmStorageClient;
|
|
37
|
-
declare function netlifyBlobsStorage(options: Omit<Extract<FarmStorageClientConfig, {
|
|
38
|
-
driver: "netlify-blobs";
|
|
39
|
-
}>, "driver">): FarmStorageClient;
|
|
40
|
-
declare function vercelKVStorage(options: Omit<Extract<FarmStorageClientConfig, {
|
|
41
|
-
driver: "vercel-kv";
|
|
42
|
-
}>, "driver">): FarmStorageClient;
|
|
43
|
-
declare function vercelBlobStorage(options: Omit<Extract<FarmStorageClientConfig, {
|
|
44
|
-
driver: "vercel-blob";
|
|
45
|
-
}>, "driver">): FarmStorageClient;
|
|
46
|
-
declare function createFarmStorage(config?: FarmStorageUserConfig): Promise<Storage>;
|
|
47
|
-
declare function resolveStorageRuntimeClient(config: FarmStorageUserConfig | undefined): Promise<unknown | undefined>;
|
|
48
|
-
declare function initStorage(config?: FarmStorageUserConfig): Promise<Storage>;
|
|
49
|
-
declare function getStorage(namespace?: string): Storage;
|
|
50
|
-
declare function disposeStorage(): Promise<void>;
|
|
51
|
-
|
|
52
|
-
export { FarmStorageClient, FarmStorageClientConfig, FarmStorageDatabaseConfig, FarmStorageLocalDriverConfig, FarmStorageUserConfig, createFarmStorage, createStorageClient, databaseStorage, defineStorageClient, disposeStorage, driverStorage, getStorage, initStorage, libsqlStorage, localStorage, memoryStorage, mongodbStorage, mysql2Storage, mysqlStorage, netlifyBlobsStorage, pgStorage, pgliteStorage, planetscaleStorage, postgresStorage, redisStorage, resolveStorageRuntimeClient, s3Storage, sqliteStorage, upstashStorage, vercelBlobStorage, vercelKVStorage };
|
package/dist/testing.d.mts
DELETED
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import { ReactElement } from 'react';
|
|
2
|
-
import './types-BMxWr97v.mjs';
|
|
3
|
-
import { b as APIRouteParams } from './runtime-9nQjVM7X.mjs';
|
|
4
|
-
import { ProgrammaticPageRoute, InferProgrammaticRouteData, ProgrammaticRouteComponentProps, ProgrammaticApiRoute } from './routes.mjs';
|
|
5
|
-
import { FarmRouterQueryValue, FarmRouterPathParams } from './router.mjs';
|
|
6
|
-
import { ServerFn } from './server-fn.mjs';
|
|
7
|
-
import { g as FarmContextFactory, M as MiddlewareProps, P as PluginContextProps, p as RouteModule } from './client-plugins-jsk-ZLzJ.mjs';
|
|
8
|
-
import './cache.mjs';
|
|
9
|
-
import './transport-BmbGTXA5.mjs';
|
|
10
|
-
import './route-runtime-DoOHzCAD.mjs';
|
|
11
|
-
import './plugin-BJDf43dc.mjs';
|
|
12
|
-
import 'http';
|
|
13
|
-
import './types-D1A6-XvH.mjs';
|
|
14
|
-
import 'db0';
|
|
15
|
-
import 'unstorage';
|
|
16
|
-
import './integration-api-CHT2OKAf.mjs';
|
|
17
|
-
import '@farming-labs/orm';
|
|
18
|
-
import './types-C9N-nk5R.mjs';
|
|
19
|
-
import '@farming-labs/docs';
|
|
20
|
-
import './markdown.mjs';
|
|
21
|
-
import './observability.mjs';
|
|
22
|
-
import 'vite';
|
|
23
|
-
import './workflows.mjs';
|
|
24
|
-
import './cron.mjs';
|
|
25
|
-
import './env.mjs';
|
|
26
|
-
import './server-action-security.mjs';
|
|
27
|
-
import './image-config-Duob7wER.mjs';
|
|
28
|
-
|
|
29
|
-
type FarmTestQuery = URLSearchParams | Record<string, FarmRouterQueryValue>;
|
|
30
|
-
type FarmTestPathParams = FarmRouterPathParams;
|
|
31
|
-
type FarmTestFormValues = Record<string, FormDataEntryValue | readonly FormDataEntryValue[]>;
|
|
32
|
-
interface FarmTestRequestOptions extends Omit<RequestInit, "body" | "headers"> {
|
|
33
|
-
origin?: string;
|
|
34
|
-
headers?: HeadersInit;
|
|
35
|
-
query?: FarmTestQuery;
|
|
36
|
-
cookies?: Record<string, string>;
|
|
37
|
-
json?: unknown;
|
|
38
|
-
form?: FormData | FarmTestFormValues;
|
|
39
|
-
body?: BodyInit | null;
|
|
40
|
-
}
|
|
41
|
-
interface FarmTestHarnessOptions<TContext = unknown> {
|
|
42
|
-
origin?: string;
|
|
43
|
-
headers?: HeadersInit;
|
|
44
|
-
cookies?: Record<string, string>;
|
|
45
|
-
context?: FarmContextFactory<TContext>;
|
|
46
|
-
}
|
|
47
|
-
type AnyProgrammaticPageRoute = ProgrammaticPageRoute<any, any, any, any>;
|
|
48
|
-
type InferFarmTestRouteParams<TRoute> = TRoute extends ProgrammaticPageRoute<infer TParams, any, any, any> ? TParams : never;
|
|
49
|
-
type InferFarmTestRouteSearch<TRoute> = TRoute extends ProgrammaticPageRoute<any, infer TSearch, any, any> ? TSearch : never;
|
|
50
|
-
type InferFarmTestRouteData<TRoute> = TRoute extends ProgrammaticPageRoute<any, any, infer TDataHooks, any> ? InferProgrammaticRouteData<TDataHooks> : never;
|
|
51
|
-
type FarmTestRouteProps<TRoute extends AnyProgrammaticPageRoute> = ProgrammaticRouteComponentProps<InferFarmTestRouteParams<TRoute>, InferFarmTestRouteSearch<TRoute>, InferFarmTestRouteData<TRoute>>;
|
|
52
|
-
type FarmTestRouteParamsInput<TRoute> = InferFarmTestRouteParams<TRoute> extends Record<string, unknown> ? Partial<InferFarmTestRouteParams<TRoute>> : FarmTestPathParams;
|
|
53
|
-
type FarmTestRouteSearchInput<TRoute> = InferFarmTestRouteSearch<TRoute> extends Record<string, unknown> ? Partial<InferFarmTestRouteSearch<TRoute>> | URLSearchParams : FarmTestQuery;
|
|
54
|
-
interface FarmTestRouteOptions<TRoute extends AnyProgrammaticPageRoute, TContext = unknown> extends Pick<FarmTestRequestOptions, "origin" | "headers" | "cookies" | "signal"> {
|
|
55
|
-
path?: string | URL;
|
|
56
|
-
params?: FarmTestRouteParamsInput<TRoute>;
|
|
57
|
-
search?: FarmTestRouteSearchInput<TRoute>;
|
|
58
|
-
context?: TContext;
|
|
59
|
-
middleware?: MiddlewareProps;
|
|
60
|
-
pluginContext?: PluginContextProps;
|
|
61
|
-
}
|
|
62
|
-
interface FarmTestRouteResult<TRoute extends AnyProgrammaticPageRoute> {
|
|
63
|
-
route: TRoute;
|
|
64
|
-
module: RouteModule;
|
|
65
|
-
request: Request;
|
|
66
|
-
props: FarmTestRouteProps<TRoute>;
|
|
67
|
-
element: ReactElement;
|
|
68
|
-
canonicalPath?: string;
|
|
69
|
-
}
|
|
70
|
-
interface FarmTestApiOptions extends FarmTestRequestOptions {
|
|
71
|
-
path?: string | URL;
|
|
72
|
-
params?: FarmTestPathParams;
|
|
73
|
-
throwOnError?: boolean;
|
|
74
|
-
}
|
|
75
|
-
interface FarmTestEndpointOptions extends FarmTestRequestOptions {
|
|
76
|
-
path?: string | URL;
|
|
77
|
-
params?: APIRouteParams;
|
|
78
|
-
throwOnError?: boolean;
|
|
79
|
-
}
|
|
80
|
-
interface FarmTestServerFnOptions extends Pick<FarmTestRequestOptions, "origin" | "headers" | "cookies" | "signal"> {
|
|
81
|
-
path?: string | URL;
|
|
82
|
-
request?: Request;
|
|
83
|
-
}
|
|
84
|
-
type FarmTestServerFnArguments<TInput> = [unknown] extends [TInput] ? [input?: TInput | FormData, options?: FarmTestServerFnOptions] : [input: TInput | FormData, options?: FarmTestServerFnOptions];
|
|
85
|
-
interface FarmTestHarness<TContext = unknown> {
|
|
86
|
-
request(path?: string | URL, options?: FarmTestRequestOptions): Request;
|
|
87
|
-
route<TRoute extends AnyProgrammaticPageRoute>(route: TRoute, options?: FarmTestRouteOptions<TRoute, TContext>): Promise<FarmTestRouteResult<TRoute>>;
|
|
88
|
-
api(route: ProgrammaticApiRoute, options?: FarmTestApiOptions): Promise<Response>;
|
|
89
|
-
endpoint(endpoint: unknown, options?: FarmTestEndpointOptions): Promise<Response>;
|
|
90
|
-
serverFn<TInput, TResult>(serverFn: ServerFn<TInput, TResult>, ...args: FarmTestServerFnArguments<TInput>): Promise<TResult>;
|
|
91
|
-
clearCache(): void;
|
|
92
|
-
}
|
|
93
|
-
/** Create a deterministic Web Request without depending on a test runner. */
|
|
94
|
-
declare function createTestRequest(path?: string | URL, options?: FarmTestRequestOptions): Request;
|
|
95
|
-
/**
|
|
96
|
-
* Create test helpers that exercise Farm's real route, API, and server-function runtimes.
|
|
97
|
-
* The harness has no dependency on Vitest, Jest, or a DOM environment.
|
|
98
|
-
*/
|
|
99
|
-
declare function createFarmTestHarness<TContext = unknown>(options?: FarmTestHarnessOptions<TContext>): FarmTestHarness<TContext>;
|
|
100
|
-
|
|
101
|
-
export { type FarmTestApiOptions, type FarmTestEndpointOptions, type FarmTestFormValues, type FarmTestHarness, type FarmTestHarnessOptions, type FarmTestPathParams, type FarmTestQuery, type FarmTestRequestOptions, type FarmTestRouteOptions, type FarmTestRouteProps, type FarmTestRouteResult, type FarmTestServerFnArguments, type FarmTestServerFnOptions, type InferFarmTestRouteData, type InferFarmTestRouteParams, type InferFarmTestRouteSearch, createFarmTestHarness, createTestRequest };
|
package/dist/testing.d.ts
DELETED
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import { ReactElement } from 'react';
|
|
2
|
-
import './types-BMxWr97v.js';
|
|
3
|
-
import { b as APIRouteParams } from './runtime-DgeS2skB.js';
|
|
4
|
-
import { ProgrammaticPageRoute, InferProgrammaticRouteData, ProgrammaticRouteComponentProps, ProgrammaticApiRoute } from './routes.js';
|
|
5
|
-
import { FarmRouterQueryValue, FarmRouterPathParams } from './router.js';
|
|
6
|
-
import { ServerFn } from './server-fn.js';
|
|
7
|
-
import { g as FarmContextFactory, M as MiddlewareProps, P as PluginContextProps, p as RouteModule } from './client-plugins-Bc5jHcNr.js';
|
|
8
|
-
import './cache.js';
|
|
9
|
-
import './transport-BmbGTXA5.js';
|
|
10
|
-
import './route-runtime-DoOHzCAD.js';
|
|
11
|
-
import './plugin-BJDf43dc.js';
|
|
12
|
-
import 'http';
|
|
13
|
-
import './types-D1A6-XvH.js';
|
|
14
|
-
import 'db0';
|
|
15
|
-
import 'unstorage';
|
|
16
|
-
import './integration-api-CHT2OKAf.js';
|
|
17
|
-
import '@farming-labs/orm';
|
|
18
|
-
import './types-C9N-nk5R.js';
|
|
19
|
-
import '@farming-labs/docs';
|
|
20
|
-
import './markdown.js';
|
|
21
|
-
import './observability.js';
|
|
22
|
-
import 'vite';
|
|
23
|
-
import './workflows.js';
|
|
24
|
-
import './cron.js';
|
|
25
|
-
import './env.js';
|
|
26
|
-
import './server-action-security.js';
|
|
27
|
-
import './image-config-Duob7wER.js';
|
|
28
|
-
|
|
29
|
-
type FarmTestQuery = URLSearchParams | Record<string, FarmRouterQueryValue>;
|
|
30
|
-
type FarmTestPathParams = FarmRouterPathParams;
|
|
31
|
-
type FarmTestFormValues = Record<string, FormDataEntryValue | readonly FormDataEntryValue[]>;
|
|
32
|
-
interface FarmTestRequestOptions extends Omit<RequestInit, "body" | "headers"> {
|
|
33
|
-
origin?: string;
|
|
34
|
-
headers?: HeadersInit;
|
|
35
|
-
query?: FarmTestQuery;
|
|
36
|
-
cookies?: Record<string, string>;
|
|
37
|
-
json?: unknown;
|
|
38
|
-
form?: FormData | FarmTestFormValues;
|
|
39
|
-
body?: BodyInit | null;
|
|
40
|
-
}
|
|
41
|
-
interface FarmTestHarnessOptions<TContext = unknown> {
|
|
42
|
-
origin?: string;
|
|
43
|
-
headers?: HeadersInit;
|
|
44
|
-
cookies?: Record<string, string>;
|
|
45
|
-
context?: FarmContextFactory<TContext>;
|
|
46
|
-
}
|
|
47
|
-
type AnyProgrammaticPageRoute = ProgrammaticPageRoute<any, any, any, any>;
|
|
48
|
-
type InferFarmTestRouteParams<TRoute> = TRoute extends ProgrammaticPageRoute<infer TParams, any, any, any> ? TParams : never;
|
|
49
|
-
type InferFarmTestRouteSearch<TRoute> = TRoute extends ProgrammaticPageRoute<any, infer TSearch, any, any> ? TSearch : never;
|
|
50
|
-
type InferFarmTestRouteData<TRoute> = TRoute extends ProgrammaticPageRoute<any, any, infer TDataHooks, any> ? InferProgrammaticRouteData<TDataHooks> : never;
|
|
51
|
-
type FarmTestRouteProps<TRoute extends AnyProgrammaticPageRoute> = ProgrammaticRouteComponentProps<InferFarmTestRouteParams<TRoute>, InferFarmTestRouteSearch<TRoute>, InferFarmTestRouteData<TRoute>>;
|
|
52
|
-
type FarmTestRouteParamsInput<TRoute> = InferFarmTestRouteParams<TRoute> extends Record<string, unknown> ? Partial<InferFarmTestRouteParams<TRoute>> : FarmTestPathParams;
|
|
53
|
-
type FarmTestRouteSearchInput<TRoute> = InferFarmTestRouteSearch<TRoute> extends Record<string, unknown> ? Partial<InferFarmTestRouteSearch<TRoute>> | URLSearchParams : FarmTestQuery;
|
|
54
|
-
interface FarmTestRouteOptions<TRoute extends AnyProgrammaticPageRoute, TContext = unknown> extends Pick<FarmTestRequestOptions, "origin" | "headers" | "cookies" | "signal"> {
|
|
55
|
-
path?: string | URL;
|
|
56
|
-
params?: FarmTestRouteParamsInput<TRoute>;
|
|
57
|
-
search?: FarmTestRouteSearchInput<TRoute>;
|
|
58
|
-
context?: TContext;
|
|
59
|
-
middleware?: MiddlewareProps;
|
|
60
|
-
pluginContext?: PluginContextProps;
|
|
61
|
-
}
|
|
62
|
-
interface FarmTestRouteResult<TRoute extends AnyProgrammaticPageRoute> {
|
|
63
|
-
route: TRoute;
|
|
64
|
-
module: RouteModule;
|
|
65
|
-
request: Request;
|
|
66
|
-
props: FarmTestRouteProps<TRoute>;
|
|
67
|
-
element: ReactElement;
|
|
68
|
-
canonicalPath?: string;
|
|
69
|
-
}
|
|
70
|
-
interface FarmTestApiOptions extends FarmTestRequestOptions {
|
|
71
|
-
path?: string | URL;
|
|
72
|
-
params?: FarmTestPathParams;
|
|
73
|
-
throwOnError?: boolean;
|
|
74
|
-
}
|
|
75
|
-
interface FarmTestEndpointOptions extends FarmTestRequestOptions {
|
|
76
|
-
path?: string | URL;
|
|
77
|
-
params?: APIRouteParams;
|
|
78
|
-
throwOnError?: boolean;
|
|
79
|
-
}
|
|
80
|
-
interface FarmTestServerFnOptions extends Pick<FarmTestRequestOptions, "origin" | "headers" | "cookies" | "signal"> {
|
|
81
|
-
path?: string | URL;
|
|
82
|
-
request?: Request;
|
|
83
|
-
}
|
|
84
|
-
type FarmTestServerFnArguments<TInput> = [unknown] extends [TInput] ? [input?: TInput | FormData, options?: FarmTestServerFnOptions] : [input: TInput | FormData, options?: FarmTestServerFnOptions];
|
|
85
|
-
interface FarmTestHarness<TContext = unknown> {
|
|
86
|
-
request(path?: string | URL, options?: FarmTestRequestOptions): Request;
|
|
87
|
-
route<TRoute extends AnyProgrammaticPageRoute>(route: TRoute, options?: FarmTestRouteOptions<TRoute, TContext>): Promise<FarmTestRouteResult<TRoute>>;
|
|
88
|
-
api(route: ProgrammaticApiRoute, options?: FarmTestApiOptions): Promise<Response>;
|
|
89
|
-
endpoint(endpoint: unknown, options?: FarmTestEndpointOptions): Promise<Response>;
|
|
90
|
-
serverFn<TInput, TResult>(serverFn: ServerFn<TInput, TResult>, ...args: FarmTestServerFnArguments<TInput>): Promise<TResult>;
|
|
91
|
-
clearCache(): void;
|
|
92
|
-
}
|
|
93
|
-
/** Create a deterministic Web Request without depending on a test runner. */
|
|
94
|
-
declare function createTestRequest(path?: string | URL, options?: FarmTestRequestOptions): Request;
|
|
95
|
-
/**
|
|
96
|
-
* Create test helpers that exercise Farm's real route, API, and server-function runtimes.
|
|
97
|
-
* The harness has no dependency on Vitest, Jest, or a DOM environment.
|
|
98
|
-
*/
|
|
99
|
-
declare function createFarmTestHarness<TContext = unknown>(options?: FarmTestHarnessOptions<TContext>): FarmTestHarness<TContext>;
|
|
100
|
-
|
|
101
|
-
export { type FarmTestApiOptions, type FarmTestEndpointOptions, type FarmTestFormValues, type FarmTestHarness, type FarmTestHarnessOptions, type FarmTestPathParams, type FarmTestQuery, type FarmTestRequestOptions, type FarmTestRouteOptions, type FarmTestRouteProps, type FarmTestRouteResult, type FarmTestServerFnArguments, type FarmTestServerFnOptions, type InferFarmTestRouteData, type InferFarmTestRouteParams, type InferFarmTestRouteSearch, createFarmTestHarness, createTestRequest };
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
type MultipartField = string | number | boolean | bigint | Blob | Date | null | undefined;
|
|
2
|
-
type MultipartValues = Record<string, MultipartField | readonly MultipartField[]>;
|
|
3
|
-
/**
|
|
4
|
-
* A real FormData value that retains the submitted value shape for generated
|
|
5
|
-
* API-client inference.
|
|
6
|
-
*/
|
|
7
|
-
type TypedFormData<TValues> = FormData & {
|
|
8
|
-
readonly __farmMultipartInput: TValues;
|
|
9
|
-
};
|
|
10
|
-
type MultipartSchema<TSchema> = TSchema & {
|
|
11
|
-
readonly __farmMultipartSchema: true;
|
|
12
|
-
};
|
|
13
|
-
type FarmStreamResponse<TItem> = Response & {
|
|
14
|
-
readonly __farmStreamItem: TItem;
|
|
15
|
-
};
|
|
16
|
-
interface FarmAPIStream<TItem> extends AsyncIterable<TItem> {
|
|
17
|
-
readonly response: Response;
|
|
18
|
-
cancel(reason?: unknown): Promise<void>;
|
|
19
|
-
}
|
|
20
|
-
type SchemaLike = {
|
|
21
|
-
parse(data: unknown): unknown;
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* Mark a body schema as multipart. The handler still receives the schema's
|
|
25
|
-
* parsed object; generated clients require `toFormData(...)` for the request.
|
|
26
|
-
*/
|
|
27
|
-
declare function multipart<TSchema extends SchemaLike>(schema: TSchema): MultipartSchema<TSchema>;
|
|
28
|
-
declare function isMultipartSchema(value: unknown): value is MultipartSchema<SchemaLike>;
|
|
29
|
-
/**
|
|
30
|
-
* Encode a typed object as multipart FormData without converting File or Blob
|
|
31
|
-
* values to JSON or base64.
|
|
32
|
-
*/
|
|
33
|
-
declare function toFormData<TValues extends MultipartValues>(values: TValues): TypedFormData<TValues>;
|
|
34
|
-
/**
|
|
35
|
-
* Stream JSON values as newline-delimited JSON. Each source value becomes one
|
|
36
|
-
* independently decodable item instead of buffering the whole response.
|
|
37
|
-
*/
|
|
38
|
-
declare function jsonStream<TItem>(source: AsyncIterable<TItem> | Iterable<TItem>, init?: ResponseInit): FarmStreamResponse<TItem>;
|
|
39
|
-
declare function isJSONStreamResponse(response: {
|
|
40
|
-
headers?: Pick<Headers, "get"> | null;
|
|
41
|
-
}): boolean;
|
|
42
|
-
/**
|
|
43
|
-
* Decode a Farm JSON stream lazily. The response body is read only as the
|
|
44
|
-
* consumer advances the async iterator, preserving fetch backpressure.
|
|
45
|
-
*/
|
|
46
|
-
declare function readJSONStream<TItem>(response: Response): FarmAPIStream<TItem>;
|
|
47
|
-
declare function isFarmAPIStream(value: unknown): value is FarmAPIStream<unknown>;
|
|
48
|
-
|
|
49
|
-
export { type FarmAPIStream as F, type MultipartSchema as M, type TypedFormData as T, type MultipartField as a, type MultipartValues as b, type FarmStreamResponse as c, isJSONStreamResponse as d, isFarmAPIStream as e, isMultipartSchema as i, jsonStream as j, multipart as m, readJSONStream as r, toFormData as t };
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
type MultipartField = string | number | boolean | bigint | Blob | Date | null | undefined;
|
|
2
|
-
type MultipartValues = Record<string, MultipartField | readonly MultipartField[]>;
|
|
3
|
-
/**
|
|
4
|
-
* A real FormData value that retains the submitted value shape for generated
|
|
5
|
-
* API-client inference.
|
|
6
|
-
*/
|
|
7
|
-
type TypedFormData<TValues> = FormData & {
|
|
8
|
-
readonly __farmMultipartInput: TValues;
|
|
9
|
-
};
|
|
10
|
-
type MultipartSchema<TSchema> = TSchema & {
|
|
11
|
-
readonly __farmMultipartSchema: true;
|
|
12
|
-
};
|
|
13
|
-
type FarmStreamResponse<TItem> = Response & {
|
|
14
|
-
readonly __farmStreamItem: TItem;
|
|
15
|
-
};
|
|
16
|
-
interface FarmAPIStream<TItem> extends AsyncIterable<TItem> {
|
|
17
|
-
readonly response: Response;
|
|
18
|
-
cancel(reason?: unknown): Promise<void>;
|
|
19
|
-
}
|
|
20
|
-
type SchemaLike = {
|
|
21
|
-
parse(data: unknown): unknown;
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* Mark a body schema as multipart. The handler still receives the schema's
|
|
25
|
-
* parsed object; generated clients require `toFormData(...)` for the request.
|
|
26
|
-
*/
|
|
27
|
-
declare function multipart<TSchema extends SchemaLike>(schema: TSchema): MultipartSchema<TSchema>;
|
|
28
|
-
declare function isMultipartSchema(value: unknown): value is MultipartSchema<SchemaLike>;
|
|
29
|
-
/**
|
|
30
|
-
* Encode a typed object as multipart FormData without converting File or Blob
|
|
31
|
-
* values to JSON or base64.
|
|
32
|
-
*/
|
|
33
|
-
declare function toFormData<TValues extends MultipartValues>(values: TValues): TypedFormData<TValues>;
|
|
34
|
-
/**
|
|
35
|
-
* Stream JSON values as newline-delimited JSON. Each source value becomes one
|
|
36
|
-
* independently decodable item instead of buffering the whole response.
|
|
37
|
-
*/
|
|
38
|
-
declare function jsonStream<TItem>(source: AsyncIterable<TItem> | Iterable<TItem>, init?: ResponseInit): FarmStreamResponse<TItem>;
|
|
39
|
-
declare function isJSONStreamResponse(response: {
|
|
40
|
-
headers?: Pick<Headers, "get"> | null;
|
|
41
|
-
}): boolean;
|
|
42
|
-
/**
|
|
43
|
-
* Decode a Farm JSON stream lazily. The response body is read only as the
|
|
44
|
-
* consumer advances the async iterator, preserving fetch backpressure.
|
|
45
|
-
*/
|
|
46
|
-
declare function readJSONStream<TItem>(response: Response): FarmAPIStream<TItem>;
|
|
47
|
-
declare function isFarmAPIStream(value: unknown): value is FarmAPIStream<unknown>;
|
|
48
|
-
|
|
49
|
-
export { type FarmAPIStream as F, type MultipartSchema as M, type TypedFormData as T, type MultipartField as a, type MultipartValues as b, type FarmStreamResponse as c, isJSONStreamResponse as d, isFarmAPIStream as e, isMultipartSchema as i, jsonStream as j, multipart as m, readJSONStream as r, toFormData as t };
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
type FarmI18nRouting = "prefix-always" | "prefix-except-default" | "none";
|
|
2
|
-
type FarmI18nDetectionSignal = "url" | "cookie" | "accept-language";
|
|
3
|
-
type FarmI18nLocaleSource = FarmI18nDetectionSignal | "default" | "explicit";
|
|
4
|
-
type FarmI18nDirection = "ltr" | "rtl";
|
|
5
|
-
interface FarmI18nCookieConfig {
|
|
6
|
-
name?: string;
|
|
7
|
-
maxAge?: number;
|
|
8
|
-
path?: string;
|
|
9
|
-
sameSite?: "lax" | "strict" | "none";
|
|
10
|
-
secure?: boolean;
|
|
11
|
-
}
|
|
12
|
-
interface FarmI18nUserConfig {
|
|
13
|
-
locales: readonly string[];
|
|
14
|
-
defaultLocale: string;
|
|
15
|
-
/** Directory containing `<locale>.json`, or a path containing `{locale}`. */
|
|
16
|
-
messages?: string;
|
|
17
|
-
routing?: FarmI18nRouting;
|
|
18
|
-
detection?: false | readonly FarmI18nDetectionSignal[];
|
|
19
|
-
fallbackLocale?: string;
|
|
20
|
-
strict?: boolean;
|
|
21
|
-
cookie?: FarmI18nCookieConfig;
|
|
22
|
-
direction?: Partial<Record<string, FarmI18nDirection>>;
|
|
23
|
-
/** @deprecated Use `detection: false` to disable automatic detection. */
|
|
24
|
-
localeDetection?: boolean;
|
|
25
|
-
}
|
|
26
|
-
interface ResolvedFarmI18nCookieConfig {
|
|
27
|
-
name: string;
|
|
28
|
-
maxAge: number;
|
|
29
|
-
path: string;
|
|
30
|
-
sameSite: "lax" | "strict" | "none";
|
|
31
|
-
secure: boolean;
|
|
32
|
-
}
|
|
33
|
-
interface ResolvedFarmI18nConfig {
|
|
34
|
-
enabled: boolean;
|
|
35
|
-
locales: readonly string[];
|
|
36
|
-
defaultLocale: string;
|
|
37
|
-
messages: string;
|
|
38
|
-
routing: FarmI18nRouting;
|
|
39
|
-
detection: readonly FarmI18nDetectionSignal[];
|
|
40
|
-
fallbackLocale: string;
|
|
41
|
-
strict: boolean;
|
|
42
|
-
cookie: ResolvedFarmI18nCookieConfig;
|
|
43
|
-
direction: Readonly<Record<string, FarmI18nDirection>>;
|
|
44
|
-
}
|
|
45
|
-
type FarmI18nCatalog = Record<string, string>;
|
|
46
|
-
type FarmI18nCatalogs = Record<string, FarmI18nCatalog>;
|
|
47
|
-
interface FarmI18nClientSnapshot {
|
|
48
|
-
locale: string;
|
|
49
|
-
source: FarmI18nLocaleSource;
|
|
50
|
-
locales: readonly string[];
|
|
51
|
-
defaultLocale: string;
|
|
52
|
-
routing: FarmI18nRouting;
|
|
53
|
-
cookie: ResolvedFarmI18nCookieConfig;
|
|
54
|
-
direction: FarmI18nDirection;
|
|
55
|
-
messages: FarmI18nCatalog;
|
|
56
|
-
}
|
|
57
|
-
/** The generated `farm.d.ts` file augments this interface. */
|
|
58
|
-
interface FarmI18nMessageRegistry {
|
|
59
|
-
}
|
|
60
|
-
/** The generated `farm.d.ts` file augments this interface. */
|
|
61
|
-
interface FarmI18nLocaleRegistry {
|
|
62
|
-
}
|
|
63
|
-
type RegisteredMessageKey = Extract<keyof FarmI18nMessageRegistry, string>;
|
|
64
|
-
type RegisteredLocale = Extract<keyof FarmI18nLocaleRegistry, string>;
|
|
65
|
-
type FarmI18nMessageKey = [RegisteredMessageKey] extends [never] ? string : RegisteredMessageKey;
|
|
66
|
-
type FarmI18nLocale = [RegisteredLocale] extends [never] ? string : RegisteredLocale;
|
|
67
|
-
type FarmI18nMessageValues<TKey extends FarmI18nMessageKey> = TKey extends RegisteredMessageKey ? FarmI18nMessageRegistry[TKey] : Record<string, unknown>;
|
|
68
|
-
type FarmI18nMessageArgs<TKey extends FarmI18nMessageKey> = TKey extends RegisteredMessageKey ? keyof FarmI18nMessageRegistry[TKey] extends never ? [values?: FarmI18nMessageRegistry[TKey]] : [values: FarmI18nMessageRegistry[TKey]] : [values?: Record<string, unknown>];
|
|
69
|
-
interface FarmTranslator {
|
|
70
|
-
<TKey extends FarmI18nMessageKey>(key: TKey, ...args: FarmI18nMessageArgs<TKey>): string;
|
|
71
|
-
rich<TKey extends FarmI18nMessageKey>(key: TKey, ...args: FarmI18nMessageArgs<TKey>): unknown;
|
|
72
|
-
raw<TKey extends FarmI18nMessageKey>(key: TKey): string;
|
|
73
|
-
has(key: string): boolean;
|
|
74
|
-
}
|
|
75
|
-
declare global {
|
|
76
|
-
interface Window {
|
|
77
|
-
__FARM_I18N__?: FarmI18nClientSnapshot;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
export type { FarmI18nCatalogs as F, ResolvedFarmI18nConfig as R, FarmI18nClientSnapshot as a, FarmI18nLocaleSource as b, FarmI18nLocale as c, FarmTranslator as d, FarmI18nMessageArgs as e, FarmI18nMessageKey as f, FarmI18nCookieConfig as g, FarmI18nDetectionSignal as h, FarmI18nDirection as i, FarmI18nRouting as j, FarmI18nUserConfig as k, FarmI18nCatalog as l, FarmI18nLocaleRegistry as m, FarmI18nMessageRegistry as n, FarmI18nMessageValues as o };
|
package/dist/types-BMxWr97v.d.ts
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
type FarmI18nRouting = "prefix-always" | "prefix-except-default" | "none";
|
|
2
|
-
type FarmI18nDetectionSignal = "url" | "cookie" | "accept-language";
|
|
3
|
-
type FarmI18nLocaleSource = FarmI18nDetectionSignal | "default" | "explicit";
|
|
4
|
-
type FarmI18nDirection = "ltr" | "rtl";
|
|
5
|
-
interface FarmI18nCookieConfig {
|
|
6
|
-
name?: string;
|
|
7
|
-
maxAge?: number;
|
|
8
|
-
path?: string;
|
|
9
|
-
sameSite?: "lax" | "strict" | "none";
|
|
10
|
-
secure?: boolean;
|
|
11
|
-
}
|
|
12
|
-
interface FarmI18nUserConfig {
|
|
13
|
-
locales: readonly string[];
|
|
14
|
-
defaultLocale: string;
|
|
15
|
-
/** Directory containing `<locale>.json`, or a path containing `{locale}`. */
|
|
16
|
-
messages?: string;
|
|
17
|
-
routing?: FarmI18nRouting;
|
|
18
|
-
detection?: false | readonly FarmI18nDetectionSignal[];
|
|
19
|
-
fallbackLocale?: string;
|
|
20
|
-
strict?: boolean;
|
|
21
|
-
cookie?: FarmI18nCookieConfig;
|
|
22
|
-
direction?: Partial<Record<string, FarmI18nDirection>>;
|
|
23
|
-
/** @deprecated Use `detection: false` to disable automatic detection. */
|
|
24
|
-
localeDetection?: boolean;
|
|
25
|
-
}
|
|
26
|
-
interface ResolvedFarmI18nCookieConfig {
|
|
27
|
-
name: string;
|
|
28
|
-
maxAge: number;
|
|
29
|
-
path: string;
|
|
30
|
-
sameSite: "lax" | "strict" | "none";
|
|
31
|
-
secure: boolean;
|
|
32
|
-
}
|
|
33
|
-
interface ResolvedFarmI18nConfig {
|
|
34
|
-
enabled: boolean;
|
|
35
|
-
locales: readonly string[];
|
|
36
|
-
defaultLocale: string;
|
|
37
|
-
messages: string;
|
|
38
|
-
routing: FarmI18nRouting;
|
|
39
|
-
detection: readonly FarmI18nDetectionSignal[];
|
|
40
|
-
fallbackLocale: string;
|
|
41
|
-
strict: boolean;
|
|
42
|
-
cookie: ResolvedFarmI18nCookieConfig;
|
|
43
|
-
direction: Readonly<Record<string, FarmI18nDirection>>;
|
|
44
|
-
}
|
|
45
|
-
type FarmI18nCatalog = Record<string, string>;
|
|
46
|
-
type FarmI18nCatalogs = Record<string, FarmI18nCatalog>;
|
|
47
|
-
interface FarmI18nClientSnapshot {
|
|
48
|
-
locale: string;
|
|
49
|
-
source: FarmI18nLocaleSource;
|
|
50
|
-
locales: readonly string[];
|
|
51
|
-
defaultLocale: string;
|
|
52
|
-
routing: FarmI18nRouting;
|
|
53
|
-
cookie: ResolvedFarmI18nCookieConfig;
|
|
54
|
-
direction: FarmI18nDirection;
|
|
55
|
-
messages: FarmI18nCatalog;
|
|
56
|
-
}
|
|
57
|
-
/** The generated `farm.d.ts` file augments this interface. */
|
|
58
|
-
interface FarmI18nMessageRegistry {
|
|
59
|
-
}
|
|
60
|
-
/** The generated `farm.d.ts` file augments this interface. */
|
|
61
|
-
interface FarmI18nLocaleRegistry {
|
|
62
|
-
}
|
|
63
|
-
type RegisteredMessageKey = Extract<keyof FarmI18nMessageRegistry, string>;
|
|
64
|
-
type RegisteredLocale = Extract<keyof FarmI18nLocaleRegistry, string>;
|
|
65
|
-
type FarmI18nMessageKey = [RegisteredMessageKey] extends [never] ? string : RegisteredMessageKey;
|
|
66
|
-
type FarmI18nLocale = [RegisteredLocale] extends [never] ? string : RegisteredLocale;
|
|
67
|
-
type FarmI18nMessageValues<TKey extends FarmI18nMessageKey> = TKey extends RegisteredMessageKey ? FarmI18nMessageRegistry[TKey] : Record<string, unknown>;
|
|
68
|
-
type FarmI18nMessageArgs<TKey extends FarmI18nMessageKey> = TKey extends RegisteredMessageKey ? keyof FarmI18nMessageRegistry[TKey] extends never ? [values?: FarmI18nMessageRegistry[TKey]] : [values: FarmI18nMessageRegistry[TKey]] : [values?: Record<string, unknown>];
|
|
69
|
-
interface FarmTranslator {
|
|
70
|
-
<TKey extends FarmI18nMessageKey>(key: TKey, ...args: FarmI18nMessageArgs<TKey>): string;
|
|
71
|
-
rich<TKey extends FarmI18nMessageKey>(key: TKey, ...args: FarmI18nMessageArgs<TKey>): unknown;
|
|
72
|
-
raw<TKey extends FarmI18nMessageKey>(key: TKey): string;
|
|
73
|
-
has(key: string): boolean;
|
|
74
|
-
}
|
|
75
|
-
declare global {
|
|
76
|
-
interface Window {
|
|
77
|
-
__FARM_I18N__?: FarmI18nClientSnapshot;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
export type { FarmI18nCatalogs as F, ResolvedFarmI18nConfig as R, FarmI18nClientSnapshot as a, FarmI18nLocaleSource as b, FarmI18nLocale as c, FarmTranslator as d, FarmI18nMessageArgs as e, FarmI18nMessageKey as f, FarmI18nCookieConfig as g, FarmI18nDetectionSignal as h, FarmI18nDirection as i, FarmI18nRouting as j, FarmI18nUserConfig as k, FarmI18nCatalog as l, FarmI18nLocaleRegistry as m, FarmI18nMessageRegistry as n, FarmI18nMessageValues as o };
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { DocsConfig } from '@farming-labs/docs';
|
|
2
|
-
|
|
3
|
-
interface FarmDocsSidebarItem {
|
|
4
|
-
label?: string;
|
|
5
|
-
title?: string;
|
|
6
|
-
slug?: string;
|
|
7
|
-
href?: string;
|
|
8
|
-
icon?: string;
|
|
9
|
-
children?: FarmDocsSidebarItem[];
|
|
10
|
-
items?: FarmDocsSidebarItem[];
|
|
11
|
-
}
|
|
12
|
-
interface FarmDocsNavigationConfig {
|
|
13
|
-
sidebar?: FarmDocsSidebarItem[];
|
|
14
|
-
}
|
|
15
|
-
type FarmDocsRuntimeConfig = Partial<DocsConfig> & {
|
|
16
|
-
/**
|
|
17
|
-
* Public favicon URL used by the standalone docs renderer.
|
|
18
|
-
* Set this explicitly when docs should share the host application's icon.
|
|
19
|
-
*/
|
|
20
|
-
favicon?: string;
|
|
21
|
-
/**
|
|
22
|
-
* Optional serializable navigation tree used by Farm's docs runtime.
|
|
23
|
-
* Icon values reference keys from `icons`.
|
|
24
|
-
*/
|
|
25
|
-
navigation?: FarmDocsNavigationConfig;
|
|
26
|
-
};
|
|
27
|
-
type FarmDocsConfigInput = FarmDocsRuntimeConfig & {
|
|
28
|
-
/**
|
|
29
|
-
* Farm public route for docs, e.g. "/docs". When passed through
|
|
30
|
-
* `config`, this is converted to the docs package's folder-style `entry`.
|
|
31
|
-
*/
|
|
32
|
-
entry?: string;
|
|
33
|
-
/** Explicit public route prefix. Defaults to `entry`. */
|
|
34
|
-
docsPath?: string;
|
|
35
|
-
/** Source content directory, relative to the project root. */
|
|
36
|
-
contentDir?: string;
|
|
37
|
-
/** Set to false to opt out even when a docs config file exists. */
|
|
38
|
-
enabled?: boolean;
|
|
39
|
-
/** Inline @farming-labs/docs config object. */
|
|
40
|
-
config?: FarmDocsRuntimeConfig;
|
|
41
|
-
/** Path to docs.config.* or docs.json. */
|
|
42
|
-
configPath?: string;
|
|
43
|
-
};
|
|
44
|
-
type FarmDocsUserConfig = boolean | FarmDocsConfigInput;
|
|
45
|
-
interface FarmDocsResolvedConfig {
|
|
46
|
-
enabled: boolean;
|
|
47
|
-
entry: string;
|
|
48
|
-
contentDir?: string;
|
|
49
|
-
configPath?: string;
|
|
50
|
-
config: FarmDocsRuntimeConfig & Pick<DocsConfig, "entry">;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export type { FarmDocsResolvedConfig as F, FarmDocsUserConfig as a, FarmDocsConfigInput as b, FarmDocsNavigationConfig as c, FarmDocsSidebarItem as d };
|