feat(housekeeping): unify complete rebuild in gated preview
This commit is contained in:
1 parent
4ad007d241
commit
43470ebf82
402 files changed
+78313
-1663
No files matched your search
@@ -3,21 +3,16 @@ import { satisfiesCapability } from "./capability-context";
|
||||
import type {
|
||||
HousekeepingCapabilityContext,
|
||||
HousekeepingDomainManifest,
|
||||
HousekeepingPreviewHref,
|
||||
} from "./contracts";
|
||||
import type { HousekeepingRouteRuntime } from "./routing/runtime";
|
||||
|
||||
export interface HousekeepingNavigationDomain {
|
||||
id: HousekeepingDomainId;
|
||||
href: HousekeepingPreviewHref;
|
||||
href: string;
|
||||
iconId: HousekeepingDomainManifest["iconId"];
|
||||
label: string;
|
||||
description: string;
|
||||
items: readonly {
|
||||
id: string;
|
||||
href: HousekeepingPreviewHref;
|
||||
label: string;
|
||||
}[];
|
||||
items: readonly { id: string; href: string; label: string }[];
|
||||
}
|
||||
|
||||
export function buildHousekeepingNavigation(
|
||||
@@ -41,10 +36,7 @@ export function buildHousekeepingNavigation(
|
||||
label: translate(route.labelKey),
|
||||
}));
|
||||
|
||||
if (items.length === 0) return [];
|
||||
|
||||
const landing =
|
||||
items.find((item) => item.id === domain.landingRouteId) ?? items[0];
|
||||
const landing = items[0];
|
||||
if (!landing) return [];
|
||||
|
||||
return [
|
||||
@@ -60,6 +52,6 @@ export function buildHousekeepingNavigation(
|
||||
});
|
||||
}
|
||||
|
||||
function isConcreteNavigationHref(href: HousekeepingPreviewHref): boolean {
|
||||
function isConcreteNavigationHref(href: string): boolean {
|
||||
return !href.split("/").some((segment) => segment.startsWith(":"));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user