Complete residential site build with Docker Compose & Gitea Actions deployment

This commit is contained in:
CalebLewallen
2026-05-13 17:31:20 -04:00
parent f9c4e13a50
commit 3c22823f72
19354 changed files with 2097331 additions and 0 deletions
+41
View File
@@ -0,0 +1,41 @@
import { routeIsRedirect } from "../core/routing/helpers.js";
import { routeComparator } from "../core/routing/priority.js";
function getSortedPreloadedMatches({ matches, manifest }) {
return preloadAndSetPrerenderStatus({
matches,
manifest
}).sort((a, b) => routeComparator(a.route, b.route)).sort((a, b) => prioritizePrerenderedMatchesComparator(a.route, b.route));
}
function preloadAndSetPrerenderStatus({
matches,
manifest
}) {
const preloaded = new Array();
for (const route of matches) {
const filePath = new URL(`./${route.component}`, manifest.rootDir);
if (routeIsRedirect(route)) {
preloaded.push({
route,
filePath
});
continue;
}
preloaded.push({ route, filePath });
}
return preloaded;
}
function prioritizePrerenderedMatchesComparator(a, b) {
if (areRegexesEqual(a.pattern, b.pattern)) {
if (a.prerender !== b.prerender) {
return a.prerender ? -1 : 1;
}
return a.component < b.component ? -1 : 1;
}
return 0;
}
function areRegexesEqual(regexp1, regexp2) {
return regexp1.source === regexp2.source && regexp1.global === regexp2.global;
}
export {
getSortedPreloadedMatches
};