UNPKG

everything-dev

Version:

A consolidated product package for building Module Federation apps with oRPC APIs.

1 lines • 3.13 kB
{"version":3,"file":"domain.mjs","names":[],"sources":["../../../../src/services/scaffold/upgrade-audit/domain.ts"],"sourcesContent":["import { Data } from \"effect\";\n\nexport type CheckId =\n | \"routes\"\n | \"route-guards\"\n | \"config\"\n | \"imports\"\n | \"ui-seam\"\n | \"db-topology\"\n | \"i18n-seam\"\n | \"compose-seam\";\n\nexport type RouterSeam = \"monolithic\" | \"authored-seam\" | \"unknown\" | \"absent\";\n\nexport type Severity = \"blocker\" | \"warn\";\n\nexport class Finding extends Data.TaggedClass(\"Finding\")<{\n readonly check: CheckId;\n readonly path: string;\n readonly severity: Severity;\n readonly message: string;\n}> {}\n\nexport class GateBlocked extends Data.TaggedError(\"GateBlocked\")<{\n readonly findings: readonly Finding[];\n}> {}\n\nexport interface ImportRewrite {\n readonly from: string;\n readonly to: string;\n readonly files: readonly string[];\n}\n\nexport interface PluginInventory {\n readonly name: string;\n readonly hasBackend: boolean;\n readonly hasWeb: boolean;\n readonly extendsParent: boolean;\n readonly variables: readonly string[];\n readonly secrets: readonly string[];\n}\n\nexport interface Manifest {\n readonly tier: \"A\" | \"B\";\n readonly blockerCount: number;\n readonly warnCount: number;\n readonly deleteFiles: readonly string[];\n readonly importRewrites: readonly ImportRewrite[];\n readonly configKeys: readonly string[];\n readonly routerSeam: RouterSeam;\n readonly authoredConfigTarget: \"bos.app.ts\";\n readonly plugins: readonly PluginInventory[];\n readonly db: {\n readonly schemaFile: string | null;\n readonly migrationsDir: string | null;\n };\n}\n\nexport interface AuditReport {\n readonly tier: \"A\" | \"B\";\n readonly findings: readonly Finding[];\n readonly manifest: Manifest;\n}\n\nexport const KNOWN_CONFIG_KEYS = [\n \"extends\",\n \"account\",\n \"domain\",\n \"title\",\n \"description\",\n \"testnet\",\n \"staging\",\n \"repository\",\n \"ci\",\n \"app\",\n \"plugins\",\n] as const;\n\nexport const KNOWN_APP_SLOT_KEYS = [\n \"development\",\n \"production\",\n \"integrity\",\n \"ssr\",\n \"ssrIntegrity\",\n \"secrets\",\n \"shared\",\n \"extends\",\n \"proxy\",\n \"routes\",\n] as const;\n\nexport const KNOWN_PLUGIN_KEYS = [\n \"development\",\n \"production\",\n \"integrity\",\n \"extends\",\n \"variables\",\n \"secrets\",\n \"routes\",\n \"proxy\",\n \"sidebar\",\n \"shared\",\n] as const;\n\nexport const MOUNT_ALIASES: Readonly<Record<string, string>> = {\n auth: \"authenticated\",\n};\n\nexport const KNOWN_MOUNTS = [\"public\", \"authenticated\", \"admin\", \"anon\", \"organization\"] as const;\n"],"mappings":";;;AAgBA,IAAa,UAAb,cAA6B,KAAK,YAAY,SAAS,CAAC,CAKrD,CAAC;AAEJ,IAAa,cAAb,cAAiC,KAAK,YAAY,aAAa,CAAC,CAE7D,CAAC;AAuCJ,MAAa,oBAAoB;CAC/B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAa,sBAAsB;CACjC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAa,oBAAoB;CAC/B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAa,gBAAkD,EAC7D,MAAM,gBACR;AAEA,MAAa,eAAe;CAAC;CAAU;CAAiB;CAAS;CAAQ;AAAc"}