feat(housekeeping): integrate studio operations
CI / check (pull_request) Successful in 38s
CI / release (pull_request) Skipped
CI / deploy (pull_request) Skipped

This commit is contained in:
Simo committed 2026-08-30 15:29:58 +02:00
1 parent 020c06f172
commit 2e95a106e0
36 files changed
+2296 -60

No files matched your search

@@ -3,6 +3,7 @@ import "server-only";
import { CONTENT_COMMANDS } from "../../domains/content/commands/content-commands";
import { ECONOMY_COMMANDS } from "../../domains/economy/commands/economy-commands";
import { HOTEL_COMMANDS } from "../../domains/hotel/commands/hotel-commands";
import { STUDIO_COMMANDS } from "../../domains/hotel/commands/studio-commands";
import { COMMUNITY_COMMANDS } from "../../domains/people/commands/community-commands";
import { MODERATION_COMMANDS } from "../../domains/people/commands/moderation-commands";
import { SUPPORT_COMMANDS } from "../../domains/people/commands/support-commands";
@@ -46,6 +47,7 @@ const currentHousekeepingCommands = defineHousekeepingCommands(
...CONTENT_COMMANDS,
...ECONOMY_COMMANDS,
...HOTEL_COMMANDS,
...STUDIO_COMMANDS,
...USER_COMMANDS,
...COMMUNITY_COMMANDS,
...SUPPORT_COMMANDS,
@@ -6,7 +6,7 @@ import { renderToStaticMarkup } from "react-dom/server";
import { describe, expect, it } from "vitest";
import { CONTENT_ROUTE_IDS } from "../domains/content/routes";
import { ECONOMY_ROUTE_IDS } from "../domains/economy/routes";
import { HOTEL_PRIMARY_ROUTE_IDS } from "../domains/hotel/routes";
import { HOTEL_ROUTE_IDS } from "../domains/hotel/routes";
import { PEOPLE_ROUTE_IDS } from "../domains/people/routes";
import { SYSTEM_ROUTE_IDS } from "../domains/system/routes";
import { HOUSEKEEPING_MANIFESTS } from "../manifests";
@@ -23,6 +23,10 @@ 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/hotel/commands/studio-commands.ts",
new Set(["src/features/housekeeping/domains/hotel/queries/studio"]),
],
[
"src/features/housekeeping/domains/hotel/routes.ts",
new Set(["src/features/housekeeping/domains/hotel/queries/assets"]),
@@ -713,7 +717,32 @@ const approvedRuntimeImports = new Map<string, ReadonlySet<string>>([
],
[
"src/features/housekeeping/domains/hotel/manifest.ts",
new Set(["src/features/housekeeping/domains/hotel/routes"]),
new Set([
"src/features/housekeeping/domains/hotel/inbox",
"src/features/housekeeping/domains/hotel/routes",
"src/features/housekeeping/domains/hotel/search",
"src/features/housekeeping/domains/hotel/widgets",
]),
],
[
"src/features/housekeeping/domains/hotel/components/operation-progress.tsx",
new Set(["src/features/housekeeping/domains/hotel/queries/studio"]),
],
[
"src/features/housekeeping/domains/hotel/components/operation-result.tsx",
new Set(["src/features/housekeeping/domains/hotel/queries/studio"]),
],
[
"src/features/housekeeping/domains/hotel/inbox.ts",
new Set(["src/features/housekeeping/domains/hotel/queries/studio"]),
],
[
"src/features/housekeeping/domains/hotel/search.ts",
new Set(["src/features/housekeeping/domains/hotel/queries/studio"]),
],
[
"src/features/housekeeping/domains/hotel/widgets.ts",
new Set(["src/features/housekeeping/domains/hotel/queries/studio"]),
],
[
"src/features/housekeeping/domains/hotel/pages/hotel-command-form.tsx",
@@ -765,6 +794,16 @@ const approvedRuntimeImports = new Map<string, ReadonlySet<string>>([
"src/features/housekeeping/domains/hotel/queries/rooms",
]),
],
[
"src/features/housekeeping/domains/hotel/pages/studio.tsx",
new Set([
"src/features/housekeeping/domains/hotel/components/operation-progress",
"src/features/housekeeping/domains/hotel/components/operation-result",
"src/features/housekeeping/domains/hotel/pages/hotel-command-form",
"src/features/housekeeping/domains/hotel/queries/studio",
"src/features/housekeeping/domains/hotel/routes",
]),
],
[
"src/features/housekeeping/domains/hotel/queries/hotel-production.ts",
new Set([
@@ -790,6 +829,10 @@ const approvedRuntimeImports = new Map<string, ReadonlySet<string>>([
"src/features/housekeeping/domains/hotel/routes",
]),
],
[
"src/features/housekeeping/domains/hotel/queries/studio.ts",
new Set(["src/features/housekeeping/domains/hotel/routes"]),
],
[
"src/features/housekeeping/domains/hotel/route-handlers.ts",
new Set([
@@ -798,6 +841,7 @@ const approvedRuntimeImports = new Map<string, ReadonlySet<string>>([
"src/features/housekeeping/domains/hotel/pages/room-detail",
"src/features/housekeeping/domains/hotel/pages/room-furni",
"src/features/housekeeping/domains/hotel/pages/rooms",
"src/features/housekeeping/domains/hotel/pages/studio",
"src/features/housekeeping/domains/hotel/routes",
]),
],
@@ -831,6 +875,7 @@ const approvedRuntimeImports = new Map<string, ReadonlySet<string>>([
"src/features/housekeeping/domains/content/commands/content-commands",
"src/features/housekeeping/domains/economy/commands/economy-commands",
"src/features/housekeeping/domains/hotel/commands/hotel-commands",
"src/features/housekeeping/domains/hotel/commands/studio-commands",
"src/features/housekeeping/domains/people/commands/community-commands",
"src/features/housekeeping/domains/people/commands/moderation-commands",
"src/features/housekeeping/domains/people/commands/support-commands",
@@ -1484,7 +1529,7 @@ describe("housekeeping foundation completion contracts", () => {
registry.domains
.find((domain) => domain.id === "hotel")
?.routes.map((route) => route.id),
).toEqual(HOTEL_PRIMARY_ROUTE_IDS);
).toEqual(HOTEL_ROUTE_IDS);
expect(
registry.domains
.find((domain) => domain.id === "system")
@@ -129,6 +129,17 @@ const routeMocks = vi.hoisted(() => {
"routes.hotel.radio.api-keys": "HK::hotel-radio-api-keys",
"routes.hotel.radio.banners": "HK::hotel-radio-banners",
"routes.hotel.radio.embed": "HK::hotel-radio-embed",
"routes.hotel.studio.audit": "HK::hotel-studio-audit",
"routes.hotel.studio.badges": "HK::hotel-studio-badges",
"routes.hotel.studio.clone": "HK::hotel-studio-clone",
"routes.hotel.studio.clothing": "HK::hotel-studio-clothing",
"routes.hotel.studio.effects": "HK::hotel-studio-effects",
"routes.hotel.studio.furni": "HK::hotel-studio-furni",
"routes.hotel.studio.maintenance": "HK::hotel-studio-maintenance",
"routes.hotel.studio.pets": "HK::hotel-studio-pets",
"routes.hotel.studio.repair-icons": "HK::hotel-studio-repair-icons",
"routes.hotel.studio.sync": "HK::hotel-studio-sync",
"routes.hotel.studio.upload": "HK::hotel-studio-upload",
"states.empty.title": "Localized empty title",
"states.empty.description": "Localized empty description",
};
@@ -8,7 +8,10 @@ import { ECONOMY_INBOX_SOURCES } from "../domains/economy/inbox";
import { ECONOMY_ROUTES } from "../domains/economy/routes";
import { ECONOMY_SEARCH_PROVIDERS } from "../domains/economy/search";
import { ECONOMY_WIDGETS } from "../domains/economy/widgets";
import { HOTEL_PRIMARY_ROUTES } from "../domains/hotel/routes";
import { HOTEL_INBOX_SOURCES } from "../domains/hotel/inbox";
import { HOTEL_ROUTES } from "../domains/hotel/routes";
import { HOTEL_SEARCH_PROVIDERS } from "../domains/hotel/search";
import { HOTEL_WIDGETS } from "../domains/hotel/widgets";
import { PEOPLE_INBOX_SOURCES } from "../domains/people/inbox";
import { PEOPLE_ROUTES } from "../domains/people/routes";
import { PEOPLE_SEARCH_PROVIDERS } from "../domains/people/search";
@@ -375,7 +378,7 @@ describe("housekeeping registry", () => {
: expected.id === "economy"
? ECONOMY_ROUTES
: expected.id === "hotel"
? HOTEL_PRIMARY_ROUTES
? HOTEL_ROUTES
: expected.id === "system"
? SYSTEM_ROUTES
: [],
@@ -387,7 +390,9 @@ describe("housekeeping registry", () => {
? CONTENT_SEARCH_PROVIDERS
: expected.id === "economy"
? ECONOMY_SEARCH_PROVIDERS
: [],
: expected.id === "hotel"
? HOTEL_SEARCH_PROVIDERS
: [],
);
expect(actual.inboxSources).toEqual(
expected.id === "people"
@@ -396,7 +401,9 @@ describe("housekeeping registry", () => {
? CONTENT_INBOX_SOURCES
: expected.id === "economy"
? ECONOMY_INBOX_SOURCES
: [],
: expected.id === "hotel"
? HOTEL_INBOX_SOURCES
: [],
);
expect(actual.widgets).toEqual(
expected.id === "people"
@@ -405,7 +412,9 @@ describe("housekeeping registry", () => {
? CONTENT_WIDGETS
: expected.id === "economy"
? ECONOMY_WIDGETS
: [],
: expected.id === "hotel"
? HOTEL_WIDGETS
: [],
);
expect(actual.capability).toEqual({ mode: "any", slugs: expected.slugs });
}