mirror of
https://github.com/sern-handler/handler
synced 2026-06-28 02:32:15 +00:00
chore: remove bad imports
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { ModuleStore } from '../../types/core';
|
||||
import { CommandModule } from '../../types/module';
|
||||
import { importModule } from '../module-loading';
|
||||
import type { ModuleStore } from '../structures';
|
||||
/**
|
||||
* @since 2.0.0
|
||||
*/
|
||||
@@ -29,6 +29,5 @@ export class DefaultModuleManager implements ModuleManager {
|
||||
.filter(([id,]) => (Number.parseInt(id.at(-1)!) & publishable) !== 0)
|
||||
.map(([, path]) => importModule<CommandModule>(path)))
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import type { Container } from 'iti';
|
||||
import type { AnyDependencies, DependencyConfiguration, MapDeps, ServerlessDependencies, WebsocketDependencies, Wrapper } from '../types/core';
|
||||
import type { AnyDependencies, DependencyConfiguration, MapDeps, Wrapper } from '../types/core';
|
||||
import { DefaultErrorHandling, DefaultLogging, DefaultModuleManager } from './contracts';
|
||||
import { Result } from 'ts-results-es';
|
||||
import { BehaviorSubject } from 'rxjs';
|
||||
import { createContainer } from 'iti';
|
||||
import { ModuleStore, SernEmitter } from './structures';
|
||||
import { SernEmitter } from './structures';
|
||||
|
||||
export const containerSubject = new BehaviorSubject(defaultContainer());
|
||||
|
||||
@@ -81,7 +81,7 @@ export function useContainerRaw<T extends AnyDependencies>() {
|
||||
function defaultContainer() {
|
||||
return createContainer()
|
||||
.add({ '@sern/errors': () => new DefaultErrorHandling() })
|
||||
.add({ '@sern/store': () => new ModuleStore() })
|
||||
.add({ '@sern/store': () => new Map() })
|
||||
.add(ctx => {
|
||||
return {
|
||||
'@sern/modules': () => new DefaultModuleManager(ctx['@sern/store']),
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
export * from './enums';
|
||||
export * from './moduleStore';
|
||||
export * from './context'
|
||||
export * from './sernEmitter'
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
|
||||
/**
|
||||
* @since 2.0.0
|
||||
* Storing all command modules
|
||||
* This dependency is usually injected into ModuleManager
|
||||
*/
|
||||
export class ModuleStore extends Map<string, string> {
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user