chore: satisfy upgraded biome checks
This commit is contained in:
1 parent
c7891b60c3
commit
b413e62085
30 files changed
+162
-74
No files matched your search
@@ -74,4 +74,4 @@ export default async function HousekeepingDomainLayout({
|
||||
{children}
|
||||
</HousekeepingShell>
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -26,7 +26,9 @@ export default async function HousekeepingRootPage() {
|
||||
registry,
|
||||
HOUSEKEEPING_ROUTE_HANDLERS,
|
||||
);
|
||||
const operations = registry.domains.find((domain) => domain.id === "operations");
|
||||
const operations = registry.domains.find(
|
||||
(domain) => domain.id === "operations",
|
||||
);
|
||||
const route = operations?.routes.find(
|
||||
(entry) => entry.id === "operations.workspace",
|
||||
);
|
||||
@@ -86,4 +88,4 @@ export default async function HousekeepingRootPage() {
|
||||
{workspace}
|
||||
</HousekeepingShell>
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -436,7 +436,6 @@ export function StudioClient({
|
||||
cloneAllAbortRef.current = abort;
|
||||
|
||||
const CHUNK = 400;
|
||||
let done = 0;
|
||||
let okCount = 0;
|
||||
let failCount = 0;
|
||||
|
||||
@@ -477,7 +476,6 @@ export function StudioClient({
|
||||
return next;
|
||||
});
|
||||
if (evt.status === "done" || evt.status === "failed") {
|
||||
done++;
|
||||
if (evt.status === "failed") {
|
||||
setFailedClassnames((prev) =>
|
||||
prev.includes(cn) ? prev : [...prev, cn],
|
||||
@@ -841,7 +839,6 @@ export function StudioClient({
|
||||
|
||||
const abort = new AbortController();
|
||||
cloneAllAbortRef.current = abort;
|
||||
let done = 0;
|
||||
let okCount = 0;
|
||||
let failCount = 0;
|
||||
|
||||
@@ -878,7 +875,6 @@ export function StudioClient({
|
||||
return next;
|
||||
});
|
||||
if (evt.status === "done" || evt.status === "failed") {
|
||||
done++;
|
||||
if (evt.status === "failed") {
|
||||
setFailedClassnames((prev) =>
|
||||
prev.includes(cn) ? prev : [...prev, cn],
|
||||
|
||||
@@ -49,4 +49,4 @@ describe("Housekeeping runtime parity", () => {
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -10,7 +10,10 @@ const PREVIEW_ENTRYPOINTS = [
|
||||
] as const;
|
||||
|
||||
const STABLE_UI_ROOTS = ["src/app/admin", "src/app/mod"] as const;
|
||||
const PREMATURE_UI_ROOTS = [["src/app/admin", "-next"].join(""), ["src/app", "ase"].join("/")] as const;
|
||||
const PREMATURE_UI_ROOTS = [
|
||||
["src/app/admin", "-next"].join(""),
|
||||
["src/app", "ase"].join("/"),
|
||||
] as const;
|
||||
const STABLE_GLOBAL_SOURCES = [
|
||||
"src/lib/admin/guard.ts",
|
||||
"src/lib/proxy-access.ts",
|
||||
@@ -75,4 +78,4 @@ describe("gated Housekeeping preview coexistence", () => {
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -33,7 +33,11 @@ const expected = [
|
||||
["content.media.ads", "/ase-next/content/media/ads", "media"],
|
||||
["content.media.ad-create", "/ase-next/content/media/ads/new", "media"],
|
||||
["content.media.ad-detail", "/ase-next/content/media/ads/:id", "media"],
|
||||
["content.engagement.events", "/ase-next/content/engagement/events", "engagement"],
|
||||
[
|
||||
"content.engagement.events",
|
||||
"/ase-next/content/engagement/events",
|
||||
"engagement",
|
||||
],
|
||||
[
|
||||
"content.engagement.event-create",
|
||||
"/ase-next/content/engagement/events/create",
|
||||
@@ -49,7 +53,11 @@ const expected = [
|
||||
"/ase-next/content/engagement/events/:id",
|
||||
"engagement",
|
||||
],
|
||||
["content.engagement.polls", "/ase-next/content/engagement/polls", "engagement"],
|
||||
[
|
||||
"content.engagement.polls",
|
||||
"/ase-next/content/engagement/polls",
|
||||
"engagement",
|
||||
],
|
||||
[
|
||||
"content.engagement.poll-create",
|
||||
"/ase-next/content/engagement/polls/create",
|
||||
@@ -61,8 +69,16 @@ const expected = [
|
||||
"engagement",
|
||||
],
|
||||
["content.help.questions", "/ase-next/content/help/questions", "help"],
|
||||
["content.help.question-create", "/ase-next/content/help/questions/new", "help"],
|
||||
["content.help.question-detail", "/ase-next/content/help/questions/:id", "help"],
|
||||
[
|
||||
"content.help.question-create",
|
||||
"/ase-next/content/help/questions/new",
|
||||
"help",
|
||||
],
|
||||
[
|
||||
"content.help.question-detail",
|
||||
"/ase-next/content/help/questions/:id",
|
||||
"help",
|
||||
],
|
||||
["content.editorial.tags", "/ase-next/content/editorial/tags", "editorial"],
|
||||
[
|
||||
"content.engagement.prefixes",
|
||||
@@ -74,7 +90,11 @@ const expected = [
|
||||
"/ase-next/content/editorial/writeable-boxes",
|
||||
"editorial",
|
||||
],
|
||||
["content.help.email-templates", "/ase-next/content/help/email-templates", "help"],
|
||||
[
|
||||
"content.help.email-templates",
|
||||
"/ase-next/content/help/email-templates",
|
||||
"help",
|
||||
],
|
||||
["content.brand.theme", "/ase-next/content/brand/theme", "brand"],
|
||||
[
|
||||
"content.brand.theme-builder",
|
||||
@@ -92,7 +112,11 @@ const expected = [
|
||||
"/ase-next/content/localization/client",
|
||||
"localization",
|
||||
],
|
||||
["content.localization.cms", "/ase-next/content/localization/cms", "localization"],
|
||||
[
|
||||
"content.localization.cms",
|
||||
"/ase-next/content/localization/cms",
|
||||
"localization",
|
||||
],
|
||||
[
|
||||
"content.localization.emulator",
|
||||
"/ase-next/content/localization/emulator",
|
||||
|
||||
@@ -98,9 +98,11 @@ export const CONTENT_ROUTES = [
|
||||
contentRoute("content.media.ad-detail", "/ase-next/content/media/ads/:id", [
|
||||
PERMS.PAGES_VIEW,
|
||||
]),
|
||||
contentRoute("content.engagement.events", "/ase-next/content/engagement/events", [
|
||||
PERMS.EVENTS_VIEW,
|
||||
]),
|
||||
contentRoute(
|
||||
"content.engagement.events",
|
||||
"/ase-next/content/engagement/events",
|
||||
[PERMS.EVENTS_VIEW],
|
||||
),
|
||||
contentRoute(
|
||||
"content.engagement.event-create",
|
||||
"/ase-next/content/engagement/events/create",
|
||||
@@ -116,9 +118,11 @@ export const CONTENT_ROUTES = [
|
||||
"/ase-next/content/engagement/events/:id",
|
||||
[PERMS.EVENTS_EDIT],
|
||||
),
|
||||
contentRoute("content.engagement.polls", "/ase-next/content/engagement/polls", [
|
||||
PERMS.POLLS_VIEW,
|
||||
]),
|
||||
contentRoute(
|
||||
"content.engagement.polls",
|
||||
"/ase-next/content/engagement/polls",
|
||||
[PERMS.POLLS_VIEW],
|
||||
),
|
||||
contentRoute(
|
||||
"content.engagement.poll-create",
|
||||
"/ase-next/content/engagement/polls/create",
|
||||
@@ -171,17 +175,21 @@ export const CONTENT_ROUTES = [
|
||||
contentRoute("content.brand.favicon", "/ase-next/content/brand/favicon", [
|
||||
PERMS.SETTINGS_VIEW,
|
||||
]),
|
||||
contentRoute("content.localization.overview", "/ase-next/content/localization", [
|
||||
PERMS.SETTINGS_VIEW,
|
||||
]),
|
||||
contentRoute(
|
||||
"content.localization.overview",
|
||||
"/ase-next/content/localization",
|
||||
[PERMS.SETTINGS_VIEW],
|
||||
),
|
||||
contentRoute(
|
||||
"content.localization.client",
|
||||
"/ase-next/content/localization/client",
|
||||
[PERMS.SETTINGS_VIEW],
|
||||
),
|
||||
contentRoute("content.localization.cms", "/ase-next/content/localization/cms", [
|
||||
PERMS.SETTINGS_VIEW,
|
||||
]),
|
||||
contentRoute(
|
||||
"content.localization.cms",
|
||||
"/ase-next/content/localization/cms",
|
||||
[PERMS.SETTINGS_VIEW],
|
||||
),
|
||||
contentRoute(
|
||||
"content.localization.emulator",
|
||||
"/ase-next/content/localization/emulator",
|
||||
|
||||
@@ -42,7 +42,11 @@ const expected = [
|
||||
"/ase-next/economy/commerce/marketplace",
|
||||
"commerce",
|
||||
],
|
||||
["economy.commerce.vouchers", "/ase-next/economy/commerce/vouchers", "commerce"],
|
||||
[
|
||||
"economy.commerce.vouchers",
|
||||
"/ase-next/economy/commerce/vouchers",
|
||||
"commerce",
|
||||
],
|
||||
[
|
||||
"economy.commerce.subscriptions",
|
||||
"/ase-next/economy/commerce/subscriptions",
|
||||
|
||||
@@ -92,9 +92,11 @@ export const ECONOMY_ROUTES = [
|
||||
"/ase-next/economy/commerce/marketplace",
|
||||
[PERMS.SHOP_VIEW],
|
||||
),
|
||||
economyRoute("economy.commerce.vouchers", "/ase-next/economy/commerce/vouchers", [
|
||||
PERMS.SHOP_VIEW,
|
||||
]),
|
||||
economyRoute(
|
||||
"economy.commerce.vouchers",
|
||||
"/ase-next/economy/commerce/vouchers",
|
||||
[PERMS.SHOP_VIEW],
|
||||
),
|
||||
economyRoute(
|
||||
"economy.commerce.subscriptions",
|
||||
"/ase-next/economy/commerce/subscriptions",
|
||||
@@ -105,9 +107,11 @@ export const ECONOMY_ROUTES = [
|
||||
"/ase-next/economy/history/transactions",
|
||||
[PERMS.SHOP_VIEW],
|
||||
),
|
||||
economyRoute("economy.value.rare-values", "/ase-next/economy/value/rare-values", [
|
||||
PERMS.SHOP_VIEW,
|
||||
]),
|
||||
economyRoute(
|
||||
"economy.value.rare-values",
|
||||
"/ase-next/economy/value/rare-values",
|
||||
[PERMS.SHOP_VIEW],
|
||||
),
|
||||
economyRoute("economy.rewards.badges", "/ase-next/economy/rewards/badges", [
|
||||
PERMS.CATALOG_VIEW,
|
||||
]),
|
||||
@@ -119,9 +123,11 @@ export const ECONOMY_ROUTES = [
|
||||
economyRoute("economy.rewards.sounds", "/ase-next/economy/rewards/sounds", [
|
||||
PERMS.CATALOG_VIEW,
|
||||
]),
|
||||
economyRoute("economy.rewards.calendar", "/ase-next/economy/rewards/calendar", [
|
||||
PERMS.SHOP_VIEW,
|
||||
]),
|
||||
economyRoute(
|
||||
"economy.rewards.calendar",
|
||||
"/ase-next/economy/rewards/calendar",
|
||||
[PERMS.SHOP_VIEW],
|
||||
),
|
||||
economyRoute(
|
||||
"economy.rewards.calendar-detail",
|
||||
"/ase-next/economy/rewards/calendar/:id",
|
||||
|
||||
@@ -93,7 +93,9 @@ describe("Hotel query adapters", () => {
|
||||
const query = createHotelQuery({
|
||||
load: async () => ({
|
||||
kind: "rooms",
|
||||
items: [{ id: "1", title: "Unsafe", href: "/ase-next/hotel/%2e%2e/system" }],
|
||||
items: [
|
||||
{ id: "1", title: "Unsafe", href: "/ase-next/hotel/%2e%2e/system" },
|
||||
],
|
||||
total: 1,
|
||||
partialDependencies: ["imaginary"],
|
||||
}),
|
||||
|
||||
@@ -128,7 +128,10 @@ export const HOTEL_STUDIO_ROUTES = [
|
||||
studioRoute("hotel.studio.furni", "/ase-next/hotel/studio/furni"),
|
||||
studioRoute("hotel.studio.maintenance", "/ase-next/hotel/studio/maintenance"),
|
||||
studioRoute("hotel.studio.pets", "/ase-next/hotel/studio/pets"),
|
||||
studioRoute("hotel.studio.repair-icons", "/ase-next/hotel/studio/repair-icons"),
|
||||
studioRoute(
|
||||
"hotel.studio.repair-icons",
|
||||
"/ase-next/hotel/studio/repair-icons",
|
||||
),
|
||||
studioRoute("hotel.studio.sync", "/ase-next/hotel/studio/sync"),
|
||||
studioRoute("hotel.studio.upload", "/ase-next/hotel/studio/upload"),
|
||||
] as const satisfies readonly HousekeepingRouteDefinition[];
|
||||
|
||||
@@ -71,9 +71,9 @@ describe("People providers", () => {
|
||||
expect(result.ok).toBe(true);
|
||||
if (!result.ok) return;
|
||||
expect(result.data).toHaveLength(25);
|
||||
expect(result.data.every((item) => item.href.startsWith("/ase-next/"))).toBe(
|
||||
true,
|
||||
);
|
||||
expect(
|
||||
result.data.every((item) => item.href.startsWith("/ase-next/")),
|
||||
).toBe(true);
|
||||
expect(result.data.map((item) => item.id)).not.toContain("candidate-1");
|
||||
});
|
||||
|
||||
@@ -106,7 +106,10 @@ describe("People providers", () => {
|
||||
expect(search).toMatchObject({
|
||||
ok: true,
|
||||
data: [
|
||||
{ id: "candidate-7", href: "/ase-next/people/users/7?tab=profile#security" },
|
||||
{
|
||||
id: "candidate-7",
|
||||
href: "/ase-next/people/users/7?tab=profile#security",
|
||||
},
|
||||
{ id: "candidate-8", href: "/ase-next?view=queue#top" },
|
||||
],
|
||||
});
|
||||
@@ -140,7 +143,10 @@ describe("People providers", () => {
|
||||
ok: true,
|
||||
data: {
|
||||
items: [
|
||||
{ itemId: "7", href: "/ase-next/people/users/7?tab=profile#security" },
|
||||
{
|
||||
itemId: "7",
|
||||
href: "/ase-next/people/users/7?tab=profile#security",
|
||||
},
|
||||
{ itemId: "8", href: "/ase-next?view=queue#top" },
|
||||
],
|
||||
},
|
||||
|
||||
@@ -379,7 +379,9 @@ describe("People production authorization boundary", () => {
|
||||
ok: true,
|
||||
data: {
|
||||
page: {
|
||||
items: [{ id: "12", href: "/ase-next/people/support/help-tickets/12" }],
|
||||
items: [
|
||||
{ id: "12", href: "/ase-next/people/support/help-tickets/12" },
|
||||
],
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
@@ -86,7 +86,11 @@ const expectedRoutes = [
|
||||
"/ase-next/people/moderation/bans",
|
||||
[PERMS.BANS_VIEW, PERMS.MOD_BANS_VIEW],
|
||||
],
|
||||
["people.moderation.ip", "/ase-next/people/moderation/ip", [PERMS.SETTINGS_VIEW]],
|
||||
[
|
||||
"people.moderation.ip",
|
||||
"/ase-next/people/moderation/ip",
|
||||
[PERMS.SETTINGS_VIEW],
|
||||
],
|
||||
[
|
||||
"people.moderation.vpn",
|
||||
"/ase-next/people/moderation/vpn",
|
||||
|
||||
@@ -75,9 +75,11 @@ export const PEOPLE_ROUTES = [
|
||||
"/ase-next/people/community/guilds/:id",
|
||||
[PERMS.USERS_VIEW],
|
||||
),
|
||||
peopleRoute("people.staff.applications", "/ase-next/people/staff/applications", [
|
||||
PERMS.USERS_VIEW,
|
||||
]),
|
||||
peopleRoute(
|
||||
"people.staff.applications",
|
||||
"/ase-next/people/staff/applications",
|
||||
[PERMS.USERS_VIEW],
|
||||
),
|
||||
peopleRoute("people.staff.teams", "/ase-next/people/staff/teams", [
|
||||
PERMS.USERS_VIEW,
|
||||
]),
|
||||
@@ -94,10 +96,11 @@ export const PEOPLE_ROUTES = [
|
||||
PERMS.MOD_USERS_VIEW,
|
||||
PERMS.USERS_VIEW,
|
||||
]),
|
||||
peopleRoute("people.moderation.actions", "/ase-next/people/moderation/actions", [
|
||||
PERMS.MODERATION_EDIT,
|
||||
PERMS.MOD_ACTIONS,
|
||||
]),
|
||||
peopleRoute(
|
||||
"people.moderation.actions",
|
||||
"/ase-next/people/moderation/actions",
|
||||
[PERMS.MODERATION_EDIT, PERMS.MOD_ACTIONS],
|
||||
),
|
||||
peopleRoute("people.moderation.cfh", "/ase-next/people/moderation/cfh", [
|
||||
PERMS.MODERATION_VIEW,
|
||||
PERMS.MOD_CFH_VIEW,
|
||||
|
||||
@@ -64,6 +64,7 @@ export function isSafeHousekeepingHref(href: string): boolean {
|
||||
}
|
||||
return (
|
||||
normalized.origin === HOUSEKEEPING_ORIGIN &&
|
||||
(normalized.pathname === "/ase-next" || normalized.pathname.startsWith("/ase-next/"))
|
||||
(normalized.pathname === "/ase-next" ||
|
||||
normalized.pathname.startsWith("/ase-next/"))
|
||||
);
|
||||
}
|
||||
@@ -3,7 +3,10 @@ import { PERMS } from "@/lib/permission-slugs";
|
||||
import { HOUSEKEEPING_MANIFESTS } from "../manifests";
|
||||
import { anyCapability, type HousekeepingCapabilityContext } from "./contracts";
|
||||
import { buildHousekeepingNavigation } from "./navigation";
|
||||
import { createHousekeepingRegistry, type HousekeepingRegistry } from "./registry";
|
||||
import {
|
||||
createHousekeepingRegistry,
|
||||
type HousekeepingRegistry,
|
||||
} from "./registry";
|
||||
import type { HousekeepingRouteHandler } from "./routing/route-handler";
|
||||
import { createHousekeepingRouteRuntime } from "./routing/runtime";
|
||||
|
||||
@@ -208,4 +211,4 @@ describe("housekeeping navigation", () => {
|
||||
items: [{ id: "users", href: "/ase-next/people/users" }],
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -54,4 +54,4 @@ export function buildHousekeepingNavigation(
|
||||
|
||||
function isConcreteNavigationHref(href: string): boolean {
|
||||
return !href.split("/").some((segment) => segment.startsWith(":"));
|
||||
}
|
||||
}
|
||||
@@ -149,7 +149,10 @@ describe("housekeeping recent work", () => {
|
||||
|
||||
expect(allowed).toMatchObject({
|
||||
ok: true,
|
||||
data: { routeId: "people.users", canonicalHref: "/ase-next/people/users" },
|
||||
data: {
|
||||
routeId: "people.users",
|
||||
canonicalHref: "/ase-next/people/users",
|
||||
},
|
||||
});
|
||||
expect(writeAudit).toHaveBeenCalledOnce();
|
||||
expect(writeAudit).toHaveBeenCalledWith(
|
||||
|
||||
@@ -9,7 +9,9 @@ describe("toHousekeepingHref", () => {
|
||||
});
|
||||
|
||||
it("keeps canonical domain routes unchanged", () => {
|
||||
expect(toHousekeepingHref("/ase-next/people/users")).toBe("/ase-next/people/users");
|
||||
expect(toHousekeepingHref("/ase-next/people/users")).toBe(
|
||||
"/ase-next/people/users",
|
||||
);
|
||||
});
|
||||
|
||||
it("rejects paths outside the canonical ase namespace", () => {
|
||||
|
||||
@@ -44,7 +44,10 @@ const registry = createHousekeepingRegistry([
|
||||
route("people.user-detail", "/ase-next/people/users/:id"),
|
||||
route("people.user-create", "/ase-next/people/users/new"),
|
||||
route("people.users", "/ase-next/people/users"),
|
||||
route("people.ticket-note", "/ase-next/people/tickets/:ticketId/notes/:noteId"),
|
||||
route(
|
||||
"people.ticket-note",
|
||||
"/ase-next/people/tickets/:ticketId/notes/:noteId",
|
||||
),
|
||||
route("people.literal-tool", "/ase-next/people/tools/a+b[1]"),
|
||||
]),
|
||||
]);
|
||||
@@ -60,7 +63,9 @@ describe("matchHousekeepingRoute", () => {
|
||||
});
|
||||
|
||||
it("prefers a static route over a dynamic route with the same depth", () => {
|
||||
expect(matchHousekeepingRoute(registry, "/ase-next/people/users/new")).toEqual({
|
||||
expect(
|
||||
matchHousekeepingRoute(registry, "/ase-next/people/users/new"),
|
||||
).toEqual({
|
||||
routeId: "people.user-create",
|
||||
domain: "people",
|
||||
params: {},
|
||||
@@ -123,7 +128,10 @@ describe("matchHousekeepingRoute", () => {
|
||||
]);
|
||||
|
||||
expect(
|
||||
matchHousekeepingRoute(orderedRegistry, "/ase-next/people/users/settings"),
|
||||
matchHousekeepingRoute(
|
||||
orderedRegistry,
|
||||
"/ase-next/people/users/settings",
|
||||
),
|
||||
)?.toMatchObject({
|
||||
routeId: "people.user-detail",
|
||||
params: { id: "settings" },
|
||||
|
||||
@@ -184,4 +184,4 @@ function matchSegments(
|
||||
}
|
||||
|
||||
return params;
|
||||
}
|
||||
}
|
||||
@@ -26,4 +26,4 @@ export interface HousekeepingRouteRenderInput {
|
||||
export interface HousekeepingRouteHandler {
|
||||
routeId: string;
|
||||
render(input: HousekeepingRouteRenderInput): Promise<ReactNode>;
|
||||
}
|
||||
}
|
||||
@@ -35,7 +35,9 @@ const domains: readonly HousekeepingNavigationDomain[] = [
|
||||
iconId: "inbox",
|
||||
label: "Operations",
|
||||
description: "Manage operations",
|
||||
items: [{ id: "queue", href: "/ase-next/operations/queue", label: "Queue" }],
|
||||
items: [
|
||||
{ id: "queue", href: "/ase-next/operations/queue", label: "Queue" },
|
||||
],
|
||||
},
|
||||
{
|
||||
id: "people",
|
||||
|
||||
@@ -110,8 +110,8 @@ describe("OperationalInbox", () => {
|
||||
});
|
||||
|
||||
it("projects canonical hrefs without changing production destinations", () => {
|
||||
expect(projectOperationalInboxHref("/ase-next/system/operations/alerts")).toBe(
|
||||
"/ase-next/system/operations/alerts",
|
||||
);
|
||||
expect(
|
||||
projectOperationalInboxHref("/ase-next/system/operations/alerts"),
|
||||
).toBe("/ase-next/system/operations/alerts");
|
||||
});
|
||||
});
|
||||
@@ -36,7 +36,8 @@ describe("contentMigrationEntries", () => {
|
||||
expect(
|
||||
contentMigrationEntries.every(
|
||||
(row) =>
|
||||
row.targetPath === null || row.targetPath.startsWith("/ase-next/content/"),
|
||||
row.targetPath === null ||
|
||||
row.targetPath.startsWith("/ase-next/content/"),
|
||||
),
|
||||
).toBe(true);
|
||||
});
|
||||
|
||||
@@ -31,7 +31,8 @@ describe("economyMigrationEntries", () => {
|
||||
expect(
|
||||
economyMigrationEntries.every(
|
||||
(row) =>
|
||||
row.targetPath === null || row.targetPath.startsWith("/ase-next/economy/"),
|
||||
row.targetPath === null ||
|
||||
row.targetPath.startsWith("/ase-next/economy/"),
|
||||
),
|
||||
).toBe(true);
|
||||
});
|
||||
|
||||
@@ -26,7 +26,8 @@ describe("hotelMigrationEntries", () => {
|
||||
expect(
|
||||
hotelMigrationEntries.every(
|
||||
(row) =>
|
||||
row.targetPath === null || row.targetPath.startsWith("/ase-next/hotel/"),
|
||||
row.targetPath === null ||
|
||||
row.targetPath.startsWith("/ase-next/hotel/"),
|
||||
),
|
||||
).toBe(true);
|
||||
});
|
||||
|
||||
@@ -84,7 +84,10 @@ export function validateMigrationEntries(
|
||||
if (
|
||||
entry.targetPath !== null &&
|
||||
entry.decision !== "REMOVE" &&
|
||||
!(entry.targetPath === "/ase-next" || entry.targetPath.startsWith("/ase-next/"))
|
||||
!(
|
||||
entry.targetPath === "/ase-next" ||
|
||||
entry.targetPath.startsWith("/ase-next/")
|
||||
)
|
||||
) {
|
||||
issues.add(`non-REMOVE targetPath must use /ase-next: ${legacyPath}`);
|
||||
}
|
||||
|
||||
@@ -20,4 +20,4 @@ export const HOUSEKEEPING_ROUTE_HANDLERS: readonly HousekeepingRouteHandler[] =
|
||||
...ECONOMY_ROUTE_HANDLERS,
|
||||
...HOTEL_ROUTE_HANDLERS,
|
||||
...SYSTEM_ROUTE_HANDLERS,
|
||||
]);
|
||||
]);
|
||||
Reference in new issue
Block a user