remove barrel for core/structs

This commit is contained in:
jacob
2024-04-30 20:23:17 -05:00
parent 5b33a9d1bb
commit d6eedb1b4d
16 changed files with 32 additions and 25 deletions

View File

@@ -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 = {

View File

@@ -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';

View File

@@ -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';

View File

@@ -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.

View File

@@ -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';

View File

@@ -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';

View File

@@ -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;

View File

@@ -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 {

View File

@@ -46,8 +46,7 @@ export const Presence = {
},
/**
* @example
* Presence
* .of({
* Presence.of({
* activities: [
* { name: "Chilling out" }
* ]

View File

@@ -1,4 +0,0 @@
export { CommandType, PluginType, PayloadType, EventType } from './enums';
export * from './context';
export * as __Services from './default-services';