Introduce ModuleDatabase (a typed, restricted Drizzle query surface) and the frozen ModuleRuntimeServices boundary in @ekklesia/contracts, and thread the same services object through Core's module start/stop lifecycle hooks and apps/api's authorized module HTTP handler context. apps/api builds the facade via a new core/src/modules/database.ts view (createModuleDatabaseView) over the one existing shared PostgreSQL pool, alongside the identity and authorization views, and wires it into startApi's fixed startup order ahead of Identity/Authorization construction. Registration stays database-free; a module reaches its database only through an authorized start, stop, or HTTP handler invocation.
12 lines
393 B
TypeScript
12 lines
393 B
TypeScript
export * from "./authorization.js";
|
|
export * from "./identifiers.js";
|
|
export * from "./identity.js";
|
|
export * from "./module-database.js";
|
|
export * from "./module-http.js";
|
|
export * from "./module-lifecycle.js";
|
|
export * from "./module-manifest.js";
|
|
export * from "./module-migration.js";
|
|
export * from "./module-runtime.js";
|
|
export * from "./module-schema.js";
|
|
export * from "./versions.js";
|