script: fix generateExports.js so that ...

... command mapping will have a lowercase key
This commit is contained in:
liushuyu 2022-09-21 20:20:32 -06:00
parent 23e8e1a8eb
commit e2c7fa776a
No known key found for this signature in database
GPG key ID: 23D1CE4534419437
3 changed files with 61 additions and 67 deletions

View file

@ -28,7 +28,7 @@ let loader_content = header;
for (let mod of modules) {
loader_content += `import * as ${mod} from "./${mod}";\n`;
}
let loader_map = modules.map((moduleName) => `${moduleName}: ${moduleName}`).join(', ');
let loader_map = modules.map((moduleName) => `${moduleName.toLowerCase()}: ${moduleName}`).join(', ');
loader_content += `\nexport default { ${loader_map} };\n`;
fs.writeFileSync("./src/commands/_.ts", loader_content);

View file

@ -29,8 +29,8 @@
"@types/node-fetch": "^2",
"@types/string-similarity": "^4.0.0",
"@types/ws": "^8.5.3",
"@typescript-eslint/eslint-plugin": "^5.37.0",
"@typescript-eslint/parser": "^5.37.0",
"@typescript-eslint/eslint-plugin": "^5.38.0",
"@typescript-eslint/parser": "^5.38.0",
"eslint": "^8.23.1",
"eslint-config-standard": "^17.0.0",
"eslint-plugin-import": "^2.26.0",

122
yarn.lock
View file

@ -89,9 +89,9 @@
strip-json-comments "^3.1.1"
"@humanwhocodes/config-array@^0.10.4":
version "0.10.4"
resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.10.4.tgz#01e7366e57d2ad104feea63e72248f22015c520c"
integrity sha512-mXAIHxZT3Vcpg83opl1wGlVZ9xydbfZO3r5YfRSH6Gpp2J/PfdBP0wbDa2sO6/qRbcalpoevVyW6A/fI6LfeMw==
version "0.10.5"
resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.10.5.tgz#bb679745224745fff1e9a41961c1d45a49f81c04"
integrity sha512-XVVDtp+dVvRxMoxSiSfasYaG02VEe1qH5cKgMQJWhol6HwzbcqoCMJi8dAGoYAO57jhUyhI6cWuRiTcRaDaYug==
dependencies:
"@humanwhocodes/object-schema" "^1.2.1"
debug "^4.1.1"
@ -348,85 +348,84 @@
dependencies:
"@types/node" "*"
"@typescript-eslint/eslint-plugin@^5.37.0":
version "5.37.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.37.0.tgz#5ccdd5d9004120f28fc6e717fb4b5c9bddcfbc04"
integrity sha512-Fde6W0IafXktz1UlnhGkrrmnnGpAo1kyX7dnyHHVrmwJOn72Oqm3eYtddrpOwwel2W8PAK9F3pIL5S+lfoM0og==
"@typescript-eslint/eslint-plugin@^5.38.0":
version "5.38.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.38.0.tgz#ac919a199548861012e8c1fb2ec4899ac2bc22ae"
integrity sha512-GgHi/GNuUbTOeoJiEANi0oI6fF3gBQc3bGFYj40nnAPCbhrtEDf2rjBmefFadweBmO1Du1YovHeDP2h5JLhtTQ==
dependencies:
"@typescript-eslint/scope-manager" "5.37.0"
"@typescript-eslint/type-utils" "5.37.0"
"@typescript-eslint/utils" "5.37.0"
"@typescript-eslint/scope-manager" "5.38.0"
"@typescript-eslint/type-utils" "5.38.0"
"@typescript-eslint/utils" "5.38.0"
debug "^4.3.4"
functional-red-black-tree "^1.0.1"
ignore "^5.2.0"
regexpp "^3.2.0"
semver "^7.3.7"
tsutils "^3.21.0"
"@typescript-eslint/parser@^5.37.0":
version "5.37.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.37.0.tgz#c382077973f3a4ede7453fb14cadcad3970cbf3b"
integrity sha512-01VzI/ipYKuaG5PkE5+qyJ6m02fVALmMPY3Qq5BHflDx3y4VobbLdHQkSMg9VPRS4KdNt4oYTMaomFoHonBGAw==
"@typescript-eslint/parser@^5.38.0":
version "5.38.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.38.0.tgz#5a59a1ff41a7b43aacd1bb2db54f6bf1c02b2ff8"
integrity sha512-/F63giJGLDr0ms1Cr8utDAxP2SPiglaD6V+pCOcG35P2jCqdfR7uuEhz1GIC3oy4hkUF8xA1XSXmd9hOh/a5EA==
dependencies:
"@typescript-eslint/scope-manager" "5.37.0"
"@typescript-eslint/types" "5.37.0"
"@typescript-eslint/typescript-estree" "5.37.0"
"@typescript-eslint/scope-manager" "5.38.0"
"@typescript-eslint/types" "5.38.0"
"@typescript-eslint/typescript-estree" "5.38.0"
debug "^4.3.4"
"@typescript-eslint/scope-manager@5.37.0":
version "5.37.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.37.0.tgz#044980e4f1516a774a418dafe701a483a6c9f9ca"
integrity sha512-F67MqrmSXGd/eZnujjtkPgBQzgespu/iCZ+54Ok9X5tALb9L2v3G+QBSoWkXG0p3lcTJsL+iXz5eLUEdSiJU9Q==
"@typescript-eslint/scope-manager@5.38.0":
version "5.38.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.38.0.tgz#8f0927024b6b24e28671352c93b393a810ab4553"
integrity sha512-ByhHIuNyKD9giwkkLqzezZ9y5bALW8VNY6xXcP+VxoH4JBDKjU5WNnsiD4HJdglHECdV+lyaxhvQjTUbRboiTA==
dependencies:
"@typescript-eslint/types" "5.37.0"
"@typescript-eslint/visitor-keys" "5.37.0"
"@typescript-eslint/types" "5.38.0"
"@typescript-eslint/visitor-keys" "5.38.0"
"@typescript-eslint/type-utils@5.37.0":
version "5.37.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.37.0.tgz#43ed2f567ada49d7e33a6e4b6f9babd060445fe5"
integrity sha512-BSx/O0Z0SXOF5tY0bNTBcDEKz2Ec20GVYvq/H/XNKiUorUFilH7NPbFUuiiyzWaSdN3PA8JV0OvYx0gH/5aFAQ==
"@typescript-eslint/type-utils@5.38.0":
version "5.38.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.38.0.tgz#c8b7f681da825fcfc66ff2b63d70693880496876"
integrity sha512-iZq5USgybUcj/lfnbuelJ0j3K9dbs1I3RICAJY9NZZpDgBYXmuUlYQGzftpQA9wC8cKgtS6DASTvF3HrXwwozA==
dependencies:
"@typescript-eslint/typescript-estree" "5.37.0"
"@typescript-eslint/utils" "5.37.0"
"@typescript-eslint/typescript-estree" "5.38.0"
"@typescript-eslint/utils" "5.38.0"
debug "^4.3.4"
tsutils "^3.21.0"
"@typescript-eslint/types@5.37.0":
version "5.37.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.37.0.tgz#09e4870a5f3af7af3f84e08d792644a87d232261"
integrity sha512-3frIJiTa5+tCb2iqR/bf7XwU20lnU05r/sgPJnRpwvfZaqCJBrl8Q/mw9vr3NrNdB/XtVyMA0eppRMMBqdJ1bA==
"@typescript-eslint/types@5.38.0":
version "5.38.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.38.0.tgz#8cd15825e4874354e31800dcac321d07548b8a5f"
integrity sha512-HHu4yMjJ7i3Cb+8NUuRCdOGu2VMkfmKyIJsOr9PfkBVYLYrtMCK/Ap50Rpov+iKpxDTfnqvDbuPLgBE5FwUNfA==
"@typescript-eslint/typescript-estree@5.37.0":
version "5.37.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.37.0.tgz#956dcf5c98363bcb97bdd5463a0a86072ff79355"
integrity sha512-JkFoFIt/cx59iqEDSgIGnQpCTRv96MQnXCYvJi7QhBC24uyuzbD8wVbajMB1b9x4I0octYFJ3OwjAwNqk1AjDA==
"@typescript-eslint/typescript-estree@5.38.0":
version "5.38.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.38.0.tgz#89f86b2279815c6fb7f57d68cf9b813f0dc25d98"
integrity sha512-6P0RuphkR+UuV7Avv7MU3hFoWaGcrgOdi8eTe1NwhMp2/GjUJoODBTRWzlHpZh6lFOaPmSvgxGlROa0Sg5Zbyg==
dependencies:
"@typescript-eslint/types" "5.37.0"
"@typescript-eslint/visitor-keys" "5.37.0"
"@typescript-eslint/types" "5.38.0"
"@typescript-eslint/visitor-keys" "5.38.0"
debug "^4.3.4"
globby "^11.1.0"
is-glob "^4.0.3"
semver "^7.3.7"
tsutils "^3.21.0"
"@typescript-eslint/utils@5.37.0":
version "5.37.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.37.0.tgz#7784cb8e91390c4f90ccaffd24a0cf9874df81b2"
integrity sha512-jUEJoQrWbZhmikbcWSMDuUSxEE7ID2W/QCV/uz10WtQqfOuKZUqFGjqLJ+qhDd17rjgp+QJPqTdPIBWwoob2NQ==
"@typescript-eslint/utils@5.38.0":
version "5.38.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.38.0.tgz#5b31f4896471818153790700eb02ac869a1543f4"
integrity sha512-6sdeYaBgk9Fh7N2unEXGz+D+som2QCQGPAf1SxrkEr+Z32gMreQ0rparXTNGRRfYUWk/JzbGdcM8NSSd6oqnTA==
dependencies:
"@types/json-schema" "^7.0.9"
"@typescript-eslint/scope-manager" "5.37.0"
"@typescript-eslint/types" "5.37.0"
"@typescript-eslint/typescript-estree" "5.37.0"
"@typescript-eslint/scope-manager" "5.38.0"
"@typescript-eslint/types" "5.38.0"
"@typescript-eslint/typescript-estree" "5.38.0"
eslint-scope "^5.1.1"
eslint-utils "^3.0.0"
"@typescript-eslint/visitor-keys@5.37.0":
version "5.37.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.37.0.tgz#7b72dd343295ea11e89b624995abc7103c554eee"
integrity sha512-Hp7rT4cENBPIzMwrlehLW/28EVCOcE9U1Z1BQTc8EA8v5qpr7GRGuG+U58V5tTY48zvUOA3KHvw3rA8tY9fbdA==
"@typescript-eslint/visitor-keys@5.38.0":
version "5.38.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.38.0.tgz#60591ca3bf78aa12b25002c0993d067c00887e34"
integrity sha512-MxnrdIyArnTi+XyFLR+kt/uNAcdOnmT+879os7qDRI+EYySR4crXJq9BXPfRzzLGq0wgxkwidrCJ9WCAoacm1w==
dependencies:
"@typescript-eslint/types" "5.37.0"
"@typescript-eslint/types" "5.38.0"
eslint-visitor-keys "^3.3.0"
acorn-jsx@^5.3.2:
@ -811,26 +810,26 @@ dir-glob@^3.0.1:
dependencies:
path-type "^4.0.0"
discord-api-types@^0.37.3:
discord-api-types@^0.37.10, discord-api-types@^0.37.3:
version "0.37.10"
resolved "https://registry.yarnpkg.com/discord-api-types/-/discord-api-types-0.37.10.tgz#d596ed7178f349009e6a9109de5724f11a1de157"
integrity sha512-NvDh2Puc3wZQzQt2zLavlI5ewBnLFjI46/NJmvWIs6OC0JOkq7KcmH4s80X2+22mSQ3wUyge2mxq3cGYRT2noQ==
discord.js@^14.3.0:
version "14.3.0"
resolved "https://registry.yarnpkg.com/discord.js/-/discord.js-14.3.0.tgz#9e43df7e4d2d14b11f3de751236e983159c3d3d0"
integrity sha512-CpIwoAAuELiHSgVKRMzsCADS6ZlJwAZ9RlvcJYdEgS00aW36dSvXyBgE+S3pigkc7G+jU6BEalMUWIJFveqrBQ==
version "14.4.0"
resolved "https://registry.yarnpkg.com/discord.js/-/discord.js-14.4.0.tgz#41028c9730badb06eab07f38fab4acaf8c9df21d"
integrity sha512-U2CTmVOep2qgMhbSDzmjd1qFUiuKNQqnnwvEYEh18vyU0looj66+wgcMOXQRq72BUCJM5fi+Hir8gfKZ35J88g==
dependencies:
"@discordjs/builders" "^1.2.0"
"@discordjs/collection" "^1.1.0"
"@discordjs/rest" "^1.1.0"
"@sapphire/snowflake" "^3.2.2"
"@types/ws" "^8.5.3"
discord-api-types "^0.37.3"
discord-api-types "^0.37.10"
fast-deep-equal "^3.1.3"
lodash.snakecase "^4.1.1"
tslib "^2.4.0"
undici "^5.9.1"
undici "^5.10.0"
ws "^8.8.1"
doctrine@^2.1.0:
@ -1260,11 +1259,6 @@ function.prototype.name@^1.1.5:
es-abstract "^1.19.0"
functions-have-names "^1.2.2"
functional-red-black-tree@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327"
integrity sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==
functions-have-names@^1.2.2:
version "1.2.3"
resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834"
@ -2346,7 +2340,7 @@ unbox-primitive@^1.0.2:
has-symbols "^1.0.3"
which-boxed-primitive "^1.0.2"
undici@^5.9.1:
undici@^5.10.0, undici@^5.9.1:
version "5.10.0"
resolved "https://registry.yarnpkg.com/undici/-/undici-5.10.0.tgz#dd9391087a90ccfbd007568db458674232ebf014"
integrity sha512-c8HsD3IbwmjjbLvoZuRI26TZic+TSEe8FPMLLOkN1AfYRhdjnKBU6yL+IwcSCbdZiX4e5t0lfMDLDCqj4Sq70g==