From 2ff48a909963be5121e8800d9bad015b0f15989e Mon Sep 17 00:00:00 2001 From: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com> Date: Thu, 14 Dec 2023 12:52:23 -0600 Subject: [PATCH] remove onerror for this pr --- package.json | 3 +- src/core/contracts/module-manager.ts | 7 +- src/core/contracts/module-store.ts | 3 +- src/core/ioc/container.ts | 11 +- src/core/module-loading.ts | 16 +- src/core/structures/module-store.ts | 3 +- .../structures/services/module-manager.ts | 9 +- src/handlers/dispatchers.ts | 20 +- src/handlers/event-utils.ts | 40 +-- src/handlers/user-defined-events.ts | 10 +- src/types/core-modules.ts | 1 - src/types/core.ts | 2 - yarn.lock | 336 ++++++++---------- 13 files changed, 181 insertions(+), 280 deletions(-) diff --git a/package.json b/package.json index 3d977e2b..25d51027 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,6 @@ }, "scripts": { "watch": "tsup --watch", - "clean-modules": "rimraf node_modules/ && npm install", "lint": "eslint src/**/*.ts", "format": "eslint src/**/*.ts --fix", "build:dev": "tsup --metafile", @@ -47,7 +46,7 @@ "@types/node": "^18.15.11", "@typescript-eslint/eslint-plugin": "5.58.0", "@typescript-eslint/parser": "5.59.1", - "discord.js": "14.11.0", + "discord.js": "^14.11.0", "esbuild": "^0.17.0", "eslint": "8.39.0", "prettier": "2.8.8", diff --git a/src/core/contracts/module-manager.ts b/src/core/contracts/module-manager.ts index ec9eac0b..624dac9f 100644 --- a/src/core/contracts/module-manager.ts +++ b/src/core/contracts/module-manager.ts @@ -3,7 +3,6 @@ import type { CommandModule, CommandModuleDefs, Module, - OnError, } from '../../types/core-modules'; import { CommandType } from '../structures'; @@ -12,15 +11,11 @@ interface MetadataAccess { setMetadata(m: Module, c: CommandMeta): void; } -interface OnErrorAccess { - getErrorCallback(m: Module): OnError; - setErrorCallback(m: Module, c: NonNullable): void; -} /** * @since 2.0.0 * @internal - direct access to the module manager will be removed in version 4 */ -export interface ModuleManager extends MetadataAccess, OnErrorAccess { +export interface ModuleManager extends MetadataAccess { get(id: string): string | undefined; set(id: string, path: string): void; diff --git a/src/core/contracts/module-store.ts b/src/core/contracts/module-store.ts index edcb91f9..b6157b60 100644 --- a/src/core/contracts/module-store.ts +++ b/src/core/contracts/module-store.ts @@ -1,4 +1,4 @@ -import type { CommandMeta, Module, OnError } from '../../types/core-modules'; +import type { CommandMeta, Module } from '../../types/core-modules'; /** * Represents a core module store that stores IDs mapped to file paths. @@ -6,5 +6,4 @@ import type { CommandMeta, Module, OnError } from '../../types/core-modules'; export interface CoreModuleStore { commands: Map; metadata: WeakMap; - onError: WeakMap>; } diff --git a/src/core/ioc/container.ts b/src/core/ioc/container.ts index 779c392a..73b2b40b 100644 --- a/src/core/ioc/container.ts +++ b/src/core/ioc/container.ts @@ -21,11 +21,9 @@ export class CoreContainer> extends Container) - .add({ - '@sern/errors': () => new DefaultServices.DefaultErrorHandling(), - '@sern/emitter': () => new SernEmitter(), - '@sern/store': () => new ModuleStore(), - }) + .add({ '@sern/errors': () => new DefaultServices.DefaultErrorHandling(), + '@sern/emitter': () => new SernEmitter(), + '@sern/store': () => new ModuleStore() }) .add(ctx => { return { '@sern/modules': () => @@ -36,9 +34,6 @@ export class CoreContainer> extends Container = Promise>; @@ -25,25 +25,21 @@ export type ModuleResult = Promise>; export async function importModule(absPath: string) { let fileModule = await import(absPath); - let commandModule = fileModule.default, - onError = fileModule.onError; + let commandModule = fileModule.default; assert(commandModule , `Found no export @ ${absPath}. Forgot to ignore with "!"? (!${basename(absPath)})?`); if ('default' in commandModule ) { commandModule = commandModule.default; } return Result - .wrap(() => ({ module: commandModule.getInstance(), onError })) - .unwrapOr({ module: commandModule, onError }) as T; -} -interface FileExtras { - onError : OnError + .wrap(() => ({ module: commandModule.getInstance() })) + .unwrapOr({ module: commandModule }) as T; } export async function defaultModuleLoader(absPath: string): ModuleResult { - let { onError, module } = await importModule<{ module: T } & FileExtras>(absPath); + let { module } = await importModule<{ module: T }>(absPath); assert(module, `Found an undefined module: ${absPath}`); - return { module, absPath, onError }; + return { module, absPath }; } export const fmtFileName = (fileName: string) => parse(fileName).name; diff --git a/src/core/structures/module-store.ts b/src/core/structures/module-store.ts index 0912ef4f..6e754e1a 100644 --- a/src/core/structures/module-store.ts +++ b/src/core/structures/module-store.ts @@ -1,4 +1,4 @@ -import { CommandMeta, Module, OnError } from '../../types/core-modules'; +import { CommandMeta, Module } from '../../types/core-modules'; import { CoreModuleStore } from '../contracts'; /* @@ -7,7 +7,6 @@ import { CoreModuleStore } from '../contracts'; * For interacting with modules, use the ModuleManager instead. */ export class ModuleStore implements CoreModuleStore { - onError = new WeakMap>(); metadata = new WeakMap(); commands = new Map(); } diff --git a/src/core/structures/services/module-manager.ts b/src/core/structures/services/module-manager.ts index 4265d727..63154802 100644 --- a/src/core/structures/services/module-manager.ts +++ b/src/core/structures/services/module-manager.ts @@ -1,7 +1,7 @@ import * as Id from '../../../core/id'; import { CoreModuleStore, ModuleManager } from '../../contracts'; import { Files } from '../../_internal'; -import { CommandMeta, CommandModule, CommandModuleDefs, Module, OnError } from '../../../types/core-modules'; +import { CommandMeta, CommandModule, CommandModuleDefs, Module } from '../../../types/core-modules'; import { CommandType } from '../enums'; /** * @internal @@ -12,13 +12,6 @@ export class DefaultModuleManager implements ModuleManager { constructor(private moduleStore: CoreModuleStore) {} - getErrorCallback(m: Module): OnError { - return this.moduleStore.onError.get(m); - } - setErrorCallback(m: Module, c: NonNullable): void { - this.moduleStore.onError.set(m, c); - } - getByNameCommandType(name: string, commandType: T) { const id = this.get(Id.create(name, commandType)); if (!id) { diff --git a/src/handlers/dispatchers.ts b/src/handlers/dispatchers.ts index e1114672..1ceb52ca 100644 --- a/src/handlers/dispatchers.ts +++ b/src/handlers/dispatchers.ts @@ -12,7 +12,7 @@ import { createResultResolver } from './event-utils'; import { BaseInteraction, Message } from 'discord.js'; import { CommandType, Context } from '../core'; import type { AnyFunction, Args } from '../types/utility'; -import type { CommandModule, Module, OnError, Processed } from '../types/core-modules'; +import type { CommandModule, Module, Processed } from '../types/core-modules'; //TODO: refactor dispatchers so that it implements a strategy for each different type of payload? export function dispatchMessage(module: Processed, args: [Context, Args]) { @@ -32,16 +32,16 @@ function interactionArg(interaction: T) { return [interaction] as [T]; } -function intoPayload(module: Processed, onError: AnyFunction|undefined) { +function intoPayload(module: Processed, ) { return pipe( arrayifySource, - map(args => ({ module, args, onError })), + map(args => ({ module, args, })), ); } const createResult = createResultResolver< Processed, - { module: Processed; args: unknown[], onError: AnyFunction|undefined }, + { module: Processed; args: unknown[] }, unknown[] >({ createStream: ({ module, args }) => from(module.onEvent).pipe(callPlugin(args)), @@ -52,14 +52,14 @@ const createResult = createResultResolver< * @param module * @param source */ -export function eventDispatcher(module: Processed, onError: OnError, source: unknown) { +export function eventDispatcher(module: Processed, source: unknown) { assert.ok(source instanceof EventEmitter, `${source} is not an EventEmitter`); const execute: OperatorFunction = concatMap(async args => module.execute(...args), ); return fromEvent(source, module.name).pipe( - intoPayload(module, onError?.default), + intoPayload(module), concatMap(createResult), execute, ); @@ -68,7 +68,6 @@ export function eventDispatcher(module: Processed, onError: OnError, sou export function createDispatcher(payload: { module: Processed; event: BaseInteraction; - onError: OnError }) { assert.ok( CommandType.Text !== payload.module.type, @@ -84,27 +83,22 @@ export function createDispatcher(payload: { Error(SernError.NotSupportedInteraction + ` There is no autocomplete tag for this option`), ); const { command, name, parent } = option; - const resolvedErrorHandler = parent - ? 'option:'+parent+':'+name - : 'option:'+name + return { ...payload, module: command as Processed, //autocomplete is not a true "module" warning cast! args: [payload.event], - onError: payload.onError?.[resolvedErrorHandler] }; } return { args: contextArgs(payload.event), ...payload, - onError: payload.onError?.default }; } default: return { args: interactionArg(payload.event), ...payload, - onError: payload.onError?.default } } } diff --git a/src/handlers/event-utils.ts b/src/handlers/event-utils.ts index 5c6c94ac..b039a80a 100644 --- a/src/handlers/event-utils.ts +++ b/src/handlers/event-utils.ts @@ -30,7 +30,7 @@ import { SernEmitter } from '../core'; import { Err, Ok, Result } from 'ts-results-es'; import type { AnyFunction, Awaitable } from '../types/utility'; import type { ControlPlugin } from '../types/core-plugin'; -import type { AnyModule, CommandModule, Module, OnError, Processed } from '../types/core-modules'; +import type { AnyModule, CommandModule, Module, Processed } from '../types/core-modules'; import type { ImportPayload } from '../types/core'; import assert from 'node:assert'; @@ -81,7 +81,6 @@ export function createInteractionHandler( .then(payload => Ok(createDispatcher({ module: payload.module, - onError: payload.onError, event, }))); }, @@ -104,7 +103,7 @@ export function createMessageHandler( .defaultModuleLoader>(fullPath) .then(payload => { const args = contextArgs(event, rest); - return Ok({ args, ...payload, onError: payload.onError?.default }); + return Ok({ args, ...payload }); }); }); } @@ -137,7 +136,6 @@ export function buildModules( interface ExecutePayload { module: Processed; task: () => Awaitable; - onError: AnyFunction|undefined args: unknown[] } /** @@ -155,7 +153,6 @@ export function executeModule( { module, task, - onError, args }: ExecutePayload, ) { @@ -167,29 +164,6 @@ export function executeModule( emitter.emit('module.activate', SernEmitter.success(module)); return EMPTY; } - if(onError) { - //Could be promise - const err = onError() as CommandError.Response - if(!err) { - const failure = SernEmitter.failure(module, "Handling onError: returned undefined"); - return throwError(() => failure); - } - if(err.log) { - const { type, message } = err.log; - logger?.[type]({ message }); - }; - //args[0] will be Repliable ( has reply method ), unless it is autocomplete - const apiObject = args[0]; - assert(apiObject && typeof apiObject === 'object', "Args[0] was falsy while trying to create onError"); - assert(err.body, "Body of error response cannot be empty"); - if('reply' in apiObject && typeof apiObject.reply === 'function') { - return from(apiObject.reply(err.body)) - } - if('respond' in apiObject && typeof apiObject.respond === 'function') { - return from(apiObject.respond(err.body)) - } - return EMPTY; - } return throwError(() => SernEmitter.failure(module, result.error)); }), @@ -207,7 +181,7 @@ export function executeModule( */ export function createResultResolver< T extends { execute: (...args: any[]) => any; onEvent: ControlPlugin[] }, - Args extends { module: T; onError: unknown, [key: string]: unknown }, + Args extends { module: T; [key: string]: unknown }, Output, >(config: { onStop?: (module: T) => unknown; @@ -240,9 +214,9 @@ export function callInitPlugins>(sernEmitter: Emi SernEmitter.failure(module, SernError.PluginFailure), ); }, - onNext: ({ module, onError }) => { + onNext: ({ module }) => { sernEmitter.emit('module.register', SernEmitter.success(module)); - return { module, onError: onError as OnError }; + return { module }; }, }), ); @@ -257,13 +231,11 @@ export function makeModuleExecutor< Args extends { module: M; args: unknown[]; - onError: AnyFunction|undefined }, >(onStop: (m: M) => unknown) { - const onNext = ({ args, module, onError }: Args) => ({ + const onNext = ({ args, module }: Args) => ({ task: () => module.execute(...args), module, - onError, args }); return concatMap( diff --git a/src/handlers/user-defined-events.ts b/src/handlers/user-defined-events.ts index 88daecf3..95d6b4c0 100644 --- a/src/handlers/user-defined-events.ts +++ b/src/handlers/user-defined-events.ts @@ -4,21 +4,21 @@ import { SernError } from '../core/_internal'; import { buildModules, callInitPlugins, handleCrash, eventDispatcher } from './_internal'; import { Service } from '../core/ioc'; import type { DependencyList } from '../types/ioc'; -import type { EventModule, OnError, Processed } from '../types/core-modules'; +import type { EventModule, Processed } from '../types/core-modules'; export function eventsHandler( [emitter, err, log, moduleManager, client]: DependencyList, allPaths: ObservableInput, ) { //code smell - const intoDispatcher = (e: { module: Processed, onError: OnError }) => { + const intoDispatcher = (e: { module: Processed }) => { switch (e.module.type) { case EventType.Sern: - return eventDispatcher(e.module, e.onError, emitter); + return eventDispatcher(e.module, emitter); case EventType.Discord: - return eventDispatcher(e.module, e.onError, client); + return eventDispatcher(e.module, client); case EventType.External: - return eventDispatcher(e.module, e.onError, Service(e.module.emitter)); + return eventDispatcher(e.module, Service(e.module.emitter)); default: throw Error(SernError.InvalidModuleType + ' while creating event handler'); } diff --git a/src/types/core-modules.ts b/src/types/core-modules.ts index b7055d4a..0373596f 100644 --- a/src/types/core-modules.ts +++ b/src/types/core-modules.ts @@ -19,7 +19,6 @@ import { CommandType, Context, EventType } from '../../src/core'; import { AnyCommandPlugin, AnyEventPlugin, ControlPlugin, InitPlugin } from './core-plugin'; import { Awaitable, Args, SlashOptions, SernEventsMapping, AnyFunction } from './utility'; -export type OnError = Record|undefined export interface CommandMeta { diff --git a/src/types/core.ts b/src/types/core.ts index e86d68a5..0985d60f 100644 --- a/src/types/core.ts +++ b/src/types/core.ts @@ -1,9 +1,7 @@ -import { OnError } from "./core-modules"; export interface ImportPayload { module: T; absPath: string; - onError: OnError [key: string]: unknown; } diff --git a/yarn.lock b/yarn.lock index c43a2a2f..7b09c48a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12,81 +12,82 @@ __metadata: languageName: node linkType: hard -"@discordjs/builders@npm:^1.6.3": - version: 1.6.5 - resolution: "@discordjs/builders@npm:1.6.5" - dependencies: - "@discordjs/formatters": ^0.3.2 - "@discordjs/util": ^1.0.1 - "@sapphire/shapeshift": ^3.9.2 - discord-api-types: 0.37.50 +"@discordjs/builders@npm:^1.7.0": + version: 1.7.0 + resolution: "@discordjs/builders@npm:1.7.0" + dependencies: + "@discordjs/formatters": ^0.3.3 + "@discordjs/util": ^1.0.2 + "@sapphire/shapeshift": ^3.9.3 + discord-api-types: 0.37.61 fast-deep-equal: ^3.1.3 ts-mixer: ^6.0.3 - tslib: ^2.6.1 - checksum: 9c5c4d483a79a7c2f73d661433365f2996ae3bc74f95b70a2a31a26b582b7327d45217a78dfe8e304737661731690ef6e34ade7575f63fe8ab61d70ca53b2279 + tslib: ^2.6.2 + checksum: 837e7643fc8396e4914bbbfbbfa1232ab7109c931884e8df45cd7356944633590f710a18513d30a10de1b6686ed5166df702bde0c4511fb0cbcac897edd9e56a languageName: node linkType: hard -"@discordjs/collection@npm:^1.5.1": +"@discordjs/collection@npm:1.5.3": version: 1.5.3 resolution: "@discordjs/collection@npm:1.5.3" checksum: fefed19bea0f69053d195f9d9dc8af07ca5d8c9b1064581e0aa14bda2b70e632b93c164d5ef3e4910f5442369612ff4eec8d52a700aec562510c19b223f67023 languageName: node linkType: hard -"@discordjs/formatters@npm:^0.3.1, @discordjs/formatters@npm:^0.3.2": - version: 0.3.2 - resolution: "@discordjs/formatters@npm:0.3.2" - dependencies: - discord-api-types: 0.37.50 - checksum: 653c88595fc6c25c1beedcd88b05a3f1241fef69844cc96e45f2cd34fea9ff07892c7f3b57edb4008ad59f7e62bca1b7b35400c6200b07ed42eef7189672d509 +"@discordjs/collection@npm:^2.0.0": + version: 2.0.0 + resolution: "@discordjs/collection@npm:2.0.0" + checksum: c2d05fa2b9a27bb64e93e2836bbe44c835d21f85e28cd934f6e2a81fef423ab0415968cca9d066b83347539edc8ea9afa8075d80bd62594e39f09eb881052c49 languageName: node linkType: hard -"@discordjs/rest@npm:^1.7.1": - version: 1.7.1 - resolution: "@discordjs/rest@npm:1.7.1" +"@discordjs/formatters@npm:^0.3.3": + version: 0.3.3 + resolution: "@discordjs/formatters@npm:0.3.3" dependencies: - "@discordjs/collection": ^1.5.1 - "@discordjs/util": ^0.3.0 - "@sapphire/async-queue": ^1.5.0 - "@sapphire/snowflake": ^3.4.2 - discord-api-types: ^0.37.41 - file-type: ^18.3.0 - tslib: ^2.5.0 - undici: ^5.22.0 - checksum: 397dca0f2433dcc20c98805427388dd2ab09b906c429185e5d7cfc5057ad7b2a815653482476cffb64b8e1c3628ff254d927796316956d737375be22383c88d7 + discord-api-types: 0.37.61 + checksum: a844628094a6effa8ac4e4a4ea9082d5c89e6cae6bbd18e60abd410769e5ea18f64aa2db8623aa3c8c572084368f6c2e27cc2d72af640aff5e4ee7fc42132c60 languageName: node linkType: hard -"@discordjs/util@npm:^0.3.0, @discordjs/util@npm:^0.3.1": - version: 0.3.1 - resolution: "@discordjs/util@npm:0.3.1" - checksum: afd53427bc25c84e05cd34d6daf355cab14629a5f340d33528ea18d3a1177e777584bc5847cfcb7711c7387252c34917d749a0b1a91a99d2ce572878208212df +"@discordjs/rest@npm:^2.1.0": + version: 2.2.0 + resolution: "@discordjs/rest@npm:2.2.0" + dependencies: + "@discordjs/collection": ^2.0.0 + "@discordjs/util": ^1.0.2 + "@sapphire/async-queue": ^1.5.0 + "@sapphire/snowflake": ^3.5.1 + "@vladfrangu/async_event_emitter": ^2.2.2 + discord-api-types: 0.37.61 + magic-bytes.js: ^1.5.0 + tslib: ^2.6.2 + undici: 5.27.2 + checksum: 29a14ecf3282ae3306883f1f6c870693d0ecacd080c5b66a72e31487a8070655807a80a8bf09bebea4f73e631439abc5121dfa38016ca0ccbe3f68c0f7ffc80e languageName: node linkType: hard -"@discordjs/util@npm:^1.0.1": - version: 1.0.1 - resolution: "@discordjs/util@npm:1.0.1" - checksum: b55d5284cd8306b0e77a303c41fa99dcc650babaf9ef2f02ea38b1f8ecc7218a7694128714343379dbf6b2a402a0851e00862c0d974ad07b8e980722f5139d73 +"@discordjs/util@npm:^1.0.2": + version: 1.0.2 + resolution: "@discordjs/util@npm:1.0.2" + checksum: 320d7e125981001160d413ae56e76e60447dce102010b80e3b1b16d885be765df5ae2551aa79fdc4d435a82361ed72246b44251f0c1f7a8fef7056a4481d5609 languageName: node linkType: hard -"@discordjs/ws@npm:^0.8.3": - version: 0.8.3 - resolution: "@discordjs/ws@npm:0.8.3" +"@discordjs/ws@npm:^1.0.2": + version: 1.0.2 + resolution: "@discordjs/ws@npm:1.0.2" dependencies: - "@discordjs/collection": ^1.5.1 - "@discordjs/rest": ^1.7.1 - "@discordjs/util": ^0.3.1 + "@discordjs/collection": ^2.0.0 + "@discordjs/rest": ^2.1.0 + "@discordjs/util": ^1.0.2 "@sapphire/async-queue": ^1.5.0 - "@types/ws": ^8.5.4 - "@vladfrangu/async_event_emitter": ^2.2.1 - discord-api-types: ^0.37.41 - tslib: ^2.5.0 - ws: ^8.13.0 - checksum: 28eb76ce58e31bc6be8b4d410aae448a8ad6388298f97392d1df002f3f5f1b0ab344bd4cb971aeebd0ea62558dcf1d9554cab3a21485d221f2a7af4ed0766a2e + "@types/ws": ^8.5.9 + "@vladfrangu/async_event_emitter": ^2.2.2 + discord-api-types: 0.37.61 + tslib: ^2.6.2 + ws: ^8.14.2 + checksum: 2564d3ff00d04d7638955c8c9a9f6234c50168fbe8243140bc458dc9ffa39ad5063e7d5762cdce71bb8bcf70b6353c28b8531e40f54568706898e92bc8748590 languageName: node linkType: hard @@ -447,6 +448,13 @@ __metadata: languageName: node linkType: hard +"@fastify/busboy@npm:^2.0.0": + version: 2.1.0 + resolution: "@fastify/busboy@npm:2.1.0" + checksum: 3233abd10f73e50668cb4bb278a79b7b3fadd30215ac6458299b0e5a09a29c3586ec07597aae6bd93f5cbedfcef43a8aeea51829cd28fc13850cdbcd324c28d5 + languageName: node + linkType: hard + "@humanwhocodes/config-array@npm:^0.11.8": version: 0.11.11 resolution: "@humanwhocodes/config-array@npm:0.11.11" @@ -587,23 +595,30 @@ __metadata: languageName: node linkType: hard -"@sapphire/shapeshift@npm:^3.9.2": - version: 3.9.2 - resolution: "@sapphire/shapeshift@npm:3.9.2" +"@sapphire/shapeshift@npm:^3.9.3": + version: 3.9.4 + resolution: "@sapphire/shapeshift@npm:3.9.4" dependencies: fast-deep-equal: ^3.1.3 lodash: ^4.17.21 - checksum: 0d4572281a2a43dc444f56aef7462d16fdc49cdf0e625d521bfeae4b2219e35b53b7752b4e7396e402ce3b1a21c86afc4c3c82ce1547822a6e844116bb220760 + checksum: 680a06823f899753c230d676a0c4c4b45e5575329d3598fb243dd5777c491955a62dcba94aac35770327a5a1103ddee6ceb8fa99c6b88de3cdd313fe3bafb2d3 languageName: node linkType: hard -"@sapphire/snowflake@npm:^3.4.2": +"@sapphire/snowflake@npm:3.5.1": version: 3.5.1 resolution: "@sapphire/snowflake@npm:3.5.1" checksum: 8fc025020adab1a7a1a5d2cf07704d598cc1977b50e5fcd3a5dd239f00934dc936d3a4d5ae336e71d8bf1d88ec27aa814b34de79e38ff097b7b9ba5a7977a683 languageName: node linkType: hard +"@sapphire/snowflake@npm:^3.5.1": + version: 3.5.2 + resolution: "@sapphire/snowflake@npm:3.5.2" + checksum: f88ee6b167abd83868092b71d68ad36599e922948d1b77ba694c1e13afafc46d4b07914d86ad5af6841cb4b95ceaffd940affe56576362a1c7a5d28a4344f3e4 + languageName: node + linkType: hard + "@sern/handler@workspace:.": version: 0.0.0-use.local resolution: "@sern/handler@workspace:." @@ -612,7 +627,7 @@ __metadata: "@types/node": ^18.15.11 "@typescript-eslint/eslint-plugin": 5.58.0 "@typescript-eslint/parser": 5.59.1 - discord.js: 14.11.0 + discord.js: ^14.11.0 esbuild: ^0.17.0 eslint: 8.39.0 iti: ^0.6.0 @@ -632,13 +647,6 @@ __metadata: languageName: node linkType: hard -"@tokenizer/token@npm:^0.3.0": - version: 0.3.0 - resolution: "@tokenizer/token@npm:0.3.0" - checksum: 1d575d02d2a9f0c5a4ca5180635ebd2ad59e0f18b42a65f3d04844148b49b3db35cf00b6012a1af2d59c2ab3caca59451c5689f747ba8667ee586ad717ee58e1 - languageName: node - linkType: hard - "@tootallnate/once@npm:2": version: 2.0.0 resolution: "@tootallnate/once@npm:2.0.0" @@ -690,12 +698,21 @@ __metadata: languageName: node linkType: hard -"@types/ws@npm:^8.5.4": - version: 8.5.5 - resolution: "@types/ws@npm:8.5.5" +"@types/ws@npm:8.5.9": + version: 8.5.9 + resolution: "@types/ws@npm:8.5.9" dependencies: "@types/node": "*" - checksum: d00bf8070e6938e3ccf933010921c6ce78ac3606696ce37a393b27a9a603f7bd93ea64f3c5fa295a2f743575ba9c9a9fdb904af0f5fe2229bf2adf0630386e4a + checksum: 83f436b731d2cdc49a45ced31a0a65cdd2e39c24d7b882776c26efa190dad6553e266d624c7a7089f36ad3ed471e02e729f3219282c80689b435f665df4a2b0b + languageName: node + linkType: hard + +"@types/ws@npm:^8.5.9": + version: 8.5.10 + resolution: "@types/ws@npm:8.5.10" + dependencies: + "@types/node": "*" + checksum: 3ec416ea2be24042ebd677932a462cf16d2080393d8d7d0b1b3f5d6eaa4a7387aaf0eefb99193c0bfd29444857cf2e0c3ac89899e130550dc6c14ada8a46d25e languageName: node linkType: hard @@ -918,10 +935,10 @@ __metadata: languageName: node linkType: hard -"@vladfrangu/async_event_emitter@npm:^2.2.1": - version: 2.2.2 - resolution: "@vladfrangu/async_event_emitter@npm:2.2.2" - checksum: ed948294fea1a2dc8b8f307f4061bf65e2043a946132f288702f0572a806ebe3123b8c7e522e70d2abbd3616f5d67027c9e59df9ef80b0195f7502a848a426ba +"@vladfrangu/async_event_emitter@npm:^2.2.2": + version: 2.2.4 + resolution: "@vladfrangu/async_event_emitter@npm:2.2.4" + checksum: ff65ebc4d89639adecd249e24e4f6f97b7696404f2a4461160efdff628d91de543e982727c18de62a4edada3f66381b5a3cd1d4f4f33098075d839c1b4f46979 languageName: node linkType: hard @@ -1142,15 +1159,6 @@ __metadata: languageName: node linkType: hard -"busboy@npm:^1.6.0": - version: 1.6.0 - resolution: "busboy@npm:1.6.0" - dependencies: - streamsearch: ^1.1.0 - checksum: 32801e2c0164e12106bf236291a00795c3c4e4b709ae02132883fe8478ba2ae23743b11c5735a0aae8afe65ac4b6ca4568b91f0d9fed1fdbc32ede824a73746e - languageName: node - linkType: hard - "cac@npm:^6.7.12, cac@npm:^6.7.14": version: 6.7.14 resolution: "cac@npm:6.7.14" @@ -1358,39 +1366,32 @@ __metadata: languageName: node linkType: hard -"discord-api-types@npm:0.37.50": - version: 0.37.50 - resolution: "discord-api-types@npm:0.37.50" - checksum: 08dc5145dbefda5f52b479cd42d96ac2b8110300861855e1f92cc8a0a6525a4059e32724cd5237490c286f5afd86797a86823238cd5eee016198560bb36f6d43 - languageName: node - linkType: hard - -"discord-api-types@npm:^0.37.41": - version: 0.37.56 - resolution: "discord-api-types@npm:0.37.56" - checksum: 797be690af70a846422f955d918a5713a2c8c37bea646e2120996522afbb47fc5893122c1ddcb8f57a285ace6e1fb0237d1e63105444ae52534f0570a2f87f34 +"discord-api-types@npm:0.37.61": + version: 0.37.61 + resolution: "discord-api-types@npm:0.37.61" + checksum: fe33d528e31a6de0bab2afb43d0e058957a6da6cfc4d797943fac83aeb8d07543dc0f85cad3c4e6789cbbac0c7ca49dae5ac465224b129c7acb716097fa0b081 languageName: node linkType: hard -"discord.js@npm:14.11.0": - version: 14.11.0 - resolution: "discord.js@npm:14.11.0" +"discord.js@npm:^14.11.0": + version: 14.14.1 + resolution: "discord.js@npm:14.14.1" dependencies: - "@discordjs/builders": ^1.6.3 - "@discordjs/collection": ^1.5.1 - "@discordjs/formatters": ^0.3.1 - "@discordjs/rest": ^1.7.1 - "@discordjs/util": ^0.3.1 - "@discordjs/ws": ^0.8.3 - "@sapphire/snowflake": ^3.4.2 - "@types/ws": ^8.5.4 - discord-api-types: ^0.37.41 - fast-deep-equal: ^3.1.3 - lodash.snakecase: ^4.1.1 - tslib: ^2.5.0 - undici: ^5.22.0 - ws: ^8.13.0 - checksum: 63e0a312c4ee89b03bfd16f3d58ff185d1e4cee75aa2d75de7a56d049a0bcddb89e16ae77cb02ddf0272072698d490c6a98959a8a90dd68ac6175a3ee50a191d + "@discordjs/builders": ^1.7.0 + "@discordjs/collection": 1.5.3 + "@discordjs/formatters": ^0.3.3 + "@discordjs/rest": ^2.1.0 + "@discordjs/util": ^1.0.2 + "@discordjs/ws": ^1.0.2 + "@sapphire/snowflake": 3.5.1 + "@types/ws": 8.5.9 + discord-api-types: 0.37.61 + fast-deep-equal: 3.1.3 + lodash.snakecase: 4.1.1 + tslib: 2.6.2 + undici: 5.27.2 + ws: 8.14.2 + checksum: 651e61861ae33e6ec3903e72a8bf229caae5dab73f8d409c3673430cafd9c438a0dd59983242bdcff47bab50da39f7a04da5b586c35b396c102e8e87637076e5 languageName: node linkType: hard @@ -1759,7 +1760,7 @@ __metadata: languageName: node linkType: hard -"fast-deep-equal@npm:^3.1.1, fast-deep-equal@npm:^3.1.3": +"fast-deep-equal@npm:3.1.3, fast-deep-equal@npm:^3.1.1, fast-deep-equal@npm:^3.1.3": version: 3.1.3 resolution: "fast-deep-equal@npm:3.1.3" checksum: e21a9d8d84f53493b6aa15efc9cfd53dd5b714a1f23f67fb5dc8f574af80df889b3bce25dc081887c6d25457cce704e636395333abad896ccdec03abaf1f3f9d @@ -1811,17 +1812,6 @@ __metadata: languageName: node linkType: hard -"file-type@npm:^18.3.0": - version: 18.5.0 - resolution: "file-type@npm:18.5.0" - dependencies: - readable-web-to-node-stream: ^3.0.2 - strtok3: ^7.0.0 - token-types: ^5.0.1 - checksum: d2bc81d842b110970a0ca9d90356ce4e9738c1c05596ce8931f2af334477856d92bcecd0742dc6646e13a970c0125150ad4415898688d1901d80e972d90ab1ca - languageName: node - linkType: hard - "fill-range@npm:^7.0.1": version: 7.0.1 resolution: "fill-range@npm:7.0.1" @@ -2108,13 +2098,6 @@ __metadata: languageName: node linkType: hard -"ieee754@npm:^1.2.1": - version: 1.2.1 - resolution: "ieee754@npm:1.2.1" - checksum: 5144c0c9815e54ada181d80a0b810221a253562422e7c6c3a60b1901154184f49326ec239d618c416c1c5945a2e197107aee8d986a3dd836b53dffefd99b5e7e - languageName: node - linkType: hard - "ignore@npm:^5.2.0": version: 5.2.4 resolution: "ignore@npm:5.2.4" @@ -2375,7 +2358,7 @@ __metadata: languageName: node linkType: hard -"lodash.snakecase@npm:^4.1.1": +"lodash.snakecase@npm:4.1.1": version: 4.1.1 resolution: "lodash.snakecase@npm:4.1.1" checksum: 1685ed3e83dda6eae5a4dcaee161a51cd210aabb3e1c09c57150e7dd8feda19e4ca0d27d0631eabe8d0f4eaa51e376da64e8c018ae5415417c5890d42feb72a8 @@ -2428,6 +2411,13 @@ __metadata: languageName: node linkType: hard +"magic-bytes.js@npm:^1.5.0": + version: 1.7.0 + resolution: "magic-bytes.js@npm:1.7.0" + checksum: c36cc3fa828ff27fc752998593dde7be8083b3608e0acec3b5091221fdea2d43b16c13ed368d5c406a120eb3812bcfe060d0aec5919e711ea780088c5b379050 + languageName: node + linkType: hard + "magic-string@npm:^0.30.1": version: 0.30.3 resolution: "magic-string@npm:0.30.3" @@ -2865,13 +2855,6 @@ __metadata: languageName: node linkType: hard -"peek-readable@npm:^5.0.0": - version: 5.0.0 - resolution: "peek-readable@npm:5.0.0" - checksum: bef5ceb50586eb42e14efba274ac57ffe97f0ed272df9239ce029f688f495d9bf74b2886fa27847c706a9db33acda4b7d23bbd09a2d21eb4c2a54da915117414 - languageName: node - linkType: hard - "picocolors@npm:^1.0.0": version: 1.0.0 resolution: "picocolors@npm:1.0.0" @@ -3002,15 +2985,6 @@ __metadata: languageName: node linkType: hard -"readable-web-to-node-stream@npm:^3.0.2": - version: 3.0.2 - resolution: "readable-web-to-node-stream@npm:3.0.2" - dependencies: - readable-stream: ^3.6.0 - checksum: 8c56cc62c68513425ddfa721954875b382768f83fa20e6b31e365ee00cbe7a3d6296f66f7f1107b16cd3416d33aa9f1680475376400d62a081a88f81f0ea7f9c - languageName: node - linkType: hard - "readdirp@npm:~3.6.0": version: 3.6.0 resolution: "readdirp@npm:3.6.0" @@ -3234,13 +3208,6 @@ __metadata: languageName: node linkType: hard -"streamsearch@npm:^1.1.0": - version: 1.1.0 - resolution: "streamsearch@npm:1.1.0" - checksum: 1cce16cea8405d7a233d32ca5e00a00169cc0e19fbc02aa839959985f267335d435c07f96e5e0edd0eadc6d39c98d5435fb5bbbdefc62c41834eadc5622ad942 - languageName: node - linkType: hard - "string-width-cjs@npm:string-width@^4.2.0, string-width@npm:^1.0.2 || 2 || 3 || 4, string-width@npm:^4.1.0, string-width@npm:^4.2.3": version: 4.2.3 resolution: "string-width@npm:4.2.3" @@ -3313,16 +3280,6 @@ __metadata: languageName: node linkType: hard -"strtok3@npm:^7.0.0": - version: 7.0.0 - resolution: "strtok3@npm:7.0.0" - dependencies: - "@tokenizer/token": ^0.3.0 - peek-readable: ^5.0.0 - checksum: 2ebe7ad8f2aea611dec6742cf6a42e82764892a362907f7ce493faf334501bf981ce21c828dcc300457e6d460dc9c34d644ededb3b01dcb9e37559203cf1748c - languageName: node - linkType: hard - "sucrase@npm:^3.20.3": version: 3.34.0 resolution: "sucrase@npm:3.34.0" @@ -3419,16 +3376,6 @@ __metadata: languageName: node linkType: hard -"token-types@npm:^5.0.1": - version: 5.0.1 - resolution: "token-types@npm:5.0.1" - dependencies: - "@tokenizer/token": ^0.3.0 - ieee754: ^1.2.1 - checksum: 32780123bc6ce8b6a2231d860445c994a02a720abf38df5583ea957aa6626873cd1c4dd8af62314da4cf16ede00c379a765707a3b06f04b8808c38efdae1c785 - languageName: node - linkType: hard - "tr46@npm:^1.0.1": version: 1.0.1 resolution: "tr46@npm:1.0.1" @@ -3468,6 +3415,13 @@ __metadata: languageName: node linkType: hard +"tslib@npm:2.6.2, tslib@npm:^2.1.0, tslib@npm:^2.6.2": + version: 2.6.2 + resolution: "tslib@npm:2.6.2" + checksum: 329ea56123005922f39642318e3d1f0f8265d1e7fcb92c633e0809521da75eeaca28d2cf96d7248229deb40e5c19adf408259f4b9640afd20d13aecc1430f3ad + languageName: node + linkType: hard + "tslib@npm:^1.8.1": version: 1.14.1 resolution: "tslib@npm:1.14.1" @@ -3475,13 +3429,6 @@ __metadata: languageName: node linkType: hard -"tslib@npm:^2.1.0, tslib@npm:^2.5.0, tslib@npm:^2.6.1": - version: 2.6.2 - resolution: "tslib@npm:2.6.2" - checksum: 329ea56123005922f39642318e3d1f0f8265d1e7fcb92c633e0809521da75eeaca28d2cf96d7248229deb40e5c19adf408259f4b9640afd20d13aecc1430f3ad - languageName: node - linkType: hard - "tsup@npm:^6.7.0": version: 6.7.0 resolution: "tsup@npm:6.7.0" @@ -3579,12 +3526,12 @@ __metadata: languageName: node linkType: hard -"undici@npm:^5.22.0": - version: 5.23.0 - resolution: "undici@npm:5.23.0" +"undici@npm:5.27.2": + version: 5.27.2 + resolution: "undici@npm:5.27.2" dependencies: - busboy: ^1.6.0 - checksum: 906ca4fb1d47163d2cee2ecbbc664a1d92508a2cdf1558146621109f525c983a83597910b36e6ba468240e95259be5939cea6babc99fc0c36360b16630f66784 + "@fastify/busboy": ^2.0.0 + checksum: 22bbdd763798700979986546d70072b67223189353d2a811efa9c6e44476161a0d1781ffe24115221f69a1b344b95d5926bd39a6eb760a2cd8804781cec0c5eb languageName: node linkType: hard @@ -3824,9 +3771,24 @@ __metadata: languageName: node linkType: hard -"ws@npm:^8.13.0": - version: 8.13.0 - resolution: "ws@npm:8.13.0" +"ws@npm:8.14.2": + version: 8.14.2 + resolution: "ws@npm:8.14.2" + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: ">=5.0.2" + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: 3ca0dad26e8cc6515ff392b622a1467430814c463b3368b0258e33696b1d4bed7510bc7030f7b72838b9fdeb8dbd8839cbf808367d6aae2e1d668ce741d4308b + languageName: node + linkType: hard + +"ws@npm:^8.14.2": + version: 8.15.1 + resolution: "ws@npm:8.15.1" peerDependencies: bufferutil: ^4.0.1 utf-8-validate: ">=5.0.2" @@ -3835,7 +3797,7 @@ __metadata: optional: true utf-8-validate: optional: true - checksum: 53e991bbf928faf5dc6efac9b8eb9ab6497c69feeb94f963d648b7a3530a720b19ec2e0ec037344257e05a4f35bd9ad04d9de6f289615ffb133282031b18c61c + checksum: 8c67365f6e6134278ad635d558bfce466d7ef7543a043baea333aaa430429f0af8a130c0c36e7dd78f918d68167a659ba9b5067330b77c4b279e91533395952b languageName: node linkType: hard