internal namespace

This commit is contained in:
Jacob Nguyen
2024-04-29 00:08:57 -05:00
parent e6fba9d8b5
commit 821de65b86
12 changed files with 18 additions and 22 deletions

View File

@@ -5,18 +5,14 @@
"description": "A complete, customizable, typesafe, & reactive framework for discord bots.",
"main": "./dist/index.js",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
".": {
"import": "./dist/index.js",
"require": "./dist/index.js",
"types": "./dist/index.d.ts"
"require": "./dist/index.js"
},
"./internal": {
"import": "./dist/_internal.js",
"require": "./dist/_internal.js",
"types": "./dist/_internal.d.ts"
"require": "./dist/_internal.js"
}
},
"scripts": {
@@ -25,7 +21,7 @@
"format": "eslint src/**/*.ts --fix",
"build:dev": "tsup --metafile",
"build:prod": "tsup ",
"prepare": "npm run build:prod",
"prepare": "tsc",
"pretty": "prettier --write .",
"tdd": "vitest",
"test": "vitest --run",

View File

@@ -1,6 +1,6 @@
import type { Interaction } from 'discord.js';
import { mergeMap, merge, concatMap } from 'rxjs';
import { PayloadType } from './core';
import { PayloadType } from './core/structures/enums';
import {
isAutocomplete,
isCommand,

View File

@@ -1,4 +0,0 @@
export * from './interfaces';
export * from './create-plugins';
export * from './structures';
export * from './ioc';

View File

@@ -1,5 +1,5 @@
import { Container } from 'iti';
import { Disposable } from '../';
import type { Disposable } from '../interfaces';
import * as assert from 'node:assert';
import { Subject } from 'rxjs';
import { __Services } from '../_internal';

View File

@@ -10,7 +10,7 @@ import {
} from '../core/_internal';
import { createResultResolver } from './event-utils';
import { BaseInteraction, Message } from 'discord.js';
import { CommandType, Context } from '../core';
import { CommandType, Context } from '../core/structures';
import type { Args } from '../types/utility';
import { inspect } from 'node:util'
import type { CommandModule, Module, Processed } from '../types/core-modules';

View File

@@ -22,7 +22,8 @@ import {
VoidResult,
resultPayload,
} from '../core/_internal';
import { Emitter, ErrorHandling, Logging, PayloadType } from '../core';
import { Emitter, ErrorHandling, Logging } from '../core/interfaces';
import { PayloadType } from '../core/structures/enums'
import { contextArgs, createDispatcher } from './dispatchers';
import { ObservableInput, pipe } from 'rxjs';
import { Err, Ok, Result } from 'ts-results-es';

View File

@@ -1,6 +1,6 @@
import { Interaction } from 'discord.js';
import { mergeMap, merge, concatMap } from 'rxjs';
import { PayloadType } from '../core';
import { PayloadType } from '../core/structures/enums';
import {
isAutocomplete,
isCommand,

View File

@@ -1,6 +1,6 @@
import { mergeMap, EMPTY, concatMap } from 'rxjs';
import type { Message } from 'discord.js';
import { PayloadType } from '../core';
import { PayloadType } from '../core/structures/enums';
import { sharedEventStream, SernError, filterTap, resultPayload } from '../core/_internal';
import { createMessageHandler, executeModule, makeModuleExecutor } from './event-utils';
import type { DependencyList } from '../types/ioc';

View File

@@ -1,5 +1,4 @@
export * as Sern from './sern';
export * from './core';
export type {
CommandModule,
EventModule,
@@ -51,4 +50,7 @@ export {
} from './core/modules';
export * from './core/presences'
export * from './core/interfaces'
export * from './core/create-plugins';
export * from './core/structures';
export * from './core/ioc';

View File

@@ -15,7 +15,7 @@ import type {
UserContextMenuCommandInteraction,
UserSelectMenuInteraction,
} from 'discord.js';
import { CommandType, Context, EventType } from '../../src/core';
import type { CommandType, Context, EventType } from '../core/structures';
import { AnyCommandPlugin, AnyEventPlugin, ControlPlugin, InitPlugin } from './core-plugin';
import { Awaitable, Args, SlashOptions, SernEventsMapping } from './utility';

View File

@@ -34,7 +34,8 @@ import type {
UserSelectCommand,
} from './core-modules';
import type { Args, Awaitable, Payload, SlashOptions } from './utility';
import type { CommandType, Context, EventType, PluginType } from '../core';
import type { CommandType, EventType, PluginType } from '../core/structures/enums'
import type { Context } from '../core/structures/context'
import type {
ButtonInteraction,
ChannelSelectMenuInteraction,

View File

@@ -1,5 +1,5 @@
import type { CommandInteractionOptionResolver, InteractionReplyOptions, MessageReplyOptions } from 'discord.js';
import type { PayloadType } from '../core';
import type { PayloadType } from '../core/structures/enums';
import type { AnyModule } from './core-modules';
export type Awaitable<T> = PromiseLike<T> | T;