// The app wired the way apps/web and apps/worker wire the account module, through // `@conusai-kit/account/testing`: this app's modules, and the recording platforms of the opt-in ones. import { type AccountAppOptions, makeAccountApp, withoutModules } from "@conusai-kit/account/testing" import type { ModuleManifest } from "@conusai-kit/core" import { GUIDES_PLATFORM, GUIDES_REGISTRY } from "@conusai-kit/guides" // kit:guides import { recordingGuidesPlatform } from "@conusai-kit/guides/testing" // kit:guides import { SUPPORT_PLATFORM } from "@conusai-kit/support" // kit:support import { recordingSupportPlatform } from "@conusai-kit/support/testing" // kit:support import { appModules } from "../../index.js" export * from "@conusai-kit/account/testing" /** The app's modules without `removed`, as `kit template:prune --without` leaves them. */ export const modulesWithout = (...removed: string[]): ModuleManifest[] => withoutModules(appModules, ...removed) export function makeApp(options: Partial = {}) { const guides = recordingGuidesPlatform() // kit:guides const support = recordingSupportPlatform() // kit:support const app = makeAccountApp({ ...options, modules: options.modules ?? appModules, bind(root, registry) { root.value(GUIDES_PLATFORM, guides) // kit:guides root.value(GUIDES_REGISTRY, registry) // kit:guides root.value(SUPPORT_PLATFORM, support) // kit:support options.bind?.(root, registry) }, }) return { ...app, guides, // kit:guides support, // kit:support } }