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
@@ -35,8 +35,11 @@ export default async function AdminNextDomainLayout({
|
||||
if (!satisfiesCapability(context, activeDomain.capability)) notFound();
|
||||
|
||||
const translate = await getTranslations("pages.housekeeping");
|
||||
const navigation = buildHousekeepingNavigation(registry, context, (key) =>
|
||||
translate(namespaceKey(key) as never),
|
||||
const navigation = buildHousekeepingNavigation(
|
||||
registry,
|
||||
context,
|
||||
"preview",
|
||||
(key) => translate(namespaceKey(key) as never),
|
||||
);
|
||||
|
||||
return (
|
||||
File renamed without changes.
File renamed without changes.
@@ -1,6 +1,7 @@
|
||||
import { notFound, redirect } from "next/navigation";
|
||||
import { satisfiesCapability } from "@/features/housekeeping/foundation/capability-context";
|
||||
import { createHousekeepingRegistry } from "@/features/housekeeping/foundation/registry";
|
||||
import { toHousekeepingHref } from "@/features/housekeeping/foundation/routing/href";
|
||||
import { getHousekeepingCapabilityContext } from "@/features/housekeeping/foundation/server-capability-context";
|
||||
import { HOUSEKEEPING_MANIFESTS } from "@/features/housekeeping/manifests";
|
||||
|
||||
@@ -13,5 +14,5 @@ export default async function AdminNextPage() {
|
||||
|
||||
if (!firstVisibleDomain) notFound();
|
||||
|
||||
redirect(firstVisibleDomain.previewHref);
|
||||
redirect(toHousekeepingHref(firstVisibleDomain.canonicalHref, "preview"));
|
||||
}
|
||||
@@ -9,7 +9,7 @@ export const contentManifest = {
|
||||
labelKey: "pages.housekeeping.domains.content.title",
|
||||
descriptionKey: "pages.housekeeping.domains.content.description",
|
||||
iconId: "file-text",
|
||||
previewHref: "/admin-next/content",
|
||||
canonicalHref: "/ase/content",
|
||||
capability: anyCapability(
|
||||
PERMS.NEWS_VIEW,
|
||||
PERMS.PAGES_VIEW,
|
||||
|
||||
@@ -9,7 +9,7 @@ export const economyManifest = {
|
||||
labelKey: "pages.housekeeping.domains.economy.title",
|
||||
descriptionKey: "pages.housekeeping.domains.economy.description",
|
||||
iconId: "gem",
|
||||
previewHref: "/admin-next/economy",
|
||||
canonicalHref: "/ase/economy",
|
||||
capability: anyCapability(
|
||||
PERMS.CATALOG_VIEW,
|
||||
PERMS.SHOP_VIEW,
|
||||
|
||||
@@ -9,7 +9,7 @@ export const hotelManifest = {
|
||||
labelKey: "pages.housekeeping.domains.hotel.title",
|
||||
descriptionKey: "pages.housekeeping.domains.hotel.description",
|
||||
iconId: "hotel",
|
||||
previewHref: "/admin-next/hotel",
|
||||
canonicalHref: "/ase/hotel",
|
||||
capability: anyCapability(
|
||||
PERMS.ROOMS_VIEW,
|
||||
PERMS.RADIO_VIEW,
|
||||
|
||||
@@ -9,7 +9,7 @@ export const operationsManifest = {
|
||||
labelKey: "pages.housekeeping.domains.operations.title",
|
||||
descriptionKey: "pages.housekeeping.domains.operations.description",
|
||||
iconId: "inbox",
|
||||
previewHref: "/admin-next/operations",
|
||||
canonicalHref: "/ase",
|
||||
capability: anyCapability(PERMS.ADMIN_DASHBOARD),
|
||||
routes: [],
|
||||
searchProviders: [],
|
||||
|
||||
@@ -9,7 +9,7 @@ export const peopleManifest = {
|
||||
labelKey: "pages.housekeeping.domains.people.title",
|
||||
descriptionKey: "pages.housekeeping.domains.people.description",
|
||||
iconId: "users",
|
||||
previewHref: "/admin-next/people",
|
||||
canonicalHref: "/ase/people",
|
||||
capability: anyCapability(
|
||||
PERMS.USERS_VIEW,
|
||||
PERMS.MODERATION_VIEW,
|
||||
|
||||
@@ -9,7 +9,7 @@ export const systemManifest = {
|
||||
labelKey: "pages.housekeeping.domains.system.title",
|
||||
descriptionKey: "pages.housekeeping.domains.system.description",
|
||||
iconId: "settings",
|
||||
previewHref: "/admin-next/system",
|
||||
canonicalHref: "/ase/system",
|
||||
capability: anyCapability(
|
||||
PERMS.SETTINGS_VIEW,
|
||||
PERMS.LOGS_VIEW,
|
||||
|
||||
@@ -28,7 +28,7 @@ const workItem = {
|
||||
occurredAt: "2026-08-24T12:00:00.000Z",
|
||||
titleKey: "pages.housekeeping.items.ticket",
|
||||
context: { ticketId: "42" },
|
||||
href: "/admin-next/people/tickets/42",
|
||||
href: "/ase-next/people/tickets/42",
|
||||
freshness: "fresh",
|
||||
} satisfies HousekeepingWorkItem;
|
||||
|
||||
@@ -36,7 +36,7 @@ const searchResult = {
|
||||
id: "user-42",
|
||||
domain: "people",
|
||||
title: "operator",
|
||||
href: "/admin-next/people/users/42",
|
||||
href: "/ase-next/people/users/42",
|
||||
} satisfies HousekeepingSearchResult;
|
||||
|
||||
const searchProvider: HousekeepingSearchProvider = {
|
||||
@@ -87,7 +87,7 @@ const manifest: HousekeepingDomainManifest = {
|
||||
labelKey: "pages.housekeeping.domains.people.title",
|
||||
descriptionKey: "pages.housekeeping.domains.people.description",
|
||||
iconId: "users",
|
||||
previewHref: "/admin-next/people",
|
||||
canonicalHref: "/ase-next/people",
|
||||
capability,
|
||||
routes: [],
|
||||
searchProviders: [searchProvider],
|
||||
|
||||
@@ -4,10 +4,12 @@ import type { HousekeepingInboxSource } from "./inbox";
|
||||
import type { HousekeepingSearchProvider } from "./search";
|
||||
import type { HousekeepingWidgetDefinition } from "./widget";
|
||||
|
||||
export type HousekeepingSurface = "preview" | "canonical";
|
||||
export type CanonicalHousekeepingHref = `/ase${string}`;
|
||||
export interface HousekeepingRouteDefinition {
|
||||
id: string;
|
||||
labelKey: string;
|
||||
href: string;
|
||||
href: CanonicalHousekeepingHref;
|
||||
capability: CapabilityRequirement;
|
||||
matchPrefixes?: readonly string[];
|
||||
}
|
||||
@@ -17,7 +19,7 @@ export interface HousekeepingDomainManifest {
|
||||
labelKey: string;
|
||||
descriptionKey: string;
|
||||
iconId: "inbox" | "users" | "file-text" | "gem" | "hotel" | "settings";
|
||||
previewHref: `/admin-next/${HousekeepingDomainId}`;
|
||||
canonicalHref: CanonicalHousekeepingHref;
|
||||
capability: CapabilityRequirement;
|
||||
routes: readonly HousekeepingRouteDefinition[];
|
||||
searchProviders: readonly HousekeepingSearchProvider[];
|
||||
|
||||
@@ -7,8 +7,10 @@ export {
|
||||
} from "./capability";
|
||||
export type { HousekeepingCommand } from "./command";
|
||||
export type {
|
||||
CanonicalHousekeepingHref,
|
||||
HousekeepingDomainManifest,
|
||||
HousekeepingRouteDefinition,
|
||||
HousekeepingSurface,
|
||||
} from "./domain";
|
||||
export type {
|
||||
HousekeepingInboxSource,
|
||||
|
||||
@@ -555,7 +555,7 @@ describe("housekeeping foundation completion contracts", () => {
|
||||
for (const path of [
|
||||
"src/app/admin/layout.tsx",
|
||||
"src/app/mod/layout.tsx",
|
||||
"src/app/admin-next/layout.tsx",
|
||||
"src/app/ase-next/layout.tsx",
|
||||
]) {
|
||||
expect(existsSync(path), path).toBe(true);
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ describe("housekeeping navigation", () => {
|
||||
labelKey: "pages.housekeeping.domains.people.title",
|
||||
descriptionKey: "pages.housekeeping.domains.people.description",
|
||||
iconId: "users",
|
||||
previewHref: "/admin-next/people",
|
||||
canonicalHref: "/ase/people",
|
||||
capability: anyCapability(PERMS.MOD_CFH_VIEW),
|
||||
routes: [],
|
||||
searchProviders: [],
|
||||
@@ -35,7 +35,7 @@ describe("housekeeping navigation", () => {
|
||||
labelKey: "pages.housekeeping.domains.economy.title",
|
||||
descriptionKey: "pages.housekeeping.domains.economy.description",
|
||||
iconId: "gem",
|
||||
previewHref: "/admin-next/economy",
|
||||
canonicalHref: "/ase/economy",
|
||||
capability: anyCapability(PERMS.CATALOG_VIEW),
|
||||
routes: [],
|
||||
searchProviders: [],
|
||||
@@ -47,13 +47,14 @@ describe("housekeeping navigation", () => {
|
||||
const navigation = buildHousekeepingNavigation(
|
||||
registry,
|
||||
context([PERMS.MOD_CFH_VIEW]),
|
||||
"canonical",
|
||||
(key) => key,
|
||||
);
|
||||
|
||||
expect(navigation).toEqual([
|
||||
{
|
||||
id: "people",
|
||||
href: "/admin-next/people",
|
||||
href: "/ase/people",
|
||||
iconId: "users",
|
||||
label: "pages.housekeeping.domains.people.title",
|
||||
description: "pages.housekeeping.domains.people.description",
|
||||
@@ -69,19 +70,19 @@ describe("housekeeping navigation", () => {
|
||||
labelKey: "people.title",
|
||||
descriptionKey: "people.description",
|
||||
iconId: "users",
|
||||
previewHref: "/admin-next/people",
|
||||
canonicalHref: "/ase/people",
|
||||
capability: anyCapability(PERMS.USERS_VIEW),
|
||||
routes: [
|
||||
{
|
||||
id: "users",
|
||||
labelKey: "people.users",
|
||||
href: "/admin-next/people/users",
|
||||
href: "/ase/people/users",
|
||||
capability: anyCapability(PERMS.USERS_VIEW),
|
||||
},
|
||||
{
|
||||
id: "bans",
|
||||
labelKey: "people.bans",
|
||||
href: "/admin-next/people/bans",
|
||||
href: "/ase/people/bans",
|
||||
capability: anyCapability(PERMS.BANS_VIEW),
|
||||
},
|
||||
],
|
||||
@@ -94,7 +95,7 @@ describe("housekeeping navigation", () => {
|
||||
labelKey: "system.title",
|
||||
descriptionKey: "system.description",
|
||||
iconId: "settings",
|
||||
previewHref: "/admin-next/system",
|
||||
canonicalHref: "/ase/system",
|
||||
capability: anyCapability(PERMS.SETTINGS_VIEW),
|
||||
routes: [],
|
||||
searchProviders: [],
|
||||
@@ -107,20 +108,21 @@ describe("housekeeping navigation", () => {
|
||||
const navigation = buildHousekeepingNavigation(
|
||||
registry,
|
||||
context([PERMS.USERS_VIEW]),
|
||||
"canonical",
|
||||
translate,
|
||||
);
|
||||
|
||||
expect(navigation).toEqual([
|
||||
{
|
||||
id: "people",
|
||||
href: "/admin-next/people",
|
||||
href: "/ase/people",
|
||||
iconId: "users",
|
||||
label: "translated:people.title",
|
||||
description: "translated:people.description",
|
||||
items: [
|
||||
{
|
||||
id: "users",
|
||||
href: "/admin-next/people/users",
|
||||
href: "/ase/people/users",
|
||||
label: "translated:people.users",
|
||||
},
|
||||
],
|
||||
@@ -138,6 +140,7 @@ describe("housekeeping navigation", () => {
|
||||
buildHousekeepingNavigation(
|
||||
registry,
|
||||
context([PERMS.MOD_CFH_VIEW]),
|
||||
"preview",
|
||||
translate,
|
||||
).map((domain) => domain.id),
|
||||
).toContain("people");
|
||||
@@ -145,6 +148,7 @@ describe("housekeeping navigation", () => {
|
||||
buildHousekeepingNavigation(
|
||||
registry,
|
||||
context([PERMS.MOD_CFH_VIEW]),
|
||||
"preview",
|
||||
translate,
|
||||
).map((domain) => domain.id),
|
||||
).not.toContain("economy");
|
||||
@@ -160,6 +164,7 @@ describe("housekeeping navigation", () => {
|
||||
const visibleDomainIds = buildHousekeepingNavigation(
|
||||
registry,
|
||||
context([slug]),
|
||||
"preview",
|
||||
translate,
|
||||
).map((domain) => domain.id);
|
||||
|
||||
@@ -167,3 +172,38 @@ describe("housekeeping navigation", () => {
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
it("maps canonical navigation hrefs onto the requested surface", () => {
|
||||
const registry = createHousekeepingRegistry([
|
||||
{
|
||||
id: "people",
|
||||
labelKey: "people.title",
|
||||
descriptionKey: "people.description",
|
||||
iconId: "users",
|
||||
canonicalHref: "/ase/people",
|
||||
capability: anyCapability(PERMS.USERS_VIEW),
|
||||
routes: [
|
||||
{
|
||||
id: "users",
|
||||
labelKey: "people.users",
|
||||
href: "/ase/people/users",
|
||||
capability: anyCapability(PERMS.USERS_VIEW),
|
||||
},
|
||||
],
|
||||
searchProviders: [],
|
||||
inboxSources: [],
|
||||
widgets: [],
|
||||
},
|
||||
]);
|
||||
const navigation = buildHousekeepingNavigation(
|
||||
registry,
|
||||
context([PERMS.USERS_VIEW]),
|
||||
"preview",
|
||||
(key) => key,
|
||||
);
|
||||
|
||||
expect(navigation[0]).toMatchObject({
|
||||
href: "/ase-next/people",
|
||||
items: [{ href: "/ase-next/people/users" }],
|
||||
});
|
||||
});
|
||||
@@ -3,8 +3,10 @@ import { satisfiesCapability } from "./capability-context";
|
||||
import type {
|
||||
HousekeepingCapabilityContext,
|
||||
HousekeepingDomainManifest,
|
||||
HousekeepingSurface,
|
||||
} from "./contracts";
|
||||
import type { HousekeepingRegistry } from "./registry";
|
||||
import { toHousekeepingHref } from "./routing/href";
|
||||
|
||||
export interface HousekeepingNavigationDomain {
|
||||
id: HousekeepingDomainId;
|
||||
@@ -18,13 +20,14 @@ export interface HousekeepingNavigationDomain {
|
||||
export function buildHousekeepingNavigation(
|
||||
registry: HousekeepingRegistry,
|
||||
context: HousekeepingCapabilityContext,
|
||||
surface: HousekeepingSurface,
|
||||
translate: (key: string) => string,
|
||||
): readonly HousekeepingNavigationDomain[] {
|
||||
return registry.domains
|
||||
.filter((domain) => satisfiesCapability(context, domain.capability))
|
||||
.map((domain) => ({
|
||||
id: domain.id,
|
||||
href: domain.previewHref,
|
||||
href: toHousekeepingHref(domain.canonicalHref, surface),
|
||||
iconId: domain.iconId,
|
||||
label: translate(domain.labelKey),
|
||||
description: translate(domain.descriptionKey),
|
||||
@@ -32,7 +35,7 @@ export function buildHousekeepingNavigation(
|
||||
.filter((route) => satisfiesCapability(context, route.capability))
|
||||
.map((route) => ({
|
||||
id: route.id,
|
||||
href: route.href,
|
||||
href: toHousekeepingHref(route.href, surface),
|
||||
label: translate(route.labelKey),
|
||||
})),
|
||||
}));
|
||||
|
||||
@@ -75,12 +75,12 @@ describe("HousekeepingPageState", () => {
|
||||
state="error"
|
||||
title="Could not load"
|
||||
description="Try again later"
|
||||
retryAction={<a href="/admin-next/operations">Retry preview</a>}
|
||||
retryAction={<a href="/ase-next/operations">Retry preview</a>}
|
||||
/>,
|
||||
);
|
||||
|
||||
expect(html).toContain('role="alert"');
|
||||
expect(html).toContain('href="/admin-next/operations"');
|
||||
expect(html).toContain('href="/ase-next/operations"');
|
||||
expect(html).toContain(">Retry preview<");
|
||||
});
|
||||
});
|
||||
@@ -92,7 +92,7 @@ describe("HousekeepingPageShell", () => {
|
||||
title="People"
|
||||
description="Review operator-facing people data"
|
||||
context={<span>Preview context</span>}
|
||||
primaryAction={<a href="/admin-next/people/new">Create preview</a>}
|
||||
primaryAction={<a href="/ase-next/people/new">Create preview</a>}
|
||||
>
|
||||
<p>Page body</p>
|
||||
</HousekeepingPageShell>,
|
||||
@@ -102,7 +102,7 @@ describe("HousekeepingPageShell", () => {
|
||||
expect(html).toContain(">People<");
|
||||
expect(html).toContain(">Review operator-facing people data<");
|
||||
expect(html).toContain(">Preview context<");
|
||||
expect(html).toContain('href="/admin-next/people/new"');
|
||||
expect(html).toContain('href="/ase-next/people/new"');
|
||||
expect(html).toContain(">Create preview<");
|
||||
expect(html).toContain(">Page body</p>");
|
||||
});
|
||||
|
||||
@@ -78,16 +78,16 @@ vi.mock("@/app/actions", () => {
|
||||
throw new Error("preview routes must not import actions");
|
||||
});
|
||||
|
||||
import AdminNextDomainLayout from "@/app/admin-next/[domain]/layout";
|
||||
import AdminNextDomainPage from "@/app/admin-next/[domain]/page";
|
||||
import AdminNextLayout from "@/app/admin-next/layout";
|
||||
import AdminNextPage from "@/app/admin-next/page";
|
||||
import AdminNextDomainLayout from "@/app/ase-next/[domain]/layout";
|
||||
import AdminNextDomainPage from "@/app/ase-next/[domain]/page";
|
||||
import AdminNextLayout from "@/app/ase-next/layout";
|
||||
import AdminNextPage from "@/app/ase-next/page";
|
||||
|
||||
const routeFiles = [
|
||||
"src/app/admin-next/layout.tsx",
|
||||
"src/app/admin-next/page.tsx",
|
||||
"src/app/admin-next/[domain]/layout.tsx",
|
||||
"src/app/admin-next/[domain]/page.tsx",
|
||||
"src/app/ase-next/layout.tsx",
|
||||
"src/app/ase-next/page.tsx",
|
||||
"src/app/ase-next/[domain]/layout.tsx",
|
||||
"src/app/ase-next/[domain]/page.tsx",
|
||||
] as const;
|
||||
|
||||
const forbiddenModuleRoots = [
|
||||
@@ -360,7 +360,7 @@ async function renderRoute(route: ReactNode | Promise<ReactNode>) {
|
||||
return renderToStaticMarkup(await route);
|
||||
}
|
||||
|
||||
describe("/admin-next preview gate", () => {
|
||||
describe("/ase-next preview gate", () => {
|
||||
beforeEach(() => {
|
||||
vi.clearAllMocks();
|
||||
routeMocks.env.NODE_ENV = "test";
|
||||
@@ -402,7 +402,7 @@ describe("/admin-next preview gate", () => {
|
||||
);
|
||||
});
|
||||
|
||||
describe("/admin-next first visible domain", () => {
|
||||
describe("/ase-next first visible domain", () => {
|
||||
beforeEach(() => {
|
||||
vi.clearAllMocks();
|
||||
});
|
||||
@@ -412,10 +412,8 @@ describe("/admin-next first visible domain", () => {
|
||||
capabilityContext([PERMS.ADMIN_DASHBOARD, PERMS.USERS_VIEW]),
|
||||
);
|
||||
|
||||
await expect(AdminNextPage()).rejects.toThrow(
|
||||
"NEXT_REDIRECT:/admin-next/operations",
|
||||
);
|
||||
expect(routeMocks.redirect).toHaveBeenCalledWith("/admin-next/operations");
|
||||
await expect(AdminNextPage()).rejects.toThrow("NEXT_REDIRECT:/ase-next");
|
||||
expect(routeMocks.redirect).toHaveBeenCalledWith("/ase-next");
|
||||
expect(routeMocks.getHousekeepingCapabilityContext).toHaveBeenCalledTimes(
|
||||
1,
|
||||
);
|
||||
@@ -428,9 +426,9 @@ describe("/admin-next first visible domain", () => {
|
||||
);
|
||||
|
||||
await expect(AdminNextPage()).rejects.toThrow(
|
||||
"NEXT_REDIRECT:/admin-next/people",
|
||||
"NEXT_REDIRECT:/ase-next/people",
|
||||
);
|
||||
expect(routeMocks.redirect).toHaveBeenCalledWith("/admin-next/people");
|
||||
expect(routeMocks.redirect).toHaveBeenCalledWith("/ase-next/people");
|
||||
expect(routeMocks.getHousekeepingCapabilityContext).toHaveBeenCalledTimes(
|
||||
1,
|
||||
);
|
||||
@@ -450,7 +448,7 @@ describe("/admin-next first visible domain", () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe("/admin-next/[domain] layout", () => {
|
||||
describe("/ase-next/[domain] layout", () => {
|
||||
beforeEach(() => {
|
||||
vi.clearAllMocks();
|
||||
});
|
||||
@@ -515,7 +513,7 @@ describe("/admin-next/[domain] layout", () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe("/admin-next/[domain] page", () => {
|
||||
describe("/ase-next/[domain] page", () => {
|
||||
beforeEach(() => {
|
||||
vi.clearAllMocks();
|
||||
});
|
||||
@@ -561,247 +559,247 @@ describe("preview route import boundary", () => {
|
||||
it.each([
|
||||
[
|
||||
"relative database import with resolver extension",
|
||||
"src/app/admin-next/page.tsx",
|
||||
"src/app/ase-next/page.tsx",
|
||||
'import db from "../../lib/db.js";',
|
||||
"src/lib/db",
|
||||
],
|
||||
[
|
||||
"aliased database import with resolver extension",
|
||||
"src/app/admin-next/page.tsx",
|
||||
"src/app/ase-next/page.tsx",
|
||||
'import db from "@/lib/db.js";',
|
||||
"src/lib/db",
|
||||
],
|
||||
[
|
||||
"action root import with resolver extension",
|
||||
"src/app/admin-next/page.tsx",
|
||||
"src/app/ase-next/page.tsx",
|
||||
'import actions from "../../actions.mjs";',
|
||||
"src/actions",
|
||||
],
|
||||
[
|
||||
"legacy mod root import with resolver extension",
|
||||
"src/app/admin-next/layout.tsx",
|
||||
"src/app/ase-next/layout.tsx",
|
||||
'import mod from "../mod.cjs";',
|
||||
"src/app/mod",
|
||||
],
|
||||
[
|
||||
"database import with query suffix",
|
||||
"src/app/admin-next/page.tsx",
|
||||
"src/app/ase-next/page.tsx",
|
||||
'import db from "../../lib/db?server-only";',
|
||||
"src/lib/db",
|
||||
],
|
||||
[
|
||||
"action import with hash suffix",
|
||||
"src/app/admin-next/page.tsx",
|
||||
"src/app/ase-next/page.tsx",
|
||||
'import("../../actions/users#server")',
|
||||
"src/actions/users",
|
||||
],
|
||||
[
|
||||
"Windows-style relative database import",
|
||||
"src/app/admin-next/page.tsx",
|
||||
"src/app/ase-next/page.tsx",
|
||||
String.raw`import db from "..\\..\\lib\\db";`,
|
||||
"src/lib/db",
|
||||
],
|
||||
[
|
||||
"Windows-style aliased database import",
|
||||
"src/app/admin-next/page.tsx",
|
||||
"src/app/ase-next/page.tsx",
|
||||
String.raw`import db from "@\\lib\\db";`,
|
||||
"src/lib/db",
|
||||
],
|
||||
[
|
||||
"percent-encoded database import",
|
||||
"src/app/admin-next/page.tsx",
|
||||
"src/app/ase-next/page.tsx",
|
||||
'import db from "../../lib/%64%62";',
|
||||
"src/lib/db",
|
||||
],
|
||||
[
|
||||
"optional CommonJS database require",
|
||||
"src/app/admin-next/page.tsx",
|
||||
"src/app/ase-next/page.tsx",
|
||||
'require?.("../../lib/db")',
|
||||
"src/lib/db",
|
||||
],
|
||||
[
|
||||
"module database require",
|
||||
"src/app/admin-next/page.tsx",
|
||||
"src/app/ase-next/page.tsx",
|
||||
'module.require("../../lib/db")',
|
||||
"src/lib/db",
|
||||
],
|
||||
[
|
||||
"require.resolve database access",
|
||||
"src/app/admin-next/page.tsx",
|
||||
"src/app/ase-next/page.tsx",
|
||||
'require.resolve("../../lib/db")',
|
||||
"src/lib/db",
|
||||
],
|
||||
[
|
||||
"optional module database require",
|
||||
"src/app/admin-next/page.tsx",
|
||||
"src/app/ase-next/page.tsx",
|
||||
'module.require?.("../../lib/db")',
|
||||
"src/lib/db",
|
||||
],
|
||||
[
|
||||
"optional require.resolve database access",
|
||||
"src/app/admin-next/page.tsx",
|
||||
"src/app/ase-next/page.tsx",
|
||||
'require.resolve?.("../../lib/db")',
|
||||
"src/lib/db",
|
||||
],
|
||||
[
|
||||
"TypeScript import-equals database access",
|
||||
"src/app/admin-next/page.tsx",
|
||||
"src/app/ase-next/page.tsx",
|
||||
'import db = require("../../lib/db");',
|
||||
"src/lib/db",
|
||||
],
|
||||
[
|
||||
"U+2028 line-continuation database import",
|
||||
"src/app/admin-next/page.tsx",
|
||||
"src/app/ase-next/page.tsx",
|
||||
'import db from "../\\' + "\u2028" + '../lib/db";',
|
||||
"src/lib/db",
|
||||
],
|
||||
[
|
||||
"U+2029 line-continuation database import",
|
||||
"src/app/admin-next/page.tsx",
|
||||
"src/app/ase-next/page.tsx",
|
||||
'import db from "../\\' + "\u2029" + '../lib/db";',
|
||||
"src/lib/db",
|
||||
],
|
||||
[
|
||||
"parenthesized dynamic action import",
|
||||
"src/app/admin-next/page.tsx",
|
||||
"src/app/ase-next/page.tsx",
|
||||
'import(("../../actions/users"))',
|
||||
"src/actions/users",
|
||||
],
|
||||
[
|
||||
"regex-brace template-expression action import",
|
||||
"src/app/admin-next/page.tsx",
|
||||
"src/app/ase-next/page.tsx",
|
||||
`const x = \`${interpolationOpen}/}/.test(value) ? import("../../actions/users") : null}\`;`,
|
||||
"src/actions/users",
|
||||
],
|
||||
[
|
||||
"CommonJS database require",
|
||||
"src/app/admin-next/page.tsx",
|
||||
"src/app/ase-next/page.tsx",
|
||||
'require("../../lib/db")',
|
||||
"src/lib/db",
|
||||
],
|
||||
[
|
||||
"template-literal dynamic action import",
|
||||
"src/app/admin-next/page.tsx",
|
||||
"src/app/ase-next/page.tsx",
|
||||
"import(`../../actions/users`)",
|
||||
"src/actions/users",
|
||||
],
|
||||
[
|
||||
"TypeScript-asserted dynamic action import",
|
||||
"src/app/admin-next/page.tsx",
|
||||
"src/app/ase-next/page.tsx",
|
||||
'import(("../../actions/users" as string))',
|
||||
"src/actions/users",
|
||||
],
|
||||
[
|
||||
"template-expression dynamic action import",
|
||||
"src/app/admin-next/page.tsx",
|
||||
"src/app/ase-next/page.tsx",
|
||||
`const x = \`${interpolationOpen}import("../../actions/users")}\`;`,
|
||||
"src/actions/users",
|
||||
],
|
||||
[
|
||||
"nested template-expression dynamic action import",
|
||||
"src/app/admin-next/[domain]/page.tsx",
|
||||
"src/app/ase-next/[domain]/page.tsx",
|
||||
`const x = \`${interpolationOpen}ready ? \`${interpolationOpen}import("../../../actions/nested")}\` : ""}\`;`,
|
||||
"src/actions/nested",
|
||||
],
|
||||
[
|
||||
"unicode escaped dynamic app-action import",
|
||||
"src/app/admin-next/page.tsx",
|
||||
"src/app/ase-next/page.tsx",
|
||||
'import("\\u002e\\u002e/actions/users")',
|
||||
"src/app/actions/users",
|
||||
],
|
||||
[
|
||||
"code-point escaped dynamic app-action import",
|
||||
"src/app/admin-next/page.tsx",
|
||||
"src/app/ase-next/page.tsx",
|
||||
'import("\\u{2e}\\u{2e}/actions/users")',
|
||||
"src/app/actions/users",
|
||||
],
|
||||
[
|
||||
"hex escaped export-from auth import",
|
||||
"src/app/admin-next/page.tsx",
|
||||
"src/app/ase-next/page.tsx",
|
||||
'export * from "\\x2e\\x2e/\\x2e\\x2e/lib/auth";',
|
||||
"src/lib/auth",
|
||||
],
|
||||
[
|
||||
"escaped-slash permissions import",
|
||||
"src/app/admin-next/page.tsx",
|
||||
"src/app/ase-next/page.tsx",
|
||||
'import permissions from "..\\/..\\/lib\\/permissions";',
|
||||
"src/lib/permissions",
|
||||
],
|
||||
[
|
||||
"unknown escape database import",
|
||||
"src/app/admin-next/page.tsx",
|
||||
"src/app/ase-next/page.tsx",
|
||||
'import db from "../../\\lib/db";',
|
||||
"src/lib/db",
|
||||
],
|
||||
[
|
||||
"line-continuation database import",
|
||||
"src/app/admin-next/page.tsx",
|
||||
"src/app/ase-next/page.tsx",
|
||||
'import db from "../\\' + "\n" + '../lib/db";',
|
||||
"src/lib/db",
|
||||
],
|
||||
[
|
||||
"aliased database descendant import",
|
||||
"src/app/admin-next/page.tsx",
|
||||
"src/app/ase-next/page.tsx",
|
||||
'import { query } from "@/lib/db/query";',
|
||||
"src/lib/db/query",
|
||||
],
|
||||
[
|
||||
"root relative database import",
|
||||
"src/app/admin-next/page.tsx",
|
||||
"src/app/ase-next/page.tsx",
|
||||
'import { db } from "../../lib/db";',
|
||||
"src/lib/db",
|
||||
],
|
||||
[
|
||||
"domain relative auth side-effect import",
|
||||
"src/app/admin-next/[domain]/layout.tsx",
|
||||
"src/app/ase-next/[domain]/layout.tsx",
|
||||
'import "../../../lib/auth";',
|
||||
"src/lib/auth",
|
||||
],
|
||||
[
|
||||
"domain relative permissions export",
|
||||
"src/app/admin-next/[domain]/page.tsx",
|
||||
"src/app/ase-next/[domain]/page.tsx",
|
||||
'export { getAdminContext } from "../../../lib/permissions";',
|
||||
"src/lib/permissions",
|
||||
],
|
||||
[
|
||||
"root relative action dynamic import",
|
||||
"src/app/admin-next/page.tsx",
|
||||
"src/app/ase-next/page.tsx",
|
||||
'import("../../actions/users")',
|
||||
"src/actions/users",
|
||||
],
|
||||
[
|
||||
"root relative app action export",
|
||||
"src/app/admin-next/page.tsx",
|
||||
"src/app/ase-next/page.tsx",
|
||||
'export * from "../actions";',
|
||||
"src/app/actions",
|
||||
],
|
||||
[
|
||||
"domain relative legacy admin import",
|
||||
"src/app/admin-next/[domain]/layout.tsx",
|
||||
"src/app/ase-next/[domain]/layout.tsx",
|
||||
'import page from "../../admin/users/page";',
|
||||
"src/app/admin/users/page",
|
||||
],
|
||||
[
|
||||
"root relative legacy mod dynamic import",
|
||||
"src/app/admin-next/layout.tsx",
|
||||
"src/app/ase-next/layout.tsx",
|
||||
'import("../mod/users/page")',
|
||||
"src/app/mod/users/page",
|
||||
],
|
||||
[
|
||||
"Prisma TypeScript import type",
|
||||
"src/app/admin-next/page.tsx",
|
||||
"src/app/ase-next/page.tsx",
|
||||
'type PrismaClient = import("@prisma/client").PrismaClient;',
|
||||
"@prisma/client",
|
||||
],
|
||||
[
|
||||
"Drizzle package import",
|
||||
"src/app/admin-next/page.tsx",
|
||||
"src/app/ase-next/page.tsx",
|
||||
'import { sql } from "drizzle-orm";',
|
||||
"drizzle-orm",
|
||||
],
|
||||
[
|
||||
"mysql2 package import",
|
||||
"src/app/admin-next/page.tsx",
|
||||
"src/app/ase-next/page.tsx",
|
||||
'import type { Pool } from "mysql2";',
|
||||
"mysql2",
|
||||
],
|
||||
@@ -834,7 +832,7 @@ describe("preview route import boundary", () => {
|
||||
],
|
||||
] as const)("fails closed for non-literal %s", (_name, source, violation) => {
|
||||
expect(
|
||||
findRouteImportBoundaryViolations(source, "src/app/admin-next/page.tsx"),
|
||||
findRouteImportBoundaryViolations(source, "src/app/ase-next/page.tsx"),
|
||||
).toContain(violation);
|
||||
});
|
||||
|
||||
@@ -843,7 +841,7 @@ describe("preview route import boundary", () => {
|
||||
'import database from "@/lib/database.js?raw";',
|
||||
'import dbTools from "../../lib/db-tools.ts";',
|
||||
'import auth from "../../lib/authentication";',
|
||||
'import preview from "../admin-next-shared";',
|
||||
'import preview from "../ase-next-shared";',
|
||||
'import prismaTools from "@prisma/client-tools";',
|
||||
'import drizzleTools from "drizzle-orm-kit";',
|
||||
'import mysqlTools from "mysql2-wrapper";',
|
||||
@@ -853,7 +851,7 @@ describe("preview route import boundary", () => {
|
||||
].join("\n");
|
||||
|
||||
expect(
|
||||
findRouteImportBoundaryViolations(source, "src/app/admin-next/page.tsx"),
|
||||
findRouteImportBoundaryViolations(source, "src/app/ase-next/page.tsx"),
|
||||
).toEqual([]);
|
||||
});
|
||||
});
|
||||
@@ -25,7 +25,7 @@ const manifest = (
|
||||
labelKey: `pages.housekeeping.domains.${id}.title`,
|
||||
descriptionKey: `pages.housekeeping.domains.${id}.description`,
|
||||
iconId: "settings",
|
||||
previewHref: `/admin-next/${id}`,
|
||||
canonicalHref: id === "operations" ? "/ase" : `/ase/${id}`,
|
||||
capability: anyCapability(capabilitySlug),
|
||||
routes: [],
|
||||
searchProviders: [],
|
||||
@@ -73,7 +73,7 @@ const expectedManifests = [
|
||||
{
|
||||
id: "operations",
|
||||
iconId: "inbox",
|
||||
previewHref: "/admin-next/operations",
|
||||
canonicalHref: "/ase",
|
||||
labelKey: "pages.housekeeping.domains.operations.title",
|
||||
descriptionKey: "pages.housekeeping.domains.operations.description",
|
||||
slugs: [PERMS.ADMIN_DASHBOARD],
|
||||
@@ -81,7 +81,7 @@ const expectedManifests = [
|
||||
{
|
||||
id: "people",
|
||||
iconId: "users",
|
||||
previewHref: "/admin-next/people",
|
||||
canonicalHref: "/ase/people",
|
||||
labelKey: "pages.housekeeping.domains.people.title",
|
||||
descriptionKey: "pages.housekeeping.domains.people.description",
|
||||
slugs: [
|
||||
@@ -112,7 +112,7 @@ const expectedManifests = [
|
||||
{
|
||||
id: "content",
|
||||
iconId: "file-text",
|
||||
previewHref: "/admin-next/content",
|
||||
canonicalHref: "/ase/content",
|
||||
labelKey: "pages.housekeeping.domains.content.title",
|
||||
descriptionKey: "pages.housekeeping.domains.content.description",
|
||||
slugs: [
|
||||
@@ -135,7 +135,7 @@ const expectedManifests = [
|
||||
{
|
||||
id: "economy",
|
||||
iconId: "gem",
|
||||
previewHref: "/admin-next/economy",
|
||||
canonicalHref: "/ase/economy",
|
||||
labelKey: "pages.housekeeping.domains.economy.title",
|
||||
descriptionKey: "pages.housekeeping.domains.economy.description",
|
||||
slugs: [
|
||||
@@ -148,7 +148,7 @@ const expectedManifests = [
|
||||
{
|
||||
id: "hotel",
|
||||
iconId: "hotel",
|
||||
previewHref: "/admin-next/hotel",
|
||||
canonicalHref: "/ase/hotel",
|
||||
labelKey: "pages.housekeeping.domains.hotel.title",
|
||||
descriptionKey: "pages.housekeeping.domains.hotel.description",
|
||||
slugs: [
|
||||
@@ -165,7 +165,7 @@ const expectedManifests = [
|
||||
{
|
||||
id: "system",
|
||||
iconId: "settings",
|
||||
previewHref: "/admin-next/system",
|
||||
canonicalHref: "/ase/system",
|
||||
labelKey: "pages.housekeeping.domains.system.title",
|
||||
descriptionKey: "pages.housekeeping.domains.system.description",
|
||||
slugs: [
|
||||
@@ -208,9 +208,9 @@ describe("housekeeping registry", () => {
|
||||
it("rejects invalid preview and empty translation keys", () => {
|
||||
expect(() =>
|
||||
createHousekeepingRegistry([
|
||||
{ ...manifest("people"), previewHref: "/admin-next/operations" },
|
||||
{ ...manifest("people"), canonicalHref: "/ase" },
|
||||
]),
|
||||
).toThrow("invalid preview href");
|
||||
).toThrow("invalid canonical href");
|
||||
expect(() =>
|
||||
createHousekeepingRegistry([{ ...manifest("people"), labelKey: " " }]),
|
||||
).toThrow("empty label key");
|
||||
@@ -232,13 +232,13 @@ describe("housekeeping registry", () => {
|
||||
{
|
||||
id: "users",
|
||||
labelKey: "pages.housekeeping.domains.people.title",
|
||||
href: "/admin-next/people/users",
|
||||
href: "/ase/people/users",
|
||||
capability: anyCapability(PERMS.USERS_VIEW),
|
||||
},
|
||||
{
|
||||
id: "users",
|
||||
labelKey: "pages.housekeeping.domains.people.title",
|
||||
href: "/admin-next/people/staff",
|
||||
href: "/ase/people/staff",
|
||||
capability: anyCapability(PERMS.USERS_VIEW),
|
||||
},
|
||||
],
|
||||
@@ -253,13 +253,13 @@ describe("housekeeping registry", () => {
|
||||
{
|
||||
id: "users",
|
||||
labelKey: "pages.housekeeping.domains.people.title",
|
||||
href: "/admin-next/people/users",
|
||||
href: "/ase/people/users",
|
||||
capability: anyCapability(PERMS.USERS_VIEW),
|
||||
},
|
||||
{
|
||||
id: "staff",
|
||||
labelKey: "pages.housekeeping.domains.people.title",
|
||||
href: "/admin-next/people/users",
|
||||
href: "/ase/people/users",
|
||||
capability: anyCapability(PERMS.USERS_VIEW),
|
||||
},
|
||||
],
|
||||
@@ -272,7 +272,7 @@ describe("housekeeping registry", () => {
|
||||
const route = {
|
||||
id: "users",
|
||||
labelKey: "pages.housekeeping.domains.people.title",
|
||||
href: "/admin-next/people/users",
|
||||
href: "/ase/people/users",
|
||||
capability: anyCapability(PERMS.USERS_VIEW),
|
||||
};
|
||||
|
||||
@@ -319,7 +319,7 @@ describe("housekeeping registry", () => {
|
||||
expect(actual).toMatchObject({
|
||||
id: expected.id,
|
||||
iconId: expected.iconId,
|
||||
previewHref: expected.previewHref,
|
||||
canonicalHref: expected.canonicalHref,
|
||||
labelKey: expected.labelKey,
|
||||
descriptionKey: expected.descriptionKey,
|
||||
});
|
||||
@@ -481,7 +481,7 @@ describe("housekeeping registry", () => {
|
||||
{
|
||||
id: "users",
|
||||
labelKey: "pages.housekeeping.domains.people.title",
|
||||
href: "/admin-next/people/users",
|
||||
href: "/ase/people/users",
|
||||
capability: { mode: "any", slugs: [] },
|
||||
},
|
||||
],
|
||||
@@ -494,7 +494,7 @@ describe("housekeeping registry", () => {
|
||||
const route = {
|
||||
id: "shared",
|
||||
labelKey: "pages.housekeeping.domains.people.title",
|
||||
href: "/admin-next/shared",
|
||||
href: "/ase/shared",
|
||||
capability: anyCapability(PERMS.USERS_VIEW),
|
||||
};
|
||||
|
||||
@@ -503,7 +503,7 @@ describe("housekeeping registry", () => {
|
||||
{ ...manifest("people"), routes: [route] },
|
||||
{
|
||||
...manifest("content"),
|
||||
routes: [{ ...route, href: "/admin-next/content/shared" }],
|
||||
routes: [{ ...route, href: "/ase/content/shared" }],
|
||||
},
|
||||
]),
|
||||
).toThrow("duplicate route id");
|
||||
@@ -518,3 +518,22 @@ describe("housekeeping registry", () => {
|
||||
).toThrow("duplicate route href");
|
||||
});
|
||||
});
|
||||
|
||||
it("accepts the canonical operations root and rejects legacy admin hrefs", () => {
|
||||
const canonicalOperations = manifest("operations") as Record<string, unknown>;
|
||||
delete canonicalOperations.canonicalHref;
|
||||
canonicalOperations.canonicalHref = "/ase";
|
||||
|
||||
expect(() =>
|
||||
createHousekeepingRegistry([
|
||||
canonicalOperations as unknown as HousekeepingDomainManifest,
|
||||
]),
|
||||
).not.toThrow();
|
||||
|
||||
canonicalOperations.canonicalHref = "/admin";
|
||||
expect(() =>
|
||||
createHousekeepingRegistry([
|
||||
canonicalOperations as unknown as HousekeepingDomainManifest,
|
||||
]),
|
||||
).toThrow("invalid canonical href");
|
||||
});
|
||||
@@ -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}`);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import type { CanonicalHousekeepingHref } from "../contracts";
|
||||
import { toHousekeepingHref } from "./href";
|
||||
|
||||
describe("toHousekeepingHref", () => {
|
||||
it("keeps the canonical operations root unchanged", () => {
|
||||
expect(toHousekeepingHref("/ase", "canonical")).toBe("/ase");
|
||||
});
|
||||
|
||||
it("maps a canonical domain route to the preview namespace", () => {
|
||||
expect(toHousekeepingHref("/ase/people/users", "preview")).toBe(
|
||||
"/ase-next/people/users",
|
||||
);
|
||||
});
|
||||
|
||||
it("rejects paths outside the canonical ase namespace", () => {
|
||||
expect(() =>
|
||||
toHousekeepingHref("/admin" as CanonicalHousekeepingHref, "canonical"),
|
||||
).toThrow("invalid canonical housekeeping href");
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,15 @@
|
||||
import type {
|
||||
CanonicalHousekeepingHref,
|
||||
HousekeepingSurface,
|
||||
} from "../contracts";
|
||||
|
||||
export function toHousekeepingHref(
|
||||
href: CanonicalHousekeepingHref,
|
||||
surface: HousekeepingSurface,
|
||||
): CanonicalHousekeepingHref | `/ase-next${string}` {
|
||||
if (href !== "/ase" && !href.startsWith("/ase/")) {
|
||||
throw new Error(`invalid canonical housekeeping href: ${href}`);
|
||||
}
|
||||
|
||||
return surface === "canonical" ? href : href.replace(/^\/ase/, "/ase-next");
|
||||
}
|
||||
@@ -17,17 +17,17 @@ const labels = {
|
||||
const domains: readonly HousekeepingNavigationDomain[] = [
|
||||
{
|
||||
id: "operations",
|
||||
href: "/admin-next/operations",
|
||||
href: "/ase-next/operations",
|
||||
iconId: "inbox",
|
||||
label: "Operations",
|
||||
description: "Manage operations",
|
||||
items: [
|
||||
{ id: "queue", href: "/admin-next/operations/queue", label: "Queue" },
|
||||
{ id: "queue", href: "/ase-next/operations/queue", label: "Queue" },
|
||||
],
|
||||
},
|
||||
{
|
||||
id: "people",
|
||||
href: "/admin-next/people",
|
||||
href: "/ase-next/people",
|
||||
iconId: "users",
|
||||
label: "People",
|
||||
description: "Manage people",
|
||||
@@ -35,7 +35,7 @@ const domains: readonly HousekeepingNavigationDomain[] = [
|
||||
},
|
||||
{
|
||||
id: "content",
|
||||
href: "/admin-next/content",
|
||||
href: "/ase-next/content",
|
||||
iconId: "file-text",
|
||||
label: "Content",
|
||||
description: "Manage content",
|
||||
@@ -43,7 +43,7 @@ const domains: readonly HousekeepingNavigationDomain[] = [
|
||||
},
|
||||
{
|
||||
id: "economy",
|
||||
href: "/admin-next/economy",
|
||||
href: "/ase-next/economy",
|
||||
iconId: "gem",
|
||||
label: "Economy",
|
||||
description: "Manage economy",
|
||||
@@ -51,7 +51,7 @@ const domains: readonly HousekeepingNavigationDomain[] = [
|
||||
},
|
||||
{
|
||||
id: "hotel",
|
||||
href: "/admin-next/hotel",
|
||||
href: "/ase-next/hotel",
|
||||
iconId: "hotel",
|
||||
label: "Hotel",
|
||||
description: "Manage hotel",
|
||||
@@ -59,7 +59,7 @@ const domains: readonly HousekeepingNavigationDomain[] = [
|
||||
},
|
||||
{
|
||||
id: "system",
|
||||
href: "/admin-next/system",
|
||||
href: "/ase-next/system",
|
||||
iconId: "settings",
|
||||
label: "System",
|
||||
description: "Manage system",
|
||||
@@ -178,7 +178,7 @@ describe("HousekeepingShell", () => {
|
||||
expect(html).toContain('<nav aria-label="Operations navigation"');
|
||||
expect(html).toContain('<main id="housekeeping-content"');
|
||||
expect(html).toContain(">Deck body</p>");
|
||||
expect(html).toContain('href="/admin-next/operations/queue"');
|
||||
expect(html).toContain('href="/ase-next/operations/queue"');
|
||||
expect(html).toContain(">Queue<");
|
||||
expect(html).toContain(">Nora<");
|
||||
expect(html).toContain(">6<");
|
||||
@@ -196,7 +196,7 @@ describe("HousekeepingShell", () => {
|
||||
const activeAnchors = allAnchors.filter((anchor) =>
|
||||
anchor.includes('aria-current="page"'),
|
||||
);
|
||||
const peopleAnchor = anchorForHref(html, "/admin-next/people");
|
||||
const peopleAnchor = anchorForHref(html, "/ase-next/people");
|
||||
for (const iconClass of [
|
||||
"lucide-inbox",
|
||||
"lucide-users",
|
||||
@@ -222,7 +222,7 @@ describe("HousekeepingShell", () => {
|
||||
);
|
||||
expect(() => renderShell("system", domainsWithoutSystem)).not.toThrow();
|
||||
const html = renderShell("system", domainsWithoutSystem);
|
||||
expect(html).not.toContain('href="/admin-next/operations/queue"');
|
||||
expect(html).not.toContain('href="/ase-next/operations/queue"');
|
||||
expect(html).not.toContain(">Queue<");
|
||||
});
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ export const contentMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/articles",
|
||||
sourceFile: "src/app/admin/articles/page.tsx",
|
||||
targetPath: "/admin/content/editorial/articles",
|
||||
targetPath: "/ase/content/editorial/articles",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.NEWS_VIEW],
|
||||
@@ -44,7 +44,7 @@ export const contentMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/articles/new",
|
||||
sourceFile: "src/app/admin/articles/new/page.tsx",
|
||||
targetPath: "/admin/content/editorial/articles/new",
|
||||
targetPath: "/ase/content/editorial/articles/new",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.NEWS_EDIT],
|
||||
@@ -62,7 +62,7 @@ export const contentMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/articles/:id",
|
||||
sourceFile: "src/app/admin/articles/[id]/page.tsx",
|
||||
targetPath: "/admin/content/editorial/articles/:id",
|
||||
targetPath: "/ase/content/editorial/articles/:id",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.NEWS_VIEW],
|
||||
@@ -80,7 +80,7 @@ export const contentMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/photos",
|
||||
sourceFile: "src/app/admin/photos/page.tsx",
|
||||
targetPath: "/admin/content/media/photos",
|
||||
targetPath: "/ase/content/media/photos",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.PAGES_VIEW],
|
||||
@@ -98,7 +98,7 @@ export const contentMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/media",
|
||||
sourceFile: "src/app/admin/media/page.tsx",
|
||||
targetPath: "/admin/content/media/library",
|
||||
targetPath: "/ase/content/media/library",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.PAGES_VIEW],
|
||||
@@ -116,7 +116,7 @@ export const contentMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/banners",
|
||||
sourceFile: "src/app/admin/banners/page.tsx",
|
||||
targetPath: "/admin/content/media/banners",
|
||||
targetPath: "/ase/content/media/banners",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.BANNERS_VIEW],
|
||||
@@ -134,7 +134,7 @@ export const contentMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/ads",
|
||||
sourceFile: "src/app/admin/ads/page.tsx",
|
||||
targetPath: "/admin/content/media/ads",
|
||||
targetPath: "/ase/content/media/ads",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.PAGES_VIEW],
|
||||
@@ -152,7 +152,7 @@ export const contentMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/ads/new",
|
||||
sourceFile: "src/app/admin/ads/new/page.tsx",
|
||||
targetPath: "/admin/content/media/ads/new",
|
||||
targetPath: "/ase/content/media/ads/new",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.PAGES_EDIT],
|
||||
@@ -167,7 +167,7 @@ export const contentMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/ads/:id",
|
||||
sourceFile: "src/app/admin/ads/[id]/page.tsx",
|
||||
targetPath: "/admin/content/media/ads/:id",
|
||||
targetPath: "/ase/content/media/ads/:id",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.PAGES_VIEW],
|
||||
@@ -187,7 +187,7 @@ export const contentMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/events",
|
||||
sourceFile: "src/app/admin/events/page.tsx",
|
||||
targetPath: "/admin/content/engagement/events",
|
||||
targetPath: "/ase/content/engagement/events",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.EVENTS_VIEW],
|
||||
@@ -205,7 +205,7 @@ export const contentMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/events/create",
|
||||
sourceFile: "src/app/admin/events/create/page.tsx",
|
||||
targetPath: "/admin/content/engagement/events/create",
|
||||
targetPath: "/ase/content/engagement/events/create",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.EVENTS_EDIT],
|
||||
@@ -223,7 +223,7 @@ export const contentMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/events/types",
|
||||
sourceFile: "src/app/admin/events/types/page.tsx",
|
||||
targetPath: "/admin/content/engagement/events/types",
|
||||
targetPath: "/ase/content/engagement/events/types",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.EVENTS_EDIT],
|
||||
@@ -241,7 +241,7 @@ export const contentMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/events/:id",
|
||||
sourceFile: "src/app/admin/events/[id]/page.tsx",
|
||||
targetPath: "/admin/content/engagement/events/:id",
|
||||
targetPath: "/ase/content/engagement/events/:id",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.EVENTS_EDIT],
|
||||
@@ -264,7 +264,7 @@ export const contentMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/polls",
|
||||
sourceFile: "src/app/admin/polls/page.tsx",
|
||||
targetPath: "/admin/content/engagement/polls",
|
||||
targetPath: "/ase/content/engagement/polls",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.POLLS_VIEW],
|
||||
@@ -282,7 +282,7 @@ export const contentMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/polls/create",
|
||||
sourceFile: "src/app/admin/polls/create/page.tsx",
|
||||
targetPath: "/admin/content/engagement/polls/create",
|
||||
targetPath: "/ase/content/engagement/polls/create",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.POLLS_EDIT],
|
||||
@@ -297,7 +297,7 @@ export const contentMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/polls/:id",
|
||||
sourceFile: "src/app/admin/polls/[id]/page.tsx",
|
||||
targetPath: "/admin/content/engagement/polls/:id",
|
||||
targetPath: "/ase/content/engagement/polls/:id",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.POLLS_EDIT],
|
||||
@@ -320,7 +320,7 @@ export const contentMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/help-questions",
|
||||
sourceFile: "src/app/admin/help-questions/page.tsx",
|
||||
targetPath: "/admin/content/help/questions",
|
||||
targetPath: "/ase/content/help/questions",
|
||||
decision: "REBUILD",
|
||||
capabilities: { read: [PERMS.PAGES_VIEW], mutate: [] },
|
||||
dependencies: {
|
||||
@@ -335,7 +335,7 @@ export const contentMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/help-questions/new",
|
||||
sourceFile: "src/app/admin/help-questions/new/page.tsx",
|
||||
targetPath: "/admin/content/help/questions/new",
|
||||
targetPath: "/ase/content/help/questions/new",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.PAGES_EDIT],
|
||||
@@ -350,7 +350,7 @@ export const contentMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/help-questions/:id",
|
||||
sourceFile: "src/app/admin/help-questions/[id]/page.tsx",
|
||||
targetPath: "/admin/content/help/questions/:id",
|
||||
targetPath: "/ase/content/help/questions/:id",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.PAGES_VIEW],
|
||||
@@ -368,7 +368,7 @@ export const contentMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/tags",
|
||||
sourceFile: "src/app/admin/tags/page.tsx",
|
||||
targetPath: "/admin/content/editorial/tags",
|
||||
targetPath: "/ase/content/editorial/tags",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.PAGES_VIEW],
|
||||
@@ -386,7 +386,7 @@ export const contentMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/prefixes",
|
||||
sourceFile: "src/app/admin/prefixes/page.tsx",
|
||||
targetPath: "/admin/content/engagement/prefixes",
|
||||
targetPath: "/ase/content/engagement/prefixes",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.PREFIXES_VIEW],
|
||||
@@ -415,7 +415,7 @@ export const contentMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/writeable-boxes",
|
||||
sourceFile: "src/app/admin/writeable-boxes/page.tsx",
|
||||
targetPath: "/admin/content/editorial/writeable-boxes",
|
||||
targetPath: "/ase/content/editorial/writeable-boxes",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.PAGES_VIEW],
|
||||
@@ -433,7 +433,7 @@ export const contentMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/email-templates",
|
||||
sourceFile: "src/app/admin/email-templates/page.tsx",
|
||||
targetPath: "/admin/content/help/email-templates",
|
||||
targetPath: "/ase/content/help/email-templates",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.PAGES_VIEW],
|
||||
@@ -457,7 +457,7 @@ export const contentMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/theme",
|
||||
sourceFile: "src/app/admin/theme/page.tsx",
|
||||
targetPath: "/admin/content/brand/theme",
|
||||
targetPath: "/ase/content/brand/theme",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.SETTINGS_VIEW],
|
||||
@@ -482,7 +482,7 @@ export const contentMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/favicon",
|
||||
sourceFile: "src/app/admin/favicon/page.tsx",
|
||||
targetPath: "/admin/content/brand/favicon",
|
||||
targetPath: "/ase/content/brand/favicon",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.SETTINGS_VIEW],
|
||||
@@ -503,7 +503,7 @@ export const contentMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/translations",
|
||||
sourceFile: "src/app/admin/translations/page.tsx",
|
||||
targetPath: "/admin/content/localization",
|
||||
targetPath: "/ase/content/localization",
|
||||
decision: "MERGE",
|
||||
capabilities: { read: [PERMS.SETTINGS_VIEW], mutate: [] },
|
||||
dependencies: { queries: [], mutations: [] },
|
||||
@@ -517,7 +517,7 @@ export const contentMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/translations/client",
|
||||
sourceFile: "src/app/admin/translations/client/page.tsx",
|
||||
targetPath: "/admin/content/localization/client",
|
||||
targetPath: "/ase/content/localization/client",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.SETTINGS_VIEW],
|
||||
@@ -536,7 +536,7 @@ export const contentMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/translations/cms",
|
||||
sourceFile: "src/app/admin/translations/cms/page.tsx",
|
||||
targetPath: "/admin/content/localization/cms",
|
||||
targetPath: "/ase/content/localization/cms",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.SETTINGS_VIEW],
|
||||
@@ -555,7 +555,7 @@ export const contentMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/translations/emulator",
|
||||
sourceFile: "src/app/admin/translations/emulator/page.tsx",
|
||||
targetPath: "/admin/content/localization/emulator",
|
||||
targetPath: "/ase/content/localization/emulator",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.SETTINGS_VIEW],
|
||||
|
||||
@@ -26,7 +26,7 @@ export const economyMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/catalog",
|
||||
sourceFile: "src/app/admin/catalog/page.tsx",
|
||||
targetPath: "/admin/economy/catalog",
|
||||
targetPath: "/ase/economy/catalog",
|
||||
decision: "MERGE",
|
||||
capabilities: {
|
||||
read: [PERMS.CATALOG_VIEW],
|
||||
@@ -71,7 +71,7 @@ export const economyMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/catalog/:id",
|
||||
sourceFile: "src/app/admin/catalog/[id]/page.tsx",
|
||||
targetPath: "/admin/economy/catalog/:id",
|
||||
targetPath: "/ase/economy/catalog/:id",
|
||||
decision: "MERGE",
|
||||
capabilities: {
|
||||
read: [PERMS.CATALOG_VIEW],
|
||||
@@ -108,7 +108,7 @@ export const economyMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/catalog/builder-club",
|
||||
sourceFile: "src/app/admin/catalog/builder-club/page.tsx",
|
||||
targetPath: "/admin/economy/catalog",
|
||||
targetPath: "/ase/economy/catalog",
|
||||
decision: "MERGE",
|
||||
capabilities: { read: [PERMS.CATALOG_VIEW], mutate: [] },
|
||||
dependencies: { queries: [], mutations: [] },
|
||||
@@ -122,7 +122,7 @@ export const economyMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/catalog/builder-club/:id",
|
||||
sourceFile: "src/app/admin/catalog/builder-club/[id]/page.tsx",
|
||||
targetPath: "/admin/economy/catalog/builder-club/:id",
|
||||
targetPath: "/ase/economy/catalog/builder-club/:id",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.CATALOG_VIEW],
|
||||
@@ -145,7 +145,7 @@ export const economyMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/catalog/maintenance",
|
||||
sourceFile: "src/app/admin/catalog/maintenance/page.tsx",
|
||||
targetPath: "/admin/economy/catalog/maintenance",
|
||||
targetPath: "/ase/economy/catalog/maintenance",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.CATALOG_VIEW],
|
||||
@@ -170,7 +170,7 @@ export const economyMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/items",
|
||||
sourceFile: "src/app/admin/items/page.tsx",
|
||||
targetPath: "/admin/economy/items",
|
||||
targetPath: "/ase/economy/items",
|
||||
decision: "REBUILD",
|
||||
capabilities: { read: [PERMS.CATALOG_VIEW], mutate: [] },
|
||||
dependencies: { queries: ["fetchAdminList", "ItemsBase"], mutations: [] },
|
||||
@@ -182,7 +182,7 @@ export const economyMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/items/:id",
|
||||
sourceFile: "src/app/admin/items/[id]/page.tsx",
|
||||
targetPath: "/admin/economy/items/:id",
|
||||
targetPath: "/ase/economy/items/:id",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.CATALOG_VIEW],
|
||||
@@ -202,7 +202,7 @@ export const economyMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/shop",
|
||||
sourceFile: "src/app/admin/shop/page.tsx",
|
||||
targetPath: "/admin/economy/commerce/shop",
|
||||
targetPath: "/ase/economy/commerce/shop",
|
||||
decision: "REBUILD",
|
||||
capabilities: { read: [PERMS.SHOP_VIEW], mutate: [] },
|
||||
dependencies: {
|
||||
@@ -217,7 +217,7 @@ export const economyMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/shop/new",
|
||||
sourceFile: "src/app/admin/shop/new/page.tsx",
|
||||
targetPath: "/admin/economy/commerce/shop/new",
|
||||
targetPath: "/ase/economy/commerce/shop/new",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.SHOP_EDIT],
|
||||
@@ -232,7 +232,7 @@ export const economyMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/shop/:id",
|
||||
sourceFile: "src/app/admin/shop/[id]/page.tsx",
|
||||
targetPath: "/admin/economy/commerce/shop/:id",
|
||||
targetPath: "/ase/economy/commerce/shop/:id",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.SHOP_VIEW],
|
||||
@@ -250,7 +250,7 @@ export const economyMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/marketplace",
|
||||
sourceFile: "src/app/admin/marketplace/page.tsx",
|
||||
targetPath: "/admin/economy/commerce/marketplace",
|
||||
targetPath: "/ase/economy/commerce/marketplace",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.SHOP_VIEW],
|
||||
@@ -268,7 +268,7 @@ export const economyMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/vouchers",
|
||||
sourceFile: "src/app/admin/vouchers/page.tsx",
|
||||
targetPath: "/admin/economy/commerce/vouchers",
|
||||
targetPath: "/ase/economy/commerce/vouchers",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.SHOP_VIEW],
|
||||
@@ -286,7 +286,7 @@ export const economyMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/subscriptions",
|
||||
sourceFile: "src/app/admin/subscriptions/page.tsx",
|
||||
targetPath: "/admin/economy/commerce/subscriptions",
|
||||
targetPath: "/ase/economy/commerce/subscriptions",
|
||||
decision: "REBUILD",
|
||||
capabilities: { read: [PERMS.SHOP_VIEW], mutate: [] },
|
||||
dependencies: { queries: ["users_subscriptions"], mutations: [] },
|
||||
@@ -301,7 +301,7 @@ export const economyMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/transactions",
|
||||
sourceFile: "src/app/admin/transactions/page.tsx",
|
||||
targetPath: "/admin/economy/history/transactions",
|
||||
targetPath: "/ase/economy/history/transactions",
|
||||
decision: "REBUILD",
|
||||
capabilities: { read: [PERMS.SHOP_VIEW], mutate: [] },
|
||||
dependencies: {
|
||||
@@ -316,7 +316,7 @@ export const economyMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/rare-values",
|
||||
sourceFile: "src/app/admin/rare-values/page.tsx",
|
||||
targetPath: "/admin/economy/value/rare-values",
|
||||
targetPath: "/ase/economy/value/rare-values",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.SHOP_VIEW],
|
||||
@@ -341,7 +341,7 @@ export const economyMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/badges",
|
||||
sourceFile: "src/app/admin/badges/page.tsx",
|
||||
targetPath: "/admin/economy/rewards/badges",
|
||||
targetPath: "/ase/economy/rewards/badges",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.CATALOG_VIEW],
|
||||
@@ -359,7 +359,7 @@ export const economyMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/achievements",
|
||||
sourceFile: "src/app/admin/achievements/page.tsx",
|
||||
targetPath: "/admin/economy/rewards/achievements",
|
||||
targetPath: "/ase/economy/rewards/achievements",
|
||||
decision: "REBUILD",
|
||||
capabilities: { read: [PERMS.CATALOG_VIEW], mutate: [] },
|
||||
dependencies: { queries: ["Achievements"], mutations: [] },
|
||||
@@ -371,7 +371,7 @@ export const economyMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/sounds",
|
||||
sourceFile: "src/app/admin/sounds/page.tsx",
|
||||
targetPath: "/admin/economy/rewards/sounds",
|
||||
targetPath: "/ase/economy/rewards/sounds",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.CATALOG_VIEW],
|
||||
@@ -393,7 +393,7 @@ export const economyMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/calendar",
|
||||
sourceFile: "src/app/admin/calendar/page.tsx",
|
||||
targetPath: "/admin/economy/rewards/calendar",
|
||||
targetPath: "/ase/economy/rewards/calendar",
|
||||
decision: "REBUILD",
|
||||
capabilities: { read: [PERMS.SHOP_VIEW], mutate: [] },
|
||||
dependencies: {
|
||||
@@ -408,7 +408,7 @@ export const economyMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/calendar/:id",
|
||||
sourceFile: "src/app/admin/calendar/[id]/page.tsx",
|
||||
targetPath: "/admin/economy/rewards/calendar/:id",
|
||||
targetPath: "/ase/economy/rewards/calendar/:id",
|
||||
decision: "REBUILD",
|
||||
capabilities: { read: [PERMS.SHOP_VIEW], mutate: [] },
|
||||
dependencies: {
|
||||
|
||||
@@ -26,7 +26,7 @@ export const hotelMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/rooms",
|
||||
sourceFile: "src/app/admin/rooms/page.tsx",
|
||||
targetPath: "/admin/hotel/rooms",
|
||||
targetPath: "/ase/hotel/rooms",
|
||||
decision: "REBUILD",
|
||||
capabilities: { read: [PERMS.ROOMS_VIEW], mutate: [] },
|
||||
dependencies: {
|
||||
@@ -41,7 +41,7 @@ export const hotelMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/rooms/:id",
|
||||
sourceFile: "src/app/admin/rooms/[id]/page.tsx",
|
||||
targetPath: "/admin/hotel/rooms/:id",
|
||||
targetPath: "/ase/hotel/rooms/:id",
|
||||
decision: "MERGE",
|
||||
capabilities: { read: [PERMS.ROOMS_VIEW], mutate: [] },
|
||||
dependencies: { queries: [], mutations: [] },
|
||||
@@ -55,7 +55,7 @@ export const hotelMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/rooms/:id/furni",
|
||||
sourceFile: "src/app/admin/rooms/[id]/furni/page.tsx",
|
||||
targetPath: "/admin/hotel/rooms/:id/furni",
|
||||
targetPath: "/ase/hotel/rooms/:id/furni",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.ROOMS_VIEW],
|
||||
@@ -81,7 +81,7 @@ export const hotelMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/rooms/edit/:id",
|
||||
sourceFile: "src/app/admin/rooms/edit/[id]/page.tsx",
|
||||
targetPath: "/admin/hotel/rooms/:id",
|
||||
targetPath: "/ase/hotel/rooms/:id",
|
||||
decision: "MERGE",
|
||||
capabilities: {
|
||||
read: [PERMS.ROOMS_EDIT],
|
||||
@@ -107,7 +107,7 @@ export const hotelMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/rooms/show/:id",
|
||||
sourceFile: "src/app/admin/rooms/show/[id]/page.tsx",
|
||||
targetPath: "/admin/hotel/rooms/:id",
|
||||
targetPath: "/ase/hotel/rooms/:id",
|
||||
decision: "MERGE",
|
||||
capabilities: { read: [PERMS.ROOMS_VIEW], mutate: [] },
|
||||
dependencies: { queries: ["Rooms", "User", "loadRoom"], mutations: [] },
|
||||
@@ -122,7 +122,7 @@ export const hotelMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/navigation",
|
||||
sourceFile: "src/app/admin/navigation/page.tsx",
|
||||
targetPath: "/admin/hotel/navigation",
|
||||
targetPath: "/ase/hotel/navigation",
|
||||
decision: "REBUILD",
|
||||
capabilities: { read: [PERMS.PAGES_VIEW], mutate: [] },
|
||||
dependencies: {
|
||||
@@ -144,7 +144,7 @@ export const hotelMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/radio",
|
||||
sourceFile: "src/app/admin/radio/page.tsx",
|
||||
targetPath: "/admin/hotel/radio/overview",
|
||||
targetPath: "/ase/hotel/radio/overview",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.RADIO_VIEW],
|
||||
@@ -162,7 +162,7 @@ export const hotelMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/radio/api-keys",
|
||||
sourceFile: "src/app/admin/radio/api-keys/page.tsx",
|
||||
targetPath: "/admin/hotel/radio/api-keys",
|
||||
targetPath: "/ase/hotel/radio/api-keys",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.RADIO_VIEW],
|
||||
@@ -183,7 +183,7 @@ export const hotelMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/radio/autodj",
|
||||
sourceFile: "src/app/admin/radio/autodj/page.tsx",
|
||||
targetPath: "/admin/hotel/radio/autodj",
|
||||
targetPath: "/ase/hotel/radio/autodj",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.RADIO_VIEW],
|
||||
@@ -201,7 +201,7 @@ export const hotelMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/radio/banners",
|
||||
sourceFile: "src/app/admin/radio/banners/page.tsx",
|
||||
targetPath: "/admin/hotel/radio/banners",
|
||||
targetPath: "/ase/hotel/radio/banners",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.RADIO_VIEW],
|
||||
@@ -223,7 +223,7 @@ export const hotelMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/radio/embed",
|
||||
sourceFile: "src/app/admin/radio/embed/page.tsx",
|
||||
targetPath: "/admin/hotel/radio/embed",
|
||||
targetPath: "/ase/hotel/radio/embed",
|
||||
decision: "REBUILD",
|
||||
capabilities: { read: [PERMS.RADIO_VIEW], mutate: [] },
|
||||
dependencies: {
|
||||
@@ -238,7 +238,7 @@ export const hotelMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/radio/history",
|
||||
sourceFile: "src/app/admin/radio/history/page.tsx",
|
||||
targetPath: "/admin/hotel/radio/history",
|
||||
targetPath: "/ase/hotel/radio/history",
|
||||
decision: "REBUILD",
|
||||
capabilities: { read: [PERMS.RADIO_VIEW], mutate: [] },
|
||||
dependencies: { queries: ["RadioHistory", "User"], mutations: [] },
|
||||
@@ -250,7 +250,7 @@ export const hotelMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/radio/moderation",
|
||||
sourceFile: "src/app/admin/radio/moderation/page.tsx",
|
||||
targetPath: "/admin/hotel/radio/moderation",
|
||||
targetPath: "/ase/hotel/radio/moderation",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.RADIO_VIEW],
|
||||
@@ -269,7 +269,7 @@ export const hotelMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/radio/monitoring",
|
||||
sourceFile: "src/app/admin/radio/monitoring/page.tsx",
|
||||
targetPath: "/admin/hotel/radio/monitoring",
|
||||
targetPath: "/ase/hotel/radio/monitoring",
|
||||
decision: "REBUILD",
|
||||
capabilities: { read: [PERMS.RADIO_VIEW], mutate: [] },
|
||||
dependencies: {
|
||||
@@ -289,7 +289,7 @@ export const hotelMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/radio/points",
|
||||
sourceFile: "src/app/admin/radio/points/page.tsx",
|
||||
targetPath: "/admin/hotel/radio/points",
|
||||
targetPath: "/ase/hotel/radio/points",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.RADIO_VIEW],
|
||||
@@ -307,7 +307,7 @@ export const hotelMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/radio/ranks",
|
||||
sourceFile: "src/app/admin/radio/ranks/page.tsx",
|
||||
targetPath: "/admin/hotel/radio/ranks",
|
||||
targetPath: "/ase/hotel/radio/ranks",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.RADIO_VIEW],
|
||||
@@ -325,7 +325,7 @@ export const hotelMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/radio/settings",
|
||||
sourceFile: "src/app/admin/radio/settings/page.tsx",
|
||||
targetPath: "/admin/hotel/radio/settings",
|
||||
targetPath: "/ase/hotel/radio/settings",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.RADIO_VIEW],
|
||||
@@ -352,7 +352,7 @@ export const hotelMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/studio",
|
||||
sourceFile: "src/app/admin/studio/page.tsx",
|
||||
targetPath: "/admin/hotel/studio/furni",
|
||||
targetPath: "/ase/hotel/studio/furni",
|
||||
decision: "MERGE",
|
||||
capabilities: { read: [PERMS.ASSETS_IMPORT], mutate: [] },
|
||||
dependencies: { queries: [], mutations: [] },
|
||||
@@ -366,7 +366,7 @@ export const hotelMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/studio/audit",
|
||||
sourceFile: "src/app/admin/studio/audit/page.tsx",
|
||||
targetPath: "/admin/hotel/studio/audit",
|
||||
targetPath: "/ase/hotel/studio/audit",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.ASSETS_IMPORT],
|
||||
@@ -396,7 +396,7 @@ export const hotelMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/studio/badges",
|
||||
sourceFile: "src/app/admin/studio/badges/page.tsx",
|
||||
targetPath: "/admin/hotel/studio/badges",
|
||||
targetPath: "/ase/hotel/studio/badges",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.ASSETS_IMPORT],
|
||||
@@ -426,7 +426,7 @@ export const hotelMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/studio/clone",
|
||||
sourceFile: "src/app/admin/studio/clone/page.tsx",
|
||||
targetPath: "/admin/hotel/studio/clone",
|
||||
targetPath: "/ase/hotel/studio/clone",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.ASSETS_IMPORT],
|
||||
@@ -460,7 +460,7 @@ export const hotelMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/studio/clothing",
|
||||
sourceFile: "src/app/admin/studio/clothing/page.tsx",
|
||||
targetPath: "/admin/hotel/studio/clothing",
|
||||
targetPath: "/ase/hotel/studio/clothing",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.ASSETS_IMPORT],
|
||||
@@ -490,7 +490,7 @@ export const hotelMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/studio/effects",
|
||||
sourceFile: "src/app/admin/studio/effects/page.tsx",
|
||||
targetPath: "/admin/hotel/studio/effects",
|
||||
targetPath: "/ase/hotel/studio/effects",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.ASSETS_IMPORT],
|
||||
@@ -513,7 +513,7 @@ export const hotelMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/studio/furni",
|
||||
sourceFile: "src/app/admin/studio/furni/page.tsx",
|
||||
targetPath: "/admin/hotel/studio/furni",
|
||||
targetPath: "/ase/hotel/studio/furni",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.ASSETS_IMPORT],
|
||||
@@ -551,7 +551,7 @@ export const hotelMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/studio/maintenance",
|
||||
sourceFile: "src/app/admin/studio/maintenance/page.tsx",
|
||||
targetPath: "/admin/hotel/studio/maintenance",
|
||||
targetPath: "/ase/hotel/studio/maintenance",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.CATALOG_EDIT],
|
||||
@@ -577,7 +577,7 @@ export const hotelMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/studio/pets",
|
||||
sourceFile: "src/app/admin/studio/pets/page.tsx",
|
||||
targetPath: "/admin/hotel/studio/pets",
|
||||
targetPath: "/ase/hotel/studio/pets",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.ASSETS_IMPORT],
|
||||
@@ -604,7 +604,7 @@ export const hotelMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/studio/repair-icons",
|
||||
sourceFile: "src/app/admin/studio/repair-icons/page.tsx",
|
||||
targetPath: "/admin/hotel/studio/repair-icons",
|
||||
targetPath: "/ase/hotel/studio/repair-icons",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.ASSETS_IMPORT],
|
||||
@@ -628,7 +628,7 @@ export const hotelMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/studio/sync",
|
||||
sourceFile: "src/app/admin/studio/sync/page.tsx",
|
||||
targetPath: "/admin/hotel/studio/sync",
|
||||
targetPath: "/ase/hotel/studio/sync",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.ASSETS_IMPORT],
|
||||
@@ -653,7 +653,7 @@ export const hotelMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/studio/upload",
|
||||
sourceFile: "src/app/admin/studio/upload/page.tsx",
|
||||
targetPath: "/admin/hotel/studio/upload",
|
||||
targetPath: "/ase/hotel/studio/upload",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.ASSETS_IMPORT],
|
||||
|
||||
@@ -7,7 +7,7 @@ export const operationsMigrationEntries: readonly MigrationEntry[] = [
|
||||
legacyPath: "/admin",
|
||||
sourceFile: "src/app/admin/page.tsx",
|
||||
targetDomain: "operations",
|
||||
targetPath: "/admin/work",
|
||||
targetPath: "/ase",
|
||||
decision: "REBUILD",
|
||||
capabilities: { read: [PERMS.ADMIN_DASHBOARD], mutate: [] },
|
||||
dependencies: {
|
||||
|
||||
@@ -26,7 +26,7 @@ export const peopleMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/users",
|
||||
sourceFile: "src/app/admin/users/page.tsx",
|
||||
targetPath: "/admin/people/users",
|
||||
targetPath: "/ase/people/users",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.USERS_VIEW],
|
||||
@@ -50,7 +50,7 @@ export const peopleMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/users/edit/:id",
|
||||
sourceFile: "src/app/admin/users/edit/[id]/page.tsx",
|
||||
targetPath: "/admin/people/users/:id/edit",
|
||||
targetPath: "/ase/people/users/:id/edit",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.USERS_EDIT],
|
||||
@@ -81,7 +81,7 @@ export const peopleMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/users/multi-accounts",
|
||||
sourceFile: "src/app/admin/users/multi-accounts/page.tsx",
|
||||
targetPath: "/admin/people/users/multi-accounts",
|
||||
targetPath: "/ase/people/users/multi-accounts",
|
||||
decision: "REBUILD",
|
||||
capabilities: { read: [PERMS.USERS_VIEW], mutate: [] },
|
||||
dependencies: { queries: ["detectMultiAccounts"], mutations: [] },
|
||||
@@ -93,7 +93,7 @@ export const peopleMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/users/show/:id",
|
||||
sourceFile: "src/app/admin/users/show/[id]/page.tsx",
|
||||
targetPath: "/admin/people/users/:id",
|
||||
targetPath: "/ase/people/users/:id",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.USERS_VIEW],
|
||||
@@ -119,7 +119,7 @@ export const peopleMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/users/:id",
|
||||
sourceFile: "src/app/admin/users/[id]/page.tsx",
|
||||
targetPath: "/admin/people/users/:id",
|
||||
targetPath: "/ase/people/users/:id",
|
||||
decision: "MERGE",
|
||||
capabilities: { read: [PERMS.USERS_VIEW], mutate: [] },
|
||||
dependencies: { queries: [], mutations: [] },
|
||||
@@ -133,7 +133,7 @@ export const peopleMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/users/:id/edit",
|
||||
sourceFile: "src/app/admin/users/[id]/edit/page.tsx",
|
||||
targetPath: "/admin/people/users/:id/edit",
|
||||
targetPath: "/ase/people/users/:id/edit",
|
||||
decision: "MERGE",
|
||||
capabilities: { read: [PERMS.USERS_EDIT], mutate: [] },
|
||||
dependencies: { queries: [], mutations: [] },
|
||||
@@ -147,7 +147,7 @@ export const peopleMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/online",
|
||||
sourceFile: "src/app/admin/online/page.tsx",
|
||||
targetPath: "/admin/people/community/online",
|
||||
targetPath: "/ase/people/community/online",
|
||||
decision: "REBUILD",
|
||||
capabilities: { read: [PERMS.USERS_VIEW], mutate: [] },
|
||||
dependencies: { queries: ["fetchAdminList", "User"], mutations: [] },
|
||||
@@ -159,7 +159,7 @@ export const peopleMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/guilds",
|
||||
sourceFile: "src/app/admin/guilds/page.tsx",
|
||||
targetPath: "/admin/people/community/guilds",
|
||||
targetPath: "/ase/people/community/guilds",
|
||||
decision: "REBUILD",
|
||||
capabilities: { read: [PERMS.USERS_VIEW], mutate: [] },
|
||||
dependencies: {
|
||||
@@ -174,7 +174,7 @@ export const peopleMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/guilds/:id",
|
||||
sourceFile: "src/app/admin/guilds/[id]/page.tsx",
|
||||
targetPath: "/admin/people/community/guilds/:id",
|
||||
targetPath: "/ase/people/community/guilds/:id",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.USERS_VIEW],
|
||||
@@ -192,7 +192,7 @@ export const peopleMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/applications",
|
||||
sourceFile: "src/app/admin/applications/page.tsx",
|
||||
targetPath: "/admin/people/staff/applications",
|
||||
targetPath: "/ase/people/staff/applications",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.USERS_VIEW],
|
||||
@@ -212,7 +212,7 @@ export const peopleMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/teams",
|
||||
sourceFile: "src/app/admin/teams/page.tsx",
|
||||
targetPath: "/admin/people/staff/teams",
|
||||
targetPath: "/ase/people/staff/teams",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.USERS_VIEW],
|
||||
@@ -230,7 +230,7 @@ export const peopleMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/moderation",
|
||||
sourceFile: "src/app/admin/moderation/page.tsx",
|
||||
targetPath: "/admin/people/moderation",
|
||||
targetPath: "/ase/people/moderation",
|
||||
decision: "REBUILD",
|
||||
capabilities: { read: [PERMS.MODERATION_VIEW], mutate: [] },
|
||||
dependencies: {
|
||||
@@ -251,7 +251,7 @@ export const peopleMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/moderation/actions",
|
||||
sourceFile: "src/app/admin/moderation/actions/page.tsx",
|
||||
targetPath: "/admin/people/moderation/actions",
|
||||
targetPath: "/ase/people/moderation/actions",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.MODERATION_EDIT],
|
||||
@@ -276,7 +276,7 @@ export const peopleMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/moderation/cfh",
|
||||
sourceFile: "src/app/admin/moderation/cfh/page.tsx",
|
||||
targetPath: "/admin/people/moderation/cfh",
|
||||
targetPath: "/ase/people/moderation/cfh",
|
||||
decision: "REBUILD",
|
||||
capabilities: { read: [PERMS.MODERATION_VIEW], mutate: [] },
|
||||
dependencies: { queries: ["SupportTickets", "User"], mutations: [] },
|
||||
@@ -288,7 +288,7 @@ export const peopleMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/moderation/cfh/:id",
|
||||
sourceFile: "src/app/admin/moderation/cfh/[id]/page.tsx",
|
||||
targetPath: "/admin/people/moderation/cfh/:id",
|
||||
targetPath: "/ase/people/moderation/cfh/:id",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.MODERATION_VIEW],
|
||||
@@ -313,7 +313,7 @@ export const peopleMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/moderation/team",
|
||||
sourceFile: "src/app/admin/moderation/team/page.tsx",
|
||||
targetPath: "/admin/people/staff/moderation-team",
|
||||
targetPath: "/ase/people/staff/moderation-team",
|
||||
decision: "REBUILD",
|
||||
capabilities: { read: [PERMS.MODERATION_VIEW], mutate: [] },
|
||||
dependencies: {
|
||||
@@ -334,7 +334,7 @@ export const peopleMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/bans",
|
||||
sourceFile: "src/app/admin/bans/page.tsx",
|
||||
targetPath: "/admin/people/moderation/bans",
|
||||
targetPath: "/ase/people/moderation/bans",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.BANS_VIEW],
|
||||
@@ -352,7 +352,7 @@ export const peopleMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/ip",
|
||||
sourceFile: "src/app/admin/ip/page.tsx",
|
||||
targetPath: "/admin/people/moderation/ip",
|
||||
targetPath: "/ase/people/moderation/ip",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.SETTINGS_VIEW],
|
||||
@@ -375,7 +375,7 @@ export const peopleMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/vpn",
|
||||
sourceFile: "src/app/admin/vpn/page.tsx",
|
||||
targetPath: "/admin/people/moderation/vpn",
|
||||
targetPath: "/ase/people/moderation/vpn",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.SETTINGS_VIEW],
|
||||
@@ -393,7 +393,7 @@ export const peopleMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/wordfilter",
|
||||
sourceFile: "src/app/admin/wordfilter/page.tsx",
|
||||
targetPath: "/admin/people/moderation/word-filter",
|
||||
targetPath: "/ase/people/moderation/word-filter",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.WORDFILTER_VIEW],
|
||||
@@ -413,7 +413,7 @@ export const peopleMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/tickets",
|
||||
sourceFile: "src/app/admin/tickets/page.tsx",
|
||||
targetPath: "/admin/people/support/tickets",
|
||||
targetPath: "/ase/people/support/tickets",
|
||||
decision: "REBUILD",
|
||||
capabilities: { read: [PERMS.TICKETS_VIEW], mutate: [] },
|
||||
dependencies: {
|
||||
@@ -428,7 +428,7 @@ export const peopleMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/tickets/desk",
|
||||
sourceFile: "src/app/admin/tickets/desk/page.tsx",
|
||||
targetPath: "/admin/people/support/tickets/desk",
|
||||
targetPath: "/ase/people/support/tickets/desk",
|
||||
decision: "REBUILD",
|
||||
capabilities: { read: [PERMS.TICKETS_VIEW], mutate: [] },
|
||||
dependencies: {
|
||||
@@ -443,7 +443,7 @@ export const peopleMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/tickets/templates",
|
||||
sourceFile: "src/app/admin/tickets/templates/page.tsx",
|
||||
targetPath: "/admin/people/support/tickets/templates",
|
||||
targetPath: "/ase/people/support/tickets/templates",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.TICKETS_EDIT],
|
||||
@@ -461,7 +461,7 @@ export const peopleMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/tickets/:id",
|
||||
sourceFile: "src/app/admin/tickets/[id]/page.tsx",
|
||||
targetPath: "/admin/people/support/tickets/:id",
|
||||
targetPath: "/ase/people/support/tickets/:id",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.TICKETS_VIEW],
|
||||
@@ -489,7 +489,7 @@ export const peopleMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/help-tickets",
|
||||
sourceFile: "src/app/admin/help-tickets/page.tsx",
|
||||
targetPath: "/admin/people/support/help-tickets",
|
||||
targetPath: "/ase/people/support/help-tickets",
|
||||
decision: "REBUILD",
|
||||
capabilities: { read: [PERMS.TICKETS_VIEW], mutate: [] },
|
||||
dependencies: {
|
||||
@@ -509,7 +509,7 @@ export const peopleMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/help-tickets/:id",
|
||||
sourceFile: "src/app/admin/help-tickets/[id]/page.tsx",
|
||||
targetPath: "/admin/people/support/help-tickets/:id",
|
||||
targetPath: "/ase/people/support/help-tickets/:id",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.TICKETS_VIEW],
|
||||
@@ -542,7 +542,7 @@ export const peopleMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "mod",
|
||||
legacyPath: "/mod",
|
||||
sourceFile: "src/app/mod/page.tsx",
|
||||
targetPath: "/admin/people/moderation",
|
||||
targetPath: "/ase/people/moderation",
|
||||
decision: "MERGE",
|
||||
capabilities: {
|
||||
read: [
|
||||
@@ -580,7 +580,7 @@ export const peopleMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "mod",
|
||||
legacyPath: "/mod/actions",
|
||||
sourceFile: "src/app/mod/actions/page.tsx",
|
||||
targetPath: "/admin/people/moderation/actions",
|
||||
targetPath: "/ase/people/moderation/actions",
|
||||
decision: "MERGE",
|
||||
capabilities: {
|
||||
read: [PERMS.MOD_ACTIONS, PERMS.MODERATION_EDIT],
|
||||
@@ -605,7 +605,7 @@ export const peopleMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "mod",
|
||||
legacyPath: "/mod/bans",
|
||||
sourceFile: "src/app/mod/bans/page.tsx",
|
||||
targetPath: "/admin/people/moderation/bans",
|
||||
targetPath: "/ase/people/moderation/bans",
|
||||
decision: "MERGE",
|
||||
capabilities: {
|
||||
read: [PERMS.MOD_BANS_VIEW, PERMS.BANS_VIEW],
|
||||
@@ -620,7 +620,7 @@ export const peopleMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "mod",
|
||||
legacyPath: "/mod/cfh",
|
||||
sourceFile: "src/app/mod/cfh/page.tsx",
|
||||
targetPath: "/admin/people/moderation/cfh",
|
||||
targetPath: "/ase/people/moderation/cfh",
|
||||
decision: "MERGE",
|
||||
capabilities: {
|
||||
read: [PERMS.MOD_CFH_VIEW, PERMS.MODERATION_VIEW],
|
||||
@@ -635,7 +635,7 @@ export const peopleMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "mod",
|
||||
legacyPath: "/mod/cfh/:id",
|
||||
sourceFile: "src/app/mod/cfh/[id]/page.tsx",
|
||||
targetPath: "/admin/people/moderation/cfh/:id",
|
||||
targetPath: "/ase/people/moderation/cfh/:id",
|
||||
decision: "MERGE",
|
||||
capabilities: {
|
||||
read: [PERMS.MOD_CFH_VIEW, PERMS.MODERATION_VIEW],
|
||||
@@ -660,7 +660,7 @@ export const peopleMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "mod",
|
||||
legacyPath: "/mod/help-tickets",
|
||||
sourceFile: "src/app/mod/help-tickets/page.tsx",
|
||||
targetPath: "/admin/people/support/help-tickets",
|
||||
targetPath: "/ase/people/support/help-tickets",
|
||||
decision: "MERGE",
|
||||
capabilities: {
|
||||
read: [PERMS.MOD_TICKETS_VIEW, PERMS.TICKETS_VIEW],
|
||||
@@ -683,7 +683,7 @@ export const peopleMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "mod",
|
||||
legacyPath: "/mod/help-tickets/:id",
|
||||
sourceFile: "src/app/mod/help-tickets/[id]/page.tsx",
|
||||
targetPath: "/admin/people/support/help-tickets/:id",
|
||||
targetPath: "/ase/people/support/help-tickets/:id",
|
||||
decision: "MERGE",
|
||||
capabilities: {
|
||||
read: [PERMS.MOD_TICKETS_VIEW, PERMS.TICKETS_VIEW],
|
||||
@@ -712,7 +712,7 @@ export const peopleMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "mod",
|
||||
legacyPath: "/mod/team",
|
||||
sourceFile: "src/app/mod/team/page.tsx",
|
||||
targetPath: "/admin/people/staff/moderation-team",
|
||||
targetPath: "/ase/people/staff/moderation-team",
|
||||
decision: "MERGE",
|
||||
capabilities: {
|
||||
read: [PERMS.MOD_TEAM_VIEW, PERMS.MODERATION_VIEW],
|
||||
@@ -736,7 +736,7 @@ export const peopleMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "mod",
|
||||
legacyPath: "/mod/tickets",
|
||||
sourceFile: "src/app/mod/tickets/page.tsx",
|
||||
targetPath: "/admin/people/support/tickets",
|
||||
targetPath: "/ase/people/support/tickets",
|
||||
decision: "MERGE",
|
||||
capabilities: {
|
||||
read: [PERMS.MOD_TICKETS_VIEW, PERMS.TICKETS_VIEW],
|
||||
@@ -754,7 +754,7 @@ export const peopleMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "mod",
|
||||
legacyPath: "/mod/tickets/desk",
|
||||
sourceFile: "src/app/mod/tickets/desk/page.tsx",
|
||||
targetPath: "/admin/people/support/tickets/desk",
|
||||
targetPath: "/ase/people/support/tickets/desk",
|
||||
decision: "MERGE",
|
||||
capabilities: {
|
||||
read: [PERMS.MOD_TICKETS_VIEW, PERMS.TICKETS_VIEW],
|
||||
@@ -777,7 +777,7 @@ export const peopleMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "mod",
|
||||
legacyPath: "/mod/tickets/:id",
|
||||
sourceFile: "src/app/mod/tickets/[id]/page.tsx",
|
||||
targetPath: "/admin/people/support/tickets/:id",
|
||||
targetPath: "/ase/people/support/tickets/:id",
|
||||
decision: "MERGE",
|
||||
capabilities: {
|
||||
read: [PERMS.MOD_TICKETS_VIEW, PERMS.TICKETS_VIEW],
|
||||
@@ -806,7 +806,7 @@ export const peopleMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "mod",
|
||||
legacyPath: "/mod/users",
|
||||
sourceFile: "src/app/mod/users/page.tsx",
|
||||
targetPath: "/admin/people/users",
|
||||
targetPath: "/ase/people/users",
|
||||
decision: "MERGE",
|
||||
capabilities: {
|
||||
read: [PERMS.MOD_USERS_VIEW, PERMS.USERS_VIEW],
|
||||
@@ -821,7 +821,7 @@ export const peopleMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "mod",
|
||||
legacyPath: "/mod/users/:id",
|
||||
sourceFile: "src/app/mod/users/[id]/page.tsx",
|
||||
targetPath: "/admin/people/users/:id",
|
||||
targetPath: "/ase/people/users/:id",
|
||||
decision: "MERGE",
|
||||
capabilities: {
|
||||
read: [PERMS.MOD_USERS_VIEW, PERMS.USERS_VIEW],
|
||||
|
||||
@@ -26,7 +26,7 @@ export const systemMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/alerts",
|
||||
sourceFile: "src/app/admin/alerts/page.tsx",
|
||||
targetPath: "/admin/system/operations/alerts",
|
||||
targetPath: "/ase/system/operations/alerts",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.NOTIFICATIONS_VIEW],
|
||||
@@ -51,7 +51,7 @@ export const systemMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/analytics",
|
||||
sourceFile: "src/app/admin/analytics/page.tsx",
|
||||
targetPath: "/admin/system/observability/analytics",
|
||||
targetPath: "/ase/system/observability/analytics",
|
||||
decision: "REBUILD",
|
||||
capabilities: { read: [PERMS.ANALYTICS_VIEW], mutate: [] },
|
||||
dependencies: {
|
||||
@@ -73,7 +73,7 @@ export const systemMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/analytics/activity",
|
||||
sourceFile: "src/app/admin/analytics/activity/page.tsx",
|
||||
targetPath: "/admin/system/observability/analytics/activity",
|
||||
targetPath: "/ase/system/observability/analytics/activity",
|
||||
decision: "REBUILD",
|
||||
capabilities: { read: [PERMS.ANALYTICS_VIEW], mutate: [] },
|
||||
dependencies: {
|
||||
@@ -96,7 +96,7 @@ export const systemMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/analytics/economy",
|
||||
sourceFile: "src/app/admin/analytics/economy/page.tsx",
|
||||
targetPath: "/admin/system/observability/analytics/economy",
|
||||
targetPath: "/ase/system/observability/analytics/economy",
|
||||
decision: "REBUILD",
|
||||
capabilities: { read: [PERMS.ANALYTICS_VIEW], mutate: [] },
|
||||
dependencies: {
|
||||
@@ -120,7 +120,7 @@ export const systemMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/commandocentrum",
|
||||
sourceFile: "src/app/admin/commandocentrum/page.tsx",
|
||||
targetPath: "/admin/system/operations/command-center",
|
||||
targetPath: "/ase/system/operations/command-center",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.RCON_EXECUTE],
|
||||
@@ -164,7 +164,7 @@ export const systemMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/devops",
|
||||
sourceFile: "src/app/admin/devops/page.tsx",
|
||||
targetPath: "/admin/system/observability/devops",
|
||||
targetPath: "/ase/system/observability/devops",
|
||||
decision: "REBUILD",
|
||||
capabilities: { read: [PERMS.DEVOPS_VIEW], mutate: [] },
|
||||
dependencies: {
|
||||
@@ -185,7 +185,7 @@ export const systemMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/devops/errors",
|
||||
sourceFile: "src/app/admin/devops/errors/page.tsx",
|
||||
targetPath: "/admin/system/observability/devops/errors",
|
||||
targetPath: "/ase/system/observability/devops/errors",
|
||||
decision: "REBUILD",
|
||||
capabilities: { read: [PERMS.DEVOPS_VIEW], mutate: [] },
|
||||
dependencies: { queries: ["EmulatorErrors"], mutations: [] },
|
||||
@@ -197,7 +197,7 @@ export const systemMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/emulator",
|
||||
sourceFile: "src/app/admin/emulator/page.tsx",
|
||||
targetPath: "/admin/system/configuration/emulator",
|
||||
targetPath: "/ase/system/configuration/emulator",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.SETTINGS_VIEW],
|
||||
@@ -248,7 +248,7 @@ export const systemMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/logs",
|
||||
sourceFile: "src/app/admin/logs/page.tsx",
|
||||
targetPath: "/admin/system/observability/logs/staff",
|
||||
targetPath: "/ase/system/observability/logs/staff",
|
||||
decision: "REBUILD",
|
||||
capabilities: { read: [PERMS.LOGS_VIEW], mutate: [] },
|
||||
dependencies: { queries: ["StaffActivities", "User"], mutations: [] },
|
||||
@@ -260,7 +260,7 @@ export const systemMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/logs/audit",
|
||||
sourceFile: "src/app/admin/logs/audit/page.tsx",
|
||||
targetPath: "/admin/system/observability/logs/audit",
|
||||
targetPath: "/ase/system/observability/logs/audit",
|
||||
decision: "REBUILD",
|
||||
capabilities: { read: [PERMS.LOGS_VIEW], mutate: [] },
|
||||
dependencies: { queries: ["getAuditLogs"], mutations: [] },
|
||||
@@ -272,7 +272,7 @@ export const systemMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/logs/chat",
|
||||
sourceFile: "src/app/admin/logs/chat/page.tsx",
|
||||
targetPath: "/admin/system/observability/logs/chat",
|
||||
targetPath: "/ase/system/observability/logs/chat",
|
||||
decision: "REBUILD",
|
||||
capabilities: { read: [PERMS.LOGS_VIEW], mutate: [] },
|
||||
dependencies: {
|
||||
@@ -287,7 +287,7 @@ export const systemMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/logs/commands",
|
||||
sourceFile: "src/app/admin/logs/commands/page.tsx",
|
||||
targetPath: "/admin/system/observability/logs/commands",
|
||||
targetPath: "/ase/system/observability/logs/commands",
|
||||
decision: "REBUILD",
|
||||
capabilities: { read: [PERMS.LOGS_VIEW], mutate: [] },
|
||||
dependencies: {
|
||||
@@ -302,7 +302,7 @@ export const systemMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/logs/trades",
|
||||
sourceFile: "src/app/admin/logs/trades/page.tsx",
|
||||
targetPath: "/admin/system/observability/logs/trades",
|
||||
targetPath: "/ase/system/observability/logs/trades",
|
||||
decision: "REBUILD",
|
||||
capabilities: { read: [PERMS.LOGS_VIEW], mutate: [] },
|
||||
dependencies: {
|
||||
@@ -319,7 +319,7 @@ export const systemMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/maintenance",
|
||||
sourceFile: "src/app/admin/maintenance/page.tsx",
|
||||
targetPath: "/admin/system/operations/maintenance",
|
||||
targetPath: "/ase/system/operations/maintenance",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.SETTINGS_VIEW],
|
||||
@@ -360,7 +360,7 @@ export const systemMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/permissions",
|
||||
sourceFile: "src/app/admin/permissions/page.tsx",
|
||||
targetPath: "/admin/system/access/permissions",
|
||||
targetPath: "/ase/system/access/permissions",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.PERMISSIONS_MANAGE],
|
||||
@@ -384,7 +384,7 @@ export const systemMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/permissions/:id",
|
||||
sourceFile: "src/app/admin/permissions/[id]/page.tsx",
|
||||
targetPath: "/admin/system/access/permissions/:id",
|
||||
targetPath: "/ase/system/access/permissions/:id",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.PERMISSIONS_MANAGE],
|
||||
@@ -416,7 +416,7 @@ export const systemMigrationEntries: readonly MigrationEntry[] = [
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/settings",
|
||||
sourceFile: "src/app/admin/settings/page.tsx",
|
||||
targetPath: "/admin/system/configuration/settings",
|
||||
targetPath: "/ase/system/configuration/settings",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.SETTINGS_VIEW],
|
||||
|
||||
@@ -11,7 +11,7 @@ const page = (legacyPath: string): LegacyPage => ({
|
||||
const entry = (legacyPath: string): MigrationEntry => ({
|
||||
...page(legacyPath),
|
||||
targetDomain: "system",
|
||||
targetPath: "/admin/system/example",
|
||||
targetPath: "/ase/system/example",
|
||||
decision: "REHOST",
|
||||
capabilities: { read: ["admin.dashboard"], mutate: [] },
|
||||
dependencies: { queries: [], mutations: [] },
|
||||
@@ -112,7 +112,7 @@ describe("validateMigrationEntries", () => {
|
||||
"MERGE requires requiredTests: /admin",
|
||||
"mutation dependencies require auditRequirement: /admin",
|
||||
"mutation dependencies require mutate capabilities: /admin",
|
||||
"non-REMOVE targetPath must start with /admin/: /admin",
|
||||
"non-REMOVE targetPath must use /ase: /admin",
|
||||
"prohibited placeholder: /admin",
|
||||
"VERIFIED requires parityEvidence: /admin",
|
||||
]);
|
||||
@@ -134,3 +134,19 @@ describe("validateMigrationEntries", () => {
|
||||
).toEqual(["REHOST requires targetPath: /admin"]);
|
||||
});
|
||||
});
|
||||
|
||||
it("requires non-removal targets to use the ase namespace", () => {
|
||||
expect(
|
||||
validateMigrationEntries(
|
||||
[page("/admin")],
|
||||
[{ ...entry("/admin"), targetPath: "/ase/system/example" }],
|
||||
),
|
||||
).toEqual([]);
|
||||
|
||||
expect(
|
||||
validateMigrationEntries(
|
||||
[page("/admin")],
|
||||
[{ ...entry("/admin"), targetPath: "/admin/system/example" }],
|
||||
),
|
||||
).toContain("non-REMOVE targetPath must use /ase: /admin");
|
||||
});
|
||||
@@ -84,11 +84,9 @@ export function validateMigrationEntries(
|
||||
if (
|
||||
entry.targetPath !== null &&
|
||||
entry.decision !== "REMOVE" &&
|
||||
!entry.targetPath.startsWith("/admin/")
|
||||
!(entry.targetPath === "/ase" || entry.targetPath.startsWith("/ase/"))
|
||||
) {
|
||||
issues.add(
|
||||
`non-REMOVE targetPath must start with /admin/: ${legacyPath}`,
|
||||
);
|
||||
issues.add(`non-REMOVE targetPath must use /ase: ${legacyPath}`);
|
||||
}
|
||||
|
||||
if (
|
||||
|
||||
@@ -5,7 +5,7 @@ import { describe, expect, it } from "vitest";
|
||||
const ROOTS = [
|
||||
"src/app/admin",
|
||||
"src/components/admin",
|
||||
"src/app/admin-next",
|
||||
"src/app/ase-next",
|
||||
"src/features/housekeeping",
|
||||
];
|
||||
const GRAPHICAL_ALLOWLIST = [
|
||||
|
||||
Reference in new issue
Block a user