@farm.js/core 0.1.0-beta.20 → 0.1.0-beta.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/after.d.mts +25 -0
- package/dist/after.d.ts +25 -0
- package/dist/agent-runtime.cjs.map +1 -1
- package/dist/agent-runtime.d.mts +96 -0
- package/dist/agent-runtime.d.ts +96 -0
- package/dist/agent-runtime.mjs +1 -1
- package/dist/api/route-manager.d.mts +68 -0
- package/dist/api/route-manager.d.ts +68 -0
- package/dist/api/runtime.d.mts +3 -0
- package/dist/api/runtime.d.ts +3 -0
- package/dist/api.cjs +22 -19
- package/dist/api.cjs.map +1 -1
- package/dist/api.d.mts +50 -0
- package/dist/api.d.ts +50 -0
- package/dist/api.mjs +2 -1
- package/dist/app-BB8GCH1g.d.ts +306 -0
- package/dist/app-DwsTpyNZ.d.mts +306 -0
- package/dist/app-markdown.d.mts +24 -0
- package/dist/app-markdown.d.ts +24 -0
- package/dist/cache.d.mts +192 -0
- package/dist/cache.d.ts +192 -0
- package/dist/{chunk-MIUW47JX.mjs → chunk-2PEJGY5V.mjs} +15 -20
- package/dist/chunk-2PEJGY5V.mjs.map +1 -0
- package/dist/{chunk-RIXKJPGI.mjs → chunk-42325TLU.mjs} +2 -2
- package/dist/{chunk-UNDUIGWC.mjs → chunk-A53LP5QG.mjs} +2 -2
- package/dist/chunk-A53LP5QG.mjs.map +1 -0
- package/dist/{chunk-7BX7NEA7.mjs → chunk-CEVMYGDL.mjs} +2 -2
- package/dist/chunk-CEVMYGDL.mjs.map +1 -0
- package/dist/{chunk-ZYDQS2TT.mjs → chunk-CRN3AH35.mjs} +1 -1
- package/dist/chunk-CRN3AH35.mjs.map +1 -0
- package/dist/{chunk-4KTN2BLF.mjs → chunk-DAUR3WUZ.mjs} +2 -2
- package/dist/{chunk-4KTN2BLF.mjs.map → chunk-DAUR3WUZ.mjs.map} +1 -1
- package/dist/chunk-GIELMNBG.mjs +15 -0
- package/dist/chunk-GIELMNBG.mjs.map +1 -0
- package/dist/{chunk-4EATUJFO.mjs → chunk-ICTGDDV4.mjs} +20 -22
- package/dist/chunk-ICTGDDV4.mjs.map +1 -0
- package/dist/{chunk-5VHPEW6N.mjs → chunk-LLPN5SEZ.mjs} +2 -2
- package/dist/{chunk-TMZEK265.mjs → chunk-XBKXKJX5.mjs} +32 -37
- package/dist/chunk-XBKXKJX5.mjs.map +1 -0
- package/dist/{chunk-ZRMJY4G2.mjs → chunk-ZP73P4VR.mjs} +12 -10
- package/dist/{chunk-ZRMJY4G2.mjs.map → chunk-ZP73P4VR.mjs.map} +1 -1
- package/dist/chunk-recovery-lnQFzcQP.d.mts +26 -0
- package/dist/chunk-recovery-lnQFzcQP.d.ts +26 -0
- package/dist/client-BT1mFQas.d.mts +447 -0
- package/dist/client-Nn0q4eO4.d.ts +447 -0
- package/dist/client-cache-CIlyBlmx.d.ts +6 -0
- package/dist/client-cache-D-EZ7XVW.d.mts +6 -0
- package/dist/client-plugins-CbRum1fj.d.ts +2088 -0
- package/dist/client-plugins-QQntVkrv.d.mts +2088 -0
- package/dist/client-plugins.d.mts +24 -0
- package/dist/client-plugins.d.ts +24 -0
- package/dist/client.d.mts +452 -0
- package/dist/client.d.ts +452 -0
- package/dist/config.d.mts +31 -0
- package/dist/config.d.ts +31 -0
- package/dist/cron.d.mts +78 -0
- package/dist/cron.d.ts +78 -0
- package/dist/deferred.d.mts +42 -0
- package/dist/deferred.d.ts +42 -0
- package/dist/deployment.d.mts +36 -0
- package/dist/deployment.d.ts +36 -0
- package/dist/{devtools-4RDGBT72.mjs → devtools-52FYXIEK.mjs} +3 -3
- package/dist/docs.cjs.map +1 -1
- package/dist/docs.d.mts +80 -0
- package/dist/docs.d.ts +80 -0
- package/dist/docs.mjs +3 -3
- package/dist/env-types.d.mts +12 -0
- package/dist/env-types.d.ts +12 -0
- package/dist/env.d.mts +45 -0
- package/dist/env.d.ts +45 -0
- package/dist/environment/vite.d.mts +22 -0
- package/dist/environment/vite.d.ts +22 -0
- package/dist/environment.d.mts +18 -0
- package/dist/environment.d.ts +18 -0
- package/dist/font.d.mts +95 -0
- package/dist/font.d.ts +95 -0
- package/dist/headers.d.mts +22 -0
- package/dist/headers.d.ts +22 -0
- package/dist/i18n/client.d.mts +32 -0
- package/dist/i18n/client.d.ts +32 -0
- package/dist/i18n/index.d.mts +20 -0
- package/dist/i18n/index.d.ts +20 -0
- package/dist/i18n/server.d.mts +30 -0
- package/dist/i18n/server.d.ts +30 -0
- package/dist/image/server.d.mts +37 -0
- package/dist/image/server.d.ts +37 -0
- package/dist/image/sharp.d.mts +7 -0
- package/dist/image/sharp.d.ts +7 -0
- package/dist/image-config-Duob7wER.d.mts +50 -0
- package/dist/image-config-Duob7wER.d.ts +50 -0
- package/dist/image.d.mts +39 -0
- package/dist/image.d.ts +39 -0
- package/dist/index.cjs +72 -73
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +477 -0
- package/dist/index.d.ts +477 -0
- package/dist/index.mjs +11 -10
- package/dist/index.mjs.map +1 -1
- package/dist/integration-api-CHT2OKAf.d.mts +93 -0
- package/dist/integration-api-CHT2OKAf.d.ts +93 -0
- package/dist/integrations.cjs.map +1 -1
- package/dist/integrations.d.mts +24 -0
- package/dist/integrations.d.ts +24 -0
- package/dist/integrations.mjs +1 -1
- package/dist/internal/build-runtime.cjs +56 -54
- package/dist/internal/build-runtime.cjs.map +1 -1
- package/dist/internal/build-runtime.d.mts +41 -0
- package/dist/internal/build-runtime.d.ts +41 -0
- package/dist/internal/build-runtime.mjs +9 -8
- package/dist/internal/client-runtime.d.mts +17 -0
- package/dist/internal/client-runtime.d.ts +17 -0
- package/dist/internal/config-runtime.cjs.map +1 -1
- package/dist/internal/config-runtime.d.mts +41 -0
- package/dist/internal/config-runtime.d.ts +41 -0
- package/dist/internal/config-runtime.mjs +2 -2
- package/dist/internal/metadata-image-runtime.d.mts +25 -0
- package/dist/internal/metadata-image-runtime.d.ts +25 -0
- package/dist/internal/production-node-env.d.mts +12 -0
- package/dist/internal/production-node-env.d.ts +12 -0
- package/dist/internal/production-runtime.d.mts +66 -0
- package/dist/internal/production-runtime.d.ts +66 -0
- package/dist/island-CfGru1MO.d.mts +9 -0
- package/dist/island-CfGru1MO.d.ts +9 -0
- package/dist/markdown.d.mts +60 -0
- package/dist/markdown.d.ts +60 -0
- package/dist/metadata-B5jBJHq1.d.ts +22 -0
- package/dist/metadata-BxOJ4FJl.d.mts +22 -0
- package/dist/middleware.cjs +17 -17
- package/dist/middleware.cjs.map +1 -1
- package/dist/middleware.d.mts +171 -0
- package/dist/middleware.d.ts +171 -0
- package/dist/middleware.mjs +3 -2
- package/dist/navigation-errors-Dvwpzaer.d.mts +13 -0
- package/dist/navigation-errors-Dvwpzaer.d.ts +13 -0
- package/dist/navigation.d.mts +14 -0
- package/dist/navigation.d.ts +14 -0
- package/dist/observability.d.mts +335 -0
- package/dist/observability.d.ts +335 -0
- package/dist/params-BALtrRim.d.ts +15 -0
- package/dist/params-ry-lxqmy.d.mts +15 -0
- package/dist/plugin-BJDf43dc.d.mts +165 -0
- package/dist/plugin-BJDf43dc.d.ts +165 -0
- package/dist/plugin.cjs +42 -48
- package/dist/plugin.cjs.map +1 -1
- package/dist/plugin.d.mts +24 -0
- package/dist/plugin.d.ts +24 -0
- package/dist/plugin.mjs +6 -5
- package/dist/production-runtime-Bxua86uR.d.mts +81 -0
- package/dist/production-runtime-CZqXjRVi.d.ts +81 -0
- package/dist/query/client.d.mts +61 -0
- package/dist/query/client.d.ts +61 -0
- package/dist/query/index.d.mts +90 -0
- package/dist/query/index.d.ts +90 -0
- package/dist/query/parsers.d.mts +25 -0
- package/dist/query/parsers.d.ts +25 -0
- package/dist/query/server.d.mts +55 -0
- package/dist/query/server.d.ts +55 -0
- package/dist/request-7V0GaZK_.d.mts +6 -0
- package/dist/request-B5XYBv5a.d.ts +6 -0
- package/dist/request.d.mts +25 -0
- package/dist/request.d.ts +25 -0
- package/dist/resolver-DJqjLMg_.d.mts +14 -0
- package/dist/resolver-IH4RmPEl.d.ts +14 -0
- package/dist/route-runtime-DoOHzCAD.d.mts +38 -0
- package/dist/route-runtime-DoOHzCAD.d.ts +38 -0
- package/dist/router.d.mts +36 -0
- package/dist/router.d.ts +36 -0
- package/dist/routes.d.mts +226 -0
- package/dist/routes.d.ts +226 -0
- package/dist/runtime-Bpp-c28k.d.ts +231 -0
- package/dist/runtime-Cxpq6xZN.d.mts +27 -0
- package/dist/runtime-Q3u74Nbq.d.mts +231 -0
- package/dist/runtime-bv63eUiO.d.ts +27 -0
- package/dist/server-action-security.d.mts +45 -0
- package/dist/server-action-security.d.ts +45 -0
- package/dist/server-fn-client.d.mts +33 -0
- package/dist/server-fn-client.d.ts +33 -0
- package/dist/server-fn-error-DDh14a0V.d.mts +26 -0
- package/dist/server-fn-error-DDh14a0V.d.ts +26 -0
- package/dist/server-fn.d.mts +121 -0
- package/dist/server-fn.d.ts +121 -0
- package/dist/server-plugins.d.mts +57 -0
- package/dist/server-plugins.d.ts +57 -0
- package/dist/server-query-client.d.mts +51 -0
- package/dist/server-query-client.d.ts +51 -0
- package/dist/server-query.d.mts +37 -0
- package/dist/server-query.d.ts +37 -0
- package/dist/server.cjs +45 -67
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.mts +51 -0
- package/dist/server.d.ts +51 -0
- package/dist/server.mjs +11 -25
- package/dist/server.mjs.map +1 -1
- package/dist/storage.d.mts +52 -0
- package/dist/storage.d.ts +52 -0
- package/dist/testing.d.mts +103 -0
- package/dist/testing.d.ts +103 -0
- package/dist/transport-BmbGTXA5.d.mts +49 -0
- package/dist/transport-BmbGTXA5.d.ts +49 -0
- package/dist/types-BMxWr97v.d.mts +81 -0
- package/dist/types-BMxWr97v.d.ts +81 -0
- package/dist/types-D1A6-XvH.d.mts +73 -0
- package/dist/types-D1A6-XvH.d.ts +73 -0
- package/dist/types-DTzm4TCl.d.mts +78 -0
- package/dist/types-DTzm4TCl.d.ts +78 -0
- package/dist/utils-s9pN0Yep.d.mts +23 -0
- package/dist/utils-xTFxzu47.d.ts +23 -0
- package/dist/version.cjs +1 -1
- package/dist/version.cjs.map +1 -1
- package/dist/version.d.mts +3 -0
- package/dist/version.d.ts +3 -0
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +44 -50
- package/dist/vite.cjs.map +1 -1
- package/dist/vite.d.mts +24 -0
- package/dist/vite.d.ts +24 -0
- package/dist/vite.mjs +5 -4
- package/dist/workflows-CusFV6mn.d.mts +153 -0
- package/dist/workflows-CusFV6mn.d.ts +153 -0
- package/dist/workflows.d.mts +1 -0
- package/dist/workflows.d.ts +1 -0
- package/package.json +1 -1
- package/dist/chunk-4EATUJFO.mjs.map +0 -1
- package/dist/chunk-7BX7NEA7.mjs.map +0 -1
- package/dist/chunk-MIUW47JX.mjs.map +0 -1
- package/dist/chunk-TMZEK265.mjs.map +0 -1
- package/dist/chunk-UNDUIGWC.mjs.map +0 -1
- package/dist/chunk-ZYDQS2TT.mjs.map +0 -1
- /package/dist/{chunk-RIXKJPGI.mjs.map → chunk-42325TLU.mjs.map} +0 -0
- /package/dist/{chunk-5VHPEW6N.mjs.map → chunk-LLPN5SEZ.mjs.map} +0 -0
- /package/dist/{devtools-4RDGBT72.mjs.map → devtools-52FYXIEK.mjs.map} +0 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export { ai as loadConfig, ah as resolveConfig, aj as resolveDeployConfig } from '../client-plugins-QQntVkrv.mjs';
|
|
2
|
+
import { build, createServer, loadEnv } from 'vite';
|
|
3
|
+
export { l as logger } from '../utils-s9pN0Yep.mjs';
|
|
4
|
+
import '../plugin-BJDf43dc.mjs';
|
|
5
|
+
import 'react';
|
|
6
|
+
import 'http';
|
|
7
|
+
import '../types-D1A6-XvH.mjs';
|
|
8
|
+
import 'db0';
|
|
9
|
+
import 'unstorage';
|
|
10
|
+
import '../integration-api-CHT2OKAf.mjs';
|
|
11
|
+
import '@farming-labs/orm';
|
|
12
|
+
import '../types-DTzm4TCl.mjs';
|
|
13
|
+
import '@farming-labs/docs';
|
|
14
|
+
import '../markdown.mjs';
|
|
15
|
+
import '../observability.mjs';
|
|
16
|
+
import '../workflows-CusFV6mn.mjs';
|
|
17
|
+
import '../cron.mjs';
|
|
18
|
+
import '../env.mjs';
|
|
19
|
+
import '../server-action-security.mjs';
|
|
20
|
+
import '../server-fn-error-DDh14a0V.mjs';
|
|
21
|
+
import '../image-config-Duob7wER.mjs';
|
|
22
|
+
import '../types-BMxWr97v.mjs';
|
|
23
|
+
import '../cache.mjs';
|
|
24
|
+
import '../route-runtime-DoOHzCAD.mjs';
|
|
25
|
+
import '../font.mjs';
|
|
26
|
+
|
|
27
|
+
type FarmProductionViteBuilder = "rollup" | "rolldown";
|
|
28
|
+
interface FarmProductionViteRuntime {
|
|
29
|
+
build: typeof build;
|
|
30
|
+
createServer: typeof createServer;
|
|
31
|
+
loadEnv: typeof loadEnv;
|
|
32
|
+
builder: FarmProductionViteBuilder;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Prefer Vite's Rolldown-powered production builder on supported Node releases.
|
|
36
|
+
* Vite 5 remains the compatibility path for Node 18, --no-optional installs,
|
|
37
|
+
* and projects that explicitly request Rollup.
|
|
38
|
+
*/
|
|
39
|
+
declare function loadFarmProductionVite(): Promise<FarmProductionViteRuntime>;
|
|
40
|
+
|
|
41
|
+
export { type FarmProductionViteRuntime, loadFarmProductionVite };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export { ai as loadConfig, ah as resolveConfig, aj as resolveDeployConfig } from '../client-plugins-CbRum1fj.js';
|
|
2
|
+
import { build, createServer, loadEnv } from 'vite';
|
|
3
|
+
export { l as logger } from '../utils-xTFxzu47.js';
|
|
4
|
+
import '../plugin-BJDf43dc.js';
|
|
5
|
+
import 'react';
|
|
6
|
+
import 'http';
|
|
7
|
+
import '../types-D1A6-XvH.js';
|
|
8
|
+
import 'db0';
|
|
9
|
+
import 'unstorage';
|
|
10
|
+
import '../integration-api-CHT2OKAf.js';
|
|
11
|
+
import '@farming-labs/orm';
|
|
12
|
+
import '../types-DTzm4TCl.js';
|
|
13
|
+
import '@farming-labs/docs';
|
|
14
|
+
import '../markdown.js';
|
|
15
|
+
import '../observability.js';
|
|
16
|
+
import '../workflows-CusFV6mn.js';
|
|
17
|
+
import '../cron.js';
|
|
18
|
+
import '../env.js';
|
|
19
|
+
import '../server-action-security.js';
|
|
20
|
+
import '../server-fn-error-DDh14a0V.js';
|
|
21
|
+
import '../image-config-Duob7wER.js';
|
|
22
|
+
import '../types-BMxWr97v.js';
|
|
23
|
+
import '../cache.js';
|
|
24
|
+
import '../route-runtime-DoOHzCAD.js';
|
|
25
|
+
import '../font.js';
|
|
26
|
+
|
|
27
|
+
type FarmProductionViteBuilder = "rollup" | "rolldown";
|
|
28
|
+
interface FarmProductionViteRuntime {
|
|
29
|
+
build: typeof build;
|
|
30
|
+
createServer: typeof createServer;
|
|
31
|
+
loadEnv: typeof loadEnv;
|
|
32
|
+
builder: FarmProductionViteBuilder;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Prefer Vite's Rolldown-powered production builder on supported Node releases.
|
|
36
|
+
* Vite 5 remains the compatibility path for Node 18, --no-optional installs,
|
|
37
|
+
* and projects that explicitly request Rollup.
|
|
38
|
+
*/
|
|
39
|
+
declare function loadFarmProductionVite(): Promise<FarmProductionViteRuntime>;
|
|
40
|
+
|
|
41
|
+
export { type FarmProductionViteRuntime, loadFarmProductionVite };
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
loadConfig,
|
|
6
6
|
resolveConfig,
|
|
7
7
|
resolveDeployConfig
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-CEVMYGDL.mjs";
|
|
9
9
|
import "../chunk-UVCIEUJC.mjs";
|
|
10
10
|
import "../chunk-RQ633A5I.mjs";
|
|
11
11
|
import "../chunk-E257KFBU.mjs";
|
|
@@ -19,7 +19,7 @@ import "../chunk-ZVWA4ZQ3.mjs";
|
|
|
19
19
|
import "../chunk-7FBJLMQH.mjs";
|
|
20
20
|
import "../chunk-4E6VRJ6P.mjs";
|
|
21
21
|
import "../chunk-GXASWWJU.mjs";
|
|
22
|
-
import "../chunk-
|
|
22
|
+
import "../chunk-CRN3AH35.mjs";
|
|
23
23
|
import "../chunk-QGOHVJ6J.mjs";
|
|
24
24
|
import "../chunk-FQYDHKKU.mjs";
|
|
25
25
|
import "../chunk-GQVGIUSN.mjs";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ImageResponseOptions } from '@vercel/og';
|
|
2
|
+
|
|
3
|
+
type MetadataImageSize = {
|
|
4
|
+
width?: number;
|
|
5
|
+
height?: number;
|
|
6
|
+
};
|
|
7
|
+
type MetadataImageFont = Omit<NonNullable<ImageResponseOptions["fonts"]>[number], "data"> & {
|
|
8
|
+
data: ArrayBuffer | ArrayBufferView | Promise<ArrayBuffer | ArrayBufferView>;
|
|
9
|
+
};
|
|
10
|
+
type FarmMetadataImageModule = {
|
|
11
|
+
size?: MetadataImageSize;
|
|
12
|
+
contentType?: string;
|
|
13
|
+
revalidate?: number | false;
|
|
14
|
+
fonts?: MetadataImageFont[];
|
|
15
|
+
emoji?: ImageResponseOptions["emoji"];
|
|
16
|
+
debug?: boolean;
|
|
17
|
+
};
|
|
18
|
+
type FarmMetadataImageResponseOptions = {
|
|
19
|
+
method?: string;
|
|
20
|
+
ifNoneMatch?: string | null;
|
|
21
|
+
};
|
|
22
|
+
/** @internal */
|
|
23
|
+
declare function createFarmMetadataImageResponse(value: unknown, imageModule: FarmMetadataImageModule, options?: FarmMetadataImageResponseOptions): Promise<Response>;
|
|
24
|
+
|
|
25
|
+
export { type FarmMetadataImageModule, type FarmMetadataImageResponseOptions, createFarmMetadataImageResponse };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ImageResponseOptions } from '@vercel/og';
|
|
2
|
+
|
|
3
|
+
type MetadataImageSize = {
|
|
4
|
+
width?: number;
|
|
5
|
+
height?: number;
|
|
6
|
+
};
|
|
7
|
+
type MetadataImageFont = Omit<NonNullable<ImageResponseOptions["fonts"]>[number], "data"> & {
|
|
8
|
+
data: ArrayBuffer | ArrayBufferView | Promise<ArrayBuffer | ArrayBufferView>;
|
|
9
|
+
};
|
|
10
|
+
type FarmMetadataImageModule = {
|
|
11
|
+
size?: MetadataImageSize;
|
|
12
|
+
contentType?: string;
|
|
13
|
+
revalidate?: number | false;
|
|
14
|
+
fonts?: MetadataImageFont[];
|
|
15
|
+
emoji?: ImageResponseOptions["emoji"];
|
|
16
|
+
debug?: boolean;
|
|
17
|
+
};
|
|
18
|
+
type FarmMetadataImageResponseOptions = {
|
|
19
|
+
method?: string;
|
|
20
|
+
ifNoneMatch?: string | null;
|
|
21
|
+
};
|
|
22
|
+
/** @internal */
|
|
23
|
+
declare function createFarmMetadataImageResponse(value: unknown, imageModule: FarmMetadataImageModule, options?: FarmMetadataImageResponseOptions): Promise<Response>;
|
|
24
|
+
|
|
25
|
+
export { type FarmMetadataImageModule, type FarmMetadataImageResponseOptions, createFarmMetadataImageResponse };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Keep overlapping production operations on the production condition.
|
|
3
|
+
*
|
|
4
|
+
* The state lives on `globalThis` so independently loaded CJS/ESM copies of
|
|
5
|
+
* Farm share one refcount. The first entrant captures the caller's value and
|
|
6
|
+
* only the last operation to settle restores it.
|
|
7
|
+
*
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
declare function withProductionNodeEnv<T>(operation: () => T | PromiseLike<T>): Promise<T>;
|
|
11
|
+
|
|
12
|
+
export { withProductionNodeEnv };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Keep overlapping production operations on the production condition.
|
|
3
|
+
*
|
|
4
|
+
* The state lives on `globalThis` so independently loaded CJS/ESM copies of
|
|
5
|
+
* Farm share one refcount. The first entrant captures the caller's value and
|
|
6
|
+
* only the last operation to settle restores it.
|
|
7
|
+
*
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
declare function withProductionNodeEnv<T>(operation: () => T | PromiseLike<T>): Promise<T>;
|
|
11
|
+
|
|
12
|
+
export { withProductionNodeEnv };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
export { _runWithAfterRequest } from '../after.mjs';
|
|
2
|
+
import { R as ResolvedFarmServerConfig } from '../workflows-CusFV6mn.mjs';
|
|
3
|
+
export { b as bufferFarmRequestBody, c as createFarmRequestBodyErrorResponse, r as resolveFarmServerConfig } from '../workflows-CusFV6mn.mjs';
|
|
4
|
+
export { _ as _runWithCurrentRequest, g as getCurrentRequest } from '../request-7V0GaZK_.mjs';
|
|
5
|
+
export { configureFarmCache, createFarmCacheKey, getFarmDataCache, normalizeRevalidatePath } from '../cache.mjs';
|
|
6
|
+
export { c as createFarmLocaleCookie, g as getFarmLocaleVaryHeaders } from '../resolver-DJqjLMg_.mjs';
|
|
7
|
+
export { localizeFarmHref, localizeFarmPathname, stripFarmLocaleFromPathname } from '../i18n/index.mjs';
|
|
8
|
+
export { a as addMetadataImageReference, m as mergeMetadata, r as renderMetadataHead } from '../metadata-BxOJ4FJl.mjs';
|
|
9
|
+
export { _ as _runWithMiddlewareContext, b as _runWithMiddlewareData, a as applyProductionMiddlewareHeaders, c as createProductionMiddlewareRunner } from '../production-runtime-Bxua86uR.mjs';
|
|
10
|
+
export { g as getFarmRedirectError, i as isFarmNotFoundError, a as isFarmRedirectError } from '../navigation-errors-Dvwpzaer.mjs';
|
|
11
|
+
export { configureFarmObservability, emitFarmEvent } from '../observability.mjs';
|
|
12
|
+
import { F as FarmConfig, e as FarmContextFactoryInput } from '../client-plugins-QQntVkrv.mjs';
|
|
13
|
+
export { a4 as manageFarmDocumentPreloads, a5 as manageFarmHtmlPreloads, a6 as manageFarmLinkHeaderPreloads, a7 as reportFarmPreloadWarnings } from '../client-plugins-QQntVkrv.mjs';
|
|
14
|
+
import 'node:http';
|
|
15
|
+
import '../types-BMxWr97v.mjs';
|
|
16
|
+
import '../plugin-BJDf43dc.mjs';
|
|
17
|
+
import 'react';
|
|
18
|
+
import 'http';
|
|
19
|
+
import '../types-D1A6-XvH.mjs';
|
|
20
|
+
import 'db0';
|
|
21
|
+
import 'unstorage';
|
|
22
|
+
import '../integration-api-CHT2OKAf.mjs';
|
|
23
|
+
import '@farming-labs/orm';
|
|
24
|
+
import '../types-DTzm4TCl.mjs';
|
|
25
|
+
import '@farming-labs/docs';
|
|
26
|
+
import '../markdown.mjs';
|
|
27
|
+
import 'vite';
|
|
28
|
+
import '../cron.mjs';
|
|
29
|
+
import '../env.mjs';
|
|
30
|
+
import '../server-action-security.mjs';
|
|
31
|
+
import '../server-fn-error-DDh14a0V.mjs';
|
|
32
|
+
import '../image-config-Duob7wER.mjs';
|
|
33
|
+
import '../route-runtime-DoOHzCAD.mjs';
|
|
34
|
+
import '../font.mjs';
|
|
35
|
+
|
|
36
|
+
type FarmProductionLifecycleState = "starting" | "ready" | "draining" | "failed" | "closed";
|
|
37
|
+
interface FarmProductionLifecycleOptions {
|
|
38
|
+
server: ResolvedFarmServerConfig;
|
|
39
|
+
start?: () => void | Promise<void>;
|
|
40
|
+
close?: (reason: string) => void | Promise<void>;
|
|
41
|
+
}
|
|
42
|
+
interface FarmResponseCompletionContext {
|
|
43
|
+
onResponseFinished?: (callback: () => void) => void;
|
|
44
|
+
}
|
|
45
|
+
interface FarmProductionLifecycle {
|
|
46
|
+
readonly state: FarmProductionLifecycleState;
|
|
47
|
+
readonly activeRequests: number;
|
|
48
|
+
start(): Promise<void>;
|
|
49
|
+
beginDrain(reason?: string): void;
|
|
50
|
+
waitForIdle(timeoutMs?: number): Promise<boolean>;
|
|
51
|
+
close(reason?: string): Promise<void>;
|
|
52
|
+
handleHealthRequest(request: Request): Promise<Response | null>;
|
|
53
|
+
runRequest(handler: () => Response | Promise<Response>, context?: FarmResponseCompletionContext): Promise<Response>;
|
|
54
|
+
}
|
|
55
|
+
declare function createFarmProductionLifecycle(options: FarmProductionLifecycleOptions): FarmProductionLifecycle;
|
|
56
|
+
|
|
57
|
+
declare const FARM_ROUTE_CONTEXT_SYMBOL: unique symbol;
|
|
58
|
+
type FarmRouteContextCarrier<TContext = unknown> = {
|
|
59
|
+
[FARM_ROUTE_CONTEXT_SYMBOL]?: TContext;
|
|
60
|
+
};
|
|
61
|
+
declare function resolveFarmRouteContext(config: Pick<FarmConfig, "context">, input: FarmContextFactoryInput): Promise<unknown>;
|
|
62
|
+
declare function withFarmRouteContext<TProps extends object, TContext>(props: TProps, context: TContext | undefined): TProps & FarmRouteContextCarrier<TContext>;
|
|
63
|
+
|
|
64
|
+
declare function appendFarmLinkHeader(headers: Headers, value: string): void;
|
|
65
|
+
|
|
66
|
+
export { appendFarmLinkHeader, createFarmProductionLifecycle, resolveFarmRouteContext, withFarmRouteContext };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
export { _runWithAfterRequest } from '../after.js';
|
|
2
|
+
import { R as ResolvedFarmServerConfig } from '../workflows-CusFV6mn.js';
|
|
3
|
+
export { b as bufferFarmRequestBody, c as createFarmRequestBodyErrorResponse, r as resolveFarmServerConfig } from '../workflows-CusFV6mn.js';
|
|
4
|
+
export { _ as _runWithCurrentRequest, g as getCurrentRequest } from '../request-B5XYBv5a.js';
|
|
5
|
+
export { configureFarmCache, createFarmCacheKey, getFarmDataCache, normalizeRevalidatePath } from '../cache.js';
|
|
6
|
+
export { c as createFarmLocaleCookie, g as getFarmLocaleVaryHeaders } from '../resolver-IH4RmPEl.js';
|
|
7
|
+
export { localizeFarmHref, localizeFarmPathname, stripFarmLocaleFromPathname } from '../i18n/index.js';
|
|
8
|
+
export { a as addMetadataImageReference, m as mergeMetadata, r as renderMetadataHead } from '../metadata-B5jBJHq1.js';
|
|
9
|
+
export { _ as _runWithMiddlewareContext, b as _runWithMiddlewareData, a as applyProductionMiddlewareHeaders, c as createProductionMiddlewareRunner } from '../production-runtime-CZqXjRVi.js';
|
|
10
|
+
export { g as getFarmRedirectError, i as isFarmNotFoundError, a as isFarmRedirectError } from '../navigation-errors-Dvwpzaer.js';
|
|
11
|
+
export { configureFarmObservability, emitFarmEvent } from '../observability.js';
|
|
12
|
+
import { F as FarmConfig, e as FarmContextFactoryInput } from '../client-plugins-CbRum1fj.js';
|
|
13
|
+
export { a4 as manageFarmDocumentPreloads, a5 as manageFarmHtmlPreloads, a6 as manageFarmLinkHeaderPreloads, a7 as reportFarmPreloadWarnings } from '../client-plugins-CbRum1fj.js';
|
|
14
|
+
import 'node:http';
|
|
15
|
+
import '../types-BMxWr97v.js';
|
|
16
|
+
import '../plugin-BJDf43dc.js';
|
|
17
|
+
import 'react';
|
|
18
|
+
import 'http';
|
|
19
|
+
import '../types-D1A6-XvH.js';
|
|
20
|
+
import 'db0';
|
|
21
|
+
import 'unstorage';
|
|
22
|
+
import '../integration-api-CHT2OKAf.js';
|
|
23
|
+
import '@farming-labs/orm';
|
|
24
|
+
import '../types-DTzm4TCl.js';
|
|
25
|
+
import '@farming-labs/docs';
|
|
26
|
+
import '../markdown.js';
|
|
27
|
+
import 'vite';
|
|
28
|
+
import '../cron.js';
|
|
29
|
+
import '../env.js';
|
|
30
|
+
import '../server-action-security.js';
|
|
31
|
+
import '../server-fn-error-DDh14a0V.js';
|
|
32
|
+
import '../image-config-Duob7wER.js';
|
|
33
|
+
import '../route-runtime-DoOHzCAD.js';
|
|
34
|
+
import '../font.js';
|
|
35
|
+
|
|
36
|
+
type FarmProductionLifecycleState = "starting" | "ready" | "draining" | "failed" | "closed";
|
|
37
|
+
interface FarmProductionLifecycleOptions {
|
|
38
|
+
server: ResolvedFarmServerConfig;
|
|
39
|
+
start?: () => void | Promise<void>;
|
|
40
|
+
close?: (reason: string) => void | Promise<void>;
|
|
41
|
+
}
|
|
42
|
+
interface FarmResponseCompletionContext {
|
|
43
|
+
onResponseFinished?: (callback: () => void) => void;
|
|
44
|
+
}
|
|
45
|
+
interface FarmProductionLifecycle {
|
|
46
|
+
readonly state: FarmProductionLifecycleState;
|
|
47
|
+
readonly activeRequests: number;
|
|
48
|
+
start(): Promise<void>;
|
|
49
|
+
beginDrain(reason?: string): void;
|
|
50
|
+
waitForIdle(timeoutMs?: number): Promise<boolean>;
|
|
51
|
+
close(reason?: string): Promise<void>;
|
|
52
|
+
handleHealthRequest(request: Request): Promise<Response | null>;
|
|
53
|
+
runRequest(handler: () => Response | Promise<Response>, context?: FarmResponseCompletionContext): Promise<Response>;
|
|
54
|
+
}
|
|
55
|
+
declare function createFarmProductionLifecycle(options: FarmProductionLifecycleOptions): FarmProductionLifecycle;
|
|
56
|
+
|
|
57
|
+
declare const FARM_ROUTE_CONTEXT_SYMBOL: unique symbol;
|
|
58
|
+
type FarmRouteContextCarrier<TContext = unknown> = {
|
|
59
|
+
[FARM_ROUTE_CONTEXT_SYMBOL]?: TContext;
|
|
60
|
+
};
|
|
61
|
+
declare function resolveFarmRouteContext(config: Pick<FarmConfig, "context">, input: FarmContextFactoryInput): Promise<unknown>;
|
|
62
|
+
declare function withFarmRouteContext<TProps extends object, TContext>(props: TProps, context: TContext | undefined): TProps & FarmRouteContextCarrier<TContext>;
|
|
63
|
+
|
|
64
|
+
declare function appendFarmLinkHeader(headers: Headers, value: string): void;
|
|
65
|
+
|
|
66
|
+
export { appendFarmLinkHeader, createFarmProductionLifecycle, resolveFarmRouteContext, withFarmRouteContext };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Controls when Farm loads and hydrates a server-rendered client boundary.
|
|
3
|
+
*
|
|
4
|
+
* `load` is the compatibility-first default. The deferred strategies keep the
|
|
5
|
+
* server-rendered HTML visible while postponing the boundary's JavaScript.
|
|
6
|
+
*/
|
|
7
|
+
type FarmIslandStrategy = "load" | "interaction" | "visible" | "idle";
|
|
8
|
+
|
|
9
|
+
export type { FarmIslandStrategy as F };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Controls when Farm loads and hydrates a server-rendered client boundary.
|
|
3
|
+
*
|
|
4
|
+
* `load` is the compatibility-first default. The deferred strategies keep the
|
|
5
|
+
* server-rendered HTML visible while postponing the boundary's JavaScript.
|
|
6
|
+
*/
|
|
7
|
+
type FarmIslandStrategy = "load" | "interaction" | "visible" | "idle";
|
|
8
|
+
|
|
9
|
+
export type { FarmIslandStrategy as F };
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
type FarmMarkdownRouteInput = string | {
|
|
2
|
+
route: string;
|
|
3
|
+
title?: string;
|
|
4
|
+
cache?: number | false;
|
|
5
|
+
};
|
|
6
|
+
interface FarmMarkdownUserConfig {
|
|
7
|
+
/**
|
|
8
|
+
* Enable generated markdown representations for React pages.
|
|
9
|
+
* @default true
|
|
10
|
+
*/
|
|
11
|
+
enabled?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Routes that may expose generated markdown. Every page is exposed by default.
|
|
14
|
+
*/
|
|
15
|
+
expose?: boolean | FarmMarkdownRouteInput[];
|
|
16
|
+
/** @deprecated Use `expose`. */
|
|
17
|
+
routes?: FarmMarkdownRouteInput[];
|
|
18
|
+
cache?: number | false;
|
|
19
|
+
includeMetadata?: boolean;
|
|
20
|
+
}
|
|
21
|
+
interface FarmMarkdownResolvedRoute {
|
|
22
|
+
route: string;
|
|
23
|
+
title?: string;
|
|
24
|
+
cache?: number | false;
|
|
25
|
+
}
|
|
26
|
+
interface FarmMarkdownResolvedConfig {
|
|
27
|
+
enabled: boolean;
|
|
28
|
+
expose: true | FarmMarkdownResolvedRoute[];
|
|
29
|
+
cache: number | false;
|
|
30
|
+
includeMetadata: boolean;
|
|
31
|
+
}
|
|
32
|
+
interface FarmMarkdownMirrorTarget {
|
|
33
|
+
pathname: string;
|
|
34
|
+
route: FarmMarkdownResolvedRoute | null;
|
|
35
|
+
}
|
|
36
|
+
interface ResolveMarkdownMirrorTargetOptions {
|
|
37
|
+
accept?: string | null;
|
|
38
|
+
}
|
|
39
|
+
interface CreateMarkdownMirrorResponseOptions {
|
|
40
|
+
request: Request;
|
|
41
|
+
config?: FarmMarkdownResolvedConfig;
|
|
42
|
+
routeExists?: (pathname: string) => boolean;
|
|
43
|
+
renderPage: (request: Request) => Response | Promise<Response>;
|
|
44
|
+
}
|
|
45
|
+
interface ApplyMarkdownNegotiationHeadersOptions {
|
|
46
|
+
config?: FarmMarkdownResolvedConfig;
|
|
47
|
+
pathname: string;
|
|
48
|
+
}
|
|
49
|
+
declare function resolveMarkdownConfig(config: FarmMarkdownUserConfig | boolean | undefined): FarmMarkdownResolvedConfig;
|
|
50
|
+
declare function resolveMarkdownMirrorTarget(config: FarmMarkdownResolvedConfig | undefined, pathname: string, options?: ResolveMarkdownMirrorTargetOptions): FarmMarkdownMirrorTarget | null;
|
|
51
|
+
declare function createMarkdownMirrorResponse(options: CreateMarkdownMirrorResponseOptions): Promise<Response | null>;
|
|
52
|
+
declare function applyMarkdownNegotiationHeaders(response: Response, options: ApplyMarkdownNegotiationHeadersOptions): Response;
|
|
53
|
+
declare function htmlToMarkdown(html: string, options?: {
|
|
54
|
+
title?: string;
|
|
55
|
+
sourcePath?: string;
|
|
56
|
+
includeMetadata?: boolean;
|
|
57
|
+
}): string;
|
|
58
|
+
declare function requestAcceptsMarkdown(accept: string | null | undefined): boolean;
|
|
59
|
+
|
|
60
|
+
export { type ApplyMarkdownNegotiationHeadersOptions, type CreateMarkdownMirrorResponseOptions, type FarmMarkdownMirrorTarget, type FarmMarkdownResolvedConfig, type FarmMarkdownResolvedRoute, type FarmMarkdownRouteInput, type FarmMarkdownUserConfig, type ResolveMarkdownMirrorTargetOptions, applyMarkdownNegotiationHeaders, createMarkdownMirrorResponse, htmlToMarkdown, requestAcceptsMarkdown, resolveMarkdownConfig, resolveMarkdownMirrorTarget };
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
type FarmMarkdownRouteInput = string | {
|
|
2
|
+
route: string;
|
|
3
|
+
title?: string;
|
|
4
|
+
cache?: number | false;
|
|
5
|
+
};
|
|
6
|
+
interface FarmMarkdownUserConfig {
|
|
7
|
+
/**
|
|
8
|
+
* Enable generated markdown representations for React pages.
|
|
9
|
+
* @default true
|
|
10
|
+
*/
|
|
11
|
+
enabled?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Routes that may expose generated markdown. Every page is exposed by default.
|
|
14
|
+
*/
|
|
15
|
+
expose?: boolean | FarmMarkdownRouteInput[];
|
|
16
|
+
/** @deprecated Use `expose`. */
|
|
17
|
+
routes?: FarmMarkdownRouteInput[];
|
|
18
|
+
cache?: number | false;
|
|
19
|
+
includeMetadata?: boolean;
|
|
20
|
+
}
|
|
21
|
+
interface FarmMarkdownResolvedRoute {
|
|
22
|
+
route: string;
|
|
23
|
+
title?: string;
|
|
24
|
+
cache?: number | false;
|
|
25
|
+
}
|
|
26
|
+
interface FarmMarkdownResolvedConfig {
|
|
27
|
+
enabled: boolean;
|
|
28
|
+
expose: true | FarmMarkdownResolvedRoute[];
|
|
29
|
+
cache: number | false;
|
|
30
|
+
includeMetadata: boolean;
|
|
31
|
+
}
|
|
32
|
+
interface FarmMarkdownMirrorTarget {
|
|
33
|
+
pathname: string;
|
|
34
|
+
route: FarmMarkdownResolvedRoute | null;
|
|
35
|
+
}
|
|
36
|
+
interface ResolveMarkdownMirrorTargetOptions {
|
|
37
|
+
accept?: string | null;
|
|
38
|
+
}
|
|
39
|
+
interface CreateMarkdownMirrorResponseOptions {
|
|
40
|
+
request: Request;
|
|
41
|
+
config?: FarmMarkdownResolvedConfig;
|
|
42
|
+
routeExists?: (pathname: string) => boolean;
|
|
43
|
+
renderPage: (request: Request) => Response | Promise<Response>;
|
|
44
|
+
}
|
|
45
|
+
interface ApplyMarkdownNegotiationHeadersOptions {
|
|
46
|
+
config?: FarmMarkdownResolvedConfig;
|
|
47
|
+
pathname: string;
|
|
48
|
+
}
|
|
49
|
+
declare function resolveMarkdownConfig(config: FarmMarkdownUserConfig | boolean | undefined): FarmMarkdownResolvedConfig;
|
|
50
|
+
declare function resolveMarkdownMirrorTarget(config: FarmMarkdownResolvedConfig | undefined, pathname: string, options?: ResolveMarkdownMirrorTargetOptions): FarmMarkdownMirrorTarget | null;
|
|
51
|
+
declare function createMarkdownMirrorResponse(options: CreateMarkdownMirrorResponseOptions): Promise<Response | null>;
|
|
52
|
+
declare function applyMarkdownNegotiationHeaders(response: Response, options: ApplyMarkdownNegotiationHeadersOptions): Response;
|
|
53
|
+
declare function htmlToMarkdown(html: string, options?: {
|
|
54
|
+
title?: string;
|
|
55
|
+
sourcePath?: string;
|
|
56
|
+
includeMetadata?: boolean;
|
|
57
|
+
}): string;
|
|
58
|
+
declare function requestAcceptsMarkdown(accept: string | null | undefined): boolean;
|
|
59
|
+
|
|
60
|
+
export { type ApplyMarkdownNegotiationHeadersOptions, type CreateMarkdownMirrorResponseOptions, type FarmMarkdownMirrorTarget, type FarmMarkdownResolvedConfig, type FarmMarkdownResolvedRoute, type FarmMarkdownRouteInput, type FarmMarkdownUserConfig, type ResolveMarkdownMirrorTargetOptions, applyMarkdownNegotiationHeaders, createMarkdownMirrorResponse, htmlToMarkdown, requestAcceptsMarkdown, resolveMarkdownConfig, resolveMarkdownMirrorTarget };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { w as Metadata } from './client-plugins-CbRum1fj.js';
|
|
2
|
+
|
|
3
|
+
type MetadataImageKind = "opengraph" | "twitter";
|
|
4
|
+
interface FarmMetadataImageReference {
|
|
5
|
+
kind: MetadataImageKind;
|
|
6
|
+
href: string;
|
|
7
|
+
alt?: string;
|
|
8
|
+
width?: number;
|
|
9
|
+
height?: number;
|
|
10
|
+
contentType?: string;
|
|
11
|
+
}
|
|
12
|
+
interface RenderedMetadataHead {
|
|
13
|
+
title: string;
|
|
14
|
+
tags: string;
|
|
15
|
+
hasFavicon: boolean;
|
|
16
|
+
}
|
|
17
|
+
type MetadataRecord = Metadata & Record<string, any>;
|
|
18
|
+
declare function mergeMetadata(base: MetadataRecord | undefined, next: MetadataRecord | undefined): MetadataRecord;
|
|
19
|
+
declare function addMetadataImageReference(metadata: MetadataRecord, reference: FarmMetadataImageReference): MetadataRecord;
|
|
20
|
+
declare function renderMetadataHead(metadata: MetadataRecord | undefined): RenderedMetadataHead;
|
|
21
|
+
|
|
22
|
+
export { type MetadataImageKind as M, addMetadataImageReference as a, mergeMetadata as m, renderMetadataHead as r };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { w as Metadata } from './client-plugins-QQntVkrv.mjs';
|
|
2
|
+
|
|
3
|
+
type MetadataImageKind = "opengraph" | "twitter";
|
|
4
|
+
interface FarmMetadataImageReference {
|
|
5
|
+
kind: MetadataImageKind;
|
|
6
|
+
href: string;
|
|
7
|
+
alt?: string;
|
|
8
|
+
width?: number;
|
|
9
|
+
height?: number;
|
|
10
|
+
contentType?: string;
|
|
11
|
+
}
|
|
12
|
+
interface RenderedMetadataHead {
|
|
13
|
+
title: string;
|
|
14
|
+
tags: string;
|
|
15
|
+
hasFavicon: boolean;
|
|
16
|
+
}
|
|
17
|
+
type MetadataRecord = Metadata & Record<string, any>;
|
|
18
|
+
declare function mergeMetadata(base: MetadataRecord | undefined, next: MetadataRecord | undefined): MetadataRecord;
|
|
19
|
+
declare function addMetadataImageReference(metadata: MetadataRecord, reference: FarmMetadataImageReference): MetadataRecord;
|
|
20
|
+
declare function renderMetadataHead(metadata: MetadataRecord | undefined): RenderedMetadataHead;
|
|
21
|
+
|
|
22
|
+
export { type MetadataImageKind as M, addMetadataImageReference as a, mergeMetadata as m, renderMetadataHead as r };
|
package/dist/middleware.cjs
CHANGED
|
@@ -968,6 +968,13 @@ function normalizePathname(pathname) {
|
|
|
968
968
|
}
|
|
969
969
|
__name(normalizePathname, "normalizePathname");
|
|
970
970
|
|
|
971
|
+
// src/cli-colors.ts
|
|
972
|
+
var import_picocolors = __toESM(require("picocolors"));
|
|
973
|
+
function createCliColors(interactive = process.stdout.isTTY === true) {
|
|
974
|
+
return import_picocolors.default.createColors(interactive);
|
|
975
|
+
}
|
|
976
|
+
__name(createCliColors, "createCliColors");
|
|
977
|
+
|
|
971
978
|
// src/middleware/manager.ts
|
|
972
979
|
function isMiddlewareResponse(value) {
|
|
973
980
|
return value instanceof Response;
|
|
@@ -1125,23 +1132,16 @@ var _MiddlewareManager = class _MiddlewareManager {
|
|
|
1125
1132
|
if (applicable.length === 0) {
|
|
1126
1133
|
return false;
|
|
1127
1134
|
}
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
].join(" ");
|
|
1139
|
-
console.log(log);
|
|
1140
|
-
} catch {
|
|
1141
|
-
console.log(
|
|
1142
|
-
`[FARM] [MIDDLEWARE] [${method}] Executing ${pathname} (${applicable.length} middleware)`
|
|
1143
|
-
);
|
|
1144
|
-
}
|
|
1135
|
+
const pc = createCliColors();
|
|
1136
|
+
const log = [
|
|
1137
|
+
pc.dim("[") + pc.bold(pc.blue("FARM")) + pc.dim("]"),
|
|
1138
|
+
pc.dim("[") + pc.bold(pc.magenta("MIDDLEWARE")) + pc.dim("]"),
|
|
1139
|
+
pc.dim("[") + pc.bold(pc.white(method.padEnd(3))) + pc.dim("]"),
|
|
1140
|
+
pc.gray("Executing middleware: "),
|
|
1141
|
+
pc.gray(pathname),
|
|
1142
|
+
pc.dim(` (${(Date.now() - startTime).toFixed(2)}ms)`)
|
|
1143
|
+
].join(" ");
|
|
1144
|
+
console.log(log);
|
|
1145
1145
|
for (const entry of applicable) {
|
|
1146
1146
|
const { mw, routeMatch } = entry;
|
|
1147
1147
|
const configMatch = mw.config ? this.matchesConfig(routePathname, mw.config, ctx) : { matched: true };
|