feat(housekeeping): compose operations workspace
This commit is contained in:
1 parent
5574e601bb
commit
85ad0452d3
22 files changed
+1240
-87
No files matched your search
@@ -7,6 +7,7 @@ import { describe, expect, it, vi } from "vitest";
|
||||
import { CONTENT_ROUTE_IDS } from "../domains/content/routes";
|
||||
import { ECONOMY_ROUTE_IDS } from "../domains/economy/routes";
|
||||
import { HOTEL_ROUTE_IDS } from "../domains/hotel/routes";
|
||||
import { OPERATIONS_ROUTES } from "../domains/operations/routes";
|
||||
import { PEOPLE_ROUTE_IDS } from "../domains/people/routes";
|
||||
import { SYSTEM_ROUTE_IDS } from "../domains/system/routes";
|
||||
import { HOUSEKEEPING_MANIFESTS } from "../manifests";
|
||||
@@ -27,6 +28,33 @@ const SERVER_CAPABILITY_CONTEXT =
|
||||
const PERMISSIONS_ADAPTER = "src/lib/permissions";
|
||||
const DOMAIN_MODULE_ROOT = "src/features/housekeeping/domains";
|
||||
const approvedRuntimeImports = new Map<string, ReadonlySet<string>>([
|
||||
[
|
||||
"src/features/housekeeping/domains/operations/manifest.ts",
|
||||
new Set([
|
||||
"src/features/housekeeping/domains/operations/inbox",
|
||||
"src/features/housekeeping/domains/operations/routes",
|
||||
"src/features/housekeeping/domains/operations/search",
|
||||
"src/features/housekeeping/domains/operations/widgets",
|
||||
]),
|
||||
],
|
||||
[
|
||||
"src/features/housekeeping/domains/operations/pages/personalization.tsx",
|
||||
new Set(["src/actions/housekeeping-preferences"]),
|
||||
],
|
||||
[
|
||||
"src/features/housekeeping/domains/operations/pages/workspace.tsx",
|
||||
new Set([
|
||||
"src/features/housekeeping/domains/operations/pages/personalization",
|
||||
"src/features/housekeeping/domains/operations/queries",
|
||||
]),
|
||||
],
|
||||
[
|
||||
"src/features/housekeeping/domains/operations/route-handlers.ts",
|
||||
new Set([
|
||||
"src/features/housekeeping/domains/operations/pages/workspace",
|
||||
"src/features/housekeeping/domains/operations/queries",
|
||||
]),
|
||||
],
|
||||
[
|
||||
"src/features/housekeeping/foundation/shell/command-deck.tsx",
|
||||
new Set(["src/actions/housekeeping-search"]),
|
||||
@@ -923,6 +951,7 @@ const approvedRuntimeImports = new Map<string, ReadonlySet<string>>([
|
||||
"src/features/housekeeping/domains/content/route-handlers",
|
||||
"src/features/housekeeping/domains/economy/route-handlers",
|
||||
"src/features/housekeeping/domains/hotel/route-handlers",
|
||||
"src/features/housekeeping/domains/operations/route-handlers",
|
||||
"src/features/housekeeping/domains/people/route-handlers",
|
||||
"src/features/housekeeping/domains/system/route-handlers",
|
||||
]),
|
||||
@@ -1523,7 +1552,7 @@ describe("housekeeping foundation completion contracts", () => {
|
||||
}
|
||||
});
|
||||
|
||||
it("creates the real six-domain registry with People, Content, Economy, Hotel, and System routes enabled", () => {
|
||||
it("creates the real six-domain registry with every domain route enabled", () => {
|
||||
const registry = createHousekeepingRegistry(HOUSEKEEPING_MANIFESTS);
|
||||
|
||||
expect(registry.domains.map((domain) => domain.id)).toEqual([
|
||||
@@ -1536,14 +1565,9 @@ describe("housekeeping foundation completion contracts", () => {
|
||||
]);
|
||||
expect(
|
||||
registry.domains
|
||||
.filter(
|
||||
(domain) =>
|
||||
!["people", "content", "economy", "hotel", "system"].includes(
|
||||
domain.id,
|
||||
),
|
||||
)
|
||||
.every((domain) => domain.routes.length === 0),
|
||||
).toBe(true);
|
||||
.find((domain) => domain.id === "operations")
|
||||
?.routes.map((route) => route.id),
|
||||
).toEqual(OPERATIONS_ROUTES.map((route) => route.id));
|
||||
expect(
|
||||
registry.domains
|
||||
.find((domain) => domain.id === "people")
|
||||
|
||||
Reference in new issue
Block a user