88 lines
11 KiB
JavaScript
88 lines
11 KiB
JavaScript
import '@astrojs/internal-helpers/path';
|
|
import 'cookie';
|
|
import 'kleur/colors';
|
|
import './chunks/astro/server_hicMsD5u.mjs';
|
|
import 'clsx';
|
|
import { compile } from 'path-to-regexp';
|
|
|
|
if (typeof process !== "undefined") {
|
|
let proc = process;
|
|
if ("argv" in proc && Array.isArray(proc.argv)) {
|
|
if (proc.argv.includes("--verbose")) ; else if (proc.argv.includes("--silent")) ; else ;
|
|
}
|
|
}
|
|
|
|
function getRouteGenerator(segments, addTrailingSlash) {
|
|
const template = segments.map((segment) => {
|
|
return "/" + segment.map((part) => {
|
|
if (part.spread) {
|
|
return `:${part.content.slice(3)}(.*)?`;
|
|
} else if (part.dynamic) {
|
|
return `:${part.content}`;
|
|
} else {
|
|
return part.content.normalize().replace(/\?/g, "%3F").replace(/#/g, "%23").replace(/%5B/g, "[").replace(/%5D/g, "]").replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
}
|
|
}).join("");
|
|
}).join("");
|
|
let trailing = "";
|
|
if (addTrailingSlash === "always" && segments.length) {
|
|
trailing = "/";
|
|
}
|
|
const toPath = compile(template + trailing);
|
|
return (params) => {
|
|
const path = toPath(params);
|
|
return path || "/";
|
|
};
|
|
}
|
|
|
|
function deserializeRouteData(rawRouteData) {
|
|
return {
|
|
route: rawRouteData.route,
|
|
type: rawRouteData.type,
|
|
pattern: new RegExp(rawRouteData.pattern),
|
|
params: rawRouteData.params,
|
|
component: rawRouteData.component,
|
|
generate: getRouteGenerator(rawRouteData.segments, rawRouteData._meta.trailingSlash),
|
|
pathname: rawRouteData.pathname || void 0,
|
|
segments: rawRouteData.segments,
|
|
prerender: rawRouteData.prerender,
|
|
redirect: rawRouteData.redirect,
|
|
redirectRoute: rawRouteData.redirectRoute ? deserializeRouteData(rawRouteData.redirectRoute) : void 0,
|
|
fallbackRoutes: rawRouteData.fallbackRoutes.map((fallback) => {
|
|
return deserializeRouteData(fallback);
|
|
}),
|
|
isIndex: rawRouteData.isIndex
|
|
};
|
|
}
|
|
|
|
function deserializeManifest(serializedManifest) {
|
|
const routes = [];
|
|
for (const serializedRoute of serializedManifest.routes) {
|
|
routes.push({
|
|
...serializedRoute,
|
|
routeData: deserializeRouteData(serializedRoute.routeData)
|
|
});
|
|
const route = serializedRoute;
|
|
route.routeData = deserializeRouteData(serializedRoute.routeData);
|
|
}
|
|
const assets = new Set(serializedManifest.assets);
|
|
const componentMetadata = new Map(serializedManifest.componentMetadata);
|
|
const inlinedScripts = new Map(serializedManifest.inlinedScripts);
|
|
const clientDirectives = new Map(serializedManifest.clientDirectives);
|
|
return {
|
|
// in case user middleware exists, this no-op middleware will be reassigned (see plugin-ssr.ts)
|
|
middleware(_, next) {
|
|
return next();
|
|
},
|
|
...serializedManifest,
|
|
assets,
|
|
componentMetadata,
|
|
inlinedScripts,
|
|
clientDirectives,
|
|
routes
|
|
};
|
|
}
|
|
|
|
const manifest = deserializeManifest({"adapterName":"","routes":[{"file":"file:///var/www/limepot-xyz/dist/404.html","links":[],"scripts":[],"styles":[],"routeData":{"route":"/404","isIndex":false,"type":"page","pattern":"^\\/404\\/?$","segments":[[{"content":"404","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/404.astro","pathname":"/404","prerender":true,"fallbackRoutes":[],"_meta":{"trailingSlash":"ignore"}}},{"file":"file:///var/www/limepot-xyz/dist/about/index.html","links":[],"scripts":[],"styles":[],"routeData":{"route":"/about","isIndex":false,"type":"page","pattern":"^\\/about\\/?$","segments":[[{"content":"about","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/about.astro","pathname":"/about","prerender":true,"fallbackRoutes":[],"_meta":{"trailingSlash":"ignore"}}},{"file":"file:///var/www/limepot-xyz/dist/blog/post-1/index.html","links":[],"scripts":[],"styles":[],"routeData":{"route":"/blog/post-1","isIndex":false,"type":"page","pattern":"^\\/blog\\/post-1\\/?$","segments":[[{"content":"blog","dynamic":false,"spread":false}],[{"content":"post-1","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/blog/post-1.md","pathname":"/blog/post-1","prerender":true,"fallbackRoutes":[],"_meta":{"trailingSlash":"ignore"}}},{"file":"file:///var/www/limepot-xyz/dist/blog/index.html","links":[],"scripts":[],"styles":[],"routeData":{"route":"/blog","isIndex":false,"type":"page","pattern":"^\\/blog\\/?$","segments":[[{"content":"blog","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/blog.astro","pathname":"/blog","prerender":true,"fallbackRoutes":[],"_meta":{"trailingSlash":"ignore"}}},{"file":"file:///var/www/limepot-xyz/dist/boilerplate/index.html","links":[],"scripts":[],"styles":[],"routeData":{"route":"/boilerplate","isIndex":false,"type":"page","pattern":"^\\/boilerplate\\/?$","segments":[[{"content":"boilerplate","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/boilerplate.astro","pathname":"/boilerplate","prerender":true,"fallbackRoutes":[],"_meta":{"trailingSlash":"ignore"}}},{"file":"file:///var/www/limepot-xyz/dist/export/gmod_loading/index.html","links":[],"scripts":[],"styles":[],"routeData":{"route":"/export/gmod_loading","isIndex":false,"type":"page","pattern":"^\\/export\\/gmod_loading\\/?$","segments":[[{"content":"export","dynamic":false,"spread":false}],[{"content":"gmod_loading","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/export/gmod_loading.astro","pathname":"/export/gmod_loading","prerender":true,"fallbackRoutes":[],"_meta":{"trailingSlash":"ignore"}}},{"file":"file:///var/www/limepot-xyz/dist/policy/index.html","links":[],"scripts":[],"styles":[],"routeData":{"route":"/policy","isIndex":false,"type":"page","pattern":"^\\/policy\\/?$","segments":[[{"content":"policy","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/policy.astro","pathname":"/policy","prerender":true,"fallbackRoutes":[],"_meta":{"trailingSlash":"ignore"}}},{"file":"file:///var/www/limepot-xyz/dist/projects/index.html","links":[],"scripts":[],"styles":[],"routeData":{"route":"/projects","isIndex":false,"type":"page","pattern":"^\\/projects\\/?$","segments":[[{"content":"projects","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/projects.astro","pathname":"/projects","prerender":true,"fallbackRoutes":[],"_meta":{"trailingSlash":"ignore"}}},{"file":"file:///var/www/limepot-xyz/dist/rss.xml","links":[],"scripts":[],"styles":[],"routeData":{"route":"/rss.xml","isIndex":false,"type":"endpoint","pattern":"^\\/rss\\.xml\\/?$","segments":[[{"content":"rss.xml","dynamic":false,"spread":false}]],"params":[],"component":"src/pages/rss.xml.js","pathname":"/rss.xml","prerender":true,"fallbackRoutes":[],"_meta":{"trailingSlash":"ignore"}}},{"file":"file:///var/www/limepot-xyz/dist/index.html","links":[],"scripts":[],"styles":[],"routeData":{"route":"/","isIndex":true,"type":"page","pattern":"^\\/$","segments":[],"params":[],"component":"src/pages/index.astro","pathname":"/","prerender":true,"fallbackRoutes":[],"_meta":{"trailingSlash":"ignore"}}}],"site":"https://limepot.xyz","base":"/","trailingSlash":"ignore","compressHTML":true,"componentMetadata":[["/var/www/limepot-xyz/src/pages/blog/post-1.md",{"propagation":"none","containsHead":true}],["/var/www/limepot-xyz/src/pages/rss.xml.js",{"propagation":"none","containsHead":true}],["/var/www/limepot-xyz/src/pages/404.astro",{"propagation":"none","containsHead":true}],["/var/www/limepot-xyz/src/pages/export/gmod_loading.astro",{"propagation":"none","containsHead":true}],["/var/www/limepot-xyz/src/pages/about.astro",{"propagation":"none","containsHead":true}],["/var/www/limepot-xyz/src/pages/blog.astro",{"propagation":"none","containsHead":true}],["/var/www/limepot-xyz/src/pages/boilerplate.astro",{"propagation":"none","containsHead":true}],["/var/www/limepot-xyz/src/pages/index.astro",{"propagation":"none","containsHead":true}],["/var/www/limepot-xyz/src/pages/policy.astro",{"propagation":"none","containsHead":true}],["/var/www/limepot-xyz/src/pages/projects.astro",{"propagation":"none","containsHead":true}]],"renderers":[],"clientDirectives":[["idle","(()=>{var i=t=>{let e=async()=>{await(await t())()};\"requestIdleCallback\"in window?window.requestIdleCallback(e):setTimeout(e,200)};(self.Astro||(self.Astro={})).idle=i;window.dispatchEvent(new Event(\"astro:idle\"));})();"],["load","(()=>{var e=async t=>{await(await t())()};(self.Astro||(self.Astro={})).load=e;window.dispatchEvent(new Event(\"astro:load\"));})();"],["media","(()=>{var s=(i,t)=>{let a=async()=>{await(await i())()};if(t.value){let e=matchMedia(t.value);e.matches?a():e.addEventListener(\"change\",a,{once:!0})}};(self.Astro||(self.Astro={})).media=s;window.dispatchEvent(new Event(\"astro:media\"));})();"],["only","(()=>{var e=async t=>{await(await t())()};(self.Astro||(self.Astro={})).only=e;window.dispatchEvent(new Event(\"astro:only\"));})();"],["visible","(()=>{var l=(s,i,o)=>{let r=async()=>{await(await s())()},t=typeof i.value==\"object\"?i.value:void 0,c={rootMargin:t==null?void 0:t.rootMargin},n=new IntersectionObserver(e=>{for(let a of e)if(a.isIntersecting){n.disconnect(),r();break}},c);for(let e of o.children)n.observe(e)};(self.Astro||(self.Astro={})).visible=l;window.dispatchEvent(new Event(\"astro:visible\"));})();"]],"entryModules":{"\u0000noop-middleware":"_noop-middleware.mjs","\u0000@astro-page:src/pages/404@_@astro":"pages/404.astro.mjs","\u0000@astro-page:src/pages/about@_@astro":"pages/about.astro.mjs","\u0000@astro-page:src/pages/blog/post-1@_@md":"pages/blog/post-1.astro.mjs","\u0000@astro-page:src/pages/blog@_@astro":"pages/blog.astro.mjs","\u0000@astro-page:src/pages/boilerplate@_@astro":"pages/boilerplate.astro.mjs","\u0000@astro-page:src/pages/export/gmod_loading@_@astro":"pages/export/gmod_loading.astro.mjs","\u0000@astro-page:src/pages/policy@_@astro":"pages/policy.astro.mjs","\u0000@astro-page:src/pages/projects@_@astro":"pages/projects.astro.mjs","\u0000@astro-page:src/pages/rss.xml@_@js":"pages/rss.xml.astro.mjs","\u0000@astro-page:src/pages/index@_@astro":"pages/index.astro.mjs","\u0000@astro-renderers":"renderers.mjs","\u0000@astrojs-manifest":"manifest_DW0bp8az.mjs","/src/pages/404.astro":"chunks/404_CUh0Bkcz.mjs","/src/pages/about.astro":"chunks/about_BaRd3lnA.mjs","/src/pages/blog/post-1.md":"chunks/post-1_wnSHKF64.mjs","/src/pages/blog.astro":"chunks/blog_BYIjjOIS.mjs","/src/pages/boilerplate.astro":"chunks/boilerplate_LZJuf9-u.mjs","/src/pages/export/gmod_loading.astro":"chunks/gmod_loading_jKr7b-lF.mjs","/src/pages/policy.astro":"chunks/policy_iQ5HQ9Hx.mjs","/src/pages/projects.astro":"chunks/projects_BICtSZQk.mjs","/src/pages/rss.xml.js":"chunks/rss.xml_CRCPXvq7.mjs","/src/pages/index.astro":"chunks/index_KtCmHE6Q.mjs","/astro/hoisted.js?q=0":"_astro/hoisted.CWPXpkFr.js","astro:scripts/before-hydration.js":""},"inlinedScripts":[],"assets":["/file:///var/www/limepot-xyz/dist/404.html","/file:///var/www/limepot-xyz/dist/about/index.html","/file:///var/www/limepot-xyz/dist/blog/post-1/index.html","/file:///var/www/limepot-xyz/dist/blog/index.html","/file:///var/www/limepot-xyz/dist/boilerplate/index.html","/file:///var/www/limepot-xyz/dist/export/gmod_loading/index.html","/file:///var/www/limepot-xyz/dist/policy/index.html","/file:///var/www/limepot-xyz/dist/projects/index.html","/file:///var/www/limepot-xyz/dist/rss.xml","/file:///var/www/limepot-xyz/dist/index.html"],"buildFormat":"directory","checkOrigin":false});
|
|
|
|
export { manifest };
|