mirror of
https://github.com/sern-handler/handler
synced 2026-06-17 05:12:16 +00:00
remove barrel for core/structs
This commit is contained in:
@@ -5,7 +5,6 @@ export * from './operators';
|
||||
export * as Files from './module-loading';
|
||||
export * from './functions';
|
||||
export { SernError } from './structures/enums';
|
||||
export { __Services } from './structures';
|
||||
export { useContainerRaw } from './ioc/base';
|
||||
|
||||
export type _Module = {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { CommandType, EventType, PluginType } from './structures';
|
||||
import { CommandType, EventType, PluginType } from './structures/enums';
|
||||
import type { Plugin, PluginResult, EventArgs, CommandArgs } from '../types/core-plugin';
|
||||
import type { ClientEvents } from 'discord.js';
|
||||
import { err, ok } from './functions';
|
||||
|
||||
@@ -11,7 +11,7 @@ import type {
|
||||
AutocompleteInteraction
|
||||
} from 'discord.js';
|
||||
import { ApplicationCommandOptionType, InteractionType } from 'discord.js';
|
||||
import { PayloadType, PluginType } from './structures';
|
||||
import { PayloadType, PluginType } from './structures/enums';
|
||||
import assert from 'assert';
|
||||
import type { Payload } from '../types/utility';
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ApplicationCommandType, ComponentType, Interaction, InteractionType } from 'discord.js';
|
||||
import { CommandType, EventType } from './structures';
|
||||
import { CommandType, EventType } from './structures/enums';
|
||||
|
||||
/**
|
||||
* Construct unique ID for a given interaction object.
|
||||
|
||||
@@ -2,7 +2,7 @@ import * as assert from 'assert';
|
||||
import type { CoreDependencies, DependencyConfiguration } from '../../types/ioc';
|
||||
import { CoreContainer } from './container';
|
||||
import { Result } from 'ts-results-es';
|
||||
import { __Services } from '../_internal';
|
||||
import * as __Services from '../structures/default-services';
|
||||
import { AnyFunction } from '../../types/utility';
|
||||
import type { Logging } from '../interfaces';
|
||||
import type { UnpackFunction } from 'iti';
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Container } from 'iti';
|
||||
import type { Disposable } from '../interfaces';
|
||||
import * as assert from 'node:assert';
|
||||
import { Subject } from 'rxjs';
|
||||
import { __Services } from '../_internal';
|
||||
import * as __Services from '../structures/default-services';
|
||||
import * as Hooks from './hooks';
|
||||
import { EventEmitter } from 'node:events';
|
||||
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
import { ClientEvents } from 'discord.js';
|
||||
import { EventType } from '../core/structures';
|
||||
import type { ClientEvents } from 'discord.js';
|
||||
import { EventType } from '../core/structures/enums';
|
||||
import type { AnyEventPlugin, } from '../types/core-plugin';
|
||||
import type {
|
||||
InputCommand,
|
||||
InputEvent,
|
||||
} from '../types/core-modules';
|
||||
import { _Module, partitionPlugins } from './_internal';
|
||||
import { type _Module, partitionPlugins } from './_internal';
|
||||
import type { Awaitable } from '../types/utility';
|
||||
import callsites from 'callsites';
|
||||
import * as Files from './module-loading'
|
||||
import * as Id from './id'
|
||||
|
||||
/**
|
||||
* @since 1.0.0 The wrapper function to define command modules for sern
|
||||
* @param mod
|
||||
@@ -40,7 +41,6 @@ export function commandModule(mod: InputCommand): _Module {
|
||||
export function eventModule(mod: InputEvent): _Module {
|
||||
const [onEvent, plugins] = partitionPlugins(mod.plugins);
|
||||
const initCallsite = callsites()[1].getFileName();
|
||||
console.log(initCallsite);
|
||||
if(!initCallsite) throw Error("initCallsite is null");
|
||||
const { name, absPath } = Files.parseCallsite(initCallsite);
|
||||
mod.name ??= name;
|
||||
|
||||
@@ -26,7 +26,7 @@ import type { VoidResult } from './_internal';
|
||||
* @param item
|
||||
*/
|
||||
export function filterMapTo<V>(item: () => V): OperatorFunction<boolean, V> {
|
||||
return concatMap(shouldKeep => (shouldKeep ? of(item()) : EMPTY));
|
||||
return concatMap(keep => keep ? of(item()) : EMPTY);
|
||||
}
|
||||
|
||||
interface PluginExecutable {
|
||||
|
||||
@@ -46,8 +46,7 @@ export const Presence = {
|
||||
},
|
||||
/**
|
||||
* @example
|
||||
* Presence
|
||||
* .of({
|
||||
* Presence.of({
|
||||
* activities: [
|
||||
* { name: "Chilling out" }
|
||||
* ]
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
export { CommandType, PluginType, PayloadType, EventType } from './enums';
|
||||
export * from './context';
|
||||
export * as __Services from './default-services';
|
||||
|
||||
Reference in New Issue
Block a user