From 018f18419742e13548b8a9b2833027ada52c8815 Mon Sep 17 00:00:00 2001 From: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com> Date: Mon, 18 Jul 2022 12:14:02 -0500 Subject: [PATCH 01/37] chore: fix tsc predicate type checking --- src/handler/utilities/predicates.ts | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/handler/utilities/predicates.ts b/src/handler/utilities/predicates.ts index 49c1834e..71e3a22b 100644 --- a/src/handler/utilities/predicates.ts +++ b/src/handler/utilities/predicates.ts @@ -4,8 +4,11 @@ import { Interaction, InteractionType, ModalSubmitInteraction, - type CommandInteraction, - type MessageComponentInteraction, + ChatInputCommandInteraction, + UserContextMenuCommandInteraction, + MessageContextMenuCommandInteraction, + SelectMenuInteraction, + ButtonInteraction, } from 'discord.js'; import type { DiscordEventCommand, @@ -23,7 +26,12 @@ export function correctModuleType( return plug !== undefined && (plug.type & type) !== 0; } -export function isApplicationCommand(interaction: Interaction): interaction is CommandInteraction { +export function isApplicationCommand( + interaction: Interaction, +): interaction is + | ChatInputCommandInteraction + | UserContextMenuCommandInteraction + | MessageContextMenuCommandInteraction { return interaction.type === InteractionType.ApplicationCommand; } @@ -36,7 +44,7 @@ export function isAutocomplete(interaction: Interaction): interaction is Autocom export function isMessageComponent( interaction: Interaction, -): interaction is MessageComponentInteraction { +): interaction is SelectMenuInteraction | ButtonInteraction { return interaction.type === InteractionType.MessageComponent; } From 97d6591aca7a04196b3d97b4cae16a28b870513a Mon Sep 17 00:00:00 2001 From: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com> Date: Tue, 19 Jul 2022 19:42:53 -0500 Subject: [PATCH 02/37] build: add tsup as bundler --- .npmignore | 2 - package-lock.json | 1442 ++++++++++++++++++++++++++++++++++++++++++++- package.json | 20 +- 3 files changed, 1447 insertions(+), 17 deletions(-) diff --git a/.npmignore b/.npmignore index 445c5e47..d3e65049 100644 --- a/.npmignore +++ b/.npmignore @@ -105,5 +105,3 @@ jest.config.ts CODE_OF_CONDUCT.md babel.config.js - -tests/ \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 1e74e799..368728a7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,6 +19,7 @@ "@typescript-eslint/parser": "5.30.3", "eslint": "8.19.0", "prettier": "2.7.1", + "tsup": "^6.1.3", "typescript": "4.7.4" } }, @@ -440,6 +441,25 @@ "node": ">=8" } }, + "node_modules/any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", + "dev": true + }, + "node_modules/anymatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -461,6 +481,15 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, + "node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -483,6 +512,30 @@ "node": ">=8" } }, + "node_modules/bundle-require": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/bundle-require/-/bundle-require-3.0.4.tgz", + "integrity": "sha512-VXG6epB1yrLAvWVQpl92qF347/UXmncQj7J3U8kZEbdVZ1ZkQyr4hYeL/9RvcE8vVVdp53dY78Fd/3pqfRqI1A==", + "dev": true, + "dependencies": { + "load-tsconfig": "^0.2.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "peerDependencies": { + "esbuild": ">=0.13" + } + }, + "node_modules/cac": { + "version": "6.7.12", + "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.12.tgz", + "integrity": "sha512-rM7E2ygtMkJqD9c7WnFU6fruFcN3xe4FM5yUmgxhZzIKJk4uHl9U/fhwdajGFQbQuv43FAUo1Fe8gX/oIKDeSA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -492,6 +545,54 @@ "node": ">=6" } }, + "node_modules/chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/chokidar/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/commander": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -585,6 +686,361 @@ "node": ">=6.0.0" } }, + "node_modules/esbuild": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.49.tgz", + "integrity": "sha512-/TlVHhOaq7Yz8N1OJrjqM3Auzo5wjvHFLk+T8pIue+fhnhIMpfAzsG6PLVMbFveVxqD2WOp3QHei+52IMUNmCw==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "esbuild-android-64": "0.14.49", + "esbuild-android-arm64": "0.14.49", + "esbuild-darwin-64": "0.14.49", + "esbuild-darwin-arm64": "0.14.49", + "esbuild-freebsd-64": "0.14.49", + "esbuild-freebsd-arm64": "0.14.49", + "esbuild-linux-32": "0.14.49", + "esbuild-linux-64": "0.14.49", + "esbuild-linux-arm": "0.14.49", + "esbuild-linux-arm64": "0.14.49", + "esbuild-linux-mips64le": "0.14.49", + "esbuild-linux-ppc64le": "0.14.49", + "esbuild-linux-riscv64": "0.14.49", + "esbuild-linux-s390x": "0.14.49", + "esbuild-netbsd-64": "0.14.49", + "esbuild-openbsd-64": "0.14.49", + "esbuild-sunos-64": "0.14.49", + "esbuild-windows-32": "0.14.49", + "esbuild-windows-64": "0.14.49", + "esbuild-windows-arm64": "0.14.49" + } + }, + "node_modules/esbuild-android-64": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.14.49.tgz", + "integrity": "sha512-vYsdOTD+yi+kquhBiFWl3tyxnj2qZJsl4tAqwhT90ktUdnyTizgle7TjNx6Ar1bN7wcwWqZ9QInfdk2WVagSww==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-android-arm64": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.49.tgz", + "integrity": "sha512-g2HGr/hjOXCgSsvQZ1nK4nW/ei8JUx04Li74qub9qWrStlysaVmadRyTVuW32FGIpLQyc5sUjjZopj49eGGM2g==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-darwin-64": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.49.tgz", + "integrity": "sha512-3rvqnBCtX9ywso5fCHixt2GBCUsogNp9DjGmvbBohh31Ces34BVzFltMSxJpacNki96+WIcX5s/vum+ckXiLYg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-darwin-arm64": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.49.tgz", + "integrity": "sha512-XMaqDxO846srnGlUSJnwbijV29MTKUATmOLyQSfswbK/2X5Uv28M9tTLUJcKKxzoo9lnkYPsx2o8EJcTYwCs/A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-freebsd-64": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.49.tgz", + "integrity": "sha512-NJ5Q6AjV879mOHFri+5lZLTp5XsO2hQ+KSJYLbfY9DgCu8s6/Zl2prWXVANYTeCDLlrIlNNYw8y34xqyLDKOmQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-freebsd-arm64": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.49.tgz", + "integrity": "sha512-lFLtgXnAc3eXYqj5koPlBZvEbBSOSUbWO3gyY/0+4lBdRqELyz4bAuamHvmvHW5swJYL7kngzIZw6kdu25KGOA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-32": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.49.tgz", + "integrity": "sha512-zTTH4gr2Kb8u4QcOpTDVn7Z8q7QEIvFl/+vHrI3cF6XOJS7iEI1FWslTo3uofB2+mn6sIJEQD9PrNZKoAAMDiA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-64": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.49.tgz", + "integrity": "sha512-hYmzRIDzFfLrB5c1SknkxzM8LdEUOusp6M2TnuQZJLRtxTgyPnZZVtyMeCLki0wKgYPXkFsAVhi8vzo2mBNeTg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-arm": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.49.tgz", + "integrity": "sha512-iE3e+ZVv1Qz1Sy0gifIsarJMQ89Rpm9mtLSRtG3AH0FPgAzQ5Z5oU6vYzhc/3gSPi2UxdCOfRhw2onXuFw/0lg==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-arm64": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.49.tgz", + "integrity": "sha512-KLQ+WpeuY+7bxukxLz5VgkAAVQxUv67Ft4DmHIPIW+2w3ObBPQhqNoeQUHxopoW/aiOn3m99NSmSV+bs4BSsdA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-mips64le": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.49.tgz", + "integrity": "sha512-n+rGODfm8RSum5pFIqFQVQpYBw+AztL8s6o9kfx7tjfK0yIGF6tm5HlG6aRjodiiKkH2xAiIM+U4xtQVZYU4rA==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-ppc64le": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.49.tgz", + "integrity": "sha512-WP9zR4HX6iCBmMFH+XHHng2LmdoIeUmBpL4aL2TR8ruzXyT4dWrJ5BSbT8iNo6THN8lod6GOmYDLq/dgZLalGw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-riscv64": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.49.tgz", + "integrity": "sha512-h66ORBz+Dg+1KgLvzTVQEA1LX4XBd1SK0Fgbhhw4akpG/YkN8pS6OzYI/7SGENiN6ao5hETRDSkVcvU9NRtkMQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-s390x": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.49.tgz", + "integrity": "sha512-DhrUoFVWD+XmKO1y7e4kNCqQHPs6twz6VV6Uezl/XHYGzM60rBewBF5jlZjG0nCk5W/Xy6y1xWeopkrhFFM0sQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-netbsd-64": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.49.tgz", + "integrity": "sha512-BXaUwFOfCy2T+hABtiPUIpWjAeWK9P8O41gR4Pg73hpzoygVGnj0nI3YK4SJhe52ELgtdgWP/ckIkbn2XaTxjQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-openbsd-64": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.49.tgz", + "integrity": "sha512-lP06UQeLDGmVPw9Rg437Btu6J9/BmyhdoefnQ4gDEJTtJvKtQaUcOQrhjTq455ouZN4EHFH1h28WOJVANK41kA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-sunos-64": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.49.tgz", + "integrity": "sha512-4c8Zowp+V3zIWje329BeLbGh6XI9c/rqARNaj5yPHdC61pHI9UNdDxT3rePPJeWcEZVKjkiAS6AP6kiITp7FSw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-windows-32": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.49.tgz", + "integrity": "sha512-q7Rb+J9yHTeKr9QTPDYkqfkEj8/kcKz9lOabDuvEXpXuIcosWCJgo5Z7h/L4r7rbtTH4a8U2FGKb6s1eeOHmJA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-windows-64": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.49.tgz", + "integrity": "sha512-+Cme7Ongv0UIUTniPqfTX6mJ8Deo7VXw9xN0yJEN1lQMHDppTNmKwAM3oGbD/Vqff+07K2gN0WfNkMohmG+dVw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-windows-arm64": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.49.tgz", + "integrity": "sha512-v+HYNAXzuANrCbbLFJ5nmO3m5y2PGZWLe3uloAkLt87aXiO2mZr3BTmacZdjwNkNEHuH3bNtN8cak+mzVjVPfA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, "node_modules/eslint": { "version": "8.19.0", "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.19.0.tgz", @@ -898,6 +1354,29 @@ "node": ">=0.10.0" } }, + "node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -1017,16 +1496,42 @@ "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", "dev": true }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, "node_modules/functional-red-black-tree": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==", "dev": true }, + "node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/glob": { - "version": "7.1.4", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", - "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", "dev": true, "dependencies": { "fs.realpath": "^1.0.0", @@ -1038,6 +1543,9 @@ }, "engines": { "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/glob-parent": { @@ -1087,6 +1595,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true, + "engines": { + "node": ">=10.17.0" + } + }, "node_modules/ieee754": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", @@ -1164,6 +1681,18 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -1194,12 +1723,33 @@ "node": ">=0.12.0" } }, + "node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", "dev": true }, + "node_modules/joycon": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/joycon/-/joycon-3.1.1.tgz", + "integrity": "sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, "node_modules/js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", @@ -1231,6 +1781,30 @@ "node": ">= 0.8.0" } }, + "node_modules/lilconfig": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.0.6.tgz", + "integrity": "sha512-9JROoBW7pobfsx+Sq2JsASvCo6Pfo6WWoUW79HuB1BCoBXD4PLWJPqDF6fNj67pqBYTbAHkE57M1kS/+L1neOg==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true + }, + "node_modules/load-tsconfig": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/load-tsconfig/-/load-tsconfig-0.2.3.tgz", + "integrity": "sha512-iyT2MXws+dc2Wi6o3grCFtGXpeMvHmJqS27sMPGtV2eUu4PeFnG+33I8BlFK1t1NWMjOpcx9bridn5yxLDX2gQ==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + } + }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", @@ -1242,6 +1816,12 @@ "resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz", "integrity": "sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==" }, + "node_modules/lodash.sortby": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", + "integrity": "sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==", + "dev": true + }, "node_modules/lodash.uniqwith": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.uniqwith/-/lodash.uniqwith-4.5.0.tgz", @@ -1259,6 +1839,12 @@ "node": ">=10" } }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -1281,6 +1867,15 @@ "node": ">=8.6" } }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -1299,12 +1894,53 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, + "node_modules/mz": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "dev": true, + "dependencies": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } + }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "dev": true }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -1314,6 +1950,21 @@ "wrappy": "1" } }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/optionator": { "version": "0.9.1", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", @@ -1394,6 +2045,44 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/pirates": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.5.tgz", + "integrity": "sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/postcss-load-config": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-3.1.4.tgz", + "integrity": "sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==", + "dev": true, + "dependencies": { + "lilconfig": "^2.0.5", + "yaml": "^1.10.2" + }, + "engines": { + "node": ">= 10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + "peerDependencies": { + "postcss": ">=8.0.9", + "ts-node": ">=9.0.0" + }, + "peerDependenciesMeta": { + "postcss": { + "optional": true + }, + "ts-node": { + "optional": true + } + } + }, "node_modules/prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -1475,6 +2164,18 @@ "url": "https://github.com/sponsors/Borewit" } }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, "node_modules/regexpp": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", @@ -1487,6 +2188,15 @@ "url": "https://github.com/sponsors/mysticatea" } }, + "node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", @@ -1512,6 +2222,21 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/rollup": { + "version": "2.77.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.77.0.tgz", + "integrity": "sha512-vL8xjY4yOQEw79DvyXLijhnhh+R/O9zpF/LEgkCebZFtb6ELeN9H3/2T0r8+mp+fFTBHZ5qGpOpW2ela2zRt3g==", + "dev": true, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=10.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -1598,6 +2323,12 @@ "node": ">=8" } }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, "node_modules/slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", @@ -1607,6 +2338,18 @@ "node": ">=8" } }, + "node_modules/source-map": { + "version": "0.8.0-beta.0", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.8.0-beta.0.tgz", + "integrity": "sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA==", + "dev": true, + "dependencies": { + "whatwg-url": "^7.0.0" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/string_decoder": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", @@ -1627,6 +2370,15 @@ "node": ">=8" } }, + "node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/strtok3": { "version": "7.0.0-alpha.8", "resolved": "https://registry.npmjs.org/strtok3/-/strtok3-7.0.0-alpha.8.tgz", @@ -1636,11 +2388,32 @@ "peek-readable": "^5.0.0-alpha.5" }, "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/Borewit" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Borewit" + } + }, + "node_modules/sucrase": { + "version": "3.24.0", + "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.24.0.tgz", + "integrity": "sha512-SevqflhW356TKEyWjFHg2e5f3eH+5rzmsMJxrVMDvZIEHh/goYrpzDGA6APEj4ME9MdGm8oNgIzi1eF3c3dDQA==", + "dev": true, + "dependencies": { + "commander": "^4.0.0", + "glob": "7.1.6", + "lines-and-columns": "^1.1.6", + "mz": "^2.7.0", + "pirates": "^4.0.1", + "ts-interface-checker": "^0.1.9" + }, + "bin": { + "sucrase": "bin/sucrase", + "sucrase-node": "bin/sucrase-node" + }, + "engines": { + "node": ">=8" } }, "node_modules/text-table": { @@ -1649,6 +2422,27 @@ "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "dev": true }, + "node_modules/thenify": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", + "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", + "dev": true, + "dependencies": { + "any-promise": "^1.0.0" + } + }, + "node_modules/thenify-all": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", + "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", + "dev": true, + "dependencies": { + "thenify": ">= 3.1.0 < 4" + }, + "engines": { + "node": ">=0.8" + } + }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -1677,6 +2471,30 @@ "url": "https://github.com/sponsors/Borewit" } }, + "node_modules/tr46": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-1.0.1.tgz", + "integrity": "sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA==", + "dev": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/tree-kill": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", + "dev": true, + "bin": { + "tree-kill": "cli.js" + } + }, + "node_modules/ts-interface-checker": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", + "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==", + "dev": true + }, "node_modules/ts-mixer": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.1.tgz", @@ -1697,6 +2515,51 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" }, + "node_modules/tsup": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/tsup/-/tsup-6.1.3.tgz", + "integrity": "sha512-eRpBnbfpDFng+EJNTQ90N7QAf4HAGGC7O3buHIjroKWK7D1ibk9/YnR/3cS8HsMU5T+6Oi+cnF+yU5WmCnB//Q==", + "dev": true, + "dependencies": { + "bundle-require": "^3.0.2", + "cac": "^6.7.12", + "chokidar": "^3.5.1", + "debug": "^4.3.1", + "esbuild": "^0.14.25", + "execa": "^5.0.0", + "globby": "^11.0.3", + "joycon": "^3.0.1", + "postcss-load-config": "^3.0.1", + "resolve-from": "^5.0.0", + "rollup": "^2.74.1", + "source-map": "0.8.0-beta.0", + "sucrase": "^3.20.3", + "tree-kill": "^1.2.2" + }, + "bin": { + "tsup": "dist/cli-default.js", + "tsup-node": "dist/cli-node.js" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@swc/core": "^1", + "postcss": "^8.4.12", + "typescript": "^4.1.0" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "postcss": { + "optional": true + }, + "typescript": { + "optional": true + } + } + }, "node_modules/tsutils": { "version": "3.21.0", "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", @@ -1783,6 +2646,23 @@ "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", "dev": true }, + "node_modules/webidl-conversions": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", + "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==", + "dev": true + }, + "node_modules/whatwg-url": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.1.0.tgz", + "integrity": "sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==", + "dev": true, + "dependencies": { + "lodash.sortby": "^4.7.0", + "tr46": "^1.0.1", + "webidl-conversions": "^4.0.2" + } + }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -1838,6 +2718,15 @@ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true + }, + "node_modules/yaml": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "dev": true, + "engines": { + "node": ">= 6" + } } }, "dependencies": { @@ -2115,6 +3004,22 @@ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true }, + "any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", + "dev": true + }, + "anymatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "dev": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, "argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -2133,6 +3038,12 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, + "binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -2152,12 +3063,60 @@ "fill-range": "^7.0.1" } }, + "bundle-require": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/bundle-require/-/bundle-require-3.0.4.tgz", + "integrity": "sha512-VXG6epB1yrLAvWVQpl92qF347/UXmncQj7J3U8kZEbdVZ1ZkQyr4hYeL/9RvcE8vVVdp53dY78Fd/3pqfRqI1A==", + "dev": true, + "requires": { + "load-tsconfig": "^0.2.0" + } + }, + "cac": { + "version": "6.7.12", + "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.12.tgz", + "integrity": "sha512-rM7E2ygtMkJqD9c7WnFU6fruFcN3xe4FM5yUmgxhZzIKJk4uHl9U/fhwdajGFQbQuv43FAUo1Fe8gX/oIKDeSA==", + "dev": true + }, "callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true }, + "chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "dev": true, + "requires": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "fsevents": "~2.3.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "dependencies": { + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + } + } + }, + "commander": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", + "dev": true + }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -2231,6 +3190,174 @@ "esutils": "^2.0.2" } }, + "esbuild": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.49.tgz", + "integrity": "sha512-/TlVHhOaq7Yz8N1OJrjqM3Auzo5wjvHFLk+T8pIue+fhnhIMpfAzsG6PLVMbFveVxqD2WOp3QHei+52IMUNmCw==", + "dev": true, + "requires": { + "esbuild-android-64": "0.14.49", + "esbuild-android-arm64": "0.14.49", + "esbuild-darwin-64": "0.14.49", + "esbuild-darwin-arm64": "0.14.49", + "esbuild-freebsd-64": "0.14.49", + "esbuild-freebsd-arm64": "0.14.49", + "esbuild-linux-32": "0.14.49", + "esbuild-linux-64": "0.14.49", + "esbuild-linux-arm": "0.14.49", + "esbuild-linux-arm64": "0.14.49", + "esbuild-linux-mips64le": "0.14.49", + "esbuild-linux-ppc64le": "0.14.49", + "esbuild-linux-riscv64": "0.14.49", + "esbuild-linux-s390x": "0.14.49", + "esbuild-netbsd-64": "0.14.49", + "esbuild-openbsd-64": "0.14.49", + "esbuild-sunos-64": "0.14.49", + "esbuild-windows-32": "0.14.49", + "esbuild-windows-64": "0.14.49", + "esbuild-windows-arm64": "0.14.49" + } + }, + "esbuild-android-64": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.14.49.tgz", + "integrity": "sha512-vYsdOTD+yi+kquhBiFWl3tyxnj2qZJsl4tAqwhT90ktUdnyTizgle7TjNx6Ar1bN7wcwWqZ9QInfdk2WVagSww==", + "dev": true, + "optional": true + }, + "esbuild-android-arm64": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.49.tgz", + "integrity": "sha512-g2HGr/hjOXCgSsvQZ1nK4nW/ei8JUx04Li74qub9qWrStlysaVmadRyTVuW32FGIpLQyc5sUjjZopj49eGGM2g==", + "dev": true, + "optional": true + }, + "esbuild-darwin-64": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.49.tgz", + "integrity": "sha512-3rvqnBCtX9ywso5fCHixt2GBCUsogNp9DjGmvbBohh31Ces34BVzFltMSxJpacNki96+WIcX5s/vum+ckXiLYg==", + "dev": true, + "optional": true + }, + "esbuild-darwin-arm64": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.49.tgz", + "integrity": "sha512-XMaqDxO846srnGlUSJnwbijV29MTKUATmOLyQSfswbK/2X5Uv28M9tTLUJcKKxzoo9lnkYPsx2o8EJcTYwCs/A==", + "dev": true, + "optional": true + }, + "esbuild-freebsd-64": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.49.tgz", + "integrity": "sha512-NJ5Q6AjV879mOHFri+5lZLTp5XsO2hQ+KSJYLbfY9DgCu8s6/Zl2prWXVANYTeCDLlrIlNNYw8y34xqyLDKOmQ==", + "dev": true, + "optional": true + }, + "esbuild-freebsd-arm64": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.49.tgz", + "integrity": "sha512-lFLtgXnAc3eXYqj5koPlBZvEbBSOSUbWO3gyY/0+4lBdRqELyz4bAuamHvmvHW5swJYL7kngzIZw6kdu25KGOA==", + "dev": true, + "optional": true + }, + "esbuild-linux-32": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.49.tgz", + "integrity": "sha512-zTTH4gr2Kb8u4QcOpTDVn7Z8q7QEIvFl/+vHrI3cF6XOJS7iEI1FWslTo3uofB2+mn6sIJEQD9PrNZKoAAMDiA==", + "dev": true, + "optional": true + }, + "esbuild-linux-64": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.49.tgz", + "integrity": "sha512-hYmzRIDzFfLrB5c1SknkxzM8LdEUOusp6M2TnuQZJLRtxTgyPnZZVtyMeCLki0wKgYPXkFsAVhi8vzo2mBNeTg==", + "dev": true, + "optional": true + }, + "esbuild-linux-arm": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.49.tgz", + "integrity": "sha512-iE3e+ZVv1Qz1Sy0gifIsarJMQ89Rpm9mtLSRtG3AH0FPgAzQ5Z5oU6vYzhc/3gSPi2UxdCOfRhw2onXuFw/0lg==", + "dev": true, + "optional": true + }, + "esbuild-linux-arm64": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.49.tgz", + "integrity": "sha512-KLQ+WpeuY+7bxukxLz5VgkAAVQxUv67Ft4DmHIPIW+2w3ObBPQhqNoeQUHxopoW/aiOn3m99NSmSV+bs4BSsdA==", + "dev": true, + "optional": true + }, + "esbuild-linux-mips64le": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.49.tgz", + "integrity": "sha512-n+rGODfm8RSum5pFIqFQVQpYBw+AztL8s6o9kfx7tjfK0yIGF6tm5HlG6aRjodiiKkH2xAiIM+U4xtQVZYU4rA==", + "dev": true, + "optional": true + }, + "esbuild-linux-ppc64le": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.49.tgz", + "integrity": "sha512-WP9zR4HX6iCBmMFH+XHHng2LmdoIeUmBpL4aL2TR8ruzXyT4dWrJ5BSbT8iNo6THN8lod6GOmYDLq/dgZLalGw==", + "dev": true, + "optional": true + }, + "esbuild-linux-riscv64": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.49.tgz", + "integrity": "sha512-h66ORBz+Dg+1KgLvzTVQEA1LX4XBd1SK0Fgbhhw4akpG/YkN8pS6OzYI/7SGENiN6ao5hETRDSkVcvU9NRtkMQ==", + "dev": true, + "optional": true + }, + "esbuild-linux-s390x": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.49.tgz", + "integrity": "sha512-DhrUoFVWD+XmKO1y7e4kNCqQHPs6twz6VV6Uezl/XHYGzM60rBewBF5jlZjG0nCk5W/Xy6y1xWeopkrhFFM0sQ==", + "dev": true, + "optional": true + }, + "esbuild-netbsd-64": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.49.tgz", + "integrity": "sha512-BXaUwFOfCy2T+hABtiPUIpWjAeWK9P8O41gR4Pg73hpzoygVGnj0nI3YK4SJhe52ELgtdgWP/ckIkbn2XaTxjQ==", + "dev": true, + "optional": true + }, + "esbuild-openbsd-64": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.49.tgz", + "integrity": "sha512-lP06UQeLDGmVPw9Rg437Btu6J9/BmyhdoefnQ4gDEJTtJvKtQaUcOQrhjTq455ouZN4EHFH1h28WOJVANK41kA==", + "dev": true, + "optional": true + }, + "esbuild-sunos-64": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.49.tgz", + "integrity": "sha512-4c8Zowp+V3zIWje329BeLbGh6XI9c/rqARNaj5yPHdC61pHI9UNdDxT3rePPJeWcEZVKjkiAS6AP6kiITp7FSw==", + "dev": true, + "optional": true + }, + "esbuild-windows-32": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.49.tgz", + "integrity": "sha512-q7Rb+J9yHTeKr9QTPDYkqfkEj8/kcKz9lOabDuvEXpXuIcosWCJgo5Z7h/L4r7rbtTH4a8U2FGKb6s1eeOHmJA==", + "dev": true, + "optional": true + }, + "esbuild-windows-64": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.49.tgz", + "integrity": "sha512-+Cme7Ongv0UIUTniPqfTX6mJ8Deo7VXw9xN0yJEN1lQMHDppTNmKwAM3oGbD/Vqff+07K2gN0WfNkMohmG+dVw==", + "dev": true, + "optional": true + }, + "esbuild-windows-arm64": { + "version": "0.14.49", + "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.49.tgz", + "integrity": "sha512-v+HYNAXzuANrCbbLFJ5nmO3m5y2PGZWLe3uloAkLt87aXiO2mZr3BTmacZdjwNkNEHuH3bNtN8cak+mzVjVPfA==", + "dev": true, + "optional": true + }, "eslint": { "version": "8.19.0", "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.19.0.tgz", @@ -2461,6 +3588,23 @@ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true }, + "execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + } + }, "fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -2561,16 +3705,29 @@ "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", "dev": true }, + "fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "optional": true + }, "functional-red-black-tree": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==", "dev": true }, + "get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true + }, "glob": { - "version": "7.1.4", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", - "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", "dev": true, "requires": { "fs.realpath": "^1.0.0", @@ -2613,6 +3770,12 @@ "slash": "^3.0.0" } }, + "human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true + }, "ieee754": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", @@ -2663,6 +3826,15 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "requires": { + "binary-extensions": "^2.0.0" + } + }, "is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -2684,12 +3856,24 @@ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true }, + "is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true + }, "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", "dev": true }, + "joycon": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/joycon/-/joycon-3.1.1.tgz", + "integrity": "sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==", + "dev": true + }, "js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", @@ -2715,6 +3899,24 @@ "type-check": "~0.4.0" } }, + "lilconfig": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.0.6.tgz", + "integrity": "sha512-9JROoBW7pobfsx+Sq2JsASvCo6Pfo6WWoUW79HuB1BCoBXD4PLWJPqDF6fNj67pqBYTbAHkE57M1kS/+L1neOg==", + "dev": true + }, + "lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true + }, + "load-tsconfig": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/load-tsconfig/-/load-tsconfig-0.2.3.tgz", + "integrity": "sha512-iyT2MXws+dc2Wi6o3grCFtGXpeMvHmJqS27sMPGtV2eUu4PeFnG+33I8BlFK1t1NWMjOpcx9bridn5yxLDX2gQ==", + "dev": true + }, "lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", @@ -2726,6 +3928,12 @@ "resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz", "integrity": "sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==" }, + "lodash.sortby": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", + "integrity": "sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==", + "dev": true + }, "lodash.uniqwith": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.uniqwith/-/lodash.uniqwith-4.5.0.tgz", @@ -2740,6 +3948,12 @@ "yallist": "^4.0.0" } }, + "merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, "merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -2756,6 +3970,12 @@ "picomatch": "^2.3.1" } }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true + }, "minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -2771,12 +3991,44 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, + "mz": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "dev": true, + "requires": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } + }, "natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "dev": true }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + }, + "npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "requires": { + "path-key": "^3.0.0" + } + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true + }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -2786,6 +4038,15 @@ "wrappy": "1" } }, + "onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "requires": { + "mimic-fn": "^2.1.0" + } + }, "optionator": { "version": "0.9.1", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", @@ -2838,6 +4099,22 @@ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true }, + "pirates": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.5.tgz", + "integrity": "sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==", + "dev": true + }, + "postcss-load-config": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-3.1.4.tgz", + "integrity": "sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==", + "dev": true, + "requires": { + "lilconfig": "^2.0.5", + "yaml": "^1.10.2" + } + }, "prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -2880,12 +4157,27 @@ "readable-stream": "^3.6.0" } }, + "readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "requires": { + "picomatch": "^2.2.1" + } + }, "regexpp": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", "dev": true }, + "resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true + }, "reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", @@ -2901,6 +4193,15 @@ "glob": "^7.1.3" } }, + "rollup": { + "version": "2.77.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.77.0.tgz", + "integrity": "sha512-vL8xjY4yOQEw79DvyXLijhnhh+R/O9zpF/LEgkCebZFtb6ELeN9H3/2T0r8+mp+fFTBHZ5qGpOpW2ela2zRt3g==", + "dev": true, + "requires": { + "fsevents": "~2.3.2" + } + }, "run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -2947,12 +4248,27 @@ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true }, + "signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, "slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true }, + "source-map": { + "version": "0.8.0-beta.0", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.8.0-beta.0.tgz", + "integrity": "sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA==", + "dev": true, + "requires": { + "whatwg-url": "^7.0.0" + } + }, "string_decoder": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", @@ -2970,6 +4286,12 @@ "ansi-regex": "^5.0.1" } }, + "strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true + }, "strtok3": { "version": "7.0.0-alpha.8", "resolved": "https://registry.npmjs.org/strtok3/-/strtok3-7.0.0-alpha.8.tgz", @@ -2979,12 +4301,44 @@ "peek-readable": "^5.0.0-alpha.5" } }, + "sucrase": { + "version": "3.24.0", + "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.24.0.tgz", + "integrity": "sha512-SevqflhW356TKEyWjFHg2e5f3eH+5rzmsMJxrVMDvZIEHh/goYrpzDGA6APEj4ME9MdGm8oNgIzi1eF3c3dDQA==", + "dev": true, + "requires": { + "commander": "^4.0.0", + "glob": "7.1.6", + "lines-and-columns": "^1.1.6", + "mz": "^2.7.0", + "pirates": "^4.0.1", + "ts-interface-checker": "^0.1.9" + } + }, "text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "dev": true }, + "thenify": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", + "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", + "dev": true, + "requires": { + "any-promise": "^1.0.0" + } + }, + "thenify-all": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", + "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", + "dev": true, + "requires": { + "thenify": ">= 3.1.0 < 4" + } + }, "to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -3003,6 +4357,27 @@ "ieee754": "^1.2.1" } }, + "tr46": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-1.0.1.tgz", + "integrity": "sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "tree-kill": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", + "dev": true + }, + "ts-interface-checker": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", + "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==", + "dev": true + }, "ts-mixer": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.1.tgz", @@ -3023,6 +4398,28 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" }, + "tsup": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/tsup/-/tsup-6.1.3.tgz", + "integrity": "sha512-eRpBnbfpDFng+EJNTQ90N7QAf4HAGGC7O3buHIjroKWK7D1ibk9/YnR/3cS8HsMU5T+6Oi+cnF+yU5WmCnB//Q==", + "dev": true, + "requires": { + "bundle-require": "^3.0.2", + "cac": "^6.7.12", + "chokidar": "^3.5.1", + "debug": "^4.3.1", + "esbuild": "^0.14.25", + "execa": "^5.0.0", + "globby": "^11.0.3", + "joycon": "^3.0.1", + "postcss-load-config": "^3.0.1", + "resolve-from": "^5.0.0", + "rollup": "^2.74.1", + "source-map": "0.8.0-beta.0", + "sucrase": "^3.20.3", + "tree-kill": "^1.2.2" + } + }, "tsutils": { "version": "3.21.0", "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", @@ -3086,6 +4483,23 @@ "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", "dev": true }, + "webidl-conversions": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", + "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==", + "dev": true + }, + "whatwg-url": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.1.0.tgz", + "integrity": "sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==", + "dev": true, + "requires": { + "lodash.sortby": "^4.7.0", + "tr46": "^1.0.1", + "webidl-conversions": "^4.0.2" + } + }, "which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -3118,6 +4532,12 @@ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true + }, + "yaml": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "dev": true } } } diff --git a/package.json b/package.json index c9985f05..7d908bb6 100644 --- a/package.json +++ b/package.json @@ -2,12 +2,23 @@ "name": "@sern/handler", "version": "1.1.3-beta", "description": "A customizable, batteries-included, powerful discord.js framework to automate and streamline bot development.", - "main": "dist/index.js", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "types": "./dist/index.d.ts", + "exports": { + ".": { + "require": "./dist/index.js", + "import": "./dist/index.mjs", + "types": "./dist/index.d.ts" + } + }, "scripts": { "compile": "tsc", "watch": "tsc -w", "lint": "eslint src/**/*.ts", - "format": "eslint src/**/*.ts --fix" + "format": "eslint src/**/*.ts --fix", + "build": "tsup src/index.ts --format cjs,esm --dts --clean", + "publish": "npm run build && npm publish" }, "keywords": [ "sern-handler", @@ -27,10 +38,11 @@ "ts-results": "^3.3.0" }, "devDependencies": { - "eslint": "8.19.0", - "@typescript-eslint/parser": "5.30.3", "@typescript-eslint/eslint-plugin": "5.30.3", + "@typescript-eslint/parser": "5.30.3", + "eslint": "8.19.0", "prettier": "2.7.1", + "tsup": "^6.1.3", "typescript": "4.7.4" }, "repository": { From ce0644d74d7ca2805f41555c5d42bf7a0a50ef0b Mon Sep 17 00:00:00 2001 From: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com> Date: Mon, 18 Jul 2022 12:18:12 -0500 Subject: [PATCH 03/37] chore: revert text --- src/handler/utilities/predicates.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/handler/utilities/predicates.ts b/src/handler/utilities/predicates.ts index 71e3a22b..69845d8d 100644 --- a/src/handler/utilities/predicates.ts +++ b/src/handler/utilities/predicates.ts @@ -41,7 +41,6 @@ export function isModalSubmit(interaction: Interaction): interaction is ModalSub export function isAutocomplete(interaction: Interaction): interaction is AutocompleteInteraction { return interaction.type === InteractionType.ApplicationCommandAutocomplete; } - export function isMessageComponent( interaction: Interaction, ): interaction is SelectMenuInteraction | ButtonInteraction { From 2f07f45c22213a76ea12429d52234322a6a1f247 Mon Sep 17 00:00:00 2001 From: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com> Date: Mon, 18 Jul 2022 12:21:23 -0500 Subject: [PATCH 04/37] chore: fix predicates.ts, update dependencies, bump version --- package-lock.json | 14 +++++++------- package.json | 4 ++-- src/handler/utilities/predicates.ts | 12 ++++++------ 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/package-lock.json b/package-lock.json index 368728a7..7986f6d1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "1.1.3-beta", "license": "MIT", "dependencies": { - "discord.js": "^14.0.1", + "discord.js": "^14.0.2", "rxjs": "^7.5.6", "ts-pattern": "^4.0.2", "ts-results": "^3.3.0" @@ -654,9 +654,9 @@ "integrity": "sha512-TunPAvzwneK/m5fr4hxH3bMsrtI22nr9yjfHyo5NBGMjpsAauGNiGCmwoFf0oO3jSd2mZiKUvZwCKDaB166u2Q==" }, "node_modules/discord.js": { - "version": "14.0.1", - "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.0.1.tgz", - "integrity": "sha512-MZ2cvvk1WCpTUCLcchX5e/mBM22JCPAYle76qEuAfQfVTFdxE2YoKgRWMwWm6s/OJdkXyzglRWj405hg4vikEg==", + "version": "14.0.2", + "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.0.2.tgz", + "integrity": "sha512-aHZHwT4i5yyV4IotFm9lSSPq8mTUkYWTrpatPlT53wz8QyFUPw5XjvUxuOXlaioV1kBsgfhSjCP0BNqxfuSjRQ==", "dependencies": { "@discordjs/builders": "^1.0.0", "@discordjs/collection": "^1.0.0", @@ -3164,9 +3164,9 @@ "integrity": "sha512-TunPAvzwneK/m5fr4hxH3bMsrtI22nr9yjfHyo5NBGMjpsAauGNiGCmwoFf0oO3jSd2mZiKUvZwCKDaB166u2Q==" }, "discord.js": { - "version": "14.0.1", - "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.0.1.tgz", - "integrity": "sha512-MZ2cvvk1WCpTUCLcchX5e/mBM22JCPAYle76qEuAfQfVTFdxE2YoKgRWMwWm6s/OJdkXyzglRWj405hg4vikEg==", + "version": "14.0.2", + "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.0.2.tgz", + "integrity": "sha512-aHZHwT4i5yyV4IotFm9lSSPq8mTUkYWTrpatPlT53wz8QyFUPw5XjvUxuOXlaioV1kBsgfhSjCP0BNqxfuSjRQ==", "requires": { "@discordjs/builders": "^1.0.0", "@discordjs/collection": "^1.0.0", diff --git a/package.json b/package.json index 7d908bb6..985c115f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@sern/handler", - "version": "1.1.3-beta", + "version": "1.1.4-beta", "description": "A customizable, batteries-included, powerful discord.js framework to automate and streamline bot development.", "main": "./dist/index.js", "module": "./dist/index.mjs", @@ -32,7 +32,7 @@ "author": "SernDevs", "license": "MIT", "dependencies": { - "discord.js": "^14.0.1", + "discord.js": "^14.0.2", "rxjs": "^7.5.6", "ts-pattern": "^4.0.2", "ts-results": "^3.3.0" diff --git a/src/handler/utilities/predicates.ts b/src/handler/utilities/predicates.ts index 69845d8d..cced6422 100644 --- a/src/handler/utilities/predicates.ts +++ b/src/handler/utilities/predicates.ts @@ -3,12 +3,12 @@ import { AutocompleteInteraction, Interaction, InteractionType, - ModalSubmitInteraction, - ChatInputCommandInteraction, - UserContextMenuCommandInteraction, - MessageContextMenuCommandInteraction, - SelectMenuInteraction, - ButtonInteraction, + type ModalSubmitInteraction, + type ButtonInteraction, + type SelectMenuInteraction, + type ChatInputCommandInteraction, + type UserContextMenuCommandInteraction, + type MessageContextMenuCommandInteraction, } from 'discord.js'; import type { DiscordEventCommand, From ca37158a4281a16ed48b089c646bba12df9a5633 Mon Sep 17 00:00:00 2001 From: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com> Date: Mon, 18 Jul 2022 13:55:32 -0500 Subject: [PATCH 05/37] docs: update example --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 37a6ccd7..1458f63f 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ pnpm add @sern/handler ```js const { Client, GatewayIntentBits } = require('discord.js'); -const { Sern } = require('sern-handler'); +const { Sern } = require('@sern/handler'); const { defaultPrefix, token } = require('./config.json'); const client = new Client({ From d18eaa915a433c3d124ca4c3f1b799ff6e323f5d Mon Sep 17 00:00:00 2001 From: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com> Date: Tue, 19 Jul 2022 19:48:04 -0500 Subject: [PATCH 06/37] build: update dependencies --- package-lock.json | 34 +++++++++++++++++----------------- package.json | 4 ++-- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7986f6d1..8c1ce61e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,15 +1,15 @@ { "name": "@sern/handler", - "version": "1.1.3-beta", + "version": "1.1.5-beta", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@sern/handler", - "version": "1.1.3-beta", + "version": "1.1.5-beta", "license": "MIT", "dependencies": { - "discord.js": "^14.0.2", + "discord.js": "^14.0.3", "rxjs": "^7.5.6", "ts-pattern": "^4.0.2", "ts-results": "^3.3.0" @@ -654,9 +654,9 @@ "integrity": "sha512-TunPAvzwneK/m5fr4hxH3bMsrtI22nr9yjfHyo5NBGMjpsAauGNiGCmwoFf0oO3jSd2mZiKUvZwCKDaB166u2Q==" }, "node_modules/discord.js": { - "version": "14.0.2", - "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.0.2.tgz", - "integrity": "sha512-aHZHwT4i5yyV4IotFm9lSSPq8mTUkYWTrpatPlT53wz8QyFUPw5XjvUxuOXlaioV1kBsgfhSjCP0BNqxfuSjRQ==", + "version": "14.0.3", + "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.0.3.tgz", + "integrity": "sha512-wH/VQl4CqN8/+dcXEtYis1iurqxGlDpEe0O4CqH5FGqZGIjVpTdtK0STXXx7bVNX8MT/0GvLZLkmO/5gLDWZVg==", "dependencies": { "@discordjs/builders": "^1.0.0", "@discordjs/collection": "^1.0.0", @@ -667,7 +667,7 @@ "fast-deep-equal": "^3.1.3", "lodash.snakecase": "^4.1.1", "tslib": "^2.4.0", - "undici": "^5.7.0", + "undici": "^5.8.0", "ws": "^8.8.1" }, "engines": { @@ -2619,9 +2619,9 @@ } }, "node_modules/undici": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.7.0.tgz", - "integrity": "sha512-ORgxwDkiPS+gK2VxE7iyVeR7JliVn5DqhZ4LgQqYLBXsuK+lwOEmnJ66dhvlpLM0tC3fC7eYF1Bti2frbw2eAA==", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.8.0.tgz", + "integrity": "sha512-1F7Vtcez5w/LwH2G2tGnFIihuWUlc58YidwLiCv+jR2Z50x0tNXpRRw7eOIJ+GvqCqIkg9SB7NWAJ/T9TLfv8Q==", "engines": { "node": ">=12.18" } @@ -3164,9 +3164,9 @@ "integrity": "sha512-TunPAvzwneK/m5fr4hxH3bMsrtI22nr9yjfHyo5NBGMjpsAauGNiGCmwoFf0oO3jSd2mZiKUvZwCKDaB166u2Q==" }, "discord.js": { - "version": "14.0.2", - "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.0.2.tgz", - "integrity": "sha512-aHZHwT4i5yyV4IotFm9lSSPq8mTUkYWTrpatPlT53wz8QyFUPw5XjvUxuOXlaioV1kBsgfhSjCP0BNqxfuSjRQ==", + "version": "14.0.3", + "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.0.3.tgz", + "integrity": "sha512-wH/VQl4CqN8/+dcXEtYis1iurqxGlDpEe0O4CqH5FGqZGIjVpTdtK0STXXx7bVNX8MT/0GvLZLkmO/5gLDWZVg==", "requires": { "@discordjs/builders": "^1.0.0", "@discordjs/collection": "^1.0.0", @@ -3177,7 +3177,7 @@ "fast-deep-equal": "^3.1.3", "lodash.snakecase": "^4.1.1", "tslib": "^2.4.0", - "undici": "^5.7.0", + "undici": "^5.8.0", "ws": "^8.8.1" } }, @@ -4459,9 +4459,9 @@ "dev": true }, "undici": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.7.0.tgz", - "integrity": "sha512-ORgxwDkiPS+gK2VxE7iyVeR7JliVn5DqhZ4LgQqYLBXsuK+lwOEmnJ66dhvlpLM0tC3fC7eYF1Bti2frbw2eAA==" + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.8.0.tgz", + "integrity": "sha512-1F7Vtcez5w/LwH2G2tGnFIihuWUlc58YidwLiCv+jR2Z50x0tNXpRRw7eOIJ+GvqCqIkg9SB7NWAJ/T9TLfv8Q==" }, "uri-js": { "version": "4.4.1", diff --git a/package.json b/package.json index 985c115f..08edd407 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@sern/handler", - "version": "1.1.4-beta", + "version": "1.1.5-beta", "description": "A customizable, batteries-included, powerful discord.js framework to automate and streamline bot development.", "main": "./dist/index.js", "module": "./dist/index.mjs", @@ -32,7 +32,7 @@ "author": "SernDevs", "license": "MIT", "dependencies": { - "discord.js": "^14.0.2", + "discord.js": "^14.0.3", "rxjs": "^7.5.6", "ts-pattern": "^4.0.2", "ts-results": "^3.3.0" From d8051e26ff44dda8536a1f6f6426bd89948c82af Mon Sep 17 00:00:00 2001 From: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com> Date: Wed, 20 Jul 2022 14:00:49 -0500 Subject: [PATCH 07/37] fix: crash on collectors (#89) * fix: crash on collectors * feat: bump version for bug fix --- package.json | 2 +- src/handler/events/interactionHandler.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 08edd407..af9f5e6a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@sern/handler", - "version": "1.1.5-beta", + "version": "1.1.6-beta", "description": "A customizable, batteries-included, powerful discord.js framework to automate and streamline bot development.", "main": "./dist/index.js", "module": "./dist/index.mjs", diff --git a/src/handler/events/interactionHandler.ts b/src/handler/events/interactionHandler.ts index 3bd6d851..2ef8fa9f 100644 --- a/src/handler/events/interactionHandler.ts +++ b/src/handler/events/interactionHandler.ts @@ -89,7 +89,7 @@ export default class InteractionHandler extends EventsHandler<{ protected setState(state: { event: Interaction; mod: CommandModule | undefined }): void { if (state.mod === undefined) { - this.payloadSubject.error(SernError.UndefinedModule); + this.wrapper?.sernEmitter?.emit('error', SernError.UndefinedModule); } else { //if statement above checks already, safe cast this.payloadSubject.next(state as { event: Interaction; mod: CommandModule }); From 07482e9202ed5d0adb565b5738b3480f68133306 Mon Sep 17 00:00:00 2001 From: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com> Date: Wed, 20 Jul 2022 14:36:32 -0500 Subject: [PATCH 08/37] fix: crash on collectors pt --- package.json | 2 +- src/handler/events/interactionHandler.ts | 2 +- src/types/handler.ts | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index af9f5e6a..a09ef46e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@sern/handler", - "version": "1.1.6-beta", + "version": "1.1.7-beta", "description": "A customizable, batteries-included, powerful discord.js framework to automate and streamline bot development.", "main": "./dist/index.js", "module": "./dist/index.mjs", diff --git a/src/handler/events/interactionHandler.ts b/src/handler/events/interactionHandler.ts index 2ef8fa9f..fa77a38b 100644 --- a/src/handler/events/interactionHandler.ts +++ b/src/handler/events/interactionHandler.ts @@ -89,7 +89,7 @@ export default class InteractionHandler extends EventsHandler<{ protected setState(state: { event: Interaction; mod: CommandModule | undefined }): void { if (state.mod === undefined) { - this.wrapper?.sernEmitter?.emit('error', SernError.UndefinedModule); + this.wrapper?.sernEmitter?.emit('warning', 'Found no module for this interaction'); } else { //if statement above checks already, safe cast this.payloadSubject.next(state as { event: Interaction; mod: CommandModule }); diff --git a/src/types/handler.ts b/src/types/handler.ts index b5dc1be7..81eeac3f 100644 --- a/src/types/handler.ts +++ b/src/types/handler.ts @@ -54,4 +54,5 @@ export type SernEventsMapping = { ['module.register']: [Payload]; ['module.activate']: [Payload]; ['error']: [Error | string]; + ['warning']: [string]; }; From 8cf0fe05350bfd5b4fdbefdc3b2b26040d4413c9 Mon Sep 17 00:00:00 2001 From: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com> Date: Sat, 23 Jul 2022 15:08:28 -0500 Subject: [PATCH 09/37] docs: adding some documentation for docasaurus --- src/handler/sern.ts | 36 ++++++++++++------- src/handler/structures/enums.ts | 59 ++++++++++++++++++++++++++++++- src/handler/structures/errors.ts | 15 +++++++- src/handler/structures/wrapper.ts | 7 +--- 4 files changed, 96 insertions(+), 21 deletions(-) diff --git a/src/handler/sern.ts b/src/handler/sern.ts index 444ba0a1..955ab173 100644 --- a/src/handler/sern.ts +++ b/src/handler/sern.ts @@ -40,19 +40,18 @@ export function init(wrapper: Wrapper) { * As there are infinite possibilities to adding external event emitters, * Most types aren't provided and are as narrow as possibly can. * @example - * ``` - * Sern.addExternal(new Level()) - * ``` - * ``` - * // events/level.ts - * export default eventModule({ - * emitter: 'Level', - * type : EventType.External, - * name: 'error', - * execute(args) { - * console.log(args) - * } - * }) + * // index.ts + * Sern.addExternal(new Level()) //Add this before initiating Sern! + * + * // events/level.ts + * export default eventModule({ + * emitter: 'Level', + * type : EventType.External, + * name: 'error', + * execute(args) { + * console.log(args) + * } + * }) * */ export function addExternal(emitter: T) { @@ -62,11 +61,18 @@ export function addExternal(emitter: T) { ExternalEventEmitters.set(emitter.constructor.name, emitter); } +/** + * The object passed into every plugin to control a command's behavior + */ export const controller = { next: () => Ok.EMPTY, stop: () => Err.EMPTY, }; +/** + * The wrapper function to define command modules for sern + * @param mod + */ export function commandModule(mod: InputCommandModule): CommandModule { const onEvent: EventPlugin[] = []; const plugins: CommandPlugin[] = []; @@ -84,6 +90,10 @@ export function commandModule(mod: InputCommandModule): CommandModule { plugins, } as CommandModule; } +/** + * The wrapper function to define event modules for sern + * @param mod + */ export function eventModule(mod: InputEventModule): EventModule { const onEvent: EventModuleEventPluginDefs[EventType][] = []; const plugins: EventModuleCommandPluginDefs[EventType][] = []; diff --git a/src/handler/structures/enums.ts b/src/handler/structures/enums.ts index 282eba1d..fd4b2882 100644 --- a/src/handler/structures/enums.ts +++ b/src/handler/structures/enums.ts @@ -2,29 +2,86 @@ * @enum { number }; */ export enum CommandType { + /** + * The CommandType for text commands + */ Text = 0b00000000001, + /** + * The CommandType for slash commands + */ Slash = 0b00000000010, + /** + * The CommandType for hybrid commands, text and slash + */ Both = 0b0000011, + /** + * The CommandType for UserContextMenuInteraction commands + */ MenuUser = 0b00000000100, + /** + * The CommandType for MessageContextMenuInteraction commands + */ MenuMsg = 0b0000001000, + /** + * The CommandType for ButtonInteraction commands + */ Button = 0b00000010000, + /** + * The CommandType for SelectMenuInteraction commands + */ MenuSelect = 0b00000100000, + /** + * The CommandType for ModalSubmitInteraction commands + */ Modal = 0b00001000000, } +/** + * @enum { number } + */ export enum EventType { + /** + * The EventType for handling discord events + */ Discord = 0b01, + /** + * The EventType for handling sern events + */ Sern = 0b10, + /** + * The EventType for handling external events. + * Could be for example, `process` events, database events + */ External = 0b11, } +/** + * @enum { number } + */ export enum PluginType { + /** + * The PluginType for CommandPlugins + */ Command = 0b01, + /** + * The PluginType for EventPlugins + */ Event = 0b10, } - +/** + * @enum { string } + */ export enum PayloadType { + /** + * The PayloadType for a SernEmitter success event + */ Success = 'success', + /** + * The PayloadType for a SernEmitter failure event + */ Failure = 'failure', + /** + * The PayloadType for a SernEmitter warning event + */ Warning = 'warning', } diff --git a/src/handler/structures/errors.ts b/src/handler/structures/errors.ts index 6d6a8989..2001cd18 100644 --- a/src/handler/structures/errors.ts +++ b/src/handler/structures/errors.ts @@ -1,6 +1,19 @@ +/** + * @enum { string } + */ export enum SernError { + /** + * Throws when registering an invalid module. + * This means it is undefined or an invalid command type was provided + */ NonValidModuleType = 'Detected an unknown module type', - UndefinedModule = `A module could not be detected at`, + /** + * Attempted to lookup module in command module store. Nothing was found! + */ + UndefinedModule = `A module could not be detected`, + /** + * Attempted to lookup module in command module store. Nothing was found! + */ MismatchModule = `A module type mismatched with event emitted!`, NotSupportedInteraction = `This interaction is not supported.`, PluginFailure = `A plugin failed to call controller.next()`, diff --git a/src/handler/structures/wrapper.ts b/src/handler/structures/wrapper.ts index 8b1c59ce..a30444fc 100644 --- a/src/handler/structures/wrapper.ts +++ b/src/handler/structures/wrapper.ts @@ -3,13 +3,8 @@ import type SernEmitter from '../sernEmitter'; import type { EventModule } from './module'; /** - * An object to be passed into Sern.Handler constructor. + * An object to be passed into Sern.init function. * @typedef {object} Wrapper - * @property {readonly Client} client - * @prop { readonly SernEmitter } sernEmitter - * @property {readonly string} defaultPrefix - * @property {readonly string} commands - * @prop { readonly DiscordEvent[] } events */ interface Wrapper { readonly client: Client; From 6a47abb60f2a0e5e4fb87602ad51185507162e79 Mon Sep 17 00:00:00 2001 From: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com> Date: Sat, 23 Jul 2022 15:17:36 -0500 Subject: [PATCH 10/37] docs: add errors.ts comments --- src/handler/structures/errors.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/handler/structures/errors.ts b/src/handler/structures/errors.ts index 2001cd18..2fae5580 100644 --- a/src/handler/structures/errors.ts +++ b/src/handler/structures/errors.ts @@ -15,8 +15,20 @@ export enum SernError { * Attempted to lookup module in command module store. Nothing was found! */ MismatchModule = `A module type mismatched with event emitted!`, + /** + * Unsupported interaction at this moment. + */ NotSupportedInteraction = `This interaction is not supported.`, + /** + * One plugin called `controller.stop()` (end command execution / loading) + */ PluginFailure = `A plugin failed to call controller.next()`, + /** + * A crash that occurs when accessing an invalid property of Context + */ MismatchEvent = `You cannot use message when an interaction fired or vice versa`, + /** + * Unsupported feature attemped to access at this time + */ NotSupportedYet = `This feature is not supported yet`, } From 1e462d93a4664f755b4742a3dfbcfdf1175bdf66 Mon Sep 17 00:00:00 2001 From: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com> Date: Sat, 23 Jul 2022 16:23:33 -0500 Subject: [PATCH 11/37] docs: refactor comments --- src/handler/sern.ts | 16 +++++++++------- src/handler/structures/enums.ts | 12 +++++++++++- src/handler/structures/errors.ts | 2 +- src/handler/structures/events.ts | 10 +++++++++- src/handler/structures/module.ts | 4 +--- src/handler/structures/wrapper.ts | 2 +- 6 files changed, 32 insertions(+), 14 deletions(-) diff --git a/src/handler/sern.ts b/src/handler/sern.ts index 955ab173..9e8be106 100644 --- a/src/handler/sern.ts +++ b/src/handler/sern.ts @@ -20,8 +20,8 @@ import MessageHandler from './events/messageHandler'; /** * - * @param wrapper options to pass into sern. - * Function to start the handler up. + * @param wrapper Options to pass into sern. + * Function to start the handler up */ export function init(wrapper: Wrapper) { const { events } = wrapper; @@ -40,10 +40,12 @@ export function init(wrapper: Wrapper) { * As there are infinite possibilities to adding external event emitters, * Most types aren't provided and are as narrow as possibly can. * @example - * // index.ts - * Sern.addExternal(new Level()) //Add this before initiating Sern! - * - * // events/level.ts + * ```ts title ="src/index.ts" + * //Add this before initiating Sern! + * Sern.addExternal(new Level()) + * ``` + * @example + * ```ts title ="events/level.ts" * export default eventModule({ * emitter: 'Level', * type : EventType.External, @@ -52,7 +54,7 @@ export function init(wrapper: Wrapper) { * console.log(args) * } * }) - * + * ``` */ export function addExternal(emitter: T) { if (ExternalEventEmitters.has(emitter.constructor.name)) { diff --git a/src/handler/structures/enums.ts b/src/handler/structures/enums.ts index fd4b2882..a204707a 100644 --- a/src/handler/structures/enums.ts +++ b/src/handler/structures/enums.ts @@ -1,5 +1,15 @@ /** - * @enum { number }; + * @enum { number } + * @example + * ```ts + * export default commandModule({ + * type : CommandType.Text, + * name : 'a text command' + * execute(message) { + * console.log(message.content) + * } + * }) + * ``` */ export enum CommandType { /** diff --git a/src/handler/structures/errors.ts b/src/handler/structures/errors.ts index 2fae5580..4a0aa53e 100644 --- a/src/handler/structures/errors.ts +++ b/src/handler/structures/errors.ts @@ -28,7 +28,7 @@ export enum SernError { */ MismatchEvent = `You cannot use message when an interaction fired or vice versa`, /** - * Unsupported feature attemped to access at this time + * Unsupported feature attempted to access at this time */ NotSupportedYet = `This feature is not supported yet`, } diff --git a/src/handler/structures/events.ts b/src/handler/structures/events.ts index dd562ab7..15f993e1 100644 --- a/src/handler/structures/events.ts +++ b/src/handler/structures/events.ts @@ -11,6 +11,9 @@ import type { import type { Awaitable, ClientEvents } from 'discord.js'; import type { EventType } from './enums'; +/* + * Mapped type to generate all sern event modules + */ export type SernEventCommand = Override< BaseModule, @@ -22,6 +25,9 @@ export type SernEventCommand; } >; +/* + * Mapped type to generate all discord event modules + */ export type DiscordEventCommand = Override< BaseModule, { @@ -32,7 +38,9 @@ export type DiscordEventCommand; } >; - +/* + * Type for any event emitter that can be handled by sern + */ export type ExternalEventCommand = Override< BaseModule, { diff --git a/src/handler/structures/module.ts b/src/handler/structures/module.ts index f4e1c3ea..97de4487 100644 --- a/src/handler/structures/module.ts +++ b/src/handler/structures/module.ts @@ -30,7 +30,6 @@ export interface BaseModule { execute: (ctx: Context, args: Args) => Awaitable; } -//possible refactoring types into interfaces and not types export type TextCommand = Override< BaseModule, { @@ -118,7 +117,6 @@ export type ModalSubmitCommand = Override< // Autocomplete commands are a little different // They can't have command plugins as they are // in conjunction with chat input commands -// TODO: possibly in future, allow Autocmp commands in separate files? export type AutocompleteCommand = Override< BaseModule, { @@ -178,7 +176,7 @@ export type SernAutocompleteData = Override< >; /** - * Type that just uses SernAutocompleteData and not regular autocomplete + * Type that replaces autocomplete with {@link SernAutocompleteData} */ export type BaseOptions = | ApplicationCommandChoicesData diff --git a/src/handler/structures/wrapper.ts b/src/handler/structures/wrapper.ts index a30444fc..f7ad6649 100644 --- a/src/handler/structures/wrapper.ts +++ b/src/handler/structures/wrapper.ts @@ -3,7 +3,7 @@ import type SernEmitter from '../sernEmitter'; import type { EventModule } from './module'; /** - * An object to be passed into Sern.init function. + * An object to be passed into init function. * @typedef {object} Wrapper */ interface Wrapper { From c0958c6c281cecd3fe4bacd1c7ab004a6b381885 Mon Sep 17 00:00:00 2001 From: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com> Date: Sat, 23 Jul 2022 17:29:55 -0500 Subject: [PATCH 12/37] docs: adding examples --- src/handler/plugins/plugin.ts | 2 +- src/handler/sern.ts | 12 ++++++++++-- src/handler/structures/enums.ts | 22 ++++++++++++++++++++++ 3 files changed, 33 insertions(+), 3 deletions(-) diff --git a/src/handler/plugins/plugin.ts b/src/handler/plugins/plugin.ts index cd67fc2c..3f289b9f 100644 --- a/src/handler/plugins/plugin.ts +++ b/src/handler/plugins/plugin.ts @@ -7,7 +7,7 @@ * The goal of plugins is to organize commands and * provide extensions to repetitive patterns * examples include refreshing modules, - * categorizing commands, cooldowns, permissions, etc. + * categorizing commands, cool-downs, permissions, etc. * Plugins are reminiscent of middleware in express. */ diff --git a/src/handler/sern.ts b/src/handler/sern.ts index 9e8be106..86b745fb 100644 --- a/src/handler/sern.ts +++ b/src/handler/sern.ts @@ -22,6 +22,14 @@ import MessageHandler from './events/messageHandler'; * * @param wrapper Options to pass into sern. * Function to start the handler up + * @example + * ```ts title="src/index.ts" + * Sern.init({ + * client, + * defaultPrefix: '!', + * commands: 'dist/commands', + * }) + * ``` */ export function init(wrapper: Wrapper) { const { events } = wrapper; @@ -40,12 +48,12 @@ export function init(wrapper: Wrapper) { * As there are infinite possibilities to adding external event emitters, * Most types aren't provided and are as narrow as possibly can. * @example - * ```ts title ="src/index.ts" + * ```ts title="src/index.ts" * //Add this before initiating Sern! * Sern.addExternal(new Level()) * ``` * @example - * ```ts title ="events/level.ts" + * ```ts title="events/level.ts" * export default eventModule({ * emitter: 'Level', * type : EventType.External, diff --git a/src/handler/structures/enums.ts b/src/handler/structures/enums.ts index a204707a..29d5cae1 100644 --- a/src/handler/structures/enums.ts +++ b/src/handler/structures/enums.ts @@ -3,6 +3,7 @@ * @example * ```ts * export default commandModule({ + * // highlight-next-line * type : CommandType.Text, * name : 'a text command' * execute(message) { @@ -48,6 +49,17 @@ export enum CommandType { /** * @enum { number } + * @example + * ```ts + * export default eventModule({ + * //highlight-next-line + * type : EventType.Discord, + * name : 'guildMemberAdd' + * execute(member : GuildMember) { + * console.log(member) + * } + * }) + * ``` */ export enum EventType { /** @@ -67,6 +79,16 @@ export enum EventType { /** * @enum { number } + * @example + * ```ts + * export default function myPlugin() : EventPlugin { + * //highlight-next-line + * type : PluginType.Event, + * execute([ctx, args], controller) { + * return controller.next(); + * } + * } + * ``` */ export enum PluginType { /** From d8eaac7d7670ec54acf4ce3571dbc975661eaed0 Mon Sep 17 00:00:00 2001 From: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com> Date: Mon, 25 Jul 2022 20:42:51 -0500 Subject: [PATCH 13/37] feat: refresh package-lock.json --- package-lock.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8c1ce61e..ce98c57d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@sern/handler", - "version": "1.1.5-beta", + "version": "1.1.7-beta", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@sern/handler", - "version": "1.1.5-beta", + "version": "1.1.7-beta", "license": "MIT", "dependencies": { "discord.js": "^14.0.3", @@ -1444,9 +1444,9 @@ } }, "node_modules/file-type": { - "version": "17.1.2", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-17.1.2.tgz", - "integrity": "sha512-3thBUSfa9YEUEGO/NAAiQGvjujZxZiJTF6xNwyDn6kB0NcEtwMn5ttkGG9jGwm/Nt/t8U1bpBNqyBNZCz4F4ig==", + "version": "17.1.3", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-17.1.3.tgz", + "integrity": "sha512-MFVSozBIhvnx2dkxlf+010Xqn6+ojlMUT9LXQiPNoOijgRtXNMghWdGK0u2o1RoCqzHoVsw65IL8ZBcQ4MhIrw==", "dependencies": { "readable-web-to-node-stream": "^3.0.2", "strtok3": "^7.0.0-alpha.7", @@ -3665,9 +3665,9 @@ } }, "file-type": { - "version": "17.1.2", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-17.1.2.tgz", - "integrity": "sha512-3thBUSfa9YEUEGO/NAAiQGvjujZxZiJTF6xNwyDn6kB0NcEtwMn5ttkGG9jGwm/Nt/t8U1bpBNqyBNZCz4F4ig==", + "version": "17.1.3", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-17.1.3.tgz", + "integrity": "sha512-MFVSozBIhvnx2dkxlf+010Xqn6+ojlMUT9LXQiPNoOijgRtXNMghWdGK0u2o1RoCqzHoVsw65IL8ZBcQ4MhIrw==", "requires": { "readable-web-to-node-stream": "^3.0.2", "strtok3": "^7.0.0-alpha.7", From 84cae8c4c9613015af10ce0c6b8ad97cad5d8d0f Mon Sep 17 00:00:00 2001 From: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com> Date: Thu, 28 Jul 2022 18:20:17 -0500 Subject: [PATCH 14/37] refactor: destructure and clean namespaces --- src/handler/events/interactionHandler.ts | 42 ++++++++++++------------ 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/src/handler/events/interactionHandler.ts b/src/handler/events/interactionHandler.ts index fa77a38b..904e8c7e 100644 --- a/src/handler/events/interactionHandler.ts +++ b/src/handler/events/interactionHandler.ts @@ -59,24 +59,24 @@ export default class InteractionHandler extends EventsHandler<{ override init() { this.discordEvent.subscribe({ - next: interaction => { - if (isMessageComponent(interaction)) { - const mod = Files.MessageCompCommands[interaction.componentType].get( - interaction.customId, + next: event => { + if (isMessageComponent(event)) { + const mod = Files.MessageCompCommands[event.componentType].get( + event.customId, ); - this.setState({ event: interaction, mod }); - } else if (isApplicationCommand(interaction) || isAutocomplete(interaction)) { + this.setState({ event, mod }); + } else if (isApplicationCommand(event) || isAutocomplete(event)) { const mod = - Files.ApplicationCommands[interaction.commandType].get( - interaction.commandName, - ) ?? Files.BothCommands.get(interaction.commandName); - this.setState({ event: interaction, mod }); - } else if (isModalSubmit(interaction)) { + Files.ApplicationCommands[event.commandType].get( + event.commandName, + ) ?? Files.BothCommands.get(event.commandName); + this.setState({ event, mod }); + } else if (isModalSubmit(event)) { /** * maybe move modal submits into message component object maps? */ - const mod = Files.ModalSubmitCommands.get(interaction.customId); - this.setState({ event: interaction, mod }); + const mod = Files.ModalSubmitCommands.get(event.customId); + this.setState({ event, mod }); } else { throw Error('This interaction is not supported yet'); } @@ -96,31 +96,31 @@ export default class InteractionHandler extends EventsHandler<{ } } - protected processModules(payload: { event: Interaction; mod: CommandModule }) { - return match(payload.mod) + protected processModules({ mod, event }: { event: Interaction; mod: CommandModule }) { + return match(mod) .with( { type: P.union(CommandType.Slash, CommandType.Both) }, - applicationCommandDispatcher(payload.event), + applicationCommandDispatcher(event), ) .with( { type: CommandType.Modal }, - modalCommandDispatcher(payload.event as ModalSubmitInteraction), + modalCommandDispatcher(event as ModalSubmitInteraction), ) .with( { type: CommandType.Button }, - buttonCommandDispatcher(payload.event as ButtonInteraction), + buttonCommandDispatcher(event as ButtonInteraction), ) .with( { type: CommandType.MenuSelect }, - selectMenuCommandDispatcher(payload.event as SelectMenuInteraction), + selectMenuCommandDispatcher(event as SelectMenuInteraction), ) .with( { type: CommandType.MenuUser }, - ctxMenuUserDispatcher(payload.event as UserContextMenuCommandInteraction), + ctxMenuUserDispatcher(event as UserContextMenuCommandInteraction), ) .with( { type: CommandType.MenuMsg }, - ctxMenuMsgDispatcher(payload.event as MessageContextMenuCommandInteraction), + ctxMenuMsgDispatcher(event as MessageContextMenuCommandInteraction), ) .otherwise(() => { throw Error(SernError.MismatchModule); From 6c287a69c3385d98a8f5547b9ed793f1aebbbab2 Mon Sep 17 00:00:00 2001 From: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com> Date: Fri, 29 Jul 2022 21:26:09 -0500 Subject: [PATCH 15/37] feat: add regen package.json script --- scripts/mkjson.mjs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 scripts/mkjson.mjs diff --git a/scripts/mkjson.mjs b/scripts/mkjson.mjs new file mode 100644 index 00000000..80b6b9b7 --- /dev/null +++ b/scripts/mkjson.mjs @@ -0,0 +1,15 @@ +import { writeFile } from 'fs/promises' +import { join } from 'path'; +//A quick script to regenerate package.jsons for each cjs and esm after tsup cleans distributions +const locations = process.argv; +locations.shift(); +locations.shift(); +for(const loc of locations) { + if(loc.endsWith('cjs')) { + await writeFile(join(loc, 'package.json'), JSON.stringify({ type : 'commonjs' })) + } else { + await writeFile(join(loc, 'package.json'), JSON.stringify({ type : 'module' })) + } +} + + From 11b814e904116e066ba55b331c07056ea9670da5 Mon Sep 17 00:00:00 2001 From: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com> Date: Fri, 29 Jul 2022 21:29:39 -0500 Subject: [PATCH 16/37] feat: add tsup, remove tsc, add scripts --- package.json | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index a09ef46e..685fb114 100644 --- a/package.json +++ b/package.json @@ -2,22 +2,21 @@ "name": "@sern/handler", "version": "1.1.7-beta", "description": "A customizable, batteries-included, powerful discord.js framework to automate and streamline bot development.", - "main": "./dist/index.js", - "module": "./dist/index.mjs", - "types": "./dist/index.d.ts", + "main": "dist/cjs/index.cjs", + "module": "dist/esm/index.mjs", + "types": "dist/index.d.ts", "exports": { ".": { - "require": "./dist/index.js", - "import": "./dist/index.mjs", - "types": "./dist/index.d.ts" + "import": "./dist/esm/index.mjs", + "require": "./dist/cjs/index.cjs" } }, "scripts": { - "compile": "tsc", + "compile": "tsc -p tsconfig.json && tsc -p tsconfig-cjs.json", "watch": "tsc -w", "lint": "eslint src/**/*.ts", "format": "eslint src/**/*.ts --fix", - "build": "tsup src/index.ts --format cjs,esm --dts --clean", + "build" : "tsup && node scripts/mkjson.mjs dist/cjs dist/esm && tsup --dts-only --outDir dist", "publish": "npm run build && npm publish" }, "keywords": [ @@ -42,8 +41,7 @@ "@typescript-eslint/parser": "5.30.3", "eslint": "8.19.0", "prettier": "2.7.1", - "tsup": "^6.1.3", - "typescript": "4.7.4" + "tsup": "^6.1.3" }, "repository": { "type": "git", From 1abe9cef062d51af03a5b607d4b65934f1fb7c46 Mon Sep 17 00:00:00 2001 From: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com> Date: Fri, 29 Jul 2022 21:30:41 -0500 Subject: [PATCH 17/37] feat: update ts-results import style --- src/handler/events/readyHandler.ts | 3 ++- src/handler/plugins/plugin.ts | 6 +++--- src/handler/sern.ts | 3 ++- src/handler/structures/context.ts | 3 ++- src/handler/utilities/predicates.ts | 2 +- src/handler/utilities/readFile.ts | 14 +++++++------- 6 files changed, 17 insertions(+), 14 deletions(-) diff --git a/src/handler/events/readyHandler.ts b/src/handler/events/readyHandler.ts index 64d69740..01602b18 100644 --- a/src/handler/events/readyHandler.ts +++ b/src/handler/events/readyHandler.ts @@ -11,7 +11,8 @@ import { processCommandPlugins } from './userDefinedEventsHandling'; import type { Awaitable } from 'discord.js'; import { SernError } from '../structures/errors'; import { match } from 'ts-pattern'; -import { Err, Ok, type Result } from 'ts-results'; +import tsResult, { type Result } from 'ts-results'; +const { Err, Ok } = tsResult; import { ApplicationCommandType, ComponentType } from 'discord.js'; export default class ReadyHandler extends EventsHandler<{ diff --git a/src/handler/plugins/plugin.ts b/src/handler/plugins/plugin.ts index 3f289b9f..40bc03b5 100644 --- a/src/handler/plugins/plugin.ts +++ b/src/handler/plugins/plugin.ts @@ -12,9 +12,9 @@ */ import type { AutocompleteInteraction, Awaitable, Client, ClientEvents } from 'discord.js'; -import type { Err, Ok, Result } from 'ts-results'; -import type { CommandType, DefinitelyDefined, Override, SernEventsMapping } from '../..'; -import { EventType, PluginType } from '../..'; +import type { Result, Ok, Err } from 'ts-results'; +import type { CommandType, DefinitelyDefined, Override, SernEventsMapping } from '../../index'; +import { EventType, PluginType } from '../../index'; import type { BaseModule, CommandModuleDefs, EventModuleDefs } from '../structures/module'; import type { EventEmitter } from 'events'; import type { diff --git a/src/handler/sern.ts b/src/handler/sern.ts index 86b745fb..cdb4fac9 100644 --- a/src/handler/sern.ts +++ b/src/handler/sern.ts @@ -1,5 +1,6 @@ import type Wrapper from './structures/wrapper'; -import { Err, Ok } from 'ts-results'; +import tsResult from 'ts-results'; +const { Err, Ok } = tsResult; import { ExternalEventEmitters } from './utilities/readFile'; import type { EventEmitter } from 'events'; import { processEvents } from './events/userDefinedEventsHandling'; diff --git a/src/handler/structures/context.ts b/src/handler/structures/context.ts index 18be5d54..de2ba825 100644 --- a/src/handler/structures/context.ts +++ b/src/handler/structures/context.ts @@ -11,7 +11,8 @@ import type { TextBasedChannel, User, } from 'discord.js'; -import { None, Option, Some } from 'ts-results'; +import tsResult, { type Option } from 'ts-results'; +const { None, Some } = tsResult; import type { Nullish } from '../../types/handler'; import { ExternallyUsed } from '../utilities/externallyUsed'; import { SernError } from './errors'; diff --git a/src/handler/utilities/predicates.ts b/src/handler/utilities/predicates.ts index cced6422..cbbd3fd4 100644 --- a/src/handler/utilities/predicates.ts +++ b/src/handler/utilities/predicates.ts @@ -15,7 +15,7 @@ import type { ExternalEventCommand, SernEventCommand, } from '../structures/events'; -import { EventType } from '../..'; +import { EventType } from '../../index'; export function correctModuleType( plug: Module | undefined, diff --git a/src/handler/utilities/readFile.ts b/src/handler/utilities/readFile.ts index 51b4544c..1deb166f 100644 --- a/src/handler/utilities/readFile.ts +++ b/src/handler/utilities/readFile.ts @@ -1,10 +1,11 @@ import { ApplicationCommandType, ComponentType } from 'discord.js'; import { readdirSync, statSync } from 'fs'; import { join } from 'path'; -import { from, Observable } from 'rxjs'; +import { type Observable, from, concatAll } from 'rxjs'; import type { CommandModule } from '../structures/module'; import { SernError } from '../structures/errors'; -import { Err, Ok, type Result } from 'ts-results'; +import tsResult, { type Result } from 'ts-results'; +const { Err, Ok } = tsResult; import type { EventEmitter } from 'events'; //Maybe move this? this probably doesnt belong in utlities/ @@ -63,15 +64,14 @@ export function buildData(commandDir: string): Observable< > > { const commands = getCommands(commandDir); - return from( - commands.map(absPath => { + return from(Promise.all(commands.map(async absPath => { // eslint-disable-next-line @typescript-eslint/no-var-requires - const mod = require(absPath).default; + const mod = (await import(`file:///` +absPath)).default as T | undefined; if (mod !== undefined) { return Ok({ mod, absPath }); } else return Err(SernError.UndefinedModule); - }), - ); + }) + )).pipe(concatAll()); } export function getCommands(dir: string): string[] { From 5c2cedcc392bdd3011dd7964957540c30b774859 Mon Sep 17 00:00:00 2001 From: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com> Date: Fri, 29 Jul 2022 21:33:01 -0500 Subject: [PATCH 18/37] feat: readd typescript because idk if i should --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 685fb114..27d3f108 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,8 @@ "@typescript-eslint/parser": "5.30.3", "eslint": "8.19.0", "prettier": "2.7.1", - "tsup": "^6.1.3" + "tsup": "^6.1.3", + "typescript": "4.7.4" }, "repository": { "type": "git", From 8e826050ad79000143e8e0c230c3f3ca47a5734f Mon Sep 17 00:00:00 2001 From: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com> Date: Fri, 29 Jul 2022 21:33:15 -0500 Subject: [PATCH 19/37] feat: breakup tsconfigs and add tsup config --- tsconfig-base.json | 18 ++++++++++++++++++ tsconfig-cjs.json | 8 ++++++++ tsconfig.json | 25 ++++++------------------- tsup.config.js | 36 ++++++++++++++++++++++++++++++++++++ 4 files changed, 68 insertions(+), 19 deletions(-) create mode 100644 tsconfig-base.json create mode 100644 tsconfig-cjs.json create mode 100644 tsup.config.js diff --git a/tsconfig-base.json b/tsconfig-base.json new file mode 100644 index 00000000..a853f4d8 --- /dev/null +++ b/tsconfig-base.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "experimentalDecorators": true, + "rootDir": "src", + "strict": true, + "esModuleInterop": true, + "noImplicitAny": true, + "strictNullChecks": true, + "importsNotUsedAsValues": "error", + "moduleResolution": "node", + "skipLibCheck": true, + "declaration": true, + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + }, + "exclude": ["node_modules", "dist"], + "include": ["src"], +} diff --git a/tsconfig-cjs.json b/tsconfig-cjs.json new file mode 100644 index 00000000..5a569887 --- /dev/null +++ b/tsconfig-cjs.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig-base.json", + "compilerOptions": { + "module": "commonjs", + "outDir": "dist/cjs", + "target": "esnext" + } +} \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index c1ef65d9..a6fd3678 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,21 +1,8 @@ { + "extends": "./tsconfig-base.json", "compilerOptions": { - "experimentalDecorators": true, - "resolveJsonModule": true, - "target": "esnext", - "module": "commonjs", - "outDir": "dist", - "rootDir": "src", - "strict": true, - "esModuleInterop": true, - "noImplicitAny": true, - "strictNullChecks": true, - "importsNotUsedAsValues": "error", - "moduleResolution": "node", - "skipLibCheck": true, - "declaration": true, - "forceConsistentCasingInFileNames": true, - }, - "exclude": ["node_modules", "dist"], - "include": ["src"], -} + "module": "esnext", + "outDir": "dist/esm", + "target": "esnext" + } +} \ No newline at end of file diff --git a/tsup.config.js b/tsup.config.js new file mode 100644 index 00000000..3f82e031 --- /dev/null +++ b/tsup.config.js @@ -0,0 +1,36 @@ +import { defineConfig } from 'tsup'; + +export default defineConfig([ + { + entry: ['src/index.ts'], + format : 'esm', + sourcemap: false, + target: 'node16', + tsconfig : './tsconfig.json', + outDir : './dist/esm', + platform: 'node', + clean: true, + treeshake: true, + outExtension() { + return { + js : '.mjs' + }; + } + }, + { + entry: ['src/index.ts'], + format : 'cjs', + splitting: false, + sourcemap: false, + clean: true, + target: 'node16', + tsconfig : './tsconfig-cjs.json', + outDir : './dist/cjs', + platform: 'node', + outExtension() { + return { + js : '.cjs' + }; + } + } +]); From d9f9b871494941c359067d1cf699bfeea954a264 Mon Sep 17 00:00:00 2001 From: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com> Date: Tue, 2 Aug 2022 12:25:42 -0500 Subject: [PATCH 20/37] feat: add esm json tsconfig to git --- tsconfig-esm.json | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 tsconfig-esm.json diff --git a/tsconfig-esm.json b/tsconfig-esm.json new file mode 100644 index 00000000..d82e95d7 --- /dev/null +++ b/tsconfig-esm.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "module": "esnext", + "outDir": "dist/esm", + "target": "esnext" + } +} \ No newline at end of file From 78a17f4ff7f320a661120162e4937a3ef6e79bdf Mon Sep 17 00:00:00 2001 From: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com> Date: Fri, 5 Aug 2022 13:36:21 -0500 Subject: [PATCH 21/37] build: update dependencies and move to ts-result-es --- package-lock.json | 190 +++++++++++++++++++++++----------------------- package.json | 6 +- tsconfig-cjs.json | 2 +- 3 files changed, 99 insertions(+), 99 deletions(-) diff --git a/package-lock.json b/package-lock.json index ce98c57d..4d48b87d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,10 +9,10 @@ "version": "1.1.7-beta", "license": "MIT", "dependencies": { - "discord.js": "^14.0.3", + "discord.js": "^14.1.2", "rxjs": "^7.5.6", "ts-pattern": "^4.0.2", - "ts-results": "^3.3.0" + "ts-results-es": "^3.5.0" }, "devDependencies": { "@typescript-eslint/eslint-plugin": "5.30.3", @@ -24,12 +24,12 @@ } }, "node_modules/@discordjs/builders": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-1.0.0.tgz", - "integrity": "sha512-8y91ZfpOHubiGJu5tVyGI9tQCEyHZDTeqUWVcJd0dq7B96xIf84S0L4fwmD1k9zTe1eqEFSk0gc7BpY+FKn7Ww==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-1.1.0.tgz", + "integrity": "sha512-EO8TSltiIc9Z1wE854wAFvv5AccqEtvjFmao9PPoxQhRaJ0hEb7FwWRTCA1jGg4ZWI3hcp4m+RET5ufZQz3rOg==", "dependencies": { "@sapphire/shapeshift": "^3.5.1", - "discord-api-types": "^0.36.2", + "discord-api-types": "^0.36.3", "fast-deep-equal": "^3.1.3", "ts-mixer": "^6.0.1", "tslib": "^2.4.0" @@ -39,25 +39,25 @@ } }, "node_modules/@discordjs/collection": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-1.0.0.tgz", - "integrity": "sha512-nAxDQYE5dNAzEGQ7HU20sujDsG5vLowUKCEqZkKUIlrXERZFTt/60zKUj/g4+AVCGeq+pXC5hivMaNtiC+PY5Q==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-1.0.1.tgz", + "integrity": "sha512-5V/wswzR3r2RVYXLxxg4TvrAnBhVCNgHTXhC+OUtLoriJ072rPMHo+Iw1SS1vrCckp8Es40XM411+WkNRPaXFw==", "engines": { "node": ">=16.9.0" } }, "node_modules/@discordjs/rest": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-1.0.0.tgz", - "integrity": "sha512-uDAvnE0P2a8axMdD4C51EGjvCRQ2HZk2Yxf6vHWZgIqG87D8DGKMPwmquIxrrB07MjV+rwci2ObU+mGhGP+bJg==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-1.0.1.tgz", + "integrity": "sha512-w08CTKVzzYYvKxEjXKOs9AdS7KQ1J502TrPfF8eCZ2lF6AfKuMP/32YgDakiwIyYTDjEQS/v0nKLSFcncHRMtg==", "dependencies": { - "@discordjs/collection": "^1.0.0", + "@discordjs/collection": "^1.0.1", "@sapphire/async-queue": "^1.3.2", "@sapphire/snowflake": "^3.2.2", - "discord-api-types": "^0.36.2", - "file-type": "^17.1.2", + "discord-api-types": "^0.36.3", + "file-type": "^17.1.4", "tslib": "^2.4.0", - "undici": "^5.7.0" + "undici": "^5.8.0" }, "engines": { "node": ">=16.9.0" @@ -649,21 +649,21 @@ } }, "node_modules/discord-api-types": { - "version": "0.36.2", - "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.36.2.tgz", - "integrity": "sha512-TunPAvzwneK/m5fr4hxH3bMsrtI22nr9yjfHyo5NBGMjpsAauGNiGCmwoFf0oO3jSd2mZiKUvZwCKDaB166u2Q==" + "version": "0.36.3", + "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.36.3.tgz", + "integrity": "sha512-bz/NDyG0KBo/tY14vSkrwQ/n3HKPf87a0WFW/1M9+tXYK+vp5Z5EksawfCWo2zkAc6o7CClc0eff1Pjrqznlwg==" }, "node_modules/discord.js": { - "version": "14.0.3", - "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.0.3.tgz", - "integrity": "sha512-wH/VQl4CqN8/+dcXEtYis1iurqxGlDpEe0O4CqH5FGqZGIjVpTdtK0STXXx7bVNX8MT/0GvLZLkmO/5gLDWZVg==", + "version": "14.1.2", + "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.1.2.tgz", + "integrity": "sha512-apdWNLkjAkeEnuNpB8H6rS/4OgrXQlSAjuuzeodjCOdIXy3OwOjD314V/HiSttcAlr9+r3ONhaT5qvbDad5SIg==", "dependencies": { - "@discordjs/builders": "^1.0.0", - "@discordjs/collection": "^1.0.0", - "@discordjs/rest": "^1.0.0", + "@discordjs/builders": "^1.1.0", + "@discordjs/collection": "^1.0.1", + "@discordjs/rest": "^1.0.1", "@sapphire/snowflake": "^3.2.2", "@types/ws": "^8.5.3", - "discord-api-types": "^0.36.2", + "discord-api-types": "^0.36.3", "fast-deep-equal": "^3.1.3", "lodash.snakecase": "^4.1.1", "tslib": "^2.4.0", @@ -1444,12 +1444,12 @@ } }, "node_modules/file-type": { - "version": "17.1.3", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-17.1.3.tgz", - "integrity": "sha512-MFVSozBIhvnx2dkxlf+010Xqn6+ojlMUT9LXQiPNoOijgRtXNMghWdGK0u2o1RoCqzHoVsw65IL8ZBcQ4MhIrw==", + "version": "17.1.6", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-17.1.6.tgz", + "integrity": "sha512-hlDw5Ev+9e883s0pwUsuuYNu4tD7GgpUnOvykjv1Gya0ZIjuKumthDRua90VUn6/nlRKAjcxLUnHNTIUWwWIiw==", "dependencies": { "readable-web-to-node-stream": "^3.0.2", - "strtok3": "^7.0.0-alpha.7", + "strtok3": "^7.0.0-alpha.9", "token-types": "^5.0.0-alpha.2" }, "engines": { @@ -2022,11 +2022,11 @@ } }, "node_modules/peek-readable": { - "version": "5.0.0-alpha.5", - "resolved": "https://registry.npmjs.org/peek-readable/-/peek-readable-5.0.0-alpha.5.tgz", - "integrity": "sha512-pJohF/tDwV3ntnT5+EkUo4E700q/j/OCDuPxtM+5/kFGjyOai/sK4/We4Cy1MB2OiTQliWU5DxPvYIKQAdPqAA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/peek-readable/-/peek-readable-5.0.0.tgz", + "integrity": "sha512-YtCKvLUOvwtMGmrniQPdO7MwPjgkFBtFIrmfSbYmYuq3tKDV/mcfAhBth1+C3ru7uXIZasc/pHnb+YDYNkkj4A==", "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + "node": ">=14.16" }, "funding": { "type": "github", @@ -2380,15 +2380,15 @@ } }, "node_modules/strtok3": { - "version": "7.0.0-alpha.8", - "resolved": "https://registry.npmjs.org/strtok3/-/strtok3-7.0.0-alpha.8.tgz", - "integrity": "sha512-u+k19v+rTxBjGYxncRQjGvZYwYvEd0uP3D+uHKe/s4WB1eXS5ZwpZsTlBu5xSS4zEd89mTXECXg6WW3FSeV8cA==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/strtok3/-/strtok3-7.0.0.tgz", + "integrity": "sha512-pQ+V+nYQdC5H3Q7qBZAz/MO6lwGhoC2gOAjuouGf/VO0m7vQRh8QNMl2Uf6SwAtzZ9bOw3UIeBukEGNJl5dtXQ==", "dependencies": { "@tokenizer/token": "^0.3.0", - "peek-readable": "^5.0.0-alpha.5" + "peek-readable": "^5.0.0" }, "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + "node": ">=14.16" }, "funding": { "type": "github", @@ -2456,15 +2456,15 @@ } }, "node_modules/token-types": { - "version": "5.0.0-alpha.2", - "resolved": "https://registry.npmjs.org/token-types/-/token-types-5.0.0-alpha.2.tgz", - "integrity": "sha512-EsG9UxAW4M6VATrEEjhPFTKEUi1OiJqTUMIZOGBN49fGxYjZB36k0p7to3HZSmWRoHm1QfZgrg3e02fpqAt5fQ==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/token-types/-/token-types-5.0.1.tgz", + "integrity": "sha512-Y2fmSnZjQdDb9W4w4r1tswlMHylzWIeOKpx0aZH9BgGtACHhrk3OkT52AzwcuqTRBZtvvnTjDBh8eynMulu8Vg==", "dependencies": { "@tokenizer/token": "^0.3.0", "ieee754": "^1.2.1" }, "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + "node": ">=14.16" }, "funding": { "type": "github", @@ -2505,10 +2505,10 @@ "resolved": "https://registry.npmjs.org/ts-pattern/-/ts-pattern-4.0.4.tgz", "integrity": "sha512-gDKHf3T+4X2w5k5IpD4FQ6P5b0LRYW7sJdf/yG7uAdxKitgk2Z8UZLdSBjrXs5mI0Vq6E/hRQd6+Kh3FbdjBzw==" }, - "node_modules/ts-results": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/ts-results/-/ts-results-3.3.0.tgz", - "integrity": "sha512-FWqxGX2NHp5oCyaMd96o2y2uMQmSu8Dey6kvyuFdRJ2AzfmWo3kWa4UsPlCGlfQ/qu03m09ZZtppMoY8EMHuiA==" + "node_modules/ts-results-es": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/ts-results-es/-/ts-results-es-3.5.0.tgz", + "integrity": "sha512-W7Vtg9u7QsutEfDbLEJNDlDrYGK7spxab6Je+K9+tjI/ixCM1ouniQmHJX0mZUok5WsWiCGxQy6lIrI//nBzTg==" }, "node_modules/tslib": { "version": "2.4.0", @@ -2619,9 +2619,9 @@ } }, "node_modules/undici": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.8.0.tgz", - "integrity": "sha512-1F7Vtcez5w/LwH2G2tGnFIihuWUlc58YidwLiCv+jR2Z50x0tNXpRRw7eOIJ+GvqCqIkg9SB7NWAJ/T9TLfv8Q==", + "version": "5.8.1", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.8.1.tgz", + "integrity": "sha512-iDRmWX4Zar/4A/t+1LrKQRm102zw2l9Wgat3LtTlTn8ykvMZmAmpq9tjyHEigx18FsY7IfATvyN3xSw9BDz0eA==", "engines": { "node": ">=12.18" } @@ -2731,34 +2731,34 @@ }, "dependencies": { "@discordjs/builders": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-1.0.0.tgz", - "integrity": "sha512-8y91ZfpOHubiGJu5tVyGI9tQCEyHZDTeqUWVcJd0dq7B96xIf84S0L4fwmD1k9zTe1eqEFSk0gc7BpY+FKn7Ww==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-1.1.0.tgz", + "integrity": "sha512-EO8TSltiIc9Z1wE854wAFvv5AccqEtvjFmao9PPoxQhRaJ0hEb7FwWRTCA1jGg4ZWI3hcp4m+RET5ufZQz3rOg==", "requires": { "@sapphire/shapeshift": "^3.5.1", - "discord-api-types": "^0.36.2", + "discord-api-types": "^0.36.3", "fast-deep-equal": "^3.1.3", "ts-mixer": "^6.0.1", "tslib": "^2.4.0" } }, "@discordjs/collection": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-1.0.0.tgz", - "integrity": "sha512-nAxDQYE5dNAzEGQ7HU20sujDsG5vLowUKCEqZkKUIlrXERZFTt/60zKUj/g4+AVCGeq+pXC5hivMaNtiC+PY5Q==" + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-1.0.1.tgz", + "integrity": "sha512-5V/wswzR3r2RVYXLxxg4TvrAnBhVCNgHTXhC+OUtLoriJ072rPMHo+Iw1SS1vrCckp8Es40XM411+WkNRPaXFw==" }, "@discordjs/rest": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-1.0.0.tgz", - "integrity": "sha512-uDAvnE0P2a8axMdD4C51EGjvCRQ2HZk2Yxf6vHWZgIqG87D8DGKMPwmquIxrrB07MjV+rwci2ObU+mGhGP+bJg==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-1.0.1.tgz", + "integrity": "sha512-w08CTKVzzYYvKxEjXKOs9AdS7KQ1J502TrPfF8eCZ2lF6AfKuMP/32YgDakiwIyYTDjEQS/v0nKLSFcncHRMtg==", "requires": { - "@discordjs/collection": "^1.0.0", + "@discordjs/collection": "^1.0.1", "@sapphire/async-queue": "^1.3.2", "@sapphire/snowflake": "^3.2.2", - "discord-api-types": "^0.36.2", - "file-type": "^17.1.2", + "discord-api-types": "^0.36.3", + "file-type": "^17.1.4", "tslib": "^2.4.0", - "undici": "^5.7.0" + "undici": "^5.8.0" } }, "@eslint/eslintrc": { @@ -3159,21 +3159,21 @@ } }, "discord-api-types": { - "version": "0.36.2", - "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.36.2.tgz", - "integrity": "sha512-TunPAvzwneK/m5fr4hxH3bMsrtI22nr9yjfHyo5NBGMjpsAauGNiGCmwoFf0oO3jSd2mZiKUvZwCKDaB166u2Q==" + "version": "0.36.3", + "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.36.3.tgz", + "integrity": "sha512-bz/NDyG0KBo/tY14vSkrwQ/n3HKPf87a0WFW/1M9+tXYK+vp5Z5EksawfCWo2zkAc6o7CClc0eff1Pjrqznlwg==" }, "discord.js": { - "version": "14.0.3", - "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.0.3.tgz", - "integrity": "sha512-wH/VQl4CqN8/+dcXEtYis1iurqxGlDpEe0O4CqH5FGqZGIjVpTdtK0STXXx7bVNX8MT/0GvLZLkmO/5gLDWZVg==", + "version": "14.1.2", + "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.1.2.tgz", + "integrity": "sha512-apdWNLkjAkeEnuNpB8H6rS/4OgrXQlSAjuuzeodjCOdIXy3OwOjD314V/HiSttcAlr9+r3ONhaT5qvbDad5SIg==", "requires": { - "@discordjs/builders": "^1.0.0", - "@discordjs/collection": "^1.0.0", - "@discordjs/rest": "^1.0.0", + "@discordjs/builders": "^1.1.0", + "@discordjs/collection": "^1.0.1", + "@discordjs/rest": "^1.0.1", "@sapphire/snowflake": "^3.2.2", "@types/ws": "^8.5.3", - "discord-api-types": "^0.36.2", + "discord-api-types": "^0.36.3", "fast-deep-equal": "^3.1.3", "lodash.snakecase": "^4.1.1", "tslib": "^2.4.0", @@ -3665,12 +3665,12 @@ } }, "file-type": { - "version": "17.1.3", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-17.1.3.tgz", - "integrity": "sha512-MFVSozBIhvnx2dkxlf+010Xqn6+ojlMUT9LXQiPNoOijgRtXNMghWdGK0u2o1RoCqzHoVsw65IL8ZBcQ4MhIrw==", + "version": "17.1.6", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-17.1.6.tgz", + "integrity": "sha512-hlDw5Ev+9e883s0pwUsuuYNu4tD7GgpUnOvykjv1Gya0ZIjuKumthDRua90VUn6/nlRKAjcxLUnHNTIUWwWIiw==", "requires": { "readable-web-to-node-stream": "^3.0.2", - "strtok3": "^7.0.0-alpha.7", + "strtok3": "^7.0.0-alpha.9", "token-types": "^5.0.0-alpha.2" } }, @@ -4089,9 +4089,9 @@ "dev": true }, "peek-readable": { - "version": "5.0.0-alpha.5", - "resolved": "https://registry.npmjs.org/peek-readable/-/peek-readable-5.0.0-alpha.5.tgz", - "integrity": "sha512-pJohF/tDwV3ntnT5+EkUo4E700q/j/OCDuPxtM+5/kFGjyOai/sK4/We4Cy1MB2OiTQliWU5DxPvYIKQAdPqAA==" + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/peek-readable/-/peek-readable-5.0.0.tgz", + "integrity": "sha512-YtCKvLUOvwtMGmrniQPdO7MwPjgkFBtFIrmfSbYmYuq3tKDV/mcfAhBth1+C3ru7uXIZasc/pHnb+YDYNkkj4A==" }, "picomatch": { "version": "2.3.1", @@ -4293,12 +4293,12 @@ "dev": true }, "strtok3": { - "version": "7.0.0-alpha.8", - "resolved": "https://registry.npmjs.org/strtok3/-/strtok3-7.0.0-alpha.8.tgz", - "integrity": "sha512-u+k19v+rTxBjGYxncRQjGvZYwYvEd0uP3D+uHKe/s4WB1eXS5ZwpZsTlBu5xSS4zEd89mTXECXg6WW3FSeV8cA==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/strtok3/-/strtok3-7.0.0.tgz", + "integrity": "sha512-pQ+V+nYQdC5H3Q7qBZAz/MO6lwGhoC2gOAjuouGf/VO0m7vQRh8QNMl2Uf6SwAtzZ9bOw3UIeBukEGNJl5dtXQ==", "requires": { "@tokenizer/token": "^0.3.0", - "peek-readable": "^5.0.0-alpha.5" + "peek-readable": "^5.0.0" } }, "sucrase": { @@ -4349,9 +4349,9 @@ } }, "token-types": { - "version": "5.0.0-alpha.2", - "resolved": "https://registry.npmjs.org/token-types/-/token-types-5.0.0-alpha.2.tgz", - "integrity": "sha512-EsG9UxAW4M6VATrEEjhPFTKEUi1OiJqTUMIZOGBN49fGxYjZB36k0p7to3HZSmWRoHm1QfZgrg3e02fpqAt5fQ==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/token-types/-/token-types-5.0.1.tgz", + "integrity": "sha512-Y2fmSnZjQdDb9W4w4r1tswlMHylzWIeOKpx0aZH9BgGtACHhrk3OkT52AzwcuqTRBZtvvnTjDBh8eynMulu8Vg==", "requires": { "@tokenizer/token": "^0.3.0", "ieee754": "^1.2.1" @@ -4388,10 +4388,10 @@ "resolved": "https://registry.npmjs.org/ts-pattern/-/ts-pattern-4.0.4.tgz", "integrity": "sha512-gDKHf3T+4X2w5k5IpD4FQ6P5b0LRYW7sJdf/yG7uAdxKitgk2Z8UZLdSBjrXs5mI0Vq6E/hRQd6+Kh3FbdjBzw==" }, - "ts-results": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/ts-results/-/ts-results-3.3.0.tgz", - "integrity": "sha512-FWqxGX2NHp5oCyaMd96o2y2uMQmSu8Dey6kvyuFdRJ2AzfmWo3kWa4UsPlCGlfQ/qu03m09ZZtppMoY8EMHuiA==" + "ts-results-es": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/ts-results-es/-/ts-results-es-3.5.0.tgz", + "integrity": "sha512-W7Vtg9u7QsutEfDbLEJNDlDrYGK7spxab6Je+K9+tjI/ixCM1ouniQmHJX0mZUok5WsWiCGxQy6lIrI//nBzTg==" }, "tslib": { "version": "2.4.0", @@ -4459,9 +4459,9 @@ "dev": true }, "undici": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.8.0.tgz", - "integrity": "sha512-1F7Vtcez5w/LwH2G2tGnFIihuWUlc58YidwLiCv+jR2Z50x0tNXpRRw7eOIJ+GvqCqIkg9SB7NWAJ/T9TLfv8Q==" + "version": "5.8.1", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.8.1.tgz", + "integrity": "sha512-iDRmWX4Zar/4A/t+1LrKQRm102zw2l9Wgat3LtTlTn8ykvMZmAmpq9tjyHEigx18FsY7IfATvyN3xSw9BDz0eA==" }, "uri-js": { "version": "4.4.1", diff --git a/package.json b/package.json index 27d3f108..66743de6 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "watch": "tsc -w", "lint": "eslint src/**/*.ts", "format": "eslint src/**/*.ts --fix", - "build" : "tsup && node scripts/mkjson.mjs dist/cjs dist/esm && tsup --dts-only --outDir dist", + "build": "tsup && node scripts/mkjson.mjs dist/cjs dist/esm && tsup --dts-only --outDir dist", "publish": "npm run build && npm publish" }, "keywords": [ @@ -31,10 +31,10 @@ "author": "SernDevs", "license": "MIT", "dependencies": { - "discord.js": "^14.0.3", + "discord.js": "^14.1.2", "rxjs": "^7.5.6", "ts-pattern": "^4.0.2", - "ts-results": "^3.3.0" + "ts-results-es": "^3.5.0" }, "devDependencies": { "@typescript-eslint/eslint-plugin": "5.30.3", diff --git a/tsconfig-cjs.json b/tsconfig-cjs.json index 5a569887..b4236cae 100644 --- a/tsconfig-cjs.json +++ b/tsconfig-cjs.json @@ -3,6 +3,6 @@ "compilerOptions": { "module": "commonjs", "outDir": "dist/cjs", - "target": "esnext" + "target": "es2015" } } \ No newline at end of file From c6c49df18ad248e4127f2ed9cfc851af041ed82a Mon Sep 17 00:00:00 2001 From: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com> Date: Fri, 5 Aug 2022 13:40:27 -0500 Subject: [PATCH 22/37] feat: remove unused function --- src/handler/events/observableHandling.ts | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/src/handler/events/observableHandling.ts b/src/handler/events/observableHandling.ts index 7618f37c..12a3e666 100644 --- a/src/handler/events/observableHandling.ts +++ b/src/handler/events/observableHandling.ts @@ -2,31 +2,11 @@ import type { Message } from 'discord.js'; import { from, Observable, of, tap, throwError } from 'rxjs'; import { SernError } from '../structures/errors'; import type { Module, CommandModuleDefs, CommandModule } from '../structures/module'; -import { correctModuleType } from '../utilities/predicates'; -import type { Result } from 'ts-results'; +import type { Result } from 'ts-results-es'; import type { CommandType } from '../structures/enums'; import type Wrapper from '../structures/wrapper'; import { PayloadType } from '../structures/enums'; -export function filterCorrectModule(cmdType: T) { - return (src: Observable) => - new Observable(subscriber => { - return src.subscribe({ - next(mod) { - if (mod === undefined) { - return throwError(() => SernError.UndefinedModule); - } - if (correctModuleType(mod, cmdType)) { - subscriber.next(mod!); - } else { - return throwError(() => SernError.MismatchModule); - } - }, - error: e => subscriber.error(e), - complete: () => subscriber.complete(), - }); - }); -} export function ignoreNonBot(prefix: string) { return (src: Observable) => From 5ef1f4d3c10badf2620deebfc65d6ea7ff2ccb48 Mon Sep 17 00:00:00 2001 From: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com> Date: Fri, 5 Aug 2022 13:41:09 -0500 Subject: [PATCH 23/37] feat: update ts-results for esm/cjs interop! --- src/handler/events/readyHandler.ts | 3 +-- src/handler/plugins/plugin.ts | 2 +- src/handler/sern.ts | 3 +-- src/handler/structures/context.ts | 3 +-- src/handler/utilities/readFile.ts | 12 ++++++++---- 5 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/handler/events/readyHandler.ts b/src/handler/events/readyHandler.ts index 01602b18..41944959 100644 --- a/src/handler/events/readyHandler.ts +++ b/src/handler/events/readyHandler.ts @@ -11,8 +11,7 @@ import { processCommandPlugins } from './userDefinedEventsHandling'; import type { Awaitable } from 'discord.js'; import { SernError } from '../structures/errors'; import { match } from 'ts-pattern'; -import tsResult, { type Result } from 'ts-results'; -const { Err, Ok } = tsResult; +import { type Result, Err, Ok } from 'ts-results-es'; import { ApplicationCommandType, ComponentType } from 'discord.js'; export default class ReadyHandler extends EventsHandler<{ diff --git a/src/handler/plugins/plugin.ts b/src/handler/plugins/plugin.ts index 40bc03b5..bfc08174 100644 --- a/src/handler/plugins/plugin.ts +++ b/src/handler/plugins/plugin.ts @@ -12,7 +12,7 @@ */ import type { AutocompleteInteraction, Awaitable, Client, ClientEvents } from 'discord.js'; -import type { Result, Ok, Err } from 'ts-results'; +import type { Result, Ok, Err } from 'ts-results-es'; import type { CommandType, DefinitelyDefined, Override, SernEventsMapping } from '../../index'; import { EventType, PluginType } from '../../index'; import type { BaseModule, CommandModuleDefs, EventModuleDefs } from '../structures/module'; diff --git a/src/handler/sern.ts b/src/handler/sern.ts index cdb4fac9..71b20037 100644 --- a/src/handler/sern.ts +++ b/src/handler/sern.ts @@ -1,6 +1,5 @@ import type Wrapper from './structures/wrapper'; -import tsResult from 'ts-results'; -const { Err, Ok } = tsResult; +import { Err, Ok } from 'ts-results-es'; import { ExternalEventEmitters } from './utilities/readFile'; import type { EventEmitter } from 'events'; import { processEvents } from './events/userDefinedEventsHandling'; diff --git a/src/handler/structures/context.ts b/src/handler/structures/context.ts index de2ba825..b3840c73 100644 --- a/src/handler/structures/context.ts +++ b/src/handler/structures/context.ts @@ -11,8 +11,7 @@ import type { TextBasedChannel, User, } from 'discord.js'; -import tsResult, { type Option } from 'ts-results'; -const { None, Some } = tsResult; +import { type Option, None, Some } from 'ts-results-es'; import type { Nullish } from '../../types/handler'; import { ExternallyUsed } from '../utilities/externallyUsed'; import { SernError } from './errors'; diff --git a/src/handler/utilities/readFile.ts b/src/handler/utilities/readFile.ts index 1deb166f..0b44a454 100644 --- a/src/handler/utilities/readFile.ts +++ b/src/handler/utilities/readFile.ts @@ -4,8 +4,7 @@ import { join } from 'path'; import { type Observable, from, concatAll } from 'rxjs'; import type { CommandModule } from '../structures/module'; import { SernError } from '../structures/errors'; -import tsResult, { type Result } from 'ts-results'; -const { Err, Ok } = tsResult; +import { type Result, Err, Ok } from 'ts-results-es'; import type { EventEmitter } from 'events'; //Maybe move this? this probably doesnt belong in utlities/ @@ -65,8 +64,13 @@ export function buildData(commandDir: string): Observable< > { const commands = getCommands(commandDir); return from(Promise.all(commands.map(async absPath => { - // eslint-disable-next-line @typescript-eslint/no-var-requires - const mod = (await import(`file:///` +absPath)).default as T | undefined; + let mod : T | undefined; + try { + // eslint-disable-next-line @typescript-eslint/no-var-requires + mod = require(absPath).default; + } catch { + mod = (await import(`file:///` +absPath)).default; + } if (mod !== undefined) { return Ok({ mod, absPath }); } else return Err(SernError.UndefinedModule); From bb5a0eb0eec08c56fb6b55cf7e5dd0f7dbe034e7 Mon Sep 17 00:00:00 2001 From: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com> Date: Fri, 5 Aug 2022 17:27:57 -0500 Subject: [PATCH 24/37] revert: remove version.txt --- version.txt | 1 - 1 file changed, 1 deletion(-) delete mode 100644 version.txt diff --git a/version.txt b/version.txt deleted file mode 100644 index 183774ba..00000000 --- a/version.txt +++ /dev/null @@ -1 +0,0 @@ -1.1.0-beta From 016b6619398b6401689cab60420f7689259ca4fb Mon Sep 17 00:00:00 2001 From: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com> Date: Fri, 5 Aug 2022 17:28:32 -0500 Subject: [PATCH 25/37] build: goodbye tsc, hello tsup --- .npmignore | 9 ++++++++- package-lock.json | 7 ++++--- package.json | 6 ++---- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/.npmignore b/.npmignore index d3e65049..86b66ad9 100644 --- a/.npmignore +++ b/.npmignore @@ -1,5 +1,4 @@ src/ -tsconfig.json docs/ .gitignore @@ -105,3 +104,11 @@ jest.config.ts CODE_OF_CONDUCT.md babel.config.js + +tsup.config.js + +tsconfig-base.json + +tsconfig.cjs.json + +tsconfig.esm.json \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 4d48b87d..868e9d28 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,8 +19,7 @@ "@typescript-eslint/parser": "5.30.3", "eslint": "8.19.0", "prettier": "2.7.1", - "tsup": "^6.1.3", - "typescript": "4.7.4" + "tsup": "^6.1.3" } }, "node_modules/@discordjs/builders": { @@ -2610,6 +2609,7 @@ "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz", "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==", "dev": true, + "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -4456,7 +4456,8 @@ "version": "4.7.4", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz", "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==", - "dev": true + "dev": true, + "peer": true }, "undici": { "version": "5.8.1", diff --git a/package.json b/package.json index 66743de6..8f5df13f 100644 --- a/package.json +++ b/package.json @@ -12,8 +12,7 @@ } }, "scripts": { - "compile": "tsc -p tsconfig.json && tsc -p tsconfig-cjs.json", - "watch": "tsc -w", + "watch": "tsup --watch --dts", "lint": "eslint src/**/*.ts", "format": "eslint src/**/*.ts --fix", "build": "tsup && node scripts/mkjson.mjs dist/cjs dist/esm && tsup --dts-only --outDir dist", @@ -41,8 +40,7 @@ "@typescript-eslint/parser": "5.30.3", "eslint": "8.19.0", "prettier": "2.7.1", - "tsup": "^6.1.3", - "typescript": "4.7.4" + "tsup": "^6.1.3" }, "repository": { "type": "git", From 334147cf8dd8660dba1d9ebfce898961d8d7cbf0 Mon Sep 17 00:00:00 2001 From: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com> Date: Fri, 5 Aug 2022 18:18:23 -0500 Subject: [PATCH 26/37] build: moving discord.js as dev dependency --- package-lock.json | 284 +++++++++++++++++++++++----------------------- package.json | 3 +- 2 files changed, 142 insertions(+), 145 deletions(-) diff --git a/package-lock.json b/package-lock.json index 868e9d28..135b61e6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,6 @@ "version": "1.1.7-beta", "license": "MIT", "dependencies": { - "discord.js": "^14.1.2", "rxjs": "^7.5.6", "ts-pattern": "^4.0.2", "ts-results-es": "^3.5.0" @@ -17,6 +16,7 @@ "devDependencies": { "@typescript-eslint/eslint-plugin": "5.30.3", "@typescript-eslint/parser": "5.30.3", + "discord.js": "^14.1.2", "eslint": "8.19.0", "prettier": "2.7.1", "tsup": "^6.1.3" @@ -26,6 +26,7 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-1.1.0.tgz", "integrity": "sha512-EO8TSltiIc9Z1wE854wAFvv5AccqEtvjFmao9PPoxQhRaJ0hEb7FwWRTCA1jGg4ZWI3hcp4m+RET5ufZQz3rOg==", + "dev": true, "dependencies": { "@sapphire/shapeshift": "^3.5.1", "discord-api-types": "^0.36.3", @@ -41,6 +42,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-1.0.1.tgz", "integrity": "sha512-5V/wswzR3r2RVYXLxxg4TvrAnBhVCNgHTXhC+OUtLoriJ072rPMHo+Iw1SS1vrCckp8Es40XM411+WkNRPaXFw==", + "dev": true, "engines": { "node": ">=16.9.0" } @@ -49,6 +51,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-1.0.1.tgz", "integrity": "sha512-w08CTKVzzYYvKxEjXKOs9AdS7KQ1J502TrPfF8eCZ2lF6AfKuMP/32YgDakiwIyYTDjEQS/v0nKLSFcncHRMtg==", + "dev": true, "dependencies": { "@discordjs/collection": "^1.0.1", "@sapphire/async-queue": "^1.3.2", @@ -82,40 +85,6 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "node_modules/@eslint/eslintrc/node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/@eslint/eslintrc/node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "node_modules/@eslint/eslintrc/node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/@humanwhocodes/config-array": { "version": "0.9.5", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.5.tgz", @@ -175,6 +144,7 @@ "version": "1.3.2", "resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.3.2.tgz", "integrity": "sha512-rUpMLATsoAMnlN3gecAcr9Ecnw1vG7zi5Xr+IX22YzRzi1k9PF9vKzoT8RuEJbiIszjcimu3rveqUnvwDopz8g==", + "dev": true, "engines": { "node": ">=v14.0.0", "npm": ">=7.0.0" @@ -184,6 +154,7 @@ "version": "3.5.1", "resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-3.5.1.tgz", "integrity": "sha512-7JFsW5IglyOIUQI1eE0g6h06D/Far6HqpcowRScgCiLSqTf3hhkPWCWotVTtVycnDCMYIwPeaw6IEPBomKC8pA==", + "dev": true, "dependencies": { "fast-deep-equal": "^3.1.3", "lodash.uniqwith": "^4.5.0" @@ -197,6 +168,7 @@ "version": "3.2.2", "resolved": "https://registry.npmjs.org/@sapphire/snowflake/-/snowflake-3.2.2.tgz", "integrity": "sha512-ula2O0kpSZtX9rKXNeQMrHwNd7E4jPDJYUXmEGTFdMRfyfMw+FPyh04oKMjAiDuOi64bYgVkOV3MjK+loImFhQ==", + "dev": true, "engines": { "node": ">=v14.0.0", "npm": ">=7.0.0" @@ -205,7 +177,8 @@ "node_modules/@tokenizer/token": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/@tokenizer/token/-/token-0.3.0.tgz", - "integrity": "sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==" + "integrity": "sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==", + "dev": true }, "node_modules/@types/json-schema": { "version": "7.0.11", @@ -216,12 +189,14 @@ "node_modules/@types/node": { "version": "18.0.3", "resolved": "https://registry.npmjs.org/@types/node/-/node-18.0.3.tgz", - "integrity": "sha512-HzNRZtp4eepNitP+BD6k2L6DROIDG4Q0fm4x+dwfsr6LGmROENnok75VGw40628xf+iR24WeMFcHuuBDUAzzsQ==" + "integrity": "sha512-HzNRZtp4eepNitP+BD6k2L6DROIDG4Q0fm4x+dwfsr6LGmROENnok75VGw40628xf+iR24WeMFcHuuBDUAzzsQ==", + "dev": true }, "node_modules/@types/ws": { "version": "8.5.3", "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.3.tgz", "integrity": "sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w==", + "dev": true, "dependencies": { "@types/node": "*" } @@ -431,6 +406,22 @@ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, "node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", @@ -650,12 +641,14 @@ "node_modules/discord-api-types": { "version": "0.36.3", "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.36.3.tgz", - "integrity": "sha512-bz/NDyG0KBo/tY14vSkrwQ/n3HKPf87a0WFW/1M9+tXYK+vp5Z5EksawfCWo2zkAc6o7CClc0eff1Pjrqznlwg==" + "integrity": "sha512-bz/NDyG0KBo/tY14vSkrwQ/n3HKPf87a0WFW/1M9+tXYK+vp5Z5EksawfCWo2zkAc6o7CClc0eff1Pjrqznlwg==", + "dev": true }, "node_modules/discord.js": { "version": "14.1.2", "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.1.2.tgz", "integrity": "sha512-apdWNLkjAkeEnuNpB8H6rS/4OgrXQlSAjuuzeodjCOdIXy3OwOjD314V/HiSttcAlr9+r3ONhaT5qvbDad5SIg==", + "dev": true, "dependencies": { "@discordjs/builders": "^1.1.0", "@discordjs/collection": "^1.0.1", @@ -1141,22 +1134,6 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "node_modules/eslint/node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, "node_modules/eslint/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -1249,24 +1226,6 @@ "node": ">=8" } }, - "node_modules/eslint/node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "node_modules/eslint/node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/eslint/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -1379,7 +1338,8 @@ "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true }, "node_modules/fast-glob": { "version": "3.2.11", @@ -1446,6 +1406,7 @@ "version": "17.1.6", "resolved": "https://registry.npmjs.org/file-type/-/file-type-17.1.6.tgz", "integrity": "sha512-hlDw5Ev+9e883s0pwUsuuYNu4tD7GgpUnOvykjv1Gya0ZIjuKumthDRua90VUn6/nlRKAjcxLUnHNTIUWwWIiw==", + "dev": true, "dependencies": { "readable-web-to-node-stream": "^3.0.2", "strtok3": "^7.0.0-alpha.9", @@ -1607,6 +1568,7 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true, "funding": [ { "type": "github", @@ -1678,7 +1640,8 @@ "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true }, "node_modules/is-binary-path": { "version": "2.1.0", @@ -1761,6 +1724,12 @@ "js-yaml": "bin/js-yaml.js" } }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", @@ -1813,7 +1782,8 @@ "node_modules/lodash.snakecase": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz", - "integrity": "sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==" + "integrity": "sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==", + "dev": true }, "node_modules/lodash.sortby": { "version": "4.7.0", @@ -1824,7 +1794,8 @@ "node_modules/lodash.uniqwith": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.uniqwith/-/lodash.uniqwith-4.5.0.tgz", - "integrity": "sha512-7lYL8bLopMoy4CTICbxygAUq6CdRJ36vFc80DucPueUee+d5NBRxz3FdT9Pes/HEx5mPoT9jwnsEJWz1N7uq7Q==" + "integrity": "sha512-7lYL8bLopMoy4CTICbxygAUq6CdRJ36vFc80DucPueUee+d5NBRxz3FdT9Pes/HEx5mPoT9jwnsEJWz1N7uq7Q==", + "dev": true }, "node_modules/lru-cache": { "version": "6.0.0", @@ -2024,6 +1995,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/peek-readable/-/peek-readable-5.0.0.tgz", "integrity": "sha512-YtCKvLUOvwtMGmrniQPdO7MwPjgkFBtFIrmfSbYmYuq3tKDV/mcfAhBth1+C3ru7uXIZasc/pHnb+YDYNkkj4A==", + "dev": true, "engines": { "node": ">=14.16" }, @@ -2139,6 +2111,7 @@ "version": "3.6.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -2152,6 +2125,7 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/readable-web-to-node-stream/-/readable-web-to-node-stream-3.0.2.tgz", "integrity": "sha512-ePeK6cc1EcKLEhJFt/AebMCLL+GgSKhuygrZ/GLaKZYEecIgIECf4UaUuaByiGtzckwR4ain9VzUh95T1exYGw==", + "dev": true, "dependencies": { "readable-stream": "^3.6.0" }, @@ -2271,6 +2245,7 @@ "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, "funding": [ { "type": "github", @@ -2353,6 +2328,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, "dependencies": { "safe-buffer": "~5.2.0" } @@ -2378,10 +2354,23 @@ "node": ">=6" } }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/strtok3": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/strtok3/-/strtok3-7.0.0.tgz", "integrity": "sha512-pQ+V+nYQdC5H3Q7qBZAz/MO6lwGhoC2gOAjuouGf/VO0m7vQRh8QNMl2Uf6SwAtzZ9bOw3UIeBukEGNJl5dtXQ==", + "dev": true, "dependencies": { "@tokenizer/token": "^0.3.0", "peek-readable": "^5.0.0" @@ -2458,6 +2447,7 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/token-types/-/token-types-5.0.1.tgz", "integrity": "sha512-Y2fmSnZjQdDb9W4w4r1tswlMHylzWIeOKpx0aZH9BgGtACHhrk3OkT52AzwcuqTRBZtvvnTjDBh8eynMulu8Vg==", + "dev": true, "dependencies": { "@tokenizer/token": "^0.3.0", "ieee754": "^1.2.1" @@ -2497,7 +2487,8 @@ "node_modules/ts-mixer": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.1.tgz", - "integrity": "sha512-hvE+ZYXuINrx6Ei6D6hz+PTim0Uf++dYbK9FFifLNwQj+RwKquhQpn868yZsCtJYiclZF1u8l6WZxxKi+vv7Rg==" + "integrity": "sha512-hvE+ZYXuINrx6Ei6D6hz+PTim0Uf++dYbK9FFifLNwQj+RwKquhQpn868yZsCtJYiclZF1u8l6WZxxKi+vv7Rg==", + "dev": true }, "node_modules/ts-pattern": { "version": "4.0.4", @@ -2622,6 +2613,7 @@ "version": "5.8.1", "resolved": "https://registry.npmjs.org/undici/-/undici-5.8.1.tgz", "integrity": "sha512-iDRmWX4Zar/4A/t+1LrKQRm102zw2l9Wgat3LtTlTn8ykvMZmAmpq9tjyHEigx18FsY7IfATvyN3xSw9BDz0eA==", + "dev": true, "engines": { "node": ">=12.18" } @@ -2638,7 +2630,8 @@ "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true }, "node_modules/v8-compile-cache": { "version": "2.3.0", @@ -2697,6 +2690,7 @@ "version": "8.8.1", "resolved": "https://registry.npmjs.org/ws/-/ws-8.8.1.tgz", "integrity": "sha512-bGy2JzvzkPowEJV++hF07hAD6niYSr0JzBNo/J29WsB57A2r7Wlc1UFcTR9IzrPvuNVO4B8LGqF8qcpsVOhJCA==", + "dev": true, "engines": { "node": ">=10.0.0" }, @@ -2734,6 +2728,7 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-1.1.0.tgz", "integrity": "sha512-EO8TSltiIc9Z1wE854wAFvv5AccqEtvjFmao9PPoxQhRaJ0hEb7FwWRTCA1jGg4ZWI3hcp4m+RET5ufZQz3rOg==", + "dev": true, "requires": { "@sapphire/shapeshift": "^3.5.1", "discord-api-types": "^0.36.3", @@ -2745,12 +2740,14 @@ "@discordjs/collection": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-1.0.1.tgz", - "integrity": "sha512-5V/wswzR3r2RVYXLxxg4TvrAnBhVCNgHTXhC+OUtLoriJ072rPMHo+Iw1SS1vrCckp8Es40XM411+WkNRPaXFw==" + "integrity": "sha512-5V/wswzR3r2RVYXLxxg4TvrAnBhVCNgHTXhC+OUtLoriJ072rPMHo+Iw1SS1vrCckp8Es40XM411+WkNRPaXFw==", + "dev": true }, "@discordjs/rest": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-1.0.1.tgz", "integrity": "sha512-w08CTKVzzYYvKxEjXKOs9AdS7KQ1J502TrPfF8eCZ2lF6AfKuMP/32YgDakiwIyYTDjEQS/v0nKLSFcncHRMtg==", + "dev": true, "requires": { "@discordjs/collection": "^1.0.1", "@sapphire/async-queue": "^1.3.2", @@ -2776,32 +2773,6 @@ "js-yaml": "^4.1.0", "minimatch": "^3.1.2", "strip-json-comments": "^3.1.1" - }, - "dependencies": { - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true - } } }, "@humanwhocodes/config-array": { @@ -2850,12 +2821,14 @@ "@sapphire/async-queue": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.3.2.tgz", - "integrity": "sha512-rUpMLATsoAMnlN3gecAcr9Ecnw1vG7zi5Xr+IX22YzRzi1k9PF9vKzoT8RuEJbiIszjcimu3rveqUnvwDopz8g==" + "integrity": "sha512-rUpMLATsoAMnlN3gecAcr9Ecnw1vG7zi5Xr+IX22YzRzi1k9PF9vKzoT8RuEJbiIszjcimu3rveqUnvwDopz8g==", + "dev": true }, "@sapphire/shapeshift": { "version": "3.5.1", "resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-3.5.1.tgz", "integrity": "sha512-7JFsW5IglyOIUQI1eE0g6h06D/Far6HqpcowRScgCiLSqTf3hhkPWCWotVTtVycnDCMYIwPeaw6IEPBomKC8pA==", + "dev": true, "requires": { "fast-deep-equal": "^3.1.3", "lodash.uniqwith": "^4.5.0" @@ -2864,12 +2837,14 @@ "@sapphire/snowflake": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/@sapphire/snowflake/-/snowflake-3.2.2.tgz", - "integrity": "sha512-ula2O0kpSZtX9rKXNeQMrHwNd7E4jPDJYUXmEGTFdMRfyfMw+FPyh04oKMjAiDuOi64bYgVkOV3MjK+loImFhQ==" + "integrity": "sha512-ula2O0kpSZtX9rKXNeQMrHwNd7E4jPDJYUXmEGTFdMRfyfMw+FPyh04oKMjAiDuOi64bYgVkOV3MjK+loImFhQ==", + "dev": true }, "@tokenizer/token": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/@tokenizer/token/-/token-0.3.0.tgz", - "integrity": "sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==" + "integrity": "sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==", + "dev": true }, "@types/json-schema": { "version": "7.0.11", @@ -2880,12 +2855,14 @@ "@types/node": { "version": "18.0.3", "resolved": "https://registry.npmjs.org/@types/node/-/node-18.0.3.tgz", - "integrity": "sha512-HzNRZtp4eepNitP+BD6k2L6DROIDG4Q0fm4x+dwfsr6LGmROENnok75VGw40628xf+iR24WeMFcHuuBDUAzzsQ==" + "integrity": "sha512-HzNRZtp4eepNitP+BD6k2L6DROIDG4Q0fm4x+dwfsr6LGmROENnok75VGw40628xf+iR24WeMFcHuuBDUAzzsQ==", + "dev": true }, "@types/ws": { "version": "8.5.3", "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.3.tgz", "integrity": "sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w==", + "dev": true, "requires": { "@types/node": "*" } @@ -2998,6 +2975,18 @@ "dev": true, "requires": {} }, + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, "ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", @@ -3161,12 +3150,14 @@ "discord-api-types": { "version": "0.36.3", "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.36.3.tgz", - "integrity": "sha512-bz/NDyG0KBo/tY14vSkrwQ/n3HKPf87a0WFW/1M9+tXYK+vp5Z5EksawfCWo2zkAc6o7CClc0eff1Pjrqznlwg==" + "integrity": "sha512-bz/NDyG0KBo/tY14vSkrwQ/n3HKPf87a0WFW/1M9+tXYK+vp5Z5EksawfCWo2zkAc6o7CClc0eff1Pjrqznlwg==", + "dev": true }, "discord.js": { "version": "14.1.2", "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.1.2.tgz", "integrity": "sha512-apdWNLkjAkeEnuNpB8H6rS/4OgrXQlSAjuuzeodjCOdIXy3OwOjD314V/HiSttcAlr9+r3ONhaT5qvbDad5SIg==", + "dev": true, "requires": { "@discordjs/builders": "^1.1.0", "@discordjs/collection": "^1.0.1", @@ -3401,18 +3392,6 @@ "v8-compile-cache": "^2.0.3" }, "dependencies": { - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -3475,18 +3454,6 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true - }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -3608,7 +3575,8 @@ "fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true }, "fast-glob": { "version": "3.2.11", @@ -3668,6 +3636,7 @@ "version": "17.1.6", "resolved": "https://registry.npmjs.org/file-type/-/file-type-17.1.6.tgz", "integrity": "sha512-hlDw5Ev+9e883s0pwUsuuYNu4tD7GgpUnOvykjv1Gya0ZIjuKumthDRua90VUn6/nlRKAjcxLUnHNTIUWwWIiw==", + "dev": true, "requires": { "readable-web-to-node-stream": "^3.0.2", "strtok3": "^7.0.0-alpha.9", @@ -3779,7 +3748,8 @@ "ieee754": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true }, "ignore": { "version": "5.2.0", @@ -3824,7 +3794,8 @@ "inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true }, "is-binary-path": { "version": "2.1.0", @@ -3883,6 +3854,12 @@ "argparse": "^2.0.1" } }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, "json-stable-stringify-without-jsonify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", @@ -3926,7 +3903,8 @@ "lodash.snakecase": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz", - "integrity": "sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==" + "integrity": "sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==", + "dev": true }, "lodash.sortby": { "version": "4.7.0", @@ -3937,7 +3915,8 @@ "lodash.uniqwith": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.uniqwith/-/lodash.uniqwith-4.5.0.tgz", - "integrity": "sha512-7lYL8bLopMoy4CTICbxygAUq6CdRJ36vFc80DucPueUee+d5NBRxz3FdT9Pes/HEx5mPoT9jwnsEJWz1N7uq7Q==" + "integrity": "sha512-7lYL8bLopMoy4CTICbxygAUq6CdRJ36vFc80DucPueUee+d5NBRxz3FdT9Pes/HEx5mPoT9jwnsEJWz1N7uq7Q==", + "dev": true }, "lru-cache": { "version": "6.0.0", @@ -4091,7 +4070,8 @@ "peek-readable": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/peek-readable/-/peek-readable-5.0.0.tgz", - "integrity": "sha512-YtCKvLUOvwtMGmrniQPdO7MwPjgkFBtFIrmfSbYmYuq3tKDV/mcfAhBth1+C3ru7uXIZasc/pHnb+YDYNkkj4A==" + "integrity": "sha512-YtCKvLUOvwtMGmrniQPdO7MwPjgkFBtFIrmfSbYmYuq3tKDV/mcfAhBth1+C3ru7uXIZasc/pHnb+YDYNkkj4A==", + "dev": true }, "picomatch": { "version": "2.3.1", @@ -4143,6 +4123,7 @@ "version": "3.6.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, "requires": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -4153,6 +4134,7 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/readable-web-to-node-stream/-/readable-web-to-node-stream-3.0.2.tgz", "integrity": "sha512-ePeK6cc1EcKLEhJFt/AebMCLL+GgSKhuygrZ/GLaKZYEecIgIECf4UaUuaByiGtzckwR4ain9VzUh95T1exYGw==", + "dev": true, "requires": { "readable-stream": "^3.6.0" } @@ -4222,7 +4204,8 @@ "safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true }, "semver": { "version": "7.3.7", @@ -4273,6 +4256,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, "requires": { "safe-buffer": "~5.2.0" } @@ -4292,10 +4276,17 @@ "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", "dev": true }, + "strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true + }, "strtok3": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/strtok3/-/strtok3-7.0.0.tgz", "integrity": "sha512-pQ+V+nYQdC5H3Q7qBZAz/MO6lwGhoC2gOAjuouGf/VO0m7vQRh8QNMl2Uf6SwAtzZ9bOw3UIeBukEGNJl5dtXQ==", + "dev": true, "requires": { "@tokenizer/token": "^0.3.0", "peek-readable": "^5.0.0" @@ -4352,6 +4343,7 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/token-types/-/token-types-5.0.1.tgz", "integrity": "sha512-Y2fmSnZjQdDb9W4w4r1tswlMHylzWIeOKpx0aZH9BgGtACHhrk3OkT52AzwcuqTRBZtvvnTjDBh8eynMulu8Vg==", + "dev": true, "requires": { "@tokenizer/token": "^0.3.0", "ieee754": "^1.2.1" @@ -4381,7 +4373,8 @@ "ts-mixer": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.1.tgz", - "integrity": "sha512-hvE+ZYXuINrx6Ei6D6hz+PTim0Uf++dYbK9FFifLNwQj+RwKquhQpn868yZsCtJYiclZF1u8l6WZxxKi+vv7Rg==" + "integrity": "sha512-hvE+ZYXuINrx6Ei6D6hz+PTim0Uf++dYbK9FFifLNwQj+RwKquhQpn868yZsCtJYiclZF1u8l6WZxxKi+vv7Rg==", + "dev": true }, "ts-pattern": { "version": "4.0.4", @@ -4462,7 +4455,8 @@ "undici": { "version": "5.8.1", "resolved": "https://registry.npmjs.org/undici/-/undici-5.8.1.tgz", - "integrity": "sha512-iDRmWX4Zar/4A/t+1LrKQRm102zw2l9Wgat3LtTlTn8ykvMZmAmpq9tjyHEigx18FsY7IfATvyN3xSw9BDz0eA==" + "integrity": "sha512-iDRmWX4Zar/4A/t+1LrKQRm102zw2l9Wgat3LtTlTn8ykvMZmAmpq9tjyHEigx18FsY7IfATvyN3xSw9BDz0eA==", + "dev": true }, "uri-js": { "version": "4.4.1", @@ -4476,7 +4470,8 @@ "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true }, "v8-compile-cache": { "version": "2.3.0", @@ -4526,6 +4521,7 @@ "version": "8.8.1", "resolved": "https://registry.npmjs.org/ws/-/ws-8.8.1.tgz", "integrity": "sha512-bGy2JzvzkPowEJV++hF07hAD6niYSr0JzBNo/J29WsB57A2r7Wlc1UFcTR9IzrPvuNVO4B8LGqF8qcpsVOhJCA==", + "dev": true, "requires": {} }, "yallist": { diff --git a/package.json b/package.json index 8f5df13f..079f3519 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ }, "scripts": { "watch": "tsup --watch --dts", + "clean-modules": "rimraf node_modules/ && npm install", "lint": "eslint src/**/*.ts", "format": "eslint src/**/*.ts --fix", "build": "tsup && node scripts/mkjson.mjs dist/cjs dist/esm && tsup --dts-only --outDir dist", @@ -30,7 +31,6 @@ "author": "SernDevs", "license": "MIT", "dependencies": { - "discord.js": "^14.1.2", "rxjs": "^7.5.6", "ts-pattern": "^4.0.2", "ts-results-es": "^3.5.0" @@ -38,6 +38,7 @@ "devDependencies": { "@typescript-eslint/eslint-plugin": "5.30.3", "@typescript-eslint/parser": "5.30.3", + "discord.js": "^14.1.2", "eslint": "8.19.0", "prettier": "2.7.1", "tsup": "^6.1.3" From 9e217dace0132fbb741f49bae610ebb808df5f62 Mon Sep 17 00:00:00 2001 From: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com> Date: Sat, 6 Aug 2022 11:20:08 -0500 Subject: [PATCH 27/37] style: requested changes --- scripts/mkjson.mjs | 2 +- src/handler/events/readyHandler.ts | 2 +- src/handler/structures/errors.ts | 2 +- src/handler/structures/wrapper.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/mkjson.mjs b/scripts/mkjson.mjs index 80b6b9b7..78b836c3 100644 --- a/scripts/mkjson.mjs +++ b/scripts/mkjson.mjs @@ -1,6 +1,6 @@ import { writeFile } from 'fs/promises' import { join } from 'path'; -//A quick script to regenerate package.jsons for each cjs and esm after tsup cleans distributions +// A quick script to regenerate package.jsons for each cjs and esm after tsup cleans distributions const locations = process.argv; locations.shift(); locations.shift(); diff --git a/src/handler/events/readyHandler.ts b/src/handler/events/readyHandler.ts index 41944959..1a5318e5 100644 --- a/src/handler/events/readyHandler.ts +++ b/src/handler/events/readyHandler.ts @@ -46,7 +46,7 @@ export default class ReadyHandler extends EventsHandler<{ if (allPluginsSuccessful) { const res = registerModule(payload.mod); if (res.err) { - throw Error(SernError.NonValidModuleType); + throw Error(SernError.InvalidModuleType); } wrapper.sernEmitter?.emit('module.register', { type: PayloadType.Success, diff --git a/src/handler/structures/errors.ts b/src/handler/structures/errors.ts index 4a0aa53e..e6f666d6 100644 --- a/src/handler/structures/errors.ts +++ b/src/handler/structures/errors.ts @@ -6,7 +6,7 @@ export enum SernError { * Throws when registering an invalid module. * This means it is undefined or an invalid command type was provided */ - NonValidModuleType = 'Detected an unknown module type', + InvalidModuleType = 'Detected an unknown module type', /** * Attempted to lookup module in command module store. Nothing was found! */ diff --git a/src/handler/structures/wrapper.ts b/src/handler/structures/wrapper.ts index f7ad6649..73009057 100644 --- a/src/handler/structures/wrapper.ts +++ b/src/handler/structures/wrapper.ts @@ -3,7 +3,7 @@ import type SernEmitter from '../sernEmitter'; import type { EventModule } from './module'; /** - * An object to be passed into init function. + * An object to be passed into Sern#init() function. * @typedef {object} Wrapper */ interface Wrapper { From c2272ff4b0cf6a141d8d91f9105d5b5a856b8f32 Mon Sep 17 00:00:00 2001 From: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com> Date: Sat, 6 Aug 2022 11:33:50 -0500 Subject: [PATCH 28/37] feat: add tsc back ( i missed you ) --- package-lock.json | 7 +++---- package.json | 3 ++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 135b61e6..559d24ba 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,7 +19,8 @@ "discord.js": "^14.1.2", "eslint": "8.19.0", "prettier": "2.7.1", - "tsup": "^6.1.3" + "tsup": "^6.1.3", + "typescript": "4.7.4" } }, "node_modules/@discordjs/builders": { @@ -2600,7 +2601,6 @@ "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz", "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==", "dev": true, - "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -4449,8 +4449,7 @@ "version": "4.7.4", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz", "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==", - "dev": true, - "peer": true + "dev": true }, "undici": { "version": "5.8.1", diff --git a/package.json b/package.json index 079f3519..a34f1a9f 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,8 @@ "discord.js": "^14.1.2", "eslint": "8.19.0", "prettier": "2.7.1", - "tsup": "^6.1.3" + "tsup": "^6.1.3", + "typescript": "4.7.4" }, "repository": { "type": "git", From 05194846ecee00106b17642a5a7fc4e5ebfe58fb Mon Sep 17 00:00:00 2001 From: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com> Date: Sat, 6 Aug 2022 11:34:28 -0500 Subject: [PATCH 29/37] build: bump version -> 1.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a34f1a9f..6dd5a20d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@sern/handler", - "version": "1.1.7-beta", + "version": "1.0.0", "description": "A customizable, batteries-included, powerful discord.js framework to automate and streamline bot development.", "main": "dist/cjs/index.cjs", "module": "dist/esm/index.mjs", From d90aa1321e1897d66064601e89d4c4cc33ea804c Mon Sep 17 00:00:00 2001 From: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com> Date: Sat, 6 Aug 2022 11:58:20 -0500 Subject: [PATCH 30/37] feat: syncing to main --- src/handler/events/dispatchers.ts | 6 +++--- src/handler/utilities/treeSearch.ts | 31 +++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 3 deletions(-) create mode 100644 src/handler/utilities/treeSearch.ts diff --git a/src/handler/events/dispatchers.ts b/src/handler/events/dispatchers.ts index 2cb6078d..23c2bb41 100644 --- a/src/handler/events/dispatchers.ts +++ b/src/handler/events/dispatchers.ts @@ -23,6 +23,7 @@ import type { } from 'discord.js'; import { isAutocomplete } from '../utilities/predicates'; import { SernError } from '../structures/errors'; +import treeSearch from '../utilities/treeSearch'; export function applicationCommandDispatcher(interaction: Interaction) { if (isAutocomplete(interaction)) { @@ -41,10 +42,9 @@ export function applicationCommandDispatcher(interaction: Interaction) { } export function dispatchAutocomplete(interaction: AutocompleteInteraction) { - const choice = interaction.options.getFocused(true); return (mod: BothCommand | SlashCommand) => { - const selectedOption = mod.options?.find(o => o.autocomplete && o.name === choice.name); - if (selectedOption !== undefined && selectedOption.autocomplete) { + const selectedOption = treeSearch(interaction, mod.options); + if (selectedOption !== undefined) { return { mod, execute: () => selectedOption.command.execute(interaction), diff --git a/src/handler/utilities/treeSearch.ts b/src/handler/utilities/treeSearch.ts new file mode 100644 index 00000000..f1eedbba --- /dev/null +++ b/src/handler/utilities/treeSearch.ts @@ -0,0 +1,31 @@ +import type { SernOptionsData } from '../structures/module'; +import { ApplicationCommandOptionType, AutocompleteInteraction } from 'discord.js'; + +export default function treeSearch(iAutocomplete: AutocompleteInteraction, options: SernOptionsData[] | undefined) { + if(options === undefined) return undefined; + const _options = options.slice(); // required to prevent direct mutation of options + while ( _options.length > 0 ) { + const cur = _options.pop()!; + switch ( cur.type ) { + case ApplicationCommandOptionType.Subcommand : { + for ( const option of cur.options ?? [] ) { + _options.push(option); + } + } break; + case ApplicationCommandOptionType.SubcommandGroup : { + for (const command of cur.options ?? []) { + _options.push(command); + } + } break; + default : { + if(cur.autocomplete) { + const choice = iAutocomplete.options.getFocused(true); + if(cur.name === choice.name && cur.autocomplete) { + return cur; + } + return undefined; + } + } break; + } + } +} \ No newline at end of file From b8fbc2f6cb514ee0ad9b33545fa78c05c77bd722 Mon Sep 17 00:00:00 2001 From: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com> Date: Sat, 6 Aug 2022 12:02:59 -0500 Subject: [PATCH 31/37] style: pretty --- src/handler/utilities/treeSearch.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/handler/utilities/treeSearch.ts b/src/handler/utilities/treeSearch.ts index f1eedbba..fd43ee00 100644 --- a/src/handler/utilities/treeSearch.ts +++ b/src/handler/utilities/treeSearch.ts @@ -23,7 +23,7 @@ export default function treeSearch(iAutocomplete: AutocompleteInteraction, optio if(cur.name === choice.name && cur.autocomplete) { return cur; } - return undefined; + return undefined; } } break; } From e2daead7d3df927183843a546104498ce183143e Mon Sep 17 00:00:00 2001 From: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com> Date: Sat, 6 Aug 2022 12:38:16 -0500 Subject: [PATCH 32/37] feat: fix tsconfig issues with tsup --- tsconfig-esm.json | 2 +- tsconfig.json | 8 -------- tsup.config.js | 2 +- 3 files changed, 2 insertions(+), 10 deletions(-) delete mode 100644 tsconfig.json diff --git a/tsconfig-esm.json b/tsconfig-esm.json index d82e95d7..a6fd3678 100644 --- a/tsconfig-esm.json +++ b/tsconfig-esm.json @@ -1,5 +1,5 @@ { - "extends": "./tsconfig.json", + "extends": "./tsconfig-base.json", "compilerOptions": { "module": "esnext", "outDir": "dist/esm", diff --git a/tsconfig.json b/tsconfig.json deleted file mode 100644 index a6fd3678..00000000 --- a/tsconfig.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "./tsconfig-base.json", - "compilerOptions": { - "module": "esnext", - "outDir": "dist/esm", - "target": "esnext" - } -} \ No newline at end of file diff --git a/tsup.config.js b/tsup.config.js index 3f82e031..2110e845 100644 --- a/tsup.config.js +++ b/tsup.config.js @@ -6,7 +6,7 @@ export default defineConfig([ format : 'esm', sourcemap: false, target: 'node16', - tsconfig : './tsconfig.json', + tsconfig : './tsconfig-esm.json', outDir : './dist/esm', platform: 'node', clean: true, From 3c25d00e9e1df9f6c2804f97075913a4b1417ad8 Mon Sep 17 00:00:00 2001 From: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com> Date: Sat, 6 Aug 2022 12:48:32 -0500 Subject: [PATCH 33/37] revert: remove ExternallyUsed --- src/handler/structures/context.ts | 14 -------------- tsconfig-base.json | 1 - tsconfig-cjs.json | 2 +- 3 files changed, 1 insertion(+), 16 deletions(-) diff --git a/src/handler/structures/context.ts b/src/handler/structures/context.ts index b3840c73..6d3987cf 100644 --- a/src/handler/structures/context.ts +++ b/src/handler/structures/context.ts @@ -13,7 +13,6 @@ import type { } from 'discord.js'; import { type Option, None, Some } from 'ts-results-es'; import type { Nullish } from '../../types/handler'; -import { ExternallyUsed } from '../utilities/externallyUsed'; import { SernError } from './errors'; function firstSome(...args: Option[]): Nullish { @@ -42,7 +41,6 @@ export default class Context { * CommandType.Slash or the event fired in a Both command was * ChatInputCommandInteraction */ - @ExternallyUsed public get message() { return this.oMsg.expect(SernError.MismatchEvent); } @@ -51,12 +49,10 @@ export default class Context { * CommandType.Text or the event fired in a Both command was * Message */ - @ExternallyUsed public get interaction() { return this.oInterac.expect(SernError.MismatchEvent); } - @ExternallyUsed public get id(): Snowflake { return firstSome( this.oInterac.map(i => i.id), @@ -64,7 +60,6 @@ export default class Context { )!; } - @ExternallyUsed public get channel(): Nullish { return firstSome( this.oMsg.map(m => m.channel), @@ -72,7 +67,6 @@ export default class Context { ); } - @ExternallyUsed public get user(): User { return firstSome( this.oMsg.map(m => m.author), @@ -80,7 +74,6 @@ export default class Context { )!; } - @ExternallyUsed public get createdTimestamp(): number { return firstSome( this.oMsg.map(m => m.createdTimestamp), @@ -88,7 +81,6 @@ export default class Context { )!; } - @ExternallyUsed public get guild(): Guild { return firstSome( this.oMsg.map(m => m.guild), @@ -96,7 +88,6 @@ export default class Context { )!; } - @ExternallyUsed public get guildId(): Snowflake { return firstSome( this.oMsg.map(m => m.guildId), @@ -107,7 +98,6 @@ export default class Context { /* * interactions can return APIGuildMember if the guild it is emitted from is not cached */ - @ExternallyUsed public get member(): Nullish { return firstSome( this.oMsg.map(m => m.member), @@ -115,7 +105,6 @@ export default class Context { ); } - @ExternallyUsed public get client(): Client { return firstSome( this.oMsg.map(m => m.client), @@ -123,7 +112,6 @@ export default class Context { )!; } - @ExternallyUsed public get inGuild(): boolean { return firstSome( this.oMsg.map(m => m.inGuild()), @@ -138,12 +126,10 @@ export default class Context { return new Context(Some(wrappable), None); } - @ExternallyUsed public isEmpty() { return this.oMsg.none && this.oInterac.none; } //Make queueable - @ExternallyUsed public reply( content: string | Omit | ReplyMessageOptions, ) { diff --git a/tsconfig-base.json b/tsconfig-base.json index a853f4d8..c9179248 100644 --- a/tsconfig-base.json +++ b/tsconfig-base.json @@ -1,6 +1,5 @@ { "compilerOptions": { - "experimentalDecorators": true, "rootDir": "src", "strict": true, "esModuleInterop": true, diff --git a/tsconfig-cjs.json b/tsconfig-cjs.json index b4236cae..5a569887 100644 --- a/tsconfig-cjs.json +++ b/tsconfig-cjs.json @@ -3,6 +3,6 @@ "compilerOptions": { "module": "commonjs", "outDir": "dist/cjs", - "target": "es2015" + "target": "esnext" } } \ No newline at end of file From 2657cda785dffc4331196acbaf4594c11ec93308 Mon Sep 17 00:00:00 2001 From: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com> Date: Sat, 6 Aug 2022 12:54:56 -0500 Subject: [PATCH 34/37] feat: update scripts --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6dd5a20d..08c875e5 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "clean-modules": "rimraf node_modules/ && npm install", "lint": "eslint src/**/*.ts", "format": "eslint src/**/*.ts --fix", - "build": "tsup && node scripts/mkjson.mjs dist/cjs dist/esm && tsup --dts-only --outDir dist", + "build": "tsup --clean && node scripts/mkjson.mjs dist/cjs dist/esm && tsup --dts-only --outDir dist", "publish": "npm run build && npm publish" }, "keywords": [ From af7997b07baeb1ad12be81112591d7f3a6da5a9d Mon Sep 17 00:00:00 2001 From: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com> Date: Sat, 6 Aug 2022 13:36:53 -0500 Subject: [PATCH 35/37] build: update tsup and pkg-lock.json --- package-lock.json | 4 ++-- package.json | 2 +- tsup.config.js | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 559d24ba..b9f0b466 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@sern/handler", - "version": "1.1.7-beta", + "version": "1.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@sern/handler", - "version": "1.1.7-beta", + "version": "1.0.0", "license": "MIT", "dependencies": { "rxjs": "^7.5.6", diff --git a/package.json b/package.json index 08c875e5..6dd5a20d 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "clean-modules": "rimraf node_modules/ && npm install", "lint": "eslint src/**/*.ts", "format": "eslint src/**/*.ts --fix", - "build": "tsup --clean && node scripts/mkjson.mjs dist/cjs dist/esm && tsup --dts-only --outDir dist", + "build": "tsup && node scripts/mkjson.mjs dist/cjs dist/esm && tsup --dts-only --outDir dist", "publish": "npm run build && npm publish" }, "keywords": [ diff --git a/tsup.config.js b/tsup.config.js index 2110e845..e89f966a 100644 --- a/tsup.config.js +++ b/tsup.config.js @@ -9,6 +9,7 @@ export default defineConfig([ tsconfig : './tsconfig-esm.json', outDir : './dist/esm', platform: 'node', + external: ['discord.js'], clean: true, treeshake: true, outExtension() { @@ -22,6 +23,7 @@ export default defineConfig([ format : 'cjs', splitting: false, sourcemap: false, + external: ['discord.js'], clean: true, target: 'node16', tsconfig : './tsconfig-cjs.json', From 76fccf2cfe6fcb7db628cb9eb9fcdcce14b0647a Mon Sep 17 00:00:00 2001 From: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com> Date: Sat, 6 Aug 2022 14:24:40 -0500 Subject: [PATCH 36/37] feat: refresh package-lock.json --- package-lock.json | 674 +++++----------------------------------------- 1 file changed, 71 insertions(+), 603 deletions(-) diff --git a/package-lock.json b/package-lock.json index b29aa982..0c106139 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,6 +16,7 @@ "devDependencies": { "@typescript-eslint/eslint-plugin": "5.32.0", "@typescript-eslint/parser": "5.32.0", + "discord.js": "^14.1.2", "eslint": "8.20.0", "prettier": "2.7.1", "tsup": "^6.1.3", @@ -23,9 +24,10 @@ } }, "node_modules/@discordjs/builders": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-1.0.0.tgz", - "integrity": "sha512-8y91ZfpOHubiGJu5tVyGI9tQCEyHZDTeqUWVcJd0dq7B96xIf84S0L4fwmD1k9zTe1eqEFSk0gc7BpY+FKn7Ww==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-1.1.0.tgz", + "integrity": "sha512-EO8TSltiIc9Z1wE854wAFvv5AccqEtvjFmao9PPoxQhRaJ0hEb7FwWRTCA1jGg4ZWI3hcp4m+RET5ufZQz3rOg==", + "dev": true, "dependencies": { "@sapphire/shapeshift": "^3.5.1", "discord-api-types": "^0.36.3", @@ -41,6 +43,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-1.0.1.tgz", "integrity": "sha512-5V/wswzR3r2RVYXLxxg4TvrAnBhVCNgHTXhC+OUtLoriJ072rPMHo+Iw1SS1vrCckp8Es40XM411+WkNRPaXFw==", + "dev": true, "engines": { "node": ">=16.9.0" } @@ -49,6 +52,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-1.0.1.tgz", "integrity": "sha512-w08CTKVzzYYvKxEjXKOs9AdS7KQ1J502TrPfF8eCZ2lF6AfKuMP/32YgDakiwIyYTDjEQS/v0nKLSFcncHRMtg==", + "dev": true, "dependencies": { "@discordjs/collection": "^1.0.1", "@sapphire/async-queue": "^1.3.2", @@ -193,6 +197,7 @@ "version": "8.5.3", "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.3.tgz", "integrity": "sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w==", + "dev": true, "dependencies": { "@types/node": "*" } @@ -382,9 +387,9 @@ } }, "node_modules/acorn": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", - "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", + "version": "8.7.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.1.tgz", + "integrity": "sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -427,21 +432,6 @@ "node": ">=8" } }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/any-promise": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", @@ -546,40 +536,6 @@ "node": ">=6" } }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, "node_modules/chokidar": { "version": "3.5.3", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", @@ -686,7 +642,8 @@ "node_modules/discord-api-types": { "version": "0.36.3", "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.36.3.tgz", - "integrity": "sha512-bz/NDyG0KBo/tY14vSkrwQ/n3HKPf87a0WFW/1M9+tXYK+vp5Z5EksawfCWo2zkAc6o7CClc0eff1Pjrqznlwg==" + "integrity": "sha512-bz/NDyG0KBo/tY14vSkrwQ/n3HKPf87a0WFW/1M9+tXYK+vp5Z5EksawfCWo2zkAc6o7CClc0eff1Pjrqznlwg==", + "dev": true }, "node_modules/discord.js": { "version": "14.1.2", @@ -757,294 +714,6 @@ "esbuild-windows-arm64": "0.14.49" } }, - "node_modules/esbuild-android-64": { - "version": "0.14.49", - "resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.14.49.tgz", - "integrity": "sha512-vYsdOTD+yi+kquhBiFWl3tyxnj2qZJsl4tAqwhT90ktUdnyTizgle7TjNx6Ar1bN7wcwWqZ9QInfdk2WVagSww==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-android-arm64": { - "version": "0.14.49", - "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.49.tgz", - "integrity": "sha512-g2HGr/hjOXCgSsvQZ1nK4nW/ei8JUx04Li74qub9qWrStlysaVmadRyTVuW32FGIpLQyc5sUjjZopj49eGGM2g==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-darwin-64": { - "version": "0.14.49", - "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.49.tgz", - "integrity": "sha512-3rvqnBCtX9ywso5fCHixt2GBCUsogNp9DjGmvbBohh31Ces34BVzFltMSxJpacNki96+WIcX5s/vum+ckXiLYg==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-darwin-arm64": { - "version": "0.14.49", - "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.49.tgz", - "integrity": "sha512-XMaqDxO846srnGlUSJnwbijV29MTKUATmOLyQSfswbK/2X5Uv28M9tTLUJcKKxzoo9lnkYPsx2o8EJcTYwCs/A==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-freebsd-64": { - "version": "0.14.49", - "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.49.tgz", - "integrity": "sha512-NJ5Q6AjV879mOHFri+5lZLTp5XsO2hQ+KSJYLbfY9DgCu8s6/Zl2prWXVANYTeCDLlrIlNNYw8y34xqyLDKOmQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-freebsd-arm64": { - "version": "0.14.49", - "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.49.tgz", - "integrity": "sha512-lFLtgXnAc3eXYqj5koPlBZvEbBSOSUbWO3gyY/0+4lBdRqELyz4bAuamHvmvHW5swJYL7kngzIZw6kdu25KGOA==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-linux-32": { - "version": "0.14.49", - "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.49.tgz", - "integrity": "sha512-zTTH4gr2Kb8u4QcOpTDVn7Z8q7QEIvFl/+vHrI3cF6XOJS7iEI1FWslTo3uofB2+mn6sIJEQD9PrNZKoAAMDiA==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-linux-64": { - "version": "0.14.49", - "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.49.tgz", - "integrity": "sha512-hYmzRIDzFfLrB5c1SknkxzM8LdEUOusp6M2TnuQZJLRtxTgyPnZZVtyMeCLki0wKgYPXkFsAVhi8vzo2mBNeTg==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-linux-arm": { - "version": "0.14.49", - "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.49.tgz", - "integrity": "sha512-iE3e+ZVv1Qz1Sy0gifIsarJMQ89Rpm9mtLSRtG3AH0FPgAzQ5Z5oU6vYzhc/3gSPi2UxdCOfRhw2onXuFw/0lg==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-linux-arm64": { - "version": "0.14.49", - "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.49.tgz", - "integrity": "sha512-KLQ+WpeuY+7bxukxLz5VgkAAVQxUv67Ft4DmHIPIW+2w3ObBPQhqNoeQUHxopoW/aiOn3m99NSmSV+bs4BSsdA==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-linux-mips64le": { - "version": "0.14.49", - "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.49.tgz", - "integrity": "sha512-n+rGODfm8RSum5pFIqFQVQpYBw+AztL8s6o9kfx7tjfK0yIGF6tm5HlG6aRjodiiKkH2xAiIM+U4xtQVZYU4rA==", - "cpu": [ - "mips64el" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-linux-ppc64le": { - "version": "0.14.49", - "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.49.tgz", - "integrity": "sha512-WP9zR4HX6iCBmMFH+XHHng2LmdoIeUmBpL4aL2TR8ruzXyT4dWrJ5BSbT8iNo6THN8lod6GOmYDLq/dgZLalGw==", - "cpu": [ - "ppc64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-linux-riscv64": { - "version": "0.14.49", - "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.49.tgz", - "integrity": "sha512-h66ORBz+Dg+1KgLvzTVQEA1LX4XBd1SK0Fgbhhw4akpG/YkN8pS6OzYI/7SGENiN6ao5hETRDSkVcvU9NRtkMQ==", - "cpu": [ - "riscv64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-linux-s390x": { - "version": "0.14.49", - "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.49.tgz", - "integrity": "sha512-DhrUoFVWD+XmKO1y7e4kNCqQHPs6twz6VV6Uezl/XHYGzM60rBewBF5jlZjG0nCk5W/Xy6y1xWeopkrhFFM0sQ==", - "cpu": [ - "s390x" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-netbsd-64": { - "version": "0.14.49", - "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.49.tgz", - "integrity": "sha512-BXaUwFOfCy2T+hABtiPUIpWjAeWK9P8O41gR4Pg73hpzoygVGnj0nI3YK4SJhe52ELgtdgWP/ckIkbn2XaTxjQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-openbsd-64": { - "version": "0.14.49", - "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.49.tgz", - "integrity": "sha512-lP06UQeLDGmVPw9Rg437Btu6J9/BmyhdoefnQ4gDEJTtJvKtQaUcOQrhjTq455ouZN4EHFH1h28WOJVANK41kA==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-sunos-64": { - "version": "0.14.49", - "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.49.tgz", - "integrity": "sha512-4c8Zowp+V3zIWje329BeLbGh6XI9c/rqARNaj5yPHdC61pHI9UNdDxT3rePPJeWcEZVKjkiAS6AP6kiITp7FSw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-windows-32": { - "version": "0.14.49", - "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.49.tgz", - "integrity": "sha512-q7Rb+J9yHTeKr9QTPDYkqfkEj8/kcKz9lOabDuvEXpXuIcosWCJgo5Z7h/L4r7rbtTH4a8U2FGKb6s1eeOHmJA==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, "node_modules/esbuild-windows-64": { "version": "0.14.49", "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.49.tgz", @@ -1061,34 +730,6 @@ "node": ">=12" } }, - "node_modules/esbuild-windows-arm64": { - "version": "0.14.49", - "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.49.tgz", - "integrity": "sha512-v+HYNAXzuANrCbbLFJ5nmO3m5y2PGZWLe3uloAkLt87aXiO2mZr3BTmacZdjwNkNEHuH3bNtN8cak+mzVjVPfA==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/eslint": { "version": "8.20.0", "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.20.0.tgz", @@ -1512,20 +1153,6 @@ "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", "dev": true }, - "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, "node_modules/functional-red-black-tree": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", @@ -1545,15 +1172,15 @@ } }, "node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", "dev": true, "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^3.1.1", + "minimatch": "^3.0.4", "once": "^1.3.0", "path-is-absolute": "^1.0.0" }, @@ -1577,9 +1204,9 @@ } }, "node_modules/globals": { - "version": "13.17.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz", - "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", + "version": "13.16.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.16.0.tgz", + "integrity": "sha512-A1lrQfpNF+McdPOnnFqY3kSN0AFTy485bTi1bkLk4mVPODIUEcSfhHgRqA+QdXPksrSTTztYXx37NFV+GpGk3Q==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -1665,6 +1292,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/import-fresh/node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", @@ -2538,9 +2174,9 @@ "dev": true }, "node_modules/ts-pattern": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/ts-pattern/-/ts-pattern-4.0.5.tgz", - "integrity": "sha512-Bq44KCEt7JVaNLa148mBCJkcQf4l7jtLEBDuDdeuLynWDA+1a60P4D0rMkqSM9mOKLQbIWUddE9h3XKyKwBeqA==" + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/ts-pattern/-/ts-pattern-4.0.4.tgz", + "integrity": "sha512-gDKHf3T+4X2w5k5IpD4FQ6P5b0LRYW7sJdf/yG7uAdxKitgk2Z8UZLdSBjrXs5mI0Vq6E/hRQd6+Kh3FbdjBzw==" }, "node_modules/ts-results-es": { "version": "3.5.0", @@ -2790,17 +2426,18 @@ "dev": true }, "@discordjs/rest": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-1.0.0.tgz", - "integrity": "sha512-uDAvnE0P2a8axMdD4C51EGjvCRQ2HZk2Yxf6vHWZgIqG87D8DGKMPwmquIxrrB07MjV+rwci2ObU+mGhGP+bJg==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-1.0.1.tgz", + "integrity": "sha512-w08CTKVzzYYvKxEjXKOs9AdS7KQ1J502TrPfF8eCZ2lF6AfKuMP/32YgDakiwIyYTDjEQS/v0nKLSFcncHRMtg==", + "dev": true, "requires": { - "@discordjs/collection": "^1.0.0", + "@discordjs/collection": "^1.0.1", "@sapphire/async-queue": "^1.3.2", "@sapphire/snowflake": "^3.2.2", - "discord-api-types": "^0.36.2", - "file-type": "^17.1.2", + "discord-api-types": "^0.36.3", + "file-type": "^17.1.4", "tslib": "^2.4.0", - "undici": "^5.7.0" + "undici": "^5.8.0" } }, "@eslint/eslintrc": { @@ -2818,32 +2455,6 @@ "js-yaml": "^4.1.0", "minimatch": "^3.1.2", "strip-json-comments": "^3.1.1" - }, - "dependencies": { - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true - } } }, "@humanwhocodes/config-array": { @@ -2892,12 +2503,14 @@ "@sapphire/async-queue": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.3.2.tgz", - "integrity": "sha512-rUpMLATsoAMnlN3gecAcr9Ecnw1vG7zi5Xr+IX22YzRzi1k9PF9vKzoT8RuEJbiIszjcimu3rveqUnvwDopz8g==" + "integrity": "sha512-rUpMLATsoAMnlN3gecAcr9Ecnw1vG7zi5Xr+IX22YzRzi1k9PF9vKzoT8RuEJbiIszjcimu3rveqUnvwDopz8g==", + "dev": true }, "@sapphire/shapeshift": { "version": "3.5.1", "resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-3.5.1.tgz", "integrity": "sha512-7JFsW5IglyOIUQI1eE0g6h06D/Far6HqpcowRScgCiLSqTf3hhkPWCWotVTtVycnDCMYIwPeaw6IEPBomKC8pA==", + "dev": true, "requires": { "fast-deep-equal": "^3.1.3", "lodash.uniqwith": "^4.5.0" @@ -2906,12 +2519,14 @@ "@sapphire/snowflake": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/@sapphire/snowflake/-/snowflake-3.2.2.tgz", - "integrity": "sha512-ula2O0kpSZtX9rKXNeQMrHwNd7E4jPDJYUXmEGTFdMRfyfMw+FPyh04oKMjAiDuOi64bYgVkOV3MjK+loImFhQ==" + "integrity": "sha512-ula2O0kpSZtX9rKXNeQMrHwNd7E4jPDJYUXmEGTFdMRfyfMw+FPyh04oKMjAiDuOi64bYgVkOV3MjK+loImFhQ==", + "dev": true }, "@tokenizer/token": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/@tokenizer/token/-/token-0.3.0.tgz", - "integrity": "sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==" + "integrity": "sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==", + "dev": true }, "@types/json-schema": { "version": "7.0.11", @@ -3030,9 +2645,9 @@ } }, "acorn": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", - "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", + "version": "8.7.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.1.tgz", + "integrity": "sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==", "dev": true }, "acorn-jsx": { @@ -3076,15 +2691,6 @@ "picomatch": "^2.0.4" } }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, "argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -3257,12 +2863,6 @@ "esutils": "^2.0.2" } }, - "escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true - }, "esbuild": { "version": "0.14.49", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.49.tgz", @@ -3291,132 +2891,6 @@ "esbuild-windows-arm64": "0.14.49" } }, - "esbuild-android-64": { - "version": "0.14.49", - "resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.14.49.tgz", - "integrity": "sha512-vYsdOTD+yi+kquhBiFWl3tyxnj2qZJsl4tAqwhT90ktUdnyTizgle7TjNx6Ar1bN7wcwWqZ9QInfdk2WVagSww==", - "dev": true, - "optional": true - }, - "esbuild-android-arm64": { - "version": "0.14.49", - "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.49.tgz", - "integrity": "sha512-g2HGr/hjOXCgSsvQZ1nK4nW/ei8JUx04Li74qub9qWrStlysaVmadRyTVuW32FGIpLQyc5sUjjZopj49eGGM2g==", - "dev": true, - "optional": true - }, - "esbuild-darwin-64": { - "version": "0.14.49", - "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.49.tgz", - "integrity": "sha512-3rvqnBCtX9ywso5fCHixt2GBCUsogNp9DjGmvbBohh31Ces34BVzFltMSxJpacNki96+WIcX5s/vum+ckXiLYg==", - "dev": true, - "optional": true - }, - "esbuild-darwin-arm64": { - "version": "0.14.49", - "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.49.tgz", - "integrity": "sha512-XMaqDxO846srnGlUSJnwbijV29MTKUATmOLyQSfswbK/2X5Uv28M9tTLUJcKKxzoo9lnkYPsx2o8EJcTYwCs/A==", - "dev": true, - "optional": true - }, - "esbuild-freebsd-64": { - "version": "0.14.49", - "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.49.tgz", - "integrity": "sha512-NJ5Q6AjV879mOHFri+5lZLTp5XsO2hQ+KSJYLbfY9DgCu8s6/Zl2prWXVANYTeCDLlrIlNNYw8y34xqyLDKOmQ==", - "dev": true, - "optional": true - }, - "esbuild-freebsd-arm64": { - "version": "0.14.49", - "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.49.tgz", - "integrity": "sha512-lFLtgXnAc3eXYqj5koPlBZvEbBSOSUbWO3gyY/0+4lBdRqELyz4bAuamHvmvHW5swJYL7kngzIZw6kdu25KGOA==", - "dev": true, - "optional": true - }, - "esbuild-linux-32": { - "version": "0.14.49", - "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.49.tgz", - "integrity": "sha512-zTTH4gr2Kb8u4QcOpTDVn7Z8q7QEIvFl/+vHrI3cF6XOJS7iEI1FWslTo3uofB2+mn6sIJEQD9PrNZKoAAMDiA==", - "dev": true, - "optional": true - }, - "esbuild-linux-64": { - "version": "0.14.49", - "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.49.tgz", - "integrity": "sha512-hYmzRIDzFfLrB5c1SknkxzM8LdEUOusp6M2TnuQZJLRtxTgyPnZZVtyMeCLki0wKgYPXkFsAVhi8vzo2mBNeTg==", - "dev": true, - "optional": true - }, - "esbuild-linux-arm": { - "version": "0.14.49", - "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.49.tgz", - "integrity": "sha512-iE3e+ZVv1Qz1Sy0gifIsarJMQ89Rpm9mtLSRtG3AH0FPgAzQ5Z5oU6vYzhc/3gSPi2UxdCOfRhw2onXuFw/0lg==", - "dev": true, - "optional": true - }, - "esbuild-linux-arm64": { - "version": "0.14.49", - "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.49.tgz", - "integrity": "sha512-KLQ+WpeuY+7bxukxLz5VgkAAVQxUv67Ft4DmHIPIW+2w3ObBPQhqNoeQUHxopoW/aiOn3m99NSmSV+bs4BSsdA==", - "dev": true, - "optional": true - }, - "esbuild-linux-mips64le": { - "version": "0.14.49", - "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.49.tgz", - "integrity": "sha512-n+rGODfm8RSum5pFIqFQVQpYBw+AztL8s6o9kfx7tjfK0yIGF6tm5HlG6aRjodiiKkH2xAiIM+U4xtQVZYU4rA==", - "dev": true, - "optional": true - }, - "esbuild-linux-ppc64le": { - "version": "0.14.49", - "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.49.tgz", - "integrity": "sha512-WP9zR4HX6iCBmMFH+XHHng2LmdoIeUmBpL4aL2TR8ruzXyT4dWrJ5BSbT8iNo6THN8lod6GOmYDLq/dgZLalGw==", - "dev": true, - "optional": true - }, - "esbuild-linux-riscv64": { - "version": "0.14.49", - "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.49.tgz", - "integrity": "sha512-h66ORBz+Dg+1KgLvzTVQEA1LX4XBd1SK0Fgbhhw4akpG/YkN8pS6OzYI/7SGENiN6ao5hETRDSkVcvU9NRtkMQ==", - "dev": true, - "optional": true - }, - "esbuild-linux-s390x": { - "version": "0.14.49", - "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.49.tgz", - "integrity": "sha512-DhrUoFVWD+XmKO1y7e4kNCqQHPs6twz6VV6Uezl/XHYGzM60rBewBF5jlZjG0nCk5W/Xy6y1xWeopkrhFFM0sQ==", - "dev": true, - "optional": true - }, - "esbuild-netbsd-64": { - "version": "0.14.49", - "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.49.tgz", - "integrity": "sha512-BXaUwFOfCy2T+hABtiPUIpWjAeWK9P8O41gR4Pg73hpzoygVGnj0nI3YK4SJhe52ELgtdgWP/ckIkbn2XaTxjQ==", - "dev": true, - "optional": true - }, - "esbuild-openbsd-64": { - "version": "0.14.49", - "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.49.tgz", - "integrity": "sha512-lP06UQeLDGmVPw9Rg437Btu6J9/BmyhdoefnQ4gDEJTtJvKtQaUcOQrhjTq455ouZN4EHFH1h28WOJVANK41kA==", - "dev": true, - "optional": true - }, - "esbuild-sunos-64": { - "version": "0.14.49", - "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.49.tgz", - "integrity": "sha512-4c8Zowp+V3zIWje329BeLbGh6XI9c/rqARNaj5yPHdC61pHI9UNdDxT3rePPJeWcEZVKjkiAS6AP6kiITp7FSw==", - "dev": true, - "optional": true - }, - "esbuild-windows-32": { - "version": "0.14.49", - "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.49.tgz", - "integrity": "sha512-q7Rb+J9yHTeKr9QTPDYkqfkEj8/kcKz9lOabDuvEXpXuIcosWCJgo5Z7h/L4r7rbtTH4a8U2FGKb6s1eeOHmJA==", - "dev": true, - "optional": true - }, "esbuild-windows-64": { "version": "0.14.49", "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.49.tgz", @@ -3424,13 +2898,6 @@ "dev": true, "optional": true }, - "esbuild-windows-arm64": { - "version": "0.14.49", - "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.49.tgz", - "integrity": "sha512-v+HYNAXzuANrCbbLFJ5nmO3m5y2PGZWLe3uloAkLt87aXiO2mZr3BTmacZdjwNkNEHuH3bNtN8cak+mzVjVPfA==", - "dev": true, - "optional": true - }, "eslint": { "version": "8.20.0", "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.20.0.tgz", @@ -3756,29 +3223,28 @@ "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", "dev": true }, - "fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "optional": true - }, "functional-red-black-tree": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==", "dev": true }, + "get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true + }, "glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", "dev": true, "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^3.1.1", + "minimatch": "^3.0.4", "once": "^1.3.0", "path-is-absolute": "^1.0.0" } @@ -3793,9 +3259,9 @@ } }, "globals": { - "version": "13.17.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.17.0.tgz", - "integrity": "sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw==", + "version": "13.16.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.16.0.tgz", + "integrity": "sha512-A1lrQfpNF+McdPOnnFqY3kSN0AFTy485bTi1bkLk4mVPODIUEcSfhHgRqA+QdXPksrSTTztYXx37NFV+GpGk3Q==", "dev": true, "requires": { "type-fest": "^0.20.2" @@ -3815,12 +3281,6 @@ "slash": "^3.0.0" } }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, "human-signals": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", @@ -3847,6 +3307,14 @@ "requires": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" + }, + "dependencies": { + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + } } }, "imurmurhash": { From 2009593d07d1771532710cab6711914b1d2053e8 Mon Sep 17 00:00:00 2001 From: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com> Date: Sat, 6 Aug 2022 14:46:10 -0500 Subject: [PATCH 37/37] feat: test --- .npmignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.npmignore b/.npmignore index 86b66ad9..290f8e5a 100644 --- a/.npmignore +++ b/.npmignore @@ -8,7 +8,6 @@ logs npm-debug.log* yarn-debug.log* yarn-error.log* - # Runtime data pids *.pid