@farm.js/core 0.1.16 → 0.1.17
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 +3 -3
- package/dist/agent-runtime.d.ts +3 -3
- package/dist/api/client.cjs +62 -28
- package/dist/api/client.d.mts +3 -3
- package/dist/api/client.d.ts +3 -3
- package/dist/api/client.mjs +3 -3
- package/dist/api/route-manager.cjs +69 -32
- package/dist/api/route-manager.d.mts +3 -3
- package/dist/api/route-manager.d.ts +3 -3
- package/dist/api/route-manager.mjs +5 -5
- package/dist/api/runtime.cjs +65 -29
- package/dist/api/runtime.d.mts +3 -3
- package/dist/api/runtime.d.ts +3 -3
- package/dist/api/runtime.mjs +6 -3
- package/dist/{api-client-B-n3pm_Q.d.mts → api-client-Cx54IR5g.d.mts} +2 -2
- package/dist/{api-client-C0_NZEBl.d.ts → api-client-DykpaKcY.d.ts} +2 -2
- package/dist/api.cjs +106 -33
- package/dist/api.d.mts +5 -5
- package/dist/api.d.ts +5 -5
- package/dist/api.mjs +8 -8
- package/dist/{app-AyjEsCBq.d.ts → app-BHY_10Lm.d.ts} +3 -3
- package/dist/{app-CYPHeOo_.d.mts → app-BMk0do23.d.mts} +3 -3
- package/dist/app-markdown.d.mts +4 -4
- package/dist/app-markdown.d.ts +4 -4
- package/dist/app-markdown.mjs +3 -3
- package/dist/cache.cjs +62 -28
- package/dist/cache.d.mts +11 -1
- package/dist/cache.d.ts +11 -1
- package/dist/cache.mjs +1 -1
- package/dist/{chunk-7HDZYYS4.mjs → chunk-4OOBRCJX.mjs} +27 -5
- package/dist/{chunk-NHHKW2T6.mjs → chunk-56DAX2BE.mjs} +170 -52
- package/dist/{chunk-B76DT5Y6.mjs → chunk-57J3Y7Y3.mjs} +1 -1
- package/dist/{chunk-MOQNHLTS.mjs → chunk-5QOEPUYE.mjs} +5 -2
- package/dist/{chunk-HKLRP3BN.mjs → chunk-5SPPCN5J.mjs} +1 -1
- package/dist/{chunk-LUC2FAGW.mjs → chunk-6VQIKZZO.mjs} +1 -1
- package/dist/{chunk-7ZWL7XOU.mjs → chunk-76DG3LF3.mjs} +1 -1
- package/dist/{chunk-EWDK36MM.mjs → chunk-A72YEUZ3.mjs} +1 -1
- package/dist/{chunk-ZHOIQC6U.mjs → chunk-ATERBVHQ.mjs} +2 -2
- package/dist/{chunk-27JNCYEK.mjs → chunk-EN7WTEAY.mjs} +2 -2
- package/dist/{chunk-IGO2HEV7.mjs → chunk-F6SJAKFJ.mjs} +62 -28
- package/dist/{chunk-GSDIZACQ.mjs → chunk-FG5H2VCJ.mjs} +2 -2
- package/dist/{chunk-LZK5CXDW.mjs → chunk-KLSSO6YD.mjs} +2 -2
- package/dist/{chunk-KUO3GBPK.mjs → chunk-L6V3P73N.mjs} +1 -1
- package/dist/{chunk-TYVVIQ5M.mjs → chunk-MVIWBEJF.mjs} +32 -25
- package/dist/{chunk-KTGFMHET.mjs → chunk-N6UROPT7.mjs} +1 -1
- package/dist/{chunk-NDD2YVGU.mjs → chunk-NRVGEI5I.mjs} +10 -3
- package/dist/{chunk-IXTEENRS.mjs → chunk-QGVJVSNX.mjs} +5 -5
- package/dist/{chunk-6SCB2MXB.mjs → chunk-SXHV42UQ.mjs} +16 -1
- package/dist/{chunk-OWTIOHON.mjs → chunk-SYGGPS4A.mjs} +2 -2
- package/dist/{chunk-NC333MFA.mjs → chunk-TSWW5BVH.mjs} +7 -4
- package/dist/{chunk-LK6FGAQR.mjs → chunk-UDBJCUPA.mjs} +7 -4
- package/dist/{chunk-NUD6XBMO.mjs → chunk-UTBVHYS3.mjs} +2 -2
- package/dist/{chunk-76MNRHTS.mjs → chunk-UUYF3CHN.mjs} +2 -2
- package/dist/{chunk-VVTREAG5.mjs → chunk-WD4YXVLV.mjs} +11 -3
- package/dist/{chunk-UQZPTIML.mjs → chunk-WD5PNSOB.mjs} +2 -2
- package/dist/{chunk-DPZUDPVJ.mjs → chunk-XP777LRD.mjs} +1 -1
- package/dist/{chunk-KATQ6I56.mjs → chunk-XWAYMDLB.mjs} +1 -1
- package/dist/{chunk-IL5RWYK7.mjs → chunk-YD4J4XCI.mjs} +1 -1
- package/dist/{chunk-Q3MDL7TM.mjs → chunk-ZCNJKLA2.mjs} +30 -11
- package/dist/{client-plugins-CqVtZi5X.d.ts → client-plugins-C089bQhN.d.ts} +2 -2
- package/dist/{client-plugins-CIPRtSsW.d.mts → client-plugins-JXXmZliS.d.mts} +2 -2
- package/dist/client-plugins.d.mts +3 -3
- package/dist/client-plugins.d.ts +3 -3
- package/dist/client.cjs +62 -28
- package/dist/client.d.mts +8 -8
- package/dist/client.d.ts +8 -8
- package/dist/client.mjs +6 -6
- package/dist/config.d.mts +3 -3
- package/dist/config.d.ts +3 -3
- package/dist/cron.mjs +2 -2
- package/dist/{devtools-IU7LKZOH.mjs → devtools-UFVTMQX5.mjs} +7 -7
- package/dist/docs.cjs +18 -10
- package/dist/docs.mjs +9 -9
- package/dist/{endpoint-kSAxE52R.d.ts → endpoint-1zA994xL.d.ts} +1 -1
- package/dist/{endpoint-Bu3XgeMK.d.mts → endpoint-DAc96i93.d.mts} +1 -1
- package/dist/env.cjs +39 -5
- package/dist/env.d.mts +5 -3
- package/dist/env.d.ts +5 -3
- package/dist/env.mjs +2 -1
- package/dist/index.cjs +311 -93
- package/dist/index.d.mts +14 -14
- package/dist/index.d.ts +14 -14
- package/dist/index.mjs +34 -34
- package/dist/integrations.d.mts +3 -3
- package/dist/integrations.d.ts +3 -3
- package/dist/internal/app-markdown-runtime.d.mts +3 -3
- package/dist/internal/app-markdown-runtime.d.ts +3 -3
- package/dist/internal/app-markdown-runtime.mjs +2 -2
- package/dist/internal/build-runtime.cjs +342 -121
- package/dist/internal/build-runtime.d.mts +5 -5
- package/dist/internal/build-runtime.d.ts +5 -5
- package/dist/internal/build-runtime.mjs +23 -23
- package/dist/internal/cli-runtime.cjs +77 -31
- package/dist/internal/cli-runtime.mjs +13 -13
- package/dist/internal/client-error-overlay.cjs +1 -1
- package/dist/internal/client-error-overlay.mjs +1 -1
- package/dist/internal/compression-runtime.d.mts +3 -3
- package/dist/internal/compression-runtime.d.ts +3 -3
- package/dist/internal/config-runtime.cjs +14 -2
- package/dist/internal/config-runtime.d.mts +4 -4
- package/dist/internal/config-runtime.d.ts +4 -4
- package/dist/internal/config-runtime.mjs +7 -7
- package/dist/internal/product-telemetry-runtime.cjs +1 -1
- package/dist/internal/product-telemetry-runtime.mjs +1 -1
- package/dist/internal/production-runtime.cjs +101 -41
- package/dist/internal/production-runtime.d.mts +9 -9
- package/dist/internal/production-runtime.d.ts +9 -9
- package/dist/internal/production-runtime.mjs +6 -6
- package/dist/markdown.cjs +16 -1
- package/dist/markdown.mjs +1 -1
- package/dist/{metadata-8g__AMPM.d.ts → metadata-BcNJP4fq.d.ts} +1 -1
- package/dist/{metadata-OMX6wFNf.d.mts → metadata-C1Z9vLbb.d.mts} +1 -1
- package/dist/middleware.cjs +10 -3
- package/dist/middleware.d.mts +5 -5
- package/dist/middleware.d.ts +5 -5
- package/dist/middleware.mjs +4 -4
- package/dist/{nitro-3N4ZXRYM.mjs → nitro-CVZ36JM5.mjs} +4 -4
- package/dist/plugin.cjs +256 -105
- package/dist/plugin.d.mts +3 -3
- package/dist/plugin.d.ts +3 -3
- package/dist/plugin.mjs +19 -19
- package/dist/{production-runtime-W3M0eNDV.d.mts → production-runtime-jcrTlRTb.d.mts} +1 -1
- package/dist/{production-runtime-BJh7o6Cr.d.ts → production-runtime-oKmC0WU-.d.ts} +1 -1
- package/dist/{render-plan-io7pvDNc.d.mts → render-plan-BLIfc4jt.d.mts} +1 -1
- package/dist/{render-plan-Be4ZGTJP.d.ts → render-plan-DOB9cV-h.d.ts} +1 -1
- package/dist/renderer-client.cjs +62 -28
- package/dist/renderer-client.d.mts +5 -5
- package/dist/renderer-client.d.ts +5 -5
- package/dist/renderer-client.mjs +3 -3
- package/dist/{request-DZkHYQ89.d.mts → request-Cr53NRHr.d.mts} +1 -1
- package/dist/{request-G8JhKr4F.d.ts → request-Dt2gNuQD.d.ts} +1 -1
- package/dist/request.d.mts +4 -4
- package/dist/request.d.ts +4 -4
- package/dist/{route-C_eLaFTZ.d.mts → route-B0XrsrFk.d.mts} +1 -1
- package/dist/{route-BxNJT447.d.ts → route-DOEpbyWZ.d.ts} +1 -1
- package/dist/{route-rendering-BcLLPJgN.d.ts → route-rendering-CWYd8Mv1.d.ts} +1 -1
- package/dist/{route-rendering-CbAKr1TY.d.mts → route-rendering-CeFBEAoZ.d.mts} +1 -1
- package/dist/routes.cjs +68 -31
- package/dist/routes.d.mts +4 -4
- package/dist/routes.d.ts +4 -4
- package/dist/routes.mjs +2 -2
- package/dist/server-fn-client.d.mts +3 -3
- package/dist/server-fn-client.d.ts +3 -3
- package/dist/server-fn.cjs +72 -30
- package/dist/server-fn.d.mts +1 -1
- package/dist/server-fn.d.ts +1 -1
- package/dist/server-fn.mjs +2 -2
- package/dist/server-plugins.d.mts +4 -4
- package/dist/server-plugins.d.ts +4 -4
- package/dist/server-query-client.cjs +62 -28
- package/dist/server-query-client.d.mts +1 -1
- package/dist/server-query-client.d.ts +1 -1
- package/dist/server-query-client.mjs +4 -4
- package/dist/server-query.cjs +72 -30
- package/dist/server-query.d.mts +1 -1
- package/dist/server-query.d.ts +1 -1
- package/dist/server-query.mjs +3 -3
- package/dist/server.cjs +239 -80
- package/dist/server.d.mts +9 -9
- package/dist/server.d.ts +9 -9
- package/dist/server.mjs +22 -22
- package/dist/{spa-router-BcS_4nqm.d.mts → spa-router-CQWiYGxS.d.mts} +2 -2
- package/dist/{spa-router-BzFBUJkn.d.ts → spa-router-Wjiw-8hB.d.ts} +2 -2
- package/dist/testing.cjs +73 -32
- package/dist/testing.d.mts +3 -3
- package/dist/testing.d.ts +3 -3
- package/dist/testing.mjs +11 -7
- package/dist/{utils-C4yrAhNc.d.ts → utils-B0XJmG_b.d.ts} +1 -1
- package/dist/{utils-5kQP1mFR.d.mts → utils-uUxF0K0P.d.mts} +1 -1
- package/dist/version.cjs +1 -1
- package/dist/version.mjs +1 -1
- package/dist/vite.cjs +260 -109
- package/dist/vite.d.mts +3 -3
- package/dist/vite.d.ts +3 -3
- package/dist/vite.mjs +19 -19
- package/dist/workflows.mjs +2 -2
- package/package.json +2 -2
- package/dist/{chunk-VO5SCWF5.mjs → chunk-BNGS6KJ6.mjs} +0 -0
- package/dist/{chunk-MUUZJLCI.mjs → chunk-EGJDUF4Q.mjs} +3 -3
- package/dist/{chunk-4L7SZOHZ.mjs → chunk-YHOCRI4H.mjs} +3 -3
package/dist/server.d.mts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export { F as FarmApp, R as RouteManager, S as ServerRenderer, c as createFarmApp } from './app-
|
|
2
|
-
import { w as FarmConfig } from './client-plugins-
|
|
3
|
-
export { A as AppRoutePattern, a3 as BuildOptions, X as ErrorBoundary, O as ErrorProps, h as FarmAppContext, z as FarmComponentType, t as FarmContextFactory, I as FarmContextFactoryInput, J as FarmIsolatedClientHydrationMode, a8 as FarmLayerEntry, ac as FarmLayerResolution, D as FarmMigrationCommand, E as FarmMigrationsConfig, G as FarmMigrationsUserConfig, b as FarmRequest, c as FarmResponse, aa as FarmSourceRoot, $ as GenerateStaticParams, V as Layout, T as LayoutMetadataProps, a0 as LayoutModule, L as LayoutProps, W as Loading, K as LoadingProps, M as Metadata, a1 as MetadataJsonLd, S as MetadataProps, a7 as MetadataRobots, a6 as MetadataRobotsDirectives, u as MiddlewareProps, N as NitroPreset, U as Page, i as PageProps, Q as PagePropsWithMiddleware, C as PageRouteParams, P as ParsedRoute, j as PluginContextProps, ab as ResolveFarmLayersOptions, a9 as ResolvedFarmLayer, H as ResolvedFarmMigrationsConfig, k as RouteModule, R as RouteSegment, a5 as SSGCollectionResult, a4 as SSGPage, a2 as ServerAction, Z as StaticPathParams, Y as StaticPathPrimitive, _ as StaticRouteParams, ah as createFarmConfigResolutionPlugin, y as defineConfig, x as farmPlugin, af as getFarmAppDirectories, ag as getFarmLayerAliases, ae as getFarmSourceRoots, ai as loadFarmConfigFile, ad as resolveFarmLayers } from './client-plugins-
|
|
4
|
-
export { g as fileExists, h as globFiles, l as logger, m as matchRoute, b as matchRouteParts, c as matchRoutePrefix, d as matchRoutePrefixParts, p as parseRoutePath, i as parseSearchParams, r as resolveAppPath, s as segmentsToPattern, a as splitRoutePath, e as toPosixPath, t as toRootRelativeUrlPath, f as toViteModuleId } from './utils-
|
|
1
|
+
export { F as FarmApp, R as RouteManager, S as ServerRenderer, c as createFarmApp } from './app-BMk0do23.mjs';
|
|
2
|
+
import { w as FarmConfig } from './client-plugins-JXXmZliS.mjs';
|
|
3
|
+
export { A as AppRoutePattern, a3 as BuildOptions, X as ErrorBoundary, O as ErrorProps, h as FarmAppContext, z as FarmComponentType, t as FarmContextFactory, I as FarmContextFactoryInput, J as FarmIsolatedClientHydrationMode, a8 as FarmLayerEntry, ac as FarmLayerResolution, D as FarmMigrationCommand, E as FarmMigrationsConfig, G as FarmMigrationsUserConfig, b as FarmRequest, c as FarmResponse, aa as FarmSourceRoot, $ as GenerateStaticParams, V as Layout, T as LayoutMetadataProps, a0 as LayoutModule, L as LayoutProps, W as Loading, K as LoadingProps, M as Metadata, a1 as MetadataJsonLd, S as MetadataProps, a7 as MetadataRobots, a6 as MetadataRobotsDirectives, u as MiddlewareProps, N as NitroPreset, U as Page, i as PageProps, Q as PagePropsWithMiddleware, C as PageRouteParams, P as ParsedRoute, j as PluginContextProps, ab as ResolveFarmLayersOptions, a9 as ResolvedFarmLayer, H as ResolvedFarmMigrationsConfig, k as RouteModule, R as RouteSegment, a5 as SSGCollectionResult, a4 as SSGPage, a2 as ServerAction, Z as StaticPathParams, Y as StaticPathPrimitive, _ as StaticRouteParams, ah as createFarmConfigResolutionPlugin, y as defineConfig, x as farmPlugin, af as getFarmAppDirectories, ag as getFarmLayerAliases, ae as getFarmSourceRoots, ai as loadFarmConfigFile, ad as resolveFarmLayers } from './client-plugins-JXXmZliS.mjs';
|
|
4
|
+
export { g as fileExists, h as globFiles, l as logger, m as matchRoute, b as matchRouteParts, c as matchRoutePrefix, d as matchRoutePrefixParts, p as parseRoutePath, i as parseSearchParams, r as resolveAppPath, s as segmentsToPattern, a as splitRoutePath, e as toPosixPath, t as toRootRelativeUrlPath, f as toViteModuleId } from './utils-uUxF0K0P.mjs';
|
|
5
5
|
export { 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 } from './storage.mjs';
|
|
6
6
|
export { CacheKeyFactory, DefinedCacheKey, FarmCacheAdapter, FarmCacheEntry, FarmCacheInvalidationStreamOptions, FarmCacheInvalidationTarget, FarmCacheOptions, FarmCacheSetOptions, FarmCacheStorage, FarmCacheUserConfig, FarmClientCacheUserConfig, FarmDataCache, GetFarmCacheEntryOptions, InferCacheKeyData, RevalidateTagProfile, RouteDataCacheKey, StorageFarmCacheAdapterOptions, applyFarmCacheInvalidationTargets, applyFarmCacheInvalidations, configureFarmCache, createFarmCacheInvalidationStream, createFarmCacheKey, createPathCacheTag, createRouteDataCacheKey, createRouteDataCacheTag, defineCacheKey, getFarmDataCache, invalidate, invalidateRouteData, normalizeRevalidatePath, revalidatePath, revalidateTag, storageCacheAdapter, unstable_cache, updateTag } from './cache.mjs';
|
|
7
7
|
export { AfterCallback, FarmAfterPlatformContext, _runWithAfterNodeResponse, _runWithAfterRequest, _withAfterNodeMiddleware, after } from './after.mjs';
|
|
8
8
|
export { FARM_SERVER_QUERY_SYMBOL, ServerQuery, ServerQueryKey, ServerQueryOptions, ServerQueryOutputOptions, ServerQueryStaleTime, createServerQuery } from './server-query.mjs';
|
|
9
9
|
import { ViteDevServer } from 'vite';
|
|
10
10
|
import './types-Z0aotQ8w.mjs';
|
|
11
|
-
export { g as getCurrentRequest } from './request-
|
|
11
|
+
export { g as getCurrentRequest } from './request-Cr53NRHr.mjs';
|
|
12
12
|
import { ServerResponse } from 'node:http';
|
|
13
13
|
export { getTheme, getThemeSnapshot } from './theme/server.mjs';
|
|
14
14
|
export { DEFAULT_SERVER_ACTION_BODY_SIZE_LIMIT, FarmServerActionsConfig, PreparedServerActionRequest, ResolvedFarmServerActionsConfig, SanitizedServerActionError, ServerActionRequestError, ServerActionRequestKind, createServerActionRequestErrorResponse, getServerActionExecutionContext, getServerActionInvalidations, getServerActionSignal, prepareServerActionRequest, resolveServerActionsConfig, runWithServerActionRequest, sanitizeServerActionError, validateServerActionRequest } from './server-action-security.mjs';
|
|
@@ -26,11 +26,11 @@ import './routes.mjs';
|
|
|
26
26
|
import 'react';
|
|
27
27
|
import './server-fn.mjs';
|
|
28
28
|
import './server-fn-error-DDh14a0V.mjs';
|
|
29
|
-
import './endpoint-
|
|
29
|
+
import './endpoint-DAc96i93.mjs';
|
|
30
30
|
import './renderer.mjs';
|
|
31
31
|
import './deployment.mjs';
|
|
32
32
|
import './lifecycle-DK06VuKP.mjs';
|
|
33
|
-
import './route-
|
|
33
|
+
import './route-B0XrsrFk.mjs';
|
|
34
34
|
import 'http';
|
|
35
35
|
import './schema.mjs';
|
|
36
36
|
import './integration-api-BbaiokCC.mjs';
|
|
@@ -43,8 +43,8 @@ import 'esbuild';
|
|
|
43
43
|
import './types-DQnyD3VD.mjs';
|
|
44
44
|
import './font.mjs';
|
|
45
45
|
import './island-CfGru1MO.mjs';
|
|
46
|
-
import './metadata-
|
|
47
|
-
import './render-plan-
|
|
46
|
+
import './metadata-C1Z9vLbb.mjs';
|
|
47
|
+
import './render-plan-BLIfc4jt.mjs';
|
|
48
48
|
import './runtime-AOJge4vQ.mjs';
|
|
49
49
|
import './resolver-DhW0CqZN.mjs';
|
|
50
50
|
|
package/dist/server.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export { F as FarmApp, R as RouteManager, S as ServerRenderer, c as createFarmApp } from './app-
|
|
2
|
-
import { w as FarmConfig } from './client-plugins-
|
|
3
|
-
export { A as AppRoutePattern, a3 as BuildOptions, X as ErrorBoundary, O as ErrorProps, h as FarmAppContext, z as FarmComponentType, t as FarmContextFactory, I as FarmContextFactoryInput, J as FarmIsolatedClientHydrationMode, a8 as FarmLayerEntry, ac as FarmLayerResolution, D as FarmMigrationCommand, E as FarmMigrationsConfig, G as FarmMigrationsUserConfig, b as FarmRequest, c as FarmResponse, aa as FarmSourceRoot, $ as GenerateStaticParams, V as Layout, T as LayoutMetadataProps, a0 as LayoutModule, L as LayoutProps, W as Loading, K as LoadingProps, M as Metadata, a1 as MetadataJsonLd, S as MetadataProps, a7 as MetadataRobots, a6 as MetadataRobotsDirectives, u as MiddlewareProps, N as NitroPreset, U as Page, i as PageProps, Q as PagePropsWithMiddleware, C as PageRouteParams, P as ParsedRoute, j as PluginContextProps, ab as ResolveFarmLayersOptions, a9 as ResolvedFarmLayer, H as ResolvedFarmMigrationsConfig, k as RouteModule, R as RouteSegment, a5 as SSGCollectionResult, a4 as SSGPage, a2 as ServerAction, Z as StaticPathParams, Y as StaticPathPrimitive, _ as StaticRouteParams, ah as createFarmConfigResolutionPlugin, y as defineConfig, x as farmPlugin, af as getFarmAppDirectories, ag as getFarmLayerAliases, ae as getFarmSourceRoots, ai as loadFarmConfigFile, ad as resolveFarmLayers } from './client-plugins-
|
|
4
|
-
export { g as fileExists, h as globFiles, l as logger, m as matchRoute, b as matchRouteParts, c as matchRoutePrefix, d as matchRoutePrefixParts, p as parseRoutePath, i as parseSearchParams, r as resolveAppPath, s as segmentsToPattern, a as splitRoutePath, e as toPosixPath, t as toRootRelativeUrlPath, f as toViteModuleId } from './utils-
|
|
1
|
+
export { F as FarmApp, R as RouteManager, S as ServerRenderer, c as createFarmApp } from './app-BHY_10Lm.js';
|
|
2
|
+
import { w as FarmConfig } from './client-plugins-C089bQhN.js';
|
|
3
|
+
export { A as AppRoutePattern, a3 as BuildOptions, X as ErrorBoundary, O as ErrorProps, h as FarmAppContext, z as FarmComponentType, t as FarmContextFactory, I as FarmContextFactoryInput, J as FarmIsolatedClientHydrationMode, a8 as FarmLayerEntry, ac as FarmLayerResolution, D as FarmMigrationCommand, E as FarmMigrationsConfig, G as FarmMigrationsUserConfig, b as FarmRequest, c as FarmResponse, aa as FarmSourceRoot, $ as GenerateStaticParams, V as Layout, T as LayoutMetadataProps, a0 as LayoutModule, L as LayoutProps, W as Loading, K as LoadingProps, M as Metadata, a1 as MetadataJsonLd, S as MetadataProps, a7 as MetadataRobots, a6 as MetadataRobotsDirectives, u as MiddlewareProps, N as NitroPreset, U as Page, i as PageProps, Q as PagePropsWithMiddleware, C as PageRouteParams, P as ParsedRoute, j as PluginContextProps, ab as ResolveFarmLayersOptions, a9 as ResolvedFarmLayer, H as ResolvedFarmMigrationsConfig, k as RouteModule, R as RouteSegment, a5 as SSGCollectionResult, a4 as SSGPage, a2 as ServerAction, Z as StaticPathParams, Y as StaticPathPrimitive, _ as StaticRouteParams, ah as createFarmConfigResolutionPlugin, y as defineConfig, x as farmPlugin, af as getFarmAppDirectories, ag as getFarmLayerAliases, ae as getFarmSourceRoots, ai as loadFarmConfigFile, ad as resolveFarmLayers } from './client-plugins-C089bQhN.js';
|
|
4
|
+
export { g as fileExists, h as globFiles, l as logger, m as matchRoute, b as matchRouteParts, c as matchRoutePrefix, d as matchRoutePrefixParts, p as parseRoutePath, i as parseSearchParams, r as resolveAppPath, s as segmentsToPattern, a as splitRoutePath, e as toPosixPath, t as toRootRelativeUrlPath, f as toViteModuleId } from './utils-B0XJmG_b.js';
|
|
5
5
|
export { 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 } from './storage.js';
|
|
6
6
|
export { CacheKeyFactory, DefinedCacheKey, FarmCacheAdapter, FarmCacheEntry, FarmCacheInvalidationStreamOptions, FarmCacheInvalidationTarget, FarmCacheOptions, FarmCacheSetOptions, FarmCacheStorage, FarmCacheUserConfig, FarmClientCacheUserConfig, FarmDataCache, GetFarmCacheEntryOptions, InferCacheKeyData, RevalidateTagProfile, RouteDataCacheKey, StorageFarmCacheAdapterOptions, applyFarmCacheInvalidationTargets, applyFarmCacheInvalidations, configureFarmCache, createFarmCacheInvalidationStream, createFarmCacheKey, createPathCacheTag, createRouteDataCacheKey, createRouteDataCacheTag, defineCacheKey, getFarmDataCache, invalidate, invalidateRouteData, normalizeRevalidatePath, revalidatePath, revalidateTag, storageCacheAdapter, unstable_cache, updateTag } from './cache.js';
|
|
7
7
|
export { AfterCallback, FarmAfterPlatformContext, _runWithAfterNodeResponse, _runWithAfterRequest, _withAfterNodeMiddleware, after } from './after.js';
|
|
8
8
|
export { FARM_SERVER_QUERY_SYMBOL, ServerQuery, ServerQueryKey, ServerQueryOptions, ServerQueryOutputOptions, ServerQueryStaleTime, createServerQuery } from './server-query.js';
|
|
9
9
|
import { ViteDevServer } from 'vite';
|
|
10
10
|
import './types-Z0aotQ8w.js';
|
|
11
|
-
export { g as getCurrentRequest } from './request-
|
|
11
|
+
export { g as getCurrentRequest } from './request-Dt2gNuQD.js';
|
|
12
12
|
import { ServerResponse } from 'node:http';
|
|
13
13
|
export { getTheme, getThemeSnapshot } from './theme/server.js';
|
|
14
14
|
export { DEFAULT_SERVER_ACTION_BODY_SIZE_LIMIT, FarmServerActionsConfig, PreparedServerActionRequest, ResolvedFarmServerActionsConfig, SanitizedServerActionError, ServerActionRequestError, ServerActionRequestKind, createServerActionRequestErrorResponse, getServerActionExecutionContext, getServerActionInvalidations, getServerActionSignal, prepareServerActionRequest, resolveServerActionsConfig, runWithServerActionRequest, sanitizeServerActionError, validateServerActionRequest } from './server-action-security.js';
|
|
@@ -26,11 +26,11 @@ import './routes.js';
|
|
|
26
26
|
import 'react';
|
|
27
27
|
import './server-fn.js';
|
|
28
28
|
import './server-fn-error-DDh14a0V.js';
|
|
29
|
-
import './endpoint-
|
|
29
|
+
import './endpoint-1zA994xL.js';
|
|
30
30
|
import './renderer.js';
|
|
31
31
|
import './deployment.js';
|
|
32
32
|
import './lifecycle-DK06VuKP.js';
|
|
33
|
-
import './route-
|
|
33
|
+
import './route-DOEpbyWZ.js';
|
|
34
34
|
import 'http';
|
|
35
35
|
import './schema.js';
|
|
36
36
|
import './integration-api-BbaiokCC.js';
|
|
@@ -43,8 +43,8 @@ import 'esbuild';
|
|
|
43
43
|
import './types-DQnyD3VD.js';
|
|
44
44
|
import './font.js';
|
|
45
45
|
import './island-CfGru1MO.js';
|
|
46
|
-
import './metadata-
|
|
47
|
-
import './render-plan-
|
|
46
|
+
import './metadata-BcNJP4fq.js';
|
|
47
|
+
import './render-plan-DOB9cV-h.js';
|
|
48
48
|
import './runtime-BirxPwbZ.js';
|
|
49
49
|
import './resolver-PPEeiJ6M.js';
|
|
50
50
|
|
package/dist/server.mjs
CHANGED
|
@@ -10,12 +10,12 @@ import {
|
|
|
10
10
|
import {
|
|
11
11
|
FARM_SERVER_QUERY_SYMBOL,
|
|
12
12
|
createServerQuery
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-WD5PNSOB.mjs";
|
|
14
|
+
import "./chunk-WD4YXVLV.mjs";
|
|
15
15
|
import {
|
|
16
16
|
loadConfig,
|
|
17
17
|
resolveConfig
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-QGVJVSNX.mjs";
|
|
19
19
|
import "./chunk-XZNTNMHT.mjs";
|
|
20
20
|
import {
|
|
21
21
|
loadFarmInstrumentation,
|
|
@@ -40,14 +40,14 @@ import {
|
|
|
40
40
|
farmPlugin,
|
|
41
41
|
farmServerOnlyEntriesPlugin,
|
|
42
42
|
mergeFarmViteConfig
|
|
43
|
-
} from "./chunk-
|
|
44
|
-
import "./chunk-
|
|
43
|
+
} from "./chunk-56DAX2BE.mjs";
|
|
44
|
+
import "./chunk-EN7WTEAY.mjs";
|
|
45
45
|
import {
|
|
46
46
|
readSchemaTables
|
|
47
47
|
} from "./chunk-DHDVMXYK.mjs";
|
|
48
48
|
import "./chunk-ZMSZZXOR.mjs";
|
|
49
49
|
import "./chunk-3NM6SRI6.mjs";
|
|
50
|
-
import "./chunk-
|
|
50
|
+
import "./chunk-76DG3LF3.mjs";
|
|
51
51
|
import "./chunk-DAO7JGTS.mjs";
|
|
52
52
|
import "./chunk-BOYNDCZL.mjs";
|
|
53
53
|
import "./chunk-HLCDYJY7.mjs";
|
|
@@ -80,9 +80,9 @@ import {
|
|
|
80
80
|
loadFarmRendererVitePlugins,
|
|
81
81
|
resolveFarmRenderer
|
|
82
82
|
} from "./chunk-OLYK7EAK.mjs";
|
|
83
|
-
import "./chunk-
|
|
83
|
+
import "./chunk-ZCNJKLA2.mjs";
|
|
84
84
|
import "./chunk-G2KY33I6.mjs";
|
|
85
|
-
import "./chunk-
|
|
85
|
+
import "./chunk-YHOCRI4H.mjs";
|
|
86
86
|
import {
|
|
87
87
|
DEFAULT_SERVER_ACTION_BODY_SIZE_LIMIT,
|
|
88
88
|
ServerActionRequestError,
|
|
@@ -96,14 +96,14 @@ import {
|
|
|
96
96
|
sanitizeServerActionError,
|
|
97
97
|
validateServerActionRequest
|
|
98
98
|
} from "./chunk-QCFFHV5H.mjs";
|
|
99
|
-
import "./chunk-
|
|
100
|
-
import "./chunk-
|
|
101
|
-
import "./chunk-
|
|
99
|
+
import "./chunk-4OOBRCJX.mjs";
|
|
100
|
+
import "./chunk-XWAYMDLB.mjs";
|
|
101
|
+
import "./chunk-6VQIKZZO.mjs";
|
|
102
102
|
import "./chunk-FA2W42OV.mjs";
|
|
103
|
-
import "./chunk-
|
|
104
|
-
import "./chunk-
|
|
105
|
-
import "./chunk-ONUEYC6N.mjs";
|
|
103
|
+
import "./chunk-SXHV42UQ.mjs";
|
|
104
|
+
import "./chunk-EGJDUF4Q.mjs";
|
|
106
105
|
import "./chunk-2UC36WAC.mjs";
|
|
106
|
+
import "./chunk-ONUEYC6N.mjs";
|
|
107
107
|
import {
|
|
108
108
|
createFarmStorage,
|
|
109
109
|
createStorageClient,
|
|
@@ -137,8 +137,8 @@ import "./chunk-SEJ5N6SL.mjs";
|
|
|
137
137
|
import "./chunk-JLCQGPXE.mjs";
|
|
138
138
|
import "./chunk-FP2INE7H.mjs";
|
|
139
139
|
import "./chunk-44SYJEG3.mjs";
|
|
140
|
-
import "./chunk-
|
|
141
|
-
import "./chunk-
|
|
140
|
+
import "./chunk-57J3Y7Y3.mjs";
|
|
141
|
+
import "./chunk-NRVGEI5I.mjs";
|
|
142
142
|
import "./chunk-5TISYEQF.mjs";
|
|
143
143
|
import "./chunk-R3DS7A2T.mjs";
|
|
144
144
|
import {
|
|
@@ -147,14 +147,14 @@ import {
|
|
|
147
147
|
_withAfterNodeMiddleware,
|
|
148
148
|
after
|
|
149
149
|
} from "./chunk-IOEH4VWN.mjs";
|
|
150
|
-
import "./chunk-
|
|
151
|
-
import "./chunk-
|
|
150
|
+
import "./chunk-ATERBVHQ.mjs";
|
|
151
|
+
import "./chunk-BNGS6KJ6.mjs";
|
|
152
152
|
import "./chunk-CU625VAY.mjs";
|
|
153
153
|
import "./chunk-JNGIWIY6.mjs";
|
|
154
154
|
import "./chunk-FV45CKBC.mjs";
|
|
155
|
-
import "./chunk-
|
|
155
|
+
import "./chunk-XP777LRD.mjs";
|
|
156
156
|
import "./chunk-I6XDAKWQ.mjs";
|
|
157
|
-
import "./chunk-
|
|
157
|
+
import "./chunk-SYGGPS4A.mjs";
|
|
158
158
|
import "./chunk-W3B4PKAW.mjs";
|
|
159
159
|
import "./chunk-5WI2S4CO.mjs";
|
|
160
160
|
import "./chunk-EA5K5BKU.mjs";
|
|
@@ -188,7 +188,7 @@ import {
|
|
|
188
188
|
} from "./chunk-Z2RZJZIZ.mjs";
|
|
189
189
|
import {
|
|
190
190
|
FARM_VERSION
|
|
191
|
-
} from "./chunk-
|
|
191
|
+
} from "./chunk-YD4J4XCI.mjs";
|
|
192
192
|
import "./chunk-54UPOYFS.mjs";
|
|
193
193
|
import "./chunk-WNSDDRNU.mjs";
|
|
194
194
|
import "./chunk-JPLUGGRV.mjs";
|
|
@@ -220,7 +220,7 @@ import {
|
|
|
220
220
|
storageCacheAdapter,
|
|
221
221
|
unstable_cache,
|
|
222
222
|
updateTag
|
|
223
|
-
} from "./chunk-
|
|
223
|
+
} from "./chunk-F6SJAKFJ.mjs";
|
|
224
224
|
import {
|
|
225
225
|
applyFarmCacheInvalidations
|
|
226
226
|
} from "./chunk-4SIYUGRY.mjs";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { M as Metadata } from './client-plugins-
|
|
1
|
+
import { M as Metadata } from './client-plugins-JXXmZliS.mjs';
|
|
2
2
|
import { F as FarmClientPluginManager } from './lifecycle-DK06VuKP.mjs';
|
|
3
3
|
import { F as FarmI18nClientSnapshot } from './types-Z0aotQ8w.mjs';
|
|
4
4
|
import { F as FarmIslandStrategy } from './island-CfGru1MO.mjs';
|
|
5
|
-
import { F as FarmRouteRenderPlan } from './render-plan-
|
|
5
|
+
import { F as FarmRouteRenderPlan } from './render-plan-BLIfc4jt.mjs';
|
|
6
6
|
|
|
7
7
|
type NavigationMetadata = (Metadata & Record<string, any>) | undefined;
|
|
8
8
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { M as Metadata } from './client-plugins-
|
|
1
|
+
import { M as Metadata } from './client-plugins-C089bQhN.js';
|
|
2
2
|
import { F as FarmClientPluginManager } from './lifecycle-DK06VuKP.js';
|
|
3
3
|
import { F as FarmI18nClientSnapshot } from './types-Z0aotQ8w.js';
|
|
4
4
|
import { F as FarmIslandStrategy } from './island-CfGru1MO.js';
|
|
5
|
-
import { F as FarmRouteRenderPlan } from './render-plan-
|
|
5
|
+
import { F as FarmRouteRenderPlan } from './render-plan-DOB9cV-h.js';
|
|
6
6
|
|
|
7
7
|
type NavigationMetadata = (Metadata & Record<string, any>) | undefined;
|
|
8
8
|
|
package/dist/testing.cjs
CHANGED
|
@@ -740,6 +740,8 @@ var init_cache = __esm({
|
|
|
740
740
|
constructor(config = {}) {
|
|
741
741
|
this.entries = /* @__PURE__ */ new Map();
|
|
742
742
|
this.inflight = /* @__PURE__ */ new Map();
|
|
743
|
+
/** Local entries by tag, so tag counts and pruning never scan unrelated entries. */
|
|
744
|
+
this.entriesByTag = /* @__PURE__ */ new Map();
|
|
743
745
|
this.invalidatedTagVersions = /* @__PURE__ */ new Map();
|
|
744
746
|
this.activeGenerations = /* @__PURE__ */ new Set();
|
|
745
747
|
this.version = 0;
|
|
@@ -758,6 +760,7 @@ var init_cache = __esm({
|
|
|
758
760
|
configure(config = {}) {
|
|
759
761
|
this.generation++;
|
|
760
762
|
this.entries.clear();
|
|
763
|
+
this.entriesByTag.clear();
|
|
761
764
|
this.inflight.clear();
|
|
762
765
|
this.invalidatedTagVersions.clear();
|
|
763
766
|
this.activeGenerations.clear();
|
|
@@ -924,14 +927,12 @@ var init_cache = __esm({
|
|
|
924
927
|
return entry;
|
|
925
928
|
}
|
|
926
929
|
delete(key) {
|
|
927
|
-
const deleted = this.
|
|
928
|
-
if (deleted) this.pruneInvalidatedTagVersions();
|
|
930
|
+
const deleted = this.deleteLocalEntry(key);
|
|
929
931
|
emitFarmEvent({ type: "cache.delete", key, deleted });
|
|
930
932
|
return deleted;
|
|
931
933
|
}
|
|
932
934
|
async deleteAsync(key) {
|
|
933
|
-
const deleted = this.
|
|
934
|
-
if (deleted) this.pruneInvalidatedTagVersions();
|
|
935
|
+
const deleted = this.deleteLocalEntry(key);
|
|
935
936
|
if (this.adapter) {
|
|
936
937
|
await this.adapter.delete(this.createAdapterKey(key));
|
|
937
938
|
}
|
|
@@ -942,6 +943,7 @@ var init_cache = __esm({
|
|
|
942
943
|
const count = this.entries.size;
|
|
943
944
|
this.generation++;
|
|
944
945
|
this.entries.clear();
|
|
946
|
+
this.entriesByTag.clear();
|
|
945
947
|
this.inflight.clear();
|
|
946
948
|
this.invalidatedTagVersions.clear();
|
|
947
949
|
this.activeGenerations.clear();
|
|
@@ -1027,23 +1029,32 @@ var init_cache = __esm({
|
|
|
1027
1029
|
return cached.value;
|
|
1028
1030
|
}
|
|
1029
1031
|
const inflight = this.inflight.get(key);
|
|
1030
|
-
if (inflight) {
|
|
1032
|
+
if (inflight && !this.wasInvalidatedSince(inflight.tags, inflight.startVersion)) {
|
|
1031
1033
|
emitFarmEvent({ type: "cache.dedupe", key });
|
|
1032
|
-
return inflight;
|
|
1034
|
+
return inflight.promise;
|
|
1033
1035
|
}
|
|
1034
1036
|
const tags = Array.from(normalizeCacheOptionsTags(options));
|
|
1035
1037
|
const generation = this.generation;
|
|
1038
|
+
const startVersion = this.version;
|
|
1036
1039
|
const promise = this.fillCacheEntry(key, producer, options, tags, generation).catch((error) => {
|
|
1037
1040
|
emitFarmEvent({ type: "cache.error", key, operation: "set", error });
|
|
1038
1041
|
throw error;
|
|
1039
1042
|
}).finally(() => {
|
|
1040
|
-
if (this.inflight.get(key) === promise) {
|
|
1043
|
+
if (this.inflight.get(key)?.promise === promise) {
|
|
1041
1044
|
this.inflight.delete(key);
|
|
1042
1045
|
}
|
|
1043
1046
|
});
|
|
1044
|
-
this.inflight.set(key, promise);
|
|
1047
|
+
this.inflight.set(key, { promise, tags, startVersion });
|
|
1045
1048
|
return promise;
|
|
1046
1049
|
}
|
|
1050
|
+
/** A fill that started before one of its tags was invalidated cannot satisfy later readers. */
|
|
1051
|
+
wasInvalidatedSince(tags, version) {
|
|
1052
|
+
for (const tag of tags) {
|
|
1053
|
+
const invalidatedVersion = this.invalidatedTagVersions.get(tag);
|
|
1054
|
+
if (invalidatedVersion !== void 0 && invalidatedVersion > version) return true;
|
|
1055
|
+
}
|
|
1056
|
+
return false;
|
|
1057
|
+
}
|
|
1047
1058
|
async fillCacheEntry(key, producer, options, tags, generation) {
|
|
1048
1059
|
const adapter = this.adapter;
|
|
1049
1060
|
const namespace = this.namespace;
|
|
@@ -1084,7 +1095,7 @@ var init_cache = __esm({
|
|
|
1084
1095
|
return value;
|
|
1085
1096
|
} finally {
|
|
1086
1097
|
this.activeGenerations.delete(activeGeneration);
|
|
1087
|
-
this.pruneInvalidatedTagVersions();
|
|
1098
|
+
this.pruneInvalidatedTagVersions(activeGeneration.tags);
|
|
1088
1099
|
if (leaseToken && adapter?.releaseLease) {
|
|
1089
1100
|
try {
|
|
1090
1101
|
await adapter.releaseLease(leaseKey, leaseToken);
|
|
@@ -1129,18 +1140,9 @@ var init_cache = __esm({
|
|
|
1129
1140
|
}
|
|
1130
1141
|
return void 0;
|
|
1131
1142
|
}
|
|
1132
|
-
countEntriesForTag(tag) {
|
|
1133
|
-
let count = 0;
|
|
1134
|
-
for (const entry of this.entries.values()) {
|
|
1135
|
-
if (entry.tags.has(tag)) {
|
|
1136
|
-
count++;
|
|
1137
|
-
}
|
|
1138
|
-
}
|
|
1139
|
-
return count;
|
|
1140
|
-
}
|
|
1141
1143
|
countEntriesForTags(tags) {
|
|
1142
1144
|
let count = 0;
|
|
1143
|
-
for (const entry of this.
|
|
1145
|
+
for (const entry of this.entriesByTag.get(tags[0]) ?? []) {
|
|
1144
1146
|
if (tags.every((tag) => entry.tags.has(tag))) {
|
|
1145
1147
|
count++;
|
|
1146
1148
|
}
|
|
@@ -1148,10 +1150,10 @@ var init_cache = __esm({
|
|
|
1148
1150
|
return count;
|
|
1149
1151
|
}
|
|
1150
1152
|
invalidateTag(normalizedTag) {
|
|
1151
|
-
const count = this.
|
|
1153
|
+
const count = this.entriesByTag.get(normalizedTag)?.size ?? 0;
|
|
1152
1154
|
this.invalidatedTagVersions.delete(normalizedTag);
|
|
1153
1155
|
this.invalidatedTagVersions.set(normalizedTag, ++this.version);
|
|
1154
|
-
this.pruneInvalidatedTagVersions();
|
|
1156
|
+
this.pruneInvalidatedTagVersions([normalizedTag]);
|
|
1155
1157
|
return count;
|
|
1156
1158
|
}
|
|
1157
1159
|
toPublicEntry(entry) {
|
|
@@ -1181,19 +1183,51 @@ var init_cache = __esm({
|
|
|
1181
1183
|
this.entries.set(key, entry);
|
|
1182
1184
|
}
|
|
1183
1185
|
storeLocalEntry(entry) {
|
|
1184
|
-
|
|
1186
|
+
const removed = [];
|
|
1187
|
+
const replaced = this.detachLocalEntry(entry.key);
|
|
1188
|
+
if (replaced) removed.push(replaced);
|
|
1185
1189
|
this.entries.set(entry.key, entry);
|
|
1190
|
+
for (const tag of entry.tags) {
|
|
1191
|
+
let tagged = this.entriesByTag.get(tag);
|
|
1192
|
+
if (!tagged) this.entriesByTag.set(tag, tagged = /* @__PURE__ */ new Set());
|
|
1193
|
+
tagged.add(entry);
|
|
1194
|
+
}
|
|
1186
1195
|
while (this.entries.size > this.maxEntries) {
|
|
1187
1196
|
const oldestKey = this.entries.keys().next().value;
|
|
1188
1197
|
if (oldestKey === void 0) break;
|
|
1189
|
-
this.
|
|
1198
|
+
removed.push(this.detachLocalEntry(oldestKey));
|
|
1199
|
+
}
|
|
1200
|
+
for (const removedEntry of removed) this.pruneInvalidatedTagVersions(removedEntry.tags);
|
|
1201
|
+
}
|
|
1202
|
+
deleteLocalEntry(key) {
|
|
1203
|
+
const entry = this.detachLocalEntry(key);
|
|
1204
|
+
if (!entry) return false;
|
|
1205
|
+
this.pruneInvalidatedTagVersions(entry.tags);
|
|
1206
|
+
return true;
|
|
1207
|
+
}
|
|
1208
|
+
detachLocalEntry(key) {
|
|
1209
|
+
const entry = this.entries.get(key);
|
|
1210
|
+
if (!entry) return void 0;
|
|
1211
|
+
this.entries.delete(key);
|
|
1212
|
+
for (const tag of entry.tags) {
|
|
1213
|
+
const tagged = this.entriesByTag.get(tag);
|
|
1214
|
+
if (!tagged) continue;
|
|
1215
|
+
tagged.delete(entry);
|
|
1216
|
+
if (tagged.size === 0) this.entriesByTag.delete(tag);
|
|
1190
1217
|
}
|
|
1191
|
-
|
|
1218
|
+
return entry;
|
|
1192
1219
|
}
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1220
|
+
/**
|
|
1221
|
+
* Drop invalidation versions that no local entry or active fill can be stale against.
|
|
1222
|
+
* Callers pass only the tags whose dependents just changed, so the cost is bounded by
|
|
1223
|
+
* the entries sharing those tags rather than by the whole cache.
|
|
1224
|
+
*/
|
|
1225
|
+
pruneInvalidatedTagVersions(tags) {
|
|
1226
|
+
tags: for (const tag of tags) {
|
|
1227
|
+
const invalidatedVersion = this.invalidatedTagVersions.get(tag);
|
|
1228
|
+
if (invalidatedVersion === void 0) continue;
|
|
1229
|
+
for (const entry of this.entriesByTag.get(tag) ?? []) {
|
|
1230
|
+
if (entry.createdVersion < invalidatedVersion) continue tags;
|
|
1197
1231
|
}
|
|
1198
1232
|
for (const generation of this.activeGenerations) {
|
|
1199
1233
|
if (generation.tags.has(tag) && generation.createdVersion < invalidatedVersion)
|
|
@@ -1711,6 +1745,7 @@ function createProgrammaticPageComponent(route, rendererRuntime) {
|
|
|
1711
1745
|
}
|
|
1712
1746
|
return rendererRuntime.createElement(...args);
|
|
1713
1747
|
}, "createElement");
|
|
1748
|
+
const markFunctionComponent = /* @__PURE__ */ __name((component) => rendererRuntime?.markFunctionComponent?.(component) ?? component, "markFunctionComponent");
|
|
1714
1749
|
const Component = route.component;
|
|
1715
1750
|
if (route.pending) {
|
|
1716
1751
|
const PendingComponent = route.pending;
|
|
@@ -1732,7 +1767,9 @@ function createProgrammaticPageComponent(route, rendererRuntime) {
|
|
|
1732
1767
|
throw error;
|
|
1733
1768
|
}
|
|
1734
1769
|
}, "FarmProgrammaticPageContent");
|
|
1735
|
-
const PageContent =
|
|
1770
|
+
const PageContent = markFunctionComponent(
|
|
1771
|
+
FarmProgrammaticPageContent2
|
|
1772
|
+
);
|
|
1736
1773
|
const FarmProgrammaticPage = /* @__PURE__ */ __name(function FarmProgrammaticPage2(props) {
|
|
1737
1774
|
return createElement2(
|
|
1738
1775
|
rendererRuntime.Suspense,
|
|
@@ -1742,7 +1779,7 @@ function createProgrammaticPageComponent(route, rendererRuntime) {
|
|
|
1742
1779
|
createElement2(PageContent, props)
|
|
1743
1780
|
);
|
|
1744
1781
|
}, "FarmProgrammaticPage");
|
|
1745
|
-
return FarmProgrammaticPage;
|
|
1782
|
+
return markFunctionComponent(FarmProgrammaticPage);
|
|
1746
1783
|
}
|
|
1747
1784
|
const FarmProgrammaticPageContent = /* @__PURE__ */ __name(async function FarmProgrammaticPageContent2(props) {
|
|
1748
1785
|
try {
|
|
@@ -1761,7 +1798,7 @@ function createProgrammaticPageComponent(route, rendererRuntime) {
|
|
|
1761
1798
|
throw error;
|
|
1762
1799
|
}
|
|
1763
1800
|
}, "FarmProgrammaticPageContent");
|
|
1764
|
-
return FarmProgrammaticPageContent;
|
|
1801
|
+
return markFunctionComponent(FarmProgrammaticPageContent);
|
|
1765
1802
|
}
|
|
1766
1803
|
function readProgrammaticRouteProps(route, props, resources) {
|
|
1767
1804
|
if (isProgrammaticRoutePropsResolved(props)) {
|
|
@@ -3215,7 +3252,7 @@ function createFarmTestHarness(options = {}) {
|
|
|
3215
3252
|
const endpointPath = endpointOptions.path ?? endpointRecord.__path ?? "/__farm/test/endpoint";
|
|
3216
3253
|
const endpointRequest = request(endpointPath, {
|
|
3217
3254
|
...omitEndpointControlOptions(endpointOptions),
|
|
3218
|
-
method: endpointOptions.method ?? endpointRecord.__method ?? "GET"
|
|
3255
|
+
method: endpointOptions.method ?? endpointRecord.__method ?? (hasRequestBody(endpointOptions) ? "POST" : "GET")
|
|
3219
3256
|
});
|
|
3220
3257
|
return invokeTestEndpoint(
|
|
3221
3258
|
endpoint,
|
|
@@ -3362,6 +3399,10 @@ function stripInternalRouteProps(props) {
|
|
|
3362
3399
|
return componentProps;
|
|
3363
3400
|
}
|
|
3364
3401
|
__name(stripInternalRouteProps, "stripInternalRouteProps");
|
|
3402
|
+
function hasRequestBody(options) {
|
|
3403
|
+
return options.json !== void 0 || options.form !== void 0 || options.body != null;
|
|
3404
|
+
}
|
|
3405
|
+
__name(hasRequestBody, "hasRequestBody");
|
|
3365
3406
|
function getDefaultApiMethod(route) {
|
|
3366
3407
|
if (route.methods.GET) return "GET";
|
|
3367
3408
|
return Object.keys(route.methods)[0] ?? "GET";
|
package/dist/testing.d.mts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
|
-
import { t as FarmContextFactory, u as MiddlewareProps, j as PluginContextProps, k as RouteModule } from './client-plugins-
|
|
2
|
+
import { t as FarmContextFactory, u as MiddlewareProps, j as PluginContextProps, k as RouteModule } from './client-plugins-JXXmZliS.mjs';
|
|
3
3
|
import './types-Z0aotQ8w.mjs';
|
|
4
4
|
import { ServerFn } from './server-fn.mjs';
|
|
5
5
|
import { a as APIRouteParams } from './route-pattern-W-SsJGSp.mjs';
|
|
6
6
|
import { ProgrammaticPageRoute, InferProgrammaticRouteData, ProgrammaticRouteComponentProps, ProgrammaticApiRoute } from './routes.mjs';
|
|
7
7
|
import { FarmRouterQueryValue, FarmRouterPathParams } from './router.mjs';
|
|
8
8
|
import './lifecycle-DK06VuKP.mjs';
|
|
9
|
-
import './route-
|
|
10
|
-
import './endpoint-
|
|
9
|
+
import './route-B0XrsrFk.mjs';
|
|
10
|
+
import './endpoint-DAc96i93.mjs';
|
|
11
11
|
import './cache.mjs';
|
|
12
12
|
import './renderer.mjs';
|
|
13
13
|
import './deployment.mjs';
|
package/dist/testing.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
|
-
import { t as FarmContextFactory, u as MiddlewareProps, j as PluginContextProps, k as RouteModule } from './client-plugins-
|
|
2
|
+
import { t as FarmContextFactory, u as MiddlewareProps, j as PluginContextProps, k as RouteModule } from './client-plugins-C089bQhN.js';
|
|
3
3
|
import './types-Z0aotQ8w.js';
|
|
4
4
|
import { ServerFn } from './server-fn.js';
|
|
5
5
|
import { a as APIRouteParams } from './route-pattern-W-SsJGSp.js';
|
|
6
6
|
import { ProgrammaticPageRoute, InferProgrammaticRouteData, ProgrammaticRouteComponentProps, ProgrammaticApiRoute } from './routes.js';
|
|
7
7
|
import { FarmRouterQueryValue, FarmRouterPathParams } from './router.js';
|
|
8
8
|
import './lifecycle-DK06VuKP.js';
|
|
9
|
-
import './route-
|
|
10
|
-
import './endpoint-
|
|
9
|
+
import './route-DOEpbyWZ.js';
|
|
10
|
+
import './endpoint-1zA994xL.js';
|
|
11
11
|
import './cache.js';
|
|
12
12
|
import './renderer.js';
|
|
13
13
|
import './deployment.js';
|
package/dist/testing.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createRouteModuleFromProgrammaticPage
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-TSWW5BVH.mjs";
|
|
4
4
|
import {
|
|
5
5
|
buildFarmRoutePath,
|
|
6
6
|
matchFarmRoute
|
|
@@ -14,16 +14,16 @@ import {
|
|
|
14
14
|
withFarmRouteContext
|
|
15
15
|
} from "./chunk-SEJ5N6SL.mjs";
|
|
16
16
|
import "./chunk-FP2INE7H.mjs";
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-ATERBVHQ.mjs";
|
|
18
|
+
import "./chunk-BNGS6KJ6.mjs";
|
|
19
19
|
import "./chunk-CU625VAY.mjs";
|
|
20
20
|
import "./chunk-JNGIWIY6.mjs";
|
|
21
21
|
import "./chunk-FV45CKBC.mjs";
|
|
22
22
|
import {
|
|
23
23
|
invokeAPIRouteEndpoint
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-XP777LRD.mjs";
|
|
25
25
|
import "./chunk-I6XDAKWQ.mjs";
|
|
26
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-SYGGPS4A.mjs";
|
|
27
27
|
import "./chunk-W3B4PKAW.mjs";
|
|
28
28
|
import "./chunk-5WI2S4CO.mjs";
|
|
29
29
|
import "./chunk-EA5K5BKU.mjs";
|
|
@@ -43,7 +43,7 @@ import "./chunk-7LTCDQRS.mjs";
|
|
|
43
43
|
import "./chunk-IXUY2F5U.mjs";
|
|
44
44
|
import {
|
|
45
45
|
getFarmDataCache
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-F6SJAKFJ.mjs";
|
|
47
47
|
import "./chunk-4SIYUGRY.mjs";
|
|
48
48
|
import "./chunk-C4NCTZLM.mjs";
|
|
49
49
|
import "./chunk-FUZEBRP3.mjs";
|
|
@@ -156,7 +156,7 @@ function createFarmTestHarness(options = {}) {
|
|
|
156
156
|
const endpointPath = endpointOptions.path ?? endpointRecord.__path ?? "/__farm/test/endpoint";
|
|
157
157
|
const endpointRequest = request(endpointPath, {
|
|
158
158
|
...omitEndpointControlOptions(endpointOptions),
|
|
159
|
-
method: endpointOptions.method ?? endpointRecord.__method ?? "GET"
|
|
159
|
+
method: endpointOptions.method ?? endpointRecord.__method ?? (hasRequestBody(endpointOptions) ? "POST" : "GET")
|
|
160
160
|
});
|
|
161
161
|
return invokeTestEndpoint(
|
|
162
162
|
endpoint,
|
|
@@ -303,6 +303,10 @@ function stripInternalRouteProps(props) {
|
|
|
303
303
|
return componentProps;
|
|
304
304
|
}
|
|
305
305
|
__name(stripInternalRouteProps, "stripInternalRouteProps");
|
|
306
|
+
function hasRequestBody(options) {
|
|
307
|
+
return options.json !== void 0 || options.form !== void 0 || options.body != null;
|
|
308
|
+
}
|
|
309
|
+
__name(hasRequestBody, "hasRequestBody");
|
|
306
310
|
function getDefaultApiMethod(route) {
|
|
307
311
|
if (route.methods.GET) return "GET";
|
|
308
312
|
return Object.keys(route.methods)[0] ?? "GET";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as ParsedRoute, R as RouteSegment } from './client-plugins-
|
|
1
|
+
import { P as ParsedRoute, R as RouteSegment } from './client-plugins-C089bQhN.js';
|
|
2
2
|
|
|
3
3
|
declare function parseRoutePath(filePath: string): ParsedRoute;
|
|
4
4
|
declare function segmentsToPattern(segments: RouteSegment[]): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as ParsedRoute, R as RouteSegment } from './client-plugins-
|
|
1
|
+
import { P as ParsedRoute, R as RouteSegment } from './client-plugins-JXXmZliS.mjs';
|
|
2
2
|
|
|
3
3
|
declare function parseRoutePath(filePath: string): ParsedRoute;
|
|
4
4
|
declare function segmentsToPattern(segments: RouteSegment[]): string;
|
package/dist/version.cjs
CHANGED