mirror of
https://github.com/sern-handler/handler
synced 2026-06-06 01:16:55 +00:00
chore: remove redundant directories for single files
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
import type { Container } from 'iti';
|
||||
import type { AnyDependencies, DependencyConfiguration, MapDeps, ServerlessDependencies, WebsocketDependencies } from '../../types/handler';
|
||||
import SernEmitter from '../sernEmitter';
|
||||
import { DefaultErrorHandling, DefaultLogging, DefaultModuleManager } from '../contracts';
|
||||
import type { AnyDependencies, DependencyConfiguration, MapDeps, ServerlessDependencies, WebsocketDependencies } from '../types/handler';
|
||||
import SernEmitter from './sernEmitter';
|
||||
import { DefaultErrorHandling, DefaultLogging, DefaultModuleManager } from './contracts';
|
||||
import { Result } from 'ts-results-es';
|
||||
import { BehaviorSubject } from 'rxjs';
|
||||
import { createContainer } from 'iti';
|
||||
import { ModuleStore, SernError } from '../structures';
|
||||
import { AnyWrapper, ServerlessWrapper, WebsocketWrapper } from '../structures/wrapper';
|
||||
import { ModuleStore } from './structures';
|
||||
import { AnyWrapper, ServerlessWrapper, WebsocketWrapper } from './structures/wrapper';
|
||||
|
||||
export const containerSubject = new BehaviorSubject(defaultContainer());
|
||||
|
||||
@@ -53,7 +53,7 @@ export function composeRoot<T extends AnyDependencies>(
|
||||
const container = conf.build(currentContainer);
|
||||
//Check if the built container contains @sern/client or throw
|
||||
// a runtime exception
|
||||
Result.wrap(() => container.get('@sern/client')).expect(SernError.MissingRequired);
|
||||
//Result.wrap(() => container.get('@sern/client')).expect(SernError.MissingRequired);
|
||||
|
||||
if (!excludeLogger) {
|
||||
container.get('@sern/logger')?.info({ message: 'All dependencies loaded successfully.' });
|
||||
@@ -1 +0,0 @@
|
||||
export { useContainerRaw, single, transient } from './provider';
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Err, Ok } from 'ts-results-es';
|
||||
import { ApplicationCommandOptionType, AutocompleteInteraction } from 'discord.js';
|
||||
import type { SernAutocompleteData, SernOptionsData } from '../../types/module';
|
||||
import type { SernAutocompleteData, SernOptionsData } from '../types/module';
|
||||
|
||||
|
||||
//function wrappers for empty ok / err
|
||||
|
||||
@@ -5,3 +5,5 @@ export { SernEmitter };
|
||||
export * from './contracts';
|
||||
export * from './platform';
|
||||
export * from './plugins';
|
||||
export * from './structures/';
|
||||
export { single, transient, useContainerRaw } from './dependencies'
|
||||
|
||||
Reference in New Issue
Block a user