feat: add module runtime lifecycle
This commit is contained in:
@@ -1,7 +1,13 @@
|
||||
export interface ExampleModuleServer {
|
||||
readonly id: "example";
|
||||
}
|
||||
import { defineModuleRuntime } from "@ekklesia/module-sdk";
|
||||
|
||||
export const exampleModuleServer: ExampleModuleServer = {
|
||||
export const recordsCapability = Object.freeze({
|
||||
kind: "example-records",
|
||||
});
|
||||
|
||||
export default defineModuleRuntime({
|
||||
id: "example",
|
||||
};
|
||||
version: "0.1.0",
|
||||
register({ capabilities }) {
|
||||
capabilities.provide("example.records", recordsCapability);
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user