From 95ec4d0e3c90667bb62ea41ac8b77f2726b14f4c Mon Sep 17 00:00:00 2001 From: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com> Date: Thu, 11 May 2023 01:33:49 -0500 Subject: [PATCH] chore: update container and init hook progress --- src/core/structures/container.ts | 9 +++++---- src/core/structures/services/error-handling.ts | 1 + src/core/structures/services/logger.ts | 1 + src/core/structures/services/module-manager.ts | 8 ++++---- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/core/structures/container.ts b/src/core/structures/container.ts index 6f20596..45fbf04 100644 --- a/src/core/structures/container.ts +++ b/src/core/structures/container.ts @@ -4,6 +4,7 @@ import { isAsyncFunction} from "node:util/types"; import * as assert from 'node:assert' import { Subject } from "rxjs"; import { ModuleStore } from "./module-store"; +import { Dependencies } from "../ioc/types"; /** * Provides all the defaults for sern to function properly. @@ -27,9 +28,9 @@ export class CoreContainer> extends Container this.callInitHooks(e)); - const unsubscriber = this.on('containerUpserted', this.callInitHooks); this.ready$.subscribe({ complete: unsubscriber }); @@ -39,15 +40,15 @@ export class CoreContainer> extends Container new Date(); diff --git a/src/core/structures/services/module-manager.ts b/src/core/structures/services/module-manager.ts index 19550ad..b7af14a 100644 --- a/src/core/structures/services/module-manager.ts +++ b/src/core/structures/services/module-manager.ts @@ -1,14 +1,14 @@ -import { ModuleManager } from "../../contracts"; +import { CoreModuleStore, ModuleManager } from "../../contracts"; import { importModule } from "../../module-loading"; import { CommandModule } from "../../types/modules"; -import { ModuleStore } from "../module-store"; /** * @internal -* @since 2.0.0 +* @since 2.0.0/* +* Version 4.0.0 will internalize this api. Please refrain from using ModuleStore! */ export class DefaultModuleManager implements ModuleManager { - constructor(private moduleStore: ModuleStore) {} + constructor(private moduleStore: CoreModuleStore) {} remove(id: string): boolean { throw new Error('Method not implemented.');