reroute-js 0.44.0 → 0.45.0
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/cli/bin.d.ts +1 -1
- package/cli/bin.js +20 -7
- package/cli/bin.js.map +3 -3
- package/cli/index.d.ts +1 -1
- package/cli/index.js +4 -4
- package/cli/index.js.map +1 -1
- package/cli/src/cli.d.ts +1 -1
- package/cli/src/commands/analyze.d.ts +1 -1
- package/cli/src/commands/build.d.ts +1 -1
- package/cli/src/commands/dev.d.ts +1 -1
- package/cli/src/commands/gen.d.ts +1 -1
- package/cli/src/commands/index.d.ts +1 -1
- package/cli/src/commands/init.d.ts +1 -1
- package/cli/src/commands/lib/assets.d.ts +1 -1
- package/cli/src/commands/lib/bundler.d.ts +1 -1
- package/cli/src/commands/lib/command.d.ts +1 -1
- package/cli/src/commands/lib/env.d.ts +1 -1
- package/cli/src/commands/lib/index.d.ts +1 -1
- package/cli/src/commands/lib/log.d.ts +1 -1
- package/cli/src/commands/lib/markdown/availability.d.ts +1 -1
- package/cli/src/commands/lib/markdown/index.d.ts +1 -1
- package/cli/src/commands/lib/markdown/processor.d.ts +1 -1
- package/cli/src/commands/lib/production.d.ts +1 -1
- package/cli/src/commands/lib/server.d.ts +1 -1
- package/cli/src/commands/lib/streaming/analyzer.d.ts +1 -1
- package/cli/src/commands/lib/streaming/suspense.d.ts +1 -1
- package/cli/src/commands/lib/tailwind.d.ts +1 -1
- package/cli/src/commands/lib/terminal-ui.d.ts +1 -1
- package/cli/src/commands/lib/version.d.ts +1 -1
- package/cli/src/commands/og.d.ts +1 -1
- package/cli/src/commands/start.d.ts +1 -1
- package/cli/src/index.d.ts +1 -1
- package/core/index.d.ts +1 -1
- package/core/index.js +16 -3
- package/core/index.js.map +3 -3
- package/core/src/bundler/hash.d.ts +1 -1
- package/core/src/bundler/index.d.ts +1 -1
- package/core/src/config.d.ts +1 -1
- package/core/src/content/discovery.d.ts +1 -1
- package/core/src/content/index.d.ts +1 -1
- package/core/src/content/metadata.d.ts +1 -1
- package/core/src/index.d.ts +1 -1
- package/core/src/llms/extractor.d.ts +1 -1
- package/core/src/llms/formatter.d.ts +1 -1
- package/core/src/llms/full-generator.d.ts +1 -1
- package/core/src/llms/index-generator.d.ts +1 -1
- package/core/src/llms/index.d.ts +1 -1
- package/core/src/og/discovery.d.ts +1 -1
- package/core/src/og/index.d.ts +1 -1
- package/core/src/og/meta.d.ts +1 -1
- package/core/src/og/render.d.ts +1 -1
- package/core/src/og/types.d.ts +1 -1
- package/core/src/robots/discovery.d.ts +1 -1
- package/core/src/robots/generator.d.ts +1 -1
- package/core/src/robots/index.d.ts +1 -1
- package/core/src/robots/policies.d.ts +1 -1
- package/core/src/rss/discovery.d.ts +1 -1
- package/core/src/rss/generator.d.ts +1 -1
- package/core/src/rss/index.d.ts +1 -1
- package/core/src/sitemap/discovery.d.ts +1 -1
- package/core/src/sitemap/generator.d.ts +1 -1
- package/core/src/sitemap/index.d.ts +1 -1
- package/core/src/ssr/index.d.ts +1 -1
- package/core/src/ssr/lib/cache.d.ts +1 -1
- package/core/src/ssr/lib/collections.d.ts +1 -1
- package/core/src/ssr/lib/compression.d.ts +1 -1
- package/core/src/ssr/lib/compute/content.d.ts +1 -1
- package/core/src/ssr/lib/compute/index.d.ts +1 -1
- package/core/src/ssr/lib/compute/layouts.d.ts +1 -1
- package/core/src/ssr/lib/compute/routes.d.ts +1 -1
- package/core/src/ssr/lib/data.d.ts +1 -1
- package/core/src/ssr/lib/html.d.ts +1 -1
- package/core/src/ssr/lib/imports.d.ts +1 -1
- package/core/src/ssr/lib/index.d.ts +1 -1
- package/core/src/ssr/lib/layouts.d.ts +1 -1
- package/core/src/ssr/lib/metadata.d.ts +1 -1
- package/core/src/ssr/lib/mime.d.ts +1 -1
- package/core/src/ssr/lib/modules.d.ts +1 -1
- package/core/src/ssr/lib/path.d.ts +1 -1
- package/core/src/ssr/lib/preload.d.ts +1 -1
- package/core/src/ssr/lib/scripts/collections.d.ts +1 -1
- package/core/src/ssr/lib/scripts/data.d.ts +4 -1
- package/core/src/ssr/lib/scripts/data.d.ts.map +1 -1
- package/core/src/ssr/lib/scripts/escape.d.ts +1 -1
- package/core/src/ssr/lib/scripts/feeds.d.ts +1 -1
- package/core/src/ssr/lib/scripts/index.d.ts +1 -1
- package/core/src/ssr/lib/seed.d.ts +1 -1
- package/core/src/ssr/lib/serialize.d.ts +1 -1
- package/core/src/ssr/lib/setup.d.ts +1 -1
- package/core/src/ssr/lib/styles.d.ts +1 -1
- package/core/src/ssr/lib/template.d.ts +1 -1
- package/core/src/ssr/lib/types.d.ts +1 -1
- package/core/src/ssr/render.d.ts +1 -1
- package/core/src/ssr/stream.d.ts +1 -1
- package/elysia/index.d.ts +1 -1
- package/elysia/index.js +76 -28
- package/elysia/index.js.map +7 -7
- package/elysia/src/index.d.ts +1 -1
- package/elysia/src/libs/assets.d.ts +1 -1
- package/elysia/src/libs/cache.d.ts +1 -1
- package/elysia/src/libs/caching.d.ts +1 -1
- package/elysia/src/libs/http.d.ts +1 -1
- package/elysia/src/libs/image.d.ts +1 -1
- package/elysia/src/libs/index.d.ts +2 -2
- package/elysia/src/libs/index.d.ts.map +1 -1
- package/elysia/src/libs/llms.d.ts +1 -1
- package/elysia/src/libs/response.d.ts +1 -1
- package/elysia/src/libs/serving.d.ts +12 -2
- package/elysia/src/libs/serving.d.ts.map +1 -1
- package/elysia/src/plugin.d.ts +1 -1
- package/elysia/src/plugin.d.ts.map +1 -1
- package/elysia/src/routes/artifacts.d.ts +3 -2
- package/elysia/src/routes/artifacts.d.ts.map +1 -1
- package/elysia/src/routes/content.d.ts +1 -1
- package/elysia/src/routes/image.d.ts +1 -1
- package/elysia/src/routes/index.d.ts +1 -1
- package/elysia/src/routes/internal.d.ts +1 -1
- package/elysia/src/routes/llms.d.ts +1 -1
- package/elysia/src/routes/og.d.ts +1 -1
- package/elysia/src/routes/redirects.d.ts +1 -1
- package/elysia/src/routes/robots.d.ts +1 -1
- package/elysia/src/routes/rss.d.ts +1 -1
- package/elysia/src/routes/search.d.ts +1 -1
- package/elysia/src/routes/sitemap.d.ts +1 -1
- package/elysia/src/routes/ssr.d.ts +1 -1
- package/elysia/src/routes/static.d.ts +3 -2
- package/elysia/src/routes/static.d.ts.map +1 -1
- package/elysia/src/types.d.ts +1 -1
- package/package.json +1 -1
- package/react/index.d.ts +1 -1
- package/react/index.js +69 -3
- package/react/index.js.map +4 -4
- package/react/src/components/ClientOnly.d.ts +1 -1
- package/react/src/components/ContentRoute.d.ts +1 -1
- package/react/src/components/Image.d.ts +1 -1
- package/react/src/components/LazyRoute.d.ts +7 -3
- package/react/src/components/LazyRoute.d.ts.map +1 -1
- package/react/src/components/Link.d.ts +1 -1
- package/react/src/components/Markdown.d.ts +1 -1
- package/react/src/components/Outlet.d.ts +1 -1
- package/react/src/components/index.d.ts +1 -1
- package/react/src/hooks/index.d.ts +1 -1
- package/react/src/hooks/useContent.d.ts +1 -1
- package/react/src/hooks/useData.d.ts +1 -1
- package/react/src/hooks/useData.d.ts.map +1 -1
- package/react/src/hooks/useFeed.d.ts +1 -1
- package/react/src/hooks/useLayoutData.d.ts +1 -1
- package/react/src/hooks/useLayoutData.d.ts.map +1 -1
- package/react/src/hooks/useLlms.d.ts +1 -1
- package/react/src/hooks/useNavigate.d.ts +1 -1
- package/react/src/hooks/useParams.d.ts +1 -1
- package/react/src/hooks/useRouter.d.ts +1 -1
- package/react/src/hooks/useSearch.d.ts +1 -1
- package/react/src/hooks/useSearchParams.d.ts +1 -1
- package/react/src/hooks/useToc.d.ts +1 -1
- package/react/src/index.d.ts +1 -1
- package/react/src/lib/collection.d.ts +1 -1
- package/react/src/lib/content.d.ts +1 -1
- package/react/src/lib/head.d.ts +1 -1
- package/react/src/lib/index.d.ts +1 -1
- package/react/src/lib/lazy-route.d.ts +1 -1
- package/react/src/lib/route-loader.d.ts +1 -1
- package/react/src/providers/ContentProvider.d.ts +1 -1
- package/react/src/providers/RerouteProvider.d.ts +1 -1
- package/react/src/providers/RouterProvider.d.ts +1 -1
- package/react/src/providers/index.d.ts +1 -1
- package/react/src/types/any.d.ts +1 -1
- package/react/src/types/index.d.ts +1 -1
- package/react/src/types/router.d.ts +1 -1
- package/telemetry/react.d.ts +1 -1
- package/telemetry/react.js +2 -2
- package/telemetry/react.js.map +1 -1
- package/telemetry/server.d.ts +1 -1
- package/telemetry/server.js +2 -2
- package/telemetry/server.js.map +1 -1
- package/telemetry/src/react/api.d.ts +1 -1
- package/telemetry/src/react/context.d.ts +1 -1
- package/telemetry/src/react/index.d.ts +1 -1
- package/telemetry/src/react/telemetry.d.ts +1 -1
- package/telemetry/src/server/context.d.ts +1 -1
- package/telemetry/src/server/headers/extractor.d.ts +1 -1
- package/telemetry/src/server/headers/index.d.ts +1 -1
- package/telemetry/src/server/headers/presets.d.ts +1 -1
- package/telemetry/src/server/index.d.ts +1 -1
- package/telemetry/src/server/instrumentation.d.ts +1 -1
- package/telemetry/src/server/plugin.d.ts +1 -1
- package/telemetry/src/server/sourcemap.d.ts +1 -1
package/elysia/src/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* reroute-js v0.
|
|
2
|
+
* reroute-js v0.45.0
|
|
3
3
|
*
|
|
4
4
|
* @license MIT
|
|
5
5
|
* @copyright 2026 stewones <hi@stewan.io>
|
|
@@ -18,5 +18,5 @@ export { jsonError, jsonWithCache } from './http';
|
|
|
18
18
|
export { isImageFile, optimizeImage } from './image';
|
|
19
19
|
export { buildLlmsCacheKey, buildLlmsFullCacheKey, buildLlmsIndexCacheKey, type CollectionMeta, type ContentNegotiationConfig, calculateLlmsDefaults, capitalize, cleanPathname, formatByteSize, getCollectionLlmsRoutes, getCollectionMeta, getFormatFromAccept, getRootLlmsRoutes, isLlmsSpecificRoute, type LlmsConfigDefaults, type ParsedContentFormat, parseAcceptHeader, parseContentFormat, shouldEnableContentNegotiation, } from './llms';
|
|
20
20
|
export { buildCacheControl, buildDevCacheControl, type ContentType, createResponse, feedResponse, htmlResponse, jsResponse, markdownResponse, pngResponse, type ResponseOptions, textResponse, xmlResponse, } from './response';
|
|
21
|
-
export { getAssetCacheControl, getHashedFileCacheControl, type ServeFileOptions, serveFile, } from './serving';
|
|
21
|
+
export { type CachedFileData, getAssetCacheControl, getHashedFileCacheControl, type ServeFileOptions, serveFile, } from './serving';
|
|
22
22
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/elysia/src/libs/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE5C,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EACN,KAAK,gBAAgB,EACrB,KAAK,UAAU,EACf,KAAK,iBAAiB,EACtB,UAAU,EACV,UAAU,EACV,YAAY,EACZ,OAAO,EACP,aAAa,EACb,UAAU,EACV,KAAK,cAAc,EACnB,KAAK,EACL,KAAK,aAAa,GAClB,MAAM,WAAW,CAAC;AAEnB,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAElD,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAErD,OAAO,EACN,iBAAiB,EACjB,qBAAqB,EACrB,sBAAsB,EACtB,KAAK,cAAc,EACnB,KAAK,wBAAwB,EAC7B,qBAAqB,EACrB,UAAU,EACV,aAAa,EACb,cAAc,EACd,uBAAuB,EACvB,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACnB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,iBAAiB,EACjB,kBAAkB,EAClB,8BAA8B,GAC9B,MAAM,QAAQ,CAAC;AAEhB,OAAO,EACN,iBAAiB,EACjB,oBAAoB,EACpB,KAAK,WAAW,EAChB,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,gBAAgB,EAChB,WAAW,EACX,KAAK,eAAe,EACpB,YAAY,EACZ,WAAW,GACX,MAAM,YAAY,CAAC;AAEpB,OAAO,EACN,oBAAoB,EACpB,yBAAyB,EACzB,KAAK,gBAAgB,EACrB,SAAS,GACT,MAAM,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/elysia/src/libs/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE5C,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EACN,KAAK,gBAAgB,EACrB,KAAK,UAAU,EACf,KAAK,iBAAiB,EACtB,UAAU,EACV,UAAU,EACV,YAAY,EACZ,OAAO,EACP,aAAa,EACb,UAAU,EACV,KAAK,cAAc,EACnB,KAAK,EACL,KAAK,aAAa,GAClB,MAAM,WAAW,CAAC;AAEnB,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAElD,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAErD,OAAO,EACN,iBAAiB,EACjB,qBAAqB,EACrB,sBAAsB,EACtB,KAAK,cAAc,EACnB,KAAK,wBAAwB,EAC7B,qBAAqB,EACrB,UAAU,EACV,aAAa,EACb,cAAc,EACd,uBAAuB,EACvB,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACnB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,iBAAiB,EACjB,kBAAkB,EAClB,8BAA8B,GAC9B,MAAM,QAAQ,CAAC;AAEhB,OAAO,EACN,iBAAiB,EACjB,oBAAoB,EACpB,KAAK,WAAW,EAChB,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,gBAAgB,EAChB,WAAW,EACX,KAAK,eAAe,EACpB,YAAY,EACZ,WAAW,GACX,MAAM,YAAY,CAAC;AAEpB,OAAO,EACN,KAAK,cAAc,EACnB,oBAAoB,EACpB,yBAAyB,EACzB,KAAK,gBAAgB,EACrB,SAAS,GACT,MAAM,WAAW,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* reroute-js v0.
|
|
2
|
+
* reroute-js v0.45.0
|
|
3
3
|
*
|
|
4
4
|
* @license MIT
|
|
5
5
|
* @copyright 2026 stewones <hi@stewan.io>
|
|
@@ -17,11 +17,21 @@ export interface ServeFileOptions {
|
|
|
17
17
|
compression?: boolean;
|
|
18
18
|
extraHeaders?: Record<string, string>;
|
|
19
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* Cached file data - stores raw bytes and metadata instead of Response objects.
|
|
22
|
+
* This avoids issues with Response.clone() on teed/locked body streams that can
|
|
23
|
+
* cause empty responses on concurrent requests (especially on slow connections).
|
|
24
|
+
*/
|
|
25
|
+
export interface CachedFileData {
|
|
26
|
+
buffer: ArrayBuffer;
|
|
27
|
+
contentType: string;
|
|
28
|
+
contentEncoding?: string;
|
|
29
|
+
}
|
|
20
30
|
/**
|
|
21
31
|
* Serve a static file with caching and optional pre-compressed versions
|
|
22
32
|
* No on-the-fly compression - files should be pre-compressed at build time
|
|
23
33
|
*/
|
|
24
|
-
export declare function serveFile(filePath: string, acceptEncoding: string, fileCache: TTLCache<string,
|
|
34
|
+
export declare function serveFile(filePath: string, acceptEncoding: string, fileCache: TTLCache<string, CachedFileData>, options: ServeFileOptions): Promise<Response>;
|
|
25
35
|
/**
|
|
26
36
|
* Determine cache control for content-hashed files
|
|
27
37
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serving.d.ts","sourceRoot":"","sources":["../../../../../../packages/elysia/src/libs/serving.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAe,KAAK,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAI7D,MAAM,WAAW,gBAAgB;IAChC,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACtC;AAED;;;GAGG;
|
|
1
|
+
{"version":3,"file":"serving.d.ts","sourceRoot":"","sources":["../../../../../../packages/elysia/src/libs/serving.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAe,KAAK,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAI7D,MAAM,WAAW,gBAAgB;IAChC,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACtC;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC9B,MAAM,EAAE,WAAW,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;GAGG;AAEH,wBAAsB,SAAS,CAC9B,QAAQ,EAAE,MAAM,EAChB,cAAc,EAAE,MAAM,EACtB,SAAS,EAAE,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC,EAC3C,OAAO,EAAE,gBAAgB,GACvB,OAAO,CAAC,QAAQ,CAAC,CAsGnB;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CACxC,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,MAAM,EACrB,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,OAAO,GAClB,MAAM,CAeR;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CACnC,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,OAAO,GAClB,MAAM,CAuBR"}
|
package/elysia/src/plugin.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../../packages/elysia/src/plugin.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../../packages/elysia/src/plugin.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAsBrC,QAAA,MAAM,OAAO,SAGL,KAAK,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmjBjB,CAAC;AAEH,OAAO,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* reroute-js v0.
|
|
2
|
+
* reroute-js v0.45.0
|
|
3
3
|
*
|
|
4
4
|
* @license MIT
|
|
5
5
|
* @copyright 2026 stewones <hi@stewan.io>
|
|
@@ -9,11 +9,12 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import type { Elysia } from 'elysia';
|
|
11
11
|
import { type TTLCache } from 'reroute-js/core';
|
|
12
|
+
import { type CachedFileData } from '../libs/serving';
|
|
12
13
|
type ArtifactsOptions = {
|
|
13
14
|
bundleMaxAge: number;
|
|
14
15
|
directive: string;
|
|
15
16
|
isWatchMode?: boolean;
|
|
16
17
|
};
|
|
17
|
-
export declare function registerArtifactsRoutes(app: Elysia, cwd: string, fileCache: TTLCache<string,
|
|
18
|
+
export declare function registerArtifactsRoutes(app: Elysia, cwd: string, fileCache: TTLCache<string, CachedFileData>, options: ArtifactsOptions): Elysia;
|
|
18
19
|
export {};
|
|
19
20
|
//# sourceMappingURL=artifacts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"artifacts.d.ts","sourceRoot":"","sources":["../../../../../../packages/elysia/src/routes/artifacts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAErC,OAAO,EAAQ,KAAK,QAAQ,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"artifacts.d.ts","sourceRoot":"","sources":["../../../../../../packages/elysia/src/routes/artifacts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAErC,OAAO,EAAQ,KAAK,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EACN,KAAK,cAAc,EAGnB,MAAM,iBAAiB,CAAC;AAEzB,KAAK,gBAAgB,GAAG;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,wBAAgB,uBAAuB,CACtC,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,SAAS,EAAE,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC,EAC3C,OAAO,EAAE,gBAAgB,GACvB,MAAM,CA4FR"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* reroute-js v0.
|
|
2
|
+
* reroute-js v0.45.0
|
|
3
3
|
*
|
|
4
4
|
* @license MIT
|
|
5
5
|
* @copyright 2026 stewones <hi@stewan.io>
|
|
@@ -9,13 +9,14 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import type { Elysia } from 'elysia';
|
|
11
11
|
import { type TTLCache } from 'reroute-js/core';
|
|
12
|
+
import { type CachedFileData } from '../libs/serving';
|
|
12
13
|
type StaticRouteOptions = {
|
|
13
14
|
staticAssetsDir: string;
|
|
14
15
|
maxAge: number;
|
|
15
16
|
directive: string;
|
|
16
17
|
staticHeaders?: Record<string, string>;
|
|
17
18
|
shouldIgnore: (file: string) => boolean;
|
|
18
|
-
fileCache: TTLCache<string,
|
|
19
|
+
fileCache: TTLCache<string, CachedFileData>;
|
|
19
20
|
isWatchMode?: boolean;
|
|
20
21
|
compression?: boolean;
|
|
21
22
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"static.d.ts","sourceRoot":"","sources":["../../../../../../packages/elysia/src/routes/static.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAErC,OAAO,EAIN,KAAK,QAAQ,EACb,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"static.d.ts","sourceRoot":"","sources":["../../../../../../packages/elysia/src/routes/static.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAErC,OAAO,EAIN,KAAK,QAAQ,EACb,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,KAAK,cAAc,EAAwB,MAAM,iBAAiB,CAAC;AAkB5E,KAAK,kBAAkB,GAAG;IACzB,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACvC,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;IACxC,SAAS,EAAE,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IAC5C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,wBAAgB,oBAAoB,CACnC,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,kBAAkB,GACzB,MAAM,CAwKR"}
|
package/elysia/src/types.d.ts
CHANGED
package/package.json
CHANGED
package/react/index.d.ts
CHANGED
package/react/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* reroute-js v0.
|
|
2
|
+
* reroute-js v0.45.0
|
|
3
3
|
*
|
|
4
4
|
* @license MIT
|
|
5
5
|
* @copyright 2026 stewones <hi@stewan.io>
|
|
@@ -1796,6 +1796,14 @@ var isThenable = (value) => {
|
|
|
1796
1796
|
var isLazyLoadMarker2 = (value) => {
|
|
1797
1797
|
return typeof value === "object" && value !== null && value.__lazy__ === true && typeof value.__fetch__ === "string";
|
|
1798
1798
|
};
|
|
1799
|
+
var isInitialHydration = () => {
|
|
1800
|
+
try {
|
|
1801
|
+
const g = globalThis;
|
|
1802
|
+
return !!g.__REROUTE_INITIAL_HYDRATION__;
|
|
1803
|
+
} catch {
|
|
1804
|
+
return false;
|
|
1805
|
+
}
|
|
1806
|
+
};
|
|
1799
1807
|
var hasNestedLazyMarker = (topLevelData, key) => {
|
|
1800
1808
|
if (!topLevelData || typeof topLevelData !== "object") {
|
|
1801
1809
|
return false;
|
|
@@ -1830,6 +1838,15 @@ function useData(key) {
|
|
|
1830
1838
|
}
|
|
1831
1839
|
}
|
|
1832
1840
|
}, [currentUrl]);
|
|
1841
|
+
useEffect5(() => {
|
|
1842
|
+
if (typeof window !== "undefined" && isInitialHydration()) {
|
|
1843
|
+
requestAnimationFrame(() => {
|
|
1844
|
+
try {
|
|
1845
|
+
delete globalThis.__REROUTE_INITIAL_HYDRATION__;
|
|
1846
|
+
} catch {}
|
|
1847
|
+
});
|
|
1848
|
+
}
|
|
1849
|
+
}, []);
|
|
1833
1850
|
const pathname = currentUrl;
|
|
1834
1851
|
const k = key || pathname;
|
|
1835
1852
|
useEffect5(() => {
|
|
@@ -1990,7 +2007,23 @@ function useData(key) {
|
|
|
1990
2007
|
try {
|
|
1991
2008
|
const source = typeof window === "undefined" ? globalThis.__REROUTE_DATA__ : window.__REROUTE_DATA__;
|
|
1992
2009
|
let value = source?.[k];
|
|
2010
|
+
if (typeof value === "object" && value !== null && value.__reroute_multiple__ === true) {
|
|
2011
|
+
const multipleData = value;
|
|
2012
|
+
if (k in multipleData && k !== "__reroute_multiple__") {
|
|
2013
|
+
value = multipleData[k];
|
|
2014
|
+
} else {
|
|
2015
|
+
for (const [key2, val] of Object.entries(multipleData)) {
|
|
2016
|
+
if (key2 !== "__reroute_multiple__" && !key2.startsWith("__layout:")) {
|
|
2017
|
+
value = val;
|
|
2018
|
+
break;
|
|
2019
|
+
}
|
|
2020
|
+
}
|
|
2021
|
+
}
|
|
2022
|
+
}
|
|
1993
2023
|
if (value === undefined && typeof window !== "undefined") {
|
|
2024
|
+
if (isInitialHydration()) {
|
|
2025
|
+
return;
|
|
2026
|
+
}
|
|
1994
2027
|
const w = window;
|
|
1995
2028
|
w.__REROUTE_DATA_PENDING__ = w.__REROUTE_DATA_PENDING__ || {};
|
|
1996
2029
|
const pending = w.__REROUTE_DATA_PENDING__;
|
|
@@ -2072,9 +2105,25 @@ function useData(key) {
|
|
|
2072
2105
|
}
|
|
2073
2106
|
}
|
|
2074
2107
|
if (typeof value === "object" && value !== null && value.__reroute_multiple__ === true) {
|
|
2075
|
-
|
|
2108
|
+
const multipleData = value;
|
|
2109
|
+
if (k in multipleData && k !== "__reroute_multiple__") {
|
|
2110
|
+
value = multipleData[k];
|
|
2111
|
+
} else {
|
|
2112
|
+
for (const [key2, val] of Object.entries(multipleData)) {
|
|
2113
|
+
if (key2 !== "__reroute_multiple__" && !key2.startsWith("__layout:")) {
|
|
2114
|
+
value = val;
|
|
2115
|
+
break;
|
|
2116
|
+
}
|
|
2117
|
+
}
|
|
2118
|
+
}
|
|
2119
|
+
if (value === undefined || typeof value === "object" && value !== null && value.__reroute_multiple__ === true) {
|
|
2120
|
+
return;
|
|
2121
|
+
}
|
|
2076
2122
|
}
|
|
2077
2123
|
if (isLazyLoadMarker2(value)) {
|
|
2124
|
+
if (isInitialHydration()) {
|
|
2125
|
+
return;
|
|
2126
|
+
}
|
|
2078
2127
|
const fetchUrl = value.__fetch__;
|
|
2079
2128
|
if (typeof window !== "undefined") {
|
|
2080
2129
|
const w = window;
|
|
@@ -2104,6 +2153,9 @@ function useData(key) {
|
|
|
2104
2153
|
return;
|
|
2105
2154
|
}
|
|
2106
2155
|
if (isThenable(value)) {
|
|
2156
|
+
if (isInitialHydration()) {
|
|
2157
|
+
return;
|
|
2158
|
+
}
|
|
2107
2159
|
throw value;
|
|
2108
2160
|
}
|
|
2109
2161
|
return value;
|
|
@@ -2151,6 +2203,14 @@ import { useEffect as useEffect6, useMemo as useMemo7, useState as useState6 } f
|
|
|
2151
2203
|
var isThenable2 = (value) => {
|
|
2152
2204
|
return typeof value === "object" && value !== null && typeof value.then === "function";
|
|
2153
2205
|
};
|
|
2206
|
+
var isInitialHydration2 = () => {
|
|
2207
|
+
try {
|
|
2208
|
+
const g = globalThis;
|
|
2209
|
+
return !!g.__REROUTE_INITIAL_HYDRATION__;
|
|
2210
|
+
} catch {
|
|
2211
|
+
return false;
|
|
2212
|
+
}
|
|
2213
|
+
};
|
|
2154
2214
|
function useLayoutData() {
|
|
2155
2215
|
const { pathname } = useRouter();
|
|
2156
2216
|
const [_tick, setTick] = useState6(0);
|
|
@@ -2251,6 +2311,9 @@ function useLayoutData() {
|
|
|
2251
2311
|
value = source?.["__layout:/"];
|
|
2252
2312
|
}
|
|
2253
2313
|
if (typeof value === "object" && value !== null && value.__lazy__ === true) {
|
|
2314
|
+
if (isInitialHydration2()) {
|
|
2315
|
+
return;
|
|
2316
|
+
}
|
|
2254
2317
|
const fetchUrl = value.__fetch__;
|
|
2255
2318
|
if (typeof fetchUrl === "string" && typeof window !== "undefined") {
|
|
2256
2319
|
const w = window;
|
|
@@ -2283,6 +2346,9 @@ function useLayoutData() {
|
|
|
2283
2346
|
return;
|
|
2284
2347
|
}
|
|
2285
2348
|
if (isThenable2(value)) {
|
|
2349
|
+
if (isInitialHydration2()) {
|
|
2350
|
+
return;
|
|
2351
|
+
}
|
|
2286
2352
|
throw value;
|
|
2287
2353
|
}
|
|
2288
2354
|
return value;
|
|
@@ -3339,4 +3405,4 @@ export {
|
|
|
3339
3405
|
ClientOnly
|
|
3340
3406
|
};
|
|
3341
3407
|
|
|
3342
|
-
//# debugId=
|
|
3408
|
+
//# debugId=7025E25680C31EAA64756E2164756E21
|