diff --git a/.dependency-cruiser.js b/.dependency-cruiser.js deleted file mode 100644 index 076dad52..00000000 --- a/.dependency-cruiser.js +++ /dev/null @@ -1,450 +0,0 @@ -/** @type {import('dependency-cruiser').IConfiguration} */ -module.exports = { - forbidden: [ - /* rules from the 'recommended' preset: */ - { - name: 'no-circular', - severity: 'warn', - comment: - 'This dependency is part of a circular relationship. You might want to revise ' + - 'your solution (i.e. use dependency inversion, make sure the modules have a single responsibility) ', - from: {}, - to: { - circular: true, - }, - }, - { - name: 'no-orphans', - comment: - "This is an orphan module - it's likely not used (anymore?). Either use it or " + - "remove it. If it's logical this module is an orphan (i.e. it's a config file), " + - 'add an exception for it in your dependency-cruiser configuration. By default ' + - 'this rule does not scrutinize dot-files (e.g. .eslintrc.js), TypeScript declaration ' + - 'files (.d.ts), tsconfig.json and some of the babel and webpack configs.', - severity: 'warn', - from: { - orphan: true, - pathNot: [ - '(^|/)\\.[^/]+\\.(js|cjs|mjs|ts|json)$', // dot files - '\\.d\\.ts$', // TypeScript declaration files - '(^|/)tsconfig\\.json$', // TypeScript config - '(^|/)(babel|webpack)\\.config\\.(js|cjs|mjs|ts|json)$', // other configs - ], - }, - to: {}, - }, - { - name: 'no-deprecated-core', - comment: - 'A module depends on a node core module that has been deprecated. Find an alternative - these are ' + - "bound to exist - node doesn't deprecate lightly.", - severity: 'warn', - from: {}, - to: { - dependencyTypes: ['core'], - path: [ - '^(v8/tools/codemap)$', - '^(v8/tools/consarray)$', - '^(v8/tools/csvparser)$', - '^(v8/tools/logreader)$', - '^(v8/tools/profile_view)$', - '^(v8/tools/profile)$', - '^(v8/tools/SourceMap)$', - '^(v8/tools/splaytree)$', - '^(v8/tools/tickprocessor-driver)$', - '^(v8/tools/tickprocessor)$', - '^(node-inspect/lib/_inspect)$', - '^(node-inspect/lib/internal/inspect_client)$', - '^(node-inspect/lib/internal/inspect_repl)$', - '^(async_hooks)$', - '^(punycode)$', - '^(domain)$', - '^(constants)$', - '^(sys)$', - '^(_linklist)$', - '^(_stream_wrap)$', - ], - }, - }, - { - name: 'not-to-deprecated', - comment: - 'This module uses a (version of an) npm module that has been deprecated. Either upgrade to a later ' + - 'version of that module, or find an alternative. Deprecated modules are a security risk.', - severity: 'warn', - from: {}, - to: { - dependencyTypes: ['deprecated'], - }, - }, - { - name: 'no-non-package-json', - severity: 'error', - comment: - "This module depends on an npm package that isn't in the 'dependencies' section of your package.json. " + - "That's problematic as the package either (1) won't be available on live (2 - worse) will be " + - 'available on live with an non-guaranteed version. Fix it by adding the package to the dependencies ' + - 'in your package.json.', - from: {}, - to: { - dependencyTypes: ['npm-no-pkg', 'npm-unknown'], - }, - }, - { - name: 'not-to-unresolvable', - comment: - "This module depends on a module that cannot be found ('resolved to disk'). If it's an npm " + - 'module: add it to your package.json. In all other cases you likely already know what to do.', - severity: 'error', - from: {}, - to: { - couldNotResolve: true, - }, - }, - { - name: 'no-duplicate-dep-types', - comment: - "Likely this module depends on an external ('npm') package that occurs more than once " + - 'in your package.json i.e. bot as a devDependencies and in dependencies. This will cause ' + - 'maintenance problems later on.', - severity: 'warn', - from: {}, - to: { - moreThanOneDependencyType: true, - // as it's pretty common to have a type import be a type only import - // _and_ (e.g.) a devDependency - don't consider type-only dependency - // types for this rule - dependencyTypesNot: ['type-only'], - }, - }, - - /* rules you might want to tweak for your specific situation: */ - { - name: 'not-to-test', - comment: - "This module depends on code within a folder that should only contain tests. As tests don't " + - "implement functionality this is odd. Either you're writing a test outside the test folder " + - "or there's something in the test folder that isn't a test.", - severity: 'error', - from: { - pathNot: '^(test)', - }, - to: { - path: '^(test)', - }, - }, - { - name: 'not-to-spec', - comment: - 'This module depends on a spec (test) file. The sole responsibility of a spec file is to test code. ' + - "If there's something in a spec that's of use to other modules, it doesn't have that single " + - 'responsibility anymore. Factor it out into (e.g.) a separate utility/ helper or a mock.', - severity: 'error', - from: {}, - to: { - path: '\\.(spec|test)\\.(js|mjs|cjs|ts|ls|coffee|litcoffee|coffee\\.md)$', - }, - }, - { - name: 'not-to-dev-dep', - severity: 'error', - comment: - "This module depends on an npm package from the 'devDependencies' section of your " + - 'package.json. It looks like something that ships to production, though. To prevent problems ' + - "with npm packages that aren't there on production declare it (only!) in the 'dependencies'" + - 'section of your package.json. If this module is development only - add it to the ' + - 'from.pathNot re of the not-to-dev-dep rule in the dependency-cruiser configuration', - from: { - path: '^(src)', - pathNot: '\\.(spec|test)\\.(js|mjs|cjs|ts|ls|coffee|litcoffee|coffee\\.md)$', - }, - to: { - dependencyTypes: ['npm-dev'], - }, - }, - { - name: 'optional-deps-used', - severity: 'info', - comment: - 'This module depends on an npm package that is declared as an optional dependency ' + - "in your package.json. As this makes sense in limited situations only, it's flagged here. " + - "If you're using an optional dependency here by design - add an exception to your" + - 'dependency-cruiser configuration.', - from: {}, - to: { - dependencyTypes: ['npm-optional'], - }, - }, - { - name: 'peer-deps-used', - comment: - 'This module depends on an npm package that is declared as a peer dependency ' + - 'in your package.json. This makes sense if your package is e.g. a plugin, but in ' + - 'other cases - maybe not so much. If the use of a peer dependency is intentional ' + - 'add an exception to your dependency-cruiser configuration.', - severity: 'warn', - from: {}, - to: { - dependencyTypes: ['npm-peer'], - }, - }, - ], - options: { - /* conditions specifying which files not to follow further when encountered: - - path: a regular expression to match - - dependencyTypes: see https://github.com/sverweij/dependency-cruiser/blob/main/doc/rules-reference.md#dependencytypes-and-dependencytypesnot - for a complete list - */ - doNotFollow: { - path: 'node_modules', - }, - - /* conditions specifying which dependencies to exclude - - path: a regular expression to match - - dynamic: a boolean indicating whether to ignore dynamic (true) or static (false) dependencies. - leave out if you want to exclude neither (recommended!) - */ - // exclude : { - // path: '', - // dynamic: true - // }, - - /* pattern specifying which files to include (regular expression) - dependency-cruiser will skip everything not matching this pattern - */ - // includeOnly : '', - - /* dependency-cruiser will include modules matching against the focus - regular expression in its output, as well as their neighbours (direct - dependencies and dependents) - */ - // focus : '', - - /* list of module systems to cruise */ - // moduleSystems: ['amd', 'cjs', 'es6', 'tsd'], - - /* prefix for links in html and svg output (e.g. 'https://github.com/you/yourrepo/blob/develop/' - to open it on your online repo or `vscode://file/${process.cwd()}/` to - open it in visual studio code), - */ - // prefix: '', - - /* false (the default): ignore dependencies that only exist before typescript-to-javascript compilation - true: also detect dependencies that only exist before typescript-to-javascript compilation - "specify": for each dependency identify whether it only exists before compilation or also after - */ - tsPreCompilationDeps: true, - - /* - list of extensions to scan that aren't javascript or compile-to-javascript. - Empty by default. Only put extensions in here that you want to take into - account that are _not_ parsable. - */ - // extraExtensionsToScan: [".json", ".jpg", ".png", ".svg", ".webp"], - - /* if true combines the package.jsons found from the module up to the base - folder the cruise is initiated from. Useful for how (some) mono-repos - manage dependencies & dependency definitions. - */ - // combinedDependencies: false, - - /* if true leave symlinks untouched, otherwise use the realpath */ - // preserveSymlinks: false, - - /* TypeScript project file ('tsconfig.json') to use for - (1) compilation and - (2) resolution (e.g. with the paths property) - - The (optional) fileName attribute specifies which file to take (relative to - dependency-cruiser's current working directory). When not provided - defaults to './tsconfig.json'. - */ - tsConfig: { - fileName: 'tsconfig.json', - }, - - /* Webpack configuration to use to get resolve options from. - - The (optional) fileName attribute specifies which file to take (relative - to dependency-cruiser's current working directory. When not provided defaults - to './webpack.conf.js'. - - The (optional) `env` and `arguments` attributes contain the parameters to be passed if - your webpack config is a function and takes them (see webpack documentation - for details) - */ - // webpackConfig: { - // fileName: './webpack.config.js', - // env: {}, - // arguments: {}, - // }, - - /* Babel config ('.babelrc', '.babelrc.json', '.babelrc.json5', ...) to use - for compilation (and whatever other naughty things babel plugins do to - source code). This feature is well tested and usable, but might change - behavior a bit over time (e.g. more precise results for used module - systems) without dependency-cruiser getting a major version bump. - */ - // babelConfig: { - // fileName: './.babelrc' - // }, - - /* List of strings you have in use in addition to cjs/ es6 requires - & imports to declare module dependencies. Use this e.g. if you've - re-declared require, use a require-wrapper or use window.require as - a hack. - */ - // exoticRequireStrings: [], - /* options to pass on to enhanced-resolve, the package dependency-cruiser - uses to resolve module references to disk. You can set most of these - options in a webpack.conf.js - this section is here for those - projects that don't have a separate webpack config file. - - Note: settings in webpack.conf.js override the ones specified here. - */ - enhancedResolveOptions: { - /* List of strings to consider as 'exports' fields in package.json. Use - ['exports'] when you use packages that use such a field and your environment - supports it (e.g. node ^12.19 || >=14.7 or recent versions of webpack). - - If you have an `exportsFields` attribute in your webpack config, that one - will have precedence over the one specified here. - */ - exportsFields: ['exports'], - /* List of conditions to check for in the exports field. e.g. use ['imports'] - if you're only interested in exposed es6 modules, ['require'] for commonjs, - or all conditions at once `(['import', 'require', 'node', 'default']`) - if anything goes for you. Only works when the 'exportsFields' array is - non-empty. - - If you have a 'conditionNames' attribute in your webpack config, that one will - have precedence over the one specified here. - */ - conditionNames: ['import', 'require', 'node', 'default'], - /* - The extensions, by default are the same as the ones dependency-cruiser - can access (run `npx depcruise --info` to see which ones that are in - _your_ environment. If that list is larger than what you need (e.g. - it contains .js, .jsx, .ts, .tsx, .cts, .mts - but you don't use - TypeScript you can pass just the extensions you actually use (e.g. - [".js", ".jsx"]). This can speed up the most expensive step in - dependency cruising (module resolution) quite a bit. - */ - // extensions: [".js", ".jsx", ".ts", ".tsx", ".d.ts"], - /* - If your TypeScript project makes use of types specified in 'types' - fields in package.jsons of external dependencies, specify "types" - in addition to "main" in here, so enhanced-resolve (the resolver - dependency-cruiser uses) knows to also look there. You can also do - this if you're not sure, but still use TypeScript. In a future version - of dependency-cruiser this will likely become the default. - */ - mainFields: ['main', 'types'], - }, - reporterOptions: { - dot: { - /* pattern of modules that can be consolidated in the detailed - graphical dependency graph. The default pattern in this configuration - collapses everything in node_modules to one folder deep so you see - the external modules, but not the innards your app depends upon. - */ - collapsePattern: 'node_modules/(@[^/]+/[^/]+|[^/]+)', - - /* Options to tweak the appearance of your graph.See - https://github.com/sverweij/dependency-cruiser/blob/main/doc/options-reference.md#reporteroptions - for details and some examples. If you don't specify a theme - don't worry - dependency-cruiser will fall back to the default one. - */ - // theme: { - // graph: { - // /* use splines: "ortho" for straight lines. Be aware though - // graphviz might take a long time calculating ortho(gonal) - // routings. - // */ - // splines: "true" - // }, - // modules: [ - // { - // criteria: { matchesFocus: true }, - // attributes: { - // fillcolor: "lime", - // penwidth: 2, - // }, - // }, - // { - // criteria: { matchesFocus: false }, - // attributes: { - // fillcolor: "lightgrey", - // }, - // }, - // { - // criteria: { matchesReaches: true }, - // attributes: { - // fillcolor: "lime", - // penwidth: 2, - // }, - // }, - // { - // criteria: { matchesReaches: false }, - // attributes: { - // fillcolor: "lightgrey", - // }, - // }, - // { - // criteria: { source: "^src/model" }, - // attributes: { fillcolor: "#ccccff" } - // }, - // { - // criteria: { source: "^src/view" }, - // attributes: { fillcolor: "#ccffcc" } - // }, - // ], - // dependencies: [ - // { - // criteria: { "rules[0].severity": "error" }, - // attributes: { fontcolor: "red", color: "red" } - // }, - // { - // criteria: { "rules[0].severity": "warn" }, - // attributes: { fontcolor: "orange", color: "orange" } - // }, - // { - // criteria: { "rules[0].severity": "info" }, - // attributes: { fontcolor: "blue", color: "blue" } - // }, - // { - // criteria: { resolved: "^src/model" }, - // attributes: { color: "#0000ff77" } - // }, - // { - // criteria: { resolved: "^src/view" }, - // attributes: { color: "#00770077" } - // } - // ] - // } - }, - archi: { - /* pattern of modules that can be consolidated in the high level - graphical dependency graph. If you use the high level graphical - dependency graph reporter (`archi`) you probably want to tweak - this collapsePattern to your situation. - */ - collapsePattern: - '^(packages|src|lib|app|bin|test(s?)|spec(s?))/[^/]+|node_modules/(@[^/]+/[^/]+|[^/]+)', - - /* Options to tweak the appearance of your graph.See - https://github.com/sverweij/dependency-cruiser/blob/main/doc/options-reference.md#reporteroptions - for details and some examples. If you don't specify a theme - for 'archi' dependency-cruiser will use the one specified in the - dot section (see above), if any, and otherwise use the default one. - */ - // theme: { - // }, - }, - text: { - highlightFocused: true, - }, - }, - }, -}; -// generated: dependency-cruiser@13.0.5 on 2023-07-08T03:48:00.632Z diff --git a/package.json b/package.json index 32b2a5bf..cb8c3b66 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@sern/handler", "packageManager": "yarn@3.5.0", - "version": "3.1.1", + "version": "3.2.0", "description": "A complete, customizable, typesafe, & reactive framework for discord bots.", "main": "./dist/index.js", "module": "./dist/index.mjs", @@ -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,8 +46,7 @@ "@types/node": "^18.15.11", "@typescript-eslint/eslint-plugin": "5.58.0", "@typescript-eslint/parser": "5.59.1", - "dependency-cruiser": "^13.0.5", - "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/renovate.json b/renovate.json index 0eb93067..accfdf16 100644 --- a/renovate.json +++ b/renovate.json @@ -1,5 +1,9 @@ { - "extends": ["config:base", "helpers:pinGitHubActionDigests", "group:allNonMajor"], + "extends": [ + "config:base", + "helpers:pinGitHubActionDigests", + "group:allNonMajor" + ], "major": { "dependencyDashboardApproval": true, "reviewers": ["EvolutionX-10", "jacoobes", "Murtatrxx"] diff --git a/src/core/contracts/error-handling.ts b/src/core/contracts/error-handling.ts index 79d7fe79..7d17a563 100644 --- a/src/core/contracts/error-handling.ts +++ b/src/core/contracts/error-handling.ts @@ -1,21 +1,18 @@ +import type { CommandModule,Processed, EventModule } from "../../types/core-modules"; + /** * @since 2.0.0 */ export interface ErrorHandling { - /** - * Number of times the process should throw an error until crashing and exiting - */ - keepAlive: number; - /** * @deprecated * Version 4 will remove this method */ crash(err: Error): never; /** - * A function that is called on every crash. Updates keepAlive. - * If keepAlive is 0, the process crashes. + * A function that is called on every throw. * @param error */ updateAlive(error: Error): void; + } diff --git a/src/core/contracts/module-manager.ts b/src/core/contracts/module-manager.ts index 711582e1..624dac9f 100644 --- a/src/core/contracts/module-manager.ts +++ b/src/core/contracts/module-manager.ts @@ -6,13 +6,18 @@ import type { } from '../../types/core-modules'; import { CommandType } from '../structures'; +interface MetadataAccess { + getMetadata(m: Module): CommandMeta | undefined; + setMetadata(m: Module, c: CommandMeta): void; +} + /** * @since 2.0.0 + * @internal - direct access to the module manager will be removed in version 4 */ -export interface ModuleManager { +export interface ModuleManager extends MetadataAccess { get(id: string): string | undefined; - getMetadata(m: Module): CommandMeta | undefined; - setMetadata(m: Module, c: CommandMeta): void; + set(id: string, path: string): void; getPublishableCommands(): Promise; getByNameCommandType( diff --git a/src/core/functions.ts b/src/core/functions.ts index d9b88613..f3eacb35 100644 --- a/src/core/functions.ts +++ b/src/core/functions.ts @@ -36,7 +36,7 @@ export function partitionPlugins( export function treeSearch( iAutocomplete: AutocompleteInteraction, options: SernOptionsData[] | undefined, -): SernAutocompleteData | undefined { +): SernAutocompleteData & { parent?: string } | undefined { if (options === undefined) return undefined; //clone to prevent mutation of original command module const _options = options.map(a => ({ ...a })); @@ -68,11 +68,11 @@ export function treeSearch( const parentAndOptionMatches = subcommands.has(parent) && cur.name === choice.name; if (parentAndOptionMatches) { - return cur; + return { ...cur, parent }; } } else { if (cur.name === choice.name) { - return cur; + return { ...cur, parent: undefined }; } } } diff --git a/src/core/ioc/base.ts b/src/core/ioc/base.ts index ca82206d..9a696689 100644 --- a/src/core/ioc/base.ts +++ b/src/core/ioc/base.ts @@ -2,7 +2,9 @@ import * as assert from 'assert'; import { composeRoot, useContainer } from './dependency-injection'; import type { DependencyConfiguration } from '../../types/ioc'; import { CoreContainer } from './container'; - +import { Result } from 'ts-results-es' +import { DefaultServices } from '../_internal'; +import { AnyFunction } from '../../types/utility'; //SIDE EFFECT: GLOBAL DI let containerSubject: CoreContainer>; @@ -20,17 +22,83 @@ export function useContainerRaw() { return containerSubject; } -/** - * @since 2.0.0 - * @param conf a configuration for creating your project dependencies - */ -export async function makeDependencies( - conf: DependencyConfiguration, -) { +const dependencyBuilder = (container: any, excluded: string[]) => { + type Insertable = + | ((container: CoreContainer) => unknown ) + | Record + return { + /** + * Insert a dependency into your container. + * Supply the correct key and dependency + */ + add(key: keyof Dependencies, v: Insertable) { + Result + .wrap(() => container.add({ [key]: v})) + .expect("Failed to add " + key); + }, + /** + * Exclude any dependencies from being added. + * Warning: this could lead to bad errors if not used correctly + */ + exclude(...keys: (keyof Dependencies)[]) { + keys.forEach(key => excluded.push(key)); + }, + /** + * @param key the key of the dependency + * @param v The dependency to swap out. + * Swap out a preexisting dependency. + */ + swap(key: keyof Dependencies, v: Insertable) { + Result + .wrap(() => container.upsert({ [key]: v })) + .expect("Failed to update " + key); + }, + /** + * @param key the key of the dependency + * @param cleanup Provide cleanup for the dependency at key. First parameter is the dependency itself + * @example + * ```ts + * addDisposer('dbConnection', (dbConnection) => dbConnection.end()) + * ``` + * Swap out a preexisting dependency. + */ + addDisposer(key: keyof Dependencies, cleanup: AnyFunction) { + Result + .wrap(() => container.addDisposer({ [key] : cleanup })) + .expect("Failed to addDisposer for" + key); + } + }; +}; + +type CallbackBuilder = (c: ReturnType) => any + +type ValidDependencyConfig = + | CallbackBuilder + | DependencyConfiguration; + +export const insertLogger = (containerSubject: CoreContainer) => { + containerSubject + .upsert({'@sern/logger': () => new DefaultServices.DefaultLogging}); +} +export async function makeDependencies +(conf: ValidDependencyConfig) { //Until there are more optional dependencies, just check if the logger exists //SIDE EFFECT containerSubject = new CoreContainer(); - await composeRoot(containerSubject, conf); + if(typeof conf === 'function') { + const excluded: string[] = []; + conf(dependencyBuilder(containerSubject, excluded)); + if(!excluded.includes('@sern/logger')) { + assert.ok(!containerSubject.getTokens()['@sern/logger']) + insertLogger(containerSubject); + } + containerSubject.ready(); + } else { + composeRoot(containerSubject, conf); + } return useContainer(); } + + + diff --git a/src/core/ioc/container.ts b/src/core/ioc/container.ts index 0302afc1..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': () => @@ -34,9 +32,7 @@ export class CoreContainer> extends Container> extends Container - 'dispose' in value - ? [key] - : []); + 'dispose' in value ? [key] : []); for(const key of otherDisposables) { this.addDisposer({ [key]: (dep: Disposable) => dep.dispose() } as never); diff --git a/src/core/ioc/dependency-injection.ts b/src/core/ioc/dependency-injection.ts index c8046267..126efe3b 100644 --- a/src/core/ioc/dependency-injection.ts +++ b/src/core/ioc/dependency-injection.ts @@ -1,6 +1,5 @@ import type { CoreDependencies, DependencyConfiguration, IntoDependencies } from '../../types/ioc'; -import { DefaultServices } from '../_internal'; -import { useContainerRaw } from './base'; +import { insertLogger, useContainerRaw } from './base'; import { CoreContainer } from './container'; /** @@ -53,16 +52,14 @@ export function Services(...keys: [...T] * Finally, update the containerSubject with the new container state * @param conf */ -export async function composeRoot( +export function composeRoot( container: CoreContainer>, conf: DependencyConfiguration, ) { //container should have no client or logger yet. const hasLogger = conf.exclude?.has('@sern/logger'); if (!hasLogger) { - container.upsert({ - '@sern/logger': () => new DefaultServices.DefaultLogging(), - }); + insertLogger(container); } //Build the container based on the callback provided by the user conf.build(container as CoreContainer>); diff --git a/src/core/module-loading.ts b/src/core/module-loading.ts index 94f635aa..4b9e08d9 100644 --- a/src/core/module-loading.ts +++ b/src/core/module-loading.ts @@ -23,19 +23,21 @@ export type ModuleResult = Promise>; * export default commandModule({}) */ export async function importModule(absPath: string) { - let module = await import(absPath).then(esm => esm.default); + let fileModule = await import(absPath); - assert(module, `Found no export for module at ${absPath}. Forgot to ignore with "!"? (!${basename(absPath)})?`); - if ('default' in module) { - module = module.default; + 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.getInstance()) - .unwrapOr(module) as T; + .wrap(() => ({ module: commandModule.getInstance() })) + .unwrapOr({ module: commandModule }) as T; } export async function defaultModuleLoader(absPath: string): ModuleResult { - let module = await importModule(absPath); + let { module } = await importModule<{ module: T }>(absPath); assert(module, `Found an undefined module: ${absPath}`); return { module, absPath }; } @@ -51,7 +53,8 @@ export const fmtFileName = (fileName: string) => parse(fileName).name; export function buildModuleStream( input: ObservableInput, ): Observable> { - return from(input).pipe(mergeMap(defaultModuleLoader)); + return from(input) + .pipe(mergeMap(defaultModuleLoader)); } export const getFullPathTree = (dir: string) => readPaths(resolve(dir)); diff --git a/src/core/structures/command-error.ts b/src/core/structures/command-error.ts new file mode 100644 index 00000000..81bf92e9 --- /dev/null +++ b/src/core/structures/command-error.ts @@ -0,0 +1,41 @@ +import type { ReplyOptions } from "../../types/utility"; +import type { Logging } from "../contracts"; + +export interface Response { + type: 'fail' | 'continue'; + body?: ReplyOptions; + log?: { type: keyof Logging; message: unknown } +} + +export const of = () => { + const payload = { + type: 'fail', + body: undefined, + log : undefined + } as Record + + return { + /** + * @param {'fail' | 'continue'} p a status to determine if the error will + * terminate your application or continue. Warning and + */ + status: (p: 'fail' | 'continue') => { + payload.type = p; + return payload; + }, + /** + * @param {keyof Logging} type Determine to log to logger[type]. + * @param {T} message the message to log + * + * Log this error with the logger. + */ + log: (type: keyof Logging, message: T) => { + payload.log = { type, message }; + return payload; + }, + reply: (bodyContent: ReplyOptions) => { + payload.body = bodyContent; + return payload; + } + }; +} diff --git a/src/core/structures/context.ts b/src/core/structures/context.ts index d933fdd1..32cd036d 100644 --- a/src/core/structures/context.ts +++ b/src/core/structures/context.ts @@ -11,8 +11,8 @@ import { import { CoreContext } from '../structures/core-context'; import { Result, Ok, Err } from 'ts-results-es'; import * as assert from 'assert'; +import { ReplyOptions } from '../../types/utility'; -type ReplyOptions = string | Omit | MessageReplyOptions; /** * @since 1.0.0 @@ -103,9 +103,9 @@ export class Context extends CoreContext { public async reply(content: ReplyOptions) { return safeUnwrap( this.ctx - .map(m => m.reply(content as string | MessageReplyOptions)) + .map(m => m.reply(content as MessageReplyOptions)) .mapErr(i => - i.reply(content as string | InteractionReplyOptions).then(() => i.fetchReply()), + i.reply(content as InteractionReplyOptions).then(() => i.fetchReply()), ), ); } diff --git a/src/core/structures/index.ts b/src/core/structures/index.ts index e3c08dcb..2a0ea034 100644 --- a/src/core/structures/index.ts +++ b/src/core/structures/index.ts @@ -3,3 +3,4 @@ export * from './context'; export * from './sern-emitter'; export * from './services'; export * from './module-store'; +export * as CommandError from './command-error'; diff --git a/src/core/structures/services/error-handling.ts b/src/core/structures/services/error-handling.ts index f5ef972a..3f55b161 100644 --- a/src/core/structures/services/error-handling.ts +++ b/src/core/structures/services/error-handling.ts @@ -3,18 +3,18 @@ import { ErrorHandling } from '../../contracts'; /** * @internal * @since 2.0.0 - * Version 4.0.0 will internalize this api. Please refrain from using ModuleStore! + * Version 4.0.0 will internalize this api. Please refrain from using the defaults! */ export class DefaultErrorHandling implements ErrorHandling { crash(err: Error): never { throw err; } - keepAlive = 5; + #keepAlive = 5; updateAlive(err: Error) { - this.keepAlive--; - if (this.keepAlive === 0) { + this.#keepAlive--; + if (this.#keepAlive === 0) { throw err; } } diff --git a/src/core/structures/services/module-manager.ts b/src/core/structures/services/module-manager.ts index 74f1aa7b..63154802 100644 --- a/src/core/structures/services/module-manager.ts +++ b/src/core/structures/services/module-manager.ts @@ -11,6 +11,7 @@ import { CommandType } from '../enums'; export class DefaultModuleManager implements ModuleManager { constructor(private moduleStore: CoreModuleStore) {} + 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 2b8cd296..cc1525e8 100644 --- a/src/handlers/dispatchers.ts +++ b/src/handlers/dispatchers.ts @@ -9,23 +9,16 @@ import { SernError, } from '../core/_internal'; import { createResultResolver } from './event-utils'; -import { AutocompleteInteraction, BaseInteraction, Message } from 'discord.js'; +import { BaseInteraction, Message } from 'discord.js'; import { CommandType, Context } from '../core'; -import type { Args } from '../types/utility'; -import type { BothCommand, CommandModule, Module, Processed } from '../types/core-modules'; +import type { AnyFunction, Args } from '../types/utility'; +import type { CommandModule, Module, Processed } from '../types/core-modules'; -function dispatchAutocomplete(payload: { - module: Processed; - event: AutocompleteInteraction; -}) { - const option = treeSearch(payload.event, payload.module.options); - assert.ok( - option, - Error(SernError.NotSupportedInteraction + ` There is no autocomplete tag for this option`), - ); +//TODO: refactor dispatchers so that it implements a strategy for each different type of payload? +export function dispatchMessage(module: Processed, args: [Context, Args]) { return { - module: option.command as Processed, //autocomplete is not a true "module" warning cast! - args: [payload.event], + module, + args, }; } @@ -36,16 +29,16 @@ export function contextArgs(wrappable: Message | BaseInteraction, messageArgs?: } -function intoPayload(module: Processed) { +function intoPayload(module: Processed, ) { return pipe( arrayifySource, - map(args => ({ module, args })), + map(args => ({ module, args, })), ); } const createResult = createResultResolver< Processed, - { module: Processed; args: unknown[] }, + { module: Processed; args: unknown[] }, unknown[] >({ createStream: ({ module, args }) => from(module.onEvent).pipe(callPlugin(args)), @@ -56,7 +49,7 @@ const createResult = createResultResolver< * @param module * @param source */ -export function eventDispatcher(module: Processed, 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 => @@ -81,13 +74,18 @@ export function createDispatcher(payload: { case CommandType.Slash: case CommandType.Both: { if (isAutocomplete(payload.event)) { - /** - * Autocomplete is a special case that - * must be handled separately, since it's - * too different from regular command modules - * CAST SAFETY: payload is already guaranteed to be a slash command or both command - */ - return dispatchAutocomplete(payload as never); + const option = treeSearch(payload.event, payload.module.options); + assert.ok( + option, + Error(SernError.NotSupportedInteraction + ` There is no autocomplete tag for this option`), + ); + const { command, name, parent } = option; + + return { + ...payload, + module: command as Processed, //autocomplete is not a true "module" warning cast! + args: [payload.event], + }; } return { module: payload.module, diff --git a/src/handlers/event-utils.ts b/src/handlers/event-utils.ts index 3329b1c7..5af439a9 100644 --- a/src/handlers/event-utils.ts +++ b/src/handlers/event-utils.ts @@ -28,7 +28,7 @@ import { contextArgs, createDispatcher } from './dispatchers'; import { ObservableInput, pipe } from 'rxjs'; import { SernEmitter } from '../core'; import { Err, Ok, Result } from 'ts-results-es'; -import type { Awaitable } from '../types/utility'; +import type { AnyFunction, Awaitable } from '../types/utility'; import type { ControlPlugin } from '../types/core-plugin'; import type { AnyModule, CommandModule, Module, Processed } from '../types/core-modules'; import type { ImportPayload } from '../types/core'; @@ -78,7 +78,10 @@ export function createInteractionHandler( return Files .defaultModuleLoader>(fullPath) .then(payload => - Ok(createDispatcher({ module: payload.module, event }))); + Ok(createDispatcher({ + module: payload.module, + event, + }))); }, ); } @@ -93,13 +96,14 @@ export function createMessageHandler( const fullPath = mg.get(`${prefix}_A1`); if(!fullPath) { - return Err('Possibly undefined behavior: could not find a static id to resolve ') + return Err('Possibly undefined behavior: could not find a static id to resolve') } return Files .defaultModuleLoader>(fullPath) - .then(({ module })=> { + .then((payload)=> { const args = contextArgs(event, rest); - return Ok({ module, args }); + return Ok({ args, ...payload }); + }); }); } @@ -130,6 +134,12 @@ export function buildModules( .pipe(assignDefaults(moduleManager)); } + +interface ExecutePayload { + module: Processed; + task: () => Awaitable; + args: unknown[] +} /** * Wraps the task in a Result as a try / catch. * if the task is ok, an event is emitted and the stream becomes empty @@ -140,13 +150,13 @@ export function buildModules( */ export function executeModule( emitter: Emitter, + logger: Logging|undefined, + errHandler: ErrorHandling, { module, task, - }: { - module: Processed; - task: () => Awaitable; - }, + args + }: ExecutePayload, ) { return of(module).pipe( //converting the task into a promise so rxjs can resolve the Awaitable properly @@ -155,9 +165,9 @@ export function executeModule( if (result.isOk()) { emitter.emit('module.activate', SernEmitter.success(module)); return EMPTY; - } else { - return throwError(() => SernEmitter.failure(module, result.error)); - } + } + return throwError(() => SernEmitter.failure(module, result.error)); + }), ); } @@ -208,7 +218,7 @@ export function callInitPlugins>(sernEmitter: Emi }, onNext: ({ module }) => { sernEmitter.emit('module.register', SernEmitter.success(module)); - return module; + return { module }; }, }), ); @@ -220,16 +230,22 @@ export function callInitPlugins>(sernEmitter: Emi */ export function makeModuleExecutor< M extends Processed, - Args extends { module: M; args: unknown[] }, + Args extends { + module: M; + args: unknown[]; + }, >(onStop: (m: M) => unknown) { const onNext = ({ args, module }: Args) => ({ task: () => module.execute(...args), module, + args }); return concatMap( createResultResolver({ onStop, - createStream: ({ args, module }) => from(module.onEvent).pipe(callPlugin(args)), + createStream: ({ args, module }) => + from(module.onEvent) + .pipe(callPlugin(args)), onNext, }), ); diff --git a/src/handlers/interaction-event.ts b/src/handlers/interaction-event.ts index 2e150dab..a39e2807 100644 --- a/src/handlers/interaction-event.ts +++ b/src/handlers/interaction-event.ts @@ -13,7 +13,7 @@ import { import { createInteractionHandler, executeModule, makeModuleExecutor } from './_internal'; import type { DependencyList } from '../types/ioc'; -export function interactionHandler([emitter, , , modules, client]: DependencyList) { +export function interactionHandler([emitter, err, log, modules, client]: DependencyList) { const interactionStream$ = sharedEventStream(client, 'interactionCreate'); const handle = createInteractionHandler(interactionStream$, modules); @@ -28,6 +28,6 @@ export function interactionHandler([emitter, , , modules, client]: DependencyLis filterTap(e => emitter.emit('warning', SernEmitter.warning(e))), makeModuleExecutor(module => emitter.emit('module.activate', SernEmitter.failure(module, SernError.PluginFailure))), - mergeMap(payload => executeModule(emitter, payload)), + mergeMap(payload => executeModule(emitter, log, err, payload)), ); } diff --git a/src/handlers/message-event.ts b/src/handlers/message-event.ts index aa7a05b2..bb548758 100644 --- a/src/handlers/message-event.ts +++ b/src/handlers/message-event.ts @@ -23,7 +23,7 @@ function hasPrefix(prefix: string, content: string) { } export function messageHandler( - [emitter, , log, modules, client]: DependencyList, + [emitter, err, log, modules, client]: DependencyList, defaultPrefix: string | undefined, ) { if (!defaultPrefix) { @@ -42,6 +42,6 @@ export function messageHandler( makeModuleExecutor(module => { emitter.emit('module.activate', SernEmitter.failure(module, SernError.PluginFailure)); }), - mergeMap(payload => executeModule(emitter, payload)), + mergeMap(payload => executeModule(emitter, log, err, payload)), ); } diff --git a/src/handlers/ready-event.ts b/src/handlers/ready-event.ts index b9da8f9a..017a9673 100644 --- a/src/handlers/ready-event.ts +++ b/src/handlers/ready-event.ts @@ -17,10 +17,9 @@ export function startReadyEvent( return concat(ready$, buildModules(allPaths, moduleManager)) .pipe(callInitPlugins(sEmitter)) - .subscribe(module => { - register(moduleManager, module).expect( - SernError.InvalidModuleType + ' ' + util.inspect(module), - ); + .subscribe(({ module }) => { + register(moduleManager, module) + .expect(SernError.InvalidModuleType + ' ' + util.inspect(module)); }); } diff --git a/src/handlers/user-defined-events.ts b/src/handlers/user-defined-events.ts index ff5d23af..95d6b4c0 100644 --- a/src/handlers/user-defined-events.ts +++ b/src/handlers/user-defined-events.ts @@ -4,32 +4,33 @@ 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 { CommandModule, EventModule, 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: Processed) => { - switch (e.type) { + const intoDispatcher = (e: { module: Processed }) => { + switch (e.module.type) { case EventType.Sern: - return eventDispatcher(e, emitter); + return eventDispatcher(e.module, emitter); case EventType.Discord: - return eventDispatcher(e, client); + return eventDispatcher(e.module, client); case EventType.External: - return eventDispatcher(e, Service(e.emitter)); + return eventDispatcher(e.module, Service(e.module.emitter)); default: throw Error(SernError.InvalidModuleType + ' while creating event handler'); } }; buildModules(allPaths, moduleManager) - .pipe(callInitPlugins(emitter), - map(intoDispatcher), - /** - * Where all events are turned on - */ - mergeAll(), - handleCrash(err, log)) + .pipe( + callInitPlugins(emitter), + map(intoDispatcher), + /** + * Where all events are turned on + */ + mergeAll(), + handleCrash(err, log)) .subscribe(); } diff --git a/src/types/core-modules.ts b/src/types/core-modules.ts index 3d77e1c4..e53320a4 100644 --- a/src/types/core-modules.ts +++ b/src/types/core-modules.ts @@ -19,6 +19,8 @@ import { CommandType, Context, EventType } from '../../src/core'; import { AnyCommandPlugin, AnyEventPlugin, ControlPlugin, InitPlugin } from './core-plugin'; import { Awaitable, Args, SlashOptions, SernEventsMapping } from './utility'; + + export interface CommandMeta { fullPath: string; id: string; diff --git a/src/types/core.ts b/src/types/core.ts index 7473aa8b..0985d60f 100644 --- a/src/types/core.ts +++ b/src/types/core.ts @@ -1,3 +1,4 @@ + export interface ImportPayload { module: T; absPath: string; diff --git a/src/types/utility.ts b/src/types/utility.ts index 4328e07c..a2535875 100644 --- a/src/types/utility.ts +++ b/src/types/utility.ts @@ -1,6 +1,6 @@ -import { CommandInteractionOptionResolver } from 'discord.js'; -import { PayloadType } from '../core'; -import { AnyModule } from './core-modules'; +import type { CommandInteractionOptionResolver, InteractionReplyOptions, MessageReplyOptions } from 'discord.js'; +import type { PayloadType } from '../core'; +import type { AnyModule } from './core-modules'; export type Awaitable = PromiseLike | T; @@ -27,3 +27,7 @@ export type Payload = | { type: PayloadType.Success; module: AnyModule } | { type: PayloadType.Failure; module?: AnyModule; reason: string | Error } | { type: PayloadType.Warning; reason: string }; + + + +export type ReplyOptions = string | Omit | MessageReplyOptions; diff --git a/test/handlers/dispatchers.test.ts b/test/handlers/dispatchers.test.ts index f3ee96ef..0f100d25 100644 --- a/test/handlers/dispatchers.test.ts +++ b/test/handlers/dispatchers.test.ts @@ -29,14 +29,14 @@ describe('eventDispatcher standard', () => { }); it('should throw', () => { - expect(() => eventDispatcher(m, 'not event emitter')).toThrowError(); + expect(() => eventDispatcher(m, 'not event emitter')).toThrowError(); }); it("Shouldn't throw", () => { expect(() => eventDispatcher(m, ee)).not.toThrowError(); }); it('Should be called once', () => { - const s = eventDispatcher(m, ee); + const s = eventDispatcher(m, ee); s.subscribe(); ee.emit(m.name, faker.string.alpha()); diff --git a/tsconfig.json b/tsconfig.json index f7535a7b..bbb5bc28 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,8 +3,6 @@ "rootDir": "src", "strict": true, "esModuleInterop": true, - "noImplicitAny": true, - "experimentalDecorators": true, "strictNullChecks": true, "moduleResolution": "node", "skipLibCheck": true, diff --git a/yarn.lock b/yarn.lock index f05feba2..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,8 +627,7 @@ __metadata: "@types/node": ^18.15.11 "@typescript-eslint/eslint-plugin": 5.58.0 "@typescript-eslint/parser": 5.59.1 - dependency-cruiser: ^13.0.5 - discord.js: 14.11.0 + discord.js: ^14.11.0 esbuild: ^0.17.0 eslint: 8.39.0 iti: ^0.6.0 @@ -633,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" @@ -691,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: 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: d00bf8070e6938e3ccf933010921c6ce78ac3606696ce37a393b27a9a603f7bd93ea64f3c5fa295a2f743575ba9c9a9fdb904af0f5fe2229bf2adf0630386e4a + checksum: 3ec416ea2be24042ebd677932a462cf16d2080393d8d7d0b1b3f5d6eaa4a7387aaf0eefb99193c0bfd29444857cf2e0c3ac89899e130550dc6c14ada8a46d25e languageName: node linkType: hard @@ -919,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 @@ -933,14 +949,7 @@ __metadata: languageName: node linkType: hard -"acorn-jsx-walk@npm:2.0.0": - version: 2.0.0 - resolution: "acorn-jsx-walk@npm:2.0.0" - checksum: 49417eab5bb595c1cdc96d64205eda7cc58f32d655068826ba96ec7a4dc4f957d55ca9e62a299d0dbdeae71c6dc518be1378c21d3b720e741812f55f2a13c937 - languageName: node - linkType: hard - -"acorn-jsx@npm:5.3.2, acorn-jsx@npm:^5.3.2": +"acorn-jsx@npm:^5.3.2": version: 5.3.2 resolution: "acorn-jsx@npm:5.3.2" peerDependencies: @@ -949,23 +958,14 @@ __metadata: languageName: node linkType: hard -"acorn-loose@npm:8.3.0": - version: 8.3.0 - resolution: "acorn-loose@npm:8.3.0" - dependencies: - acorn: ^8.5.0 - checksum: 3418a20bded1e74a20950dee8289fb87808c21a50d4065e4ec48230668ea77f4238be1dd1ee30b2116f469e496bcdaf937ccb86d469482e028052f8eec804c07 - languageName: node - linkType: hard - -"acorn-walk@npm:8.2.0, acorn-walk@npm:^8.2.0": +"acorn-walk@npm:^8.2.0": version: 8.2.0 resolution: "acorn-walk@npm:8.2.0" checksum: 1715e76c01dd7b2d4ca472f9c58968516a4899378a63ad5b6c2d668bba8da21a71976c14ec5f5b75f887b6317c4ae0b897ab141c831d741dc76024d8745f1ad1 languageName: node linkType: hard -"acorn@npm:8.10.0, acorn@npm:^8.10.0, acorn@npm:^8.5.0, acorn@npm:^8.9.0": +"acorn@npm:^8.10.0, acorn@npm:^8.9.0": version: 8.10.0 resolution: "acorn@npm:8.10.0" bin: @@ -1002,18 +1002,6 @@ __metadata: languageName: node linkType: hard -"ajv@npm:8.12.0": - version: 8.12.0 - resolution: "ajv@npm:8.12.0" - dependencies: - fast-deep-equal: ^3.1.1 - json-schema-traverse: ^1.0.0 - require-from-string: ^2.0.2 - uri-js: ^4.2.2 - checksum: 4dc13714e316e67537c8b31bc063f99a1d9d9a497eb4bbd55191ac0dcd5e4985bbb71570352ad6f1e76684fb6d790928f96ba3b2d4fd6e10024be9612fe3f001 - languageName: node - linkType: hard - "ajv@npm:^6.10.0, ajv@npm:^6.12.4": version: 6.12.6 resolution: "ajv@npm:6.12.6" @@ -1171,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" @@ -1229,14 +1208,7 @@ __metadata: languageName: node linkType: hard -"chalk@npm:5.3.0": - version: 5.3.0 - resolution: "chalk@npm:5.3.0" - checksum: 623922e077b7d1e9dedaea6f8b9e9352921f8ae3afe739132e0e00c275971bdd331268183b2628cf4ab1727c45ea1f28d7e24ac23ce1db1eb653c414ca8a5a80 - languageName: node - linkType: hard - -"chalk@npm:^4.0.0, chalk@npm:^4.1.0": +"chalk@npm:^4.0.0": version: 4.1.2 resolution: "chalk@npm:4.1.2" dependencies: @@ -1311,13 +1283,6 @@ __metadata: languageName: node linkType: hard -"commander@npm:11.0.0": - version: 11.0.0 - resolution: "commander@npm:11.0.0" - checksum: 6621954e1e1d078b4991c1f5bbd9439ad37aa7768d6ab4842de1dbd4d222c8a27e1b8e62108b3a92988614af45031d5bb2a2aaa92951f4d0c934d1a1ac564bb4 - languageName: node - linkType: hard - "commander@npm:^4.0.0": version: 4.1.1 resolution: "commander@npm:4.1.1" @@ -1385,47 +1350,6 @@ __metadata: languageName: node linkType: hard -"dependency-cruiser@npm:^13.0.5": - version: 13.1.5 - resolution: "dependency-cruiser@npm:13.1.5" - dependencies: - acorn: 8.10.0 - acorn-jsx: 5.3.2 - acorn-jsx-walk: 2.0.0 - acorn-loose: 8.3.0 - acorn-walk: 8.2.0 - ajv: 8.12.0 - chalk: 5.3.0 - commander: 11.0.0 - enhanced-resolve: 5.15.0 - figures: 5.0.0 - glob: 10.3.3 - ignore: 5.2.4 - indent-string: 5.0.0 - interpret: ^3.1.1 - is-installed-globally: 0.4.0 - json5: 2.2.3 - lodash: 4.17.21 - prompts: 2.4.2 - rechoir: ^0.8.0 - safe-regex: 2.1.1 - semver: ^7.5.4 - semver-try-require: 6.2.3 - teamcity-service-messages: 0.1.14 - tsconfig-paths-webpack-plugin: 4.1.0 - watskeburt: 1.0.1 - wrap-ansi: 8.1.0 - bin: - depcruise: bin/dependency-cruise.mjs - depcruise-baseline: bin/depcruise-baseline.mjs - depcruise-fmt: bin/depcruise-fmt.mjs - depcruise-wrap-stream-in-html: bin/wrap-stream-in-html.mjs - dependency-cruise: bin/dependency-cruise.mjs - dependency-cruiser: bin/dependency-cruise.mjs - checksum: a1f2b1dbc97e6fecffbcf2637535231c7df9fbf62520ec0ca9becd3a6c8d9827973af1386a9af77896445fa30608e601b060d649f7ab06b9159b8b5ae9ed2ce6 - languageName: node - linkType: hard - "diff-sequences@npm:^29.4.3": version: 29.6.3 resolution: "diff-sequences@npm:29.6.3" @@ -1442,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 @@ -1517,16 +1434,6 @@ __metadata: languageName: node linkType: hard -"enhanced-resolve@npm:5.15.0, enhanced-resolve@npm:^5.7.0": - version: 5.15.0 - resolution: "enhanced-resolve@npm:5.15.0" - dependencies: - graceful-fs: ^4.2.4 - tapable: ^2.2.0 - checksum: fbd8cdc9263be71cc737aa8a7d6c57b43d6aa38f6cc75dde6fcd3598a130cc465f979d2f4d01bb3bf475acb43817749c79f8eef9be048683602ca91ab52e4f11 - languageName: node - linkType: hard - "env-paths@npm:^2.2.0": version: 2.2.1 resolution: "env-paths@npm:2.2.1" @@ -1702,13 +1609,6 @@ __metadata: languageName: node linkType: hard -"escape-string-regexp@npm:^5.0.0": - version: 5.0.0 - resolution: "escape-string-regexp@npm:5.0.0" - checksum: 20daabe197f3cb198ec28546deebcf24b3dbb1a5a269184381b3116d12f0532e06007f4bc8da25669d6a7f8efb68db0758df4cd981f57bc5b57f521a3e12c59e - languageName: node - linkType: hard - "eslint-scope@npm:^5.1.1": version: 5.1.1 resolution: "eslint-scope@npm:5.1.1" @@ -1860,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 @@ -1903,16 +1803,6 @@ __metadata: languageName: node linkType: hard -"figures@npm:5.0.0": - version: 5.0.0 - resolution: "figures@npm:5.0.0" - dependencies: - escape-string-regexp: ^5.0.0 - is-unicode-supported: ^1.2.0 - checksum: e6e8b6d1df2f554d4effae4a5ceff5d796f9449f6d4e912d74dab7d5f25916ecda6c305b9084833157d56485a0c78b37164430ddc5675bcee1330e346710669e - languageName: node - linkType: hard - "file-entry-cache@npm:^6.0.1": version: 6.0.1 resolution: "file-entry-cache@npm:6.0.1" @@ -1922,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" @@ -2024,13 +1903,6 @@ __metadata: languageName: node linkType: hard -"function-bind@npm:^1.1.1": - version: 1.1.1 - resolution: "function-bind@npm:1.1.1" - checksum: b32fbaebb3f8ec4969f033073b43f5c8befbb58f1a79e12f1d7490358150359ebd92f49e72ff0144f65f2c48ea2a605bff2d07965f548f6474fd8efd95bf361a - languageName: node - linkType: hard - "gauge@npm:^4.0.3": version: 4.0.4 resolution: "gauge@npm:4.0.4" @@ -2079,21 +1951,6 @@ __metadata: languageName: node linkType: hard -"glob@npm:10.3.3": - version: 10.3.3 - resolution: "glob@npm:10.3.3" - dependencies: - foreground-child: ^3.1.0 - jackspeak: ^2.0.3 - minimatch: ^9.0.1 - minipass: ^5.0.0 || ^6.0.2 || ^7.0.0 - path-scurry: ^1.10.1 - bin: - glob: dist/cjs/src/bin.js - checksum: 29190d3291f422da0cb40b77a72fc8d2c51a36524e99b8bf412548b7676a6627489528b57250429612b6eec2e6fe7826d328451d3e694a9d15e575389308ec53 - languageName: node - linkType: hard - "glob@npm:7.1.6": version: 7.1.6 resolution: "glob@npm:7.1.6" @@ -2137,15 +1994,6 @@ __metadata: languageName: node linkType: hard -"global-dirs@npm:^3.0.0": - version: 3.0.1 - resolution: "global-dirs@npm:3.0.1" - dependencies: - ini: 2.0.0 - checksum: 70147b80261601fd40ac02a104581432325c1c47329706acd773f3a6ce99bb36d1d996038c85ccacd482ad22258ec233c586b6a91535b1a116b89663d49d6438 - languageName: node - linkType: hard - "globals@npm:^13.19.0": version: 13.21.0 resolution: "globals@npm:13.21.0" @@ -2169,7 +2017,7 @@ __metadata: languageName: node linkType: hard -"graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6": +"graceful-fs@npm:^4.2.6": version: 4.2.11 resolution: "graceful-fs@npm:4.2.11" checksum: ac85f94da92d8eb6b7f5a8b20ce65e43d66761c55ce85ac96df6865308390da45a8d3f0296dd3a663de65d30ba497bd46c696cc1e248c72b13d6d567138a4fc7 @@ -2197,15 +2045,6 @@ __metadata: languageName: node linkType: hard -"has@npm:^1.0.3": - version: 1.0.3 - resolution: "has@npm:1.0.3" - dependencies: - function-bind: ^1.1.1 - checksum: b9ad53d53be4af90ce5d1c38331e712522417d017d5ef1ebd0507e07c2fbad8686fffb8e12ddecd4c39ca9b9b47431afbb975b8abf7f3c3b82c98e9aad052792 - languageName: node - linkType: hard - "http-cache-semantics@npm:^4.1.1": version: 4.1.1 resolution: "http-cache-semantics@npm:4.1.1" @@ -2259,14 +2098,7 @@ __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.4, ignore@npm:^5.2.0": +"ignore@npm:^5.2.0": version: 5.2.4 resolution: "ignore@npm:5.2.4" checksum: 3d4c309c6006e2621659311783eaea7ebcd41fe4ca1d78c91c473157ad6666a57a2df790fe0d07a12300d9aac2888204d7be8d59f9aaf665b1c7fcdb432517ef @@ -2290,13 +2122,6 @@ __metadata: languageName: node linkType: hard -"indent-string@npm:5.0.0": - version: 5.0.0 - resolution: "indent-string@npm:5.0.0" - checksum: e466c27b6373440e6d84fbc19e750219ce25865cb82d578e41a6053d727e5520dc5725217d6eb1cc76005a1bb1696a0f106d84ce7ebda3033b963a38583fb3b3 - languageName: node - linkType: hard - "indent-string@npm:^4.0.0": version: 4.0.0 resolution: "indent-string@npm:4.0.0" @@ -2321,20 +2146,6 @@ __metadata: languageName: node linkType: hard -"ini@npm:2.0.0": - version: 2.0.0 - resolution: "ini@npm:2.0.0" - checksum: e7aadc5fb2e4aefc666d74ee2160c073995a4061556b1b5b4241ecb19ad609243b9cceafe91bae49c219519394bbd31512516cb22a3b1ca6e66d869e0447e84e - languageName: node - linkType: hard - -"interpret@npm:^3.1.1": - version: 3.1.1 - resolution: "interpret@npm:3.1.1" - checksum: 35cebcf48c7351130437596d9ab8c8fe131ce4038da4561e6d665f25640e0034702a031cf7e3a5cea60ac7ac548bf17465e0571ede126f3d3a6933152171ac82 - languageName: node - linkType: hard - "ip@npm:^2.0.0": version: 2.0.0 resolution: "ip@npm:2.0.0" @@ -2351,15 +2162,6 @@ __metadata: languageName: node linkType: hard -"is-core-module@npm:^2.13.0": - version: 2.13.0 - resolution: "is-core-module@npm:2.13.0" - dependencies: - has: ^1.0.3 - checksum: 053ab101fb390bfeb2333360fd131387bed54e476b26860dc7f5a700bbf34a0ec4454f7c8c4d43e8a0030957e4b3db6e16d35e1890ea6fb654c833095e040355 - languageName: node - linkType: hard - "is-extglob@npm:^2.1.1": version: 2.1.1 resolution: "is-extglob@npm:2.1.1" @@ -2383,16 +2185,6 @@ __metadata: languageName: node linkType: hard -"is-installed-globally@npm:0.4.0": - version: 0.4.0 - resolution: "is-installed-globally@npm:0.4.0" - dependencies: - global-dirs: ^3.0.0 - is-path-inside: ^3.0.2 - checksum: 3359840d5982d22e9b350034237b2cda2a12bac1b48a721912e1ab8e0631dd07d45a2797a120b7b87552759a65ba03e819f1bd63f2d7ab8657ec0b44ee0bf399 - languageName: node - linkType: hard - "is-lambda@npm:^1.0.1": version: 1.0.1 resolution: "is-lambda@npm:1.0.1" @@ -2407,7 +2199,7 @@ __metadata: languageName: node linkType: hard -"is-path-inside@npm:^3.0.2, is-path-inside@npm:^3.0.3": +"is-path-inside@npm:^3.0.3": version: 3.0.3 resolution: "is-path-inside@npm:3.0.3" checksum: abd50f06186a052b349c15e55b182326f1936c89a78bf6c8f2b707412517c097ce04bc49a0ca221787bc44e1049f51f09a2ffb63d22899051988d3a618ba13e9 @@ -2421,13 +2213,6 @@ __metadata: languageName: node linkType: hard -"is-unicode-supported@npm:^1.2.0": - version: 1.3.0 - resolution: "is-unicode-supported@npm:1.3.0" - checksum: 20a1fc161afafaf49243551a5ac33b6c4cf0bbcce369fcd8f2951fbdd000c30698ce320de3ee6830497310a8f41880f8066d440aa3eb0a853e2aa4836dd89abc - languageName: node - linkType: hard - "isexe@npm:^2.0.0": version: 2.0.0 resolution: "isexe@npm:2.0.0" @@ -2496,13 +2281,6 @@ __metadata: languageName: node linkType: hard -"json-schema-traverse@npm:^1.0.0": - version: 1.0.0 - resolution: "json-schema-traverse@npm:1.0.0" - checksum: 02f2f466cdb0362558b2f1fd5e15cce82ef55d60cd7f8fa828cf35ba74330f8d767fcae5c5c2adb7851fa811766c694b9405810879bc4e1ddd78a7c0e03658ad - languageName: node - linkType: hard - "json-stable-stringify-without-jsonify@npm:^1.0.1": version: 1.0.1 resolution: "json-stable-stringify-without-jsonify@npm:1.0.1" @@ -2510,15 +2288,6 @@ __metadata: languageName: node linkType: hard -"json5@npm:2.2.3, json5@npm:^2.2.2": - version: 2.2.3 - resolution: "json5@npm:2.2.3" - bin: - json5: lib/cli.js - checksum: 2a7436a93393830bce797d4626275152e37e877b265e94ca69c99e3d20c2b9dab021279146a39cdb700e71b2dd32a4cebd1514cd57cee102b1af906ce5040349 - languageName: node - linkType: hard - "jsonc-parser@npm:^3.2.0": version: 3.2.0 resolution: "jsonc-parser@npm:3.2.0" @@ -2535,13 +2304,6 @@ __metadata: languageName: node linkType: hard -"kleur@npm:^3.0.3": - version: 3.0.3 - resolution: "kleur@npm:3.0.3" - checksum: df82cd1e172f957bae9c536286265a5cdbd5eeca487cb0a3b2a7b41ef959fc61f8e7c0e9aeea9c114ccf2c166b6a8dd45a46fd619c1c569d210ecd2765ad5169 - languageName: node - linkType: hard - "levn@npm:^0.4.1": version: 0.4.1 resolution: "levn@npm:0.4.1" @@ -2596,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 @@ -2610,7 +2372,7 @@ __metadata: languageName: node linkType: hard -"lodash@npm:4.17.21, lodash@npm:^4.17.21": +"lodash@npm:^4.17.21": version: 4.17.21 resolution: "lodash@npm:4.17.21" checksum: eb835a2e51d381e561e508ce932ea50a8e5a68f4ebdd771ea240d3048244a8d13658acbd502cd4829768c56f2e16bdd4340b9ea141297d472517b83868e677f7 @@ -2649,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" @@ -2730,13 +2499,6 @@ __metadata: languageName: node linkType: hard -"minimist@npm:^1.2.6": - version: 1.2.8 - resolution: "minimist@npm:1.2.8" - checksum: 75a6d645fb122dad29c06a7597bddea977258957ed88d7a6df59b5cd3fe4a527e253e9bbf2e783e4b73657f9098b96a5fe96ab8a113655d4109108577ecf85b0 - languageName: node - linkType: hard - "minipass-collect@npm:^1.0.2": version: 1.0.2 resolution: "minipass-collect@npm:1.0.2" @@ -3062,13 +2824,6 @@ __metadata: languageName: node linkType: hard -"path-parse@npm:^1.0.7": - version: 1.0.7 - resolution: "path-parse@npm:1.0.7" - checksum: 49abf3d81115642938a8700ec580da6e830dde670be21893c62f4e10bd7dd4c3742ddc603fe24f898cba7eb0c6bc1777f8d9ac14185d34540c6d4d80cd9cae8a - languageName: node - linkType: hard - "path-scurry@npm:^1.10.1": version: 1.10.1 resolution: "path-scurry@npm:1.10.1" @@ -3100,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" @@ -3205,16 +2953,6 @@ __metadata: languageName: node linkType: hard -"prompts@npm:2.4.2": - version: 2.4.2 - resolution: "prompts@npm:2.4.2" - dependencies: - kleur: ^3.0.3 - sisteransi: ^1.0.5 - checksum: d8fd1fe63820be2412c13bfc5d0a01909acc1f0367e32396962e737cb2fc52d004f3302475d5ce7d18a1e8a79985f93ff04ee03007d091029c3f9104bffc007d - languageName: node - linkType: hard - "punycode@npm:^2.1.0": version: 2.3.0 resolution: "punycode@npm:2.3.0" @@ -3247,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" @@ -3265,31 +2994,6 @@ __metadata: languageName: node linkType: hard -"rechoir@npm:^0.8.0": - version: 0.8.0 - resolution: "rechoir@npm:0.8.0" - dependencies: - resolve: ^1.20.0 - checksum: ad3caed8afdefbc33fbc30e6d22b86c35b3d51c2005546f4e79bcc03c074df804b3640ad18945e6bef9ed12caedc035655ec1082f64a5e94c849ff939dc0a788 - languageName: node - linkType: hard - -"regexp-tree@npm:~0.1.1": - version: 0.1.27 - resolution: "regexp-tree@npm:0.1.27" - bin: - regexp-tree: bin/regexp-tree - checksum: 129aebb34dae22d6694ab2ac328be3f99105143737528ab072ef624d599afecbcfae1f5c96a166fa9e5f64fa1ecf30b411c4691e7924c3e11bbaf1712c260c54 - languageName: node - linkType: hard - -"require-from-string@npm:^2.0.2": - version: 2.0.2 - resolution: "require-from-string@npm:2.0.2" - checksum: a03ef6895445f33a4015300c426699bc66b2b044ba7b670aa238610381b56d3f07c686251740d575e22f4c87531ba662d06937508f0f3c0f1ddc04db3130560b - languageName: node - linkType: hard - "resolve-from@npm:^4.0.0": version: 4.0.0 resolution: "resolve-from@npm:4.0.0" @@ -3304,32 +3008,6 @@ __metadata: languageName: node linkType: hard -"resolve@npm:^1.20.0": - version: 1.22.4 - resolution: "resolve@npm:1.22.4" - dependencies: - is-core-module: ^2.13.0 - path-parse: ^1.0.7 - supports-preserve-symlinks-flag: ^1.0.0 - bin: - resolve: bin/resolve - checksum: 23f25174c2736ce24c6d918910e0d1f89b6b38fefa07a995dff864acd7863d59a7f049e691f93b4b2ee29696303390d921552b6d1b841ed4a8101f517e1d0124 - languageName: node - linkType: hard - -"resolve@patch:resolve@^1.20.0#~builtin": - version: 1.22.4 - resolution: "resolve@patch:resolve@npm%3A1.22.4#~builtin::version=1.22.4&hash=c3c19d" - dependencies: - is-core-module: ^2.13.0 - path-parse: ^1.0.7 - supports-preserve-symlinks-flag: ^1.0.0 - bin: - resolve: bin/resolve - checksum: c45f2545fdc4d21883861b032789e20aa67a2f2692f68da320cc84d5724cd02f2923766c5354b3210897e88f1a7b3d6d2c7c22faeead8eed7078e4c783a444bc - languageName: node - linkType: hard - "retry@npm:^0.12.0": version: 0.12.0 resolution: "retry@npm:0.12.0" @@ -3394,15 +3072,6 @@ __metadata: languageName: node linkType: hard -"safe-regex@npm:2.1.1": - version: 2.1.1 - resolution: "safe-regex@npm:2.1.1" - dependencies: - regexp-tree: ~0.1.1 - checksum: 5d734e2193c63ef0cb00f60c0244e0f8a30ecb31923633cd34636808d6a7c4c206d650017953ae1db8bc33967c2f06af33488dea6f038f4e38212beb7bed77b4 - languageName: node - linkType: hard - "safer-buffer@npm:>= 2.1.2 < 3.0.0": version: 2.1.2 resolution: "safer-buffer@npm:2.1.2" @@ -3410,16 +3079,7 @@ __metadata: languageName: node linkType: hard -"semver-try-require@npm:6.2.3": - version: 6.2.3 - resolution: "semver-try-require@npm:6.2.3" - dependencies: - semver: ^7.5.3 - checksum: 891ef070f0817342f84692c2ed015f04ab49758722a51261f634d13a426bda899c89dce3b6bb7593b33c5b47283d2bf273fe0649807813fe814466e1017af523 - languageName: node - linkType: hard - -"semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.5.3, semver@npm:^7.5.4": +"semver@npm:^7.3.5, semver@npm:^7.3.7": version: 7.5.4 resolution: "semver@npm:7.5.4" dependencies: @@ -3474,13 +3134,6 @@ __metadata: languageName: node linkType: hard -"sisteransi@npm:^1.0.5": - version: 1.0.5 - resolution: "sisteransi@npm:1.0.5" - checksum: aba6438f46d2bfcef94cf112c835ab395172c75f67453fe05c340c770d3c402363018ae1ab4172a1026a90c47eaccf3af7b6ff6fa749a680c2929bd7fa2b37a4 - languageName: node - linkType: hard - "slash@npm:^3.0.0": version: 3.0.0 resolution: "slash@npm:3.0.0" @@ -3555,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" @@ -3611,13 +3257,6 @@ __metadata: languageName: node linkType: hard -"strip-bom@npm:^3.0.0": - version: 3.0.0 - resolution: "strip-bom@npm:3.0.0" - checksum: 8d50ff27b7ebe5ecc78f1fe1e00fcdff7af014e73cf724b46fb81ef889eeb1015fc5184b64e81a2efe002180f3ba431bdd77e300da5c6685d702780fbf0c8d5b - languageName: node - linkType: hard - "strip-final-newline@npm:^2.0.0": version: 2.0.0 resolution: "strip-final-newline@npm:2.0.0" @@ -3641,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" @@ -3678,20 +3307,6 @@ __metadata: languageName: node linkType: hard -"supports-preserve-symlinks-flag@npm:^1.0.0": - version: 1.0.0 - resolution: "supports-preserve-symlinks-flag@npm:1.0.0" - checksum: 53b1e247e68e05db7b3808b99b892bd36fb096e6fba213a06da7fab22045e97597db425c724f2bbd6c99a3c295e1e73f3e4de78592289f38431049e1277ca0ae - languageName: node - linkType: hard - -"tapable@npm:^2.2.0": - version: 2.2.1 - resolution: "tapable@npm:2.2.1" - checksum: 3b7a1b4d86fa940aad46d9e73d1e8739335efd4c48322cb37d073eb6f80f5281889bf0320c6d8ffcfa1a0dd5bfdbd0f9d037e252ef972aca595330538aac4d51 - languageName: node - linkType: hard - "tar@npm:^6.1.11, tar@npm:^6.1.2": version: 6.1.15 resolution: "tar@npm:6.1.15" @@ -3706,13 +3321,6 @@ __metadata: languageName: node linkType: hard -"teamcity-service-messages@npm:0.1.14": - version: 0.1.14 - resolution: "teamcity-service-messages@npm:0.1.14" - checksum: b4f91d81158df1f977bdf10312779dc1bb47b3268dbdbab7cdf1e9d99591d2d4916af975fe059f62481bff1e7938dff1b46c05ba53545d53fd486de079879d9b - languageName: node - linkType: hard - "text-table@npm:^0.2.0": version: 0.2.0 resolution: "text-table@npm:0.2.0" @@ -3768,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" @@ -3817,25 +3415,10 @@ __metadata: languageName: node linkType: hard -"tsconfig-paths-webpack-plugin@npm:4.1.0": - version: 4.1.0 - resolution: "tsconfig-paths-webpack-plugin@npm:4.1.0" - dependencies: - chalk: ^4.1.0 - enhanced-resolve: ^5.7.0 - tsconfig-paths: ^4.1.2 - checksum: f6e9a8a407e1a405b0f2531184296d9f033cb4fe5837282b757ab4a2f4cd82a3117e62c4b86d56c7d47749c7f1345aa438ec6417dbf64a0ec74a292fe9eae44d - languageName: node - linkType: hard - -"tsconfig-paths@npm:^4.1.2": - version: 4.2.0 - resolution: "tsconfig-paths@npm:4.2.0" - dependencies: - json5: ^2.2.2 - minimist: ^1.2.6 - strip-bom: ^3.0.0 - checksum: 28c5f7bbbcabc9dabd4117e8fdc61483f6872a1c6b02a4b1c4d68c5b79d06896c3cc9547610c4c3ba64658531caa2de13ead1ea1bf321c7b53e969c4752b98c7 +"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 @@ -3846,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" @@ -3950,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 @@ -4116,15 +3692,6 @@ __metadata: languageName: node linkType: hard -"watskeburt@npm:1.0.1": - version: 1.0.1 - resolution: "watskeburt@npm:1.0.1" - bin: - watskeburt: dist/cli.js - checksum: 8fe0212c23485f2ad9c33aaee49f1c4adf2691e3f860dd985b0c7567e4483935ec072e0f94056a86691041c79bdfe631009838ec18db5fc47c7288b4faee3dea - languageName: node - linkType: hard - "webidl-conversions@npm:^4.0.2": version: 4.0.2 resolution: "webidl-conversions@npm:4.0.2" @@ -4186,7 +3753,7 @@ __metadata: languageName: node linkType: hard -"wrap-ansi@npm:8.1.0, wrap-ansi@npm:^8.1.0": +"wrap-ansi@npm:^8.1.0": version: 8.1.0 resolution: "wrap-ansi@npm:8.1.0" dependencies: @@ -4204,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" @@ -4215,7 +3797,7 @@ __metadata: optional: true utf-8-validate: optional: true - checksum: 53e991bbf928faf5dc6efac9b8eb9ab6497c69feeb94f963d648b7a3530a720b19ec2e0ec037344257e05a4f35bd9ad04d9de6f289615ffb133282031b18c61c + checksum: 8c67365f6e6134278ad635d558bfce466d7ef7543a043baea333aaa430429f0af8a130c0c36e7dd78f918d68167a659ba9b5067330b77c4b279e91533395952b languageName: node linkType: hard