File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ export class ObjectQL implements IDataEngine {
8282 console . log ( `[ObjectQL] Registered hook for ${ event } ` ) ;
8383 }
8484
85- private async triggerHooks ( event : string , context : HookContext ) {
85+ public async triggerHooks ( event : string , context : HookContext ) {
8686 const handlers = this . hooks [ event ] || [ ] ;
8787 for ( const handler of handlers ) {
8888 // In a real system, we might want to catch errors here or allow them to bubble up
Original file line number Diff line number Diff line change @@ -29,6 +29,19 @@ export class SchemaRegistry {
2929 console . log ( `[Registry] Registered ${ type } : ${ key } ` ) ;
3030 }
3131
32+ /**
33+ * Universal Unregister Method
34+ */
35+ static unregisterItem ( type : string , name : string ) {
36+ const collection = this . metadata . get ( type ) ;
37+ if ( collection && collection . has ( name ) ) {
38+ collection . delete ( name ) ;
39+ console . log ( `[Registry] Unregistered ${ type } : ${ name } ` ) ;
40+ } else {
41+ console . warn ( `[Registry] Attempted to unregister non-existent ${ type } : ${ name } ` ) ;
42+ }
43+ }
44+
3245 /**
3346 * Universal Get Method
3447 */
You can’t perform that action at this time.
0 commit comments