feat: add module runtime lifecycle
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
import { type ModuleRuntimeDefinition, parseModuleRuntimeDefinition } from "@ekklesia/contracts";
|
||||
|
||||
export function defineModuleRuntime<const Definition extends ModuleRuntimeDefinition>(
|
||||
definition: Definition,
|
||||
): Readonly<Definition> {
|
||||
return parseModuleRuntimeDefinition(definition) as Readonly<Definition>;
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
import {
|
||||
type ModuleManifest,
|
||||
type ModuleManifestInput,
|
||||
parseModuleManifest,
|
||||
} from "@ekklesia/contracts";
|
||||
|
||||
export function defineModule(manifest: ModuleManifestInput): ModuleManifest {
|
||||
return parseModuleManifest(manifest);
|
||||
}
|
||||
@@ -1,2 +1,2 @@
|
||||
export * from "@ekklesia/contracts";
|
||||
export * from "./define-module.js";
|
||||
export * from "./define-module-runtime.js";
|
||||
|
||||
Reference in New Issue
Block a user