reroute-js 1.0.0-alpha.1 → 1.0.0-alpha.10
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/README.md +7 -3
- package/cli/bin.d.ts +1 -1
- package/cli/bin.js +1248 -779
- package/cli/bin.js.map +25 -24
- package/cli/index.d.ts +1 -1
- package/cli/index.js +93 -28
- package/cli/index.js.map +4 -4
- 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 +5 -6
- package/cli/src/commands/dev.d.ts.map +1 -1
- package/cli/src/commands/gen.d.ts +4 -1
- package/cli/src/commands/gen.d.ts.map +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 +7 -1
- package/cli/src/commands/lib/bundler.d.ts.map +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 +2 -1
- package/cli/src/commands/lib/server.d.ts.map +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/terminal-ui.d.ts +1 -1
- package/cli/src/commands/lib/theme.d.ts +17 -3
- package/cli/src/commands/lib/theme.d.ts.map +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 +589 -226
- package/core/index.js.map +19 -18
- package/core/src/bundler/hash.d.ts +1 -1
- package/core/src/bundler/index.d.ts +1 -1
- package/core/src/config.d.ts +32 -2
- package/core/src/config.d.ts.map +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/i18n/catalog.d.ts +1 -1
- package/core/src/i18n/discover.d.ts +1 -1
- package/core/src/i18n/index.d.ts +1 -1
- package/core/src/i18n/messages.d.ts +1 -1
- package/core/src/i18n/negotiate.d.ts +1 -1
- package/core/src/i18n/pathname.d.ts +1 -1
- package/core/src/i18n/resolve.d.ts +4 -3
- package/core/src/i18n/resolve.d.ts.map +1 -1
- package/core/src/i18n/types.d.ts +5 -1
- package/core/src/i18n/types.d.ts.map +1 -1
- package/core/src/index.d.ts +1 -1
- package/core/src/llms/discovery.d.ts +35 -0
- package/core/src/llms/discovery.d.ts.map +1 -0
- 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 +3 -1
- package/core/src/llms/full-generator.d.ts.map +1 -1
- package/core/src/llms/index-generator.d.ts +5 -2
- package/core/src/llms/index-generator.d.ts.map +1 -1
- package/core/src/llms/index.d.ts +4 -1
- package/core/src/llms/index.d.ts.map +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/generator.d.ts.map +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 +7 -2
- package/core/src/sitemap/discovery.d.ts.map +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/cleanup.d.ts +1 -1
- package/core/src/ssr/lib/collections.d.ts +17 -1
- package/core/src/ssr/lib/collections.d.ts.map +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/content-path.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 +8 -3
- package/core/src/ssr/lib/imports.d.ts.map +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/route-match.d.ts +1 -1
- package/core/src/ssr/lib/scripts/collections.d.ts +2 -2
- package/core/src/ssr/lib/scripts/collections.d.ts.map +1 -1
- package/core/src/ssr/lib/scripts/data.d.ts +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 +6 -1
- package/core/src/ssr/lib/seed.d.ts.map +1 -1
- package/core/src/ssr/lib/serialize.d.ts +1 -1
- package/core/src/ssr/lib/setup.d.ts +2 -2
- package/core/src/ssr/lib/setup.d.ts.map +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 +15 -1
- package/core/src/ssr/lib/types.d.ts.map +1 -1
- package/core/src/ssr/render.d.ts +1 -1
- package/core/src/ssr/render.d.ts.map +1 -1
- package/core/src/ssr/stream.d.ts +1 -1
- package/core/src/ssr/stream.d.ts.map +1 -1
- package/elysia/index.d.ts +1 -1
- package/elysia/index.js +783 -304
- package/elysia/index.js.map +26 -24
- 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/i18n.d.ts +2 -2
- package/elysia/src/libs/i18n.d.ts.map +1 -1
- package/elysia/src/libs/image.d.ts +1 -1
- package/elysia/src/libs/index.d.ts +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 +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 +1 -1
- package/elysia/src/routes/content.d.ts +2 -2
- package/elysia/src/routes/content.d.ts.map +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 +3 -2
- package/elysia/src/routes/internal.d.ts.map +1 -1
- package/elysia/src/routes/llms.d.ts +1 -1
- package/elysia/src/routes/llms.d.ts.map +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 +4 -2
- package/elysia/src/routes/ssr.d.ts.map +1 -1
- package/elysia/src/routes/static.d.ts +1 -1
- package/elysia/src/routes/themeCssRefresh.d.ts +17 -0
- package/elysia/src/routes/themeCssRefresh.d.ts.map +1 -0
- package/elysia/src/types.d.ts +1 -1
- package/package.json +1 -1
- package/react/index.d.ts +1 -1
- package/react/index.js +82 -96
- 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 +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/useContent.d.ts.map +1 -1
- package/react/src/hooks/useData.d.ts +1 -1
- package/react/src/hooks/useFeed.d.ts +1 -1
- package/react/src/hooks/useLayoutData.d.ts +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/i18n/LocaleProvider.d.ts +1 -1
- package/react/src/i18n/LocaleProvider.d.ts.map +1 -1
- package/react/src/i18n/helpers.d.ts +1 -1
- package/react/src/i18n/index.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 +16 -16
- package/telemetry/react.js.map +2 -2
- package/telemetry/server.d.ts +1 -1
- package/telemetry/server.js +51 -228
- package/telemetry/server.js.map +16 -13
- 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/cli/bin.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
// @bun
|
|
3
3
|
/**
|
|
4
|
-
* reroute-js v1.0.0-alpha.
|
|
4
|
+
* reroute-js v1.0.0-alpha.10
|
|
5
5
|
*
|
|
6
6
|
* @license MIT
|
|
7
7
|
* @copyright 2026 stewones <hi@stewan.io>
|
|
@@ -30,12 +30,14 @@ var __toESM = (mod, isNodeMode, target) => {
|
|
|
30
30
|
}
|
|
31
31
|
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
32
32
|
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
if (mod && typeof mod === "object" || typeof mod === "function") {
|
|
34
|
+
for (let key of __getOwnPropNames(mod))
|
|
35
|
+
if (!__hasOwnProp.call(to, key))
|
|
36
|
+
__defProp(to, key, {
|
|
37
|
+
get: __accessProp.bind(mod, key),
|
|
38
|
+
enumerable: true
|
|
39
|
+
});
|
|
40
|
+
}
|
|
39
41
|
if (canCache)
|
|
40
42
|
cache.set(mod, to);
|
|
41
43
|
return to;
|
|
@@ -66,7 +68,7 @@ async function getVersionString() {
|
|
|
66
68
|
}
|
|
67
69
|
async function getVersion() {
|
|
68
70
|
if (true) {
|
|
69
|
-
return "1.0.0-alpha.
|
|
71
|
+
return "1.0.0-alpha.10";
|
|
70
72
|
}
|
|
71
73
|
const possiblePaths = [
|
|
72
74
|
path.join(import.meta.dir, "../../../../package.json"),
|
|
@@ -84,7 +86,7 @@ async function getVersion() {
|
|
|
84
86
|
}
|
|
85
87
|
async function getCommit() {
|
|
86
88
|
if (true) {
|
|
87
|
-
return "
|
|
89
|
+
return "15e30bf";
|
|
88
90
|
}
|
|
89
91
|
return "dev";
|
|
90
92
|
}
|
|
@@ -726,14 +728,14 @@ var init_negotiate = () => {};
|
|
|
726
728
|
// packages/core/src/i18n/pathname.ts
|
|
727
729
|
var exports_pathname = {};
|
|
728
730
|
__export(exports_pathname, {
|
|
729
|
-
|
|
730
|
-
parseContentPath: () => parseContentPath,
|
|
731
|
-
normalizePathname: () => normalizePathname,
|
|
732
|
-
looksLikeLocale: () => looksLikeLocale,
|
|
733
|
-
localizeHref: () => localizeHref,
|
|
734
|
-
localizeContentHref: () => localizeContentHref,
|
|
731
|
+
contentKey: () => contentKey,
|
|
735
732
|
hreflangTags: () => hreflangTags,
|
|
736
|
-
|
|
733
|
+
localizeContentHref: () => localizeContentHref,
|
|
734
|
+
localizeHref: () => localizeHref,
|
|
735
|
+
looksLikeLocale: () => looksLikeLocale,
|
|
736
|
+
normalizePathname: () => normalizePathname,
|
|
737
|
+
parseContentPath: () => parseContentPath,
|
|
738
|
+
toOgLocale: () => toOgLocale
|
|
737
739
|
});
|
|
738
740
|
function looksLikeLocale(segment) {
|
|
739
741
|
return /^[a-z]{2}(?:-[A-Za-z0-9]{2,8})*$/i.test(segment);
|
|
@@ -816,9 +818,30 @@ function hreflangTags(baseUrl, collection, name, locales, defaultLocale) {
|
|
|
816
818
|
var init_pathname = () => {};
|
|
817
819
|
|
|
818
820
|
// packages/core/src/i18n/resolve.ts
|
|
821
|
+
function canonicalLocale(value, availableLocales) {
|
|
822
|
+
return availableLocales.find((l) => l.toLowerCase() === value.toLowerCase()) || value;
|
|
823
|
+
}
|
|
824
|
+
function parseLangParam(search, isAvailable, availableLocales) {
|
|
825
|
+
if (!search)
|
|
826
|
+
return;
|
|
827
|
+
const params = new URLSearchParams(search.startsWith("?") ? search.slice(1) : search);
|
|
828
|
+
const raw = params.get("lang") ?? undefined;
|
|
829
|
+
if (!isAvailable(raw))
|
|
830
|
+
return;
|
|
831
|
+
return canonicalLocale(raw, availableLocales);
|
|
832
|
+
}
|
|
833
|
+
function stripLangParam(search) {
|
|
834
|
+
if (!search)
|
|
835
|
+
return "";
|
|
836
|
+
const params = new URLSearchParams(search.startsWith("?") ? search.slice(1) : search);
|
|
837
|
+
params.delete("lang");
|
|
838
|
+
const rest = params.toString();
|
|
839
|
+
return rest ? `?${rest}` : "";
|
|
840
|
+
}
|
|
819
841
|
function resolveLocale(input) {
|
|
820
842
|
const {
|
|
821
843
|
pathname,
|
|
844
|
+
search,
|
|
822
845
|
cookieHeader,
|
|
823
846
|
acceptLanguage,
|
|
824
847
|
availableLocales,
|
|
@@ -829,14 +852,32 @@ function resolveLocale(input) {
|
|
|
829
852
|
const parsed = parseContentPath(pathname, availableLocales, collections);
|
|
830
853
|
const availableLower = new Set(availableLocales.map((l) => l.toLowerCase()));
|
|
831
854
|
const isAvailable = (locale) => !!locale && availableLower.has(locale.toLowerCase());
|
|
855
|
+
const routingPathname = parsed?.routingPathname ?? pathname.split("?")[0];
|
|
856
|
+
const restSearch = stripLangParam(search);
|
|
857
|
+
const queryLocale = parseLangParam(search, isAvailable, availableLocales);
|
|
858
|
+
if (queryLocale) {
|
|
859
|
+
const target = parsed ? localizeContentHref(parsed.collection, parsed.name, queryLocale, defaultLocale) : routingPathname;
|
|
860
|
+
return {
|
|
861
|
+
locale: queryLocale,
|
|
862
|
+
routingPathname,
|
|
863
|
+
fromPath: false,
|
|
864
|
+
fromQuery: true,
|
|
865
|
+
redirectTo: `${target}${restSearch}`,
|
|
866
|
+
parsed: parsed ? {
|
|
867
|
+
...parsed,
|
|
868
|
+
locale: queryLocale === defaultLocale ? undefined : queryLocale
|
|
869
|
+
} : undefined
|
|
870
|
+
};
|
|
871
|
+
}
|
|
832
872
|
if (parsed?.locale && isAvailable(parsed.locale)) {
|
|
833
|
-
const locale =
|
|
873
|
+
const locale = canonicalLocale(parsed.locale, availableLocales);
|
|
834
874
|
if (locale === defaultLocale && parsed.pathname !== parsed.routingPathname) {
|
|
835
875
|
return {
|
|
836
876
|
locale,
|
|
837
877
|
routingPathname: parsed.routingPathname,
|
|
838
878
|
fromPath: true,
|
|
839
|
-
|
|
879
|
+
fromQuery: false,
|
|
880
|
+
redirectTo: `${parsed.routingPathname}${restSearch}`,
|
|
840
881
|
parsed: { ...parsed, locale }
|
|
841
882
|
};
|
|
842
883
|
}
|
|
@@ -844,17 +885,18 @@ function resolveLocale(input) {
|
|
|
844
885
|
locale,
|
|
845
886
|
routingPathname: parsed.routingPathname,
|
|
846
887
|
fromPath: true,
|
|
888
|
+
fromQuery: false,
|
|
847
889
|
parsed: { ...parsed, locale }
|
|
848
890
|
};
|
|
849
891
|
}
|
|
850
|
-
const routingPathname = parsed?.routingPathname ?? pathname.split("?")[0];
|
|
851
892
|
const cookieLocale = parseCookieValue(cookieHeader, cookieName);
|
|
852
893
|
if (isAvailable(cookieLocale)) {
|
|
853
|
-
const locale =
|
|
894
|
+
const locale = canonicalLocale(cookieLocale, availableLocales);
|
|
854
895
|
return {
|
|
855
896
|
locale,
|
|
856
897
|
routingPathname,
|
|
857
898
|
fromPath: false,
|
|
899
|
+
fromQuery: false,
|
|
858
900
|
parsed: parsed ? { ...parsed, locale: undefined } : undefined
|
|
859
901
|
};
|
|
860
902
|
}
|
|
@@ -863,13 +905,14 @@ function resolveLocale(input) {
|
|
|
863
905
|
locale: negotiated,
|
|
864
906
|
routingPathname,
|
|
865
907
|
fromPath: false,
|
|
908
|
+
fromQuery: false,
|
|
866
909
|
parsed: parsed ? { ...parsed, locale: undefined } : undefined
|
|
867
910
|
};
|
|
868
911
|
}
|
|
869
912
|
function contentNegotiateRedirect(resolution, defaultLocale, enabled) {
|
|
870
913
|
if (!enabled)
|
|
871
914
|
return;
|
|
872
|
-
if (resolution.fromPath)
|
|
915
|
+
if (resolution.fromPath || resolution.fromQuery)
|
|
873
916
|
return;
|
|
874
917
|
if (resolution.locale === defaultLocale)
|
|
875
918
|
return;
|
|
@@ -1385,11 +1428,39 @@ function cleanupPathScopedSSRData(pathname) {
|
|
|
1385
1428
|
}
|
|
1386
1429
|
|
|
1387
1430
|
// packages/core/src/ssr/lib/imports.ts
|
|
1431
|
+
import { copyFile, realpath, stat as stat3, unlink } from "node:fs/promises";
|
|
1432
|
+
import { basename as basename2, dirname, extname as extname2, join as join4 } from "node:path";
|
|
1388
1433
|
import { pathToFileURL as pathToFileURL3 } from "node:url";
|
|
1434
|
+
function clearWatchImportCache() {
|
|
1435
|
+
watchImportCache.clear();
|
|
1436
|
+
}
|
|
1437
|
+
function bustCopyPath(absolutePath) {
|
|
1438
|
+
const dir = dirname(absolutePath);
|
|
1439
|
+
const ext = extname2(absolutePath);
|
|
1440
|
+
const base = basename2(absolutePath, ext);
|
|
1441
|
+
const token = `${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 8)}`;
|
|
1442
|
+
return join4(dir, `${base}.bust-${token}${ext}`);
|
|
1443
|
+
}
|
|
1389
1444
|
async function dynamicImport(absolutePath, isWatchMode) {
|
|
1390
1445
|
const href = pathToFileURL3(absolutePath).href;
|
|
1391
|
-
|
|
1392
|
-
|
|
1446
|
+
if (!isWatchMode) {
|
|
1447
|
+
return await import(href);
|
|
1448
|
+
}
|
|
1449
|
+
const resolved = await realpath(absolutePath);
|
|
1450
|
+
const mtimeMs = (await stat3(resolved)).mtimeMs;
|
|
1451
|
+
const cached = watchImportCache.get(resolved);
|
|
1452
|
+
if (cached && cached.mtimeMs === mtimeMs) {
|
|
1453
|
+
return cached.mod;
|
|
1454
|
+
}
|
|
1455
|
+
const tmp = bustCopyPath(resolved);
|
|
1456
|
+
await copyFile(resolved, tmp);
|
|
1457
|
+
try {
|
|
1458
|
+
const mod = await import(pathToFileURL3(tmp).href);
|
|
1459
|
+
watchImportCache.set(resolved, { mtimeMs, mod });
|
|
1460
|
+
return mod;
|
|
1461
|
+
} finally {
|
|
1462
|
+
await unlink(tmp).catch(() => {});
|
|
1463
|
+
}
|
|
1393
1464
|
}
|
|
1394
1465
|
function isThenable(value) {
|
|
1395
1466
|
return typeof value === "object" && value !== null && typeof value.then === "function";
|
|
@@ -1397,7 +1468,10 @@ function isThenable(value) {
|
|
|
1397
1468
|
function toPromise(input) {
|
|
1398
1469
|
return input instanceof Promise ? input : Promise.resolve(input);
|
|
1399
1470
|
}
|
|
1400
|
-
var
|
|
1471
|
+
var watchImportCache;
|
|
1472
|
+
var init_imports = __esm(() => {
|
|
1473
|
+
watchImportCache = new Map;
|
|
1474
|
+
});
|
|
1401
1475
|
|
|
1402
1476
|
// packages/core/src/ssr/lib/collections.ts
|
|
1403
1477
|
async function loadCollections(cwd, isWatchMode) {
|
|
@@ -1414,6 +1488,21 @@ function setGlobalCollections(byCollectionForSSR) {
|
|
|
1414
1488
|
globalThis.__REROUTE_COLLECTIONS__ = byCollectionForSSR;
|
|
1415
1489
|
} catch {}
|
|
1416
1490
|
}
|
|
1491
|
+
function resetSSRContentResults() {
|
|
1492
|
+
try {
|
|
1493
|
+
globalThis.__REROUTE_SSR_RESULTS__ = {};
|
|
1494
|
+
} catch {}
|
|
1495
|
+
}
|
|
1496
|
+
function takeSSRContentResults() {
|
|
1497
|
+
try {
|
|
1498
|
+
const g = globalThis;
|
|
1499
|
+
const results = g.__REROUTE_SSR_RESULTS__;
|
|
1500
|
+
g.__REROUTE_SSR_RESULTS__ = {};
|
|
1501
|
+
return results;
|
|
1502
|
+
} catch {
|
|
1503
|
+
return;
|
|
1504
|
+
}
|
|
1505
|
+
}
|
|
1417
1506
|
var init_collections = __esm(() => {
|
|
1418
1507
|
init_imports();
|
|
1419
1508
|
});
|
|
@@ -2187,7 +2276,7 @@ var init_compute = __esm(() => {
|
|
|
2187
2276
|
});
|
|
2188
2277
|
|
|
2189
2278
|
// packages/core/src/ssr/lib/modules.ts
|
|
2190
|
-
import { readdir as readdir4, stat as
|
|
2279
|
+
import { readdir as readdir4, stat as stat4 } from "node:fs/promises";
|
|
2191
2280
|
async function importContentModuleForPath(pathname, clientDir, cwd, isWatchMode) {
|
|
2192
2281
|
try {
|
|
2193
2282
|
const resolved = resolveContentPathParts(pathname);
|
|
@@ -2245,7 +2334,7 @@ async function tryChunkImport(collection, name, cwd, isWatchMode) {
|
|
|
2245
2334
|
let latestM = 0;
|
|
2246
2335
|
for (const f of matches) {
|
|
2247
2336
|
try {
|
|
2248
|
-
const s = await
|
|
2337
|
+
const s = await stat4(join2(chunkDir, f));
|
|
2249
2338
|
if (s.mtimeMs >= latestM) {
|
|
2250
2339
|
latestM = s.mtimeMs;
|
|
2251
2340
|
latest = f;
|
|
@@ -2302,6 +2391,16 @@ function touchModule(key) {
|
|
|
2302
2391
|
evictLRUModule();
|
|
2303
2392
|
}
|
|
2304
2393
|
}
|
|
2394
|
+
function clearSSRModuleStores() {
|
|
2395
|
+
const g = globalThis;
|
|
2396
|
+
if (g.__REROUTE_SSR_MODULES__) {
|
|
2397
|
+
g.__REROUTE_SSR_MODULES__ = {};
|
|
2398
|
+
}
|
|
2399
|
+
if (g.__REROUTE_SSR_EXPORTS__) {
|
|
2400
|
+
g.__REROUTE_SSR_EXPORTS__ = {};
|
|
2401
|
+
}
|
|
2402
|
+
moduleAccessOrder.length = 0;
|
|
2403
|
+
}
|
|
2305
2404
|
async function seedSSRModuleForPath(pathname, clientDir, cwd, isWatchMode) {
|
|
2306
2405
|
try {
|
|
2307
2406
|
const resolved = resolveContentPathParts(pathname);
|
|
@@ -3286,7 +3385,7 @@ var init_metadata2 = __esm(() => {
|
|
|
3286
3385
|
});
|
|
3287
3386
|
|
|
3288
3387
|
// packages/core/src/ssr/lib/preload.ts
|
|
3289
|
-
import { readdir as readdir6, stat as
|
|
3388
|
+
import { readdir as readdir6, stat as stat5 } from "node:fs/promises";
|
|
3290
3389
|
async function preloadContentModule(pathname, clientDir, cwd, isWatchMode) {
|
|
3291
3390
|
let extraHead = "";
|
|
3292
3391
|
let hydrationScript = "";
|
|
@@ -3320,14 +3419,14 @@ async function isContentCollection(clientDir, collection) {
|
|
|
3320
3419
|
if (isProduction) {
|
|
3321
3420
|
const collectionFile = join2(clientDir, "collections", `${collection}.js`);
|
|
3322
3421
|
try {
|
|
3323
|
-
const s2 = await
|
|
3422
|
+
const s2 = await stat5(collectionFile);
|
|
3324
3423
|
return s2?.isFile() ?? false;
|
|
3325
3424
|
} catch {
|
|
3326
3425
|
return false;
|
|
3327
3426
|
}
|
|
3328
3427
|
}
|
|
3329
3428
|
const maybeDir = join2(clientDir, "routes", collection, "content");
|
|
3330
|
-
const s = await
|
|
3429
|
+
const s = await stat5(maybeDir);
|
|
3331
3430
|
return typeof s?.isDirectory === "function" ? s.isDirectory() : true;
|
|
3332
3431
|
} catch {
|
|
3333
3432
|
return false;
|
|
@@ -3338,7 +3437,7 @@ async function findLatestCandidate(chunkDir, candidates) {
|
|
|
3338
3437
|
let latestM = 0;
|
|
3339
3438
|
for (const candidateName of candidates) {
|
|
3340
3439
|
try {
|
|
3341
|
-
const s = await
|
|
3440
|
+
const s = await stat5(join2(chunkDir, candidateName));
|
|
3342
3441
|
if (s.mtimeMs >= latestM) {
|
|
3343
3442
|
latestM = s.mtimeMs;
|
|
3344
3443
|
latest = candidateName;
|
|
@@ -3524,23 +3623,34 @@ function parseAccessTracking(accessedCollections) {
|
|
|
3524
3623
|
}
|
|
3525
3624
|
return usage;
|
|
3526
3625
|
}
|
|
3527
|
-
function
|
|
3626
|
+
function processCapturedResults(capturedResults, byCollectionForSSR) {
|
|
3528
3627
|
const subset = {};
|
|
3529
3628
|
const partial = {};
|
|
3530
3629
|
try {
|
|
3531
3630
|
const g = globalThis;
|
|
3532
|
-
const ssrResults = g.__REROUTE_SSR_RESULTS__;
|
|
3533
|
-
if (ssrResults
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
|
|
3537
|
-
|
|
3538
|
-
|
|
3539
|
-
|
|
3631
|
+
const ssrResults = capturedResults ?? g.__REROUTE_SSR_RESULTS__;
|
|
3632
|
+
if (!ssrResults || typeof ssrResults !== "object")
|
|
3633
|
+
return;
|
|
3634
|
+
for (const [collection, items] of Object.entries(ssrResults)) {
|
|
3635
|
+
if (Array.isArray(items) && items.length > 0) {
|
|
3636
|
+
subset[collection] = items;
|
|
3637
|
+
const full = byCollectionForSSR?.[collection] || [];
|
|
3638
|
+
partial[collection] = items.length < full.length;
|
|
3540
3639
|
}
|
|
3541
|
-
return { subset, partial };
|
|
3542
3640
|
}
|
|
3543
|
-
} catch {
|
|
3641
|
+
} catch {
|
|
3642
|
+
return;
|
|
3643
|
+
}
|
|
3644
|
+
if (Object.keys(subset).length === 0)
|
|
3645
|
+
return;
|
|
3646
|
+
return { subset, partial };
|
|
3647
|
+
}
|
|
3648
|
+
function processCollections(accessedCollections, byCollectionForSSR, capturedResults) {
|
|
3649
|
+
const captured = processCapturedResults(capturedResults, byCollectionForSSR);
|
|
3650
|
+
if (captured)
|
|
3651
|
+
return captured;
|
|
3652
|
+
const subset = {};
|
|
3653
|
+
const partial = {};
|
|
3544
3654
|
const sortByDate = (order) => (a, b) => {
|
|
3545
3655
|
const da = a?.meta?.date ? Date.parse(String(a.meta.date)) : 0;
|
|
3546
3656
|
const db = b?.meta?.date ? Date.parse(String(b.meta.date)) : 0;
|
|
@@ -3726,15 +3836,15 @@ var init_scripts = __esm(() => {
|
|
|
3726
3836
|
// packages/core/src/ssr/lib/styles.ts
|
|
3727
3837
|
async function inlineThemeCSS(clientDir, minify = false, isWatchMode = false) {
|
|
3728
3838
|
try {
|
|
3839
|
+
if (isWatchMode) {
|
|
3840
|
+
const timestamp = Date.now();
|
|
3841
|
+
return `<link rel="stylesheet" href="/.reroute/index.css?t=${timestamp}" data-reroute="theme">`;
|
|
3842
|
+
}
|
|
3729
3843
|
const bundledCss = globalThis.__REROUTE_THEME_CSS__;
|
|
3730
3844
|
if (bundledCss) {
|
|
3731
3845
|
const css2 = minify ? minifyCSS(bundledCss) : bundledCss;
|
|
3732
3846
|
return `<style data-reroute="theme">${css2}</style>`;
|
|
3733
3847
|
}
|
|
3734
|
-
if (isWatchMode) {
|
|
3735
|
-
const timestamp = Date.now();
|
|
3736
|
-
return `<link rel="stylesheet" href="/.reroute/index.css?t=${timestamp}" data-reroute="theme">`;
|
|
3737
|
-
}
|
|
3738
3848
|
const candidates = [
|
|
3739
3849
|
join2(clientDir, "..", ".reroute", "index.css"),
|
|
3740
3850
|
join2(clientDir, "..", "..", ".reroute", "index.css"),
|
|
@@ -3829,6 +3939,7 @@ async function performSSRSetupInternal(options, streaming, timeoutState) {
|
|
|
3829
3939
|
});
|
|
3830
3940
|
assertNotTimedOut();
|
|
3831
3941
|
resetSSRAccessTracking();
|
|
3942
|
+
resetSSRContentResults();
|
|
3832
3943
|
const bundlePreload = createBundlePreload(bundleUrl);
|
|
3833
3944
|
const preloadResult = await withSpan("ssr.preload", async (span) => {
|
|
3834
3945
|
span.setAttribute("pathname", pathname);
|
|
@@ -3904,12 +4015,12 @@ async function performSSRSetupInternal(options, streaming, timeoutState) {
|
|
|
3904
4015
|
pending: computeResult.pending
|
|
3905
4016
|
};
|
|
3906
4017
|
}
|
|
3907
|
-
function generateCollectionScripts(byCollectionForSSR) {
|
|
4018
|
+
function generateCollectionScripts(byCollectionForSSR, capturedResults) {
|
|
3908
4019
|
try {
|
|
3909
4020
|
const g = globalThis;
|
|
3910
4021
|
const acc = g.__REROUTE_SSR_ACCESSED__;
|
|
3911
4022
|
if (acc) {
|
|
3912
|
-
const { subset, partial } = processCollections(acc, byCollectionForSSR);
|
|
4023
|
+
const { subset, partial } = processCollections(acc, byCollectionForSSR, capturedResults);
|
|
3913
4024
|
if (Object.keys(subset).length > 0) {
|
|
3914
4025
|
return createCollectionScript(subset, partial);
|
|
3915
4026
|
}
|
|
@@ -4061,13 +4172,16 @@ async function renderSSRDocument(options) {
|
|
|
4061
4172
|
}, false);
|
|
4062
4173
|
const duplicatedData = duplicateQueryParamData(setup2.ssrData);
|
|
4063
4174
|
setGlobalSSRData(duplicatedData);
|
|
4175
|
+
let capturedResults;
|
|
4064
4176
|
const appHtml = await withSpan("ssr.render.react", async (span) => {
|
|
4065
4177
|
const componentWithPathname = cloneElement(rootComponent, {
|
|
4066
4178
|
pathname,
|
|
4067
4179
|
searchParams
|
|
4068
4180
|
});
|
|
4069
4181
|
span.setAttribute("reroute.pathname", pathname);
|
|
4182
|
+
resetSSRContentResults();
|
|
4070
4183
|
const html3 = renderToString(componentWithPathname);
|
|
4184
|
+
capturedResults = takeSSRContentResults();
|
|
4071
4185
|
span.setAttribute("reroute.html.final.size", html3.length);
|
|
4072
4186
|
return html3;
|
|
4073
4187
|
});
|
|
@@ -4076,7 +4190,7 @@ async function renderSSRDocument(options) {
|
|
|
4076
4190
|
span.setAttribute("reroute.template.size", template2.length);
|
|
4077
4191
|
return template2;
|
|
4078
4192
|
});
|
|
4079
|
-
const collectionScripts = generateCollectionScripts(setup2.byCollectionForSSR);
|
|
4193
|
+
const collectionScripts = generateCollectionScripts(setup2.byCollectionForSSR, capturedResults);
|
|
4080
4194
|
const config = await loadConfig(cwd);
|
|
4081
4195
|
const browserTelemetryConfigRaw = config.telemetry?.browser;
|
|
4082
4196
|
const { serializeBrowserTelemetryConfig: serializeBrowserTelemetryConfig2 } = await Promise.resolve().then(() => exports_serialize);
|
|
@@ -4094,7 +4208,7 @@ async function renderSSRDocument(options) {
|
|
|
4094
4208
|
if (setup2.metadataResult.statusOverride !== undefined) {
|
|
4095
4209
|
statusOverride = setup2.metadataResult.statusOverride;
|
|
4096
4210
|
}
|
|
4097
|
-
const extraHead = setup2.bundlePreload + setup2.preloadExtraHead;
|
|
4211
|
+
const extraHead = appendLlmsAlternateHead(setup2.bundlePreload + setup2.preloadExtraHead, pathname, statusOverride || 200, config.llms);
|
|
4098
4212
|
const combinedHead = dedent([
|
|
4099
4213
|
dedent(head) || "",
|
|
4100
4214
|
dedent(extraHead),
|
|
@@ -4124,6 +4238,7 @@ async function renderSSRDocument(options) {
|
|
|
4124
4238
|
var init_render = __esm(() => {
|
|
4125
4239
|
init_server2();
|
|
4126
4240
|
init_config();
|
|
4241
|
+
init_discovery3();
|
|
4127
4242
|
init_lib();
|
|
4128
4243
|
init_html();
|
|
4129
4244
|
});
|
|
@@ -4450,15 +4565,140 @@ var init_extractor = __esm(() => {
|
|
|
4450
4565
|
init_render();
|
|
4451
4566
|
});
|
|
4452
4567
|
|
|
4568
|
+
// packages/core/src/llms/discovery.ts
|
|
4569
|
+
function yesNo(value) {
|
|
4570
|
+
return value === false ? "no" : "yes";
|
|
4571
|
+
}
|
|
4572
|
+
function formatContentSignal(policy, whenUndefined = "omit") {
|
|
4573
|
+
if (policy === false)
|
|
4574
|
+
return;
|
|
4575
|
+
if (policy === undefined && whenUndefined === "omit")
|
|
4576
|
+
return;
|
|
4577
|
+
const resolved = {
|
|
4578
|
+
search: true,
|
|
4579
|
+
aiInput: true,
|
|
4580
|
+
aiTrain: true,
|
|
4581
|
+
...policy
|
|
4582
|
+
};
|
|
4583
|
+
return `ai-train=${yesNo(resolved.aiTrain)}, search=${yesNo(resolved.search)}, ai-input=${yesNo(resolved.aiInput)}`;
|
|
4584
|
+
}
|
|
4585
|
+
function markdownTwinPath(pathname) {
|
|
4586
|
+
const path3 = pathname.split("?")[0];
|
|
4587
|
+
if (path3 === "/" || path3 === "")
|
|
4588
|
+
return "/index.md";
|
|
4589
|
+
return `${path3.replace(/\/$/, "")}.md`;
|
|
4590
|
+
}
|
|
4591
|
+
function shouldAdvertiseMarkdownTwin(pathname, llmsConfig) {
|
|
4592
|
+
if (!llmsConfig?.enabled)
|
|
4593
|
+
return false;
|
|
4594
|
+
if (llmsConfig.enableMarkdownExtension === false)
|
|
4595
|
+
return false;
|
|
4596
|
+
if (shouldExcludeRoute(pathname, llmsConfig.excludeRoutes))
|
|
4597
|
+
return false;
|
|
4598
|
+
return true;
|
|
4599
|
+
}
|
|
4600
|
+
function llmsAlternateLinkTag(pathname, llmsConfig) {
|
|
4601
|
+
if (!shouldAdvertiseMarkdownTwin(pathname, llmsConfig))
|
|
4602
|
+
return "";
|
|
4603
|
+
return `<link rel="alternate" type="text/markdown" href="${markdownTwinPath(pathname)}" />`;
|
|
4604
|
+
}
|
|
4605
|
+
function mergeVary(existing, token) {
|
|
4606
|
+
const parts = (existing ?? "").split(",").map((part) => part.trim()).filter(Boolean);
|
|
4607
|
+
if (!parts.some((part) => part.toLowerCase() === token.toLowerCase())) {
|
|
4608
|
+
parts.push(token);
|
|
4609
|
+
}
|
|
4610
|
+
return parts.join(", ");
|
|
4611
|
+
}
|
|
4612
|
+
function appendLinkValues(existing, values) {
|
|
4613
|
+
const current = (existing ?? "").split(",").map((part) => part.trim()).filter(Boolean);
|
|
4614
|
+
for (const value of values) {
|
|
4615
|
+
if (!current.includes(value))
|
|
4616
|
+
current.push(value);
|
|
4617
|
+
}
|
|
4618
|
+
return current.join(", ");
|
|
4619
|
+
}
|
|
4620
|
+
function buildLlmsDiscovery(pathname, llmsConfig) {
|
|
4621
|
+
if (!llmsConfig?.enabled)
|
|
4622
|
+
return null;
|
|
4623
|
+
const linkValues = [];
|
|
4624
|
+
if (shouldAdvertiseMarkdownTwin(pathname, llmsConfig)) {
|
|
4625
|
+
linkValues.push(`<${markdownTwinPath(pathname)}>; rel="alternate"; type="text/markdown"`);
|
|
4626
|
+
}
|
|
4627
|
+
if (llmsConfig.enableIndex !== false) {
|
|
4628
|
+
linkValues.push('</llms.txt>; rel="llms-txt"');
|
|
4629
|
+
}
|
|
4630
|
+
const contentSignal = formatContentSignal(llmsConfig.contentSignal, "default");
|
|
4631
|
+
const vary = llmsConfig.enableContentNegotiation !== false ? "Accept" : undefined;
|
|
4632
|
+
if (linkValues.length === 0 && !contentSignal && !vary)
|
|
4633
|
+
return null;
|
|
4634
|
+
return { linkValues, contentSignal, vary };
|
|
4635
|
+
}
|
|
4636
|
+
function writeHeader(headers2, canonical, value) {
|
|
4637
|
+
const lower = canonical.toLowerCase();
|
|
4638
|
+
if (headers2[lower] !== undefined)
|
|
4639
|
+
headers2[lower] = value;
|
|
4640
|
+
if (headers2[canonical] !== undefined || headers2[lower] === undefined) {
|
|
4641
|
+
headers2[canonical] = value;
|
|
4642
|
+
}
|
|
4643
|
+
}
|
|
4644
|
+
function readHeader(headers2, canonical) {
|
|
4645
|
+
return headers2[canonical] ?? headers2[canonical.toLowerCase()];
|
|
4646
|
+
}
|
|
4647
|
+
function applyLlmsDiscoveryHeaders(headers2, pathname, llmsConfig, status = 200) {
|
|
4648
|
+
if (status < 200 || status >= 300)
|
|
4649
|
+
return;
|
|
4650
|
+
const discovery2 = buildLlmsDiscovery(pathname, llmsConfig);
|
|
4651
|
+
if (!discovery2)
|
|
4652
|
+
return;
|
|
4653
|
+
if (discovery2.linkValues.length > 0) {
|
|
4654
|
+
writeHeader(headers2, "Link", appendLinkValues(readHeader(headers2, "Link"), discovery2.linkValues));
|
|
4655
|
+
}
|
|
4656
|
+
if (discovery2.contentSignal) {
|
|
4657
|
+
writeHeader(headers2, "Content-Signal", discovery2.contentSignal);
|
|
4658
|
+
}
|
|
4659
|
+
if (discovery2.vary) {
|
|
4660
|
+
writeHeader(headers2, "Vary", mergeVary(readHeader(headers2, "Vary"), discovery2.vary));
|
|
4661
|
+
}
|
|
4662
|
+
}
|
|
4663
|
+
function appendLlmsAlternateHead(extraHead, pathname, status, llmsConfig) {
|
|
4664
|
+
if (status !== 200)
|
|
4665
|
+
return extraHead;
|
|
4666
|
+
const tag = llmsAlternateLinkTag(pathname, llmsConfig);
|
|
4667
|
+
return tag ? `${extraHead}
|
|
4668
|
+
${tag}` : extraHead;
|
|
4669
|
+
}
|
|
4670
|
+
var init_discovery3 = __esm(() => {
|
|
4671
|
+
init_extractor();
|
|
4672
|
+
});
|
|
4673
|
+
|
|
4453
4674
|
// packages/core/src/llms/index-generator.ts
|
|
4454
4675
|
var exports_index_generator = {};
|
|
4455
4676
|
__export(exports_index_generator, {
|
|
4456
|
-
|
|
4457
|
-
discoverStaticRoutes: () => discoverStaticRoutes,
|
|
4677
|
+
discoverCollectionRoutes: () => discoverCollectionRoutes,
|
|
4458
4678
|
discoverSSRDataRoutes: () => discoverSSRDataRoutes,
|
|
4459
|
-
|
|
4679
|
+
discoverStaticRoutes: () => discoverStaticRoutes,
|
|
4680
|
+
generateLLMsIndex: () => generateLLMsIndex
|
|
4460
4681
|
});
|
|
4461
4682
|
import { pathToFileURL as pathToFileURL6 } from "node:url";
|
|
4683
|
+
function oneLine(value) {
|
|
4684
|
+
return value.replace(/\s+/g, " ").trim();
|
|
4685
|
+
}
|
|
4686
|
+
function stringField(record, key) {
|
|
4687
|
+
const value = record?.[key];
|
|
4688
|
+
if (typeof value !== "string")
|
|
4689
|
+
return;
|
|
4690
|
+
const trimmed = oneLine(value);
|
|
4691
|
+
return trimmed.length > 0 ? trimmed : undefined;
|
|
4692
|
+
}
|
|
4693
|
+
function metaFromUnknown(meta) {
|
|
4694
|
+
if (!meta || typeof meta !== "object")
|
|
4695
|
+
return {};
|
|
4696
|
+
const record = meta;
|
|
4697
|
+
return {
|
|
4698
|
+
title: stringField(record, "title") ?? stringField(record, "name"),
|
|
4699
|
+
description: stringField(record, "description") ?? stringField(record, "excerpt")
|
|
4700
|
+
};
|
|
4701
|
+
}
|
|
4462
4702
|
async function discoverStaticRoutes(cwd, isWatchMode) {
|
|
4463
4703
|
const routes = [];
|
|
4464
4704
|
try {
|
|
@@ -4475,8 +4715,11 @@ async function discoverStaticRoutes(cwd, isWatchMode) {
|
|
|
4475
4715
|
if (pattern.includes("[404]") || pattern.includes("[layout]") || pattern.includes("[skeleton]") || pattern.includes(":")) {
|
|
4476
4716
|
continue;
|
|
4477
4717
|
}
|
|
4718
|
+
const { title, description } = metaFromUnknown(route?.meta);
|
|
4478
4719
|
routes.push({
|
|
4479
|
-
path: pattern
|
|
4720
|
+
path: pattern,
|
|
4721
|
+
title,
|
|
4722
|
+
description
|
|
4480
4723
|
});
|
|
4481
4724
|
}
|
|
4482
4725
|
}
|
|
@@ -4499,11 +4742,13 @@ function createRouteEntriesFromItems(items, collection) {
|
|
|
4499
4742
|
for (const item of items) {
|
|
4500
4743
|
const href = String(item.href || "");
|
|
4501
4744
|
if (href) {
|
|
4502
|
-
const
|
|
4745
|
+
const fromMeta = metaFromUnknown(item.meta);
|
|
4746
|
+
const title = fromMeta.title || (typeof item.name === "string" ? item.name : undefined);
|
|
4503
4747
|
routes.push({
|
|
4504
4748
|
path: href,
|
|
4505
4749
|
section: collection,
|
|
4506
|
-
title
|
|
4750
|
+
title,
|
|
4751
|
+
description: fromMeta.description
|
|
4507
4752
|
});
|
|
4508
4753
|
}
|
|
4509
4754
|
}
|
|
@@ -4569,9 +4814,13 @@ function createEntriesFromArray(array, routePath) {
|
|
|
4569
4814
|
continue;
|
|
4570
4815
|
const identifier = extractIdentifier(item);
|
|
4571
4816
|
if (identifier) {
|
|
4817
|
+
const fromItem = metaFromUnknown(item);
|
|
4818
|
+
const fromMeta = metaFromUnknown(item.meta);
|
|
4572
4819
|
entries.push({
|
|
4573
4820
|
path: `${routePath}/${identifier}`,
|
|
4574
|
-
section: routePath.split("/").filter(Boolean)[0]
|
|
4821
|
+
section: routePath.split("/").filter(Boolean)[0],
|
|
4822
|
+
title: fromItem.title ?? fromMeta.title,
|
|
4823
|
+
description: fromItem.description ?? fromMeta.description
|
|
4575
4824
|
});
|
|
4576
4825
|
}
|
|
4577
4826
|
}
|
|
@@ -4677,13 +4926,21 @@ function formatRouteUrl(routePath, baseUrl) {
|
|
|
4677
4926
|
function getRouteTitle(route) {
|
|
4678
4927
|
return route.title || (route.path === "/" ? "Home" : route.path.split("/").pop() || "Page");
|
|
4679
4928
|
}
|
|
4680
|
-
function
|
|
4681
|
-
|
|
4929
|
+
function formatIndexLine(route, url, summaries) {
|
|
4930
|
+
const link = `- [${getRouteTitle(route)}](${url})`;
|
|
4931
|
+
if (!(summaries && route.description))
|
|
4932
|
+
return link;
|
|
4933
|
+
return `${link}: ${route.description}`;
|
|
4934
|
+
}
|
|
4935
|
+
function summariesEnabled(llmsConfig) {
|
|
4936
|
+
return llmsConfig?.indexSummaries !== false;
|
|
4937
|
+
}
|
|
4938
|
+
function addRootRoutes(parts, rootRoutes, baseUrl, isScoped, llmsConfig) {
|
|
4939
|
+
if (isScoped || rootRoutes.length === 0)
|
|
4682
4940
|
return;
|
|
4941
|
+
const summaries = summariesEnabled(llmsConfig);
|
|
4683
4942
|
for (const route of rootRoutes) {
|
|
4684
|
-
|
|
4685
|
-
const url = formatRouteUrl(route.path, baseUrl);
|
|
4686
|
-
parts.push(`- [${title}](${url})`);
|
|
4943
|
+
parts.push(formatIndexLine(route, formatRouteUrl(route.path, baseUrl), summaries));
|
|
4687
4944
|
}
|
|
4688
4945
|
parts.push("");
|
|
4689
4946
|
}
|
|
@@ -4694,19 +4951,18 @@ function addCollectionSection(parts, collection, routes, baseUrl, llmsConfig) {
|
|
|
4694
4951
|
const sectionName = collection.charAt(0).toUpperCase() + collection.slice(1);
|
|
4695
4952
|
parts.push(`## ${sectionName}`);
|
|
4696
4953
|
parts.push("");
|
|
4954
|
+
const summaries = summariesEnabled(llmsConfig);
|
|
4697
4955
|
for (const route of filteredRoutes) {
|
|
4698
|
-
|
|
4699
|
-
const url = `${baseUrl}${route.path}.txt`;
|
|
4700
|
-
parts.push(`- [${title}](${url})`);
|
|
4956
|
+
parts.push(formatIndexLine(route, `${baseUrl}${route.path}.txt`, summaries));
|
|
4701
4957
|
}
|
|
4702
4958
|
parts.push("");
|
|
4703
4959
|
}
|
|
4704
|
-
function shouldIncludeSection(section,
|
|
4705
|
-
return !
|
|
4960
|
+
function shouldIncludeSection(section, isScoped, targetCollection) {
|
|
4961
|
+
return !isScoped || section === targetCollection;
|
|
4706
4962
|
}
|
|
4707
|
-
function addSSRDataSection(parts, routePattern, routes, baseUrl,
|
|
4963
|
+
function addSSRDataSection(parts, routePattern, routes, baseUrl, isScoped, targetCollection, llmsConfig) {
|
|
4708
4964
|
const routeSection = routePattern.split("/").filter(Boolean)[0];
|
|
4709
|
-
if (!shouldIncludeSection(routeSection,
|
|
4965
|
+
if (!shouldIncludeSection(routeSection, isScoped, targetCollection)) {
|
|
4710
4966
|
return;
|
|
4711
4967
|
}
|
|
4712
4968
|
const filteredRoutes = routes.filter((r) => !shouldExcludeRoute(r.path, llmsConfig?.excludeRoutes));
|
|
@@ -4715,15 +4971,14 @@ function addSSRDataSection(parts, routePattern, routes, baseUrl, isSingleCollect
|
|
|
4715
4971
|
const sectionName = routeSection?.charAt(0).toUpperCase() + routeSection?.slice(1) || "Content";
|
|
4716
4972
|
parts.push(`## ${sectionName}`);
|
|
4717
4973
|
parts.push("");
|
|
4974
|
+
const summaries = summariesEnabled(llmsConfig);
|
|
4718
4975
|
for (const route of filteredRoutes) {
|
|
4719
|
-
|
|
4720
|
-
const url = `${baseUrl}${route.path}.txt`;
|
|
4721
|
-
parts.push(`- [${title}](${url})`);
|
|
4976
|
+
parts.push(formatIndexLine(route, `${baseUrl}${route.path}.txt`, summaries));
|
|
4722
4977
|
}
|
|
4723
4978
|
parts.push("");
|
|
4724
4979
|
}
|
|
4725
|
-
function addStaticSection(parts, section, routes, baseUrl,
|
|
4726
|
-
if (!shouldIncludeSection(section,
|
|
4980
|
+
function addStaticSection(parts, section, routes, baseUrl, isScoped, targetCollection, collectionsMap, llmsConfig) {
|
|
4981
|
+
if (!shouldIncludeSection(section, isScoped, targetCollection)) {
|
|
4727
4982
|
return;
|
|
4728
4983
|
}
|
|
4729
4984
|
const filteredRoutes = routes.filter((r) => !shouldExcludeRoute(r.path, llmsConfig?.excludeRoutes));
|
|
@@ -4732,24 +4987,23 @@ function addStaticSection(parts, section, routes, baseUrl, isSingleCollection, t
|
|
|
4732
4987
|
const sectionName = section.charAt(0).toUpperCase() + section.slice(1);
|
|
4733
4988
|
parts.push(`## ${sectionName}`);
|
|
4734
4989
|
parts.push("");
|
|
4990
|
+
const summaries = summariesEnabled(llmsConfig);
|
|
4735
4991
|
for (const route of filteredRoutes) {
|
|
4736
|
-
|
|
4737
|
-
const url = `${baseUrl}${route.path}.txt`;
|
|
4738
|
-
parts.push(`- [${title}](${url})`);
|
|
4992
|
+
parts.push(formatIndexLine(route, `${baseUrl}${route.path}.txt`, summaries));
|
|
4739
4993
|
}
|
|
4740
4994
|
parts.push("");
|
|
4741
4995
|
}
|
|
4742
4996
|
async function generateLLMsIndex(options) {
|
|
4743
4997
|
const { cwd, collections: collections2, baseUrl, isWatchMode, llmsConfig } = options;
|
|
4998
|
+
const targetCollection = options.targetCollection ?? null;
|
|
4999
|
+
const isScoped = targetCollection !== null;
|
|
4744
5000
|
const parts = [];
|
|
4745
5001
|
addIndexHeader(parts, llmsConfig);
|
|
4746
5002
|
const staticRoutes = await discoverStaticRoutes(cwd, isWatchMode);
|
|
4747
5003
|
const collectionsMap = await discoverCollectionRoutes(cwd, collections2, isWatchMode, llmsConfig);
|
|
4748
5004
|
const ssrDataRoutes = await discoverSSRDataRoutes(cwd, staticRoutes, isWatchMode);
|
|
4749
|
-
const isSingleCollection = collections2.length === 1;
|
|
4750
|
-
const targetCollection = isSingleCollection ? collections2[0] : null;
|
|
4751
5005
|
const { sections, rootRoutes } = groupStaticRoutes(staticRoutes, llmsConfig);
|
|
4752
|
-
addRootRoutes(parts, rootRoutes, baseUrl,
|
|
5006
|
+
addRootRoutes(parts, rootRoutes, baseUrl, isScoped, llmsConfig);
|
|
4753
5007
|
for (const [collection, routes] of collectionsMap.entries()) {
|
|
4754
5008
|
if (routes.length > 0) {
|
|
4755
5009
|
addCollectionSection(parts, collection, routes, baseUrl, llmsConfig);
|
|
@@ -4757,12 +5011,12 @@ async function generateLLMsIndex(options) {
|
|
|
4757
5011
|
}
|
|
4758
5012
|
for (const [routePattern, routes] of ssrDataRoutes.entries()) {
|
|
4759
5013
|
if (routes.length > 0) {
|
|
4760
|
-
addSSRDataSection(parts, routePattern, routes, baseUrl,
|
|
5014
|
+
addSSRDataSection(parts, routePattern, routes, baseUrl, isScoped, targetCollection, llmsConfig);
|
|
4761
5015
|
}
|
|
4762
5016
|
}
|
|
4763
5017
|
for (const [section, routes] of sections.entries()) {
|
|
4764
5018
|
if (routes.length > 0) {
|
|
4765
|
-
addStaticSection(parts, section, routes, baseUrl,
|
|
5019
|
+
addStaticSection(parts, section, routes, baseUrl, isScoped, targetCollection, collectionsMap, llmsConfig);
|
|
4766
5020
|
}
|
|
4767
5021
|
}
|
|
4768
5022
|
parts.push("---");
|
|
@@ -4825,6 +5079,9 @@ async function discoverAllRoutes(cwd, collections2, isWatchMode, llmsConfig) {
|
|
|
4825
5079
|
}
|
|
4826
5080
|
return allRoutes;
|
|
4827
5081
|
}
|
|
5082
|
+
function routeBelongsToCollection(path3, collection) {
|
|
5083
|
+
return path3 === `/${collection}` || path3.startsWith(`/${collection}/`);
|
|
5084
|
+
}
|
|
4828
5085
|
function formatContentBlock(content, routePath, baseUrl) {
|
|
4829
5086
|
const parts = [];
|
|
4830
5087
|
const lines = content.split(`
|
|
@@ -4894,7 +5151,9 @@ function buildFooter(parts) {
|
|
|
4894
5151
|
async function generateLLMsFullContent(options) {
|
|
4895
5152
|
const { cwd, collections: collections2, baseUrl, isWatchMode, llmsConfig } = options;
|
|
4896
5153
|
const parts = buildHeader(baseUrl, llmsConfig);
|
|
4897
|
-
const
|
|
5154
|
+
const discovered = await discoverAllRoutes(cwd, collections2, isWatchMode, llmsConfig);
|
|
5155
|
+
const targetCollection = options.targetCollection;
|
|
5156
|
+
const allRoutes = targetCollection ? discovered.filter((route) => routeBelongsToCollection(route.path, targetCollection)) : discovered;
|
|
4898
5157
|
const maxItems = llmsConfig?.maxItems || 1e4;
|
|
4899
5158
|
const routesToProcess = allRoutes.slice(0, maxItems);
|
|
4900
5159
|
const extracted = await extractRouteContents(routesToProcess, options);
|
|
@@ -4914,6 +5173,7 @@ var init_full_generator = __esm(() => {
|
|
|
4914
5173
|
|
|
4915
5174
|
// packages/core/src/llms/index.ts
|
|
4916
5175
|
var init_llms = __esm(() => {
|
|
5176
|
+
init_discovery3();
|
|
4917
5177
|
init_extractor();
|
|
4918
5178
|
init_full_generator();
|
|
4919
5179
|
init_index_generator();
|
|
@@ -5080,7 +5340,7 @@ async function discoverRobotsData(cwd, isWatchMode, robotsConfig, sitemapConfig,
|
|
|
5080
5340
|
redirectSourcePaths
|
|
5081
5341
|
};
|
|
5082
5342
|
}
|
|
5083
|
-
var
|
|
5343
|
+
var init_discovery4 = () => {};
|
|
5084
5344
|
|
|
5085
5345
|
// packages/core/src/robots/generator.ts
|
|
5086
5346
|
function getEffectivePolicies(policies) {
|
|
@@ -5123,8 +5383,16 @@ function addDisallowDirectives(lines, policy, autoDisallows) {
|
|
|
5123
5383
|
}
|
|
5124
5384
|
}
|
|
5125
5385
|
}
|
|
5126
|
-
function
|
|
5386
|
+
function addContentSignalLine(lines, policy, robotsConfig) {
|
|
5387
|
+
if (policy.userAgent !== "*")
|
|
5388
|
+
return;
|
|
5389
|
+
const value = formatContentSignal(robotsConfig.contentSignal);
|
|
5390
|
+
if (value)
|
|
5391
|
+
lines.push(`Content-Signal: ${value}`);
|
|
5392
|
+
}
|
|
5393
|
+
function addPolicyBlock(lines, policy, autoDisallows, robotsConfig) {
|
|
5127
5394
|
lines.push(`User-agent: ${policy.userAgent}`);
|
|
5395
|
+
addContentSignalLine(lines, policy, robotsConfig);
|
|
5128
5396
|
addAllowDirectives(lines, policy);
|
|
5129
5397
|
addDisallowDirectives(lines, policy, autoDisallows);
|
|
5130
5398
|
if (policy.crawlDelay !== undefined) {
|
|
@@ -5150,7 +5418,7 @@ function generateRobots(discovery2, robotsConfig, sitemapEnabled) {
|
|
|
5150
5418
|
const effectivePolicies = getEffectivePolicies(policies);
|
|
5151
5419
|
const autoDisallows = getAutoDisallows(discovery2);
|
|
5152
5420
|
for (const policy of effectivePolicies) {
|
|
5153
|
-
addPolicyBlock(lines, policy, autoDisallows);
|
|
5421
|
+
addPolicyBlock(lines, policy, autoDisallows, robotsConfig);
|
|
5154
5422
|
}
|
|
5155
5423
|
addGlobalCrawlDelay(lines, crawlDelay, effectivePolicies);
|
|
5156
5424
|
if (customRules) {
|
|
@@ -5162,6 +5430,9 @@ function generateRobots(discovery2, robotsConfig, sitemapEnabled) {
|
|
|
5162
5430
|
`).trim()}
|
|
5163
5431
|
`;
|
|
5164
5432
|
}
|
|
5433
|
+
var init_generator = __esm(() => {
|
|
5434
|
+
init_discovery3();
|
|
5435
|
+
});
|
|
5165
5436
|
|
|
5166
5437
|
// packages/core/src/robots/policies.ts
|
|
5167
5438
|
function blockAICrawlers(crawlers) {
|
|
@@ -5232,17 +5503,20 @@ var init_policies = __esm(() => {
|
|
|
5232
5503
|
|
|
5233
5504
|
// packages/core/src/robots/index.ts
|
|
5234
5505
|
var init_robots = __esm(() => {
|
|
5235
|
-
|
|
5506
|
+
init_discovery4();
|
|
5507
|
+
init_generator();
|
|
5236
5508
|
init_policies();
|
|
5237
5509
|
});
|
|
5238
5510
|
|
|
5239
5511
|
// packages/core/src/sitemap/discovery.ts
|
|
5240
5512
|
var exports_discovery = {};
|
|
5241
5513
|
__export(exports_discovery, {
|
|
5242
|
-
|
|
5243
|
-
|
|
5514
|
+
buildSitemapLoc: () => buildSitemapLoc,
|
|
5515
|
+
discoverCollectionContent: () => discoverCollectionContent,
|
|
5516
|
+
discoverDynamicSitemapRoutes: () => discoverDynamicSitemapRoutes,
|
|
5244
5517
|
discoverRoutes: () => discoverRoutes,
|
|
5245
|
-
|
|
5518
|
+
discoverSSRDataRoutes: () => discoverSSRDataRoutes2,
|
|
5519
|
+
discoverSitemapData: () => discoverSitemapData
|
|
5246
5520
|
});
|
|
5247
5521
|
async function loadRoutesModule2(cwd, isWatchMode) {
|
|
5248
5522
|
let routes = globalThis.__REROUTE_ROUTES__;
|
|
@@ -5506,7 +5780,7 @@ function extractIdentifierFromItem(item, routePattern, sitemapConfig) {
|
|
|
5506
5780
|
console.warn("[reroute/sitemap] extractUrl failed:", error);
|
|
5507
5781
|
}
|
|
5508
5782
|
}
|
|
5509
|
-
const identifier = item.version || item.slug || item.id || item.name || item.key;
|
|
5783
|
+
const identifier = item.version || item.slug || item.id || item.name || item.key || item.username;
|
|
5510
5784
|
return identifier ? identifier : null;
|
|
5511
5785
|
}
|
|
5512
5786
|
function extractLastmodFromItem(item, sitemapConfig) {
|
|
@@ -5531,14 +5805,41 @@ function extractLastmodFromItem(item, sitemapConfig) {
|
|
|
5531
5805
|
}
|
|
5532
5806
|
return;
|
|
5533
5807
|
}
|
|
5808
|
+
function buildSitemapLoc(baseUrl, routePattern, identifier) {
|
|
5809
|
+
const base = baseUrl.replace(/\/$/, "");
|
|
5810
|
+
const dynamicParams = routePattern.match(/:[^/]+/g) ?? [];
|
|
5811
|
+
if (dynamicParams.length === 0) {
|
|
5812
|
+
return `${base}${routePattern}/${identifier}`;
|
|
5813
|
+
}
|
|
5814
|
+
if (identifier.startsWith("/")) {
|
|
5815
|
+
return `${base}${identifier}`;
|
|
5816
|
+
}
|
|
5817
|
+
if (dynamicParams.length === 1) {
|
|
5818
|
+
return `${base}${routePattern.replace(/:[^/]+/, identifier)}`;
|
|
5819
|
+
}
|
|
5820
|
+
return `${base}${routePattern.replace(/:[^/]+/, identifier)}`;
|
|
5821
|
+
}
|
|
5822
|
+
function resolveItemLoc(item, baseUrl, routePattern, identifier) {
|
|
5823
|
+
if (typeof item.loc === "string") {
|
|
5824
|
+
if (item.loc.startsWith("http://") || item.loc.startsWith("https://")) {
|
|
5825
|
+
return item.loc;
|
|
5826
|
+
}
|
|
5827
|
+
if (item.loc.startsWith("/")) {
|
|
5828
|
+
return `${baseUrl.replace(/\/$/, "")}${item.loc}`;
|
|
5829
|
+
}
|
|
5830
|
+
}
|
|
5831
|
+
if (typeof item.href === "string" && item.href.startsWith("/")) {
|
|
5832
|
+
return `${baseUrl.replace(/\/$/, "")}${item.href}`;
|
|
5833
|
+
}
|
|
5834
|
+
return buildSitemapLoc(baseUrl, routePattern, identifier);
|
|
5835
|
+
}
|
|
5534
5836
|
function createEntryFromItem(item, routePattern, baseUrl, sitemapConfig) {
|
|
5535
5837
|
const identifier = extractIdentifierFromItem(item, routePattern, sitemapConfig);
|
|
5536
5838
|
if (!identifier) {
|
|
5537
5839
|
return null;
|
|
5538
5840
|
}
|
|
5539
|
-
const url = `${baseUrl}${routePattern}/${identifier}`;
|
|
5540
5841
|
const entry = {
|
|
5541
|
-
loc:
|
|
5842
|
+
loc: resolveItemLoc(item, baseUrl, routePattern, identifier),
|
|
5542
5843
|
changefreq: sitemapConfig?.changefreq || "weekly",
|
|
5543
5844
|
priority: sitemapConfig?.priority !== undefined ? sitemapConfig.priority : 0.6
|
|
5544
5845
|
};
|
|
@@ -5548,6 +5849,50 @@ function createEntryFromItem(item, routePattern, baseUrl, sitemapConfig) {
|
|
|
5548
5849
|
}
|
|
5549
5850
|
return entry;
|
|
5550
5851
|
}
|
|
5852
|
+
async function loadRouteSitemapFn(cwd, route, isWatchMode) {
|
|
5853
|
+
const bundledRoutes = globalThis.__REROUTE_ROUTES__;
|
|
5854
|
+
if (bundledRoutes && Array.isArray(bundledRoutes)) {
|
|
5855
|
+
const bundledRoute = bundledRoutes.find((r) => r?.pattern === route.pattern);
|
|
5856
|
+
const sitemapFn = bundledRoute?.ssr?.sitemap;
|
|
5857
|
+
return typeof sitemapFn === "function" ? sitemapFn : null;
|
|
5858
|
+
}
|
|
5859
|
+
try {
|
|
5860
|
+
const routeModulePath = join2(cwd, "src", "client", "routes", route.path);
|
|
5861
|
+
const mod = await import(Bun.pathToFileURL(routeModulePath).href + (isWatchMode ? `?t=${Date.now()}` : ""));
|
|
5862
|
+
const sitemapFn = mod?.ssr?.sitemap;
|
|
5863
|
+
return typeof sitemapFn === "function" ? sitemapFn : null;
|
|
5864
|
+
} catch {
|
|
5865
|
+
return null;
|
|
5866
|
+
}
|
|
5867
|
+
}
|
|
5868
|
+
async function discoverDynamicSitemapRoutes(cwd, dynamicRoutes, isWatchMode, baseUrl, sitemapConfig) {
|
|
5869
|
+
const sitemapRoutes = new Map;
|
|
5870
|
+
const routePromises = dynamicRoutes.map(async (route) => {
|
|
5871
|
+
if (sitemapConfig?.excludeDiscovery?.some((excluded) => route.pattern.startsWith(excluded))) {
|
|
5872
|
+
return null;
|
|
5873
|
+
}
|
|
5874
|
+
const sitemapFn = await loadRouteSitemapFn(cwd, route, isWatchMode);
|
|
5875
|
+
if (!sitemapFn)
|
|
5876
|
+
return null;
|
|
5877
|
+
try {
|
|
5878
|
+
const result = await sitemapFn();
|
|
5879
|
+
const entries = extractEntriesFromData(result, route.pattern, baseUrl, sitemapConfig);
|
|
5880
|
+
if (entries.length > 0) {
|
|
5881
|
+
return { pattern: route.pattern, entries };
|
|
5882
|
+
}
|
|
5883
|
+
} catch (error) {
|
|
5884
|
+
console.warn(`[reroute/sitemap] ssr.sitemap failed for ${route.pattern}:`, error);
|
|
5885
|
+
}
|
|
5886
|
+
return null;
|
|
5887
|
+
});
|
|
5888
|
+
const results = await Promise.all(routePromises);
|
|
5889
|
+
for (const result of results) {
|
|
5890
|
+
if (result) {
|
|
5891
|
+
sitemapRoutes.set(result.pattern, result.entries);
|
|
5892
|
+
}
|
|
5893
|
+
}
|
|
5894
|
+
return sitemapRoutes;
|
|
5895
|
+
}
|
|
5551
5896
|
async function discoverSitemapData(cwd, collections2, baseUrl, isWatchMode, sitemapConfig) {
|
|
5552
5897
|
const { staticRoutes, dynamicRoutes } = await discoverRoutes(cwd, isWatchMode);
|
|
5553
5898
|
const collectionsMap = new Map;
|
|
@@ -5558,6 +5903,10 @@ async function discoverSitemapData(cwd, collections2, baseUrl, isWatchMode, site
|
|
|
5558
5903
|
}
|
|
5559
5904
|
}
|
|
5560
5905
|
const ssrDataRoutes = await discoverSSRDataRoutes2(cwd, staticRoutes, isWatchMode, baseUrl, sitemapConfig);
|
|
5906
|
+
const dynamicSitemapRoutes = await discoverDynamicSitemapRoutes(cwd, dynamicRoutes, isWatchMode, baseUrl, sitemapConfig);
|
|
5907
|
+
for (const [pattern, entries] of dynamicSitemapRoutes.entries()) {
|
|
5908
|
+
ssrDataRoutes.set(pattern, entries);
|
|
5909
|
+
}
|
|
5561
5910
|
return {
|
|
5562
5911
|
staticRoutes,
|
|
5563
5912
|
dynamicRoutes,
|
|
@@ -5565,7 +5914,7 @@ async function discoverSitemapData(cwd, collections2, baseUrl, isWatchMode, site
|
|
|
5565
5914
|
ssrDataRoutes
|
|
5566
5915
|
};
|
|
5567
5916
|
}
|
|
5568
|
-
var
|
|
5917
|
+
var init_discovery5 = () => {};
|
|
5569
5918
|
|
|
5570
5919
|
// packages/core/src/rss/discovery.ts
|
|
5571
5920
|
import { pathToFileURL as pathToFileURL7 } from "node:url";
|
|
@@ -5833,7 +6182,7 @@ async function discoverRSSData(cwd, collections2, baseUrl, isWatchMode, rssConfi
|
|
|
5833
6182
|
}
|
|
5834
6183
|
const ssrDataFeeds = new Map;
|
|
5835
6184
|
const bundledRoutes = globalThis.__REROUTE_ROUTES__;
|
|
5836
|
-
const { discoverRoutes: discoverRoutes2 } = await Promise.resolve().then(() => (
|
|
6185
|
+
const { discoverRoutes: discoverRoutes2 } = await Promise.resolve().then(() => (init_discovery5(), exports_discovery));
|
|
5837
6186
|
const { staticRoutes } = await discoverRoutes2(cwd, isWatchMode);
|
|
5838
6187
|
if (bundledRoutes && Array.isArray(bundledRoutes)) {
|
|
5839
6188
|
const routePromises = staticRoutes.map(async (route) => {
|
|
@@ -5890,7 +6239,7 @@ async function discoverRSSData(cwd, collections2, baseUrl, isWatchMode, rssConfi
|
|
|
5890
6239
|
ssrDataFeeds
|
|
5891
6240
|
};
|
|
5892
6241
|
}
|
|
5893
|
-
var
|
|
6242
|
+
var init_discovery6 = () => {};
|
|
5894
6243
|
|
|
5895
6244
|
// packages/core/src/rss/generator.ts
|
|
5896
6245
|
function generateRSSXML(feed, options = {}) {
|
|
@@ -6003,7 +6352,7 @@ function escapeXml(unsafe) {
|
|
|
6003
6352
|
|
|
6004
6353
|
// packages/core/src/rss/index.ts
|
|
6005
6354
|
var init_rss = __esm(() => {
|
|
6006
|
-
|
|
6355
|
+
init_discovery6();
|
|
6007
6356
|
});
|
|
6008
6357
|
|
|
6009
6358
|
// packages/core/src/sitemap/generator.ts
|
|
@@ -6148,12 +6497,12 @@ function escapeXml2(unsafe) {
|
|
|
6148
6497
|
return unsafe.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
6149
6498
|
}
|
|
6150
6499
|
var DEFAULT_MAX_URLS = 50000;
|
|
6151
|
-
var
|
|
6500
|
+
var init_generator2 = () => {};
|
|
6152
6501
|
|
|
6153
6502
|
// packages/core/src/sitemap/index.ts
|
|
6154
6503
|
var init_sitemap = __esm(() => {
|
|
6155
|
-
|
|
6156
|
-
|
|
6504
|
+
init_discovery5();
|
|
6505
|
+
init_generator2();
|
|
6157
6506
|
});
|
|
6158
6507
|
|
|
6159
6508
|
// packages/core/src/ssr/stream.ts
|
|
@@ -6231,15 +6580,16 @@ async function renderSSRDocumentStream(options) {
|
|
|
6231
6580
|
const newAttrs = hasLang ? attrs.replace(/lang\s*=\s*("[^"]*"|'[^']*'|[^\s>]+)/i, `lang="${pageLang}"`) : `${attrs} lang="${pageLang}"`;
|
|
6232
6581
|
return `<html${newAttrs}>`;
|
|
6233
6582
|
});
|
|
6234
|
-
const
|
|
6235
|
-
if (/<title[\s\S]*?<\/title>/i.test(
|
|
6583
|
+
const extraHeadBase = setup2.bundlePreload + setup2.preloadExtraHead + setup2.metadataResult.perPageHead;
|
|
6584
|
+
if (/<title[\s\S]*?<\/title>/i.test(extraHeadBase)) {
|
|
6236
6585
|
headWithLang = headWithLang.replace(/<title[\s\S]*?<\/title>/i, "");
|
|
6237
6586
|
}
|
|
6238
|
-
if (/<meta\s+name\s*=\s*['"]description['"][^>]*>/i.test(
|
|
6587
|
+
if (/<meta\s+name\s*=\s*['"]description['"][^>]*>/i.test(extraHeadBase)) {
|
|
6239
6588
|
headWithLang = headWithLang.replace(/<meta\s+name\s*=\s*['"]description['"][^>]*>/i, "");
|
|
6240
6589
|
}
|
|
6241
|
-
headWithLang = removeOverriddenMetaTags(headWithLang,
|
|
6590
|
+
headWithLang = removeOverriddenMetaTags(headWithLang, extraHeadBase);
|
|
6242
6591
|
const config = await loadConfig(cwd);
|
|
6592
|
+
const extraHead = appendLlmsAlternateHead(extraHeadBase, pathname, statusOverride || 200, config.llms);
|
|
6243
6593
|
const browserTelemetryConfigRaw = config.telemetry?.browser;
|
|
6244
6594
|
const { serializeBrowserTelemetryConfig: serializeBrowserTelemetryConfig2 } = await Promise.resolve().then(() => exports_serialize);
|
|
6245
6595
|
const browserTelemetryConfig = serializeBrowserTelemetryConfig2(browserTelemetryConfigRaw);
|
|
@@ -6497,6 +6847,7 @@ function unescapeHtmlEntities(str) {
|
|
|
6497
6847
|
var init_stream = __esm(() => {
|
|
6498
6848
|
init_server2();
|
|
6499
6849
|
init_config();
|
|
6850
|
+
init_discovery3();
|
|
6500
6851
|
init_lib();
|
|
6501
6852
|
init_html();
|
|
6502
6853
|
init_imports();
|
|
@@ -6526,137 +6877,151 @@ var init_src = __esm(() => {
|
|
|
6526
6877
|
// packages/core/index.ts
|
|
6527
6878
|
var exports_core = {};
|
|
6528
6879
|
__export(exports_core, {
|
|
6529
|
-
|
|
6530
|
-
toOgLocale: () => toOgLocale,
|
|
6531
|
-
toBytes: () => toBytes,
|
|
6532
|
-
stripStart: () => stripStart,
|
|
6533
|
-
stripHtmlTags: () => stripHtmlTags,
|
|
6534
|
-
stripEnd: () => stripEnd,
|
|
6535
|
-
statusCache: () => statusCache,
|
|
6536
|
-
ssrCache: () => ssrCache,
|
|
6537
|
-
splitTemplate: () => splitTemplate,
|
|
6538
|
-
shouldExcludeRoute: () => shouldExcludeRoute,
|
|
6539
|
-
setGlobalSSRData: () => setGlobalSSRData,
|
|
6540
|
-
setGlobalCollections: () => setGlobalCollections,
|
|
6541
|
-
seedSSRModuleForPath: () => seedSSRModuleForPath,
|
|
6542
|
-
resolveLocale: () => resolveLocale,
|
|
6543
|
-
resetSSRAccessTracking: () => resetSSRAccessTracking,
|
|
6544
|
-
renderSSRDocumentStream: () => renderSSRDocumentStream,
|
|
6545
|
-
renderSSRDocument: () => renderSSRDocument,
|
|
6546
|
-
renderOGImageToPNG: () => renderOGImageToPNG,
|
|
6547
|
-
removeOverriddenMetaTags: () => removeOverriddenMetaTags,
|
|
6548
|
-
processCollections: () => processCollections,
|
|
6549
|
-
preloadContentModule: () => preloadContentModule,
|
|
6550
|
-
performSSRSetup: () => performSSRSetup,
|
|
6551
|
-
parseCookieValue: () => parseCookieValue,
|
|
6552
|
-
parseContentPath: () => parseContentPath,
|
|
6553
|
-
normalizePathname: () => normalizePathname,
|
|
6554
|
-
negotiateLocale: () => negotiateLocale,
|
|
6555
|
-
mergeLayoutData: () => mergeLayoutData,
|
|
6556
|
-
matchRoutes: () => matchRoutes,
|
|
6557
|
-
matchRoutePattern: () => matchRoutePattern,
|
|
6558
|
-
lookupMessage: () => lookupMessage,
|
|
6559
|
-
looksLikeLocale: () => looksLikeLocale,
|
|
6560
|
-
localizeHref: () => localizeHref,
|
|
6561
|
-
localizeContentHref: () => localizeContentHref,
|
|
6562
|
-
loadRoutesModule: () => loadRoutesModule,
|
|
6563
|
-
loadOGImageComponent: () => loadOGImageComponent,
|
|
6564
|
-
loadIndexHtml: () => loadIndexHtml,
|
|
6565
|
-
loadConfig: () => loadConfig,
|
|
6566
|
-
loadCollections: () => loadCollections,
|
|
6567
|
-
listContentFiles: () => listContentFiles,
|
|
6568
|
-
join: () => join2,
|
|
6569
|
-
isThenable: () => isThenable,
|
|
6570
|
-
isCompressible: () => isCompressible,
|
|
6571
|
-
inlineThemeCSS: () => inlineThemeCSS,
|
|
6572
|
-
importContentModuleForPath: () => importContentModuleForPath,
|
|
6573
|
-
htmlToMarkdown: () => htmlToMarkdown,
|
|
6574
|
-
hreflangTags: () => hreflangTags,
|
|
6575
|
-
gzipIfAccepted: () => gzipIfAccepted,
|
|
6576
|
-
getSitemapExcludedRoutes: () => getSitemapExcludedRoutes,
|
|
6577
|
-
getRedirectSourcePaths: () => getRedirectSourcePaths,
|
|
6578
|
-
getPatternDepth: () => getPatternDepth,
|
|
6579
|
-
getMimeType: () => getMimeType,
|
|
6580
|
-
getMessage: () => getMessage,
|
|
6581
|
-
getMatchingLayouts: () => getMatchingLayouts,
|
|
6582
|
-
getContentMeta: () => getContentMeta,
|
|
6583
|
-
generateSitemapXML: () => generateSitemapXML,
|
|
6584
|
-
generateSitemapIndexXML: () => generateSitemapIndexXML,
|
|
6585
|
-
generateSitemap: () => generateSitemap,
|
|
6586
|
-
generateRobots: () => generateRobots,
|
|
6587
|
-
generateRSSXML: () => generateRSSXML,
|
|
6588
|
-
generateOGImageMetaTags: () => generateOGImageMetaTags,
|
|
6589
|
-
generateLLMsIndex: () => generateLLMsIndex,
|
|
6590
|
-
generateLLMsFullContent: () => generateLLMsFullContent,
|
|
6591
|
-
generateLLMsFooter: () => generateLLMsFooter,
|
|
6592
|
-
generateHydrationScripts: () => generateHydrationScripts,
|
|
6593
|
-
generateFeed: () => generateFeed,
|
|
6594
|
-
generateContentHash: () => generateContentHash,
|
|
6595
|
-
generateCollectionScripts: () => generateCollectionScripts,
|
|
6596
|
-
generateAtomXML: () => generateAtomXML,
|
|
6597
|
-
formatMessage: () => formatMessage,
|
|
6598
|
-
formatAsText: () => formatAsText,
|
|
6599
|
-
formatAsMarkdown: () => formatAsMarkdown,
|
|
6600
|
-
findOGImageForPath: () => findOGImageForPath,
|
|
6601
|
-
extractTitle: () => extractTitle,
|
|
6602
|
-
extractParamsFromPath: () => extractParamsFromPath,
|
|
6603
|
-
extractPageMetadata: () => extractPageMetadata,
|
|
6604
|
-
extractContentForLLMs: () => extractContentForLLMs,
|
|
6605
|
-
extname: () => extname,
|
|
6606
|
-
escapeXml: () => escapeXml2,
|
|
6607
|
-
escapeJsonForScript: () => escapeJsonForScript,
|
|
6608
|
-
dynamicImport: () => dynamicImport,
|
|
6609
|
-
duplicateQueryParamData: () => duplicateQueryParamData,
|
|
6610
|
-
discoverSitemapData: () => discoverSitemapData,
|
|
6611
|
-
discoverSSRDataRoutes: () => discoverSSRDataRoutes2,
|
|
6612
|
-
discoverSSRDataFeedItems: () => discoverSSRDataFeedItems,
|
|
6613
|
-
discoverRoutesForRobots: () => discoverRoutesForRobots,
|
|
6614
|
-
discoverRoutes: () => discoverRoutes,
|
|
6615
|
-
discoverRobotsData: () => discoverRobotsData,
|
|
6616
|
-
discoverRSSData: () => discoverRSSData,
|
|
6617
|
-
discoverI18n: () => discoverI18n,
|
|
6618
|
-
discoverCollections: () => discoverCollections,
|
|
6619
|
-
discoverCollectionContent: () => discoverCollectionContent,
|
|
6620
|
-
defineConfig: () => defineConfig,
|
|
6621
|
-
deduplicateMetaTags: () => deduplicateMetaTags,
|
|
6622
|
-
createTranslator: () => createTranslator,
|
|
6623
|
-
createLlmsScript: () => createLlmsScript,
|
|
6624
|
-
createLayoutDataKey: () => createLayoutDataKey,
|
|
6625
|
-
createLayoutCacheKey: () => createLayoutCacheKey,
|
|
6626
|
-
createFeedsScript: () => createFeedsScript,
|
|
6627
|
-
createDataScript: () => createDataScript,
|
|
6628
|
-
createCollectionScript: () => createCollectionScript,
|
|
6629
|
-
createBundlePreload: () => createBundlePreload,
|
|
6630
|
-
contentNegotiateRedirect: () => contentNegotiateRedirect,
|
|
6631
|
-
contentKey: () => contentKey,
|
|
6632
|
-
computeSSRDataForPath: () => computeSSRDataForPath,
|
|
6633
|
-
computeSSRData: () => computeSSRData,
|
|
6634
|
-
computeRouteData: () => computeRouteData,
|
|
6635
|
-
computeLayoutData: () => computeLayoutData,
|
|
6636
|
-
computeContentData: () => computeContentData,
|
|
6637
|
-
compressStreamIfAccepted: () => compressStreamIfAccepted,
|
|
6638
|
-
compareRouteSpecificity: () => compareRouteSpecificity,
|
|
6639
|
-
cleanupPathScopedSSRData: () => cleanupPathScopedSSRData,
|
|
6640
|
-
buildLocaleCookie: () => buildLocaleCookie,
|
|
6641
|
-
buildHeadFromMeta: () => buildHeadFromMeta,
|
|
6642
|
-
blockSearchCrawlers: () => blockSearchCrawlers,
|
|
6643
|
-
blockAITrainingCrawlers: () => blockAITrainingCrawlers,
|
|
6644
|
-
blockAICrawlers: () => blockAICrawlers,
|
|
6645
|
-
basename: () => basename,
|
|
6646
|
-
applyIndexTemplate: () => applyIndexTemplate,
|
|
6647
|
-
allowSearchCrawlers: () => allowSearchCrawlers,
|
|
6648
|
-
allowAICrawlers: () => allowAICrawlers,
|
|
6649
|
-
acceptsGzip: () => acceptsGzip,
|
|
6650
|
-
acceptsBrotli: () => acceptsBrotli,
|
|
6651
|
-
TTLCache: () => TTLCache,
|
|
6652
|
-
SSRDataCache: () => SSRDataCache,
|
|
6653
|
-
SEARCH_CRAWLERS: () => SEARCH_CRAWLERS,
|
|
6654
|
-
LRUCache: () => LRUCache,
|
|
6655
|
-
DefaultOGTemplate: () => DefaultOGTemplate,
|
|
6656
|
-
DEFAULT_LOCALES_DIR: () => DEFAULT_LOCALES_DIR,
|
|
6657
|
-
DEFAULT_LOCALE: () => DEFAULT_LOCALE,
|
|
6880
|
+
AI_CRAWLERS: () => AI_CRAWLERS,
|
|
6658
6881
|
DEFAULT_COOKIE: () => DEFAULT_COOKIE,
|
|
6659
|
-
|
|
6882
|
+
DEFAULT_LOCALE: () => DEFAULT_LOCALE,
|
|
6883
|
+
DEFAULT_LOCALES_DIR: () => DEFAULT_LOCALES_DIR,
|
|
6884
|
+
DefaultOGTemplate: () => DefaultOGTemplate,
|
|
6885
|
+
LRUCache: () => LRUCache,
|
|
6886
|
+
SEARCH_CRAWLERS: () => SEARCH_CRAWLERS,
|
|
6887
|
+
SSRDataCache: () => SSRDataCache,
|
|
6888
|
+
TTLCache: () => TTLCache,
|
|
6889
|
+
acceptsBrotli: () => acceptsBrotli,
|
|
6890
|
+
acceptsGzip: () => acceptsGzip,
|
|
6891
|
+
allowAICrawlers: () => allowAICrawlers,
|
|
6892
|
+
allowSearchCrawlers: () => allowSearchCrawlers,
|
|
6893
|
+
appendLlmsAlternateHead: () => appendLlmsAlternateHead,
|
|
6894
|
+
applyIndexTemplate: () => applyIndexTemplate,
|
|
6895
|
+
applyLlmsDiscoveryHeaders: () => applyLlmsDiscoveryHeaders,
|
|
6896
|
+
basename: () => basename,
|
|
6897
|
+
blockAICrawlers: () => blockAICrawlers,
|
|
6898
|
+
blockAITrainingCrawlers: () => blockAITrainingCrawlers,
|
|
6899
|
+
blockSearchCrawlers: () => blockSearchCrawlers,
|
|
6900
|
+
buildHeadFromMeta: () => buildHeadFromMeta,
|
|
6901
|
+
buildLlmsDiscovery: () => buildLlmsDiscovery,
|
|
6902
|
+
buildLocaleCookie: () => buildLocaleCookie,
|
|
6903
|
+
buildSitemapLoc: () => buildSitemapLoc,
|
|
6904
|
+
cleanupPathScopedSSRData: () => cleanupPathScopedSSRData,
|
|
6905
|
+
clearSSRModuleStores: () => clearSSRModuleStores,
|
|
6906
|
+
clearWatchImportCache: () => clearWatchImportCache,
|
|
6907
|
+
compareRouteSpecificity: () => compareRouteSpecificity,
|
|
6908
|
+
compressStreamIfAccepted: () => compressStreamIfAccepted,
|
|
6909
|
+
computeContentData: () => computeContentData,
|
|
6910
|
+
computeLayoutData: () => computeLayoutData,
|
|
6911
|
+
computeRouteData: () => computeRouteData,
|
|
6912
|
+
computeSSRData: () => computeSSRData,
|
|
6913
|
+
computeSSRDataForPath: () => computeSSRDataForPath,
|
|
6914
|
+
contentKey: () => contentKey,
|
|
6915
|
+
contentNegotiateRedirect: () => contentNegotiateRedirect,
|
|
6916
|
+
createBundlePreload: () => createBundlePreload,
|
|
6917
|
+
createCollectionScript: () => createCollectionScript,
|
|
6918
|
+
createDataScript: () => createDataScript,
|
|
6919
|
+
createFeedsScript: () => createFeedsScript,
|
|
6920
|
+
createLayoutCacheKey: () => createLayoutCacheKey,
|
|
6921
|
+
createLayoutDataKey: () => createLayoutDataKey,
|
|
6922
|
+
createLlmsScript: () => createLlmsScript,
|
|
6923
|
+
createTranslator: () => createTranslator,
|
|
6924
|
+
deduplicateMetaTags: () => deduplicateMetaTags,
|
|
6925
|
+
defineConfig: () => defineConfig,
|
|
6926
|
+
discoverCollectionContent: () => discoverCollectionContent,
|
|
6927
|
+
discoverCollections: () => discoverCollections,
|
|
6928
|
+
discoverDynamicSitemapRoutes: () => discoverDynamicSitemapRoutes,
|
|
6929
|
+
discoverI18n: () => discoverI18n,
|
|
6930
|
+
discoverRSSData: () => discoverRSSData,
|
|
6931
|
+
discoverRobotsData: () => discoverRobotsData,
|
|
6932
|
+
discoverRoutes: () => discoverRoutes,
|
|
6933
|
+
discoverRoutesForRobots: () => discoverRoutesForRobots,
|
|
6934
|
+
discoverSSRDataFeedItems: () => discoverSSRDataFeedItems,
|
|
6935
|
+
discoverSSRDataRoutes: () => discoverSSRDataRoutes2,
|
|
6936
|
+
discoverSitemapData: () => discoverSitemapData,
|
|
6937
|
+
duplicateQueryParamData: () => duplicateQueryParamData,
|
|
6938
|
+
dynamicImport: () => dynamicImport,
|
|
6939
|
+
escapeJsonForScript: () => escapeJsonForScript,
|
|
6940
|
+
escapeXml: () => escapeXml2,
|
|
6941
|
+
extname: () => extname,
|
|
6942
|
+
extractContentForLLMs: () => extractContentForLLMs,
|
|
6943
|
+
extractPageMetadata: () => extractPageMetadata,
|
|
6944
|
+
extractParamsFromPath: () => extractParamsFromPath,
|
|
6945
|
+
extractTitle: () => extractTitle,
|
|
6946
|
+
findOGImageForPath: () => findOGImageForPath,
|
|
6947
|
+
formatAsMarkdown: () => formatAsMarkdown,
|
|
6948
|
+
formatAsText: () => formatAsText,
|
|
6949
|
+
formatContentSignal: () => formatContentSignal,
|
|
6950
|
+
formatMessage: () => formatMessage,
|
|
6951
|
+
generateAtomXML: () => generateAtomXML,
|
|
6952
|
+
generateCollectionScripts: () => generateCollectionScripts,
|
|
6953
|
+
generateContentHash: () => generateContentHash,
|
|
6954
|
+
generateFeed: () => generateFeed,
|
|
6955
|
+
generateHydrationScripts: () => generateHydrationScripts,
|
|
6956
|
+
generateLLMsFooter: () => generateLLMsFooter,
|
|
6957
|
+
generateLLMsFullContent: () => generateLLMsFullContent,
|
|
6958
|
+
generateLLMsIndex: () => generateLLMsIndex,
|
|
6959
|
+
generateOGImageMetaTags: () => generateOGImageMetaTags,
|
|
6960
|
+
generateRSSXML: () => generateRSSXML,
|
|
6961
|
+
generateRobots: () => generateRobots,
|
|
6962
|
+
generateSitemap: () => generateSitemap,
|
|
6963
|
+
generateSitemapIndexXML: () => generateSitemapIndexXML,
|
|
6964
|
+
generateSitemapXML: () => generateSitemapXML,
|
|
6965
|
+
getContentMeta: () => getContentMeta,
|
|
6966
|
+
getMatchingLayouts: () => getMatchingLayouts,
|
|
6967
|
+
getMessage: () => getMessage,
|
|
6968
|
+
getMimeType: () => getMimeType,
|
|
6969
|
+
getPatternDepth: () => getPatternDepth,
|
|
6970
|
+
getRedirectSourcePaths: () => getRedirectSourcePaths,
|
|
6971
|
+
getSitemapExcludedRoutes: () => getSitemapExcludedRoutes,
|
|
6972
|
+
gzipIfAccepted: () => gzipIfAccepted,
|
|
6973
|
+
hreflangTags: () => hreflangTags,
|
|
6974
|
+
htmlToMarkdown: () => htmlToMarkdown,
|
|
6975
|
+
importContentModuleForPath: () => importContentModuleForPath,
|
|
6976
|
+
inlineThemeCSS: () => inlineThemeCSS,
|
|
6977
|
+
isCompressible: () => isCompressible,
|
|
6978
|
+
isThenable: () => isThenable,
|
|
6979
|
+
join: () => join2,
|
|
6980
|
+
listContentFiles: () => listContentFiles,
|
|
6981
|
+
llmsAlternateLinkTag: () => llmsAlternateLinkTag,
|
|
6982
|
+
loadCollections: () => loadCollections,
|
|
6983
|
+
loadConfig: () => loadConfig,
|
|
6984
|
+
loadIndexHtml: () => loadIndexHtml,
|
|
6985
|
+
loadOGImageComponent: () => loadOGImageComponent,
|
|
6986
|
+
loadRoutesModule: () => loadRoutesModule,
|
|
6987
|
+
localizeContentHref: () => localizeContentHref,
|
|
6988
|
+
localizeHref: () => localizeHref,
|
|
6989
|
+
looksLikeLocale: () => looksLikeLocale,
|
|
6990
|
+
lookupMessage: () => lookupMessage,
|
|
6991
|
+
markdownTwinPath: () => markdownTwinPath,
|
|
6992
|
+
matchRoutePattern: () => matchRoutePattern,
|
|
6993
|
+
matchRoutes: () => matchRoutes,
|
|
6994
|
+
mergeLayoutData: () => mergeLayoutData,
|
|
6995
|
+
mergeVary: () => mergeVary,
|
|
6996
|
+
negotiateLocale: () => negotiateLocale,
|
|
6997
|
+
normalizePathname: () => normalizePathname,
|
|
6998
|
+
parseContentPath: () => parseContentPath,
|
|
6999
|
+
parseCookieValue: () => parseCookieValue,
|
|
7000
|
+
performSSRSetup: () => performSSRSetup,
|
|
7001
|
+
preloadContentModule: () => preloadContentModule,
|
|
7002
|
+
processCollections: () => processCollections,
|
|
7003
|
+
removeOverriddenMetaTags: () => removeOverriddenMetaTags,
|
|
7004
|
+
renderOGImageToPNG: () => renderOGImageToPNG,
|
|
7005
|
+
renderSSRDocument: () => renderSSRDocument,
|
|
7006
|
+
renderSSRDocumentStream: () => renderSSRDocumentStream,
|
|
7007
|
+
resetSSRAccessTracking: () => resetSSRAccessTracking,
|
|
7008
|
+
resetSSRContentResults: () => resetSSRContentResults,
|
|
7009
|
+
resolveLocale: () => resolveLocale,
|
|
7010
|
+
seedSSRModuleForPath: () => seedSSRModuleForPath,
|
|
7011
|
+
setGlobalCollections: () => setGlobalCollections,
|
|
7012
|
+
setGlobalSSRData: () => setGlobalSSRData,
|
|
7013
|
+
shouldAdvertiseMarkdownTwin: () => shouldAdvertiseMarkdownTwin,
|
|
7014
|
+
shouldExcludeRoute: () => shouldExcludeRoute,
|
|
7015
|
+
splitTemplate: () => splitTemplate,
|
|
7016
|
+
ssrCache: () => ssrCache,
|
|
7017
|
+
statusCache: () => statusCache,
|
|
7018
|
+
stripEnd: () => stripEnd,
|
|
7019
|
+
stripHtmlTags: () => stripHtmlTags,
|
|
7020
|
+
stripStart: () => stripStart,
|
|
7021
|
+
takeSSRContentResults: () => takeSSRContentResults,
|
|
7022
|
+
toBytes: () => toBytes,
|
|
7023
|
+
toOgLocale: () => toOgLocale,
|
|
7024
|
+
toPromise: () => toPromise
|
|
6660
7025
|
});
|
|
6661
7026
|
var init_core = __esm(() => {
|
|
6662
7027
|
init_src();
|
|
@@ -6666,7 +7031,9 @@ var init_core = __esm(() => {
|
|
|
6666
7031
|
function getCommonBuildOptions() {
|
|
6667
7032
|
return {
|
|
6668
7033
|
loader: {
|
|
6669
|
-
".css": "text"
|
|
7034
|
+
".css": "text",
|
|
7035
|
+
".md": "text",
|
|
7036
|
+
".mdx": "text"
|
|
6670
7037
|
}
|
|
6671
7038
|
};
|
|
6672
7039
|
}
|
|
@@ -6677,10 +7044,13 @@ function getNamingConfig(options) {
|
|
|
6677
7044
|
asset: options?.asset || "asset.[hash].[ext]"
|
|
6678
7045
|
};
|
|
6679
7046
|
}
|
|
7047
|
+
function shouldRebuildClientBundle(filename) {
|
|
7048
|
+
return filename.endsWith(".ts") || filename.endsWith(".tsx") || filename.endsWith(".md") || filename.endsWith(".mdx");
|
|
7049
|
+
}
|
|
6680
7050
|
|
|
6681
7051
|
// packages/cli/src/commands/lib/env.ts
|
|
6682
7052
|
import { existsSync as existsSync2, readFileSync } from "node:fs";
|
|
6683
|
-
import { join as
|
|
7053
|
+
import { join as join5 } from "node:path";
|
|
6684
7054
|
function parseEnvFile(content2) {
|
|
6685
7055
|
const env = {};
|
|
6686
7056
|
const lines = content2.split(`
|
|
@@ -6706,7 +7076,7 @@ function loadEnvFiles(cwd, mode = "development") {
|
|
|
6706
7076
|
const env = {};
|
|
6707
7077
|
const loadedFiles = [];
|
|
6708
7078
|
for (const file of envFiles) {
|
|
6709
|
-
const filePath =
|
|
7079
|
+
const filePath = join5(cwd, file);
|
|
6710
7080
|
if (existsSync2(filePath)) {
|
|
6711
7081
|
try {
|
|
6712
7082
|
const content2 = readFileSync(filePath, "utf-8");
|
|
@@ -6750,11 +7120,11 @@ var init_env = () => {};
|
|
|
6750
7120
|
|
|
6751
7121
|
// packages/cli/src/commands/lib/markdown/availability.ts
|
|
6752
7122
|
import { existsSync as existsSync3, readFileSync as readFileSync2 } from "node:fs";
|
|
6753
|
-
import { dirname, join as
|
|
7123
|
+
import { dirname as dirname2, join as join6 } from "node:path";
|
|
6754
7124
|
function isPackageAvailable(cwd, packageName) {
|
|
6755
7125
|
let currentDir = cwd;
|
|
6756
7126
|
for (let i = 0;i < 5; i++) {
|
|
6757
|
-
const packageJsonPath =
|
|
7127
|
+
const packageJsonPath = join6(currentDir, "package.json");
|
|
6758
7128
|
if (existsSync3(packageJsonPath)) {
|
|
6759
7129
|
try {
|
|
6760
7130
|
const packageJson = JSON.parse(readFileSync2(packageJsonPath, "utf-8"));
|
|
@@ -6768,7 +7138,7 @@ function isPackageAvailable(cwd, packageName) {
|
|
|
6768
7138
|
}
|
|
6769
7139
|
} catch {}
|
|
6770
7140
|
}
|
|
6771
|
-
const parentDir =
|
|
7141
|
+
const parentDir = dirname2(currentDir);
|
|
6772
7142
|
if (parentDir === currentDir) {
|
|
6773
7143
|
break;
|
|
6774
7144
|
}
|
|
@@ -6826,7 +7196,7 @@ var init_availability = () => {};
|
|
|
6826
7196
|
|
|
6827
7197
|
// packages/cli/src/commands/lib/markdown/processor.ts
|
|
6828
7198
|
import { existsSync as existsSync4, readFileSync as readFileSync3 } from "node:fs";
|
|
6829
|
-
import { basename as
|
|
7199
|
+
import { basename as basename3, dirname as dirname3, extname as extname3, join as join7, relative, resolve } from "node:path";
|
|
6830
7200
|
import matter from "gray-matter";
|
|
6831
7201
|
function convertPropertiesToJsx(properties) {
|
|
6832
7202
|
const newProperties = {};
|
|
@@ -6885,7 +7255,7 @@ function processMarkdownFile(filePath) {
|
|
|
6885
7255
|
function isMdxAvailable2(cwd) {
|
|
6886
7256
|
let currentDir = cwd;
|
|
6887
7257
|
for (let i = 0;i < 5; i++) {
|
|
6888
|
-
const packageJsonPath =
|
|
7258
|
+
const packageJsonPath = join7(currentDir, "package.json");
|
|
6889
7259
|
if (existsSync4(packageJsonPath)) {
|
|
6890
7260
|
try {
|
|
6891
7261
|
const packageJson = JSON.parse(readFileSync3(packageJsonPath, "utf-8"));
|
|
@@ -6899,7 +7269,7 @@ function isMdxAvailable2(cwd) {
|
|
|
6899
7269
|
}
|
|
6900
7270
|
} catch {}
|
|
6901
7271
|
}
|
|
6902
|
-
const parentDir =
|
|
7272
|
+
const parentDir = dirname3(currentDir);
|
|
6903
7273
|
if (parentDir === currentDir) {
|
|
6904
7274
|
break;
|
|
6905
7275
|
}
|
|
@@ -6909,10 +7279,10 @@ function isMdxAvailable2(cwd) {
|
|
|
6909
7279
|
}
|
|
6910
7280
|
function tryLoadModule(cwd, moduleName) {
|
|
6911
7281
|
const pathsToTry = [
|
|
6912
|
-
|
|
6913
|
-
|
|
6914
|
-
|
|
6915
|
-
|
|
7282
|
+
join7(cwd, `node_modules/${moduleName}`),
|
|
7283
|
+
join7(cwd, `../node_modules/${moduleName}`),
|
|
7284
|
+
join7(cwd, `../../node_modules/${moduleName}`),
|
|
7285
|
+
join7(cwd, `../../../node_modules/${moduleName}`)
|
|
6916
7286
|
];
|
|
6917
7287
|
for (const modulePath of pathsToTry) {
|
|
6918
7288
|
try {
|
|
@@ -7001,9 +7371,9 @@ async function compileMdx(content2, cwd, options = {}) {
|
|
|
7001
7371
|
function rewriteImportPaths(code, sourcePath, targetPath) {
|
|
7002
7372
|
const importRegex = /import\s+(?:{[^}]+}|[\w\s,]+)\s+from\s+['"](\.[^'"]+)['"]/g;
|
|
7003
7373
|
return code.replace(importRegex, (match, importPath) => {
|
|
7004
|
-
const sourceDir =
|
|
7374
|
+
const sourceDir = dirname3(sourcePath);
|
|
7005
7375
|
const absoluteImportPath = resolve(sourceDir, importPath);
|
|
7006
|
-
const targetDir =
|
|
7376
|
+
const targetDir = dirname3(targetPath);
|
|
7007
7377
|
let newRelativePath = relative(targetDir, absoluteImportPath);
|
|
7008
7378
|
if (!newRelativePath.startsWith(".")) {
|
|
7009
7379
|
newRelativePath = `./${newRelativePath}`;
|
|
@@ -7161,7 +7531,7 @@ export default function MarkdownFallback() {
|
|
|
7161
7531
|
`;
|
|
7162
7532
|
}
|
|
7163
7533
|
function isMarkdownFile(filePath) {
|
|
7164
|
-
const ext =
|
|
7534
|
+
const ext = extname3(filePath).toLowerCase();
|
|
7165
7535
|
return ext === ".md" || ext === ".mdx";
|
|
7166
7536
|
}
|
|
7167
7537
|
function extractHeadings(content2, options = {}) {
|
|
@@ -7242,7 +7612,7 @@ function isProductionMode(args = []) {
|
|
|
7242
7612
|
}
|
|
7243
7613
|
|
|
7244
7614
|
// packages/cli/src/commands/lib/streaming/analyzer.ts
|
|
7245
|
-
import { dirname as
|
|
7615
|
+
import { dirname as dirname4, join as join8 } from "node:path";
|
|
7246
7616
|
function hasSSRDataExport(source) {
|
|
7247
7617
|
if (SSR_DATA_INLINE_EXPORT_REGEX.test(source)) {
|
|
7248
7618
|
return true;
|
|
@@ -7269,11 +7639,11 @@ async function analyzeRouteForStreaming(options) {
|
|
|
7269
7639
|
};
|
|
7270
7640
|
}
|
|
7271
7641
|
async function findSkeletonForTarget(routesDir, relativePath, type) {
|
|
7272
|
-
const dirName = normalizeRelativePath(
|
|
7273
|
-
const baseDir = dirName === "." ? routesDir :
|
|
7642
|
+
const dirName = normalizeRelativePath(dirname4(relativePath));
|
|
7643
|
+
const baseDir = dirName === "." ? routesDir : join8(routesDir, dirName).replace(/\\/g, "/");
|
|
7274
7644
|
const candidates = type === "layout" ? ["[layout+skeleton].tsx", "[layout+skeleton].ts"] : ["[skeleton].tsx", "[skeleton].ts"];
|
|
7275
7645
|
for (const candidate of candidates) {
|
|
7276
|
-
const candidatePath =
|
|
7646
|
+
const candidatePath = join8(baseDir, candidate);
|
|
7277
7647
|
try {
|
|
7278
7648
|
const file = Bun.file(candidatePath);
|
|
7279
7649
|
if (await file.exists()) {
|
|
@@ -7294,12 +7664,12 @@ var init_analyzer = __esm(() => {
|
|
|
7294
7664
|
});
|
|
7295
7665
|
|
|
7296
7666
|
// packages/cli/src/commands/lib/streaming/suspense.ts
|
|
7297
|
-
import { dirname as
|
|
7667
|
+
import { dirname as dirname5, join as join9, relative as relative2 } from "node:path";
|
|
7298
7668
|
async function generateStreamingWrapper(options) {
|
|
7299
7669
|
const { cwd, relativeFilePath, analysis, config: config2 } = options;
|
|
7300
|
-
const streamingModulePath =
|
|
7301
|
-
const wrapperDir =
|
|
7302
|
-
const originalModuleWithoutExt = removeExtension(
|
|
7670
|
+
const streamingModulePath = join9(cwd, ".reroute", "streaming", relativeFilePath).replace(/\.(tsx|ts)$/, ".tsx");
|
|
7671
|
+
const wrapperDir = dirname5(streamingModulePath);
|
|
7672
|
+
const originalModuleWithoutExt = removeExtension(join9(cwd, "src", "client", "routes", relativeFilePath));
|
|
7303
7673
|
const originalImportPath = toImportPath(wrapperDir, originalModuleWithoutExt);
|
|
7304
7674
|
const skeletonImportBlock = await resolveSkeletonBlock({
|
|
7305
7675
|
analysis,
|
|
@@ -7341,7 +7711,7 @@ async function resolveSkeletonBlock(args) {
|
|
|
7341
7711
|
}
|
|
7342
7712
|
function resolveConfiguredSkeletonPath(value, cwd) {
|
|
7343
7713
|
if (typeof value === "string" && value.trim().length > 0) {
|
|
7344
|
-
return value.startsWith("/") ? value :
|
|
7714
|
+
return value.startsWith("/") ? value : join9(cwd, value);
|
|
7345
7715
|
}
|
|
7346
7716
|
if (value && !warnedSkeletonType) {
|
|
7347
7717
|
console.warn("[reroute/streaming] default skeletons must be provided as string module paths in reroute.config.ts");
|
|
@@ -7376,38 +7746,96 @@ var AUTO_HEADER = `// \uD83D\uDEA8 Auto-generated streaming wrapper by Reroute -
|
|
|
7376
7746
|
var init_suspense = () => {};
|
|
7377
7747
|
|
|
7378
7748
|
// packages/cli/src/commands/lib/theme.ts
|
|
7379
|
-
import { existsSync as existsSync5 } from "node:fs";
|
|
7380
|
-
import { mkdir as mkdir2 } from "node:fs/promises";
|
|
7381
|
-
import { dirname as
|
|
7749
|
+
import { existsSync as existsSync5, readFileSync as readFileSync4 } from "node:fs";
|
|
7750
|
+
import { mkdir as mkdir2, writeFile } from "node:fs/promises";
|
|
7751
|
+
import { dirname as dirname6, isAbsolute, join as join10, resolve as resolve2 } from "node:path";
|
|
7382
7752
|
function getCssPaths(cwd) {
|
|
7383
|
-
const input =
|
|
7384
|
-
const output =
|
|
7753
|
+
const input = join10(cwd, "src/client/index.css");
|
|
7754
|
+
const output = join10(cwd, ".reroute/index.css");
|
|
7385
7755
|
return { input, output };
|
|
7386
7756
|
}
|
|
7757
|
+
function isFileImport(specifier) {
|
|
7758
|
+
if (specifier.startsWith("http://") || specifier.startsWith("https://") || specifier.startsWith("data:") || specifier.startsWith("/")) {
|
|
7759
|
+
return false;
|
|
7760
|
+
}
|
|
7761
|
+
return true;
|
|
7762
|
+
}
|
|
7763
|
+
function bundleCssEntrypoint(entryPath) {
|
|
7764
|
+
const absEntry = resolve2(entryPath);
|
|
7765
|
+
const stack = new Set;
|
|
7766
|
+
const completed = new Set;
|
|
7767
|
+
function bundleFile(filePath) {
|
|
7768
|
+
const absPath = resolve2(filePath);
|
|
7769
|
+
if (completed.has(absPath)) {
|
|
7770
|
+
return "";
|
|
7771
|
+
}
|
|
7772
|
+
if (stack.has(absPath)) {
|
|
7773
|
+
throw new Error(`[reroute/theme] Circular @import detected: ${absPath}`);
|
|
7774
|
+
}
|
|
7775
|
+
if (!existsSync5(absPath)) {
|
|
7776
|
+
throw new Error(`[reroute/theme] Missing CSS import: ${absPath}`);
|
|
7777
|
+
}
|
|
7778
|
+
stack.add(absPath);
|
|
7779
|
+
const source = readFileSync4(absPath, "utf-8");
|
|
7780
|
+
const baseDir = dirname6(absPath);
|
|
7781
|
+
const bundled = source.replace(IMPORT_RE, (full, single, double, bare, rest) => {
|
|
7782
|
+
const specifier = single || double || bare;
|
|
7783
|
+
const condition = (rest ?? "").trim();
|
|
7784
|
+
if (condition || !isFileImport(specifier)) {
|
|
7785
|
+
return full;
|
|
7786
|
+
}
|
|
7787
|
+
const importedPath = isAbsolute(specifier) ? specifier : resolve2(baseDir, specifier);
|
|
7788
|
+
return `/* ${specifier} */
|
|
7789
|
+
${bundleFile(importedPath)}
|
|
7790
|
+
`;
|
|
7791
|
+
});
|
|
7792
|
+
stack.delete(absPath);
|
|
7793
|
+
completed.add(absPath);
|
|
7794
|
+
return bundled;
|
|
7795
|
+
}
|
|
7796
|
+
return bundleFile(absEntry);
|
|
7797
|
+
}
|
|
7387
7798
|
async function syncThemeCss(cwd) {
|
|
7388
7799
|
const { input, output } = getCssPaths(cwd);
|
|
7389
7800
|
if (!existsSync5(input)) {
|
|
7390
7801
|
return false;
|
|
7391
7802
|
}
|
|
7392
|
-
await mkdir2(
|
|
7393
|
-
|
|
7803
|
+
await mkdir2(dirname6(output), { recursive: true });
|
|
7804
|
+
try {
|
|
7805
|
+
const css = bundleCssEntrypoint(input);
|
|
7806
|
+
await writeFile(output, css, "utf-8");
|
|
7807
|
+
} catch (err) {
|
|
7808
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
7809
|
+
if (message.startsWith("[reroute/theme]")) {
|
|
7810
|
+
throw err;
|
|
7811
|
+
}
|
|
7812
|
+
throw new Error(`[reroute/theme] Failed to bundle index.css:
|
|
7813
|
+
${message}`);
|
|
7814
|
+
}
|
|
7394
7815
|
console.log("[reroute/theme] synced index.css");
|
|
7395
7816
|
return true;
|
|
7396
7817
|
}
|
|
7397
|
-
var
|
|
7818
|
+
var IMPORT_RE;
|
|
7819
|
+
var init_theme = __esm(() => {
|
|
7820
|
+
IMPORT_RE = /@import\s+(?:url\(\s*)?(?:'([^']+)'|"([^"]+)"|([^'")\s]+))\s*\)?\s*([^;]*);/g;
|
|
7821
|
+
});
|
|
7398
7822
|
|
|
7399
7823
|
// packages/cli/src/commands/gen.ts
|
|
7400
7824
|
var exports_gen = {};
|
|
7401
7825
|
__export(exports_gen, {
|
|
7402
|
-
default: () => gen
|
|
7826
|
+
default: () => gen,
|
|
7827
|
+
startGenWatch: () => startGenWatch
|
|
7403
7828
|
});
|
|
7404
7829
|
import { watch } from "node:fs";
|
|
7405
|
-
import { mkdir as mkdir3, readdir as readdir7, rm } from "node:fs/promises";
|
|
7406
|
-
import { dirname as
|
|
7830
|
+
import { copyFile as copyFile2, mkdir as mkdir3, readdir as readdir7, rm, unlink as unlink2 } from "node:fs/promises";
|
|
7831
|
+
import { dirname as dirname7, extname as extname4, join as join11 } from "node:path";
|
|
7407
7832
|
import { pathToFileURL as pathToFileURL8 } from "node:url";
|
|
7833
|
+
function isWatchNoise(name) {
|
|
7834
|
+
return name.split(/[/\\]/).some((part) => part.startsWith(".")) || /\.bust-[^/\\]+$/.test(name);
|
|
7835
|
+
}
|
|
7408
7836
|
async function bundleThemeCssIntoArtifacts(cwd) {
|
|
7409
|
-
const cssPath =
|
|
7410
|
-
const artifactsPath =
|
|
7837
|
+
const cssPath = join11(cwd, ".reroute", "index.css");
|
|
7838
|
+
const artifactsPath = join11(cwd, OUTPUT_ARTIFACTS);
|
|
7411
7839
|
try {
|
|
7412
7840
|
const cssContent = await Bun.file(cssPath).text();
|
|
7413
7841
|
if (!cssContent)
|
|
@@ -7433,7 +7861,7 @@ async function bundleThemeCssIntoArtifacts(cwd) {
|
|
|
7433
7861
|
async function ensureOutputDir(cwd, options = {}) {
|
|
7434
7862
|
const { clean = true } = options;
|
|
7435
7863
|
try {
|
|
7436
|
-
const outputPath =
|
|
7864
|
+
const outputPath = join11(cwd, OUTPUT_DIR);
|
|
7437
7865
|
if (clean) {
|
|
7438
7866
|
let needsCleanup = false;
|
|
7439
7867
|
try {
|
|
@@ -7446,9 +7874,9 @@ async function ensureOutputDir(cwd, options = {}) {
|
|
|
7446
7874
|
}
|
|
7447
7875
|
}
|
|
7448
7876
|
await mkdir3(outputPath, { recursive: true });
|
|
7449
|
-
await mkdir3(
|
|
7450
|
-
await mkdir3(
|
|
7451
|
-
await mkdir3(
|
|
7877
|
+
await mkdir3(join11(cwd, OUTPUT_COLLECTIONS_DIR), { recursive: true });
|
|
7878
|
+
await mkdir3(join11(cwd, ".reroute/bundles"), { recursive: true });
|
|
7879
|
+
await mkdir3(join11(cwd, ".reroute/streaming"), { recursive: true });
|
|
7452
7880
|
} catch {}
|
|
7453
7881
|
}
|
|
7454
7882
|
async function writeStubFiles(cwd) {
|
|
@@ -7506,11 +7934,11 @@ import './artifacts';
|
|
|
7506
7934
|
import './routes'; // Import routes (bundles all route components)
|
|
7507
7935
|
import '../src/index';
|
|
7508
7936
|
`;
|
|
7509
|
-
await Bun.write(
|
|
7510
|
-
await Bun.write(
|
|
7511
|
-
await Bun.write(
|
|
7512
|
-
await Bun.write(
|
|
7513
|
-
await Bun.write(
|
|
7937
|
+
await Bun.write(join11(cwd, OUTPUT_ROUTES), STUB_ROUTES);
|
|
7938
|
+
await Bun.write(join11(cwd, OUTPUT_CONTENT_TS), STUB_CONTENT);
|
|
7939
|
+
await Bun.write(join11(cwd, OUTPUT_ARTIFACTS), STUB_ARTIFACTS);
|
|
7940
|
+
await Bun.write(join11(cwd, OUTPUT_INDEX), STUB_INDEX);
|
|
7941
|
+
await Bun.write(join11(cwd, ".reroute/entry.ts"), STUB_ENTRY);
|
|
7514
7942
|
console.log("[reroute/gen] Initialized stub files");
|
|
7515
7943
|
}
|
|
7516
7944
|
function shouldSkipFile(relativePath, entryName) {
|
|
@@ -7532,8 +7960,8 @@ async function scanDirectory(dir, base = "") {
|
|
|
7532
7960
|
const files = [];
|
|
7533
7961
|
const entries = await readdir7(dir, { withFileTypes: true });
|
|
7534
7962
|
for (const entry of entries) {
|
|
7535
|
-
const fullPath =
|
|
7536
|
-
const relativePath =
|
|
7963
|
+
const fullPath = join11(dir, entry.name);
|
|
7964
|
+
const relativePath = join11(base, entry.name);
|
|
7537
7965
|
if (entry.isDirectory()) {
|
|
7538
7966
|
if (entry.name === "content")
|
|
7539
7967
|
continue;
|
|
@@ -7551,8 +7979,8 @@ async function scan404Files(dir, base = "") {
|
|
|
7551
7979
|
const files = [];
|
|
7552
7980
|
const entries = await readdir7(dir, { withFileTypes: true });
|
|
7553
7981
|
for (const entry of entries) {
|
|
7554
|
-
const fullPath =
|
|
7555
|
-
const relativePath =
|
|
7982
|
+
const fullPath = join11(dir, entry.name);
|
|
7983
|
+
const relativePath = join11(base, entry.name);
|
|
7556
7984
|
if (entry.isDirectory()) {
|
|
7557
7985
|
const nested = await scan404Files(fullPath, relativePath);
|
|
7558
7986
|
files.push(...nested);
|
|
@@ -7567,8 +7995,8 @@ async function scanOgFiles(dir, base = "") {
|
|
|
7567
7995
|
const files = [];
|
|
7568
7996
|
const entries = await readdir7(dir, { withFileTypes: true });
|
|
7569
7997
|
for (const entry of entries) {
|
|
7570
|
-
const fullPath =
|
|
7571
|
-
const relativePath =
|
|
7998
|
+
const fullPath = join11(dir, entry.name);
|
|
7999
|
+
const relativePath = join11(base, entry.name);
|
|
7572
8000
|
if (entry.isDirectory()) {
|
|
7573
8001
|
if (entry.name === "content")
|
|
7574
8002
|
continue;
|
|
@@ -7822,7 +8250,7 @@ function matchPattern(route: Route, pathname: string): Record<string, string> |
|
|
|
7822
8250
|
`;
|
|
7823
8251
|
}
|
|
7824
8252
|
async function buildStreamingWrappersForTree(cwd, routesPath, tree, config2) {
|
|
7825
|
-
const streamingDir =
|
|
8253
|
+
const streamingDir = join11(cwd, ".reroute", "streaming");
|
|
7826
8254
|
const analyses = new Map;
|
|
7827
8255
|
const candidates = [
|
|
7828
8256
|
...tree.routes.map((route) => ({
|
|
@@ -7841,7 +8269,7 @@ async function buildStreamingWrappersForTree(cwd, routesPath, tree, config2) {
|
|
|
7841
8269
|
for (const candidate of candidates) {
|
|
7842
8270
|
if (!/\.(tsx|ts)$/.test(candidate.filePath))
|
|
7843
8271
|
continue;
|
|
7844
|
-
const absolutePath =
|
|
8272
|
+
const absolutePath = join11(routesPath, candidate.filePath);
|
|
7845
8273
|
const analysis = await analyzeRouteForStreaming({
|
|
7846
8274
|
absolutePath,
|
|
7847
8275
|
relativePath: candidate.filePath,
|
|
@@ -7850,8 +8278,8 @@ async function buildStreamingWrappersForTree(cwd, routesPath, tree, config2) {
|
|
|
7850
8278
|
});
|
|
7851
8279
|
if (!analysis.needsStreaming)
|
|
7852
8280
|
continue;
|
|
7853
|
-
const wrapperPath =
|
|
7854
|
-
await mkdir3(
|
|
8281
|
+
const wrapperPath = join11(streamingDir, candidate.filePath).replace(/\.(tsx|ts)$/, ".tsx");
|
|
8282
|
+
await mkdir3(dirname7(wrapperPath), { recursive: true });
|
|
7855
8283
|
const code = await generateStreamingWrapper({
|
|
7856
8284
|
cwd,
|
|
7857
8285
|
relativeFilePath: candidate.filePath,
|
|
@@ -7875,13 +8303,13 @@ function isContentFileName(name) {
|
|
|
7875
8303
|
}
|
|
7876
8304
|
async function listLocaleContentFiles(collectionDir, locale) {
|
|
7877
8305
|
try {
|
|
7878
|
-
const nested = await readdir7(
|
|
8306
|
+
const nested = await readdir7(join11(collectionDir, locale), {
|
|
7879
8307
|
withFileTypes: true
|
|
7880
8308
|
});
|
|
7881
8309
|
const files = [];
|
|
7882
8310
|
for (const n of nested) {
|
|
7883
8311
|
if (n.isFile() && isContentFileName(n.name)) {
|
|
7884
|
-
files.push({ relativePath:
|
|
8312
|
+
files.push({ relativePath: join11(locale, n.name), locale });
|
|
7885
8313
|
}
|
|
7886
8314
|
}
|
|
7887
8315
|
return files;
|
|
@@ -7915,6 +8343,19 @@ async function sha8(text) {
|
|
|
7915
8343
|
hex += b.toString(16).padStart(2, "0");
|
|
7916
8344
|
return hex.slice(0, 8);
|
|
7917
8345
|
}
|
|
8346
|
+
async function loadContentMeta(absSrc, buildSrc, isMarkdown) {
|
|
8347
|
+
if (isMarkdown) {
|
|
8348
|
+
return processMarkdownFile(absSrc).frontmatter || {};
|
|
8349
|
+
}
|
|
8350
|
+
const tmp = join11(dirname7(buildSrc), `.meta-${Date.now()}-${Math.random().toString(36).slice(2)}${extname4(buildSrc)}`);
|
|
8351
|
+
try {
|
|
8352
|
+
await copyFile2(buildSrc, tmp);
|
|
8353
|
+
const m = await import(pathToFileURL8(tmp).href);
|
|
8354
|
+
return m.meta || {};
|
|
8355
|
+
} finally {
|
|
8356
|
+
await unlink2(tmp).catch(() => {});
|
|
8357
|
+
}
|
|
8358
|
+
}
|
|
7918
8359
|
function serializeConfig(config2) {
|
|
7919
8360
|
function serializeValue(value, indent = 0) {
|
|
7920
8361
|
const spaces = " ".repeat(indent);
|
|
@@ -7964,9 +8405,9 @@ async function buildSingleContentChunk(cwd, collection, fileRef, contentDir, arg
|
|
|
7964
8405
|
const locale = fileRef.locale || defaultLocale;
|
|
7965
8406
|
const baseName = file.split("/").pop() || file;
|
|
7966
8407
|
const name = baseName.replace(/\.(tsx|ts|md|mdx)$/, "");
|
|
7967
|
-
const absSrc =
|
|
8408
|
+
const absSrc = join11(contentDir, file);
|
|
7968
8409
|
const isMarkdown = /\.(md|mdx)$/.test(file);
|
|
7969
|
-
const buildSrc = isMarkdown ?
|
|
8410
|
+
const buildSrc = isMarkdown ? join11(cwd, ".reroute", "markdown", collection, "content", file.replace(/\.(md|mdx)$/, ".tsx")) : absSrc;
|
|
7970
8411
|
if (isMarkdown) {
|
|
7971
8412
|
try {
|
|
7972
8413
|
const exists = await Bun.file(buildSrc).exists();
|
|
@@ -8012,11 +8453,11 @@ async function buildSingleContentChunk(cwd, collection, fileRef, contentDir, arg
|
|
|
8012
8453
|
return null;
|
|
8013
8454
|
}
|
|
8014
8455
|
const hash2 = await sha8(code);
|
|
8015
|
-
const chunkRelDir =
|
|
8016
|
-
const chunkAbsDir =
|
|
8456
|
+
const chunkRelDir = join11(".reroute", "bundles");
|
|
8457
|
+
const chunkAbsDir = join11(cwd, chunkRelDir);
|
|
8017
8458
|
const localeSuffix = locale !== defaultLocale ? `${locale}-` : "";
|
|
8018
8459
|
const outFile = `${collection}-${localeSuffix}${name}.${hash2}.js`;
|
|
8019
|
-
const absOut =
|
|
8460
|
+
const absOut = join11(chunkAbsDir, outFile);
|
|
8020
8461
|
if (sourcemapContent) {
|
|
8021
8462
|
code = code.replace(/\/\/# sourceMappingURL=.*\.js\.map/, `//# sourceMappingURL=${outFile}.map`);
|
|
8022
8463
|
}
|
|
@@ -8031,9 +8472,7 @@ async function buildSingleContentChunk(cwd, collection, fileRef, contentDir, arg
|
|
|
8031
8472
|
} catch {}
|
|
8032
8473
|
let meta = {};
|
|
8033
8474
|
try {
|
|
8034
|
-
|
|
8035
|
-
const m = await import(url);
|
|
8036
|
-
meta = m.meta || {};
|
|
8475
|
+
meta = await loadContentMeta(absSrc, buildSrc, isMarkdown);
|
|
8037
8476
|
} catch {}
|
|
8038
8477
|
const isProd = isProductionMode(args);
|
|
8039
8478
|
if (isProd && meta.draft === true) {
|
|
@@ -8051,7 +8490,7 @@ async function buildSingleContentChunk(cwd, collection, fileRef, contentDir, arg
|
|
|
8051
8490
|
};
|
|
8052
8491
|
}
|
|
8053
8492
|
async function buildContentChunks(cwd, args = [], defaultLocale = "en-US") {
|
|
8054
|
-
const routesRoot =
|
|
8493
|
+
const routesRoot = join11(cwd, ROUTES_DIR);
|
|
8055
8494
|
console.log(`[reroute/content] scan ${routesRoot}`);
|
|
8056
8495
|
const collections2 = await readdir7(routesRoot, { withFileTypes: true });
|
|
8057
8496
|
const results = [];
|
|
@@ -8059,7 +8498,7 @@ async function buildContentChunks(cwd, args = [], defaultLocale = "en-US") {
|
|
|
8059
8498
|
if (!c.isDirectory())
|
|
8060
8499
|
continue;
|
|
8061
8500
|
const collection = c.name;
|
|
8062
|
-
const contentDir =
|
|
8501
|
+
const contentDir = join11(routesRoot, collection, "content");
|
|
8063
8502
|
console.log(`[reroute/content] collection ${collection} dir ${contentDir}`);
|
|
8064
8503
|
const files = await listContentFiles2(contentDir);
|
|
8065
8504
|
console.log(`[reroute/content] files ${files.length}`);
|
|
@@ -8111,7 +8550,7 @@ async function buildContentChunks(cwd, args = [], defaultLocale = "en-US") {
|
|
|
8111
8550
|
lines.push("");
|
|
8112
8551
|
const writes = [];
|
|
8113
8552
|
writes.push({
|
|
8114
|
-
path:
|
|
8553
|
+
path: join11(cwd, OUTPUT_CONTENT_TS),
|
|
8115
8554
|
content: lines.join(`
|
|
8116
8555
|
`)
|
|
8117
8556
|
});
|
|
@@ -8145,7 +8584,7 @@ async function buildContentChunks(cwd, args = [], defaultLocale = "en-US") {
|
|
|
8145
8584
|
js.push("}");
|
|
8146
8585
|
js.push("");
|
|
8147
8586
|
writes.push({
|
|
8148
|
-
path:
|
|
8587
|
+
path: join11(cwd, OUTPUT_COLLECTIONS_DIR, `${collection}.js`),
|
|
8149
8588
|
content: js.join(`
|
|
8150
8589
|
`)
|
|
8151
8590
|
});
|
|
@@ -8169,7 +8608,7 @@ async function buildSearchIndex(cwd, config2, args = []) {
|
|
|
8169
8608
|
minHeadingLevel = 1,
|
|
8170
8609
|
maxHeadingLevel = 6
|
|
8171
8610
|
} = searchConfig;
|
|
8172
|
-
const routesRoot =
|
|
8611
|
+
const routesRoot = join11(cwd, ROUTES_DIR);
|
|
8173
8612
|
const collections2 = await readdir7(routesRoot, { withFileTypes: true });
|
|
8174
8613
|
const i18n2 = await discoverI18n(cwd, config2.i18n);
|
|
8175
8614
|
const defaultLocale = i18n2.defaultLocale;
|
|
@@ -8181,7 +8620,7 @@ async function buildSearchIndex(cwd, config2, args = []) {
|
|
|
8181
8620
|
if (targetCollections.length > 0 && !targetCollections.includes(collection)) {
|
|
8182
8621
|
continue;
|
|
8183
8622
|
}
|
|
8184
|
-
const contentDir =
|
|
8623
|
+
const contentDir = join11(routesRoot, collection, "content");
|
|
8185
8624
|
try {
|
|
8186
8625
|
const files = await listContentFiles2(contentDir);
|
|
8187
8626
|
for (const fileRef of files) {
|
|
@@ -8191,7 +8630,7 @@ async function buildSearchIndex(cwd, config2, args = []) {
|
|
|
8191
8630
|
const baseName = file.split("/").pop() || file;
|
|
8192
8631
|
const name = baseName.replace(/\.(md|mdx)$/, "");
|
|
8193
8632
|
const locale = fileRef.locale || defaultLocale;
|
|
8194
|
-
const filePath =
|
|
8633
|
+
const filePath = join11(contentDir, file);
|
|
8195
8634
|
try {
|
|
8196
8635
|
const processed = processMarkdownFile(filePath);
|
|
8197
8636
|
const { frontmatter, content: content2 } = processed;
|
|
@@ -8239,13 +8678,13 @@ async function buildSearchIndex(cwd, config2, args = []) {
|
|
|
8239
8678
|
generated: new Date().toISOString(),
|
|
8240
8679
|
entries: searchIndex
|
|
8241
8680
|
};
|
|
8242
|
-
await Bun.write(
|
|
8243
|
-
console.log(`[reroute/search] Generated search index with ${searchIndex.length} entries: ${
|
|
8681
|
+
await Bun.write(join11(cwd, OUTPUT_SEARCH_INDEX), JSON.stringify(indexData, null, 2));
|
|
8682
|
+
console.log(`[reroute/search] Generated search index with ${searchIndex.length} entries: ${join11(cwd, OUTPUT_SEARCH_INDEX)}`);
|
|
8244
8683
|
}
|
|
8245
8684
|
async function preprocessMarkdownFiles(cwd, config2) {
|
|
8246
8685
|
console.log("[reroute/markdown] Starting markdown preprocessing...");
|
|
8247
|
-
const routesPath =
|
|
8248
|
-
const markdownDir =
|
|
8686
|
+
const routesPath = join11(cwd, ROUTES_DIR);
|
|
8687
|
+
const markdownDir = join11(cwd, ".reroute", "markdown");
|
|
8249
8688
|
try {
|
|
8250
8689
|
await rm(markdownDir, { force: true, recursive: true });
|
|
8251
8690
|
} catch {}
|
|
@@ -8255,8 +8694,8 @@ async function preprocessMarkdownFiles(cwd, config2) {
|
|
|
8255
8694
|
try {
|
|
8256
8695
|
const entries = await readdir7(dir, { withFileTypes: true });
|
|
8257
8696
|
for (const entry of entries) {
|
|
8258
|
-
const fullPath =
|
|
8259
|
-
const relativePath =
|
|
8697
|
+
const fullPath = join11(dir, entry.name);
|
|
8698
|
+
const relativePath = join11(base, entry.name);
|
|
8260
8699
|
if (entry.isDirectory()) {
|
|
8261
8700
|
const nested = await scanMarkdown(fullPath, relativePath);
|
|
8262
8701
|
files.push(...nested);
|
|
@@ -8278,8 +8717,8 @@ async function preprocessMarkdownFiles(cwd, config2) {
|
|
|
8278
8717
|
}
|
|
8279
8718
|
console.log(`[reroute/markdown] Found ${markdownFiles.length} markdown file(s)`);
|
|
8280
8719
|
for (const file of markdownFiles) {
|
|
8281
|
-
const sourcePath =
|
|
8282
|
-
const targetPath =
|
|
8720
|
+
const sourcePath = join11(routesPath, file);
|
|
8721
|
+
const targetPath = join11(markdownDir, file.replace(/\.mdx?$/, ".tsx"));
|
|
8283
8722
|
try {
|
|
8284
8723
|
const processed = processMarkdownFile(sourcePath);
|
|
8285
8724
|
const isMdx = file.endsWith(".mdx");
|
|
@@ -8305,8 +8744,8 @@ async function preprocessMarkdownFiles(cwd, config2) {
|
|
|
8305
8744
|
}
|
|
8306
8745
|
async function buildEntrypointBundle(cwd, args = []) {
|
|
8307
8746
|
const buildStartTime = performance.now();
|
|
8308
|
-
const clientDir =
|
|
8309
|
-
const entrypoint =
|
|
8747
|
+
const clientDir = join11(cwd, "src", "client");
|
|
8748
|
+
const entrypoint = join11(clientDir, "index.tsx");
|
|
8310
8749
|
const exists = await Bun.file(entrypoint).exists();
|
|
8311
8750
|
if (!exists) {
|
|
8312
8751
|
console.log("[reroute/gen] No index.tsx found, skipping bundle build");
|
|
@@ -8314,7 +8753,7 @@ async function buildEntrypointBundle(cwd, args = []) {
|
|
|
8314
8753
|
}
|
|
8315
8754
|
console.log("[reroute/gen] Building entrypoint bundle...");
|
|
8316
8755
|
const isProd = args.includes("--prod");
|
|
8317
|
-
const bundlesDir =
|
|
8756
|
+
const bundlesDir = join11(cwd, ".reroute", "bundles");
|
|
8318
8757
|
await mkdir3(bundlesDir, { recursive: true });
|
|
8319
8758
|
const mode = isProd ? "production" : "development";
|
|
8320
8759
|
const publicEnv = getPublicEnvVars(cwd, mode);
|
|
@@ -8416,7 +8855,7 @@ async function buildEntrypointBundle(cwd, args = []) {
|
|
|
8416
8855
|
const existingFiles = await readdir7(bundlesDir);
|
|
8417
8856
|
for (const file of existingFiles) {
|
|
8418
8857
|
if (/^(index|chunk|asset)\.[a-z0-9]+\.(js|css|js\.map|css\.map)(\.gz|\.br)?$/i.test(file) && !newFiles.has(file.replace(/\.(gz|br)$/, ""))) {
|
|
8419
|
-
await rm(
|
|
8858
|
+
await rm(join11(bundlesDir, file), { force: true });
|
|
8420
8859
|
}
|
|
8421
8860
|
}
|
|
8422
8861
|
} catch (_error) {}
|
|
@@ -8432,7 +8871,7 @@ async function buildEntrypointBundle(cwd, args = []) {
|
|
|
8432
8871
|
}
|
|
8433
8872
|
}
|
|
8434
8873
|
await Promise.all(outputs.map(async (output) => {
|
|
8435
|
-
const destPath =
|
|
8874
|
+
const destPath = join11(bundlesDir, output.fileName);
|
|
8436
8875
|
await Bun.write(destPath, output.content);
|
|
8437
8876
|
if (shouldPreCompress) {
|
|
8438
8877
|
const shouldCompress = /\.(js|css)$/i.test(output.fileName) && !output.fileName.endsWith(".map");
|
|
@@ -8501,7 +8940,7 @@ async function generate(cwd, args = [], options = {}) {
|
|
|
8501
8940
|
await writeStubFiles(cwd);
|
|
8502
8941
|
}
|
|
8503
8942
|
await perfTrack("Markdown preprocessing", () => preprocessMarkdownFiles(cwd, config2));
|
|
8504
|
-
const routesPath =
|
|
8943
|
+
const routesPath = join11(cwd, ROUTES_DIR);
|
|
8505
8944
|
try {
|
|
8506
8945
|
await perfTrack("Routes generation", async () => {
|
|
8507
8946
|
const files = await scanDirectory(routesPath);
|
|
@@ -8510,10 +8949,10 @@ async function generate(cwd, args = [], options = {}) {
|
|
|
8510
8949
|
const tree = generateRouteTree(all.map((f) => f.replace(/\\/g, "/")));
|
|
8511
8950
|
const streamingAnalyses = streamingEnabled ? await buildStreamingWrappersForTree(cwd, routesPath, tree, config2) : new Map;
|
|
8512
8951
|
const ts = generateTypeScript(tree, streamingAnalyses);
|
|
8513
|
-
await Bun.write(
|
|
8952
|
+
await Bun.write(join11(cwd, OUTPUT_ROUTES), ts);
|
|
8514
8953
|
});
|
|
8515
8954
|
if (!showPerformance) {
|
|
8516
|
-
console.log(`[reroute/gen] Generated routes: ${
|
|
8955
|
+
console.log(`[reroute/gen] Generated routes: ${join11(cwd, OUTPUT_ROUTES)}`);
|
|
8517
8956
|
}
|
|
8518
8957
|
} catch (error) {
|
|
8519
8958
|
console.error("[reroute/gen] Failed to generate routes:", error);
|
|
@@ -8522,7 +8961,7 @@ async function generate(cwd, args = [], options = {}) {
|
|
|
8522
8961
|
const i18n2 = await discoverI18n(cwd, config2.i18n);
|
|
8523
8962
|
const defaultLocale = i18n2.defaultLocale;
|
|
8524
8963
|
try {
|
|
8525
|
-
await Bun.write(
|
|
8964
|
+
await Bun.write(join11(cwd, ".reroute", "i18n.json"), JSON.stringify({
|
|
8526
8965
|
enabled: i18n2.enabled,
|
|
8527
8966
|
defaultLocale: i18n2.defaultLocale,
|
|
8528
8967
|
locales: i18n2.locales,
|
|
@@ -8539,7 +8978,7 @@ async function generate(cwd, args = [], options = {}) {
|
|
|
8539
8978
|
try {
|
|
8540
8979
|
await perfTrack("Content building", () => buildContentChunks(cwd, args, defaultLocale));
|
|
8541
8980
|
if (!showPerformance) {
|
|
8542
|
-
console.log(`[reroute/gen] Generated content: ${
|
|
8981
|
+
console.log(`[reroute/gen] Generated content: ${join11(cwd, OUTPUT_CONTENT_TS)} + collections/*.js`);
|
|
8543
8982
|
}
|
|
8544
8983
|
} catch (error) {
|
|
8545
8984
|
console.error("[reroute/gen] Failed to generate content:", error);
|
|
@@ -8547,17 +8986,17 @@ async function generate(cwd, args = [], options = {}) {
|
|
|
8547
8986
|
}
|
|
8548
8987
|
try {
|
|
8549
8988
|
await perfTrack("Manifest generation", async () => {
|
|
8550
|
-
const routesPath2 =
|
|
8989
|
+
const routesPath2 = join11(cwd, OUTPUT_ROUTES);
|
|
8551
8990
|
const routesModule = await import(`file://${routesPath2}?t=${Date.now()}`);
|
|
8552
8991
|
const routes = routesModule.routes || [];
|
|
8553
8992
|
const staticRoutes = routes.filter((r) => !r.params || r.params.length === 0).map((r) => r.pattern);
|
|
8554
8993
|
const contentRoutes = [];
|
|
8555
|
-
const collectionsDir =
|
|
8994
|
+
const collectionsDir = join11(cwd, ".reroute", "collections");
|
|
8556
8995
|
try {
|
|
8557
8996
|
const collectionFiles = await readdir7(collectionsDir);
|
|
8558
8997
|
for (const file of collectionFiles) {
|
|
8559
8998
|
if (file.endsWith(".js")) {
|
|
8560
|
-
const collectionPath =
|
|
8999
|
+
const collectionPath = join11(collectionsDir, file);
|
|
8561
9000
|
const collectionModule = await import(`file://${collectionPath}?t=${Date.now()}`);
|
|
8562
9001
|
const items = collectionModule.items || [];
|
|
8563
9002
|
for (const item of items) {
|
|
@@ -8582,7 +9021,7 @@ async function generate(cwd, args = [], options = {}) {
|
|
|
8582
9021
|
dynamicRoutes,
|
|
8583
9022
|
version: 1
|
|
8584
9023
|
};
|
|
8585
|
-
await Bun.write(
|
|
9024
|
+
await Bun.write(join11(cwd, ".reroute", "manifest.json"), JSON.stringify(manifest, null, 2));
|
|
8586
9025
|
});
|
|
8587
9026
|
} catch (error) {
|
|
8588
9027
|
console.error("[reroute/gen] Failed to generate manifest:", error);
|
|
@@ -8603,7 +9042,7 @@ async function generate(cwd, args = [], options = {}) {
|
|
|
8603
9042
|
mdComponentsLines.push("");
|
|
8604
9043
|
mdComponentsLines.push(`import markdownComponents from '${componentsPath}';`);
|
|
8605
9044
|
mdComponentsLines.push("export { markdownComponents };");
|
|
8606
|
-
await Bun.write(
|
|
9045
|
+
await Bun.write(join11(cwd, ".reroute/markdown-components.ts"), mdComponentsLines.join(`
|
|
8607
9046
|
`));
|
|
8608
9047
|
}
|
|
8609
9048
|
const indexLines = [];
|
|
@@ -8623,7 +9062,7 @@ async function generate(cwd, args = [], options = {}) {
|
|
|
8623
9062
|
const ogTemplatePath = config2.ogImage.defaultTemplate.startsWith(".") ? `../${config2.ogImage.defaultTemplate}` : config2.ogImage.defaultTemplate;
|
|
8624
9063
|
indexLines.push(`import OGTemplate from '${ogTemplatePath}';`);
|
|
8625
9064
|
}
|
|
8626
|
-
const ogFiles = await scanOgFiles(
|
|
9065
|
+
const ogFiles = await scanOgFiles(join11(cwd, ROUTES_DIR));
|
|
8627
9066
|
const ogImports = [];
|
|
8628
9067
|
for (let i = 0;i < ogFiles.length; i++) {
|
|
8629
9068
|
const ogFile = ogFiles[i];
|
|
@@ -8669,7 +9108,7 @@ async function generate(cwd, args = [], options = {}) {
|
|
|
8669
9108
|
}
|
|
8670
9109
|
indexLines.push("};");
|
|
8671
9110
|
}
|
|
8672
|
-
const templatePath =
|
|
9111
|
+
const templatePath = join11(cwd, "src", "client", "index.html");
|
|
8673
9112
|
try {
|
|
8674
9113
|
const templateContent = await Bun.file(templatePath).text();
|
|
8675
9114
|
indexLines.push("");
|
|
@@ -8681,7 +9120,7 @@ async function generate(cwd, args = [], options = {}) {
|
|
|
8681
9120
|
indexLines.push(`(globalThis as any).__REROUTE_CONFIG__ = ${serializeConfig(config2)};`);
|
|
8682
9121
|
indexLines.push("");
|
|
8683
9122
|
indexLines.push("export type RerouteBundle = typeof bundle;");
|
|
8684
|
-
await Bun.write(
|
|
9123
|
+
await Bun.write(join11(cwd, OUTPUT_ARTIFACTS), indexLines.join(`
|
|
8685
9124
|
`));
|
|
8686
9125
|
const barrelLines = [
|
|
8687
9126
|
"// \uD83D\uDEA8 Auto-generated by Reroute - DO NOT EDIT \uD83D\uDEA8",
|
|
@@ -8691,7 +9130,7 @@ async function generate(cwd, args = [], options = {}) {
|
|
|
8691
9130
|
"",
|
|
8692
9131
|
"export * from './artifacts';"
|
|
8693
9132
|
];
|
|
8694
|
-
await Bun.write(
|
|
9133
|
+
await Bun.write(join11(cwd, OUTPUT_INDEX), barrelLines.join(`
|
|
8695
9134
|
`));
|
|
8696
9135
|
const entryLines = [
|
|
8697
9136
|
"// \uD83D\uDEA8 Auto-generated by Reroute - DO NOT EDIT \uD83D\uDEA8",
|
|
@@ -8707,10 +9146,10 @@ async function generate(cwd, args = [], options = {}) {
|
|
|
8707
9146
|
"import './routes'; // Import routes (bundles all route components)",
|
|
8708
9147
|
"import '../src/index'; // Import user's server entry"
|
|
8709
9148
|
];
|
|
8710
|
-
await Bun.write(
|
|
9149
|
+
await Bun.write(join11(cwd, ".reroute/entry.ts"), entryLines.join(`
|
|
8711
9150
|
`));
|
|
8712
9151
|
if (!showPerformance) {
|
|
8713
|
-
console.log(`[reroute/gen] Generated artifacts: ${
|
|
9152
|
+
console.log(`[reroute/gen] Generated artifacts: ${join11(cwd, OUTPUT_ARTIFACTS)}`);
|
|
8714
9153
|
}
|
|
8715
9154
|
await perfTrack("Bundle building", () => buildEntrypointBundle(cwd, args));
|
|
8716
9155
|
const endTime = performance.now();
|
|
@@ -8721,22 +9160,8 @@ async function generate(cwd, args = [], options = {}) {
|
|
|
8721
9160
|
console.log(`[reroute/gen] Generation complete in ${duration}s`);
|
|
8722
9161
|
}
|
|
8723
9162
|
}
|
|
8724
|
-
async function
|
|
9163
|
+
async function startGenWatch(cwd, args) {
|
|
8725
9164
|
const genStartTime = performance.now();
|
|
8726
|
-
const cwd = process.cwd();
|
|
8727
|
-
const watchMode = args.includes("--watch") || args.includes("-w");
|
|
8728
|
-
if (!watchMode) {
|
|
8729
|
-
await generate(cwd, args);
|
|
8730
|
-
await syncThemeCss(cwd);
|
|
8731
|
-
await bundleThemeCssIntoArtifacts(cwd);
|
|
8732
|
-
checkMarkdownIfConfigured(cwd);
|
|
8733
|
-
const genEndTime2 = performance.now();
|
|
8734
|
-
const totalDuration2 = ((genEndTime2 - genStartTime) / 1000).toFixed(2);
|
|
8735
|
-
console.log(`
|
|
8736
|
-
[reroute/gen] ✓ Build complete in ${totalDuration2}s
|
|
8737
|
-
`);
|
|
8738
|
-
process.exit(0);
|
|
8739
|
-
}
|
|
8740
9165
|
console.log("[reroute/gen] Watch mode enabled");
|
|
8741
9166
|
console.log("[reroute/gen] Initial generation...");
|
|
8742
9167
|
await generate(cwd, args);
|
|
@@ -8759,14 +9184,16 @@ async function gen(args) {
|
|
|
8759
9184
|
console.log(`[reroute/gen] rebuilding notified (port ${port}, ${data.clients} browser(s))`);
|
|
8760
9185
|
} catch (_err) {}
|
|
8761
9186
|
};
|
|
8762
|
-
const notifyReload = async (reason) => {
|
|
9187
|
+
const notifyReload = async (reason, mode = "full") => {
|
|
8763
9188
|
const port = getPort();
|
|
8764
9189
|
try {
|
|
8765
9190
|
const response = await fetch(`http://localhost:${port}/__reroute_reload`, {
|
|
8766
|
-
method: "POST"
|
|
9191
|
+
method: "POST",
|
|
9192
|
+
headers: { "content-type": "application/json" },
|
|
9193
|
+
body: JSON.stringify({ mode })
|
|
8767
9194
|
});
|
|
8768
9195
|
const data = await response.json();
|
|
8769
|
-
console.log(`[reroute/gen] reload notified (port ${port}, ${data.clients} browser(s))${reason ? `: ${reason}` : ""}`);
|
|
9196
|
+
console.log(`[reroute/gen] reload notified (port ${port}, ${data.clients} browser(s), ${mode})${reason ? `: ${reason}` : ""}`);
|
|
8770
9197
|
} catch {}
|
|
8771
9198
|
};
|
|
8772
9199
|
await notifyReload("initial generation");
|
|
@@ -8775,30 +9202,35 @@ async function gen(args) {
|
|
|
8775
9202
|
let isBuilding = false;
|
|
8776
9203
|
let pendingBuild = null;
|
|
8777
9204
|
let skipCurrentBuild = false;
|
|
8778
|
-
function scheduleBuild(buildFn, reason) {
|
|
9205
|
+
function scheduleBuild(buildFn, reason, reloadMode = "full") {
|
|
8779
9206
|
if (isBuilding) {
|
|
8780
9207
|
if (!skipCurrentBuild) {
|
|
8781
9208
|
skipCurrentBuild = true;
|
|
8782
9209
|
console.log(`[reroute/watch] ⏭️ Superseding current build with: ${reason}`);
|
|
8783
9210
|
}
|
|
8784
|
-
pendingBuild = { fn: buildFn, reason };
|
|
9211
|
+
pendingBuild = { fn: buildFn, reason, reloadMode };
|
|
8785
9212
|
return;
|
|
8786
9213
|
}
|
|
8787
9214
|
if (pendingBuild) {
|
|
8788
9215
|
console.log(`[reroute/watch] ⏭️ Replacing queued build with: ${reason}`);
|
|
9216
|
+
const mergedMode = pendingBuild.reloadMode === "css" && reloadMode === "css" ? "css" : "full";
|
|
9217
|
+
pendingBuild = { fn: buildFn, reason, reloadMode: mergedMode };
|
|
9218
|
+
} else {
|
|
9219
|
+
pendingBuild = { fn: buildFn, reason, reloadMode };
|
|
8789
9220
|
}
|
|
8790
|
-
pendingBuild = { fn: buildFn, reason };
|
|
8791
9221
|
processPendingBuild();
|
|
8792
9222
|
}
|
|
8793
9223
|
async function processPendingBuild() {
|
|
8794
9224
|
if (!pendingBuild || isBuilding)
|
|
8795
9225
|
return;
|
|
8796
|
-
const { fn: buildFn, reason } = pendingBuild;
|
|
9226
|
+
const { fn: buildFn, reason, reloadMode } = pendingBuild;
|
|
8797
9227
|
pendingBuild = null;
|
|
8798
9228
|
skipCurrentBuild = false;
|
|
8799
9229
|
isBuilding = true;
|
|
8800
9230
|
const startTime = performance.now();
|
|
8801
|
-
|
|
9231
|
+
if (reloadMode !== "css") {
|
|
9232
|
+
await notifyRebuilding();
|
|
9233
|
+
}
|
|
8802
9234
|
try {
|
|
8803
9235
|
await buildFn();
|
|
8804
9236
|
if (skipCurrentBuild) {
|
|
@@ -8807,12 +9239,14 @@ async function gen(args) {
|
|
|
8807
9239
|
}
|
|
8808
9240
|
const duration = ((performance.now() - startTime) / 1000).toFixed(2);
|
|
8809
9241
|
console.log(`[reroute/watch] ✓ Rebuild complete in ${duration}s (${reason})`);
|
|
8810
|
-
|
|
9242
|
+
if (reloadMode !== "css") {
|
|
9243
|
+
await Bun.sleep(200);
|
|
9244
|
+
}
|
|
8811
9245
|
if (skipCurrentBuild || pendingBuild) {
|
|
8812
9246
|
console.log(`[reroute/watch] ⏭️ Skipping reload, new build pending`);
|
|
8813
9247
|
return;
|
|
8814
9248
|
}
|
|
8815
|
-
await notifyReload(reason);
|
|
9249
|
+
await notifyReload(reason, reloadMode);
|
|
8816
9250
|
} catch (err) {
|
|
8817
9251
|
if (!skipCurrentBuild) {
|
|
8818
9252
|
console.error(`[reroute/watch] ✗ Build failed (${reason}):`, err);
|
|
@@ -8836,7 +9270,7 @@ async function gen(args) {
|
|
|
8836
9270
|
const mediumDebounce = createDebouncer(150);
|
|
8837
9271
|
const slowDebounce = createDebouncer(300);
|
|
8838
9272
|
const loadedConfig = await loadConfig(cwd);
|
|
8839
|
-
const configPath =
|
|
9273
|
+
const configPath = join11(cwd, "reroute.config.ts");
|
|
8840
9274
|
let configWatcher = null;
|
|
8841
9275
|
try {
|
|
8842
9276
|
configWatcher = watch(configPath, () => {
|
|
@@ -8858,7 +9292,7 @@ async function gen(args) {
|
|
|
8858
9292
|
];
|
|
8859
9293
|
const envWatchers = [];
|
|
8860
9294
|
for (const envFile of envFiles) {
|
|
8861
|
-
const envPath =
|
|
9295
|
+
const envPath = join11(cwd, envFile);
|
|
8862
9296
|
try {
|
|
8863
9297
|
const envWatcher = watch(envPath, () => {
|
|
8864
9298
|
mediumDebounce(() => {
|
|
@@ -8877,21 +9311,23 @@ async function gen(args) {
|
|
|
8877
9311
|
let packagesWatcher = null;
|
|
8878
9312
|
const isRerouteWorkspace = async () => {
|
|
8879
9313
|
try {
|
|
8880
|
-
const packagesPath =
|
|
8881
|
-
const exists = await Bun.file(
|
|
9314
|
+
const packagesPath = join11(cwd, "..", "..", "packages");
|
|
9315
|
+
const exists = await Bun.file(join11(packagesPath, "core", "index.ts")).exists();
|
|
8882
9316
|
return exists;
|
|
8883
9317
|
} catch {
|
|
8884
9318
|
return false;
|
|
8885
9319
|
}
|
|
8886
9320
|
};
|
|
8887
9321
|
if (await isRerouteWorkspace()) {
|
|
8888
|
-
const packagesPath =
|
|
9322
|
+
const packagesPath = join11(cwd, "..", "..", "packages");
|
|
8889
9323
|
console.log("[reroute/watch] \uD83D\uDD27 Workspace development mode enabled");
|
|
8890
9324
|
console.log(`[reroute/watch] \uD83D\uDD27 Watching ${packagesPath}...`);
|
|
8891
9325
|
packagesWatcher = watch(packagesPath, { recursive: true }, (_ev, filename) => {
|
|
8892
9326
|
if (!filename)
|
|
8893
9327
|
return;
|
|
8894
9328
|
const name = String(filename);
|
|
9329
|
+
if (isWatchNoise(name))
|
|
9330
|
+
return;
|
|
8895
9331
|
if (name.includes("dist/") || name.includes("node_modules/"))
|
|
8896
9332
|
return;
|
|
8897
9333
|
if (!/\.(tsx|ts|jsx|js)$/.test(name))
|
|
@@ -8908,12 +9344,14 @@ async function gen(args) {
|
|
|
8908
9344
|
});
|
|
8909
9345
|
});
|
|
8910
9346
|
}
|
|
8911
|
-
const routesPath =
|
|
9347
|
+
const routesPath = join11(cwd, ROUTES_DIR);
|
|
8912
9348
|
console.log(`[reroute/watch] \uD83D\uDCC1 Watching ${routesPath}...`);
|
|
8913
9349
|
const routesWatcher = watch(routesPath, { recursive: true }, (_ev, filename) => {
|
|
8914
9350
|
if (!filename)
|
|
8915
9351
|
return;
|
|
8916
9352
|
const name = String(filename);
|
|
9353
|
+
if (isWatchNoise(name))
|
|
9354
|
+
return;
|
|
8917
9355
|
quickDebounce(() => {
|
|
8918
9356
|
scheduleBuild(async () => {
|
|
8919
9357
|
const isContentFile = name.includes("/content/") || name.includes("\\content\\");
|
|
@@ -8931,7 +9369,7 @@ async function gen(args) {
|
|
|
8931
9369
|
console.log("[reroute/watch] ├─ Building content chunks...");
|
|
8932
9370
|
const contentStart = performance.now();
|
|
8933
9371
|
const watchI18n = await discoverI18n(cwd, loadedConfig.i18n);
|
|
8934
|
-
await Bun.write(
|
|
9372
|
+
await Bun.write(join11(cwd, ".reroute", "i18n.json"), JSON.stringify({
|
|
8935
9373
|
enabled: watchI18n.enabled,
|
|
8936
9374
|
defaultLocale: watchI18n.defaultLocale,
|
|
8937
9375
|
locales: watchI18n.locales,
|
|
@@ -8968,22 +9406,30 @@ async function gen(args) {
|
|
|
8968
9406
|
}, "routes change");
|
|
8969
9407
|
});
|
|
8970
9408
|
});
|
|
8971
|
-
const clientPath =
|
|
9409
|
+
const clientPath = join11(cwd, "src", "client");
|
|
8972
9410
|
console.log(`[reroute/watch] \uD83D\uDCE6 Watching ${clientPath}...`);
|
|
9411
|
+
let pendingClientFiles = new Set;
|
|
8973
9412
|
const clientWatcher = watch(clientPath, { recursive: true }, (_ev, filename) => {
|
|
8974
9413
|
if (!filename)
|
|
8975
9414
|
return;
|
|
8976
9415
|
const name = String(filename);
|
|
9416
|
+
if (isWatchNoise(name))
|
|
9417
|
+
return;
|
|
8977
9418
|
if (name.includes(".reroute") || name.includes("node_modules"))
|
|
8978
9419
|
return;
|
|
8979
9420
|
if (name.includes("routes/") || name.includes("routes\\"))
|
|
8980
9421
|
return;
|
|
8981
9422
|
if (!/\.(tsx|ts|jsx|js|html|md|mdx|css)$/.test(name))
|
|
8982
9423
|
return;
|
|
9424
|
+
pendingClientFiles.add(name);
|
|
8983
9425
|
mediumDebounce(() => {
|
|
9426
|
+
const names = [...pendingClientFiles];
|
|
9427
|
+
pendingClientFiles = new Set;
|
|
9428
|
+
const reloadMode = names.every((n) => n.endsWith(".css")) ? "css" : "full";
|
|
9429
|
+
const label = names.length === 1 ? names[0] : `${names.length} files`;
|
|
8984
9430
|
scheduleBuild(async () => {
|
|
8985
|
-
console.log(`[reroute/watch] \uD83D\uDCE6 Client changed: ${
|
|
8986
|
-
if (
|
|
9431
|
+
console.log(`[reroute/watch] \uD83D\uDCE6 Client changed: ${label}`);
|
|
9432
|
+
if (names.some((n) => shouldRebuildClientBundle(n))) {
|
|
8987
9433
|
console.log("[reroute/watch] ├─ Rebuilding bundle...");
|
|
8988
9434
|
const bundleStart = performance.now();
|
|
8989
9435
|
try {
|
|
@@ -8999,7 +9445,7 @@ async function gen(args) {
|
|
|
8999
9445
|
if (themeSynced) {
|
|
9000
9446
|
console.log("[reroute/watch] ├─ index.css synced");
|
|
9001
9447
|
}
|
|
9002
|
-
}, "client change");
|
|
9448
|
+
}, "client change", reloadMode);
|
|
9003
9449
|
});
|
|
9004
9450
|
});
|
|
9005
9451
|
console.log(`[reroute/watch] ✓ Watch mode active - ready for changes!
|
|
@@ -9011,16 +9457,42 @@ async function gen(args) {
|
|
|
9011
9457
|
configWatcher,
|
|
9012
9458
|
...envWatchers
|
|
9013
9459
|
].filter(Boolean);
|
|
9014
|
-
|
|
9015
|
-
|
|
9460
|
+
return {
|
|
9461
|
+
close() {
|
|
9462
|
+
console.log(`
|
|
9016
9463
|
[reroute/watch] \uD83D\uDED1 Stopping watch mode...`);
|
|
9017
|
-
|
|
9018
|
-
|
|
9019
|
-
|
|
9020
|
-
|
|
9464
|
+
for (const watcher of watchers) {
|
|
9465
|
+
try {
|
|
9466
|
+
watcher?.close();
|
|
9467
|
+
} catch {}
|
|
9468
|
+
}
|
|
9021
9469
|
}
|
|
9470
|
+
};
|
|
9471
|
+
}
|
|
9472
|
+
async function gen(args) {
|
|
9473
|
+
const cwd = process.cwd();
|
|
9474
|
+
const watchMode = args.includes("--watch") || args.includes("-w");
|
|
9475
|
+
if (!watchMode) {
|
|
9476
|
+
const genStartTime = performance.now();
|
|
9477
|
+
await generate(cwd, args);
|
|
9478
|
+
await syncThemeCss(cwd);
|
|
9479
|
+
await bundleThemeCssIntoArtifacts(cwd);
|
|
9480
|
+
checkMarkdownIfConfigured(cwd);
|
|
9481
|
+
const genEndTime = performance.now();
|
|
9482
|
+
const totalDuration = ((genEndTime - genStartTime) / 1000).toFixed(2);
|
|
9483
|
+
console.log(`
|
|
9484
|
+
[reroute/gen] ✓ Build complete in ${totalDuration}s
|
|
9485
|
+
`);
|
|
9022
9486
|
process.exit(0);
|
|
9487
|
+
}
|
|
9488
|
+
const session = await startGenWatch(cwd, args);
|
|
9489
|
+
await new Promise((resolve3) => {
|
|
9490
|
+
process.on("SIGINT", () => {
|
|
9491
|
+
session.close();
|
|
9492
|
+
resolve3();
|
|
9493
|
+
});
|
|
9023
9494
|
});
|
|
9495
|
+
process.exit(0);
|
|
9024
9496
|
}
|
|
9025
9497
|
var ROUTES_DIR = "src/client/routes", OUTPUT_DIR = ".reroute", OUTPUT_ROUTES = ".reroute/routes.ts", OUTPUT_CONTENT_TS = ".reroute/content.ts", OUTPUT_COLLECTIONS_DIR = ".reroute/collections", OUTPUT_SEARCH_INDEX = ".reroute/search.json", OUTPUT_ARTIFACTS = ".reroute/artifacts.ts", OUTPUT_INDEX = ".reroute/index.ts";
|
|
9026
9498
|
var init_gen = __esm(() => {
|
|
@@ -9032,6 +9504,35 @@ var init_gen = __esm(() => {
|
|
|
9032
9504
|
init_theme();
|
|
9033
9505
|
});
|
|
9034
9506
|
|
|
9507
|
+
// packages/cli/src/commands/lib/command.ts
|
|
9508
|
+
var exports_command = {};
|
|
9509
|
+
__export(exports_command, {
|
|
9510
|
+
getRerouteCommand: () => getRerouteCommand
|
|
9511
|
+
});
|
|
9512
|
+
import { existsSync as existsSync6 } from "node:fs";
|
|
9513
|
+
import { join as join12 } from "node:path";
|
|
9514
|
+
function getRerouteCommand() {
|
|
9515
|
+
const binPath = join12(import.meta.dir, "..", "..", "bin.ts");
|
|
9516
|
+
const isBunDev = existsSync6(binPath);
|
|
9517
|
+
if (isBunDev) {
|
|
9518
|
+
return `bun ${binPath}`;
|
|
9519
|
+
}
|
|
9520
|
+
const cwd = process.cwd();
|
|
9521
|
+
const nodeModulesPaths = [
|
|
9522
|
+
join12(cwd, "node_modules", ".bin", "reroute"),
|
|
9523
|
+
join12(cwd, "..", "node_modules", ".bin", "reroute"),
|
|
9524
|
+
join12(cwd, "..", "..", "node_modules", ".bin", "reroute"),
|
|
9525
|
+
join12(cwd, "..", "..", "..", "node_modules", ".bin", "reroute")
|
|
9526
|
+
];
|
|
9527
|
+
for (const binPath2 of nodeModulesPaths) {
|
|
9528
|
+
if (existsSync6(binPath2)) {
|
|
9529
|
+
return binPath2;
|
|
9530
|
+
}
|
|
9531
|
+
}
|
|
9532
|
+
return "reroute";
|
|
9533
|
+
}
|
|
9534
|
+
var init_command = () => {};
|
|
9535
|
+
|
|
9035
9536
|
// packages/cli/src/commands/lib/log.ts
|
|
9036
9537
|
function colorizeLogPrefix(text) {
|
|
9037
9538
|
let colored = text;
|
|
@@ -9082,6 +9583,17 @@ var init_log = __esm(() => {
|
|
|
9082
9583
|
});
|
|
9083
9584
|
|
|
9084
9585
|
// packages/cli/src/commands/lib/server.ts
|
|
9586
|
+
async function isServerRunning(port, timeout = 1000) {
|
|
9587
|
+
try {
|
|
9588
|
+
const response = await fetch(`http://localhost:${port}/`, {
|
|
9589
|
+
method: "GET",
|
|
9590
|
+
signal: AbortSignal.timeout(timeout)
|
|
9591
|
+
});
|
|
9592
|
+
return response.status < 500;
|
|
9593
|
+
} catch {
|
|
9594
|
+
return false;
|
|
9595
|
+
}
|
|
9596
|
+
}
|
|
9085
9597
|
async function waitForServerReady(port = 3000, timeout = 30000) {
|
|
9086
9598
|
const startTime = Date.now();
|
|
9087
9599
|
let checkInterval = 50;
|
|
@@ -9096,14 +9608,14 @@ async function waitForServerReady(port = 3000, timeout = 30000) {
|
|
|
9096
9608
|
return;
|
|
9097
9609
|
}
|
|
9098
9610
|
} catch {}
|
|
9099
|
-
await new Promise((
|
|
9611
|
+
await new Promise((resolve3) => setTimeout(resolve3, checkInterval));
|
|
9100
9612
|
checkInterval = Math.min(checkInterval * 1.5, maxInterval);
|
|
9101
9613
|
}
|
|
9102
9614
|
throw new Error(`Timeout waiting for server to respond after ${timeout}ms. ` + `Make sure your server is starting correctly on port ${port}.`);
|
|
9103
9615
|
}
|
|
9104
9616
|
|
|
9105
9617
|
// node_modules/.bun/blessed@0.1.81/node_modules/blessed/lib/alias.js
|
|
9106
|
-
var require_alias = __commonJS((exports)
|
|
9618
|
+
var require_alias = __commonJS(function(exports) {
|
|
9107
9619
|
var alias = exports;
|
|
9108
9620
|
alias.bools = {
|
|
9109
9621
|
auto_left_margin: ["bw", "bw"],
|
|
@@ -9578,7 +10090,7 @@ var require_alias = __commonJS((exports) => {
|
|
|
9578
10090
|
});
|
|
9579
10091
|
|
|
9580
10092
|
// node_modules/.bun/blessed@0.1.81/node_modules/blessed/lib/tput.js
|
|
9581
|
-
var require_tput = __commonJS((exports, module)
|
|
10093
|
+
var require_tput = __commonJS(function(exports, module) {
|
|
9582
10094
|
var __dirname = "/Users/stewan/dev/reroute/node_modules/.bun/blessed@0.1.81/node_modules/blessed/lib";
|
|
9583
10095
|
var assert = __require("assert");
|
|
9584
10096
|
var path3 = __require("path");
|
|
@@ -11676,7 +12188,7 @@ var require_tput = __commonJS((exports, module) => {
|
|
|
11676
12188
|
});
|
|
11677
12189
|
|
|
11678
12190
|
// node_modules/.bun/blessed@0.1.81/node_modules/blessed/lib/colors.js
|
|
11679
|
-
var require_colors = __commonJS((exports)
|
|
12191
|
+
var require_colors = __commonJS(function(exports) {
|
|
11680
12192
|
exports.match = function(r1, g1, b1) {
|
|
11681
12193
|
if (typeof r1 === "string") {
|
|
11682
12194
|
var hex = r1;
|
|
@@ -12096,7 +12608,7 @@ var require_colors = __commonJS((exports) => {
|
|
|
12096
12608
|
});
|
|
12097
12609
|
|
|
12098
12610
|
// node_modules/.bun/blessed@0.1.81/node_modules/blessed/lib/keys.js
|
|
12099
|
-
var require_keys = __commonJS((exports)
|
|
12611
|
+
var require_keys = __commonJS(function(exports) {
|
|
12100
12612
|
var EventEmitter = __require("events").EventEmitter;
|
|
12101
12613
|
function listenerCount(stream2, event) {
|
|
12102
12614
|
return EventEmitter.listenerCount ? EventEmitter.listenerCount(stream2, event) : stream2.listeners(event).length;
|
|
@@ -12453,7 +12965,7 @@ var require_keys = __commonJS((exports) => {
|
|
|
12453
12965
|
});
|
|
12454
12966
|
|
|
12455
12967
|
// node_modules/.bun/blessed@0.1.81/node_modules/blessed/lib/gpmclient.js
|
|
12456
|
-
var require_gpmclient = __commonJS((exports, module)
|
|
12968
|
+
var require_gpmclient = __commonJS(function(exports, module) {
|
|
12457
12969
|
var net = __require("net");
|
|
12458
12970
|
var fs = __require("fs");
|
|
12459
12971
|
var EventEmitter = __require("events").EventEmitter;
|
|
@@ -12528,8 +13040,8 @@ var require_gpmclient = __commonJS((exports, module) => {
|
|
|
12528
13040
|
}
|
|
12529
13041
|
var self2 = this;
|
|
12530
13042
|
if (tty) {
|
|
12531
|
-
fs.stat(GPM_SOCKET, function(err,
|
|
12532
|
-
if (err || !
|
|
13043
|
+
fs.stat(GPM_SOCKET, function(err, stat6) {
|
|
13044
|
+
if (err || !stat6.isSocket()) {
|
|
12533
13045
|
return;
|
|
12534
13046
|
}
|
|
12535
13047
|
var conf = {
|
|
@@ -12616,7 +13128,7 @@ var require_gpmclient = __commonJS((exports, module) => {
|
|
|
12616
13128
|
});
|
|
12617
13129
|
|
|
12618
13130
|
// node_modules/.bun/blessed@0.1.81/node_modules/blessed/lib/program.js
|
|
12619
|
-
var require_program = __commonJS((exports, module)
|
|
13131
|
+
var require_program = __commonJS(function(exports, module) {
|
|
12620
13132
|
var EventEmitter = __require("events").EventEmitter;
|
|
12621
13133
|
var StringDecoder = __require("string_decoder").StringDecoder;
|
|
12622
13134
|
var cp = __require("child_process");
|
|
@@ -15157,7 +15669,7 @@ var require_program = __commonJS((exports, module) => {
|
|
|
15157
15669
|
});
|
|
15158
15670
|
|
|
15159
15671
|
// node_modules/.bun/blessed@0.1.81/node_modules/blessed/lib/widget.js
|
|
15160
|
-
var require_widget = __commonJS((exports)
|
|
15672
|
+
var require_widget = __commonJS(function(exports) {
|
|
15161
15673
|
var widget = exports;
|
|
15162
15674
|
widget.classes = [
|
|
15163
15675
|
"Node",
|
|
@@ -15211,7 +15723,7 @@ var require_widget = __commonJS((exports) => {
|
|
|
15211
15723
|
});
|
|
15212
15724
|
|
|
15213
15725
|
// node_modules/.bun/blessed@0.1.81/node_modules/blessed/lib/unicode.js
|
|
15214
|
-
var require_unicode = __commonJS((exports)
|
|
15726
|
+
var require_unicode = __commonJS(function(exports) {
|
|
15215
15727
|
var stringFromCharCode = String.fromCharCode;
|
|
15216
15728
|
var floor = Math.floor;
|
|
15217
15729
|
exports.charWidth = function(str, i) {
|
|
@@ -15511,7 +16023,7 @@ var require_unicode = __commonJS((exports) => {
|
|
|
15511
16023
|
});
|
|
15512
16024
|
|
|
15513
16025
|
// node_modules/.bun/blessed@0.1.81/node_modules/blessed/lib/events.js
|
|
15514
|
-
var require_events = __commonJS((exports, module)
|
|
16026
|
+
var require_events = __commonJS(function(exports, module) {
|
|
15515
16027
|
var slice = Array.prototype.slice;
|
|
15516
16028
|
function EventEmitter() {
|
|
15517
16029
|
if (!this._events)
|
|
@@ -15611,7 +16123,7 @@ var require_events = __commonJS((exports, module) => {
|
|
|
15611
16123
|
});
|
|
15612
16124
|
|
|
15613
16125
|
// node_modules/.bun/blessed@0.1.81/node_modules/blessed/lib/widgets/node.js
|
|
15614
|
-
var require_node = __commonJS((exports, module)
|
|
16126
|
+
var require_node = __commonJS(function(exports, module) {
|
|
15615
16127
|
var EventEmitter = require_events().EventEmitter;
|
|
15616
16128
|
function Node(options) {
|
|
15617
16129
|
var self2 = this;
|
|
@@ -15833,7 +16345,7 @@ var require_node = __commonJS((exports, module) => {
|
|
|
15833
16345
|
});
|
|
15834
16346
|
|
|
15835
16347
|
// node_modules/.bun/blessed@0.1.81/node_modules/blessed/lib/widgets/element.js
|
|
15836
|
-
var require_element = __commonJS((exports, module)
|
|
16348
|
+
var require_element = __commonJS(function(exports, module) {
|
|
15837
16349
|
var assert = __require("assert");
|
|
15838
16350
|
var colors = require_colors();
|
|
15839
16351
|
var unicode = require_unicode();
|
|
@@ -17746,7 +18258,7 @@ var require_element = __commonJS((exports, module) => {
|
|
|
17746
18258
|
});
|
|
17747
18259
|
|
|
17748
18260
|
// node_modules/.bun/blessed@0.1.81/node_modules/blessed/lib/widgets/box.js
|
|
17749
|
-
var require_box = __commonJS((exports, module)
|
|
18261
|
+
var require_box = __commonJS(function(exports, module) {
|
|
17750
18262
|
var Node = require_node();
|
|
17751
18263
|
var Element = require_element();
|
|
17752
18264
|
function Box(options) {
|
|
@@ -17762,7 +18274,7 @@ var require_box = __commonJS((exports, module) => {
|
|
|
17762
18274
|
});
|
|
17763
18275
|
|
|
17764
18276
|
// node_modules/.bun/blessed@0.1.81/node_modules/blessed/lib/widgets/scrollablebox.js
|
|
17765
|
-
var require_scrollablebox = __commonJS((exports, module)
|
|
18277
|
+
var require_scrollablebox = __commonJS(function(exports, module) {
|
|
17766
18278
|
var Node = require_node();
|
|
17767
18279
|
var Box = require_box();
|
|
17768
18280
|
function ScrollableBox(options) {
|
|
@@ -18042,7 +18554,7 @@ var require_scrollablebox = __commonJS((exports, module) => {
|
|
|
18042
18554
|
});
|
|
18043
18555
|
|
|
18044
18556
|
// node_modules/.bun/blessed@0.1.81/node_modules/blessed/lib/widgets/scrollabletext.js
|
|
18045
|
-
var require_scrollabletext = __commonJS((exports, module)
|
|
18557
|
+
var require_scrollabletext = __commonJS(function(exports, module) {
|
|
18046
18558
|
var Node = require_node();
|
|
18047
18559
|
var ScrollableBox = require_scrollablebox();
|
|
18048
18560
|
function ScrollableText(options) {
|
|
@@ -18059,7 +18571,7 @@ var require_scrollabletext = __commonJS((exports, module) => {
|
|
|
18059
18571
|
});
|
|
18060
18572
|
|
|
18061
18573
|
// node_modules/.bun/blessed@0.1.81/node_modules/blessed/lib/widgets/log.js
|
|
18062
|
-
var require_log = __commonJS((exports, module)
|
|
18574
|
+
var require_log = __commonJS(function(exports, module) {
|
|
18063
18575
|
var util = __require("util");
|
|
18064
18576
|
var nextTick = global.setImmediate || process.nextTick.bind(process);
|
|
18065
18577
|
var Node = require_node();
|
|
@@ -18113,7 +18625,7 @@ var require_log = __commonJS((exports, module) => {
|
|
|
18113
18625
|
});
|
|
18114
18626
|
|
|
18115
18627
|
// node_modules/.bun/blessed@0.1.81/node_modules/blessed/lib/widgets/screen.js
|
|
18116
|
-
var require_screen = __commonJS((exports, module)
|
|
18628
|
+
var require_screen = __commonJS(function(exports, module) {
|
|
18117
18629
|
var path3 = __require("path");
|
|
18118
18630
|
var fs = __require("fs");
|
|
18119
18631
|
var cp = __require("child_process");
|
|
@@ -19437,12 +19949,12 @@ var require_screen = __commonJS((exports, module) => {
|
|
|
19437
19949
|
env: process.env,
|
|
19438
19950
|
cwd: process.env.HOME
|
|
19439
19951
|
};
|
|
19440
|
-
function
|
|
19952
|
+
function writeFile2(callback2) {
|
|
19441
19953
|
if (!options.value)
|
|
19442
19954
|
return callback2();
|
|
19443
19955
|
return fs.writeFile(file, options.value, callback2);
|
|
19444
19956
|
}
|
|
19445
|
-
return
|
|
19957
|
+
return writeFile2(function(err) {
|
|
19446
19958
|
if (err)
|
|
19447
19959
|
return callback(err);
|
|
19448
19960
|
return self2.exec(editor, args, opt, function(err2, success) {
|
|
@@ -19822,7 +20334,7 @@ var require_screen = __commonJS((exports, module) => {
|
|
|
19822
20334
|
});
|
|
19823
20335
|
|
|
19824
20336
|
// node_modules/.bun/blessed@0.1.81/node_modules/blessed/lib/helpers.js
|
|
19825
|
-
var require_helpers = __commonJS((exports)
|
|
20337
|
+
var require_helpers = __commonJS(function(exports) {
|
|
19826
20338
|
var fs = __require("fs");
|
|
19827
20339
|
var unicode = require_unicode();
|
|
19828
20340
|
var helpers = exports;
|
|
@@ -19853,7 +20365,7 @@ var require_helpers = __commonJS((exports) => {
|
|
|
19853
20365
|
};
|
|
19854
20366
|
helpers.findFile = function(start, target) {
|
|
19855
20367
|
return function read(dir) {
|
|
19856
|
-
var files, file,
|
|
20368
|
+
var files, file, stat6, out;
|
|
19857
20369
|
if (dir === "/dev" || dir === "/sys" || dir === "/proc" || dir === "/net") {
|
|
19858
20370
|
return null;
|
|
19859
20371
|
}
|
|
@@ -19868,11 +20380,11 @@ var require_helpers = __commonJS((exports) => {
|
|
|
19868
20380
|
return (dir === "/" ? "" : dir) + "/" + file;
|
|
19869
20381
|
}
|
|
19870
20382
|
try {
|
|
19871
|
-
|
|
20383
|
+
stat6 = fs.lstatSync((dir === "/" ? "" : dir) + "/" + file);
|
|
19872
20384
|
} catch (e) {
|
|
19873
|
-
|
|
20385
|
+
stat6 = null;
|
|
19874
20386
|
}
|
|
19875
|
-
if (
|
|
20387
|
+
if (stat6 && stat6.isDirectory() && !stat6.isSymbolicLink()) {
|
|
19876
20388
|
out = read((dir === "/" ? "" : dir) + "/" + file);
|
|
19877
20389
|
if (out)
|
|
19878
20390
|
return out;
|
|
@@ -19944,7 +20456,7 @@ var require_helpers = __commonJS((exports) => {
|
|
|
19944
20456
|
});
|
|
19945
20457
|
|
|
19946
20458
|
// node_modules/.bun/blessed@0.1.81/node_modules/blessed/lib/blessed.js
|
|
19947
|
-
var require_blessed = __commonJS((exports, module)
|
|
20459
|
+
var require_blessed = __commonJS(function(exports, module) {
|
|
19948
20460
|
function blessed() {
|
|
19949
20461
|
return blessed.program.apply(null, arguments);
|
|
19950
20462
|
}
|
|
@@ -19962,7 +20474,7 @@ var require_blessed = __commonJS((exports, module) => {
|
|
|
19962
20474
|
});
|
|
19963
20475
|
|
|
19964
20476
|
// node_modules/.bun/x256@0.0.2/node_modules/x256/colors.json
|
|
19965
|
-
var require_colors2 = __commonJS((exports, module)
|
|
20477
|
+
var require_colors2 = __commonJS(function(exports, module) {
|
|
19966
20478
|
module.exports = [
|
|
19967
20479
|
"000000",
|
|
19968
20480
|
"800000",
|
|
@@ -20224,7 +20736,7 @@ var require_colors2 = __commonJS((exports, module) => {
|
|
|
20224
20736
|
});
|
|
20225
20737
|
|
|
20226
20738
|
// node_modules/.bun/x256@0.0.2/node_modules/x256/index.js
|
|
20227
|
-
var require_x256 = __commonJS((exports, module)
|
|
20739
|
+
var require_x256 = __commonJS(function(exports, module) {
|
|
20228
20740
|
var colors = require_colors2().map(function(hex) {
|
|
20229
20741
|
var r = parseInt(hex.slice(0, 2), 16);
|
|
20230
20742
|
var g = parseInt(hex.slice(2, 4), 16);
|
|
@@ -20249,7 +20761,7 @@ var require_x256 = __commonJS((exports, module) => {
|
|
|
20249
20761
|
});
|
|
20250
20762
|
|
|
20251
20763
|
// node_modules/.bun/blessed-contrib@4.11.0/node_modules/blessed-contrib/lib/utils.js
|
|
20252
|
-
var require_utils = __commonJS((exports)
|
|
20764
|
+
var require_utils = __commonJS(function(exports) {
|
|
20253
20765
|
var x256 = require_x256();
|
|
20254
20766
|
function MergeRecursive(obj1, obj2) {
|
|
20255
20767
|
if (obj1 == null) {
|
|
@@ -20307,7 +20819,7 @@ var require_utils = __commonJS((exports) => {
|
|
|
20307
20819
|
});
|
|
20308
20820
|
|
|
20309
20821
|
// node_modules/.bun/blessed-contrib@4.11.0/node_modules/blessed-contrib/lib/layout/grid.js
|
|
20310
|
-
var require_grid = __commonJS((exports, module)
|
|
20822
|
+
var require_grid = __commonJS(function(exports, module) {
|
|
20311
20823
|
var utils = require_utils();
|
|
20312
20824
|
var widgetSpacing = 0;
|
|
20313
20825
|
function Grid(options) {
|
|
@@ -20342,7 +20854,7 @@ var require_grid = __commonJS((exports, module) => {
|
|
|
20342
20854
|
});
|
|
20343
20855
|
|
|
20344
20856
|
// node_modules/.bun/blessed-contrib@4.11.0/node_modules/blessed-contrib/lib/layout/carousel.js
|
|
20345
|
-
var require_carousel = __commonJS((exports, module)
|
|
20857
|
+
var require_carousel = __commonJS(function(exports, module) {
|
|
20346
20858
|
function Carousel(pages, options) {
|
|
20347
20859
|
this.currPage = 0;
|
|
20348
20860
|
this.pages = pages;
|
|
@@ -20411,7 +20923,7 @@ var require_carousel = __commonJS((exports, module) => {
|
|
|
20411
20923
|
});
|
|
20412
20924
|
|
|
20413
20925
|
// node_modules/.bun/drawille-blessed-contrib@1.0.0/node_modules/drawille-blessed-contrib/index.js
|
|
20414
|
-
var require_drawille_blessed_contrib = __commonJS((exports, module)
|
|
20926
|
+
var require_drawille_blessed_contrib = __commonJS(function(exports, module) {
|
|
20415
20927
|
var map = [
|
|
20416
20928
|
[1, 8],
|
|
20417
20929
|
[2, 16],
|
|
@@ -20521,7 +21033,7 @@ var require_drawille_blessed_contrib = __commonJS((exports, module) => {
|
|
|
20521
21033
|
});
|
|
20522
21034
|
|
|
20523
21035
|
// node_modules/.bun/bresenham@0.0.3/node_modules/bresenham/index.js
|
|
20524
|
-
var require_bresenham = __commonJS((exports, module)
|
|
21036
|
+
var require_bresenham = __commonJS(function(exports, module) {
|
|
20525
21037
|
module.exports = function(x0, y0, x1, y1, fn) {
|
|
20526
21038
|
if (!fn) {
|
|
20527
21039
|
var arr = [];
|
|
@@ -20560,7 +21072,7 @@ var require_bresenham = __commonJS((exports, module) => {
|
|
|
20560
21072
|
});
|
|
20561
21073
|
|
|
20562
21074
|
// node_modules/.bun/gl-matrix@2.8.1/node_modules/gl-matrix/dist/gl-matrix.js
|
|
20563
|
-
var require_gl_matrix = __commonJS((exports, module)
|
|
21075
|
+
var require_gl_matrix = __commonJS(function(exports, module) {
|
|
20564
21076
|
/*!
|
|
20565
21077
|
@fileoverview gl-matrix - High performance matrix and vector operations
|
|
20566
21078
|
@author Brandon Jones
|
|
@@ -21661,7 +22173,7 @@ var require_gl_matrix = __commonJS((exports, module) => {
|
|
|
21661
22173
|
});
|
|
21662
22174
|
|
|
21663
22175
|
// node_modules/.bun/drawille-canvas-blessed-contrib@0.1.3/node_modules/drawille-canvas-blessed-contrib/index.js
|
|
21664
|
-
var require_drawille_canvas_blessed_contrib = __commonJS((exports, module)
|
|
22176
|
+
var require_drawille_canvas_blessed_contrib = __commonJS(function(exports, module) {
|
|
21665
22177
|
var Canvas = require_drawille_blessed_contrib();
|
|
21666
22178
|
var bresenham = require_bresenham();
|
|
21667
22179
|
var glMatrix = require_gl_matrix();
|
|
@@ -21868,7 +22380,7 @@ var require_drawille_canvas_blessed_contrib = __commonJS((exports, module) => {
|
|
|
21868
22380
|
});
|
|
21869
22381
|
|
|
21870
22382
|
// node_modules/.bun/blessed-contrib@4.11.0/node_modules/blessed-contrib/lib/widget/canvas.js
|
|
21871
|
-
var require_canvas = __commonJS((exports, module)
|
|
22383
|
+
var require_canvas = __commonJS(function(exports, module) {
|
|
21872
22384
|
var blessed = require_blessed();
|
|
21873
22385
|
var Node = blessed.Node;
|
|
21874
22386
|
var Box = blessed.Box;
|
|
@@ -21908,7 +22420,7 @@ var require_canvas = __commonJS((exports, module) => {
|
|
|
21908
22420
|
});
|
|
21909
22421
|
|
|
21910
22422
|
// node_modules/.bun/map-canvas@0.1.5/node_modules/map-canvas/map.js
|
|
21911
|
-
var require_map = __commonJS((exports, module)
|
|
22423
|
+
var require_map = __commonJS(function(exports, module) {
|
|
21912
22424
|
(function() {})();
|
|
21913
22425
|
Map2.prototype.drawBackground = function() {
|
|
21914
22426
|
this.ctx.fillStyle = "rgb(0,0,0)";
|
|
@@ -81904,7 +82416,7 @@ var require_map = __commonJS((exports, module) => {
|
|
|
81904
82416
|
});
|
|
81905
82417
|
|
|
81906
82418
|
// node_modules/.bun/blessed-contrib@4.11.0/node_modules/blessed-contrib/lib/widget/map.js
|
|
81907
|
-
var require_map2 = __commonJS((exports, module)
|
|
82419
|
+
var require_map2 = __commonJS(function(exports, module) {
|
|
81908
82420
|
var blessed = require_blessed();
|
|
81909
82421
|
var Node = blessed.Node;
|
|
81910
82422
|
var Canvas = require_canvas();
|
|
@@ -81975,7 +82487,7 @@ var require_map2 = __commonJS((exports, module) => {
|
|
|
81975
82487
|
});
|
|
81976
82488
|
|
|
81977
82489
|
// node_modules/.bun/ansi-term@0.0.2/node_modules/ansi-term/index.js
|
|
81978
|
-
var require_ansi_term = __commonJS((exports, module)
|
|
82490
|
+
var require_ansi_term = __commonJS(function(exports, module) {
|
|
81979
82491
|
var x256 = require_x256();
|
|
81980
82492
|
function AnsiTerminal(width, height) {
|
|
81981
82493
|
this.width = width;
|
|
@@ -82081,7 +82593,7 @@ var require_ansi_term = __commonJS((exports, module) => {
|
|
|
82081
82593
|
});
|
|
82082
82594
|
|
|
82083
82595
|
// node_modules/.bun/blessed-contrib@4.11.0/node_modules/blessed-contrib/lib/widget/gauge.js
|
|
82084
|
-
var require_gauge = __commonJS((exports, module)
|
|
82596
|
+
var require_gauge = __commonJS(function(exports, module) {
|
|
82085
82597
|
var blessed = require_blessed();
|
|
82086
82598
|
var Node = blessed.Node;
|
|
82087
82599
|
var Canvas = require_canvas();
|
|
@@ -82113,7 +82625,7 @@ var require_gauge = __commonJS((exports, module) => {
|
|
|
82113
82625
|
};
|
|
82114
82626
|
Gauge.prototype.type = "gauge";
|
|
82115
82627
|
Gauge.prototype.setData = function(data) {
|
|
82116
|
-
if (typeof data ==
|
|
82628
|
+
if (typeof data == typeof [] && data.length > 0) {
|
|
82117
82629
|
this.setStack(data);
|
|
82118
82630
|
} else if (typeof data == "number") {
|
|
82119
82631
|
this.setPercent(data);
|
|
@@ -82151,7 +82663,7 @@ var require_gauge = __commonJS((exports, module) => {
|
|
|
82151
82663
|
for (var i = 0;i < stack.length; i++) {
|
|
82152
82664
|
var currentStack = stack[i];
|
|
82153
82665
|
let percent;
|
|
82154
|
-
if (typeof currentStack ==
|
|
82666
|
+
if (typeof currentStack == typeof {})
|
|
82155
82667
|
percent = currentStack.percent;
|
|
82156
82668
|
else
|
|
82157
82669
|
percent = currentStack;
|
|
@@ -82180,7 +82692,7 @@ var require_gauge = __commonJS((exports, module) => {
|
|
|
82180
82692
|
});
|
|
82181
82693
|
|
|
82182
82694
|
// node_modules/.bun/blessed-contrib@4.11.0/node_modules/blessed-contrib/lib/widget/gauge-list.js
|
|
82183
|
-
var require_gauge_list = __commonJS((exports, module)
|
|
82695
|
+
var require_gauge_list = __commonJS(function(exports, module) {
|
|
82184
82696
|
var blessed = require_blessed();
|
|
82185
82697
|
var Node = blessed.Node;
|
|
82186
82698
|
var Canvas = require_canvas();
|
|
@@ -82231,7 +82743,7 @@ var require_gauge_list = __commonJS((exports, module) => {
|
|
|
82231
82743
|
for (var i = 0;i < stack.length; i++) {
|
|
82232
82744
|
var currentStack = stack[i];
|
|
82233
82745
|
var percent;
|
|
82234
|
-
if (typeof currentStack ==
|
|
82746
|
+
if (typeof currentStack == typeof {}) {
|
|
82235
82747
|
percent = currentStack.percent;
|
|
82236
82748
|
} else {
|
|
82237
82749
|
percent = currentStack;
|
|
@@ -82258,7 +82770,7 @@ var require_gauge_list = __commonJS((exports, module) => {
|
|
|
82258
82770
|
});
|
|
82259
82771
|
|
|
82260
82772
|
// node_modules/.bun/blessed-contrib@4.11.0/node_modules/blessed-contrib/lib/widget/lcd.js
|
|
82261
|
-
var require_lcd = __commonJS((exports, module)
|
|
82773
|
+
var require_lcd = __commonJS(function(exports, module) {
|
|
82262
82774
|
var blessed = require_blessed();
|
|
82263
82775
|
var Node = blessed.Node;
|
|
82264
82776
|
var Canvas = require_canvas();
|
|
@@ -82615,7 +83127,7 @@ var require_lcd = __commonJS((exports, module) => {
|
|
|
82615
83127
|
});
|
|
82616
83128
|
|
|
82617
83129
|
// node_modules/.bun/blessed-contrib@4.11.0/node_modules/blessed-contrib/lib/widget/donut.js
|
|
82618
|
-
var require_donut = __commonJS((exports, module)
|
|
83130
|
+
var require_donut = __commonJS(function(exports, module) {
|
|
82619
83131
|
var blessed = require_blessed();
|
|
82620
83132
|
var Node = blessed.Node;
|
|
82621
83133
|
var Canvas = require_canvas();
|
|
@@ -82703,15 +83215,15 @@ var require_donut = __commonJS((exports, module) => {
|
|
|
82703
83215
|
c.fillText(ptext, cxx - Math.round(parseFloat(c.measureText(ptext).width / 2)) + 3, middle2);
|
|
82704
83216
|
c.fillText(label, cxx - Math.round(parseFloat(c.measureText(label).width / 2)) + 3, middle2 + radius2 + 5);
|
|
82705
83217
|
}
|
|
82706
|
-
function makeDonut(
|
|
83218
|
+
function makeDonut(stat6, which) {
|
|
82707
83219
|
var left = radius + spacing * which + radius * 2 * (which - 1);
|
|
82708
|
-
var percent =
|
|
83220
|
+
var percent = stat6.percent;
|
|
82709
83221
|
if (percent > 1.001) {
|
|
82710
83222
|
percent = parseFloat(percent / 100).toFixed(2);
|
|
82711
83223
|
}
|
|
82712
|
-
var label =
|
|
82713
|
-
var percentAltNumber =
|
|
82714
|
-
var color =
|
|
83224
|
+
var label = stat6.label;
|
|
83225
|
+
var percentAltNumber = stat6.percentAltNumber;
|
|
83226
|
+
var color = stat6.color || "green";
|
|
82715
83227
|
var cxx = left;
|
|
82716
83228
|
drawDonut(label, percent, radius, width, cxx, middle, color, percentAltNumber);
|
|
82717
83229
|
}
|
|
@@ -82745,7 +83257,7 @@ var require_donut = __commonJS((exports, module) => {
|
|
|
82745
83257
|
});
|
|
82746
83258
|
|
|
82747
83259
|
// node_modules/.bun/blessed-contrib@4.11.0/node_modules/blessed-contrib/lib/widget/log.js
|
|
82748
|
-
var require_log2 = __commonJS((exports, module)
|
|
83260
|
+
var require_log2 = __commonJS(function(exports, module) {
|
|
82749
83261
|
var blessed = require_blessed();
|
|
82750
83262
|
var Node = blessed.Node;
|
|
82751
83263
|
var List = blessed.List;
|
|
@@ -82774,7 +83286,7 @@ var require_log2 = __commonJS((exports, module) => {
|
|
|
82774
83286
|
});
|
|
82775
83287
|
|
|
82776
83288
|
// node_modules/.bun/png-js@0.1.1/node_modules/png-js/png-node.js
|
|
82777
|
-
var require_png_node = __commonJS((exports, module)
|
|
83289
|
+
var require_png_node = __commonJS(function(exports, module) {
|
|
82778
83290
|
(function() {
|
|
82779
83291
|
var PNG, fs, zlib;
|
|
82780
83292
|
fs = __require("fs");
|
|
@@ -83055,7 +83567,7 @@ var require_png_node = __commonJS((exports, module) => {
|
|
|
83055
83567
|
});
|
|
83056
83568
|
|
|
83057
83569
|
// node_modules/.bun/charm@0.1.2/node_modules/charm/lib/encode.js
|
|
83058
|
-
var require_encode = __commonJS((exports, module)
|
|
83570
|
+
var require_encode = __commonJS(function(exports, module) {
|
|
83059
83571
|
var encode = module.exports = function(xs) {
|
|
83060
83572
|
function bytes(s) {
|
|
83061
83573
|
if (typeof s === "string") {
|
|
@@ -83074,7 +83586,7 @@ var require_encode = __commonJS((exports, module) => {
|
|
|
83074
83586
|
});
|
|
83075
83587
|
|
|
83076
83588
|
// node_modules/.bun/charm@0.1.2/node_modules/charm/index.js
|
|
83077
|
-
var require_charm = __commonJS((exports, module)
|
|
83589
|
+
var require_charm = __commonJS(function(exports, module) {
|
|
83078
83590
|
var tty = __require("tty");
|
|
83079
83591
|
var encode = require_encode();
|
|
83080
83592
|
var Stream = __require("stream").Stream;
|
|
@@ -83343,7 +83855,7 @@ var require_charm = __commonJS((exports, module) => {
|
|
|
83343
83855
|
});
|
|
83344
83856
|
|
|
83345
83857
|
// node_modules/.bun/buffers@0.1.1/node_modules/buffers/index.js
|
|
83346
|
-
var require_buffers = __commonJS((exports, module)
|
|
83858
|
+
var require_buffers = __commonJS(function(exports, module) {
|
|
83347
83859
|
module.exports = Buffers;
|
|
83348
83860
|
function Buffers(bufs) {
|
|
83349
83861
|
if (!(this instanceof Buffers))
|
|
@@ -83553,7 +84065,7 @@ var require_buffers = __commonJS((exports, module) => {
|
|
|
83553
84065
|
});
|
|
83554
84066
|
|
|
83555
84067
|
// node_modules/.bun/wordwrap@0.0.3/node_modules/wordwrap/index.js
|
|
83556
|
-
var require_wordwrap = __commonJS((exports, module)
|
|
84068
|
+
var require_wordwrap = __commonJS(function(exports, module) {
|
|
83557
84069
|
var wordwrap = module.exports = function(start, stop, params) {
|
|
83558
84070
|
if (typeof start === "object") {
|
|
83559
84071
|
params = start;
|
|
@@ -83614,7 +84126,7 @@ var require_wordwrap = __commonJS((exports, module) => {
|
|
|
83614
84126
|
});
|
|
83615
84127
|
|
|
83616
84128
|
// node_modules/.bun/optimist@0.2.8/node_modules/optimist/index.js
|
|
83617
|
-
var require_optimist = __commonJS((exports, module)
|
|
84129
|
+
var require_optimist = __commonJS(function(exports, module) {
|
|
83618
84130
|
var path3 = __require("path");
|
|
83619
84131
|
var wordwrap = require_wordwrap();
|
|
83620
84132
|
var inst = Argv(process.argv.slice(2));
|
|
@@ -83956,7 +84468,7 @@ var require_optimist = __commonJS((exports, module) => {
|
|
|
83956
84468
|
});
|
|
83957
84469
|
|
|
83958
84470
|
// node_modules/.bun/event-stream@0.9.8/node_modules/event-stream/index.js
|
|
83959
|
-
var require_event_stream = __commonJS((exports)
|
|
84471
|
+
var require_event_stream = __commonJS(function(exports) {
|
|
83960
84472
|
var Stream = __require("stream").Stream;
|
|
83961
84473
|
var es = exports;
|
|
83962
84474
|
es.Stream = Stream;
|
|
@@ -84381,7 +84893,7 @@ var require_event_stream = __commonJS((exports) => {
|
|
|
84381
84893
|
});
|
|
84382
84894
|
|
|
84383
84895
|
// node_modules/.bun/picture-tuber@1.0.2/node_modules/picture-tuber/index.js
|
|
84384
|
-
var require_picture_tuber = __commonJS((exports, module)
|
|
84896
|
+
var require_picture_tuber = __commonJS(function(exports, module) {
|
|
84385
84897
|
var PNG = require_png_node();
|
|
84386
84898
|
var charm = require_charm();
|
|
84387
84899
|
var x256 = require_x256();
|
|
@@ -84422,14 +84934,14 @@ var require_picture_tuber = __commonJS((exports, module) => {
|
|
|
84422
84934
|
});
|
|
84423
84935
|
|
|
84424
84936
|
// node_modules/.bun/isarray@0.0.1/node_modules/isarray/index.js
|
|
84425
|
-
var require_isarray = __commonJS((exports, module)
|
|
84937
|
+
var require_isarray = __commonJS(function(exports, module) {
|
|
84426
84938
|
module.exports = Array.isArray || function(arr) {
|
|
84427
84939
|
return Object.prototype.toString.call(arr) == "[object Array]";
|
|
84428
84940
|
};
|
|
84429
84941
|
});
|
|
84430
84942
|
|
|
84431
84943
|
// node_modules/.bun/core-util-is@1.0.3/node_modules/core-util-is/lib/util.js
|
|
84432
|
-
var require_util = __commonJS((exports)
|
|
84944
|
+
var require_util = __commonJS(function(exports) {
|
|
84433
84945
|
function isArray(arg) {
|
|
84434
84946
|
if (Array.isArray) {
|
|
84435
84947
|
return Array.isArray(arg);
|
|
@@ -84496,7 +85008,7 @@ var require_util = __commonJS((exports) => {
|
|
|
84496
85008
|
});
|
|
84497
85009
|
|
|
84498
85010
|
// node_modules/.bun/inherits@2.0.4/node_modules/inherits/inherits_browser.js
|
|
84499
|
-
var require_inherits_browser = __commonJS((exports, module)
|
|
85011
|
+
var require_inherits_browser = __commonJS(function(exports, module) {
|
|
84500
85012
|
if (typeof Object.create === "function") {
|
|
84501
85013
|
module.exports = function inherits(ctor, superCtor) {
|
|
84502
85014
|
if (superCtor) {
|
|
@@ -84525,7 +85037,7 @@ var require_inherits_browser = __commonJS((exports, module) => {
|
|
|
84525
85037
|
});
|
|
84526
85038
|
|
|
84527
85039
|
// node_modules/.bun/inherits@2.0.4/node_modules/inherits/inherits.js
|
|
84528
|
-
var require_inherits = __commonJS((exports, module)
|
|
85040
|
+
var require_inherits = __commonJS(function(exports, module) {
|
|
84529
85041
|
try {
|
|
84530
85042
|
util = __require("util");
|
|
84531
85043
|
if (typeof util.inherits !== "function")
|
|
@@ -84538,7 +85050,7 @@ var require_inherits = __commonJS((exports, module) => {
|
|
|
84538
85050
|
});
|
|
84539
85051
|
|
|
84540
85052
|
// node_modules/.bun/string_decoder@0.10.31/node_modules/string_decoder/index.js
|
|
84541
|
-
var require_string_decoder = __commonJS((exports)
|
|
85053
|
+
var require_string_decoder = __commonJS(function(exports) {
|
|
84542
85054
|
var Buffer2 = __require("buffer").Buffer;
|
|
84543
85055
|
var isBufferEncoding = Buffer2.isEncoding || function(encoding) {
|
|
84544
85056
|
switch (encoding && encoding.toLowerCase()) {
|
|
@@ -84674,7 +85186,7 @@ var require_string_decoder = __commonJS((exports) => {
|
|
|
84674
85186
|
});
|
|
84675
85187
|
|
|
84676
85188
|
// node_modules/.bun/readable-stream@1.0.34/node_modules/readable-stream/lib/_stream_readable.js
|
|
84677
|
-
var require__stream_readable = __commonJS((exports, module)
|
|
85189
|
+
var require__stream_readable = __commonJS(function(exports, module) {
|
|
84678
85190
|
module.exports = Readable;
|
|
84679
85191
|
var isArray = require_isarray();
|
|
84680
85192
|
var Buffer2 = __require("buffer").Buffer;
|
|
@@ -85281,7 +85793,7 @@ var require__stream_readable = __commonJS((exports, module) => {
|
|
|
85281
85793
|
});
|
|
85282
85794
|
|
|
85283
85795
|
// node_modules/.bun/readable-stream@1.0.34/node_modules/readable-stream/lib/_stream_duplex.js
|
|
85284
|
-
var require__stream_duplex = __commonJS((exports, module)
|
|
85796
|
+
var require__stream_duplex = __commonJS(function(exports, module) {
|
|
85285
85797
|
module.exports = Duplex;
|
|
85286
85798
|
var objectKeys = Object.keys || function(obj) {
|
|
85287
85799
|
var keys = [];
|
|
@@ -85325,7 +85837,7 @@ var require__stream_duplex = __commonJS((exports, module) => {
|
|
|
85325
85837
|
});
|
|
85326
85838
|
|
|
85327
85839
|
// node_modules/.bun/readable-stream@1.0.34/node_modules/readable-stream/lib/_stream_writable.js
|
|
85328
|
-
var require__stream_writable = __commonJS((exports, module)
|
|
85840
|
+
var require__stream_writable = __commonJS(function(exports, module) {
|
|
85329
85841
|
module.exports = Writable;
|
|
85330
85842
|
var Buffer2 = __require("buffer").Buffer;
|
|
85331
85843
|
Writable.WritableState = WritableState;
|
|
@@ -85553,7 +86065,7 @@ var require__stream_writable = __commonJS((exports, module) => {
|
|
|
85553
86065
|
});
|
|
85554
86066
|
|
|
85555
86067
|
// node_modules/.bun/readable-stream@1.0.34/node_modules/readable-stream/lib/_stream_transform.js
|
|
85556
|
-
var require__stream_transform = __commonJS((exports, module)
|
|
86068
|
+
var require__stream_transform = __commonJS(function(exports, module) {
|
|
85557
86069
|
module.exports = Transform;
|
|
85558
86070
|
var Duplex = require__stream_duplex();
|
|
85559
86071
|
var util = require_util();
|
|
@@ -85645,7 +86157,7 @@ var require__stream_transform = __commonJS((exports, module) => {
|
|
|
85645
86157
|
});
|
|
85646
86158
|
|
|
85647
86159
|
// node_modules/.bun/readable-stream@1.0.34/node_modules/readable-stream/lib/_stream_passthrough.js
|
|
85648
|
-
var require__stream_passthrough = __commonJS((exports, module)
|
|
86160
|
+
var require__stream_passthrough = __commonJS(function(exports, module) {
|
|
85649
86161
|
module.exports = PassThrough;
|
|
85650
86162
|
var Transform = require__stream_transform();
|
|
85651
86163
|
var util = require_util();
|
|
@@ -85662,7 +86174,7 @@ var require__stream_passthrough = __commonJS((exports, module) => {
|
|
|
85662
86174
|
});
|
|
85663
86175
|
|
|
85664
86176
|
// node_modules/.bun/readable-stream@1.0.34/node_modules/readable-stream/readable.js
|
|
85665
|
-
var require_readable = __commonJS((exports, module)
|
|
86177
|
+
var require_readable = __commonJS(function(exports, module) {
|
|
85666
86178
|
var Stream = __require("stream");
|
|
85667
86179
|
exports = module.exports = require__stream_readable();
|
|
85668
86180
|
exports.Stream = Stream;
|
|
@@ -85677,7 +86189,7 @@ var require_readable = __commonJS((exports, module) => {
|
|
|
85677
86189
|
});
|
|
85678
86190
|
|
|
85679
86191
|
// node_modules/.bun/memory-streams@0.1.3/node_modules/memory-streams/lib/ReadableStream.js
|
|
85680
|
-
var require_ReadableStream = __commonJS((exports, module)
|
|
86192
|
+
var require_ReadableStream = __commonJS(function(exports, module) {
|
|
85681
86193
|
var Stream = require_readable();
|
|
85682
86194
|
var util = __require("util");
|
|
85683
86195
|
module.exports = ReadableStream;
|
|
@@ -85696,7 +86208,7 @@ var require_ReadableStream = __commonJS((exports, module) => {
|
|
|
85696
86208
|
});
|
|
85697
86209
|
|
|
85698
86210
|
// node_modules/.bun/memory-streams@0.1.3/node_modules/memory-streams/lib/WritableStream.js
|
|
85699
|
-
var require_WritableStream = __commonJS((exports, module)
|
|
86211
|
+
var require_WritableStream = __commonJS(function(exports, module) {
|
|
85700
86212
|
var Stream = require_readable();
|
|
85701
86213
|
var util = __require("util");
|
|
85702
86214
|
module.exports = WritableStream;
|
|
@@ -85731,13 +86243,13 @@ var require_WritableStream = __commonJS((exports, module) => {
|
|
|
85731
86243
|
});
|
|
85732
86244
|
|
|
85733
86245
|
// node_modules/.bun/memory-streams@0.1.3/node_modules/memory-streams/index.js
|
|
85734
|
-
var require_memory_streams = __commonJS((exports, module)
|
|
86246
|
+
var require_memory_streams = __commonJS(function(exports, module) {
|
|
85735
86247
|
exports.ReadableStream = require_ReadableStream();
|
|
85736
86248
|
exports.WritableStream = require_WritableStream();
|
|
85737
86249
|
});
|
|
85738
86250
|
|
|
85739
86251
|
// node_modules/.bun/memorystream@0.3.1/node_modules/memorystream/index.js
|
|
85740
|
-
var require_memorystream = __commonJS((exports, module)
|
|
86252
|
+
var require_memorystream = __commonJS(function(exports, module) {
|
|
85741
86253
|
var STREAM = __require("stream");
|
|
85742
86254
|
var UTIL = __require("util");
|
|
85743
86255
|
var StringDecoder = __require("string_decoder").StringDecoder;
|
|
@@ -85885,7 +86397,7 @@ var require_memorystream = __commonJS((exports, module) => {
|
|
|
85885
86397
|
});
|
|
85886
86398
|
|
|
85887
86399
|
// node_modules/.bun/blessed-contrib@4.11.0/node_modules/blessed-contrib/lib/widget/picture.js
|
|
85888
|
-
var require_picture = __commonJS((exports, module)
|
|
86400
|
+
var require_picture = __commonJS(function(exports, module) {
|
|
85889
86401
|
var blessed = require_blessed();
|
|
85890
86402
|
var Node = blessed.Node;
|
|
85891
86403
|
var Box = blessed.Box;
|
|
@@ -85940,7 +86452,7 @@ var require_picture = __commonJS((exports, module) => {
|
|
|
85940
86452
|
});
|
|
85941
86453
|
|
|
85942
86454
|
// node_modules/.bun/sparkline@0.1.2/node_modules/sparkline/lib/sparkline.js
|
|
85943
|
-
var require_sparkline = __commonJS((exports, module)
|
|
86455
|
+
var require_sparkline = __commonJS(function(exports, module) {
|
|
85944
86456
|
(function(window2) {
|
|
85945
86457
|
var sparkline, ticks = ["▁", "▂", "▃", "▄", "▅", "▆", "▇", "█"];
|
|
85946
86458
|
sparkline = function(numbers, options) {
|
|
@@ -85969,7 +86481,7 @@ var require_sparkline = __commonJS((exports, module) => {
|
|
|
85969
86481
|
});
|
|
85970
86482
|
|
|
85971
86483
|
// node_modules/.bun/blessed-contrib@4.11.0/node_modules/blessed-contrib/lib/widget/sparkline.js
|
|
85972
|
-
var require_sparkline2 = __commonJS((exports, module)
|
|
86484
|
+
var require_sparkline2 = __commonJS(function(exports, module) {
|
|
85973
86485
|
var blessed = require_blessed();
|
|
85974
86486
|
var Node = blessed.Node;
|
|
85975
86487
|
var Box = blessed.Box;
|
|
@@ -86026,14 +86538,14 @@ var require_sparkline2 = __commonJS((exports, module) => {
|
|
|
86026
86538
|
});
|
|
86027
86539
|
|
|
86028
86540
|
// node_modules/.bun/ansi-regex@2.1.1/node_modules/ansi-regex/index.js
|
|
86029
|
-
var require_ansi_regex = __commonJS((exports, module)
|
|
86541
|
+
var require_ansi_regex = __commonJS(function(exports, module) {
|
|
86030
86542
|
module.exports = function() {
|
|
86031
86543
|
return /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g;
|
|
86032
86544
|
};
|
|
86033
86545
|
});
|
|
86034
86546
|
|
|
86035
86547
|
// node_modules/.bun/strip-ansi@3.0.1/node_modules/strip-ansi/index.js
|
|
86036
|
-
var require_strip_ansi = __commonJS((exports, module)
|
|
86548
|
+
var require_strip_ansi = __commonJS(function(exports, module) {
|
|
86037
86549
|
var ansiRegex = require_ansi_regex()();
|
|
86038
86550
|
module.exports = function(str) {
|
|
86039
86551
|
return typeof str === "string" ? str.replace(ansiRegex, "") : str;
|
|
@@ -86041,7 +86553,7 @@ var require_strip_ansi = __commonJS((exports, module) => {
|
|
|
86041
86553
|
});
|
|
86042
86554
|
|
|
86043
86555
|
// node_modules/.bun/blessed-contrib@4.11.0/node_modules/blessed-contrib/lib/widget/table.js
|
|
86044
|
-
var require_table = __commonJS((exports, module)
|
|
86556
|
+
var require_table = __commonJS(function(exports, module) {
|
|
86045
86557
|
var blessed = require_blessed();
|
|
86046
86558
|
var Node = blessed.Node;
|
|
86047
86559
|
var Box = blessed.Box;
|
|
@@ -86157,7 +86669,7 @@ var require_table = __commonJS((exports, module) => {
|
|
|
86157
86669
|
});
|
|
86158
86670
|
|
|
86159
86671
|
// node_modules/.bun/blessed-contrib@4.11.0/node_modules/blessed-contrib/lib/widget/tree.js
|
|
86160
|
-
var require_tree = __commonJS((exports, module)
|
|
86672
|
+
var require_tree = __commonJS(function(exports, module) {
|
|
86161
86673
|
var blessed = require_blessed();
|
|
86162
86674
|
var Node = blessed.Node;
|
|
86163
86675
|
var Box = blessed.Box;
|
|
@@ -86290,7 +86802,7 @@ var require_tree = __commonJS((exports, module) => {
|
|
|
86290
86802
|
});
|
|
86291
86803
|
|
|
86292
86804
|
// node_modules/.bun/marked@4.3.0/node_modules/marked/lib/marked.cjs
|
|
86293
|
-
var require_marked = __commonJS((exports)
|
|
86805
|
+
var require_marked = __commonJS(function(exports) {
|
|
86294
86806
|
function _defineProperties(target, props) {
|
|
86295
86807
|
for (var i = 0;i < props.length; i++) {
|
|
86296
86808
|
var descriptor = props[i];
|
|
@@ -88604,7 +89116,7 @@ Please report this to https://github.com/markedjs/marked.`;
|
|
|
88604
89116
|
});
|
|
88605
89117
|
|
|
88606
89118
|
// node_modules/.bun/esprima@4.0.1/node_modules/esprima/dist/esprima.js
|
|
88607
|
-
var require_esprima = __commonJS((exports, module)
|
|
89119
|
+
var require_esprima = __commonJS(function(exports, module) {
|
|
88608
89120
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
88609
89121
|
if (typeof exports === "object" && typeof module === "object")
|
|
88610
89122
|
module.exports = factory();
|
|
@@ -94744,7 +95256,7 @@ var require_esprima = __commonJS((exports, module) => {
|
|
|
94744
95256
|
});
|
|
94745
95257
|
|
|
94746
95258
|
// node_modules/.bun/redeyed@2.1.1/node_modules/redeyed/redeyed.js
|
|
94747
|
-
var require_redeyed = __commonJS((exports, module)
|
|
95259
|
+
var require_redeyed = __commonJS(function(exports, module) {
|
|
94748
95260
|
(function() {
|
|
94749
95261
|
var esprima;
|
|
94750
95262
|
var exportFn;
|
|
@@ -94793,7 +95305,7 @@ Should be of format "before:after"`);
|
|
|
94793
95305
|
}
|
|
94794
95306
|
}
|
|
94795
95307
|
function objectize(node) {
|
|
94796
|
-
function
|
|
95308
|
+
function resolve3(value, key) {
|
|
94797
95309
|
if (!value._parent)
|
|
94798
95310
|
return;
|
|
94799
95311
|
if (value._parent._default && value._parent._default[key])
|
|
@@ -94816,8 +95328,8 @@ Should be of format "before:after"`);
|
|
|
94816
95328
|
if (isObject(value)) {
|
|
94817
95329
|
if (!value._before && !value._after)
|
|
94818
95330
|
return objectize(value);
|
|
94819
|
-
value._before = value._before ||
|
|
94820
|
-
value._after = value._after ||
|
|
95331
|
+
value._before = value._before || resolve3(value, "_before");
|
|
95332
|
+
value._after = value._after || resolve3(value, "_after");
|
|
94821
95333
|
return;
|
|
94822
95334
|
}
|
|
94823
95335
|
throw new Error("nodes need to be either {String}, {Object} or {Function}." + value + " is neither.");
|
|
@@ -94984,7 +95496,7 @@ Should be of format "before:after"`);
|
|
|
94984
95496
|
});
|
|
94985
95497
|
|
|
94986
95498
|
// node_modules/.bun/ansicolors@0.3.2/node_modules/ansicolors/ansicolors.js
|
|
94987
|
-
var require_ansicolors = __commonJS((exports, module)
|
|
95499
|
+
var require_ansicolors = __commonJS(function(exports, module) {
|
|
94988
95500
|
var colorNums = {
|
|
94989
95501
|
white: 37,
|
|
94990
95502
|
black: 30,
|
|
@@ -95044,7 +95556,7 @@ var require_ansicolors = __commonJS((exports, module) => {
|
|
|
95044
95556
|
});
|
|
95045
95557
|
|
|
95046
95558
|
// node_modules/.bun/cardinal@2.1.1/node_modules/cardinal/themes/default.js
|
|
95047
|
-
var require_default = __commonJS((exports, module)
|
|
95559
|
+
var require_default = __commonJS(function(exports, module) {
|
|
95048
95560
|
var colors = require_ansicolors();
|
|
95049
95561
|
module.exports = {
|
|
95050
95562
|
Boolean: {
|
|
@@ -95216,7 +95728,7 @@ var require_default = __commonJS((exports, module) => {
|
|
|
95216
95728
|
});
|
|
95217
95729
|
|
|
95218
95730
|
// node_modules/.bun/cardinal@2.1.1/node_modules/cardinal/lib/highlight.js
|
|
95219
|
-
var require_highlight = __commonJS((exports, module)
|
|
95731
|
+
var require_highlight = __commonJS(function(exports, module) {
|
|
95220
95732
|
var redeyed = require_redeyed();
|
|
95221
95733
|
var theme = require_default();
|
|
95222
95734
|
var colors = require_ansicolors();
|
|
@@ -95288,7 +95800,7 @@ var require_highlight = __commonJS((exports, module) => {
|
|
|
95288
95800
|
});
|
|
95289
95801
|
|
|
95290
95802
|
// node_modules/.bun/cardinal@2.1.1/node_modules/cardinal/lib/highlightFile.js
|
|
95291
|
-
var require_highlightFile = __commonJS((exports, module)
|
|
95803
|
+
var require_highlightFile = __commonJS(function(exports, module) {
|
|
95292
95804
|
var fs = __require("fs");
|
|
95293
95805
|
var highlight = require_highlight();
|
|
95294
95806
|
function isFunction(obj) {
|
|
@@ -95313,7 +95825,7 @@ var require_highlightFile = __commonJS((exports, module) => {
|
|
|
95313
95825
|
});
|
|
95314
95826
|
|
|
95315
95827
|
// node_modules/.bun/cardinal@2.1.1/node_modules/cardinal/lib/highlightFileSync.js
|
|
95316
|
-
var require_highlightFileSync = __commonJS((exports, module)
|
|
95828
|
+
var require_highlightFileSync = __commonJS(function(exports, module) {
|
|
95317
95829
|
var fs = __require("fs");
|
|
95318
95830
|
var highlight = require_highlight();
|
|
95319
95831
|
module.exports = function highlightFileSync(fullPath, opts) {
|
|
@@ -95324,7 +95836,7 @@ var require_highlightFileSync = __commonJS((exports, module) => {
|
|
|
95324
95836
|
});
|
|
95325
95837
|
|
|
95326
95838
|
// node_modules/.bun/cardinal@2.1.1/node_modules/cardinal/cardinal.js
|
|
95327
|
-
var require_cardinal = __commonJS((exports, module)
|
|
95839
|
+
var require_cardinal = __commonJS(function(exports, module) {
|
|
95328
95840
|
module.exports = {
|
|
95329
95841
|
highlight: require_highlight(),
|
|
95330
95842
|
highlightFile: require_highlightFile(),
|
|
@@ -95333,13 +95845,13 @@ var require_cardinal = __commonJS((exports, module) => {
|
|
|
95333
95845
|
});
|
|
95334
95846
|
|
|
95335
95847
|
// node_modules/.bun/lodash@4.17.21/node_modules/lodash/_freeGlobal.js
|
|
95336
|
-
var require__freeGlobal = __commonJS((exports, module)
|
|
95848
|
+
var require__freeGlobal = __commonJS(function(exports, module) {
|
|
95337
95849
|
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
|
|
95338
95850
|
module.exports = freeGlobal;
|
|
95339
95851
|
});
|
|
95340
95852
|
|
|
95341
95853
|
// node_modules/.bun/lodash@4.17.21/node_modules/lodash/_root.js
|
|
95342
|
-
var require__root = __commonJS((exports, module)
|
|
95854
|
+
var require__root = __commonJS(function(exports, module) {
|
|
95343
95855
|
var freeGlobal = require__freeGlobal();
|
|
95344
95856
|
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
|
|
95345
95857
|
var root = freeGlobal || freeSelf || Function("return this")();
|
|
@@ -95347,14 +95859,14 @@ var require__root = __commonJS((exports, module) => {
|
|
|
95347
95859
|
});
|
|
95348
95860
|
|
|
95349
95861
|
// node_modules/.bun/lodash@4.17.21/node_modules/lodash/_Symbol.js
|
|
95350
|
-
var require__Symbol = __commonJS((exports, module)
|
|
95862
|
+
var require__Symbol = __commonJS(function(exports, module) {
|
|
95351
95863
|
var root = require__root();
|
|
95352
95864
|
var Symbol2 = root.Symbol;
|
|
95353
95865
|
module.exports = Symbol2;
|
|
95354
95866
|
});
|
|
95355
95867
|
|
|
95356
95868
|
// node_modules/.bun/lodash@4.17.21/node_modules/lodash/_copyArray.js
|
|
95357
|
-
var require__copyArray = __commonJS((exports, module)
|
|
95869
|
+
var require__copyArray = __commonJS(function(exports, module) {
|
|
95358
95870
|
function copyArray(source, array) {
|
|
95359
95871
|
var index = -1, length = source.length;
|
|
95360
95872
|
array || (array = Array(length));
|
|
@@ -95367,7 +95879,7 @@ var require__copyArray = __commonJS((exports, module) => {
|
|
|
95367
95879
|
});
|
|
95368
95880
|
|
|
95369
95881
|
// node_modules/.bun/lodash@4.17.21/node_modules/lodash/_getRawTag.js
|
|
95370
|
-
var require__getRawTag = __commonJS((exports, module)
|
|
95882
|
+
var require__getRawTag = __commonJS(function(exports, module) {
|
|
95371
95883
|
var Symbol2 = require__Symbol();
|
|
95372
95884
|
var objectProto = Object.prototype;
|
|
95373
95885
|
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
@@ -95393,7 +95905,7 @@ var require__getRawTag = __commonJS((exports, module) => {
|
|
|
95393
95905
|
});
|
|
95394
95906
|
|
|
95395
95907
|
// node_modules/.bun/lodash@4.17.21/node_modules/lodash/_objectToString.js
|
|
95396
|
-
var require__objectToString = __commonJS((exports, module)
|
|
95908
|
+
var require__objectToString = __commonJS(function(exports, module) {
|
|
95397
95909
|
var objectProto = Object.prototype;
|
|
95398
95910
|
var nativeObjectToString = objectProto.toString;
|
|
95399
95911
|
function objectToString(value) {
|
|
@@ -95403,7 +95915,7 @@ var require__objectToString = __commonJS((exports, module) => {
|
|
|
95403
95915
|
});
|
|
95404
95916
|
|
|
95405
95917
|
// node_modules/.bun/lodash@4.17.21/node_modules/lodash/_baseGetTag.js
|
|
95406
|
-
var require__baseGetTag = __commonJS((exports, module)
|
|
95918
|
+
var require__baseGetTag = __commonJS(function(exports, module) {
|
|
95407
95919
|
var Symbol2 = require__Symbol();
|
|
95408
95920
|
var getRawTag = require__getRawTag();
|
|
95409
95921
|
var objectToString = require__objectToString();
|
|
@@ -95420,7 +95932,7 @@ var require__baseGetTag = __commonJS((exports, module) => {
|
|
|
95420
95932
|
});
|
|
95421
95933
|
|
|
95422
95934
|
// node_modules/.bun/lodash@4.17.21/node_modules/lodash/isObject.js
|
|
95423
|
-
var require_isObject = __commonJS((exports, module)
|
|
95935
|
+
var require_isObject = __commonJS(function(exports, module) {
|
|
95424
95936
|
function isObject(value) {
|
|
95425
95937
|
var type = typeof value;
|
|
95426
95938
|
return value != null && (type == "object" || type == "function");
|
|
@@ -95429,7 +95941,7 @@ var require_isObject = __commonJS((exports, module) => {
|
|
|
95429
95941
|
});
|
|
95430
95942
|
|
|
95431
95943
|
// node_modules/.bun/lodash@4.17.21/node_modules/lodash/isFunction.js
|
|
95432
|
-
var require_isFunction = __commonJS((exports, module)
|
|
95944
|
+
var require_isFunction = __commonJS(function(exports, module) {
|
|
95433
95945
|
var baseGetTag = require__baseGetTag();
|
|
95434
95946
|
var isObject = require_isObject();
|
|
95435
95947
|
var asyncTag = "[object AsyncFunction]";
|
|
@@ -95447,14 +95959,14 @@ var require_isFunction = __commonJS((exports, module) => {
|
|
|
95447
95959
|
});
|
|
95448
95960
|
|
|
95449
95961
|
// node_modules/.bun/lodash@4.17.21/node_modules/lodash/_coreJsData.js
|
|
95450
|
-
var require__coreJsData = __commonJS((exports, module)
|
|
95962
|
+
var require__coreJsData = __commonJS(function(exports, module) {
|
|
95451
95963
|
var root = require__root();
|
|
95452
95964
|
var coreJsData = root["__core-js_shared__"];
|
|
95453
95965
|
module.exports = coreJsData;
|
|
95454
95966
|
});
|
|
95455
95967
|
|
|
95456
95968
|
// node_modules/.bun/lodash@4.17.21/node_modules/lodash/_isMasked.js
|
|
95457
|
-
var require__isMasked = __commonJS((exports, module)
|
|
95969
|
+
var require__isMasked = __commonJS(function(exports, module) {
|
|
95458
95970
|
var coreJsData = require__coreJsData();
|
|
95459
95971
|
var maskSrcKey = function() {
|
|
95460
95972
|
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
|
|
@@ -95467,7 +95979,7 @@ var require__isMasked = __commonJS((exports, module) => {
|
|
|
95467
95979
|
});
|
|
95468
95980
|
|
|
95469
95981
|
// node_modules/.bun/lodash@4.17.21/node_modules/lodash/_toSource.js
|
|
95470
|
-
var require__toSource = __commonJS((exports, module)
|
|
95982
|
+
var require__toSource = __commonJS(function(exports, module) {
|
|
95471
95983
|
var funcProto = Function.prototype;
|
|
95472
95984
|
var funcToString = funcProto.toString;
|
|
95473
95985
|
function toSource(func) {
|
|
@@ -95485,7 +95997,7 @@ var require__toSource = __commonJS((exports, module) => {
|
|
|
95485
95997
|
});
|
|
95486
95998
|
|
|
95487
95999
|
// node_modules/.bun/lodash@4.17.21/node_modules/lodash/_baseIsNative.js
|
|
95488
|
-
var require__baseIsNative = __commonJS((exports, module)
|
|
96000
|
+
var require__baseIsNative = __commonJS(function(exports, module) {
|
|
95489
96001
|
var isFunction = require_isFunction();
|
|
95490
96002
|
var isMasked = require__isMasked();
|
|
95491
96003
|
var isObject = require_isObject();
|
|
@@ -95508,7 +96020,7 @@ var require__baseIsNative = __commonJS((exports, module) => {
|
|
|
95508
96020
|
});
|
|
95509
96021
|
|
|
95510
96022
|
// node_modules/.bun/lodash@4.17.21/node_modules/lodash/_getValue.js
|
|
95511
|
-
var require__getValue = __commonJS((exports, module)
|
|
96023
|
+
var require__getValue = __commonJS(function(exports, module) {
|
|
95512
96024
|
function getValue(object, key) {
|
|
95513
96025
|
return object == null ? undefined : object[key];
|
|
95514
96026
|
}
|
|
@@ -95516,7 +96028,7 @@ var require__getValue = __commonJS((exports, module) => {
|
|
|
95516
96028
|
});
|
|
95517
96029
|
|
|
95518
96030
|
// node_modules/.bun/lodash@4.17.21/node_modules/lodash/_getNative.js
|
|
95519
|
-
var require__getNative = __commonJS((exports, module)
|
|
96031
|
+
var require__getNative = __commonJS(function(exports, module) {
|
|
95520
96032
|
var baseIsNative = require__baseIsNative();
|
|
95521
96033
|
var getValue = require__getValue();
|
|
95522
96034
|
function getNative(object, key) {
|
|
@@ -95527,7 +96039,7 @@ var require__getNative = __commonJS((exports, module) => {
|
|
|
95527
96039
|
});
|
|
95528
96040
|
|
|
95529
96041
|
// node_modules/.bun/lodash@4.17.21/node_modules/lodash/_DataView.js
|
|
95530
|
-
var require__DataView = __commonJS((exports, module)
|
|
96042
|
+
var require__DataView = __commonJS(function(exports, module) {
|
|
95531
96043
|
var getNative = require__getNative();
|
|
95532
96044
|
var root = require__root();
|
|
95533
96045
|
var DataView = getNative(root, "DataView");
|
|
@@ -95535,7 +96047,7 @@ var require__DataView = __commonJS((exports, module) => {
|
|
|
95535
96047
|
});
|
|
95536
96048
|
|
|
95537
96049
|
// node_modules/.bun/lodash@4.17.21/node_modules/lodash/_Map.js
|
|
95538
|
-
var require__Map = __commonJS((exports, module)
|
|
96050
|
+
var require__Map = __commonJS(function(exports, module) {
|
|
95539
96051
|
var getNative = require__getNative();
|
|
95540
96052
|
var root = require__root();
|
|
95541
96053
|
var Map2 = getNative(root, "Map");
|
|
@@ -95543,7 +96055,7 @@ var require__Map = __commonJS((exports, module) => {
|
|
|
95543
96055
|
});
|
|
95544
96056
|
|
|
95545
96057
|
// node_modules/.bun/lodash@4.17.21/node_modules/lodash/_Promise.js
|
|
95546
|
-
var require__Promise = __commonJS((exports, module)
|
|
96058
|
+
var require__Promise = __commonJS(function(exports, module) {
|
|
95547
96059
|
var getNative = require__getNative();
|
|
95548
96060
|
var root = require__root();
|
|
95549
96061
|
var Promise2 = getNative(root, "Promise");
|
|
@@ -95551,7 +96063,7 @@ var require__Promise = __commonJS((exports, module) => {
|
|
|
95551
96063
|
});
|
|
95552
96064
|
|
|
95553
96065
|
// node_modules/.bun/lodash@4.17.21/node_modules/lodash/_Set.js
|
|
95554
|
-
var require__Set = __commonJS((exports, module)
|
|
96066
|
+
var require__Set = __commonJS(function(exports, module) {
|
|
95555
96067
|
var getNative = require__getNative();
|
|
95556
96068
|
var root = require__root();
|
|
95557
96069
|
var Set2 = getNative(root, "Set");
|
|
@@ -95559,7 +96071,7 @@ var require__Set = __commonJS((exports, module) => {
|
|
|
95559
96071
|
});
|
|
95560
96072
|
|
|
95561
96073
|
// node_modules/.bun/lodash@4.17.21/node_modules/lodash/_WeakMap.js
|
|
95562
|
-
var require__WeakMap = __commonJS((exports, module)
|
|
96074
|
+
var require__WeakMap = __commonJS(function(exports, module) {
|
|
95563
96075
|
var getNative = require__getNative();
|
|
95564
96076
|
var root = require__root();
|
|
95565
96077
|
var WeakMap2 = getNative(root, "WeakMap");
|
|
@@ -95567,7 +96079,7 @@ var require__WeakMap = __commonJS((exports, module) => {
|
|
|
95567
96079
|
});
|
|
95568
96080
|
|
|
95569
96081
|
// node_modules/.bun/lodash@4.17.21/node_modules/lodash/_getTag.js
|
|
95570
|
-
var require__getTag = __commonJS((exports, module)
|
|
96082
|
+
var require__getTag = __commonJS(function(exports, module) {
|
|
95571
96083
|
var DataView = require__DataView();
|
|
95572
96084
|
var Map2 = require__Map();
|
|
95573
96085
|
var Promise2 = require__Promise();
|
|
@@ -95611,7 +96123,7 @@ var require__getTag = __commonJS((exports, module) => {
|
|
|
95611
96123
|
});
|
|
95612
96124
|
|
|
95613
96125
|
// node_modules/.bun/lodash@4.17.21/node_modules/lodash/isLength.js
|
|
95614
|
-
var require_isLength = __commonJS((exports, module)
|
|
96126
|
+
var require_isLength = __commonJS(function(exports, module) {
|
|
95615
96127
|
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
95616
96128
|
function isLength(value) {
|
|
95617
96129
|
return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
|
@@ -95620,7 +96132,7 @@ var require_isLength = __commonJS((exports, module) => {
|
|
|
95620
96132
|
});
|
|
95621
96133
|
|
|
95622
96134
|
// node_modules/.bun/lodash@4.17.21/node_modules/lodash/isArrayLike.js
|
|
95623
|
-
var require_isArrayLike = __commonJS((exports, module)
|
|
96135
|
+
var require_isArrayLike = __commonJS(function(exports, module) {
|
|
95624
96136
|
var isFunction = require_isFunction();
|
|
95625
96137
|
var isLength = require_isLength();
|
|
95626
96138
|
function isArrayLike(value) {
|
|
@@ -95630,13 +96142,13 @@ var require_isArrayLike = __commonJS((exports, module) => {
|
|
|
95630
96142
|
});
|
|
95631
96143
|
|
|
95632
96144
|
// node_modules/.bun/lodash@4.17.21/node_modules/lodash/isArray.js
|
|
95633
|
-
var require_isArray = __commonJS((exports, module)
|
|
96145
|
+
var require_isArray = __commonJS(function(exports, module) {
|
|
95634
96146
|
var isArray = Array.isArray;
|
|
95635
96147
|
module.exports = isArray;
|
|
95636
96148
|
});
|
|
95637
96149
|
|
|
95638
96150
|
// node_modules/.bun/lodash@4.17.21/node_modules/lodash/isObjectLike.js
|
|
95639
|
-
var require_isObjectLike = __commonJS((exports, module)
|
|
96151
|
+
var require_isObjectLike = __commonJS(function(exports, module) {
|
|
95640
96152
|
function isObjectLike(value) {
|
|
95641
96153
|
return value != null && typeof value == "object";
|
|
95642
96154
|
}
|
|
@@ -95644,7 +96156,7 @@ var require_isObjectLike = __commonJS((exports, module) => {
|
|
|
95644
96156
|
});
|
|
95645
96157
|
|
|
95646
96158
|
// node_modules/.bun/lodash@4.17.21/node_modules/lodash/isString.js
|
|
95647
|
-
var require_isString = __commonJS((exports, module)
|
|
96159
|
+
var require_isString = __commonJS(function(exports, module) {
|
|
95648
96160
|
var baseGetTag = require__baseGetTag();
|
|
95649
96161
|
var isArray = require_isArray();
|
|
95650
96162
|
var isObjectLike = require_isObjectLike();
|
|
@@ -95656,7 +96168,7 @@ var require_isString = __commonJS((exports, module) => {
|
|
|
95656
96168
|
});
|
|
95657
96169
|
|
|
95658
96170
|
// node_modules/.bun/lodash@4.17.21/node_modules/lodash/_iteratorToArray.js
|
|
95659
|
-
var require__iteratorToArray = __commonJS((exports, module)
|
|
96171
|
+
var require__iteratorToArray = __commonJS(function(exports, module) {
|
|
95660
96172
|
function iteratorToArray(iterator) {
|
|
95661
96173
|
var data, result = [];
|
|
95662
96174
|
while (!(data = iterator.next()).done) {
|
|
@@ -95668,7 +96180,7 @@ var require__iteratorToArray = __commonJS((exports, module) => {
|
|
|
95668
96180
|
});
|
|
95669
96181
|
|
|
95670
96182
|
// node_modules/.bun/lodash@4.17.21/node_modules/lodash/_mapToArray.js
|
|
95671
|
-
var require__mapToArray = __commonJS((exports, module)
|
|
96183
|
+
var require__mapToArray = __commonJS(function(exports, module) {
|
|
95672
96184
|
function mapToArray(map) {
|
|
95673
96185
|
var index = -1, result = Array(map.size);
|
|
95674
96186
|
map.forEach(function(value, key) {
|
|
@@ -95680,7 +96192,7 @@ var require__mapToArray = __commonJS((exports, module) => {
|
|
|
95680
96192
|
});
|
|
95681
96193
|
|
|
95682
96194
|
// node_modules/.bun/lodash@4.17.21/node_modules/lodash/_setToArray.js
|
|
95683
|
-
var require__setToArray = __commonJS((exports, module)
|
|
96195
|
+
var require__setToArray = __commonJS(function(exports, module) {
|
|
95684
96196
|
function setToArray(set) {
|
|
95685
96197
|
var index = -1, result = Array(set.size);
|
|
95686
96198
|
set.forEach(function(value) {
|
|
@@ -95692,7 +96204,7 @@ var require__setToArray = __commonJS((exports, module) => {
|
|
|
95692
96204
|
});
|
|
95693
96205
|
|
|
95694
96206
|
// node_modules/.bun/lodash@4.17.21/node_modules/lodash/_asciiToArray.js
|
|
95695
|
-
var require__asciiToArray = __commonJS((exports, module)
|
|
96207
|
+
var require__asciiToArray = __commonJS(function(exports, module) {
|
|
95696
96208
|
function asciiToArray(string) {
|
|
95697
96209
|
return string.split("");
|
|
95698
96210
|
}
|
|
@@ -95700,7 +96212,7 @@ var require__asciiToArray = __commonJS((exports, module) => {
|
|
|
95700
96212
|
});
|
|
95701
96213
|
|
|
95702
96214
|
// node_modules/.bun/lodash@4.17.21/node_modules/lodash/_hasUnicode.js
|
|
95703
|
-
var require__hasUnicode = __commonJS((exports, module)
|
|
96215
|
+
var require__hasUnicode = __commonJS(function(exports, module) {
|
|
95704
96216
|
var rsAstralRange = "\\ud800-\\udfff";
|
|
95705
96217
|
var rsComboMarksRange = "\\u0300-\\u036f";
|
|
95706
96218
|
var reComboHalfMarksRange = "\\ufe20-\\ufe2f";
|
|
@@ -95716,7 +96228,7 @@ var require__hasUnicode = __commonJS((exports, module) => {
|
|
|
95716
96228
|
});
|
|
95717
96229
|
|
|
95718
96230
|
// node_modules/.bun/lodash@4.17.21/node_modules/lodash/_unicodeToArray.js
|
|
95719
|
-
var require__unicodeToArray = __commonJS((exports, module)
|
|
96231
|
+
var require__unicodeToArray = __commonJS(function(exports, module) {
|
|
95720
96232
|
var rsAstralRange = "\\ud800-\\udfff";
|
|
95721
96233
|
var rsComboMarksRange = "\\u0300-\\u036f";
|
|
95722
96234
|
var reComboHalfMarksRange = "\\ufe20-\\ufe2f";
|
|
@@ -95744,7 +96256,7 @@ var require__unicodeToArray = __commonJS((exports, module) => {
|
|
|
95744
96256
|
});
|
|
95745
96257
|
|
|
95746
96258
|
// node_modules/.bun/lodash@4.17.21/node_modules/lodash/_stringToArray.js
|
|
95747
|
-
var require__stringToArray = __commonJS((exports, module)
|
|
96259
|
+
var require__stringToArray = __commonJS(function(exports, module) {
|
|
95748
96260
|
var asciiToArray = require__asciiToArray();
|
|
95749
96261
|
var hasUnicode = require__hasUnicode();
|
|
95750
96262
|
var unicodeToArray = require__unicodeToArray();
|
|
@@ -95755,7 +96267,7 @@ var require__stringToArray = __commonJS((exports, module) => {
|
|
|
95755
96267
|
});
|
|
95756
96268
|
|
|
95757
96269
|
// node_modules/.bun/lodash@4.17.21/node_modules/lodash/_arrayMap.js
|
|
95758
|
-
var require__arrayMap = __commonJS((exports, module)
|
|
96270
|
+
var require__arrayMap = __commonJS(function(exports, module) {
|
|
95759
96271
|
function arrayMap(array, iteratee) {
|
|
95760
96272
|
var index = -1, length = array == null ? 0 : array.length, result = Array(length);
|
|
95761
96273
|
while (++index < length) {
|
|
@@ -95767,7 +96279,7 @@ var require__arrayMap = __commonJS((exports, module) => {
|
|
|
95767
96279
|
});
|
|
95768
96280
|
|
|
95769
96281
|
// node_modules/.bun/lodash@4.17.21/node_modules/lodash/_baseValues.js
|
|
95770
|
-
var require__baseValues = __commonJS((exports, module)
|
|
96282
|
+
var require__baseValues = __commonJS(function(exports, module) {
|
|
95771
96283
|
var arrayMap = require__arrayMap();
|
|
95772
96284
|
function baseValues(object, props) {
|
|
95773
96285
|
return arrayMap(props, function(key) {
|
|
@@ -95778,7 +96290,7 @@ var require__baseValues = __commonJS((exports, module) => {
|
|
|
95778
96290
|
});
|
|
95779
96291
|
|
|
95780
96292
|
// node_modules/.bun/lodash@4.17.21/node_modules/lodash/_baseTimes.js
|
|
95781
|
-
var require__baseTimes = __commonJS((exports, module)
|
|
96293
|
+
var require__baseTimes = __commonJS(function(exports, module) {
|
|
95782
96294
|
function baseTimes(n, iteratee) {
|
|
95783
96295
|
var index = -1, result = Array(n);
|
|
95784
96296
|
while (++index < n) {
|
|
@@ -95790,7 +96302,7 @@ var require__baseTimes = __commonJS((exports, module) => {
|
|
|
95790
96302
|
});
|
|
95791
96303
|
|
|
95792
96304
|
// node_modules/.bun/lodash@4.17.21/node_modules/lodash/_baseIsArguments.js
|
|
95793
|
-
var require__baseIsArguments = __commonJS((exports, module)
|
|
96305
|
+
var require__baseIsArguments = __commonJS(function(exports, module) {
|
|
95794
96306
|
var baseGetTag = require__baseGetTag();
|
|
95795
96307
|
var isObjectLike = require_isObjectLike();
|
|
95796
96308
|
var argsTag = "[object Arguments]";
|
|
@@ -95801,7 +96313,7 @@ var require__baseIsArguments = __commonJS((exports, module) => {
|
|
|
95801
96313
|
});
|
|
95802
96314
|
|
|
95803
96315
|
// node_modules/.bun/lodash@4.17.21/node_modules/lodash/isArguments.js
|
|
95804
|
-
var require_isArguments = __commonJS((exports, module)
|
|
96316
|
+
var require_isArguments = __commonJS(function(exports, module) {
|
|
95805
96317
|
var baseIsArguments = require__baseIsArguments();
|
|
95806
96318
|
var isObjectLike = require_isObjectLike();
|
|
95807
96319
|
var objectProto = Object.prototype;
|
|
@@ -95816,7 +96328,7 @@ var require_isArguments = __commonJS((exports, module) => {
|
|
|
95816
96328
|
});
|
|
95817
96329
|
|
|
95818
96330
|
// node_modules/.bun/lodash@4.17.21/node_modules/lodash/stubFalse.js
|
|
95819
|
-
var require_stubFalse = __commonJS((exports, module)
|
|
96331
|
+
var require_stubFalse = __commonJS(function(exports, module) {
|
|
95820
96332
|
function stubFalse() {
|
|
95821
96333
|
return false;
|
|
95822
96334
|
}
|
|
@@ -95824,7 +96336,7 @@ var require_stubFalse = __commonJS((exports, module) => {
|
|
|
95824
96336
|
});
|
|
95825
96337
|
|
|
95826
96338
|
// node_modules/.bun/lodash@4.17.21/node_modules/lodash/isBuffer.js
|
|
95827
|
-
var require_isBuffer = __commonJS((exports, module)
|
|
96339
|
+
var require_isBuffer = __commonJS(function(exports, module) {
|
|
95828
96340
|
var root = require__root();
|
|
95829
96341
|
var stubFalse = require_stubFalse();
|
|
95830
96342
|
var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
|
|
@@ -95837,7 +96349,7 @@ var require_isBuffer = __commonJS((exports, module) => {
|
|
|
95837
96349
|
});
|
|
95838
96350
|
|
|
95839
96351
|
// node_modules/.bun/lodash@4.17.21/node_modules/lodash/_isIndex.js
|
|
95840
|
-
var require__isIndex = __commonJS((exports, module)
|
|
96352
|
+
var require__isIndex = __commonJS(function(exports, module) {
|
|
95841
96353
|
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
95842
96354
|
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
|
95843
96355
|
function isIndex(value, length) {
|
|
@@ -95849,7 +96361,7 @@ var require__isIndex = __commonJS((exports, module) => {
|
|
|
95849
96361
|
});
|
|
95850
96362
|
|
|
95851
96363
|
// node_modules/.bun/lodash@4.17.21/node_modules/lodash/_baseIsTypedArray.js
|
|
95852
|
-
var require__baseIsTypedArray = __commonJS((exports, module)
|
|
96364
|
+
var require__baseIsTypedArray = __commonJS(function(exports, module) {
|
|
95853
96365
|
var baseGetTag = require__baseGetTag();
|
|
95854
96366
|
var isLength = require_isLength();
|
|
95855
96367
|
var isObjectLike = require_isObjectLike();
|
|
@@ -95887,7 +96399,7 @@ var require__baseIsTypedArray = __commonJS((exports, module) => {
|
|
|
95887
96399
|
});
|
|
95888
96400
|
|
|
95889
96401
|
// node_modules/.bun/lodash@4.17.21/node_modules/lodash/_baseUnary.js
|
|
95890
|
-
var require__baseUnary = __commonJS((exports, module)
|
|
96402
|
+
var require__baseUnary = __commonJS(function(exports, module) {
|
|
95891
96403
|
function baseUnary(func) {
|
|
95892
96404
|
return function(value) {
|
|
95893
96405
|
return func(value);
|
|
@@ -95897,7 +96409,7 @@ var require__baseUnary = __commonJS((exports, module) => {
|
|
|
95897
96409
|
});
|
|
95898
96410
|
|
|
95899
96411
|
// node_modules/.bun/lodash@4.17.21/node_modules/lodash/_nodeUtil.js
|
|
95900
|
-
var require__nodeUtil = __commonJS((exports, module)
|
|
96412
|
+
var require__nodeUtil = __commonJS(function(exports, module) {
|
|
95901
96413
|
var freeGlobal = require__freeGlobal();
|
|
95902
96414
|
var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
|
|
95903
96415
|
var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
|
|
@@ -95916,7 +96428,7 @@ var require__nodeUtil = __commonJS((exports, module) => {
|
|
|
95916
96428
|
});
|
|
95917
96429
|
|
|
95918
96430
|
// node_modules/.bun/lodash@4.17.21/node_modules/lodash/isTypedArray.js
|
|
95919
|
-
var require_isTypedArray = __commonJS((exports, module)
|
|
96431
|
+
var require_isTypedArray = __commonJS(function(exports, module) {
|
|
95920
96432
|
var baseIsTypedArray = require__baseIsTypedArray();
|
|
95921
96433
|
var baseUnary = require__baseUnary();
|
|
95922
96434
|
var nodeUtil = require__nodeUtil();
|
|
@@ -95926,7 +96438,7 @@ var require_isTypedArray = __commonJS((exports, module) => {
|
|
|
95926
96438
|
});
|
|
95927
96439
|
|
|
95928
96440
|
// node_modules/.bun/lodash@4.17.21/node_modules/lodash/_arrayLikeKeys.js
|
|
95929
|
-
var require__arrayLikeKeys = __commonJS((exports, module)
|
|
96441
|
+
var require__arrayLikeKeys = __commonJS(function(exports, module) {
|
|
95930
96442
|
var baseTimes = require__baseTimes();
|
|
95931
96443
|
var isArguments = require_isArguments();
|
|
95932
96444
|
var isArray = require_isArray();
|
|
@@ -95948,7 +96460,7 @@ var require__arrayLikeKeys = __commonJS((exports, module) => {
|
|
|
95948
96460
|
});
|
|
95949
96461
|
|
|
95950
96462
|
// node_modules/.bun/lodash@4.17.21/node_modules/lodash/_isPrototype.js
|
|
95951
|
-
var require__isPrototype = __commonJS((exports, module)
|
|
96463
|
+
var require__isPrototype = __commonJS(function(exports, module) {
|
|
95952
96464
|
var objectProto = Object.prototype;
|
|
95953
96465
|
function isPrototype(value) {
|
|
95954
96466
|
var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto;
|
|
@@ -95958,7 +96470,7 @@ var require__isPrototype = __commonJS((exports, module) => {
|
|
|
95958
96470
|
});
|
|
95959
96471
|
|
|
95960
96472
|
// node_modules/.bun/lodash@4.17.21/node_modules/lodash/_overArg.js
|
|
95961
|
-
var require__overArg = __commonJS((exports, module)
|
|
96473
|
+
var require__overArg = __commonJS(function(exports, module) {
|
|
95962
96474
|
function overArg(func, transform) {
|
|
95963
96475
|
return function(arg) {
|
|
95964
96476
|
return func(transform(arg));
|
|
@@ -95968,14 +96480,14 @@ var require__overArg = __commonJS((exports, module) => {
|
|
|
95968
96480
|
});
|
|
95969
96481
|
|
|
95970
96482
|
// node_modules/.bun/lodash@4.17.21/node_modules/lodash/_nativeKeys.js
|
|
95971
|
-
var require__nativeKeys = __commonJS((exports, module)
|
|
96483
|
+
var require__nativeKeys = __commonJS(function(exports, module) {
|
|
95972
96484
|
var overArg = require__overArg();
|
|
95973
96485
|
var nativeKeys = overArg(Object.keys, Object);
|
|
95974
96486
|
module.exports = nativeKeys;
|
|
95975
96487
|
});
|
|
95976
96488
|
|
|
95977
96489
|
// node_modules/.bun/lodash@4.17.21/node_modules/lodash/_baseKeys.js
|
|
95978
|
-
var require__baseKeys = __commonJS((exports, module)
|
|
96490
|
+
var require__baseKeys = __commonJS(function(exports, module) {
|
|
95979
96491
|
var isPrototype = require__isPrototype();
|
|
95980
96492
|
var nativeKeys = require__nativeKeys();
|
|
95981
96493
|
var objectProto = Object.prototype;
|
|
@@ -95996,7 +96508,7 @@ var require__baseKeys = __commonJS((exports, module) => {
|
|
|
95996
96508
|
});
|
|
95997
96509
|
|
|
95998
96510
|
// node_modules/.bun/lodash@4.17.21/node_modules/lodash/keys.js
|
|
95999
|
-
var require_keys2 = __commonJS((exports, module)
|
|
96511
|
+
var require_keys2 = __commonJS(function(exports, module) {
|
|
96000
96512
|
var arrayLikeKeys = require__arrayLikeKeys();
|
|
96001
96513
|
var baseKeys = require__baseKeys();
|
|
96002
96514
|
var isArrayLike = require_isArrayLike();
|
|
@@ -96007,7 +96519,7 @@ var require_keys2 = __commonJS((exports, module) => {
|
|
|
96007
96519
|
});
|
|
96008
96520
|
|
|
96009
96521
|
// node_modules/.bun/lodash@4.17.21/node_modules/lodash/values.js
|
|
96010
|
-
var require_values = __commonJS((exports, module)
|
|
96522
|
+
var require_values = __commonJS(function(exports, module) {
|
|
96011
96523
|
var baseValues = require__baseValues();
|
|
96012
96524
|
var keys = require_keys2();
|
|
96013
96525
|
function values(object) {
|
|
@@ -96017,7 +96529,7 @@ var require_values = __commonJS((exports, module) => {
|
|
|
96017
96529
|
});
|
|
96018
96530
|
|
|
96019
96531
|
// node_modules/.bun/lodash@4.17.21/node_modules/lodash/toArray.js
|
|
96020
|
-
var require_toArray = __commonJS((exports, module)
|
|
96532
|
+
var require_toArray = __commonJS(function(exports, module) {
|
|
96021
96533
|
var Symbol2 = require__Symbol();
|
|
96022
96534
|
var copyArray = require__copyArray();
|
|
96023
96535
|
var getTag = require__getTag();
|
|
@@ -96048,12 +96560,12 @@ var require_toArray = __commonJS((exports, module) => {
|
|
|
96048
96560
|
});
|
|
96049
96561
|
|
|
96050
96562
|
// node_modules/.bun/node-emoji@1.11.0/node_modules/node-emoji/lib/emoji.json
|
|
96051
|
-
var require_emoji = __commonJS((exports, module)
|
|
96563
|
+
var require_emoji = __commonJS(function(exports, module) {
|
|
96052
96564
|
module.exports = { "100": "💯", "1234": "🔢", umbrella_with_rain_drops: "☔", coffee: "☕", aries: "♈", taurus: "♉", sagittarius: "♐", capricorn: "♑", aquarius: "♒", pisces: "♓", anchor: "⚓", white_check_mark: "✅", sparkles: "✨", question: "❓", grey_question: "❔", grey_exclamation: "❕", exclamation: "❗", heavy_exclamation_mark: "❗", heavy_plus_sign: "➕", heavy_minus_sign: "➖", heavy_division_sign: "➗", hash: "#️⃣", keycap_star: "*️⃣", zero: "0️⃣", one: "1️⃣", two: "2️⃣", three: "3️⃣", four: "4️⃣", five: "5️⃣", six: "6️⃣", seven: "7️⃣", eight: "8️⃣", nine: "9️⃣", copyright: "©️", registered: "®️", mahjong: "🀄", black_joker: "🃏", a: "🅰️", b: "🅱️", o2: "🅾️", parking: "🅿️", ab: "🆎", cl: "🆑", cool: "🆒", free: "🆓", id: "🆔", new: "🆕", ng: "🆖", ok: "🆗", sos: "🆘", up: "🆙", vs: "🆚", "flag-ac": "🇦🇨", "flag-ad": "🇦🇩", "flag-ae": "🇦🇪", "flag-af": "🇦🇫", "flag-ag": "🇦🇬", "flag-ai": "🇦🇮", "flag-al": "🇦🇱", "flag-am": "🇦🇲", "flag-ao": "🇦🇴", "flag-aq": "🇦🇶", "flag-ar": "🇦🇷", "flag-as": "🇦🇸", "flag-at": "🇦🇹", "flag-au": "🇦🇺", "flag-aw": "🇦🇼", "flag-ax": "🇦🇽", "flag-az": "🇦🇿", "flag-ba": "🇧🇦", "flag-bb": "🇧🇧", "flag-bd": "🇧🇩", "flag-be": "🇧🇪", "flag-bf": "🇧🇫", "flag-bg": "🇧🇬", "flag-bh": "🇧🇭", "flag-bi": "🇧🇮", "flag-bj": "🇧🇯", "flag-bl": "🇧🇱", "flag-bm": "🇧🇲", "flag-bn": "🇧🇳", "flag-bo": "🇧🇴", "flag-bq": "🇧🇶", "flag-br": "🇧🇷", "flag-bs": "🇧🇸", "flag-bt": "🇧🇹", "flag-bv": "🇧🇻", "flag-bw": "🇧🇼", "flag-by": "🇧🇾", "flag-bz": "🇧🇿", "flag-ca": "🇨🇦", "flag-cc": "🇨🇨", "flag-cd": "🇨🇩", "flag-cf": "🇨🇫", "flag-cg": "🇨🇬", "flag-ch": "🇨🇭", "flag-ci": "🇨🇮", "flag-ck": "🇨🇰", "flag-cl": "🇨🇱", "flag-cm": "🇨🇲", cn: "🇨🇳", "flag-cn": "🇨🇳", "flag-co": "🇨🇴", "flag-cp": "🇨🇵", "flag-cr": "🇨🇷", "flag-cu": "🇨🇺", "flag-cv": "🇨🇻", "flag-cw": "🇨🇼", "flag-cx": "🇨🇽", "flag-cy": "🇨🇾", "flag-cz": "🇨🇿", de: "🇩🇪", "flag-de": "🇩🇪", "flag-dg": "🇩🇬", "flag-dj": "🇩🇯", "flag-dk": "🇩🇰", "flag-dm": "🇩🇲", "flag-do": "🇩🇴", "flag-dz": "🇩🇿", "flag-ea": "🇪🇦", "flag-ec": "🇪🇨", "flag-ee": "🇪🇪", "flag-eg": "🇪🇬", "flag-eh": "🇪🇭", "flag-er": "🇪🇷", es: "🇪🇸", "flag-es": "🇪🇸", "flag-et": "🇪🇹", "flag-eu": "🇪🇺", "flag-fi": "🇫🇮", "flag-fj": "🇫🇯", "flag-fk": "🇫🇰", "flag-fm": "🇫🇲", "flag-fo": "🇫🇴", fr: "🇫🇷", "flag-fr": "🇫🇷", "flag-ga": "🇬🇦", gb: "🇬🇧", uk: "🇬🇧", "flag-gb": "🇬🇧", "flag-gd": "🇬🇩", "flag-ge": "🇬🇪", "flag-gf": "🇬🇫", "flag-gg": "🇬🇬", "flag-gh": "🇬🇭", "flag-gi": "🇬🇮", "flag-gl": "🇬🇱", "flag-gm": "🇬🇲", "flag-gn": "🇬🇳", "flag-gp": "🇬🇵", "flag-gq": "🇬🇶", "flag-gr": "🇬🇷", "flag-gs": "🇬🇸", "flag-gt": "🇬🇹", "flag-gu": "🇬🇺", "flag-gw": "🇬🇼", "flag-gy": "🇬🇾", "flag-hk": "🇭🇰", "flag-hm": "🇭🇲", "flag-hn": "🇭🇳", "flag-hr": "🇭🇷", "flag-ht": "🇭🇹", "flag-hu": "🇭🇺", "flag-ic": "🇮🇨", "flag-id": "🇮🇩", "flag-ie": "🇮🇪", "flag-il": "🇮🇱", "flag-im": "🇮🇲", "flag-in": "🇮🇳", "flag-io": "🇮🇴", "flag-iq": "🇮🇶", "flag-ir": "🇮🇷", "flag-is": "🇮🇸", it: "🇮🇹", "flag-it": "🇮🇹", "flag-je": "🇯🇪", "flag-jm": "🇯🇲", "flag-jo": "🇯🇴", jp: "🇯🇵", "flag-jp": "🇯🇵", "flag-ke": "🇰🇪", "flag-kg": "🇰🇬", "flag-kh": "🇰🇭", "flag-ki": "🇰🇮", "flag-km": "🇰🇲", "flag-kn": "🇰🇳", "flag-kp": "🇰🇵", kr: "🇰🇷", "flag-kr": "🇰🇷", "flag-kw": "🇰🇼", "flag-ky": "🇰🇾", "flag-kz": "🇰🇿", "flag-la": "🇱🇦", "flag-lb": "🇱🇧", "flag-lc": "🇱🇨", "flag-li": "🇱🇮", "flag-lk": "🇱🇰", "flag-lr": "🇱🇷", "flag-ls": "🇱🇸", "flag-lt": "🇱🇹", "flag-lu": "🇱🇺", "flag-lv": "🇱🇻", "flag-ly": "🇱🇾", "flag-ma": "🇲🇦", "flag-mc": "🇲🇨", "flag-md": "🇲🇩", "flag-me": "🇲🇪", "flag-mf": "🇲🇫", "flag-mg": "🇲🇬", "flag-mh": "🇲🇭", "flag-mk": "🇲🇰", "flag-ml": "🇲🇱", "flag-mm": "🇲🇲", "flag-mn": "🇲🇳", "flag-mo": "🇲🇴", "flag-mp": "🇲🇵", "flag-mq": "🇲🇶", "flag-mr": "🇲🇷", "flag-ms": "🇲🇸", "flag-mt": "🇲🇹", "flag-mu": "🇲🇺", "flag-mv": "🇲🇻", "flag-mw": "🇲🇼", "flag-mx": "🇲🇽", "flag-my": "🇲🇾", "flag-mz": "🇲🇿", "flag-na": "🇳🇦", "flag-nc": "🇳🇨", "flag-ne": "🇳🇪", "flag-nf": "🇳🇫", "flag-ng": "🇳🇬", "flag-ni": "🇳🇮", "flag-nl": "🇳🇱", "flag-no": "🇳🇴", "flag-np": "🇳🇵", "flag-nr": "🇳🇷", "flag-nu": "🇳🇺", "flag-nz": "🇳🇿", "flag-om": "🇴🇲", "flag-pa": "🇵🇦", "flag-pe": "🇵🇪", "flag-pf": "🇵🇫", "flag-pg": "🇵🇬", "flag-ph": "🇵🇭", "flag-pk": "🇵🇰", "flag-pl": "🇵🇱", "flag-pm": "🇵🇲", "flag-pn": "🇵🇳", "flag-pr": "🇵🇷", "flag-ps": "🇵🇸", "flag-pt": "🇵🇹", "flag-pw": "🇵🇼", "flag-py": "🇵🇾", "flag-qa": "🇶🇦", "flag-re": "🇷🇪", "flag-ro": "🇷🇴", "flag-rs": "🇷🇸", ru: "🇷🇺", "flag-ru": "🇷🇺", "flag-rw": "🇷🇼", "flag-sa": "🇸🇦", "flag-sb": "🇸🇧", "flag-sc": "🇸🇨", "flag-sd": "🇸🇩", "flag-se": "🇸🇪", "flag-sg": "🇸🇬", "flag-sh": "🇸🇭", "flag-si": "🇸🇮", "flag-sj": "🇸🇯", "flag-sk": "🇸🇰", "flag-sl": "🇸🇱", "flag-sm": "🇸🇲", "flag-sn": "🇸🇳", "flag-so": "🇸🇴", "flag-sr": "🇸🇷", "flag-ss": "🇸🇸", "flag-st": "🇸🇹", "flag-sv": "🇸🇻", "flag-sx": "🇸🇽", "flag-sy": "🇸🇾", "flag-sz": "🇸🇿", "flag-ta": "🇹🇦", "flag-tc": "🇹🇨", "flag-td": "🇹🇩", "flag-tf": "🇹🇫", "flag-tg": "🇹🇬", "flag-th": "🇹🇭", "flag-tj": "🇹🇯", "flag-tk": "🇹🇰", "flag-tl": "🇹🇱", "flag-tm": "🇹🇲", "flag-tn": "🇹🇳", "flag-to": "🇹🇴", "flag-tr": "🇹🇷", "flag-tt": "🇹🇹", "flag-tv": "🇹🇻", "flag-tw": "🇹🇼", "flag-tz": "🇹🇿", "flag-ua": "🇺🇦", "flag-ug": "🇺🇬", "flag-um": "🇺🇲", "flag-un": "🇺🇳", us: "🇺🇸", "flag-us": "🇺🇸", "flag-uy": "🇺🇾", "flag-uz": "🇺🇿", "flag-va": "🇻🇦", "flag-vc": "🇻🇨", "flag-ve": "🇻🇪", "flag-vg": "🇻🇬", "flag-vi": "🇻🇮", "flag-vn": "🇻🇳", "flag-vu": "🇻🇺", "flag-wf": "🇼🇫", "flag-ws": "🇼🇸", "flag-xk": "🇽🇰", "flag-ye": "🇾🇪", "flag-yt": "🇾🇹", "flag-za": "🇿🇦", "flag-zm": "🇿🇲", "flag-zw": "🇿🇼", koko: "🈁", sa: "🈂️", u7121: "🈚", u6307: "🈯", u7981: "🈲", u7a7a: "🈳", u5408: "🈴", u6e80: "🈵", u6709: "🈶", u6708: "🈷️", u7533: "🈸", u5272: "🈹", u55b6: "🈺", ideograph_advantage: "🉐", accept: "🉑", cyclone: "🌀", foggy: "🌁", closed_umbrella: "🌂", night_with_stars: "🌃", sunrise_over_mountains: "🌄", sunrise: "🌅", city_sunset: "🌆", city_sunrise: "🌇", rainbow: "🌈", bridge_at_night: "🌉", ocean: "🌊", volcano: "🌋", milky_way: "🌌", earth_africa: "🌍", earth_americas: "🌎", earth_asia: "🌏", globe_with_meridians: "🌐", new_moon: "🌑", waxing_crescent_moon: "🌒", first_quarter_moon: "🌓", moon: "🌔", waxing_gibbous_moon: "🌔", full_moon: "🌕", waning_gibbous_moon: "🌖", last_quarter_moon: "🌗", waning_crescent_moon: "🌘", crescent_moon: "🌙", new_moon_with_face: "🌚", first_quarter_moon_with_face: "🌛", last_quarter_moon_with_face: "🌜", full_moon_with_face: "🌝", sun_with_face: "🌞", star2: "🌟", stars: "🌠", thermometer: "🌡️", mostly_sunny: "🌤️", sun_small_cloud: "🌤️", barely_sunny: "🌥️", sun_behind_cloud: "🌥️", partly_sunny_rain: "🌦️", sun_behind_rain_cloud: "🌦️", rain_cloud: "🌧️", snow_cloud: "🌨️", lightning: "🌩️", lightning_cloud: "🌩️", tornado: "🌪️", tornado_cloud: "🌪️", fog: "🌫️", wind_blowing_face: "🌬️", hotdog: "🌭", taco: "🌮", burrito: "🌯", chestnut: "🌰", seedling: "🌱", evergreen_tree: "🌲", deciduous_tree: "🌳", palm_tree: "🌴", cactus: "🌵", hot_pepper: "🌶️", tulip: "🌷", cherry_blossom: "🌸", rose: "🌹", hibiscus: "🌺", sunflower: "🌻", blossom: "🌼", corn: "🌽", ear_of_rice: "🌾", herb: "🌿", four_leaf_clover: "🍀", maple_leaf: "🍁", fallen_leaf: "🍂", leaves: "🍃", mushroom: "🍄", tomato: "🍅", eggplant: "🍆", grapes: "🍇", melon: "🍈", watermelon: "🍉", tangerine: "🍊", lemon: "🍋", banana: "🍌", pineapple: "🍍", apple: "🍎", green_apple: "🍏", pear: "🍐", peach: "🍑", cherries: "🍒", strawberry: "🍓", hamburger: "🍔", pizza: "🍕", meat_on_bone: "🍖", poultry_leg: "🍗", rice_cracker: "🍘", rice_ball: "🍙", rice: "🍚", curry: "🍛", ramen: "🍜", spaghetti: "🍝", bread: "🍞", fries: "🍟", sweet_potato: "🍠", dango: "🍡", oden: "🍢", sushi: "🍣", fried_shrimp: "🍤", fish_cake: "🍥", icecream: "🍦", shaved_ice: "🍧", ice_cream: "🍨", doughnut: "🍩", cookie: "🍪", chocolate_bar: "🍫", candy: "🍬", lollipop: "🍭", custard: "🍮", honey_pot: "🍯", cake: "🍰", bento: "🍱", stew: "🍲", fried_egg: "🍳", cooking: "🍳", fork_and_knife: "🍴", tea: "🍵", sake: "🍶", wine_glass: "🍷", cocktail: "🍸", tropical_drink: "🍹", beer: "🍺", beers: "🍻", baby_bottle: "🍼", knife_fork_plate: "🍽️", champagne: "🍾", popcorn: "🍿", ribbon: "🎀", gift: "🎁", birthday: "🎂", jack_o_lantern: "🎃", christmas_tree: "🎄", santa: "🎅", fireworks: "🎆", sparkler: "🎇", balloon: "🎈", tada: "🎉", confetti_ball: "🎊", tanabata_tree: "🎋", crossed_flags: "🎌", bamboo: "🎍", dolls: "🎎", flags: "🎏", wind_chime: "🎐", rice_scene: "🎑", school_satchel: "🎒", mortar_board: "🎓", medal: "🎖️", reminder_ribbon: "🎗️", studio_microphone: "🎙️", level_slider: "🎚️", control_knobs: "🎛️", film_frames: "🎞️", admission_tickets: "🎟️", carousel_horse: "🎠", ferris_wheel: "🎡", roller_coaster: "🎢", fishing_pole_and_fish: "🎣", microphone: "🎤", movie_camera: "🎥", cinema: "🎦", headphones: "🎧", art: "🎨", tophat: "🎩", circus_tent: "🎪", ticket: "🎫", clapper: "🎬", performing_arts: "🎭", video_game: "🎮", dart: "🎯", slot_machine: "🎰", "8ball": "🎱", game_die: "🎲", bowling: "🎳", flower_playing_cards: "🎴", musical_note: "🎵", notes: "🎶", saxophone: "🎷", guitar: "🎸", musical_keyboard: "🎹", trumpet: "🎺", violin: "🎻", musical_score: "🎼", running_shirt_with_sash: "🎽", tennis: "🎾", ski: "🎿", basketball: "🏀", checkered_flag: "🏁", snowboarder: "🏂", "woman-running": "🏃♀️", "man-running": "🏃♂️", runner: "🏃♂️", running: "🏃♂️", "woman-surfing": "🏄♀️", "man-surfing": "🏄♂️", surfer: "🏄♂️", sports_medal: "🏅", trophy: "🏆", horse_racing: "🏇", football: "🏈", rugby_football: "🏉", "woman-swimming": "🏊♀️", "man-swimming": "🏊♂️", swimmer: "🏊♂️", "woman-lifting-weights": "🏋️♀️", "man-lifting-weights": "🏋️♂️", weight_lifter: "🏋️♂️", "woman-golfing": "🏌️♀️", "man-golfing": "🏌️♂️", golfer: "🏌️♂️", racing_motorcycle: "🏍️", racing_car: "🏎️", cricket_bat_and_ball: "🏏", volleyball: "🏐", field_hockey_stick_and_ball: "🏑", ice_hockey_stick_and_puck: "🏒", table_tennis_paddle_and_ball: "🏓", snow_capped_mountain: "🏔️", camping: "🏕️", beach_with_umbrella: "🏖️", building_construction: "🏗️", house_buildings: "🏘️", cityscape: "🏙️", derelict_house_building: "🏚️", classical_building: "🏛️", desert: "🏜️", desert_island: "🏝️", national_park: "🏞️", stadium: "🏟️", house: "🏠", house_with_garden: "🏡", office: "🏢", post_office: "🏣", european_post_office: "🏤", hospital: "🏥", bank: "🏦", atm: "🏧", hotel: "🏨", love_hotel: "🏩", convenience_store: "🏪", school: "🏫", department_store: "🏬", factory: "🏭", izakaya_lantern: "🏮", lantern: "🏮", japanese_castle: "🏯", european_castle: "🏰", "rainbow-flag": "🏳️🌈", transgender_flag: "🏳️⚧️", waving_white_flag: "🏳️", pirate_flag: "🏴☠️", "flag-england": "🏴", "flag-scotland": "🏴", "flag-wales": "🏴", waving_black_flag: "🏴", rosette: "🏵️", label: "🏷️", badminton_racquet_and_shuttlecock: "🏸", bow_and_arrow: "🏹", amphora: "🏺", "skin-tone-2": "🏻", "skin-tone-3": "🏼", "skin-tone-4": "🏽", "skin-tone-5": "🏾", "skin-tone-6": "🏿", rat: "🐀", mouse2: "🐁", ox: "🐂", water_buffalo: "🐃", cow2: "🐄", tiger2: "🐅", leopard: "🐆", rabbit2: "🐇", black_cat: "🐈⬛", cat2: "🐈", dragon: "🐉", crocodile: "🐊", whale2: "🐋", snail: "🐌", snake: "🐍", racehorse: "🐎", ram: "🐏", goat: "🐐", sheep: "🐑", monkey: "🐒", rooster: "🐓", chicken: "🐔", service_dog: "🐕🦺", dog2: "🐕", pig2: "🐖", boar: "🐗", elephant: "🐘", octopus: "🐙", shell: "🐚", bug: "🐛", ant: "🐜", bee: "🐝", honeybee: "🐝", ladybug: "🐞", lady_beetle: "🐞", fish: "🐟", tropical_fish: "🐠", blowfish: "🐡", turtle: "🐢", hatching_chick: "🐣", baby_chick: "🐤", hatched_chick: "🐥", bird: "🐦", penguin: "🐧", koala: "🐨", poodle: "🐩", dromedary_camel: "🐪", camel: "🐫", dolphin: "🐬", flipper: "🐬", mouse: "🐭", cow: "🐮", tiger: "🐯", rabbit: "🐰", cat: "🐱", dragon_face: "🐲", whale: "🐳", horse: "🐴", monkey_face: "🐵", dog: "🐶", pig: "🐷", frog: "🐸", hamster: "🐹", wolf: "🐺", polar_bear: "🐻❄️", bear: "🐻", panda_face: "🐼", pig_nose: "🐽", feet: "🐾", paw_prints: "🐾", chipmunk: "🐿️", eyes: "👀", "eye-in-speech-bubble": "👁️🗨️", eye: "👁️", ear: "👂", nose: "👃", lips: "👄", tongue: "👅", point_up_2: "👆", point_down: "👇", point_left: "👈", point_right: "👉", facepunch: "👊", punch: "👊", wave: "👋", ok_hand: "👌", "+1": "👍", thumbsup: "👍", "-1": "👎", thumbsdown: "👎", clap: "👏", open_hands: "👐", crown: "👑", womans_hat: "👒", eyeglasses: "👓", necktie: "👔", shirt: "👕", tshirt: "👕", jeans: "👖", dress: "👗", kimono: "👘", bikini: "👙", womans_clothes: "👚", purse: "👛", handbag: "👜", pouch: "👝", mans_shoe: "👞", shoe: "👞", athletic_shoe: "👟", high_heel: "👠", sandal: "👡", boot: "👢", footprints: "👣", bust_in_silhouette: "👤", busts_in_silhouette: "👥", boy: "👦", girl: "👧", "male-farmer": "👨🌾", "male-cook": "👨🍳", man_feeding_baby: "👨🍼", "male-student": "👨🎓", "male-singer": "👨🎤", "male-artist": "👨🎨", "male-teacher": "👨🏫", "male-factory-worker": "👨🏭", "man-boy-boy": "👨👦👦", "man-boy": "👨👦", "man-girl-boy": "👨👧👦", "man-girl-girl": "👨👧👧", "man-girl": "👨👧", "man-man-boy": "👨👨👦", "man-man-boy-boy": "👨👨👦👦", "man-man-girl": "👨👨👧", "man-man-girl-boy": "👨👨👧👦", "man-man-girl-girl": "👨👨👧👧", "man-woman-boy": "👨👩👦", family: "👨👩👦", "man-woman-boy-boy": "👨👩👦👦", "man-woman-girl": "👨👩👧", "man-woman-girl-boy": "👨👩👧👦", "man-woman-girl-girl": "👨👩👧👧", "male-technologist": "👨💻", "male-office-worker": "👨💼", "male-mechanic": "👨🔧", "male-scientist": "👨🔬", "male-astronaut": "👨🚀", "male-firefighter": "👨🚒", man_with_probing_cane: "👨🦯", red_haired_man: "👨🦰", curly_haired_man: "👨🦱", bald_man: "👨🦲", white_haired_man: "👨🦳", man_in_motorized_wheelchair: "👨🦼", man_in_manual_wheelchair: "👨🦽", "male-doctor": "👨⚕️", "male-judge": "👨⚖️", "male-pilot": "👨✈️", "man-heart-man": "👨❤️👨", "man-kiss-man": "👨❤️💋👨", man: "👨", "female-farmer": "👩🌾", "female-cook": "👩🍳", woman_feeding_baby: "👩🍼", "female-student": "👩🎓", "female-singer": "👩🎤", "female-artist": "👩🎨", "female-teacher": "👩🏫", "female-factory-worker": "👩🏭", "woman-boy-boy": "👩👦👦", "woman-boy": "👩👦", "woman-girl-boy": "👩👧👦", "woman-girl-girl": "👩👧👧", "woman-girl": "👩👧", "woman-woman-boy": "👩👩👦", "woman-woman-boy-boy": "👩👩👦👦", "woman-woman-girl": "👩👩👧", "woman-woman-girl-boy": "👩👩👧👦", "woman-woman-girl-girl": "👩👩👧👧", "female-technologist": "👩💻", "female-office-worker": "👩💼", "female-mechanic": "👩🔧", "female-scientist": "👩🔬", "female-astronaut": "👩🚀", "female-firefighter": "👩🚒", woman_with_probing_cane: "👩🦯", red_haired_woman: "👩🦰", curly_haired_woman: "👩🦱", bald_woman: "👩🦲", white_haired_woman: "👩🦳", woman_in_motorized_wheelchair: "👩🦼", woman_in_manual_wheelchair: "👩🦽", "female-doctor": "👩⚕️", "female-judge": "👩⚖️", "female-pilot": "👩✈️", "woman-heart-man": "👩❤️👨", "woman-heart-woman": "👩❤️👩", "woman-kiss-man": "👩❤️💋👨", "woman-kiss-woman": "👩❤️💋👩", woman: "👩", man_and_woman_holding_hands: "👫", woman_and_man_holding_hands: "👫", couple: "👫", two_men_holding_hands: "👬", men_holding_hands: "👬", two_women_holding_hands: "👭", women_holding_hands: "👭", "female-police-officer": "👮♀️", "male-police-officer": "👮♂️", cop: "👮♂️", "women-with-bunny-ears-partying": "👯♀️", "woman-with-bunny-ears-partying": "👯♀️", dancers: "👯♀️", "men-with-bunny-ears-partying": "👯♂️", "man-with-bunny-ears-partying": "👯♂️", woman_with_veil: "👰♀️", man_with_veil: "👰♂️", bride_with_veil: "👰", "blond-haired-woman": "👱♀️", "blond-haired-man": "👱♂️", person_with_blond_hair: "👱♂️", man_with_gua_pi_mao: "👲", "woman-wearing-turban": "👳♀️", "man-wearing-turban": "👳♂️", man_with_turban: "👳♂️", older_man: "👴", older_woman: "👵", baby: "👶", "female-construction-worker": "👷♀️", "male-construction-worker": "👷♂️", construction_worker: "👷♂️", princess: "👸", japanese_ogre: "👹", japanese_goblin: "👺", ghost: "👻", angel: "👼", alien: "👽", space_invader: "👾", imp: "👿", skull: "💀", "woman-tipping-hand": "💁♀️", information_desk_person: "💁♀️", "man-tipping-hand": "💁♂️", "female-guard": "💂♀️", "male-guard": "💂♂️", guardsman: "💂♂️", dancer: "💃", lipstick: "💄", nail_care: "💅", "woman-getting-massage": "💆♀️", massage: "💆♀️", "man-getting-massage": "💆♂️", "woman-getting-haircut": "💇♀️", haircut: "💇♀️", "man-getting-haircut": "💇♂️", barber: "💈", syringe: "💉", pill: "💊", kiss: "💋", love_letter: "💌", ring: "💍", gem: "💎", couplekiss: "💏", bouquet: "💐", couple_with_heart: "💑", wedding: "💒", heartbeat: "💓", broken_heart: "💔", two_hearts: "💕", sparkling_heart: "💖", heartpulse: "💗", cupid: "💘", blue_heart: "💙", green_heart: "💚", yellow_heart: "💛", purple_heart: "💜", gift_heart: "💝", revolving_hearts: "💞", heart_decoration: "💟", diamond_shape_with_a_dot_inside: "💠", bulb: "💡", anger: "💢", bomb: "💣", zzz: "💤", boom: "💥", collision: "💥", sweat_drops: "💦", droplet: "💧", dash: "💨", hankey: "💩", poop: "💩", shit: "💩", muscle: "💪", dizzy: "💫", speech_balloon: "💬", thought_balloon: "💭", white_flower: "💮", moneybag: "💰", currency_exchange: "💱", heavy_dollar_sign: "💲", credit_card: "💳", yen: "💴", dollar: "💵", euro: "💶", pound: "💷", money_with_wings: "💸", chart: "💹", seat: "💺", computer: "💻", briefcase: "💼", minidisc: "💽", floppy_disk: "💾", cd: "💿", dvd: "📀", file_folder: "📁", open_file_folder: "📂", page_with_curl: "📃", page_facing_up: "📄", date: "📅", calendar: "📆", card_index: "📇", chart_with_upwards_trend: "📈", chart_with_downwards_trend: "📉", bar_chart: "📊", clipboard: "📋", pushpin: "📌", round_pushpin: "📍", paperclip: "📎", straight_ruler: "📏", triangular_ruler: "📐", bookmark_tabs: "📑", ledger: "📒", notebook: "📓", notebook_with_decorative_cover: "📔", closed_book: "📕", book: "📖", open_book: "📖", green_book: "📗", blue_book: "📘", orange_book: "📙", books: "📚", name_badge: "📛", scroll: "📜", memo: "📝", pencil: "📝", telephone_receiver: "📞", pager: "📟", fax: "📠", satellite_antenna: "📡", loudspeaker: "📢", mega: "📣", outbox_tray: "📤", inbox_tray: "📥", package: "📦", "e-mail": "📧", incoming_envelope: "📨", envelope_with_arrow: "📩", mailbox_closed: "📪", mailbox: "📫", mailbox_with_mail: "📬", mailbox_with_no_mail: "📭", postbox: "📮", postal_horn: "📯", newspaper: "📰", iphone: "📱", calling: "📲", vibration_mode: "📳", mobile_phone_off: "📴", no_mobile_phones: "📵", signal_strength: "📶", camera: "📷", camera_with_flash: "📸", video_camera: "📹", tv: "📺", radio: "📻", vhs: "📼", film_projector: "📽️", prayer_beads: "📿", twisted_rightwards_arrows: "🔀", repeat: "🔁", repeat_one: "🔂", arrows_clockwise: "🔃", arrows_counterclockwise: "🔄", low_brightness: "🔅", high_brightness: "🔆", mute: "🔇", speaker: "🔈", sound: "🔉", loud_sound: "🔊", battery: "🔋", electric_plug: "🔌", mag: "🔍", mag_right: "🔎", lock_with_ink_pen: "🔏", closed_lock_with_key: "🔐", key: "🔑", lock: "🔒", unlock: "🔓", bell: "🔔", no_bell: "🔕", bookmark: "🔖", link: "🔗", radio_button: "🔘", back: "🔙", end: "🔚", on: "🔛", soon: "🔜", top: "🔝", underage: "🔞", keycap_ten: "🔟", capital_abcd: "🔠", abcd: "🔡", symbols: "🔣", abc: "🔤", fire: "🔥", flashlight: "🔦", wrench: "🔧", hammer: "🔨", nut_and_bolt: "🔩", hocho: "🔪", knife: "🔪", gun: "🔫", microscope: "🔬", telescope: "🔭", crystal_ball: "🔮", six_pointed_star: "🔯", beginner: "🔰", trident: "🔱", black_square_button: "🔲", white_square_button: "🔳", red_circle: "🔴", large_blue_circle: "🔵", large_orange_diamond: "🔶", large_blue_diamond: "🔷", small_orange_diamond: "🔸", small_blue_diamond: "🔹", small_red_triangle: "🔺", small_red_triangle_down: "🔻", arrow_up_small: "🔼", arrow_down_small: "🔽", om_symbol: "🕉️", dove_of_peace: "🕊️", kaaba: "🕋", mosque: "🕌", synagogue: "🕍", menorah_with_nine_branches: "🕎", clock1: "🕐", clock2: "🕑", clock3: "🕒", clock4: "🕓", clock5: "🕔", clock6: "🕕", clock7: "🕖", clock8: "🕗", clock9: "🕘", clock10: "🕙", clock11: "🕚", clock12: "🕛", clock130: "🕜", clock230: "🕝", clock330: "🕞", clock430: "🕟", clock530: "🕠", clock630: "🕡", clock730: "🕢", clock830: "🕣", clock930: "🕤", clock1030: "🕥", clock1130: "🕦", clock1230: "🕧", candle: "🕯️", mantelpiece_clock: "🕰️", hole: "🕳️", man_in_business_suit_levitating: "🕴️", "female-detective": "🕵️♀️", "male-detective": "🕵️♂️", sleuth_or_spy: "🕵️♂️", dark_sunglasses: "🕶️", spider: "🕷️", spider_web: "🕸️", joystick: "🕹️", man_dancing: "🕺", linked_paperclips: "🖇️", lower_left_ballpoint_pen: "🖊️", lower_left_fountain_pen: "🖋️", lower_left_paintbrush: "🖌️", lower_left_crayon: "🖍️", raised_hand_with_fingers_splayed: "🖐️", middle_finger: "🖕", reversed_hand_with_middle_finger_extended: "🖕", "spock-hand": "🖖", black_heart: "🖤", desktop_computer: "🖥️", printer: "🖨️", three_button_mouse: "🖱️", trackball: "🖲️", frame_with_picture: "🖼️", card_index_dividers: "🗂️", card_file_box: "🗃️", file_cabinet: "🗄️", wastebasket: "🗑️", spiral_note_pad: "🗒️", spiral_calendar_pad: "🗓️", compression: "🗜️", old_key: "🗝️", rolled_up_newspaper: "🗞️", dagger_knife: "🗡️", speaking_head_in_silhouette: "🗣️", left_speech_bubble: "🗨️", right_anger_bubble: "🗯️", ballot_box_with_ballot: "🗳️", world_map: "🗺️", mount_fuji: "🗻", tokyo_tower: "🗼", statue_of_liberty: "🗽", japan: "🗾", moyai: "🗿", grinning: "😀", grin: "😁", joy: "😂", smiley: "😃", smile: "😄", sweat_smile: "😅", laughing: "😆", satisfied: "😆", innocent: "😇", smiling_imp: "😈", wink: "😉", blush: "😊", yum: "😋", relieved: "😌", heart_eyes: "😍", sunglasses: "😎", smirk: "😏", neutral_face: "😐", expressionless: "😑", unamused: "😒", sweat: "😓", pensive: "😔", confused: "😕", confounded: "😖", kissing: "😗", kissing_heart: "😘", kissing_smiling_eyes: "😙", kissing_closed_eyes: "😚", stuck_out_tongue: "😛", stuck_out_tongue_winking_eye: "😜", stuck_out_tongue_closed_eyes: "😝", disappointed: "😞", worried: "😟", angry: "😠", rage: "😡", cry: "😢", persevere: "😣", triumph: "😤", disappointed_relieved: "😥", frowning: "😦", anguished: "😧", fearful: "😨", weary: "😩", sleepy: "😪", tired_face: "😫", grimacing: "😬", sob: "😭", face_exhaling: "😮💨", open_mouth: "😮", hushed: "😯", cold_sweat: "😰", scream: "😱", astonished: "😲", flushed: "😳", sleeping: "😴", face_with_spiral_eyes: "😵💫", dizzy_face: "😵", face_in_clouds: "😶🌫️", no_mouth: "😶", mask: "😷", smile_cat: "😸", joy_cat: "😹", smiley_cat: "😺", heart_eyes_cat: "😻", smirk_cat: "😼", kissing_cat: "😽", pouting_cat: "😾", crying_cat_face: "😿", scream_cat: "🙀", slightly_frowning_face: "🙁", slightly_smiling_face: "🙂", upside_down_face: "🙃", face_with_rolling_eyes: "🙄", "woman-gesturing-no": "🙅♀️", no_good: "🙅♀️", "man-gesturing-no": "🙅♂️", "woman-gesturing-ok": "🙆♀️", ok_woman: "🙆♀️", "man-gesturing-ok": "🙆♂️", "woman-bowing": "🙇♀️", "man-bowing": "🙇♂️", bow: "🙇♂️", see_no_evil: "🙈", hear_no_evil: "🙉", speak_no_evil: "🙊", "woman-raising-hand": "🙋♀️", raising_hand: "🙋♀️", "man-raising-hand": "🙋♂️", raised_hands: "🙌", "woman-frowning": "🙍♀️", person_frowning: "🙍♀️", "man-frowning": "🙍♂️", "woman-pouting": "🙎♀️", person_with_pouting_face: "🙎♀️", "man-pouting": "🙎♂️", pray: "🙏", rocket: "🚀", helicopter: "🚁", steam_locomotive: "🚂", railway_car: "🚃", bullettrain_side: "🚄", bullettrain_front: "🚅", train2: "🚆", metro: "🚇", light_rail: "🚈", station: "🚉", tram: "🚊", train: "🚋", bus: "🚌", oncoming_bus: "🚍", trolleybus: "🚎", busstop: "🚏", minibus: "🚐", ambulance: "🚑", fire_engine: "🚒", police_car: "🚓", oncoming_police_car: "🚔", taxi: "🚕", oncoming_taxi: "🚖", car: "🚗", red_car: "🚗", oncoming_automobile: "🚘", blue_car: "🚙", truck: "🚚", articulated_lorry: "🚛", tractor: "🚜", monorail: "🚝", mountain_railway: "🚞", suspension_railway: "🚟", mountain_cableway: "🚠", aerial_tramway: "🚡", ship: "🚢", "woman-rowing-boat": "🚣♀️", "man-rowing-boat": "🚣♂️", rowboat: "🚣♂️", speedboat: "🚤", traffic_light: "🚥", vertical_traffic_light: "🚦", construction: "🚧", rotating_light: "🚨", triangular_flag_on_post: "🚩", door: "🚪", no_entry_sign: "🚫", smoking: "🚬", no_smoking: "🚭", put_litter_in_its_place: "🚮", do_not_litter: "🚯", potable_water: "🚰", "non-potable_water": "🚱", bike: "🚲", no_bicycles: "🚳", "woman-biking": "🚴♀️", "man-biking": "🚴♂️", bicyclist: "🚴♂️", "woman-mountain-biking": "🚵♀️", "man-mountain-biking": "🚵♂️", mountain_bicyclist: "🚵♂️", "woman-walking": "🚶♀️", "man-walking": "🚶♂️", walking: "🚶♂️", no_pedestrians: "🚷", children_crossing: "🚸", mens: "🚹", womens: "🚺", restroom: "🚻", baby_symbol: "🚼", toilet: "🚽", wc: "🚾", shower: "🚿", bath: "🛀", bathtub: "🛁", passport_control: "🛂", customs: "🛃", baggage_claim: "🛄", left_luggage: "🛅", couch_and_lamp: "🛋️", sleeping_accommodation: "🛌", shopping_bags: "🛍️", bellhop_bell: "🛎️", bed: "🛏️", place_of_worship: "🛐", octagonal_sign: "🛑", shopping_trolley: "🛒", hindu_temple: "🛕", hut: "🛖", elevator: "🛗", hammer_and_wrench: "🛠️", shield: "🛡️", oil_drum: "🛢️", motorway: "🛣️", railway_track: "🛤️", motor_boat: "🛥️", small_airplane: "🛩️", airplane_departure: "🛫", airplane_arriving: "🛬", satellite: "🛰️", passenger_ship: "🛳️", scooter: "🛴", motor_scooter: "🛵", canoe: "🛶", sled: "🛷", flying_saucer: "🛸", skateboard: "🛹", auto_rickshaw: "🛺", pickup_truck: "🛻", roller_skate: "🛼", large_orange_circle: "🟠", large_yellow_circle: "🟡", large_green_circle: "🟢", large_purple_circle: "🟣", large_brown_circle: "🟤", large_red_square: "🟥", large_blue_square: "🟦", large_orange_square: "🟧", large_yellow_square: "🟨", large_green_square: "🟩", large_purple_square: "🟪", large_brown_square: "🟫", pinched_fingers: "🤌", white_heart: "🤍", brown_heart: "🤎", pinching_hand: "🤏", zipper_mouth_face: "🤐", money_mouth_face: "🤑", face_with_thermometer: "🤒", nerd_face: "🤓", thinking_face: "🤔", face_with_head_bandage: "🤕", robot_face: "🤖", hugging_face: "🤗", the_horns: "🤘", sign_of_the_horns: "🤘", call_me_hand: "🤙", raised_back_of_hand: "🤚", "left-facing_fist": "🤛", "right-facing_fist": "🤜", handshake: "🤝", crossed_fingers: "🤞", hand_with_index_and_middle_fingers_crossed: "🤞", i_love_you_hand_sign: "🤟", face_with_cowboy_hat: "🤠", clown_face: "🤡", nauseated_face: "🤢", rolling_on_the_floor_laughing: "🤣", drooling_face: "🤤", lying_face: "🤥", "woman-facepalming": "🤦♀️", "man-facepalming": "🤦♂️", face_palm: "🤦", sneezing_face: "🤧", face_with_raised_eyebrow: "🤨", face_with_one_eyebrow_raised: "🤨", "star-struck": "🤩", grinning_face_with_star_eyes: "🤩", zany_face: "🤪", grinning_face_with_one_large_and_one_small_eye: "🤪", shushing_face: "🤫", face_with_finger_covering_closed_lips: "🤫", face_with_symbols_on_mouth: "🤬", serious_face_with_symbols_covering_mouth: "🤬", face_with_hand_over_mouth: "🤭", smiling_face_with_smiling_eyes_and_hand_covering_mouth: "🤭", face_vomiting: "🤮", face_with_open_mouth_vomiting: "🤮", exploding_head: "🤯", shocked_face_with_exploding_head: "🤯", pregnant_woman: "🤰", "breast-feeding": "🤱", palms_up_together: "🤲", selfie: "🤳", prince: "🤴", woman_in_tuxedo: "🤵♀️", man_in_tuxedo: "🤵♂️", person_in_tuxedo: "🤵", mrs_claus: "🤶", mother_christmas: "🤶", "woman-shrugging": "🤷♀️", "man-shrugging": "🤷♂️", shrug: "🤷", "woman-cartwheeling": "🤸♀️", "man-cartwheeling": "🤸♂️", person_doing_cartwheel: "🤸", "woman-juggling": "🤹♀️", "man-juggling": "🤹♂️", juggling: "🤹", fencer: "🤺", "woman-wrestling": "🤼♀️", "man-wrestling": "🤼♂️", wrestlers: "🤼", "woman-playing-water-polo": "🤽♀️", "man-playing-water-polo": "🤽♂️", water_polo: "🤽", "woman-playing-handball": "🤾♀️", "man-playing-handball": "🤾♂️", handball: "🤾", diving_mask: "🤿", wilted_flower: "🥀", drum_with_drumsticks: "🥁", clinking_glasses: "🥂", tumbler_glass: "🥃", spoon: "🥄", goal_net: "🥅", first_place_medal: "🥇", second_place_medal: "🥈", third_place_medal: "🥉", boxing_glove: "🥊", martial_arts_uniform: "🥋", curling_stone: "🥌", lacrosse: "🥍", softball: "🥎", flying_disc: "🥏", croissant: "🥐", avocado: "🥑", cucumber: "🥒", bacon: "🥓", potato: "🥔", carrot: "🥕", baguette_bread: "🥖", green_salad: "🥗", shallow_pan_of_food: "🥘", stuffed_flatbread: "🥙", egg: "🥚", glass_of_milk: "🥛", peanuts: "🥜", kiwifruit: "🥝", pancakes: "🥞", dumpling: "🥟", fortune_cookie: "🥠", takeout_box: "🥡", chopsticks: "🥢", bowl_with_spoon: "🥣", cup_with_straw: "🥤", coconut: "🥥", broccoli: "🥦", pie: "🥧", pretzel: "🥨", cut_of_meat: "🥩", sandwich: "🥪", canned_food: "🥫", leafy_green: "🥬", mango: "🥭", moon_cake: "🥮", bagel: "🥯", smiling_face_with_3_hearts: "🥰", yawning_face: "🥱", smiling_face_with_tear: "🥲", partying_face: "🥳", woozy_face: "🥴", hot_face: "🥵", cold_face: "🥶", ninja: "🥷", disguised_face: "🥸", pleading_face: "🥺", sari: "🥻", lab_coat: "🥼", goggles: "🥽", hiking_boot: "🥾", womans_flat_shoe: "🥿", crab: "🦀", lion_face: "🦁", scorpion: "🦂", turkey: "🦃", unicorn_face: "🦄", eagle: "🦅", duck: "🦆", bat: "🦇", shark: "🦈", owl: "🦉", fox_face: "🦊", butterfly: "🦋", deer: "🦌", gorilla: "🦍", lizard: "🦎", rhinoceros: "🦏", shrimp: "🦐", squid: "🦑", giraffe_face: "🦒", zebra_face: "🦓", hedgehog: "🦔", sauropod: "🦕", "t-rex": "🦖", cricket: "🦗", kangaroo: "🦘", llama: "🦙", peacock: "🦚", hippopotamus: "🦛", parrot: "🦜", raccoon: "🦝", lobster: "🦞", mosquito: "🦟", microbe: "🦠", badger: "🦡", swan: "🦢", mammoth: "🦣", dodo: "🦤", sloth: "🦥", otter: "🦦", orangutan: "🦧", skunk: "🦨", flamingo: "🦩", oyster: "🦪", beaver: "🦫", bison: "🦬", seal: "🦭", guide_dog: "🦮", probing_cane: "🦯", bone: "🦴", leg: "🦵", foot: "🦶", tooth: "🦷", female_superhero: "🦸♀️", male_superhero: "🦸♂️", superhero: "🦸", female_supervillain: "🦹♀️", male_supervillain: "🦹♂️", supervillain: "🦹", safety_vest: "🦺", ear_with_hearing_aid: "🦻", motorized_wheelchair: "🦼", manual_wheelchair: "🦽", mechanical_arm: "🦾", mechanical_leg: "🦿", cheese_wedge: "🧀", cupcake: "🧁", salt: "🧂", beverage_box: "🧃", garlic: "🧄", onion: "🧅", falafel: "🧆", waffle: "🧇", butter: "🧈", mate_drink: "🧉", ice_cube: "🧊", bubble_tea: "🧋", woman_standing: "🧍♀️", man_standing: "🧍♂️", standing_person: "🧍", woman_kneeling: "🧎♀️", man_kneeling: "🧎♂️", kneeling_person: "🧎", deaf_woman: "🧏♀️", deaf_man: "🧏♂️", deaf_person: "🧏", face_with_monocle: "🧐", farmer: "🧑🌾", cook: "🧑🍳", person_feeding_baby: "🧑🍼", mx_claus: "🧑🎄", student: "🧑🎓", singer: "🧑🎤", artist: "🧑🎨", teacher: "🧑🏫", factory_worker: "🧑🏭", technologist: "🧑💻", office_worker: "🧑💼", mechanic: "🧑🔧", scientist: "🧑🔬", astronaut: "🧑🚀", firefighter: "🧑🚒", people_holding_hands: "🧑🤝🧑", person_with_probing_cane: "🧑🦯", red_haired_person: "🧑🦰", curly_haired_person: "🧑🦱", bald_person: "🧑🦲", white_haired_person: "🧑🦳", person_in_motorized_wheelchair: "🧑🦼", person_in_manual_wheelchair: "🧑🦽", health_worker: "🧑⚕️", judge: "🧑⚖️", pilot: "🧑✈️", adult: "🧑", child: "🧒", older_adult: "🧓", woman_with_beard: "🧔♀️", man_with_beard: "🧔♂️", bearded_person: "🧔", person_with_headscarf: "🧕", woman_in_steamy_room: "🧖♀️", man_in_steamy_room: "🧖♂️", person_in_steamy_room: "🧖♂️", woman_climbing: "🧗♀️", person_climbing: "🧗♀️", man_climbing: "🧗♂️", woman_in_lotus_position: "🧘♀️", person_in_lotus_position: "🧘♀️", man_in_lotus_position: "🧘♂️", female_mage: "🧙♀️", mage: "🧙♀️", male_mage: "🧙♂️", female_fairy: "🧚♀️", fairy: "🧚♀️", male_fairy: "🧚♂️", female_vampire: "🧛♀️", vampire: "🧛♀️", male_vampire: "🧛♂️", mermaid: "🧜♀️", merman: "🧜♂️", merperson: "🧜♂️", female_elf: "🧝♀️", male_elf: "🧝♂️", elf: "🧝♂️", female_genie: "🧞♀️", male_genie: "🧞♂️", genie: "🧞♂️", female_zombie: "🧟♀️", male_zombie: "🧟♂️", zombie: "🧟♂️", brain: "🧠", orange_heart: "🧡", billed_cap: "🧢", scarf: "🧣", gloves: "🧤", coat: "🧥", socks: "🧦", red_envelope: "🧧", firecracker: "🧨", jigsaw: "🧩", test_tube: "🧪", petri_dish: "🧫", dna: "🧬", compass: "🧭", abacus: "🧮", fire_extinguisher: "🧯", toolbox: "🧰", bricks: "🧱", magnet: "🧲", luggage: "🧳", lotion_bottle: "🧴", thread: "🧵", yarn: "🧶", safety_pin: "🧷", teddy_bear: "🧸", broom: "🧹", basket: "🧺", roll_of_paper: "🧻", soap: "🧼", sponge: "🧽", receipt: "🧾", nazar_amulet: "🧿", ballet_shoes: "🩰", "one-piece_swimsuit": "🩱", briefs: "🩲", shorts: "🩳", thong_sandal: "🩴", drop_of_blood: "🩸", adhesive_bandage: "🩹", stethoscope: "🩺", "yo-yo": "🪀", kite: "🪁", parachute: "🪂", boomerang: "🪃", magic_wand: "🪄", pinata: "🪅", nesting_dolls: "🪆", ringed_planet: "🪐", chair: "🪑", razor: "🪒", axe: "🪓", diya_lamp: "🪔", banjo: "🪕", military_helmet: "🪖", accordion: "🪗", long_drum: "🪘", coin: "🪙", carpentry_saw: "🪚", screwdriver: "🪛", ladder: "🪜", hook: "🪝", mirror: "🪞", window: "🪟", plunger: "🪠", sewing_needle: "🪡", knot: "🪢", bucket: "🪣", mouse_trap: "🪤", toothbrush: "🪥", headstone: "🪦", placard: "🪧", rock: "🪨", fly: "🪰", worm: "🪱", beetle: "🪲", cockroach: "🪳", potted_plant: "🪴", wood: "🪵", feather: "🪶", anatomical_heart: "🫀", lungs: "🫁", people_hugging: "🫂", blueberries: "🫐", bell_pepper: "🫑", olive: "🫒", flatbread: "🫓", tamale: "🫔", fondue: "🫕", teapot: "🫖", bangbang: "‼️", interrobang: "⁉️", tm: "™️", information_source: "ℹ️", left_right_arrow: "↔️", arrow_up_down: "↕️", arrow_upper_left: "↖️", arrow_upper_right: "↗️", arrow_lower_right: "↘️", arrow_lower_left: "↙️", leftwards_arrow_with_hook: "↩️", arrow_right_hook: "↪️", watch: "⌚", hourglass: "⌛", keyboard: "⌨️", eject: "⏏️", fast_forward: "⏩", rewind: "⏪", arrow_double_up: "⏫", arrow_double_down: "⏬", black_right_pointing_double_triangle_with_vertical_bar: "⏭️", black_left_pointing_double_triangle_with_vertical_bar: "⏮️", black_right_pointing_triangle_with_double_vertical_bar: "⏯️", alarm_clock: "⏰", stopwatch: "⏱️", timer_clock: "⏲️", hourglass_flowing_sand: "⏳", double_vertical_bar: "⏸️", black_square_for_stop: "⏹️", black_circle_for_record: "⏺️", m: "Ⓜ️", black_small_square: "▪️", white_small_square: "▫️", arrow_forward: "▶️", arrow_backward: "◀️", white_medium_square: "◻️", black_medium_square: "◼️", white_medium_small_square: "◽", black_medium_small_square: "◾", sunny: "☀️", cloud: "☁️", umbrella: "☂️", snowman: "☃️", comet: "☄️", phone: "☎️", telephone: "☎️", ballot_box_with_check: "☑️", shamrock: "☘️", point_up: "☝️", skull_and_crossbones: "☠️", radioactive_sign: "☢️", biohazard_sign: "☣️", orthodox_cross: "☦️", star_and_crescent: "☪️", peace_symbol: "☮️", yin_yang: "☯️", wheel_of_dharma: "☸️", white_frowning_face: "☹️", relaxed: "☺️", female_sign: "♀️", male_sign: "♂️", gemini: "♊", cancer: "♋", leo: "♌", virgo: "♍", libra: "♎", scorpius: "♏", chess_pawn: "♟️", spades: "♠️", clubs: "♣️", hearts: "♥️", diamonds: "♦️", hotsprings: "♨️", recycle: "♻️", infinity: "♾️", wheelchair: "♿", hammer_and_pick: "⚒️", crossed_swords: "⚔️", medical_symbol: "⚕️", staff_of_aesculapius: "⚕️", scales: "⚖️", alembic: "⚗️", gear: "⚙️", atom_symbol: "⚛️", fleur_de_lis: "⚜️", warning: "⚠️", zap: "⚡", transgender_symbol: "⚧️", white_circle: "⚪", black_circle: "⚫", coffin: "⚰️", funeral_urn: "⚱️", soccer: "⚽", baseball: "⚾", snowman_without_snow: "⛄", partly_sunny: "⛅", thunder_cloud_and_rain: "⛈️", ophiuchus: "⛎", pick: "⛏️", helmet_with_white_cross: "⛑️", chains: "⛓️", no_entry: "⛔", shinto_shrine: "⛩️", church: "⛪", mountain: "⛰️", umbrella_on_ground: "⛱️", fountain: "⛲", golf: "⛳", ferry: "⛴️", boat: "⛵", sailboat: "⛵", skier: "⛷️", ice_skate: "⛸️", "woman-bouncing-ball": "⛹️♀️", "man-bouncing-ball": "⛹️♂️", person_with_ball: "⛹️♂️", tent: "⛺", fuelpump: "⛽", scissors: "✂️", airplane: "✈️", email: "✉️", envelope: "✉️", fist: "✊", hand: "✋", raised_hand: "✋", v: "✌️", writing_hand: "✍️", pencil2: "✏️", black_nib: "✒️", heavy_check_mark: "✔️", heavy_multiplication_x: "✖️", latin_cross: "✝️", star_of_david: "✡️", eight_spoked_asterisk: "✳️", eight_pointed_black_star: "✴️", snowflake: "❄️", sparkle: "❇️", x: "❌", negative_squared_cross_mark: "❎", heavy_heart_exclamation_mark_ornament: "❣️", heart_on_fire: "❤️🔥", mending_heart: "❤️🩹", heart: "❤️", arrow_right: "➡️", curly_loop: "➰", loop: "➿", arrow_heading_up: "⤴️", arrow_heading_down: "⤵️", arrow_left: "⬅️", arrow_up: "⬆️", arrow_down: "⬇️", black_large_square: "⬛", white_large_square: "⬜", star: "⭐", o: "⭕", wavy_dash: "〰️", part_alternation_mark: "〽️", congratulations: "㊗️", secret: "㊙️" };
|
|
96053
96565
|
});
|
|
96054
96566
|
|
|
96055
96567
|
// node_modules/.bun/node-emoji@1.11.0/node_modules/node-emoji/lib/emoji.js
|
|
96056
|
-
var require_emoji2 = __commonJS((exports, module)
|
|
96568
|
+
var require_emoji2 = __commonJS(function(exports, module) {
|
|
96057
96569
|
var toArray = require_toArray();
|
|
96058
96570
|
var emojiByName = require_emoji();
|
|
96059
96571
|
var emojiNameRegex = /:([a-zA-Z0-9_\-\+]+):/g;
|
|
@@ -96198,7 +96710,7 @@ var require_emoji2 = __commonJS((exports, module) => {
|
|
|
96198
96710
|
});
|
|
96199
96711
|
|
|
96200
96712
|
// node_modules/.bun/has-flag@4.0.0/node_modules/has-flag/index.js
|
|
96201
|
-
var require_has_flag = __commonJS((exports, module)
|
|
96713
|
+
var require_has_flag = __commonJS(function(exports, module) {
|
|
96202
96714
|
module.exports = (flag, argv = process.argv) => {
|
|
96203
96715
|
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
96204
96716
|
const position = argv.indexOf(prefix + flag);
|
|
@@ -96208,7 +96720,7 @@ var require_has_flag = __commonJS((exports, module) => {
|
|
|
96208
96720
|
});
|
|
96209
96721
|
|
|
96210
96722
|
// node_modules/.bun/supports-color@7.2.0/node_modules/supports-color/index.js
|
|
96211
|
-
var require_supports_color = __commonJS((exports, module)
|
|
96723
|
+
var require_supports_color = __commonJS(function(exports, module) {
|
|
96212
96724
|
var os = __require("os");
|
|
96213
96725
|
var tty = __require("tty");
|
|
96214
96726
|
var hasFlag = require_has_flag();
|
|
@@ -96307,7 +96819,7 @@ var require_supports_color = __commonJS((exports, module) => {
|
|
|
96307
96819
|
});
|
|
96308
96820
|
|
|
96309
96821
|
// node_modules/.bun/supports-hyperlinks@2.3.0/node_modules/supports-hyperlinks/index.js
|
|
96310
|
-
var require_supports_hyperlinks = __commonJS((exports, module)
|
|
96822
|
+
var require_supports_hyperlinks = __commonJS(function(exports, module) {
|
|
96311
96823
|
var supportsColor = require_supports_color();
|
|
96312
96824
|
var hasFlag = require_has_flag();
|
|
96313
96825
|
function parseVersion(versionString) {
|
|
@@ -96386,7 +96898,7 @@ var require_supports_hyperlinks = __commonJS((exports, module) => {
|
|
|
96386
96898
|
});
|
|
96387
96899
|
|
|
96388
96900
|
// node_modules/.bun/marked-terminal@5.2.0+2cbc53c039b95cf4/node_modules/marked-terminal/index.cjs
|
|
96389
|
-
var require_marked_terminal = __commonJS((exports, module)
|
|
96901
|
+
var require_marked_terminal = __commonJS(function(exports, module) {
|
|
96390
96902
|
var process$1 = __require("node:process");
|
|
96391
96903
|
var os = __require("node:os");
|
|
96392
96904
|
var tty = __require("node:tty");
|
|
@@ -97374,7 +97886,7 @@ var require_marked_terminal = __commonJS((exports, module) => {
|
|
|
97374
97886
|
});
|
|
97375
97887
|
|
|
97376
97888
|
// node_modules/.bun/escape-string-regexp@1.0.5/node_modules/escape-string-regexp/index.js
|
|
97377
|
-
var require_escape_string_regexp = __commonJS((exports, module)
|
|
97889
|
+
var require_escape_string_regexp = __commonJS(function(exports, module) {
|
|
97378
97890
|
var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
|
|
97379
97891
|
module.exports = function(str) {
|
|
97380
97892
|
if (typeof str !== "string") {
|
|
@@ -97385,7 +97897,7 @@ var require_escape_string_regexp = __commonJS((exports, module) => {
|
|
|
97385
97897
|
});
|
|
97386
97898
|
|
|
97387
97899
|
// node_modules/.bun/ansi-styles@2.2.1/node_modules/ansi-styles/index.js
|
|
97388
|
-
var require_ansi_styles = __commonJS((exports, module)
|
|
97900
|
+
var require_ansi_styles = __commonJS(function(exports, module) {
|
|
97389
97901
|
function assembleStyles() {
|
|
97390
97902
|
var styles2 = {
|
|
97391
97903
|
modifiers: {
|
|
@@ -97444,14 +97956,14 @@ var require_ansi_styles = __commonJS((exports, module) => {
|
|
|
97444
97956
|
});
|
|
97445
97957
|
|
|
97446
97958
|
// node_modules/.bun/has-ansi@2.0.0/node_modules/has-ansi/index.js
|
|
97447
|
-
var require_has_ansi = __commonJS((exports, module)
|
|
97959
|
+
var require_has_ansi = __commonJS(function(exports, module) {
|
|
97448
97960
|
var ansiRegex = require_ansi_regex();
|
|
97449
97961
|
var re = new RegExp(ansiRegex().source);
|
|
97450
97962
|
module.exports = re.test.bind(re);
|
|
97451
97963
|
});
|
|
97452
97964
|
|
|
97453
97965
|
// node_modules/.bun/supports-color@2.0.0/node_modules/supports-color/index.js
|
|
97454
|
-
var require_supports_color2 = __commonJS((exports, module)
|
|
97966
|
+
var require_supports_color2 = __commonJS(function(exports, module) {
|
|
97455
97967
|
var argv = process.argv;
|
|
97456
97968
|
var terminator = argv.indexOf("--");
|
|
97457
97969
|
var hasFlag = function(flag) {
|
|
@@ -97489,7 +98001,7 @@ var require_supports_color2 = __commonJS((exports, module) => {
|
|
|
97489
98001
|
});
|
|
97490
98002
|
|
|
97491
98003
|
// node_modules/.bun/chalk@1.1.3/node_modules/chalk/index.js
|
|
97492
|
-
var require_chalk = __commonJS((exports, module)
|
|
98004
|
+
var require_chalk = __commonJS(function(exports, module) {
|
|
97493
98005
|
var escapeStringRegexp = require_escape_string_regexp();
|
|
97494
98006
|
var ansiStyles = require_ansi_styles();
|
|
97495
98007
|
var stripAnsi = require_strip_ansi();
|
|
@@ -97570,7 +98082,7 @@ var require_chalk = __commonJS((exports, module) => {
|
|
|
97570
98082
|
});
|
|
97571
98083
|
|
|
97572
98084
|
// node_modules/.bun/blessed-contrib@4.11.0/node_modules/blessed-contrib/lib/widget/markdown.js
|
|
97573
|
-
var require_markdown = __commonJS((exports, module)
|
|
98085
|
+
var require_markdown = __commonJS(function(exports, module) {
|
|
97574
98086
|
var blessed = require_blessed();
|
|
97575
98087
|
var Box = blessed.Box;
|
|
97576
98088
|
var marked = require_marked();
|
|
@@ -97624,7 +98136,7 @@ var require_markdown = __commonJS((exports, module) => {
|
|
|
97624
98136
|
});
|
|
97625
98137
|
|
|
97626
98138
|
// node_modules/.bun/blessed-contrib@4.11.0/node_modules/blessed-contrib/lib/widget/charts/bar.js
|
|
97627
|
-
var require_bar = __commonJS((exports, module)
|
|
98139
|
+
var require_bar = __commonJS(function(exports, module) {
|
|
97628
98140
|
var blessed = require_blessed();
|
|
97629
98141
|
var Node = blessed.Node;
|
|
97630
98142
|
var Canvas = require_canvas();
|
|
@@ -97705,7 +98217,7 @@ var require_bar = __commonJS((exports, module) => {
|
|
|
97705
98217
|
});
|
|
97706
98218
|
|
|
97707
98219
|
// node_modules/.bun/blessed-contrib@4.11.0/node_modules/blessed-contrib/lib/widget/charts/stacked-bar.js
|
|
97708
|
-
var require_stacked_bar = __commonJS((exports, module)
|
|
98220
|
+
var require_stacked_bar = __commonJS(function(exports, module) {
|
|
97709
98221
|
var blessed = require_blessed();
|
|
97710
98222
|
var Node = blessed.Node;
|
|
97711
98223
|
var Canvas = require_canvas();
|
|
@@ -97861,7 +98373,7 @@ var require_stacked_bar = __commonJS((exports, module) => {
|
|
|
97861
98373
|
});
|
|
97862
98374
|
|
|
97863
98375
|
// node_modules/.bun/lodash@4.17.21/node_modules/lodash/lodash.js
|
|
97864
|
-
var require_lodash = __commonJS((exports, module)
|
|
98376
|
+
var require_lodash = __commonJS(function(exports, module) {
|
|
97865
98377
|
(function() {
|
|
97866
98378
|
var undefined2;
|
|
97867
98379
|
var VERSION = "4.17.21";
|
|
@@ -101088,7 +101600,7 @@ var require_lodash = __commonJS((exports, module) => {
|
|
|
101088
101600
|
}
|
|
101089
101601
|
return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped, undefined2, comparator) : [];
|
|
101090
101602
|
});
|
|
101091
|
-
function
|
|
101603
|
+
function join13(array, separator) {
|
|
101092
101604
|
return array == null ? "" : nativeJoin.call(array, separator);
|
|
101093
101605
|
}
|
|
101094
101606
|
function last(array) {
|
|
@@ -103020,7 +103532,7 @@ __p += '`;
|
|
|
103020
103532
|
lodash.isUndefined = isUndefined;
|
|
103021
103533
|
lodash.isWeakMap = isWeakMap;
|
|
103022
103534
|
lodash.isWeakSet = isWeakSet;
|
|
103023
|
-
lodash.join =
|
|
103535
|
+
lodash.join = join13;
|
|
103024
103536
|
lodash.kebabCase = kebabCase;
|
|
103025
103537
|
lodash.last = last;
|
|
103026
103538
|
lodash.lastIndexOf = lastIndexOf;
|
|
@@ -103277,7 +103789,7 @@ __p += '`;
|
|
|
103277
103789
|
});
|
|
103278
103790
|
|
|
103279
103791
|
// node_modules/.bun/blessed-contrib@4.11.0/node_modules/blessed-contrib/lib/widget/charts/line.js
|
|
103280
|
-
var require_line = __commonJS((exports, module)
|
|
103792
|
+
var require_line = __commonJS(function(exports, module) {
|
|
103281
103793
|
var blessed = require_blessed();
|
|
103282
103794
|
var Node = blessed.Node;
|
|
103283
103795
|
var Canvas = require_canvas();
|
|
@@ -103484,7 +103996,7 @@ var require_line = __commonJS((exports, module) => {
|
|
|
103484
103996
|
});
|
|
103485
103997
|
|
|
103486
103998
|
// node_modules/.bun/blessed-contrib@4.11.0/node_modules/blessed-contrib/lib/server-utils.js
|
|
103487
|
-
var require_server_utils = __commonJS((exports)
|
|
103999
|
+
var require_server_utils = __commonJS(function(exports) {
|
|
103488
104000
|
var url = __require("url");
|
|
103489
104001
|
var contrib = require_blessed_contrib();
|
|
103490
104002
|
var blessed = require_blessed();
|
|
@@ -103548,7 +104060,7 @@ var require_server_utils = __commonJS((exports) => {
|
|
|
103548
104060
|
});
|
|
103549
104061
|
|
|
103550
104062
|
// node_modules/.bun/blessed-contrib@4.11.0/node_modules/blessed-contrib/index.js
|
|
103551
|
-
var require_blessed_contrib = __commonJS((exports)
|
|
104063
|
+
var require_blessed_contrib = __commonJS(function(exports) {
|
|
103552
104064
|
exports.grid = require_grid();
|
|
103553
104065
|
exports.carousel = require_carousel();
|
|
103554
104066
|
exports.map = require_map2();
|
|
@@ -103701,32 +104213,20 @@ __export(exports_dev, {
|
|
|
103701
104213
|
default: () => dev
|
|
103702
104214
|
});
|
|
103703
104215
|
import { spawn } from "node:child_process";
|
|
103704
|
-
import { existsSync as
|
|
103705
|
-
import { join as
|
|
103706
|
-
|
|
103707
|
-
|
|
103708
|
-
const
|
|
103709
|
-
if (
|
|
103710
|
-
return
|
|
103711
|
-
}
|
|
103712
|
-
const cwd = process.cwd();
|
|
103713
|
-
const nodeModulesPaths = [
|
|
103714
|
-
join11(cwd, "node_modules", ".bin", "reroute"),
|
|
103715
|
-
join11(cwd, "..", "node_modules", ".bin", "reroute"),
|
|
103716
|
-
join11(cwd, "..", "..", "node_modules", ".bin", "reroute"),
|
|
103717
|
-
join11(cwd, "..", "..", "..", "node_modules", ".bin", "reroute")
|
|
103718
|
-
];
|
|
103719
|
-
for (const binPath2 of nodeModulesPaths) {
|
|
103720
|
-
if (existsSync6(binPath2)) {
|
|
103721
|
-
return binPath2;
|
|
103722
|
-
}
|
|
104216
|
+
import { existsSync as existsSync7 } from "node:fs";
|
|
104217
|
+
import { join as join13 } from "node:path";
|
|
104218
|
+
import { pathToFileURL as pathToFileURL9 } from "node:url";
|
|
104219
|
+
function parsePort(args) {
|
|
104220
|
+
const portIndex = args.findIndex((arg) => arg === "--port" || arg === "-p");
|
|
104221
|
+
if (portIndex !== -1 && args[portIndex + 1]) {
|
|
104222
|
+
return Number(args[portIndex + 1]);
|
|
103723
104223
|
}
|
|
103724
|
-
return "
|
|
104224
|
+
return Number(process.env.PORT || "3000");
|
|
103725
104225
|
}
|
|
103726
104226
|
async function waitForInitialBuild(genProcess) {
|
|
103727
104227
|
console.log("[reroute/dev] Waiting for initial build...");
|
|
103728
104228
|
const outputBuffer = [];
|
|
103729
|
-
const buildCompletePromise = new Promise((
|
|
104229
|
+
const buildCompletePromise = new Promise((resolve3, reject) => {
|
|
103730
104230
|
const timeout = setTimeout(() => {
|
|
103731
104231
|
reject(new Error("Timeout waiting for initial build to complete (120s)"));
|
|
103732
104232
|
}, 120000);
|
|
@@ -103736,7 +104236,7 @@ async function waitForInitialBuild(genProcess) {
|
|
|
103736
104236
|
clearTimeout(timeout);
|
|
103737
104237
|
genProcess.stdout?.removeListener("data", checkComplete);
|
|
103738
104238
|
genProcess.stderr?.removeListener("data", checkComplete);
|
|
103739
|
-
|
|
104239
|
+
resolve3();
|
|
103740
104240
|
}
|
|
103741
104241
|
};
|
|
103742
104242
|
genProcess.stdout?.on("data", checkComplete);
|
|
@@ -103746,15 +104246,33 @@ async function waitForInitialBuild(genProcess) {
|
|
|
103746
104246
|
console.log("[reroute/dev] Initial build complete!");
|
|
103747
104247
|
return outputBuffer;
|
|
103748
104248
|
}
|
|
103749
|
-
async function
|
|
104249
|
+
async function startTui(port) {
|
|
104250
|
+
const rerouteCmd = getRerouteCommand();
|
|
104251
|
+
const useShell = rerouteCmd.includes(" ");
|
|
104252
|
+
const genCommand = useShell ? `${rerouteCmd} gen --watch` : rerouteCmd;
|
|
104253
|
+
const genArgs = useShell ? [] : ["gen", "--watch"];
|
|
104254
|
+
const genProcess = spawn(genCommand, genArgs, {
|
|
104255
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
104256
|
+
shell: useShell,
|
|
104257
|
+
env: {
|
|
104258
|
+
...process.env,
|
|
104259
|
+
PORT: String(port),
|
|
104260
|
+
REROUTE_DEV: "1"
|
|
104261
|
+
}
|
|
104262
|
+
});
|
|
104263
|
+
const outputBuffer = await waitForInitialBuild(genProcess).catch((error) => {
|
|
104264
|
+
console.error("[reroute/dev] Failed to complete initial build:", error);
|
|
104265
|
+
genProcess.kill();
|
|
104266
|
+
process.exit(1);
|
|
104267
|
+
});
|
|
103750
104268
|
const serverProcess = spawn("bun", ["--watch", "src/index.ts"], {
|
|
103751
104269
|
stdio: ["ignore", "pipe", "pipe"],
|
|
103752
104270
|
env: {
|
|
103753
104271
|
...process.env,
|
|
103754
|
-
PORT: String(port)
|
|
104272
|
+
PORT: String(port),
|
|
104273
|
+
REROUTE_DEV: "1"
|
|
103755
104274
|
}
|
|
103756
104275
|
});
|
|
103757
|
-
console.log("[reroute/dev] Starting server...");
|
|
103758
104276
|
try {
|
|
103759
104277
|
await waitForServerReady(port);
|
|
103760
104278
|
console.log(`[reroute/dev] ✓ Server ready at http://localhost:${port}
|
|
@@ -103765,48 +104283,6 @@ async function startServerProcess(genProcess, port) {
|
|
|
103765
104283
|
serverProcess.kill();
|
|
103766
104284
|
process.exit(1);
|
|
103767
104285
|
}
|
|
103768
|
-
return serverProcess;
|
|
103769
|
-
}
|
|
103770
|
-
function setupDefaultMode(genProcess, serverProcess, outputBuffer) {
|
|
103771
|
-
const genBuffer = { current: "" };
|
|
103772
|
-
const serverBuffer = { current: "" };
|
|
103773
|
-
const handleGenOutput = (data) => {
|
|
103774
|
-
const text = genBuffer.current + data.toString();
|
|
103775
|
-
const lines = text.split(`
|
|
103776
|
-
`);
|
|
103777
|
-
genBuffer.current = lines.pop() || "";
|
|
103778
|
-
for (const line of lines) {
|
|
103779
|
-
if (!line.trim())
|
|
103780
|
-
continue;
|
|
103781
|
-
const ansiColored = colorizeLogPrefixAnsi(line);
|
|
103782
|
-
console.log(ansiColored);
|
|
103783
|
-
}
|
|
103784
|
-
};
|
|
103785
|
-
const handleServerOutput = createServerOutputHandler(serverBuffer);
|
|
103786
|
-
for (const data of outputBuffer) {
|
|
103787
|
-
handleGenOutput(data);
|
|
103788
|
-
}
|
|
103789
|
-
genProcess.stdout?.on("data", handleGenOutput);
|
|
103790
|
-
genProcess.stderr?.on("data", handleGenOutput);
|
|
103791
|
-
serverProcess.stdout?.on("data", handleServerOutput);
|
|
103792
|
-
serverProcess.stderr?.on("data", handleServerOutput);
|
|
103793
|
-
genProcess.on("exit", (code) => {
|
|
103794
|
-
console.log(`
|
|
103795
|
-
[reroute/gen] Process exited with code ${code}`);
|
|
103796
|
-
});
|
|
103797
|
-
serverProcess.on("exit", (code) => {
|
|
103798
|
-
console.log(`
|
|
103799
|
-
[server] Process exited with code ${code}`);
|
|
103800
|
-
});
|
|
103801
|
-
process.on("SIGINT", () => {
|
|
103802
|
-
console.log(`
|
|
103803
|
-
[reroute/dev] Shutting down...`);
|
|
103804
|
-
genProcess.kill("SIGINT");
|
|
103805
|
-
serverProcess.kill("SIGINT");
|
|
103806
|
-
process.exit(0);
|
|
103807
|
-
});
|
|
103808
|
-
}
|
|
103809
|
-
async function setupTerminalUI(genProcess, serverProcess, outputBuffer) {
|
|
103810
104286
|
const blessed = await Promise.resolve().then(() => __toESM(require_blessed(), 1));
|
|
103811
104287
|
const contrib = await Promise.resolve().then(() => __toESM(require_blessed_contrib(), 1));
|
|
103812
104288
|
const screen = blessed.default.screen({
|
|
@@ -103822,33 +104298,53 @@ async function setupTerminalUI(genProcess, serverProcess, outputBuffer) {
|
|
|
103822
104298
|
const { setupTerminalUIHandlers: setupTerminalUIHandlers2 } = await Promise.resolve().then(() => exports_terminal_ui);
|
|
103823
104299
|
setupTerminalUIHandlers2(screen, grid, genProcess, serverProcess, outputBuffer, blessed, colorizeLogPrefix);
|
|
103824
104300
|
}
|
|
104301
|
+
async function startDefault(port) {
|
|
104302
|
+
process.env.PORT = String(port);
|
|
104303
|
+
process.env.REROUTE_DEV = "1";
|
|
104304
|
+
const session = await startGenWatch(process.cwd(), ["--watch"]);
|
|
104305
|
+
const entry = join13(process.cwd(), "src/index.ts");
|
|
104306
|
+
if (!existsSync7(entry)) {
|
|
104307
|
+
session.close();
|
|
104308
|
+
throw new Error(`[reroute/dev] Missing ${entry}`);
|
|
104309
|
+
}
|
|
104310
|
+
console.log("[reroute/dev] Starting server...");
|
|
104311
|
+
await import(pathToFileURL9(entry).href);
|
|
104312
|
+
try {
|
|
104313
|
+
await waitForServerReady(port);
|
|
104314
|
+
console.log(`[reroute/dev] ✓ Server ready at http://localhost:${port}
|
|
104315
|
+
`);
|
|
104316
|
+
} catch (error) {
|
|
104317
|
+
session.close();
|
|
104318
|
+
console.error("[reroute/dev] Server failed to start:", error);
|
|
104319
|
+
process.exit(1);
|
|
104320
|
+
}
|
|
104321
|
+
const shutdown = () => {
|
|
104322
|
+
console.log(`
|
|
104323
|
+
[reroute/dev] Shutting down...`);
|
|
104324
|
+
session.close();
|
|
104325
|
+
process.exit(0);
|
|
104326
|
+
};
|
|
104327
|
+
process.on("SIGINT", shutdown);
|
|
104328
|
+
process.on("SIGTERM", shutdown);
|
|
104329
|
+
}
|
|
103825
104330
|
async function dev(args) {
|
|
103826
104331
|
const terminalUI = args.includes("--tui") || args.includes("-t");
|
|
103827
|
-
const
|
|
103828
|
-
|
|
104332
|
+
const port = parsePort(args);
|
|
104333
|
+
if (await isServerRunning(port)) {
|
|
104334
|
+
console.log(`[reroute/dev] Already running at http://localhost:${port} — not starting another instance`);
|
|
104335
|
+
return;
|
|
104336
|
+
}
|
|
104337
|
+
process.env.PORT = String(port);
|
|
104338
|
+
process.env.REROUTE_DEV = "1";
|
|
103829
104339
|
try {
|
|
103830
|
-
console.log("[reroute/dev] Starting development
|
|
104340
|
+
console.log("[reroute/dev] Starting development server...");
|
|
103831
104341
|
console.log(`[reroute/dev] Press Ctrl+C to stop
|
|
103832
104342
|
`);
|
|
103833
|
-
|
|
103834
|
-
|
|
103835
|
-
|
|
103836
|
-
const genArgs = useShell ? [] : ["gen", "--watch"];
|
|
103837
|
-
const genProcess = spawn(genCommand, genArgs, {
|
|
103838
|
-
stdio: ["ignore", "pipe", "pipe"],
|
|
103839
|
-
shell: useShell
|
|
103840
|
-
});
|
|
103841
|
-
const outputBuffer = await waitForInitialBuild(genProcess).catch((error) => {
|
|
103842
|
-
console.error("[reroute/dev] Failed to complete initial build:", error);
|
|
103843
|
-
genProcess.kill();
|
|
103844
|
-
process.exit(1);
|
|
103845
|
-
});
|
|
103846
|
-
const serverProcess = await startServerProcess(genProcess, port);
|
|
103847
|
-
if (!terminalUI) {
|
|
103848
|
-
setupDefaultMode(genProcess, serverProcess, outputBuffer);
|
|
103849
|
-
} else {
|
|
103850
|
-
await setupTerminalUI(genProcess, serverProcess, outputBuffer);
|
|
104343
|
+
if (terminalUI) {
|
|
104344
|
+
await startTui(port);
|
|
104345
|
+
return;
|
|
103851
104346
|
}
|
|
104347
|
+
await startDefault(port);
|
|
103852
104348
|
} catch (error) {
|
|
103853
104349
|
if (error.code === "SIGINT") {
|
|
103854
104350
|
console.log(`
|
|
@@ -103860,6 +104356,8 @@ async function dev(args) {
|
|
|
103860
104356
|
}
|
|
103861
104357
|
}
|
|
103862
104358
|
var init_dev = __esm(() => {
|
|
104359
|
+
init_gen();
|
|
104360
|
+
init_command();
|
|
103863
104361
|
init_log();
|
|
103864
104362
|
});
|
|
103865
104363
|
|
|
@@ -103869,23 +104367,23 @@ __export(exports_start, {
|
|
|
103869
104367
|
default: () => start
|
|
103870
104368
|
});
|
|
103871
104369
|
import { spawn as spawn2 } from "node:child_process";
|
|
103872
|
-
import { existsSync as
|
|
103873
|
-
import { join as
|
|
104370
|
+
import { existsSync as existsSync8 } from "node:fs";
|
|
104371
|
+
import { join as join14 } from "node:path";
|
|
103874
104372
|
function getRerouteCommand2() {
|
|
103875
|
-
const binPath =
|
|
103876
|
-
const isBunDev =
|
|
104373
|
+
const binPath = join14(import.meta.dir, "..", "..", "bin.ts");
|
|
104374
|
+
const isBunDev = existsSync8(binPath);
|
|
103877
104375
|
if (isBunDev) {
|
|
103878
104376
|
return `bun ${binPath}`;
|
|
103879
104377
|
}
|
|
103880
104378
|
const cwd = process.cwd();
|
|
103881
104379
|
const nodeModulesPaths = [
|
|
103882
|
-
|
|
103883
|
-
|
|
103884
|
-
|
|
103885
|
-
|
|
104380
|
+
join14(cwd, "node_modules", ".bin", "reroute"),
|
|
104381
|
+
join14(cwd, "..", "node_modules", ".bin", "reroute"),
|
|
104382
|
+
join14(cwd, "..", "..", "node_modules", ".bin", "reroute"),
|
|
104383
|
+
join14(cwd, "..", "..", "..", "node_modules", ".bin", "reroute")
|
|
103886
104384
|
];
|
|
103887
104385
|
for (const binPath2 of nodeModulesPaths) {
|
|
103888
|
-
if (
|
|
104386
|
+
if (existsSync8(binPath2)) {
|
|
103889
104387
|
return binPath2;
|
|
103890
104388
|
}
|
|
103891
104389
|
}
|
|
@@ -103922,7 +104420,7 @@ async function start(args) {
|
|
|
103922
104420
|
`);
|
|
103923
104421
|
const genCommand = useShell ? `${rerouteCmd} gen ${genArgs.join(" ")}` : rerouteCmd;
|
|
103924
104422
|
const genArgsWithCmd = useShell ? [] : ["gen", ...genArgs];
|
|
103925
|
-
await new Promise((
|
|
104423
|
+
await new Promise((resolve3, reject) => {
|
|
103926
104424
|
const genProcess = spawn2(genCommand, genArgsWithCmd, {
|
|
103927
104425
|
stdio: ["ignore", "pipe", "pipe"],
|
|
103928
104426
|
shell: useShell
|
|
@@ -103933,7 +104431,7 @@ async function start(args) {
|
|
|
103933
104431
|
if (code !== null && code !== 0) {
|
|
103934
104432
|
reject(new Error(`Gen exited with code ${code}`));
|
|
103935
104433
|
} else {
|
|
103936
|
-
|
|
104434
|
+
resolve3();
|
|
103937
104435
|
}
|
|
103938
104436
|
});
|
|
103939
104437
|
genProcess.on("error", (error) => {
|
|
@@ -103974,13 +104472,13 @@ async function start(args) {
|
|
|
103974
104472
|
serverProcess.kill("SIGINT");
|
|
103975
104473
|
process.exit(0);
|
|
103976
104474
|
});
|
|
103977
|
-
await new Promise((
|
|
104475
|
+
await new Promise((resolve3, reject) => {
|
|
103978
104476
|
serverProcess.on("exit", (code) => {
|
|
103979
104477
|
if (code !== null && code !== 0) {
|
|
103980
104478
|
console.error(colorizeLogPrefixAnsi(`[reroute/start] Server exited with code ${code}`));
|
|
103981
104479
|
reject(new Error(`Server exited with code ${code}`));
|
|
103982
104480
|
} else {
|
|
103983
|
-
|
|
104481
|
+
resolve3();
|
|
103984
104482
|
}
|
|
103985
104483
|
});
|
|
103986
104484
|
serverProcess.on("error", (error) => {
|
|
@@ -104006,17 +104504,17 @@ var init_start = __esm(() => {
|
|
|
104006
104504
|
// packages/cli/src/commands/lib/assets.ts
|
|
104007
104505
|
import {
|
|
104008
104506
|
cpSync,
|
|
104009
|
-
existsSync as
|
|
104507
|
+
existsSync as existsSync9,
|
|
104010
104508
|
mkdirSync,
|
|
104011
104509
|
readdirSync
|
|
104012
104510
|
} from "node:fs";
|
|
104013
|
-
import { join as
|
|
104511
|
+
import { join as join15 } from "node:path";
|
|
104014
104512
|
function copyAssetsToReroute(cwd, sourceAssetsDir, rerouteAssetsDir) {
|
|
104015
|
-
if (!
|
|
104513
|
+
if (!existsSync9(sourceAssetsDir)) {
|
|
104016
104514
|
return 0;
|
|
104017
104515
|
}
|
|
104018
|
-
const rerouteDir =
|
|
104019
|
-
if (!
|
|
104516
|
+
const rerouteDir = join15(cwd, ".reroute");
|
|
104517
|
+
if (!existsSync9(rerouteDir)) {
|
|
104020
104518
|
mkdirSync(rerouteDir, { recursive: true });
|
|
104021
104519
|
}
|
|
104022
104520
|
cpSync(sourceAssetsDir, rerouteAssetsDir, { recursive: true });
|
|
@@ -104027,7 +104525,7 @@ function countFiles(dir) {
|
|
|
104027
104525
|
const entries = readdirSync(dir, { withFileTypes: true });
|
|
104028
104526
|
for (const entry of entries) {
|
|
104029
104527
|
if (entry.isDirectory()) {
|
|
104030
|
-
count += countFiles(
|
|
104528
|
+
count += countFiles(join15(dir, entry.name));
|
|
104031
104529
|
} else {
|
|
104032
104530
|
count++;
|
|
104033
104531
|
}
|
|
@@ -104042,23 +104540,23 @@ __export(exports_build, {
|
|
|
104042
104540
|
default: () => build
|
|
104043
104541
|
});
|
|
104044
104542
|
import { spawn as spawn3 } from "node:child_process";
|
|
104045
|
-
import { existsSync as
|
|
104046
|
-
import { join as
|
|
104543
|
+
import { existsSync as existsSync10, readFileSync as readFileSync5, rmSync, unlinkSync } from "node:fs";
|
|
104544
|
+
import { join as join16 } from "node:path";
|
|
104047
104545
|
function getRerouteCommand3() {
|
|
104048
|
-
const binPath =
|
|
104049
|
-
const isBunDev =
|
|
104546
|
+
const binPath = join16(import.meta.dir, "..", "..", "bin.ts");
|
|
104547
|
+
const isBunDev = existsSync10(binPath);
|
|
104050
104548
|
if (isBunDev) {
|
|
104051
104549
|
return `bun ${binPath}`;
|
|
104052
104550
|
}
|
|
104053
104551
|
const cwd = process.cwd();
|
|
104054
104552
|
const nodeModulesPaths = [
|
|
104055
|
-
|
|
104056
|
-
|
|
104057
|
-
|
|
104058
|
-
|
|
104553
|
+
join16(cwd, "node_modules", ".bin", "reroute"),
|
|
104554
|
+
join16(cwd, "..", "node_modules", ".bin", "reroute"),
|
|
104555
|
+
join16(cwd, "..", "..", "node_modules", ".bin", "reroute"),
|
|
104556
|
+
join16(cwd, "..", "..", "..", "node_modules", ".bin", "reroute")
|
|
104059
104557
|
];
|
|
104060
104558
|
for (const binPath2 of nodeModulesPaths) {
|
|
104061
|
-
if (
|
|
104559
|
+
if (existsSync10(binPath2)) {
|
|
104062
104560
|
return binPath2;
|
|
104063
104561
|
}
|
|
104064
104562
|
}
|
|
@@ -104066,10 +104564,10 @@ function getRerouteCommand3() {
|
|
|
104066
104564
|
}
|
|
104067
104565
|
function getOutputName() {
|
|
104068
104566
|
const cwd = process.cwd();
|
|
104069
|
-
const packageJsonPath =
|
|
104070
|
-
if (
|
|
104567
|
+
const packageJsonPath = join16(cwd, "package.json");
|
|
104568
|
+
if (existsSync10(packageJsonPath)) {
|
|
104071
104569
|
try {
|
|
104072
|
-
const packageJson = JSON.parse(
|
|
104570
|
+
const packageJson = JSON.parse(readFileSync5(packageJsonPath, "utf-8"));
|
|
104073
104571
|
const name = packageJson.name;
|
|
104074
104572
|
if (name) {
|
|
104075
104573
|
const parts = name.split("-");
|
|
@@ -104098,20 +104596,20 @@ function parseBuildArgs(args) {
|
|
|
104098
104596
|
return { outfile, compileBinary, noCompression, externalArgs };
|
|
104099
104597
|
}
|
|
104100
104598
|
function cleanDistFolder(cwd) {
|
|
104101
|
-
const distDir =
|
|
104102
|
-
if (
|
|
104599
|
+
const distDir = join16(cwd, "dist");
|
|
104600
|
+
if (existsSync10(distDir)) {
|
|
104103
104601
|
process.stdout.write(colorizeLogPrefixAnsi(`[reroute/build] Cleaning dist folder...
|
|
104104
104602
|
`));
|
|
104105
104603
|
rmSync(distDir, { recursive: true });
|
|
104106
104604
|
}
|
|
104107
104605
|
}
|
|
104108
104606
|
async function cleanRerouteFolder(cwd) {
|
|
104109
|
-
const rerouteDir =
|
|
104110
|
-
if (
|
|
104607
|
+
const rerouteDir = join16(cwd, ".reroute");
|
|
104608
|
+
if (existsSync10(rerouteDir)) {
|
|
104111
104609
|
process.stdout.write(colorizeLogPrefixAnsi(`[reroute/build] Cleaning .reroute folder...
|
|
104112
104610
|
`));
|
|
104113
104611
|
rmSync(rerouteDir, { recursive: true, force: true });
|
|
104114
|
-
await new Promise((
|
|
104612
|
+
await new Promise((resolve3) => setTimeout(resolve3, 100));
|
|
104115
104613
|
process.stdout.write(colorizeLogPrefixAnsi(`[reroute/build] ✓ .reroute folder cleaned
|
|
104116
104614
|
`));
|
|
104117
104615
|
}
|
|
@@ -104137,7 +104635,7 @@ async function runGenCommand(rerouteCmd, useShell, noCompression) {
|
|
|
104137
104635
|
const genArgs = useShell ? [] : ["gen", "--prod", noCompression ? "--no-compression" : ""];
|
|
104138
104636
|
const genBuffer = { current: "" };
|
|
104139
104637
|
const handleGenOutput = createOutputHandler(genBuffer);
|
|
104140
|
-
await new Promise((
|
|
104638
|
+
await new Promise((resolve3, reject) => {
|
|
104141
104639
|
const genProcess = spawn3(genCommand, genArgs, {
|
|
104142
104640
|
stdio: ["ignore", "pipe", "pipe"],
|
|
104143
104641
|
shell: useShell
|
|
@@ -104148,7 +104646,7 @@ async function runGenCommand(rerouteCmd, useShell, noCompression) {
|
|
|
104148
104646
|
if (code !== null && code !== 0) {
|
|
104149
104647
|
reject(new Error(`Gen exited with code ${code}`));
|
|
104150
104648
|
} else {
|
|
104151
|
-
|
|
104649
|
+
resolve3();
|
|
104152
104650
|
}
|
|
104153
104651
|
});
|
|
104154
104652
|
genProcess.on("error", (error) => {
|
|
@@ -104161,10 +104659,10 @@ async function runGenCommand(rerouteCmd, useShell, noCompression) {
|
|
|
104161
104659
|
async function copyAssets(cwd) {
|
|
104162
104660
|
const config2 = await loadConfig(cwd);
|
|
104163
104661
|
const appSrc = config2.app?.src ?? "./src/client/App";
|
|
104164
|
-
const
|
|
104165
|
-
const assetsPath =
|
|
104166
|
-
const sourceAssetsDir =
|
|
104167
|
-
const rerouteAssetsDir =
|
|
104662
|
+
const dirname8 = __require("node:path").dirname;
|
|
104663
|
+
const assetsPath = dirname8(appSrc);
|
|
104664
|
+
const sourceAssetsDir = join16(cwd, assetsPath, "assets");
|
|
104665
|
+
const rerouteAssetsDir = join16(cwd, ".reroute", "assets");
|
|
104168
104666
|
process.stdout.write(colorizeLogPrefixAnsi(`[reroute/build] Copying assets...
|
|
104169
104667
|
`));
|
|
104170
104668
|
const fileCount = copyAssetsToReroute(cwd, sourceAssetsDir, rerouteAssetsDir);
|
|
@@ -104179,9 +104677,9 @@ async function copyAssets(cwd) {
|
|
|
104179
104677
|
async function buildBundle(cwd, buildArgs) {
|
|
104180
104678
|
const external = [...buildArgs.externalArgs, "sharp", "@vercel/og"];
|
|
104181
104679
|
const buildResult = await Bun.build({
|
|
104182
|
-
entrypoints: [
|
|
104680
|
+
entrypoints: [join16(cwd, ".reroute/entry.ts")],
|
|
104183
104681
|
target: "bun",
|
|
104184
|
-
outdir:
|
|
104682
|
+
outdir: join16(cwd, "dist"),
|
|
104185
104683
|
sourcemap: "external",
|
|
104186
104684
|
...getCommonBuildOptions(),
|
|
104187
104685
|
external,
|
|
@@ -104224,8 +104722,8 @@ function cleanupBundledFiles(rerouteDir) {
|
|
|
104224
104722
|
"markdown-components.ts"
|
|
104225
104723
|
];
|
|
104226
104724
|
for (const file of tsFilesToRemove) {
|
|
104227
|
-
const filePath =
|
|
104228
|
-
if (
|
|
104725
|
+
const filePath = join16(rerouteDir, file);
|
|
104726
|
+
if (existsSync10(filePath)) {
|
|
104229
104727
|
try {
|
|
104230
104728
|
unlinkSync(filePath);
|
|
104231
104729
|
cleanupCount++;
|
|
@@ -104234,8 +104732,8 @@ function cleanupBundledFiles(rerouteDir) {
|
|
|
104234
104732
|
}
|
|
104235
104733
|
const dirsToRemove = ["markdown", "streaming"];
|
|
104236
104734
|
for (const dir of dirsToRemove) {
|
|
104237
|
-
const dirPath =
|
|
104238
|
-
if (
|
|
104735
|
+
const dirPath = join16(rerouteDir, dir);
|
|
104736
|
+
if (existsSync10(dirPath)) {
|
|
104239
104737
|
try {
|
|
104240
104738
|
rmSync(dirPath, { recursive: true });
|
|
104241
104739
|
cleanupCount++;
|
|
@@ -104268,7 +104766,7 @@ async function build(args) {
|
|
|
104268
104766
|
await runGenCommand(rerouteCmd, useShell, buildArgs.noCompression);
|
|
104269
104767
|
await copyAssets(cwd);
|
|
104270
104768
|
await buildBundle(cwd, buildArgs);
|
|
104271
|
-
const rerouteDir =
|
|
104769
|
+
const rerouteDir = join16(cwd, ".reroute");
|
|
104272
104770
|
cleanupBundledFiles(rerouteDir);
|
|
104273
104771
|
logBuildComplete(buildStartTime, buildArgs);
|
|
104274
104772
|
process.exit(0);
|
|
@@ -104284,60 +104782,31 @@ var init_build = __esm(() => {
|
|
|
104284
104782
|
init_log();
|
|
104285
104783
|
});
|
|
104286
104784
|
|
|
104287
|
-
// packages/cli/src/commands/lib/command.ts
|
|
104288
|
-
var exports_command = {};
|
|
104289
|
-
__export(exports_command, {
|
|
104290
|
-
getRerouteCommand: () => getRerouteCommand4
|
|
104291
|
-
});
|
|
104292
|
-
import { existsSync as existsSync10 } from "node:fs";
|
|
104293
|
-
import { join as join15 } from "node:path";
|
|
104294
|
-
function getRerouteCommand4() {
|
|
104295
|
-
const binPath = join15(import.meta.dir, "..", "..", "bin.ts");
|
|
104296
|
-
const isBunDev = existsSync10(binPath);
|
|
104297
|
-
if (isBunDev) {
|
|
104298
|
-
return `bun ${binPath}`;
|
|
104299
|
-
}
|
|
104300
|
-
const cwd = process.cwd();
|
|
104301
|
-
const nodeModulesPaths = [
|
|
104302
|
-
join15(cwd, "node_modules", ".bin", "reroute"),
|
|
104303
|
-
join15(cwd, "..", "node_modules", ".bin", "reroute"),
|
|
104304
|
-
join15(cwd, "..", "..", "node_modules", ".bin", "reroute"),
|
|
104305
|
-
join15(cwd, "..", "..", "..", "node_modules", ".bin", "reroute")
|
|
104306
|
-
];
|
|
104307
|
-
for (const binPath2 of nodeModulesPaths) {
|
|
104308
|
-
if (existsSync10(binPath2)) {
|
|
104309
|
-
return binPath2;
|
|
104310
|
-
}
|
|
104311
|
-
}
|
|
104312
|
-
return "reroute";
|
|
104313
|
-
}
|
|
104314
|
-
var init_command = () => {};
|
|
104315
|
-
|
|
104316
104785
|
// packages/cli/src/commands/analyze.ts
|
|
104317
104786
|
var exports_analyze = {};
|
|
104318
104787
|
__export(exports_analyze, {
|
|
104319
104788
|
default: () => analyze
|
|
104320
104789
|
});
|
|
104321
104790
|
import { existsSync as existsSync11, statSync } from "node:fs";
|
|
104322
|
-
import { readdir as readdir8, readFile, stat as
|
|
104323
|
-
import { basename as
|
|
104791
|
+
import { readdir as readdir8, readFile, stat as stat6, writeFile as writeFile2 } from "node:fs/promises";
|
|
104792
|
+
import { basename as basename4, join as join17, relative as relative3 } from "node:path";
|
|
104324
104793
|
import Table from "cli-table3";
|
|
104325
104794
|
async function findChunkBundles(cwd) {
|
|
104326
104795
|
const bundles = [];
|
|
104327
|
-
const chunksDir =
|
|
104796
|
+
const chunksDir = join17(cwd, ".reroute", "chunks");
|
|
104328
104797
|
if (!existsSync11(chunksDir))
|
|
104329
104798
|
return bundles;
|
|
104330
104799
|
const collections2 = await readdir8(chunksDir, { withFileTypes: true });
|
|
104331
104800
|
for (const collection of collections2) {
|
|
104332
104801
|
if (!collection.isDirectory())
|
|
104333
104802
|
continue;
|
|
104334
|
-
const collectionDir =
|
|
104803
|
+
const collectionDir = join17(chunksDir, collection.name);
|
|
104335
104804
|
const files = await readdir8(collectionDir);
|
|
104336
104805
|
for (const file of files) {
|
|
104337
104806
|
if (!file.endsWith(".js"))
|
|
104338
104807
|
continue;
|
|
104339
|
-
const filePath =
|
|
104340
|
-
const stats = await
|
|
104808
|
+
const filePath = join17(collectionDir, file);
|
|
104809
|
+
const stats = await stat6(filePath);
|
|
104341
104810
|
const content2 = await Bun.file(filePath).arrayBuffer();
|
|
104342
104811
|
const gzippedSize = Bun.gzipSync(new Uint8Array(content2)).length;
|
|
104343
104812
|
bundles.push({
|
|
@@ -104354,12 +104823,12 @@ async function findChunkBundles(cwd) {
|
|
|
104354
104823
|
}
|
|
104355
104824
|
async function findDistBundles(cwd) {
|
|
104356
104825
|
const bundles = [];
|
|
104357
|
-
const distDir =
|
|
104826
|
+
const distDir = join17(cwd, "dist");
|
|
104358
104827
|
if (!existsSync11(distDir))
|
|
104359
104828
|
return bundles;
|
|
104360
104829
|
const files = await readdir8(distDir);
|
|
104361
104830
|
for (const file of files) {
|
|
104362
|
-
const filePath =
|
|
104831
|
+
const filePath = join17(distDir, file);
|
|
104363
104832
|
const stats = statSync(filePath);
|
|
104364
104833
|
if (stats.isFile() && !file.endsWith(".map") && !file.endsWith(".d.ts")) {
|
|
104365
104834
|
const content2 = await Bun.file(filePath).arrayBuffer();
|
|
@@ -104385,9 +104854,9 @@ async function findBundles(cwd) {
|
|
|
104385
104854
|
}
|
|
104386
104855
|
async function findBrowserEntry(cwd) {
|
|
104387
104856
|
try {
|
|
104388
|
-
const clientDir =
|
|
104389
|
-
const tsxEntry =
|
|
104390
|
-
const tsEntry =
|
|
104857
|
+
const clientDir = join17(cwd, "src", "client");
|
|
104858
|
+
const tsxEntry = join17(clientDir, "index.tsx");
|
|
104859
|
+
const tsEntry = join17(clientDir, "index.ts");
|
|
104391
104860
|
let sourceEntry = null;
|
|
104392
104861
|
if (existsSync11(tsxEntry)) {
|
|
104393
104862
|
sourceEntry = tsxEntry;
|
|
@@ -104420,17 +104889,17 @@ async function findBrowserEntry(cwd) {
|
|
|
104420
104889
|
console.warn("[reroute/analyze] Browser build produced no outputs");
|
|
104421
104890
|
return null;
|
|
104422
104891
|
}
|
|
104423
|
-
const tempDir =
|
|
104892
|
+
const tempDir = join17(cwd, ".reroute", "browser");
|
|
104424
104893
|
await import("node:fs/promises").then((fs) => fs.mkdir(tempDir, { recursive: true }));
|
|
104425
104894
|
const output = result.outputs[0];
|
|
104426
104895
|
const code = await output.text();
|
|
104427
104896
|
const actualHash = await generateContentHash2(code);
|
|
104428
|
-
const bundlePath =
|
|
104429
|
-
await
|
|
104897
|
+
const bundlePath = join17(tempDir, `index.${actualHash}.js`);
|
|
104898
|
+
await writeFile2(bundlePath, code, "utf-8");
|
|
104430
104899
|
const mapOutput = result.outputs.find((o) => o.path.endsWith(".map"));
|
|
104431
104900
|
if (mapOutput) {
|
|
104432
104901
|
const mapContent = await mapOutput.text();
|
|
104433
|
-
await
|
|
104902
|
+
await writeFile2(`${bundlePath}.map`, mapContent, "utf-8");
|
|
104434
104903
|
}
|
|
104435
104904
|
return bundlePath;
|
|
104436
104905
|
} catch (error) {
|
|
@@ -104477,7 +104946,7 @@ function calculateStats(bundles) {
|
|
|
104477
104946
|
}
|
|
104478
104947
|
async function getInstalledPackageSizes(cwd) {
|
|
104479
104948
|
const packageSizes = new Map;
|
|
104480
|
-
const nodeModulesDir =
|
|
104949
|
+
const nodeModulesDir = join17(cwd, "node_modules");
|
|
104481
104950
|
if (!existsSync11(nodeModulesDir))
|
|
104482
104951
|
return packageSizes;
|
|
104483
104952
|
try {
|
|
@@ -104492,7 +104961,7 @@ async function getInstalledPackageSizes(cwd) {
|
|
|
104492
104961
|
const [sizeKB, path3] = line.split("\t");
|
|
104493
104962
|
if (!path3)
|
|
104494
104963
|
continue;
|
|
104495
|
-
const pkgName =
|
|
104964
|
+
const pkgName = basename4(path3);
|
|
104496
104965
|
if (pkgName.startsWith("@")) {
|
|
104497
104966
|
const scopeDir = path3;
|
|
104498
104967
|
const scopedOutput = execSync(`du -sk ${scopeDir}/* 2>/dev/null || true`, {
|
|
@@ -104504,7 +104973,7 @@ async function getInstalledPackageSizes(cwd) {
|
|
|
104504
104973
|
const [scopedSizeKB, scopedPath] = scopedLine.split("\t");
|
|
104505
104974
|
if (!scopedPath)
|
|
104506
104975
|
continue;
|
|
104507
|
-
const fullPkgName = `${pkgName}/${
|
|
104976
|
+
const fullPkgName = `${pkgName}/${basename4(scopedPath)}`;
|
|
104508
104977
|
packageSizes.set(fullPkgName, Number.parseInt(scopedSizeKB, 10) * 1024);
|
|
104509
104978
|
}
|
|
104510
104979
|
} else {
|
|
@@ -104519,7 +104988,7 @@ async function buildDependencyTree(entryPath, cwd) {
|
|
|
104519
104988
|
if (!existsSync11(entryPath))
|
|
104520
104989
|
return null;
|
|
104521
104990
|
const root = {
|
|
104522
|
-
name:
|
|
104991
|
+
name: basename4(entryPath),
|
|
104523
104992
|
path: entryPath,
|
|
104524
104993
|
size: 0,
|
|
104525
104994
|
children: []
|
|
@@ -104533,14 +105002,14 @@ async function buildDependencyTree(entryPath, cwd) {
|
|
|
104533
105002
|
if (!pkgNode) {
|
|
104534
105003
|
pkgNode = {
|
|
104535
105004
|
name: pkgName || "unknown",
|
|
104536
|
-
path:
|
|
105005
|
+
path: join17(cwd, "node_modules", pkgName || ""),
|
|
104537
105006
|
size: 0,
|
|
104538
105007
|
children: []
|
|
104539
105008
|
};
|
|
104540
105009
|
nodeModulesNode.children?.push(pkgNode);
|
|
104541
105010
|
}
|
|
104542
105011
|
pkgNode.children?.push({
|
|
104543
|
-
name:
|
|
105012
|
+
name: basename4(filePath),
|
|
104544
105013
|
path: filePath,
|
|
104545
105014
|
size
|
|
104546
105015
|
});
|
|
@@ -104554,7 +105023,7 @@ async function buildDependencyTree(entryPath, cwd) {
|
|
|
104554
105023
|
if (!child) {
|
|
104555
105024
|
child = {
|
|
104556
105025
|
name: part,
|
|
104557
|
-
path:
|
|
105026
|
+
path: join17(cwd, ...parts.slice(0, i + 1)),
|
|
104558
105027
|
size: 0,
|
|
104559
105028
|
children: []
|
|
104560
105029
|
};
|
|
@@ -104563,7 +105032,7 @@ async function buildDependencyTree(entryPath, cwd) {
|
|
|
104563
105032
|
current = child;
|
|
104564
105033
|
}
|
|
104565
105034
|
current.children?.push({
|
|
104566
|
-
name: parts[parts.length - 1] ||
|
|
105035
|
+
name: parts[parts.length - 1] || basename4(filePath),
|
|
104567
105036
|
path: filePath,
|
|
104568
105037
|
size
|
|
104569
105038
|
});
|
|
@@ -104585,7 +105054,7 @@ async function buildDependencyTree(entryPath, cwd) {
|
|
|
104585
105054
|
const modulePattern = /\/\/\s*(.+?\.(?:ts|tsx|js|jsx|mjs|cjs))\s*$/gm;
|
|
104586
105055
|
const nodeModulesNode = {
|
|
104587
105056
|
name: "node_modules",
|
|
104588
|
-
path:
|
|
105057
|
+
path: join17(cwd, "node_modules"),
|
|
104589
105058
|
size: 0,
|
|
104590
105059
|
children: []
|
|
104591
105060
|
};
|
|
@@ -104651,7 +105120,7 @@ async function buildTreeFromSourceMap(bundlePath, cwd) {
|
|
|
104651
105120
|
if (sourcePath.startsWith("/") || sourcePath.match(/^[A-Za-z]:\\/))
|
|
104652
105121
|
return sourcePath;
|
|
104653
105122
|
const bundleDir = bundlePath.substring(0, bundlePath.lastIndexOf("/"));
|
|
104654
|
-
return
|
|
105123
|
+
return join17(bundleDir, sourceRoot || "", sourcePath);
|
|
104655
105124
|
}, computeSizes = function(node) {
|
|
104656
105125
|
if (node.children && node.children.length > 0) {
|
|
104657
105126
|
node.size = node.children.reduce((s, c) => s + computeSizes(c), 0);
|
|
@@ -104716,14 +105185,14 @@ async function buildTreeFromSourceMap(bundlePath, cwd) {
|
|
|
104716
105185
|
}
|
|
104717
105186
|
}
|
|
104718
105187
|
const root = {
|
|
104719
|
-
name:
|
|
105188
|
+
name: basename4(bundlePath),
|
|
104720
105189
|
path: bundlePath,
|
|
104721
105190
|
size: 0,
|
|
104722
105191
|
children: []
|
|
104723
105192
|
};
|
|
104724
105193
|
const nodeModulesNode = {
|
|
104725
105194
|
name: "node_modules",
|
|
104726
|
-
path:
|
|
105195
|
+
path: join17(cwd, "node_modules"),
|
|
104727
105196
|
size: 0,
|
|
104728
105197
|
children: []
|
|
104729
105198
|
};
|
|
@@ -104763,14 +105232,14 @@ async function buildTreeFromSourceMap(bundlePath, cwd) {
|
|
|
104763
105232
|
if (!pkgNode) {
|
|
104764
105233
|
pkgNode = {
|
|
104765
105234
|
name: pkgName || "unknown",
|
|
104766
|
-
path:
|
|
105235
|
+
path: join17(cwd, "node_modules", pkgName || ""),
|
|
104767
105236
|
size: 0,
|
|
104768
105237
|
children: []
|
|
104769
105238
|
};
|
|
104770
105239
|
nodeModulesNode.children?.push(pkgNode);
|
|
104771
105240
|
}
|
|
104772
105241
|
pkgNode.children?.push({
|
|
104773
|
-
name:
|
|
105242
|
+
name: basename4(srcPath),
|
|
104774
105243
|
path: srcPath,
|
|
104775
105244
|
size
|
|
104776
105245
|
});
|
|
@@ -104784,7 +105253,7 @@ async function buildTreeFromSourceMap(bundlePath, cwd) {
|
|
|
104784
105253
|
if (!child) {
|
|
104785
105254
|
child = {
|
|
104786
105255
|
name: part,
|
|
104787
|
-
path:
|
|
105256
|
+
path: join17(cwd, ...parts.slice(0, i2 + 1)),
|
|
104788
105257
|
size: 0,
|
|
104789
105258
|
children: []
|
|
104790
105259
|
};
|
|
@@ -104793,7 +105262,7 @@ async function buildTreeFromSourceMap(bundlePath, cwd) {
|
|
|
104793
105262
|
current = child;
|
|
104794
105263
|
}
|
|
104795
105264
|
current.children?.push({
|
|
104796
|
-
name: parts[parts.length - 1] ||
|
|
105265
|
+
name: parts[parts.length - 1] || basename4(srcPath),
|
|
104797
105266
|
path: srcPath,
|
|
104798
105267
|
size
|
|
104799
105268
|
});
|
|
@@ -104814,11 +105283,11 @@ async function generateHTMLReport(stats, depTree, mainInfo, browserDepTree, brow
|
|
|
104814
105283
|
let actualServerBinarySize = null;
|
|
104815
105284
|
let actualServerBinaryGzipped = null;
|
|
104816
105285
|
try {
|
|
104817
|
-
const distDir =
|
|
105286
|
+
const distDir = join17(process.cwd(), "dist");
|
|
104818
105287
|
if (existsSync11(distDir)) {
|
|
104819
105288
|
const files = await readdir8(distDir);
|
|
104820
105289
|
for (const file of files) {
|
|
104821
|
-
const filePath =
|
|
105290
|
+
const filePath = join17(distDir, file);
|
|
104822
105291
|
const stats2 = statSync(filePath);
|
|
104823
105292
|
if (stats2.isFile() && !file.includes(".")) {
|
|
104824
105293
|
actualServerBinarySize = stats2.size;
|
|
@@ -106300,11 +106769,11 @@ async function printConsoleReport(stats, depTree, mainInfo, browserDepTree, brow
|
|
|
106300
106769
|
let actualServerBinarySize = null;
|
|
106301
106770
|
let actualServerBinaryGzipped = null;
|
|
106302
106771
|
try {
|
|
106303
|
-
const distDir =
|
|
106772
|
+
const distDir = join17(process.cwd(), "dist");
|
|
106304
106773
|
if (existsSync11(distDir)) {
|
|
106305
106774
|
const files = await readdir8(distDir);
|
|
106306
106775
|
for (const file of files) {
|
|
106307
|
-
const filePath =
|
|
106776
|
+
const filePath = join17(distDir, file);
|
|
106308
106777
|
const stats2 = statSync(filePath);
|
|
106309
106778
|
if (stats2.isFile() && !file.includes(".")) {
|
|
106310
106779
|
actualServerBinarySize = stats2.size;
|
|
@@ -106338,17 +106807,17 @@ async function analyze(args) {
|
|
|
106338
106807
|
const isProd = isProductionMode(args);
|
|
106339
106808
|
const searchIndex = args.indexOf("--search");
|
|
106340
106809
|
const initialSearch = searchIndex !== -1 && args[searchIndex + 1] ? args[searchIndex + 1] : "";
|
|
106341
|
-
const rerouteIndexPath =
|
|
106810
|
+
const rerouteIndexPath = join17(cwd, ".reroute", "index.ts");
|
|
106342
106811
|
if (!existsSync11(rerouteIndexPath)) {
|
|
106343
106812
|
console.log(colorizeLogPrefixAnsi(`[reroute/analyze] .reroute artifacts not found, running build...
|
|
106344
106813
|
`));
|
|
106345
106814
|
const { spawn: spawn4 } = await import("node:child_process");
|
|
106346
|
-
const { getRerouteCommand:
|
|
106347
|
-
const rerouteCmd =
|
|
106815
|
+
const { getRerouteCommand: getRerouteCommand4 } = await Promise.resolve().then(() => (init_command(), exports_command));
|
|
106816
|
+
const rerouteCmd = getRerouteCommand4();
|
|
106348
106817
|
const useShell = rerouteCmd.includes(" ");
|
|
106349
106818
|
const buildCommand = useShell ? `${rerouteCmd} build` : rerouteCmd;
|
|
106350
106819
|
const buildArgs = useShell ? [] : ["build"];
|
|
106351
|
-
await new Promise((
|
|
106820
|
+
await new Promise((resolve3, reject) => {
|
|
106352
106821
|
const buildProcess = spawn4(buildCommand, buildArgs, {
|
|
106353
106822
|
stdio: "inherit",
|
|
106354
106823
|
shell: useShell
|
|
@@ -106357,7 +106826,7 @@ async function analyze(args) {
|
|
|
106357
106826
|
if (code !== null && code !== 0) {
|
|
106358
106827
|
reject(new Error(`Build exited with code ${code}`));
|
|
106359
106828
|
} else {
|
|
106360
|
-
|
|
106829
|
+
resolve3();
|
|
106361
106830
|
}
|
|
106362
106831
|
});
|
|
106363
106832
|
buildProcess.on("error", (error) => {
|
|
@@ -106385,11 +106854,11 @@ async function analyze(args) {
|
|
|
106385
106854
|
`));
|
|
106386
106855
|
}
|
|
106387
106856
|
try {
|
|
106388
|
-
const browserStat = await
|
|
106857
|
+
const browserStat = await stat6(browserEntry);
|
|
106389
106858
|
const browserContent = await readFile(browserEntry);
|
|
106390
106859
|
const browserGzipped = Bun.gzipSync(browserContent).length;
|
|
106391
106860
|
browserInfo = {
|
|
106392
|
-
name:
|
|
106861
|
+
name: basename4(browserEntry),
|
|
106393
106862
|
size: browserStat.size,
|
|
106394
106863
|
gzippedSize: browserGzipped
|
|
106395
106864
|
};
|
|
@@ -106401,12 +106870,12 @@ async function analyze(args) {
|
|
|
106401
106870
|
let entry = null;
|
|
106402
106871
|
let depTree = null;
|
|
106403
106872
|
let mainInfo = null;
|
|
106404
|
-
const srcEntry =
|
|
106873
|
+
const srcEntry = join17(cwd, "src", "index.ts");
|
|
106405
106874
|
if (existsSync11(srcEntry)) {
|
|
106406
106875
|
console.log(colorizeLogPrefixAnsi(`[reroute/analyze] Building server binary for analysis...
|
|
106407
106876
|
`));
|
|
106408
106877
|
const { mkdir: mkdir4 } = await import("node:fs/promises");
|
|
106409
|
-
const serverAnalysisDir =
|
|
106878
|
+
const serverAnalysisDir = join17(cwd, ".reroute", "server");
|
|
106410
106879
|
await mkdir4(serverAnalysisDir, { recursive: true });
|
|
106411
106880
|
const result = await Bun.build({
|
|
106412
106881
|
entrypoints: [srcEntry],
|
|
@@ -106419,12 +106888,12 @@ async function analyze(args) {
|
|
|
106419
106888
|
if (result.success && result.outputs.length > 0) {
|
|
106420
106889
|
const output = result.outputs[0];
|
|
106421
106890
|
const code = await output.text();
|
|
106422
|
-
const analysisEntry =
|
|
106423
|
-
await
|
|
106891
|
+
const analysisEntry = join17(serverAnalysisDir, "index.js");
|
|
106892
|
+
await writeFile2(analysisEntry, code, "utf-8");
|
|
106424
106893
|
const mapOutput = result.outputs.find((o) => o.path.endsWith(".map"));
|
|
106425
106894
|
if (mapOutput) {
|
|
106426
106895
|
const mapContent = await mapOutput.text();
|
|
106427
|
-
await
|
|
106896
|
+
await writeFile2(`${analysisEntry}.map`, mapContent, "utf-8");
|
|
106428
106897
|
}
|
|
106429
106898
|
entry = analysisEntry;
|
|
106430
106899
|
}
|
|
@@ -106437,7 +106906,7 @@ async function analyze(args) {
|
|
|
106437
106906
|
`));
|
|
106438
106907
|
const installedSizes = await getInstalledPackageSizes(cwd);
|
|
106439
106908
|
if (depTree) {
|
|
106440
|
-
const packageJsonPath =
|
|
106909
|
+
const packageJsonPath = join17(cwd, "package.json");
|
|
106441
106910
|
if (existsSync11(packageJsonPath)) {
|
|
106442
106911
|
try {
|
|
106443
106912
|
const packageJson = JSON.parse(await readFile(packageJsonPath, "utf-8"));
|
|
@@ -106449,7 +106918,7 @@ async function analyze(args) {
|
|
|
106449
106918
|
if (!trackedPkgs.has(pkgName) && installedSizes.has(pkgName)) {
|
|
106450
106919
|
nodeModulesNode.children?.push({
|
|
106451
106920
|
name: pkgName,
|
|
106452
|
-
path:
|
|
106921
|
+
path: join17(cwd, "node_modules", pkgName),
|
|
106453
106922
|
size: installedSizes.get(pkgName) || 0
|
|
106454
106923
|
});
|
|
106455
106924
|
}
|
|
@@ -106467,11 +106936,11 @@ async function analyze(args) {
|
|
|
106467
106936
|
}
|
|
106468
106937
|
}
|
|
106469
106938
|
try {
|
|
106470
|
-
const entryStat = await
|
|
106939
|
+
const entryStat = await stat6(entry);
|
|
106471
106940
|
const entryContent = await readFile(entry);
|
|
106472
106941
|
const entryGzipped = Bun.gzipSync(entryContent).length;
|
|
106473
106942
|
mainInfo = {
|
|
106474
|
-
name:
|
|
106943
|
+
name: basename4(entry),
|
|
106475
106944
|
size: entryStat.size,
|
|
106476
106945
|
gzippedSize: entryGzipped
|
|
106477
106946
|
};
|
|
@@ -106480,11 +106949,11 @@ async function analyze(args) {
|
|
|
106480
106949
|
const fullOutput = args.includes("--full");
|
|
106481
106950
|
await printConsoleReport(stats, depTree, mainInfo, browserDepTree, browserInfo, fullOutput);
|
|
106482
106951
|
if (outputHtml || openBrowser) {
|
|
106483
|
-
const htmlPath =
|
|
106952
|
+
const htmlPath = join17(cwd, ".reroute", "analysis.html");
|
|
106484
106953
|
const html2 = await generateHTMLReport(stats, depTree, mainInfo, browserDepTree, browserInfo, initialSearch);
|
|
106485
106954
|
const { mkdir: mkdir4 } = await import("node:fs/promises");
|
|
106486
|
-
await mkdir4(
|
|
106487
|
-
await
|
|
106955
|
+
await mkdir4(join17(cwd, ".reroute"), { recursive: true });
|
|
106956
|
+
await writeFile2(htmlPath, html2, "utf-8");
|
|
106488
106957
|
console.log(colorizeLogPrefixAnsi(`[reroute/analyze] HTML report generated: ${relative3(cwd, htmlPath)}
|
|
106489
106958
|
`));
|
|
106490
106959
|
if (openBrowser) {
|
|
@@ -106547,7 +107016,7 @@ __export(exports_og, {
|
|
|
106547
107016
|
});
|
|
106548
107017
|
import { spawn as spawn4 } from "node:child_process";
|
|
106549
107018
|
import { readdir as readdir9 } from "node:fs/promises";
|
|
106550
|
-
import { join as
|
|
107019
|
+
import { join as join18 } from "node:path";
|
|
106551
107020
|
function getPortFromConfig(baseUrl) {
|
|
106552
107021
|
if (!baseUrl)
|
|
106553
107022
|
return 3000;
|
|
@@ -106563,12 +107032,12 @@ async function killProcessOnPort(port) {
|
|
|
106563
107032
|
const proc = spawn4("bunx", ["kill-port", String(port)], {
|
|
106564
107033
|
stdio: "ignore"
|
|
106565
107034
|
});
|
|
106566
|
-
await new Promise((
|
|
106567
|
-
proc.on("close", () =>
|
|
107035
|
+
await new Promise((resolve3) => {
|
|
107036
|
+
proc.on("close", () => resolve3());
|
|
106568
107037
|
});
|
|
106569
107038
|
} catch {}
|
|
106570
107039
|
}
|
|
106571
|
-
async function
|
|
107040
|
+
async function isServerRunning2(port) {
|
|
106572
107041
|
try {
|
|
106573
107042
|
const response = await fetch(`http://localhost:${port}`, {
|
|
106574
107043
|
signal: AbortSignal.timeout(1000)
|
|
@@ -106579,7 +107048,7 @@ async function isServerRunning(port) {
|
|
|
106579
107048
|
}
|
|
106580
107049
|
}
|
|
106581
107050
|
async function ensureServer(cwd, port) {
|
|
106582
|
-
const alreadyRunning = await
|
|
107051
|
+
const alreadyRunning = await isServerRunning2(port);
|
|
106583
107052
|
if (alreadyRunning) {
|
|
106584
107053
|
console.log(`✅ Dev server already running at http://localhost:${port}
|
|
106585
107054
|
`);
|
|
@@ -106626,8 +107095,8 @@ async function scanForOgTemplates(dir, base, routes) {
|
|
|
106626
107095
|
try {
|
|
106627
107096
|
const entries = await readdir9(dir, { withFileTypes: true });
|
|
106628
107097
|
for (const entry of entries) {
|
|
106629
|
-
const fullPath =
|
|
106630
|
-
const relativePath =
|
|
107098
|
+
const fullPath = join18(dir, entry.name);
|
|
107099
|
+
const relativePath = join18(base, entry.name);
|
|
106631
107100
|
if (entry.isDirectory()) {
|
|
106632
107101
|
if (entry.name === "content")
|
|
106633
107102
|
continue;
|
|
@@ -106648,7 +107117,7 @@ async function addContentRoutes(routesPath, routes) {
|
|
|
106648
107117
|
for (const entry of entries) {
|
|
106649
107118
|
if (!entry.isDirectory())
|
|
106650
107119
|
continue;
|
|
106651
|
-
const contentDir =
|
|
107120
|
+
const contentDir = join18(routesPath, entry.name, "content");
|
|
106652
107121
|
try {
|
|
106653
107122
|
const contentFiles = await readdir9(contentDir);
|
|
106654
107123
|
if (contentFiles.length === 0)
|
|
@@ -106665,7 +107134,7 @@ async function addContentRoutes(routesPath, routes) {
|
|
|
106665
107134
|
async function findRoutesWithOG(cwd) {
|
|
106666
107135
|
const routes = [];
|
|
106667
107136
|
try {
|
|
106668
|
-
const manifestPath =
|
|
107137
|
+
const manifestPath = join18(cwd, ".reroute", "manifest.json");
|
|
106669
107138
|
const manifestFile = Bun.file(manifestPath);
|
|
106670
107139
|
const manifest = await manifestFile.json();
|
|
106671
107140
|
if (manifest.staticRoutes && Array.isArray(manifest.staticRoutes)) {
|
|
@@ -106676,7 +107145,7 @@ async function findRoutesWithOG(cwd) {
|
|
|
106676
107145
|
}
|
|
106677
107146
|
} catch {
|
|
106678
107147
|
console.warn("⚠️ .reroute/manifest.json not found, scanning routes directory...");
|
|
106679
|
-
const routesPath =
|
|
107148
|
+
const routesPath = join18(cwd, ROUTES_DIR2);
|
|
106680
107149
|
await scanForOgTemplates(routesPath, "", routes);
|
|
106681
107150
|
await addContentRoutes(routesPath, routes);
|
|
106682
107151
|
}
|
|
@@ -106928,7 +107397,7 @@ async function getVersionString2() {
|
|
|
106928
107397
|
}
|
|
106929
107398
|
async function getVersion2() {
|
|
106930
107399
|
if (true) {
|
|
106931
|
-
return "1.0.0-alpha.
|
|
107400
|
+
return "1.0.0-alpha.10";
|
|
106932
107401
|
}
|
|
106933
107402
|
const possiblePaths = [
|
|
106934
107403
|
path3.join(import.meta.dir, "../../../package.json"),
|
|
@@ -106945,10 +107414,10 @@ async function getVersion2() {
|
|
|
106945
107414
|
}
|
|
106946
107415
|
async function getCommit2() {
|
|
106947
107416
|
if (true) {
|
|
106948
|
-
return "
|
|
107417
|
+
return "15e30bf";
|
|
106949
107418
|
}
|
|
106950
107419
|
return "dev";
|
|
106951
107420
|
}
|
|
106952
107421
|
main();
|
|
106953
107422
|
|
|
106954
|
-
//# debugId=
|
|
107423
|
+
//# debugId=02FB876BDDF69B9364756E2164756E21
|