@farm.js/core 0.1.25 → 0.1.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent-runtime.d.mts +2 -2
- package/dist/agent-runtime.d.ts +2 -2
- package/dist/api/route-manager.d.mts +2 -2
- package/dist/api/route-manager.d.ts +2 -2
- package/dist/api.d.mts +3 -3
- package/dist/api.d.ts +3 -3
- package/dist/{app-ZuWrAMc_.d.mts → app-29vG5tmY.d.mts} +3 -3
- package/dist/{app-BF-ctoxh.d.ts → app-Cx71s_PT.d.ts} +3 -3
- package/dist/app-markdown.cjs +6 -4
- package/dist/app-markdown.d.mts +3 -3
- package/dist/app-markdown.d.ts +3 -3
- package/dist/app-markdown.mjs +5 -3
- package/dist/{chunk-E3RDL2DA.cjs → chunk-2CT6XUNO.cjs} +61 -31
- package/dist/{chunk-R7LCG3BT.cjs → chunk-3TQG7CGC.cjs} +84 -77
- package/dist/{chunk-AXYTGLF3.cjs → chunk-3WSWXPYM.cjs} +4 -4
- package/dist/{chunk-2BIJGZR3.mjs → chunk-74RZNRY6.mjs} +1 -1
- package/dist/{chunk-TTVHACQV.cjs → chunk-ALIFMS4A.cjs} +1 -1
- package/dist/{chunk-T2OPSH6S.mjs → chunk-ARXCHQLX.mjs} +9 -2
- package/dist/{chunk-2KI3CL3N.mjs → chunk-DU2CASV6.mjs} +1 -1
- package/dist/chunk-J63ZH5OQ.cjs +62 -0
- package/dist/{chunk-XM4ZDVD7.mjs → chunk-JM5GQL4H.mjs} +1 -1
- package/dist/{chunk-6VEHUKZ2.mjs → chunk-MM5D6VLP.mjs} +4 -20
- package/dist/chunk-MVL2RAJW.mjs +62 -0
- package/dist/{chunk-YA6LLTIJ.cjs → chunk-ND224OE2.cjs} +4 -20
- package/dist/{chunk-XME4TCLB.mjs → chunk-OFKG57MZ.mjs} +2 -2
- package/dist/{chunk-U4MP7XTD.mjs → chunk-OOIL3BWR.mjs} +168 -16
- package/dist/{chunk-WOI2HOGA.mjs → chunk-PPIW3MH6.mjs} +1 -1
- package/dist/{chunk-2ITKVAIF.cjs → chunk-QIH2HD6H.cjs} +191 -39
- package/dist/{chunk-65P6OGYN.cjs → chunk-QJ4D3UKJ.cjs} +10 -3
- package/dist/{chunk-RYDW7GPR.cjs → chunk-QLXEYIAW.cjs} +13 -13
- package/dist/{chunk-WJYCI56T.mjs → chunk-QPPQHB6X.mjs} +43 -30
- package/dist/{chunk-RR6UGYUT.mjs → chunk-RAI7NULA.mjs} +39 -9
- package/dist/{chunk-6K4SPQWL.cjs → chunk-RCYINC4A.cjs} +3 -3
- package/dist/{chunk-QYMRIVG6.cjs → chunk-SZ4LYNUX.cjs} +110 -97
- package/dist/{chunk-N2Z4ZFDE.mjs → chunk-UXQXGB5A.mjs} +19 -12
- package/dist/{chunk-CFNOGDUS.cjs → chunk-W2HZKYES.cjs} +2 -2
- package/dist/{chunk-O5DVPF3R.cjs → chunk-WFPRVVF2.cjs} +10 -10
- package/dist/{chunk-5YYJ6Q2L.mjs → chunk-YMUH2BLR.mjs} +2 -2
- package/dist/{client-plugins-DPG0NeZN.d.mts → client-plugins-B8RPJnot.d.mts} +90 -3
- package/dist/{client-plugins-Fgni-_25.d.ts → client-plugins-bPBf4haK.d.ts} +90 -3
- package/dist/client-plugins.d.mts +2 -2
- package/dist/client-plugins.d.ts +2 -2
- package/dist/client.d.mts +6 -6
- package/dist/client.d.ts +6 -6
- package/dist/config.d.mts +2 -2
- package/dist/config.d.ts +2 -2
- package/dist/{devtools-I7TBFOKD.mjs → devtools-5D4ZDRPR.mjs} +5 -3
- package/dist/{devtools-6OA7FEF6.cjs → devtools-QZJEUOJW.cjs} +6 -4
- package/dist/docs.cjs +8 -6
- package/dist/docs.mjs +7 -5
- package/dist/index.cjs +17 -13
- package/dist/index.d.mts +13 -13
- package/dist/index.d.ts +13 -13
- package/dist/index.mjs +16 -12
- package/dist/integrations.d.mts +2 -2
- package/dist/integrations.d.ts +2 -2
- package/dist/internal/app-markdown-runtime.cjs +5 -3
- package/dist/internal/app-markdown-runtime.d.mts +2 -2
- package/dist/internal/app-markdown-runtime.d.ts +2 -2
- package/dist/internal/app-markdown-runtime.mjs +4 -2
- package/dist/internal/build-runtime.cjs +14 -13
- package/dist/internal/build-runtime.d.mts +4 -4
- package/dist/internal/build-runtime.d.ts +4 -4
- package/dist/internal/build-runtime.mjs +13 -12
- package/dist/internal/cli-runtime.cjs +6 -5
- package/dist/internal/cli-runtime.mjs +5 -4
- package/dist/internal/client-error-overlay.cjs +4 -4
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/compression-runtime.d.mts +2 -2
- package/dist/internal/compression-runtime.d.ts +2 -2
- package/dist/internal/config-runtime.cjs +6 -4
- package/dist/internal/config-runtime.d.mts +3 -3
- package/dist/internal/config-runtime.d.ts +3 -3
- package/dist/internal/config-runtime.mjs +5 -3
- package/dist/internal/infra-analytics-runtime.cjs +4 -3
- package/dist/internal/infra-analytics-runtime.mjs +2 -1
- package/dist/internal/product-telemetry-runtime.cjs +2 -2
- package/dist/internal/product-telemetry-runtime.mjs +1 -1
- package/dist/internal/production-runtime.cjs +5 -4
- package/dist/internal/production-runtime.d.mts +11 -9
- package/dist/internal/production-runtime.d.ts +11 -9
- package/dist/internal/production-runtime.mjs +4 -3
- package/dist/markdown.cjs +4 -2
- package/dist/markdown.mjs +3 -1
- package/dist/{metadata-D0EF7esB.d.mts → metadata-C3na4CBj.d.mts} +1 -1
- package/dist/{metadata-CDnRHKVq.d.ts → metadata-CzBP4Mfp.d.ts} +1 -1
- package/dist/middleware.d.mts +4 -4
- package/dist/middleware.d.ts +4 -4
- package/dist/navigation.d.mts +5 -5
- package/dist/navigation.d.ts +5 -5
- package/dist/observability-BupkiN0m.d.mts +447 -0
- package/dist/observability-BupkiN0m.d.ts +447 -0
- package/dist/observability.d.mts +2 -417
- package/dist/observability.d.ts +2 -417
- package/dist/plugin.cjs +9 -8
- package/dist/plugin.d.mts +2 -2
- package/dist/plugin.d.ts +2 -2
- package/dist/plugin.mjs +8 -7
- package/dist/{production-runtime-DpCt0opU.d.ts → production-runtime-CYg4wM4E.d.ts} +1 -1
- package/dist/{production-runtime-x3W4wVqx.d.mts → production-runtime-DP94hPGe.d.mts} +1 -1
- package/dist/{render-plan-D5oFRVBV.d.ts → render-plan-Bl6Fzg5z.d.ts} +1 -1
- package/dist/{render-plan-tazUJalK.d.mts → render-plan-CKAJg0jC.d.mts} +1 -1
- package/dist/renderer-client.d.mts +4 -4
- package/dist/renderer-client.d.ts +4 -4
- package/dist/{request-CzZX0Aew.d.ts → request-CR-Bp1Px.d.ts} +1 -1
- package/dist/{request-CXmQy5ks.d.mts → request-CrBCcPZZ.d.mts} +1 -1
- package/dist/request.d.mts +3 -3
- package/dist/request.d.ts +3 -3
- package/dist/{route-rendering-B-qpe32B.d.mts → route-rendering-C1NAHo-C.d.mts} +1 -1
- package/dist/{route-rendering-Dw3C362T.d.ts → route-rendering-CZH5FegB.d.ts} +1 -1
- package/dist/{router-CafM2jlw.d.mts → router-B57eDJ3u.d.mts} +1 -1
- package/dist/{router-CLl3xHwl.d.ts → router-Cg_kD3Bd.d.ts} +1 -1
- package/dist/routes.d.mts +2 -2
- package/dist/routes.d.ts +2 -2
- package/dist/server-plugins.d.mts +3 -3
- package/dist/server-plugins.d.ts +3 -3
- package/dist/server.cjs +159 -102
- package/dist/server.d.mts +8 -8
- package/dist/server.d.ts +8 -8
- package/dist/server.mjs +140 -83
- package/dist/{spa-router-DePr2aZ6.d.ts → spa-router-BstQUO6Q.d.ts} +2 -2
- package/dist/{spa-router-6sJfsMlQ.d.mts → spa-router-DTdbuinx.d.mts} +2 -2
- package/dist/testing.d.mts +2 -2
- package/dist/testing.d.ts +2 -2
- package/dist/{utils-BPHr-1mP.d.mts → utils-CS3ZLnEJ.d.mts} +1 -1
- package/dist/{utils-BBKC3cf3.d.ts → utils-D3rdsIvM.d.ts} +1 -1
- package/dist/version.cjs +2 -2
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +9 -8
- package/dist/vite.d.mts +2 -2
- package/dist/vite.d.ts +2 -2
- package/dist/vite.mjs +8 -7
- package/package.json +1 -1
package/dist/agent-runtime.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChildProcess } from 'node:child_process';
|
|
2
|
-
import { D as BundleResultPayload, a as FarmPlugin, E as FarmIntegration } from './client-plugins-
|
|
2
|
+
import { D as BundleResultPayload, a as FarmPlugin, E as FarmIntegration } from './client-plugins-B8RPJnot.mjs';
|
|
3
3
|
import './lifecycle-DK06VuKP.mjs';
|
|
4
4
|
import './route-B0XrsrFk.mjs';
|
|
5
5
|
import './endpoint-DAc96i93.mjs';
|
|
@@ -17,7 +17,7 @@ import './integration-api-BbaiokCC.mjs';
|
|
|
17
17
|
import '@farming-labs/orm';
|
|
18
18
|
import './types-DFbjpjXX.mjs';
|
|
19
19
|
import '@farming-labs/docs';
|
|
20
|
-
import './observability.mjs';
|
|
20
|
+
import './observability-BupkiN0m.mjs';
|
|
21
21
|
import '@opentelemetry/api';
|
|
22
22
|
import 'vite';
|
|
23
23
|
import './workflows-CR9ex-gz.mjs';
|
package/dist/agent-runtime.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChildProcess } from 'node:child_process';
|
|
2
|
-
import { D as BundleResultPayload, a as FarmPlugin, E as FarmIntegration } from './client-plugins-
|
|
2
|
+
import { D as BundleResultPayload, a as FarmPlugin, E as FarmIntegration } from './client-plugins-bPBf4haK.js';
|
|
3
3
|
import './lifecycle-DK06VuKP.js';
|
|
4
4
|
import './route-DOEpbyWZ.js';
|
|
5
5
|
import './endpoint-1zA994xL.js';
|
|
@@ -17,7 +17,7 @@ import './integration-api-BbaiokCC.js';
|
|
|
17
17
|
import '@farming-labs/orm';
|
|
18
18
|
import './types-DFbjpjXX.js';
|
|
19
19
|
import '@farming-labs/docs';
|
|
20
|
-
import './observability.js';
|
|
20
|
+
import './observability-BupkiN0m.js';
|
|
21
21
|
import '@opentelemetry/api';
|
|
22
22
|
import 'vite';
|
|
23
23
|
import './workflows-CR9ex-gz.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as FarmRouteRuntimeConfig, a as FarmPlugin } from '../client-plugins-
|
|
1
|
+
import { F as FarmRouteRuntimeConfig, a as FarmPlugin } from '../client-plugins-B8RPJnot.mjs';
|
|
2
2
|
import { ViteDevServer } from 'vite';
|
|
3
3
|
import '../types-Z0aotQ8w.mjs';
|
|
4
4
|
import { F as FarmI18nRuntime } from '../runtime-AOJge4vQ.mjs';
|
|
@@ -22,7 +22,7 @@ import '../integration-api-BbaiokCC.mjs';
|
|
|
22
22
|
import '@farming-labs/orm';
|
|
23
23
|
import '../types-DFbjpjXX.mjs';
|
|
24
24
|
import '@farming-labs/docs';
|
|
25
|
-
import '../observability.mjs';
|
|
25
|
+
import '../observability-BupkiN0m.mjs';
|
|
26
26
|
import '@opentelemetry/api';
|
|
27
27
|
import '../workflows-CR9ex-gz.mjs';
|
|
28
28
|
import '../cron.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as FarmRouteRuntimeConfig, a as FarmPlugin } from '../client-plugins-
|
|
1
|
+
import { F as FarmRouteRuntimeConfig, a as FarmPlugin } from '../client-plugins-bPBf4haK.js';
|
|
2
2
|
import { ViteDevServer } from 'vite';
|
|
3
3
|
import '../types-Z0aotQ8w.js';
|
|
4
4
|
import { F as FarmI18nRuntime } from '../runtime-BirxPwbZ.js';
|
|
@@ -22,7 +22,7 @@ import '../integration-api-BbaiokCC.js';
|
|
|
22
22
|
import '@farming-labs/orm';
|
|
23
23
|
import '../types-DFbjpjXX.js';
|
|
24
24
|
import '@farming-labs/docs';
|
|
25
|
-
import '../observability.js';
|
|
25
|
+
import '../observability-BupkiN0m.js';
|
|
26
26
|
import '@opentelemetry/api';
|
|
27
27
|
import '../workflows-CR9ex-gz.js';
|
|
28
28
|
import '../cron.js';
|
package/dist/api.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export { A as AnyEndpointMiddleware, D as DELETE, k as EndpointErrorContracts, h as EndpointErrorDefinition, j as EndpointErrorDefinitions, l as EndpointErrorHandler, g as EndpointErrorSchema, m as EndpointFail, e as EndpointFailure, w as EndpointHandler, t as EndpointInvalidationContext, s as EndpointInvalidationTarget, u as EndpointInvalidations, d as EndpointMCPMetadata, b as EndpointMCPOptions, r as EndpointMiddleware, q as EndpointMiddlewareContext, E as EndpointMiddlewareResult, f as EndpointOpenAPIMetadata, v as EndpointOptions, n as EndpointParamValue, o as EndpointParams, K as FarmAPIStream, J as FarmStreamResponse, G as GET, H as HEAD, I as InferEndpointMiddlewareContext, M as MultipartField, F as MultipartSchema, B as MultipartValues, O as OPTIONS, z as PATCH, P as POST, y as PUT, Q as QUERY, T as TypedEndpoint, C as TypedFormData, x as createEndpoint, i as isEndpointFailure, X as isFarmAPIStream, V as isJSONStreamResponse, N as isMultipartSchema, U as jsonStream, L as multipart, W as readJSONStream, S as toFormData } from './endpoint-DAc96i93.mjs';
|
|
2
2
|
export { APIRoute, APIRouteConflictError, APIRouteHandlerOptions, APIRouteManager, APIRouteManagerOptions } from './api/route-manager.mjs';
|
|
3
3
|
export { v as APIClient, h as APIClientError, b as APIClientOptions, i as APIClientSystemError, c as APIClientWithoutIntegrationsOptions, s as APIQueryPrimitive, t as APIQueryValue, g as APIResult, K as APIRouteManifest, A as APIRouteRefMetadata, x as ApiClients, C as CacheKey, n as CacheOptions, l as CachePolicy, m as CacheScope, r as ClientOptions, a as FARM_API_ROUTE_META_SYMBOL, F as FARM_API_ROUTE_REF_SYMBOL, p as InvalidateOptions, I as InvalidateTarget, q as OptimisticOptions, O as OptimisticUpdate, j as RequestEvent, k as ResponseEvent, o as RetryAttemptContext, R as RetryOptions, u as RouteAPIClient, w as ServerAPIClient, S as ServerAPIClientOptions, d as ServerAPIClientWithoutIntegrationsOptions, f as StatusEvent, e as StatusPhase, G as applyServerFnOptimisticUpdates, z as createAPIClient, y as createApiClients, E as createServerAPIClient, D as getAPIRouteRefMetadata, B as isAPIRouteRef, J as resolveServerFnInvalidateTargets, H as settleServerFnOptimisticUpdates } from './api-client-Cx54IR5g.mjs';
|
|
4
|
-
import { ay as ResolvedFarmAPIConfig } from './client-plugins-
|
|
5
|
-
export {
|
|
4
|
+
import { ay as ResolvedFarmAPIConfig } from './client-plugins-B8RPJnot.mjs';
|
|
5
|
+
export { es as DEFAULT_FARM_API_BASE_PATH, ev as FarmAPIConfig, et as FarmAPIConfigResolverContext, eu as FarmAPIConfigValue, ez as getFarmAPIBaseURL, ey as normalizeFarmAPIBasePath, ex as normalizeFarmAPIConfig, ew as resolveFarmAPIConfig, eA as resolveFarmAPIRequestURL } from './client-plugins-B8RPJnot.mjs';
|
|
6
6
|
import { Plugin } from 'vite';
|
|
7
7
|
export { k as PluginAPIRouter, i as PluginLocalAPI, h as PluginLocalAPIEndpoint, g as PluginRoutes, P as PluginRoutesFactory, d as RouteDefinition, f as RouteFactory, b as RouteInputSchemas, c as RouteJSON, R as RouteMethod, e as RouteOptions, a as RoutePathParams, j as createRouteFactory, r as resolvePluginRoutes } from './route-B0XrsrFk.mjs';
|
|
8
8
|
export { API_ROUTE_METHODS, getAllowedAPIRouteMethods, invokeAPIRouteEndpoint, isWebResponse, normalizeRouteResponse, resolveAPIRouteEndpoint } from './api/runtime.mjs';
|
|
@@ -25,7 +25,7 @@ import './integration-api-BbaiokCC.mjs';
|
|
|
25
25
|
import '@farming-labs/orm';
|
|
26
26
|
import './types-DFbjpjXX.mjs';
|
|
27
27
|
import '@farming-labs/docs';
|
|
28
|
-
import './observability.mjs';
|
|
28
|
+
import './observability-BupkiN0m.mjs';
|
|
29
29
|
import '@opentelemetry/api';
|
|
30
30
|
import './workflows-CR9ex-gz.mjs';
|
|
31
31
|
import './cron.mjs';
|
package/dist/api.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export { A as AnyEndpointMiddleware, D as DELETE, k as EndpointErrorContracts, h as EndpointErrorDefinition, j as EndpointErrorDefinitions, l as EndpointErrorHandler, g as EndpointErrorSchema, m as EndpointFail, e as EndpointFailure, w as EndpointHandler, t as EndpointInvalidationContext, s as EndpointInvalidationTarget, u as EndpointInvalidations, d as EndpointMCPMetadata, b as EndpointMCPOptions, r as EndpointMiddleware, q as EndpointMiddlewareContext, E as EndpointMiddlewareResult, f as EndpointOpenAPIMetadata, v as EndpointOptions, n as EndpointParamValue, o as EndpointParams, K as FarmAPIStream, J as FarmStreamResponse, G as GET, H as HEAD, I as InferEndpointMiddlewareContext, M as MultipartField, F as MultipartSchema, B as MultipartValues, O as OPTIONS, z as PATCH, P as POST, y as PUT, Q as QUERY, T as TypedEndpoint, C as TypedFormData, x as createEndpoint, i as isEndpointFailure, X as isFarmAPIStream, V as isJSONStreamResponse, N as isMultipartSchema, U as jsonStream, L as multipart, W as readJSONStream, S as toFormData } from './endpoint-1zA994xL.js';
|
|
2
2
|
export { APIRoute, APIRouteConflictError, APIRouteHandlerOptions, APIRouteManager, APIRouteManagerOptions } from './api/route-manager.js';
|
|
3
3
|
export { v as APIClient, h as APIClientError, b as APIClientOptions, i as APIClientSystemError, c as APIClientWithoutIntegrationsOptions, s as APIQueryPrimitive, t as APIQueryValue, g as APIResult, K as APIRouteManifest, A as APIRouteRefMetadata, x as ApiClients, C as CacheKey, n as CacheOptions, l as CachePolicy, m as CacheScope, r as ClientOptions, a as FARM_API_ROUTE_META_SYMBOL, F as FARM_API_ROUTE_REF_SYMBOL, p as InvalidateOptions, I as InvalidateTarget, q as OptimisticOptions, O as OptimisticUpdate, j as RequestEvent, k as ResponseEvent, o as RetryAttemptContext, R as RetryOptions, u as RouteAPIClient, w as ServerAPIClient, S as ServerAPIClientOptions, d as ServerAPIClientWithoutIntegrationsOptions, f as StatusEvent, e as StatusPhase, G as applyServerFnOptimisticUpdates, z as createAPIClient, y as createApiClients, E as createServerAPIClient, D as getAPIRouteRefMetadata, B as isAPIRouteRef, J as resolveServerFnInvalidateTargets, H as settleServerFnOptimisticUpdates } from './api-client-DykpaKcY.js';
|
|
4
|
-
import { ay as ResolvedFarmAPIConfig } from './client-plugins-
|
|
5
|
-
export {
|
|
4
|
+
import { ay as ResolvedFarmAPIConfig } from './client-plugins-bPBf4haK.js';
|
|
5
|
+
export { es as DEFAULT_FARM_API_BASE_PATH, ev as FarmAPIConfig, et as FarmAPIConfigResolverContext, eu as FarmAPIConfigValue, ez as getFarmAPIBaseURL, ey as normalizeFarmAPIBasePath, ex as normalizeFarmAPIConfig, ew as resolveFarmAPIConfig, eA as resolveFarmAPIRequestURL } from './client-plugins-bPBf4haK.js';
|
|
6
6
|
import { Plugin } from 'vite';
|
|
7
7
|
export { k as PluginAPIRouter, i as PluginLocalAPI, h as PluginLocalAPIEndpoint, g as PluginRoutes, P as PluginRoutesFactory, d as RouteDefinition, f as RouteFactory, b as RouteInputSchemas, c as RouteJSON, R as RouteMethod, e as RouteOptions, a as RoutePathParams, j as createRouteFactory, r as resolvePluginRoutes } from './route-DOEpbyWZ.js';
|
|
8
8
|
export { API_ROUTE_METHODS, getAllowedAPIRouteMethods, invokeAPIRouteEndpoint, isWebResponse, normalizeRouteResponse, resolveAPIRouteEndpoint } from './api/runtime.js';
|
|
@@ -25,7 +25,7 @@ import './integration-api-BbaiokCC.js';
|
|
|
25
25
|
import '@farming-labs/orm';
|
|
26
26
|
import './types-DFbjpjXX.js';
|
|
27
27
|
import '@farming-labs/docs';
|
|
28
|
-
import './observability.js';
|
|
28
|
+
import './observability-BupkiN0m.js';
|
|
29
29
|
import '@opentelemetry/api';
|
|
30
30
|
import './workflows-CR9ex-gz.js';
|
|
31
31
|
import './cron.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { G as FarmConfig, P as ParsedRoute, aw as ResolvedFarmRouteRuntimeConfig, ax as ApplicationMetadataRouteKind, s as RouteModule, a8 as LayoutModule, ad as SSGCollectionResult, e as FarmRequest, f as FarmResponse, ay as ResolvedFarmAPIConfig, u as FarmMdxResolvedConfig, az as ResolvedFarmDevtoolsConfig, aA as ResolvedFarmDevIndicatorsConfig, aB as ResolvedFarmAuthConfig, aC as ResolvedFarmPerformanceConfig, aD as ResolvedFarmSecurityConfig } from './client-plugins-
|
|
1
|
+
import { G as FarmConfig, P as ParsedRoute, aw as ResolvedFarmRouteRuntimeConfig, ax as ApplicationMetadataRouteKind, s as RouteModule, a8 as LayoutModule, ad as SSGCollectionResult, e as FarmRequest, f as FarmResponse, ay as ResolvedFarmAPIConfig, u as FarmMdxResolvedConfig, az as ResolvedFarmDevtoolsConfig, aA as ResolvedFarmDevIndicatorsConfig, aB as ResolvedFarmAuthConfig, aC as ResolvedFarmPerformanceConfig, aD as ResolvedFarmSecurityConfig } from './client-plugins-B8RPJnot.mjs';
|
|
2
2
|
import { F as FarmDocsResolvedConfig } from './types-DFbjpjXX.mjs';
|
|
3
3
|
import { FarmMarkdownResolvedConfig } from './markdown.mjs';
|
|
4
4
|
import { F as FarmWorkflowsResolvedConfig } from './workflows-CR9ex-gz.mjs';
|
|
@@ -7,9 +7,9 @@ import { R as ResolvedFarmImageConfig } from './image-config-Duob7wER.mjs';
|
|
|
7
7
|
import { ProgrammaticRedirectRoute, ProgrammaticRouteSearchClientOptions } from './routes.mjs';
|
|
8
8
|
import { ViteDevServer } from 'vite';
|
|
9
9
|
import { F as FarmIslandStrategy } from './island-CfGru1MO.mjs';
|
|
10
|
-
import { M as MetadataImageKind } from './metadata-
|
|
10
|
+
import { M as MetadataImageKind } from './metadata-C3na4CBj.mjs';
|
|
11
11
|
import { FarmServerRendererRuntime, FarmRenderer } from './renderer.mjs';
|
|
12
|
-
import { F as FarmRouteRenderPlan } from './render-plan-
|
|
12
|
+
import { F as FarmRouteRenderPlan } from './render-plan-CKAJg0jC.mjs';
|
|
13
13
|
import { R as ResolvedFarmI18nConfig } from './types-Z0aotQ8w.mjs';
|
|
14
14
|
import { F as FarmI18nRuntime } from './runtime-AOJge4vQ.mjs';
|
|
15
15
|
import { R as ResolvedFarmThemeConfig } from './types-DQnyD3VD.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { G as FarmConfig, P as ParsedRoute, aw as ResolvedFarmRouteRuntimeConfig, ax as ApplicationMetadataRouteKind, s as RouteModule, a8 as LayoutModule, ad as SSGCollectionResult, e as FarmRequest, f as FarmResponse, ay as ResolvedFarmAPIConfig, u as FarmMdxResolvedConfig, az as ResolvedFarmDevtoolsConfig, aA as ResolvedFarmDevIndicatorsConfig, aB as ResolvedFarmAuthConfig, aC as ResolvedFarmPerformanceConfig, aD as ResolvedFarmSecurityConfig } from './client-plugins-
|
|
1
|
+
import { G as FarmConfig, P as ParsedRoute, aw as ResolvedFarmRouteRuntimeConfig, ax as ApplicationMetadataRouteKind, s as RouteModule, a8 as LayoutModule, ad as SSGCollectionResult, e as FarmRequest, f as FarmResponse, ay as ResolvedFarmAPIConfig, u as FarmMdxResolvedConfig, az as ResolvedFarmDevtoolsConfig, aA as ResolvedFarmDevIndicatorsConfig, aB as ResolvedFarmAuthConfig, aC as ResolvedFarmPerformanceConfig, aD as ResolvedFarmSecurityConfig } from './client-plugins-bPBf4haK.js';
|
|
2
2
|
import { F as FarmDocsResolvedConfig } from './types-DFbjpjXX.js';
|
|
3
3
|
import { FarmMarkdownResolvedConfig } from './markdown.js';
|
|
4
4
|
import { F as FarmWorkflowsResolvedConfig } from './workflows-CR9ex-gz.js';
|
|
@@ -7,9 +7,9 @@ import { R as ResolvedFarmImageConfig } from './image-config-Duob7wER.js';
|
|
|
7
7
|
import { ProgrammaticRedirectRoute, ProgrammaticRouteSearchClientOptions } from './routes.js';
|
|
8
8
|
import { ViteDevServer } from 'vite';
|
|
9
9
|
import { F as FarmIslandStrategy } from './island-CfGru1MO.js';
|
|
10
|
-
import { M as MetadataImageKind } from './metadata-
|
|
10
|
+
import { M as MetadataImageKind } from './metadata-CzBP4Mfp.js';
|
|
11
11
|
import { FarmServerRendererRuntime, FarmRenderer } from './renderer.js';
|
|
12
|
-
import { F as FarmRouteRenderPlan } from './render-plan-
|
|
12
|
+
import { F as FarmRouteRenderPlan } from './render-plan-Bl6Fzg5z.js';
|
|
13
13
|
import { R as ResolvedFarmI18nConfig } from './types-Z0aotQ8w.js';
|
|
14
14
|
import { F as FarmI18nRuntime } from './runtime-BirxPwbZ.js';
|
|
15
15
|
import { R as ResolvedFarmThemeConfig } from './types-DQnyD3VD.js';
|
package/dist/app-markdown.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkW2HZKYEScjs = require('./chunk-W2HZKYES.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
@@ -10,7 +10,7 @@ var _chunkCFNOGDUScjs = require('./chunk-CFNOGDUS.cjs');
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _chunkRCYINC4Acjs = require('./chunk-RCYINC4A.cjs');
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
@@ -19,7 +19,9 @@ var _chunkOHY2ZWUGcjs = require('./chunk-OHY2ZWUG.cjs');
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _chunkQIH2HD6Hcjs = require('./chunk-QIH2HD6H.cjs');
|
|
23
|
+
require('./chunk-J63ZH5OQ.cjs');
|
|
24
|
+
require('./chunk-E3UK5IIB.cjs');
|
|
23
25
|
require('./chunk-S3JO3N4H.cjs');
|
|
24
26
|
|
|
25
27
|
|
|
@@ -36,4 +38,4 @@ require('./chunk-S3JO3N4H.cjs');
|
|
|
36
38
|
|
|
37
39
|
|
|
38
40
|
|
|
39
|
-
exports.FARM_MARKDOWN_CONTENT_TYPE =
|
|
41
|
+
exports.FARM_MARKDOWN_CONTENT_TYPE = _chunkQIH2HD6Hcjs.FARM_MARKDOWN_CONTENT_TYPE; exports.createFarmMarkdownErrorBody = _chunkQIH2HD6Hcjs.createFarmMarkdownErrorBody; exports.createFarmMarkdownRouteModule = _chunkRCYINC4Acjs.createFarmMarkdownRouteModule; exports.createFarmMarkdownRouteModuleFromFile = _chunkW2HZKYEScjs.createFarmMarkdownRouteModuleFromFile; exports.createFarmMarkdownSourceResponse = _chunkRCYINC4Acjs.createFarmMarkdownSourceResponse; exports.createMarkdownMetadata = _chunkRCYINC4Acjs.createMarkdownMetadata; exports.farmRequestWantsMarkdown = _chunkQIH2HD6Hcjs.farmRequestWantsMarkdown; exports.isFarmMarkdownPageFile = _chunkRCYINC4Acjs.isFarmMarkdownPageFile; exports.loadFarmMdxComponents = _chunkW2HZKYEScjs.loadFarmMdxComponents; exports.normalizeFarmMarkdownRoutePath = _chunkRCYINC4Acjs.normalizeFarmMarkdownRoutePath; exports.parseMarkdownFrontmatter = _chunkRCYINC4Acjs.parseMarkdownFrontmatter; exports.resolveFarmMdxComponentsModulePath = _chunkOHY2ZWUGcjs.resolveFarmMdxComponentsModulePath; exports.resolveMdxConfig = _chunkOHY2ZWUGcjs.resolveMdxConfig; exports.titleFromMarkdown = _chunkRCYINC4Acjs.titleFromMarkdown;
|
package/dist/app-markdown.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as FarmMdxComponents, u as FarmMdxResolvedConfig, s as RouteModule } from './client-plugins-
|
|
2
|
-
export { x as FarmMdxComponent, y as FarmMdxUserConfig, v as resolveFarmMdxComponentsModulePath, w as resolveMdxConfig } from './client-plugins-
|
|
1
|
+
import { t as FarmMdxComponents, u as FarmMdxResolvedConfig, s as RouteModule } from './client-plugins-B8RPJnot.mjs';
|
|
2
|
+
export { x as FarmMdxComponent, y as FarmMdxUserConfig, v as resolveFarmMdxComponentsModulePath, w as resolveMdxConfig } from './client-plugins-B8RPJnot.mjs';
|
|
3
3
|
export { FarmMarkdownPageModuleInput, FarmMarkdownPageSource, createFarmMarkdownRouteModule, createFarmMarkdownSourceResponse, createMarkdownMetadata, isFarmMarkdownPageFile, normalizeFarmMarkdownRoutePath, parseMarkdownFrontmatter, titleFromMarkdown } from './internal/app-markdown-runtime.mjs';
|
|
4
4
|
export { FARM_MARKDOWN_CONTENT_TYPE, createFarmMarkdownErrorBody, farmRequestWantsMarkdown } from './markdown.mjs';
|
|
5
5
|
import './lifecycle-DK06VuKP.mjs';
|
|
@@ -18,7 +18,7 @@ import './integration-api-BbaiokCC.mjs';
|
|
|
18
18
|
import '@farming-labs/orm';
|
|
19
19
|
import './types-DFbjpjXX.mjs';
|
|
20
20
|
import '@farming-labs/docs';
|
|
21
|
-
import './observability.mjs';
|
|
21
|
+
import './observability-BupkiN0m.mjs';
|
|
22
22
|
import '@opentelemetry/api';
|
|
23
23
|
import 'vite';
|
|
24
24
|
import './workflows-CR9ex-gz.mjs';
|
package/dist/app-markdown.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as FarmMdxComponents, u as FarmMdxResolvedConfig, s as RouteModule } from './client-plugins-
|
|
2
|
-
export { x as FarmMdxComponent, y as FarmMdxUserConfig, v as resolveFarmMdxComponentsModulePath, w as resolveMdxConfig } from './client-plugins-
|
|
1
|
+
import { t as FarmMdxComponents, u as FarmMdxResolvedConfig, s as RouteModule } from './client-plugins-bPBf4haK.js';
|
|
2
|
+
export { x as FarmMdxComponent, y as FarmMdxUserConfig, v as resolveFarmMdxComponentsModulePath, w as resolveMdxConfig } from './client-plugins-bPBf4haK.js';
|
|
3
3
|
export { FarmMarkdownPageModuleInput, FarmMarkdownPageSource, createFarmMarkdownRouteModule, createFarmMarkdownSourceResponse, createMarkdownMetadata, isFarmMarkdownPageFile, normalizeFarmMarkdownRoutePath, parseMarkdownFrontmatter, titleFromMarkdown } from './internal/app-markdown-runtime.js';
|
|
4
4
|
export { FARM_MARKDOWN_CONTENT_TYPE, createFarmMarkdownErrorBody, farmRequestWantsMarkdown } from './markdown.js';
|
|
5
5
|
import './lifecycle-DK06VuKP.js';
|
|
@@ -18,7 +18,7 @@ import './integration-api-BbaiokCC.js';
|
|
|
18
18
|
import '@farming-labs/orm';
|
|
19
19
|
import './types-DFbjpjXX.js';
|
|
20
20
|
import '@farming-labs/docs';
|
|
21
|
-
import './observability.js';
|
|
21
|
+
import './observability-BupkiN0m.js';
|
|
22
22
|
import '@opentelemetry/api';
|
|
23
23
|
import 'vite';
|
|
24
24
|
import './workflows-CR9ex-gz.js';
|
package/dist/app-markdown.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createFarmMarkdownRouteModuleFromFile,
|
|
3
3
|
loadFarmMdxComponents
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-74RZNRY6.mjs";
|
|
5
5
|
import {
|
|
6
6
|
createFarmMarkdownRouteModule,
|
|
7
7
|
createFarmMarkdownSourceResponse,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
normalizeFarmMarkdownRoutePath,
|
|
11
11
|
parseMarkdownFrontmatter,
|
|
12
12
|
titleFromMarkdown
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-JM5GQL4H.mjs";
|
|
14
14
|
import {
|
|
15
15
|
resolveFarmMdxComponentsModulePath,
|
|
16
16
|
resolveMdxConfig
|
|
@@ -19,7 +19,9 @@ import {
|
|
|
19
19
|
FARM_MARKDOWN_CONTENT_TYPE,
|
|
20
20
|
createFarmMarkdownErrorBody,
|
|
21
21
|
farmRequestWantsMarkdown
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-OOIL3BWR.mjs";
|
|
23
|
+
import "./chunk-MVL2RAJW.mjs";
|
|
24
|
+
import "./chunk-FUZEBRP3.mjs";
|
|
23
25
|
import "./chunk-LPEX4YW6.mjs";
|
|
24
26
|
export {
|
|
25
27
|
FARM_MARKDOWN_CONTENT_TYPE,
|
|
@@ -2,7 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkQIH2HD6Hcjs = require('./chunk-QIH2HD6H.cjs');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
var _chunkJ63ZH5OQcjs = require('./chunk-J63ZH5OQ.cjs');
|
|
6
9
|
|
|
7
10
|
|
|
8
11
|
var _chunkI57LW5VZcjs = require('./chunk-I57LW5VZ.cjs');
|
|
@@ -63,12 +66,12 @@ function collectFarmLlmsTxtPages(sources, options) {
|
|
|
63
66
|
for (const source of sources) {
|
|
64
67
|
const path = source.pattern;
|
|
65
68
|
if (path.includes("[") || pages.has(path)) continue;
|
|
66
|
-
if (include.length && !include.some((pattern) =>
|
|
69
|
+
if (include.length && !include.some((pattern) => _chunkQIH2HD6Hcjs.matchesFarmMarkdownRoutePattern.call(void 0, pattern, path))) {
|
|
67
70
|
continue;
|
|
68
71
|
}
|
|
69
|
-
if (exclude.some((pattern) =>
|
|
72
|
+
if (exclude.some((pattern) => _chunkQIH2HD6Hcjs.matchesFarmMarkdownRoutePattern.call(void 0, pattern, path))) continue;
|
|
70
73
|
if (isMetadataNoIndex(source.metadata)) continue;
|
|
71
|
-
const target =
|
|
74
|
+
const target = _chunkQIH2HD6Hcjs.isFarmMarkdownMirrorExposed.call(void 0, options.markdown, path) ? _chunkQIH2HD6Hcjs.getFarmMarkdownMirrorPath.call(void 0, path) : path;
|
|
72
75
|
const description = readMetadataString(source.metadata, "description");
|
|
73
76
|
pages.set(path, {
|
|
74
77
|
path,
|
|
@@ -158,7 +161,9 @@ function createFarmLlmsMarkdownReader(fetchMarkdown) {
|
|
|
158
161
|
return async (url) => {
|
|
159
162
|
try {
|
|
160
163
|
const response = await fetchMarkdown(
|
|
161
|
-
new Request(url, {
|
|
164
|
+
new Request(url, {
|
|
165
|
+
headers: { accept: "text/markdown", [_chunkJ63ZH5OQcjs.FARM_INTERNAL_READ_HEADER]: "llms-full" }
|
|
166
|
+
})
|
|
162
167
|
);
|
|
163
168
|
const type = _nullishCoalesce(response.headers.get("content-type"), () => ( ""));
|
|
164
169
|
if (!response.ok || !type.toLowerCase().startsWith("text/markdown")) {
|
|
@@ -172,6 +177,8 @@ function createFarmLlmsMarkdownReader(fetchMarkdown) {
|
|
|
172
177
|
};
|
|
173
178
|
}
|
|
174
179
|
_chunkS3JO3N4Hcjs.__name.call(void 0, createFarmLlmsMarkdownReader, "createFarmLlmsMarkdownReader");
|
|
180
|
+
var FARM_LLMS_FULL_PAGE_TIMEOUT_MS = 3e4;
|
|
181
|
+
var LLMS_PAGE_TIMED_OUT = /* @__PURE__ */ Symbol("farm.llms.pageTimedOut");
|
|
175
182
|
async function renderFarmLlmsFullTxt(value, options) {
|
|
176
183
|
const index = serializeFarmLlmsTxt(value);
|
|
177
184
|
if (typeof value === "string") return index;
|
|
@@ -185,17 +192,32 @@ async function renderFarmLlmsFullTxt(value, options) {
|
|
|
185
192
|
links.push(link);
|
|
186
193
|
}
|
|
187
194
|
}
|
|
195
|
+
const pageTimeout = _nullishCoalesce(options.pageTimeout, () => ( FARM_LLMS_FULL_PAGE_TIMEOUT_MS));
|
|
196
|
+
const readWithinTimeout = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, async (url) => {
|
|
197
|
+
let timer;
|
|
198
|
+
const timedOut = new Promise((resolve) => {
|
|
199
|
+
timer = setTimeout(resolve, pageTimeout, LLMS_PAGE_TIMED_OUT);
|
|
200
|
+
});
|
|
201
|
+
try {
|
|
202
|
+
const content = await Promise.race([options.readMarkdown(url), timedOut]);
|
|
203
|
+
if (content !== LLMS_PAGE_TIMED_OUT) return content;
|
|
204
|
+
_optionalChain([options, 'access', _14 => _14.onIncomplete, 'optionalCall', _15 => _15()]);
|
|
205
|
+
return null;
|
|
206
|
+
} finally {
|
|
207
|
+
clearTimeout(timer);
|
|
208
|
+
}
|
|
209
|
+
}, "readWithinTimeout");
|
|
188
210
|
const contents = await mapWithConcurrency(
|
|
189
211
|
links,
|
|
190
212
|
_nullishCoalesce(options.concurrency, () => ( 4)),
|
|
191
|
-
(link) => shouldInlineLlmsLink(link.url, options.origin) ?
|
|
213
|
+
(link) => shouldInlineLlmsLink(link.url, options.origin) ? readWithinTimeout(link.url) : null
|
|
192
214
|
);
|
|
193
215
|
const blocks = [`# ${toSingleLine(llms.title)}`];
|
|
194
|
-
if (_optionalChain([llms, 'access',
|
|
195
|
-
if (_optionalChain([llms, 'access',
|
|
216
|
+
if (_optionalChain([llms, 'access', _16 => _16.summary, 'optionalAccess', _17 => _17.trim, 'call', _18 => _18()])) blocks.push(`> ${toSingleLine(llms.summary)}`);
|
|
217
|
+
if (_optionalChain([llms, 'access', _19 => _19.details, 'optionalAccess', _20 => _20.trim, 'call', _21 => _21()])) blocks.push(llms.details.trim());
|
|
196
218
|
const pages = links.map((link, index2) => {
|
|
197
219
|
const parts = [`## ${toSingleLine(link.title)}`, `URL: ${escapeLinkUrl(link.url)}`];
|
|
198
|
-
if (_optionalChain([link, 'access',
|
|
220
|
+
if (_optionalChain([link, 'access', _22 => _22.description, 'optionalAccess', _23 => _23.trim, 'call', _24 => _24()])) parts.push(toSingleLine(link.description));
|
|
199
221
|
const content = stripFrontmatter(_nullishCoalesce(contents[index2], () => ( ""))).trim();
|
|
200
222
|
if (content) parts.push(content);
|
|
201
223
|
return parts.join("\n\n");
|
|
@@ -211,27 +233,35 @@ function createFarmLlmsFullRenderer(options = {}) {
|
|
|
211
233
|
const maxEntries = _nullishCoalesce(options.maxEntries, () => ( 16));
|
|
212
234
|
const entries = /* @__PURE__ */ new Map();
|
|
213
235
|
let queue = Promise.resolve();
|
|
214
|
-
|
|
236
|
+
const settle = /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, (body, complete, onSettled) => onSettled ? body.then((value) => (onSettled(complete()), value)) : body, "settle");
|
|
237
|
+
return (origin, render, onSettled) => {
|
|
215
238
|
const entry = entries.get(origin);
|
|
216
|
-
if (entry && entry.expires > now()) return entry.body;
|
|
239
|
+
if (entry && entry.expires > now()) return settle(entry.body, entry.complete, onSettled);
|
|
217
240
|
entries.delete(origin);
|
|
218
|
-
|
|
241
|
+
let complete = true;
|
|
242
|
+
const body = queue.then(
|
|
243
|
+
() => render({
|
|
244
|
+
incomplete: /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, () => {
|
|
245
|
+
complete = false;
|
|
246
|
+
}, "incomplete")
|
|
247
|
+
})
|
|
248
|
+
);
|
|
219
249
|
queue = body.catch(() => {
|
|
220
250
|
});
|
|
221
|
-
const pending = { body, expires: Number.POSITIVE_INFINITY };
|
|
251
|
+
const pending = { body, expires: Number.POSITIVE_INFINITY, complete: /* @__PURE__ */ _chunkS3JO3N4Hcjs.__name.call(void 0, () => complete, "complete") };
|
|
222
252
|
entries.set(origin, pending);
|
|
223
253
|
if (entries.size > maxEntries) entries.delete(entries.keys().next().value);
|
|
224
254
|
body.then(
|
|
225
255
|
() => {
|
|
226
256
|
if (entries.get(origin) !== pending) return;
|
|
227
|
-
if (ttl > 0) pending.expires = now() + ttl;
|
|
257
|
+
if (ttl > 0 && complete) pending.expires = now() + ttl;
|
|
228
258
|
else entries.delete(origin);
|
|
229
259
|
},
|
|
230
260
|
() => {
|
|
231
261
|
if (entries.get(origin) === pending) entries.delete(origin);
|
|
232
262
|
}
|
|
233
263
|
);
|
|
234
|
-
return body;
|
|
264
|
+
return settle(body, pending.complete, onSettled);
|
|
235
265
|
};
|
|
236
266
|
}
|
|
237
267
|
_chunkS3JO3N4Hcjs.__name.call(void 0, createFarmLlmsFullRenderer, "createFarmLlmsFullRenderer");
|
|
@@ -623,7 +653,7 @@ async function applyFarmCspHashesToHtml(html, security) {
|
|
|
623
653
|
_chunkS3JO3N4Hcjs.__name.call(void 0, applyFarmCspHashesToHtml, "applyFarmCspHashesToHtml");
|
|
624
654
|
function applyFarmCspNonceToResponse(response, security) {
|
|
625
655
|
if (!security.csp || !security.csp.nonce) return response;
|
|
626
|
-
if (!_optionalChain([response, 'access',
|
|
656
|
+
if (!_optionalChain([response, 'access', _25 => _25.headers, 'access', _26 => _26.get, 'call', _27 => _27("content-type"), 'optionalAccess', _28 => _28.toLowerCase, 'call', _29 => _29(), 'access', _30 => _30.includes, 'call', _31 => _31("text/html")])) return response;
|
|
627
657
|
const nonce = createFarmCspNonce(security);
|
|
628
658
|
const securityHeader = getFarmSecurityHeader(security, nonce);
|
|
629
659
|
const headers = new Headers(response.headers);
|
|
@@ -844,7 +874,7 @@ var rawTextElements = /* @__PURE__ */ new Map([
|
|
|
844
874
|
["xmp", /<\/xmp(?=[\s/>]|$)/gi]
|
|
845
875
|
]);
|
|
846
876
|
function stampScriptTag(tag, nonce) {
|
|
847
|
-
const opening = _optionalChain([tag, 'access',
|
|
877
|
+
const opening = _optionalChain([tag, 'access', _32 => _32.match, 'call', _33 => _33(/^<script\b/i), 'optionalAccess', _34 => _34[0]]);
|
|
848
878
|
if (!opening) return tag;
|
|
849
879
|
const attributes = stripScriptNonceAttribute(tag).slice(opening.length, -1);
|
|
850
880
|
return `<script nonce="${nonce}"${attributes}>`;
|
|
@@ -900,7 +930,7 @@ function collectFarmInlineScriptContents(html) {
|
|
|
900
930
|
}
|
|
901
931
|
_chunkS3JO3N4Hcjs.__name.call(void 0, collectFarmInlineScriptContents, "collectFarmInlineScriptContents");
|
|
902
932
|
function findScriptTagAttributeRange(tag, expectedName) {
|
|
903
|
-
const opening = _optionalChain([tag, 'access',
|
|
933
|
+
const opening = _optionalChain([tag, 'access', _35 => _35.match, 'call', _36 => _36(/^<script\b/i), 'optionalAccess', _37 => _37[0]]);
|
|
904
934
|
if (!opening) return void 0;
|
|
905
935
|
let offset = opening.length;
|
|
906
936
|
while (offset < tag.length - 1) {
|
|
@@ -930,7 +960,7 @@ _chunkS3JO3N4Hcjs.__name.call(void 0, findScriptTagAttributeRange, "findScriptTa
|
|
|
930
960
|
function findRawTextEnd(input, tagName, offset = 0) {
|
|
931
961
|
const closing = rawTextElements.get(tagName);
|
|
932
962
|
closing.lastIndex = offset;
|
|
933
|
-
return _nullishCoalesce(_optionalChain([closing, 'access',
|
|
963
|
+
return _nullishCoalesce(_optionalChain([closing, 'access', _38 => _38.exec, 'call', _39 => _39(input), 'optionalAccess', _40 => _40.index]), () => ( -1));
|
|
934
964
|
}
|
|
935
965
|
_chunkS3JO3N4Hcjs.__name.call(void 0, findRawTextEnd, "findRawTextEnd");
|
|
936
966
|
function matchingSuffixLength(input, token) {
|
|
@@ -976,9 +1006,9 @@ var MAX_REPORTED_PRELOAD_WARNINGS = 256;
|
|
|
976
1006
|
function resolveFarmPerformanceConfig(config) {
|
|
977
1007
|
return {
|
|
978
1008
|
preload: {
|
|
979
|
-
mode: _optionalChain([config, 'optionalAccess',
|
|
980
|
-
maxImages: normalizeBudget(_optionalChain([config, 'optionalAccess',
|
|
981
|
-
maxFonts: normalizeBudget(_optionalChain([config, 'optionalAccess',
|
|
1009
|
+
mode: _optionalChain([config, 'optionalAccess', _41 => _41.preload, 'optionalAccess', _42 => _42.mode]) === "warn" ? "warn" : "enforce",
|
|
1010
|
+
maxImages: normalizeBudget(_optionalChain([config, 'optionalAccess', _43 => _43.preload, 'optionalAccess', _44 => _44.maxImages]), DEFAULT_PRELOAD_CONFIG.maxImages),
|
|
1011
|
+
maxFonts: normalizeBudget(_optionalChain([config, 'optionalAccess', _45 => _45.preload, 'optionalAccess', _46 => _46.maxFonts]), DEFAULT_PRELOAD_CONFIG.maxFonts)
|
|
982
1012
|
}
|
|
983
1013
|
};
|
|
984
1014
|
}
|
|
@@ -992,7 +1022,7 @@ function manageFarmHtmlPreloads(html, config) {
|
|
|
992
1022
|
index,
|
|
993
1023
|
kind,
|
|
994
1024
|
href: readHtmlAttribute(element.value, "href"),
|
|
995
|
-
highPriority: _optionalChain([readHtmlAttribute, 'call',
|
|
1025
|
+
highPriority: _optionalChain([readHtmlAttribute, 'call', _47 => _47(element.value, "fetchpriority"), 'optionalAccess', _48 => _48.toLowerCase, 'call', _49 => _49()]) === "high"
|
|
996
1026
|
}
|
|
997
1027
|
] : [];
|
|
998
1028
|
});
|
|
@@ -1016,7 +1046,7 @@ function manageFarmLinkHeaderPreloads(value, config) {
|
|
|
1016
1046
|
index,
|
|
1017
1047
|
kind,
|
|
1018
1048
|
href: getLinkHeaderTarget(link),
|
|
1019
|
-
highPriority: _optionalChain([getLinkHeaderParameter, 'call',
|
|
1049
|
+
highPriority: _optionalChain([getLinkHeaderParameter, 'call', _50 => _50(link, "fetchpriority"), 'optionalAccess', _51 => _51.toLowerCase, 'call', _52 => _52()]) === "high"
|
|
1020
1050
|
}
|
|
1021
1051
|
] : [];
|
|
1022
1052
|
});
|
|
@@ -1039,7 +1069,7 @@ function manageFarmDocumentPreloads(html, linkHeader, config) {
|
|
|
1039
1069
|
index,
|
|
1040
1070
|
kind,
|
|
1041
1071
|
href: readHtmlAttribute(element.value, "href"),
|
|
1042
|
-
highPriority: _optionalChain([readHtmlAttribute, 'call',
|
|
1072
|
+
highPriority: _optionalChain([readHtmlAttribute, 'call', _53 => _53(element.value, "fetchpriority"), 'optionalAccess', _54 => _54.toLowerCase, 'call', _55 => _55()]) === "high"
|
|
1043
1073
|
});
|
|
1044
1074
|
}
|
|
1045
1075
|
for (const [index, link] of links.entries()) {
|
|
@@ -1049,7 +1079,7 @@ function manageFarmDocumentPreloads(html, linkHeader, config) {
|
|
|
1049
1079
|
index: headerOffset + index,
|
|
1050
1080
|
kind,
|
|
1051
1081
|
href: getLinkHeaderTarget(link),
|
|
1052
|
-
highPriority: _optionalChain([getLinkHeaderParameter, 'call',
|
|
1082
|
+
highPriority: _optionalChain([getLinkHeaderParameter, 'call', _56 => _56(link, "fetchpriority"), 'optionalAccess', _57 => _57.toLowerCase, 'call', _58 => _58()]) === "high"
|
|
1053
1083
|
});
|
|
1054
1084
|
}
|
|
1055
1085
|
const budget = selectPreloadsWithinBudget(candidates, config);
|
|
@@ -1130,13 +1160,13 @@ function selectPreloadsWithinBudget(candidates, config) {
|
|
|
1130
1160
|
}
|
|
1131
1161
|
_chunkS3JO3N4Hcjs.__name.call(void 0, selectPreloadsWithinBudget, "selectPreloadsWithinBudget");
|
|
1132
1162
|
function getHtmlPreloadKind(link) {
|
|
1133
|
-
const rel = _optionalChain([readHtmlAttribute, 'call',
|
|
1163
|
+
const rel = _optionalChain([readHtmlAttribute, 'call', _59 => _59(link, "rel"), 'optionalAccess', _60 => _60.toLowerCase, 'call', _61 => _61(), 'access', _62 => _62.split, 'call', _63 => _63(/\s+/)]) || [];
|
|
1134
1164
|
if (!rel.includes("preload")) return void 0;
|
|
1135
1165
|
return normalizePreloadKind(readHtmlAttribute(link, "as"));
|
|
1136
1166
|
}
|
|
1137
1167
|
_chunkS3JO3N4Hcjs.__name.call(void 0, getHtmlPreloadKind, "getHtmlPreloadKind");
|
|
1138
1168
|
function getLinkHeaderPreloadKind(link) {
|
|
1139
|
-
const relations = _nullishCoalesce(_optionalChain([getLinkHeaderParameter, 'call',
|
|
1169
|
+
const relations = _nullishCoalesce(_optionalChain([getLinkHeaderParameter, 'call', _64 => _64(link, "rel"), 'optionalAccess', _65 => _65.toLowerCase, 'call', _66 => _66(), 'access', _67 => _67.split, 'call', _68 => _68(/\s+/)]), () => ( []));
|
|
1140
1170
|
if (!relations.includes("preload")) return void 0;
|
|
1141
1171
|
return normalizePreloadKind(getLinkHeaderParameter(link, "as"));
|
|
1142
1172
|
}
|
|
@@ -1182,7 +1212,7 @@ function splitLinkParameters(value) {
|
|
|
1182
1212
|
}
|
|
1183
1213
|
_chunkS3JO3N4Hcjs.__name.call(void 0, splitLinkParameters, "splitLinkParameters");
|
|
1184
1214
|
function normalizePreloadKind(value) {
|
|
1185
|
-
const normalized = _optionalChain([value, 'optionalAccess',
|
|
1215
|
+
const normalized = _optionalChain([value, 'optionalAccess', _69 => _69.toLowerCase, 'call', _70 => _70()]);
|
|
1186
1216
|
return normalized === "image" || normalized === "font" ? normalized : void 0;
|
|
1187
1217
|
}
|
|
1188
1218
|
_chunkS3JO3N4Hcjs.__name.call(void 0, normalizePreloadKind, "normalizePreloadKind");
|
|
@@ -1190,7 +1220,7 @@ function readHtmlAttribute(element, name) {
|
|
|
1190
1220
|
const match = element.match(
|
|
1191
1221
|
new RegExp(`\\s${name}\\s*=\\s*(?:"([^"]*)"|'([^']*)'|([^\\s>]+))`, "i")
|
|
1192
1222
|
);
|
|
1193
|
-
return _nullishCoalesce(_nullishCoalesce(_optionalChain([match, 'optionalAccess',
|
|
1223
|
+
return _nullishCoalesce(_nullishCoalesce(_optionalChain([match, 'optionalAccess', _71 => _71[1]]), () => ( _optionalChain([match, 'optionalAccess', _72 => _72[2]]))), () => ( _optionalChain([match, 'optionalAccess', _73 => _73[3]])));
|
|
1194
1224
|
}
|
|
1195
1225
|
_chunkS3JO3N4Hcjs.__name.call(void 0, readHtmlAttribute, "readHtmlAttribute");
|
|
1196
1226
|
function findHtmlLinkElements(html) {
|
|
@@ -1214,7 +1244,7 @@ function findHtmlLinkElements(html) {
|
|
|
1214
1244
|
}
|
|
1215
1245
|
rawTextTag.lastIndex = start;
|
|
1216
1246
|
const rawText = rawTextTag.exec(lowerHtml);
|
|
1217
|
-
if (_optionalChain([rawText, 'optionalAccess',
|
|
1247
|
+
if (_optionalChain([rawText, 'optionalAccess', _74 => _74[1]])) {
|
|
1218
1248
|
const openingEnd = findHtmlTagEnd2(html, start);
|
|
1219
1249
|
if (openingEnd === -1) break;
|
|
1220
1250
|
if (rawText[1] === "svg" && html[openingEnd - 2] === "/") {
|