refactor(housekeeping): adopt ase route namespace
This commit is contained in:
1 parent
74756dfed2
commit
f72a2b6c74
32 files changed
+388
-264
No files matched your search
@@ -34,8 +34,11 @@ export function createHousekeepingRegistry(
|
||||
}
|
||||
domainIds.add(manifest.id);
|
||||
|
||||
if (manifest.previewHref !== `/admin-next/${manifest.id}`) {
|
||||
throw new Error(`invalid preview href: ${manifest.previewHref}`);
|
||||
if (
|
||||
manifest.canonicalHref !==
|
||||
(manifest.id === "operations" ? "/ase" : `/ase/${manifest.id}`)
|
||||
) {
|
||||
throw new Error(`invalid canonical href: ${manifest.canonicalHref}`);
|
||||
}
|
||||
validateNonEmpty(manifest.labelKey, "label key");
|
||||
validateNonEmpty(manifest.descriptionKey, "description key");
|
||||
@@ -72,6 +75,9 @@ export function createHousekeepingRegistry(
|
||||
routeIds.add(route.id);
|
||||
|
||||
validateNonEmpty(route.href, "route href");
|
||||
if (route.href !== "/ase" && !route.href.startsWith("/ase/")) {
|
||||
throw new Error(`invalid canonical route href: ${route.href}`);
|
||||
}
|
||||
if (routeHrefs.has(route.href)) {
|
||||
throw new Error(`duplicate route href: ${route.href}`);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user