From 603f6ceef3ed4d261d33e252b560feb1bf269bad Mon Sep 17 00:00:00 2001 From: Lilith Ashley Nyx Arson Date: Mon, 4 Aug 2025 14:17:24 +0000 Subject: [PATCH] replace booru --- package.json | 2 +- pnpm-lock.yaml | 88 ++++++++++-------------------------- src/commands/fun/gelbooru.js | 2 +- 3 files changed, 25 insertions(+), 67 deletions(-) diff --git a/package.json b/package.json index b9dbe29..e3c14f4 100644 --- a/package.json +++ b/package.json @@ -8,9 +8,9 @@ "author": "", "license": "MIT", "dependencies": { - "@himeka/booru": "^2.7.7", "@imgproxy/imgproxy-node": "^1.1.0", "better-sqlite3": "^11.10.0", + "booru": "^2.8.1", "bootstrap": "^5.3.7", "canvas": "^3.1.2", "discord.js": "^14.21.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a36d629..50ac8a4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,15 +8,15 @@ importers: .: dependencies: - '@himeka/booru': - specifier: ^2.7.7 - version: 2.7.7 '@imgproxy/imgproxy-node': specifier: ^1.1.0 version: 1.1.0 better-sqlite3: specifier: ^11.10.0 version: 11.10.0 + booru: + specifier: ^2.8.1 + version: 2.8.1 bootstrap: specifier: ^5.3.7 version: 5.3.7(@popperjs/core@2.11.8) @@ -78,10 +78,6 @@ packages: resolution: {integrity: sha512-wPlQDxEmlDg5IxhJPuxXr3Vy9AjYq5xCvFWGJyD7w7Np8ZGu+Mc+97LCoEc/+AYCo2IDpKioiH0/c/mj5ZR9Uw==} engines: {node: '>=16.11.0'} - '@himeka/booru@2.7.7': - resolution: {integrity: sha512-8svZVugOp7eaIU6YN6+Fol+thHv++wrkSD0aOKCp+MKX4T7L9hjQ8c+YcKl00Ty6PBgNTAM9mikbVQ9xYJrT8w==} - engines: {node: '>=10.0.0'} - '@imgproxy/imgproxy-js-core@1.4.0': resolution: {integrity: sha512-uCzTtGdP3TGS5I0UbecoM2zABjUk39hDzMrSuodTydF/pHwzJQvv/J4Tch5FU9oHfgrAq0FrEMAvWKSthQFNXQ==} @@ -142,6 +138,10 @@ packages: resolution: {integrity: sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==} engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} + booru@2.8.1: + resolution: {integrity: sha512-Nte1iVzu1jfGEGvyYDiifLYCUScIxr2M42DKUAuDy/j1Qpuclo2B+AM1kgo5/2WumpWknBHadMaIscaKHuYFFA==} + engines: {node: '>=20'} + bootstrap@5.3.7: resolution: {integrity: sha512-7KgiD8UHjfcPBHEpDNg+zGz8L3LqR3GVwqZiBRFX04a1BCArZOz1r2kjly2HQ0WokqTO0v1nF+QAt8dsW4lKlw==} peerDependencies: @@ -307,8 +307,8 @@ packages: fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} - fast-xml-parser@4.4.0: - resolution: {integrity: sha512-kLY3jFlwIYwBNDojclKsNAC12sfD6NwW74QB2CoNGPvtVxjliYehVunB3HYyNi+n4Tt1dAcgwYvmKF/Z18flqg==} + fast-xml-parser@5.2.5: + resolution: {integrity: sha512-pfX9uG9Ki0yekDHx2SiuRIyFdyAr1kMIMitPvb0YBo8SUfKvia7w7FIyd/l6av85pFYRhZscS75MwMnbvY+hcQ==} hasBin: true file-uri-to-path@1.0.0: @@ -397,9 +397,6 @@ packages: resolution: {integrity: sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==} engines: {node: '>= 0.4'} - isomorphic-unfetch@3.1.0: - resolution: {integrity: sha512-geDJjpoZ8N0kWexiwkX8F9NkTsXhetLPVbZFQ+JTW239QNOwvB0gniuR1Wc6f0AMTn7/mFGyXvHTifrCp/GH8Q==} - jake@10.9.4: resolution: {integrity: sha512-wpHYzhxiVQL+IV05BLE2Xn34zW1S223hvjtqk0+gsPrwd/8JNLXJgZZM/iPFsYc1xyphF+6M6EvdE5E9MBGkDA==} engines: {node: '>=10'} @@ -507,15 +504,6 @@ packages: node-addon-api@7.1.1: resolution: {integrity: sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==} - node-fetch@2.7.0: - resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} - engines: {node: 4.x || >=6.0.0} - peerDependencies: - encoding: ^0.1.0 - peerDependenciesMeta: - encoding: - optional: true - object-inspect@1.13.4: resolution: {integrity: sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==} engines: {node: '>= 0.4'} @@ -652,8 +640,8 @@ packages: resolution: {integrity: sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==} engines: {node: '>=0.10.0'} - strnum@1.1.2: - resolution: {integrity: sha512-vrN+B7DBIoTTZjnPNewwhx6cBA/H+IS7rfW68n7XxC1y7uoiGQBxaKzqucGUgavX15dJgiGztLJ8vxuEzwqBdA==} + strnum@2.1.1: + resolution: {integrity: sha512-7ZvoFTiCnGxBtDqJ//Cu6fWtZtc7Y3x+QOirG15wztbdngGSkht27o2pyGWrVy0b4WAy3jbKmnoK6g5VlVNUUw==} supports-preserve-symlinks-flag@1.0.0: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} @@ -678,9 +666,6 @@ packages: resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==} engines: {node: '>=0.6'} - tr46@0.0.3: - resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} - ts-mixer@6.0.4: resolution: {integrity: sha512-ufKpbmrugz5Aou4wcr5Wc1UUFWOLhq+Fm6qa6P0w0K5Qw2yhaUoiWszhCVuNQyNwrlGiscHOmqYoAox1PtvgjA==} @@ -701,8 +686,9 @@ packages: resolution: {integrity: sha512-gBLkYIlEnSp8pFbT64yFgGE6UIB9tAkhukC23PmMDCe5Nd+cRqKxSjw5y54MK2AZMgZfJWMaNE4nYUHgi1XEOw==} engines: {node: '>=18.17'} - unfetch@4.2.0: - resolution: {integrity: sha512-F9p7yYCn6cIW9El1zi0HI6vqpeIvBsr3dSuRO6Xuppb1u5rXpCPmMvLSyECLhybr9isec8Ohl0hPekMVrEinDA==} + undici@7.13.0: + resolution: {integrity: sha512-l+zSMssRqrzDcb3fjMkjjLGmuiiK2pMIcV++mJaAc9vhjSGpvM7h43QgP+OAMb1GImHmbPyG2tBXeuyG5iY4gA==} + engines: {node: '>=20.18.1'} unpipe@1.0.0: resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==} @@ -719,12 +705,6 @@ packages: resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==} engines: {node: '>= 0.8'} - webidl-conversions@3.0.1: - resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} - - whatwg-url@5.0.0: - resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} - wrappy@1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} @@ -789,13 +769,6 @@ snapshots: - bufferutil - utf-8-validate - '@himeka/booru@2.7.7': - dependencies: - fast-xml-parser: 4.4.0 - isomorphic-unfetch: 3.1.0 - transitivePeerDependencies: - - encoding - '@imgproxy/imgproxy-js-core@1.4.0': {} '@imgproxy/imgproxy-node@1.1.0': @@ -868,6 +841,11 @@ snapshots: transitivePeerDependencies: - supports-color + booru@2.8.1: + dependencies: + fast-xml-parser: 5.2.5 + undici: 7.13.0 + bootstrap@5.3.7(@popperjs/core@2.11.8): dependencies: '@popperjs/core': 2.11.8 @@ -1035,9 +1013,9 @@ snapshots: fast-deep-equal@3.1.3: {} - fast-xml-parser@4.4.0: + fast-xml-parser@5.2.5: dependencies: - strnum: 1.1.2 + strnum: 2.1.1 file-uri-to-path@1.0.0: {} @@ -1125,13 +1103,6 @@ snapshots: dependencies: hasown: 2.0.2 - isomorphic-unfetch@3.1.0: - dependencies: - node-fetch: 2.7.0 - unfetch: 4.2.0 - transitivePeerDependencies: - - encoding - jake@10.9.4: dependencies: async: 3.2.6 @@ -1207,10 +1178,6 @@ snapshots: node-addon-api@7.1.1: {} - node-fetch@2.7.0: - dependencies: - whatwg-url: 5.0.0 - object-inspect@1.13.4: {} on-finished@2.4.1: @@ -1381,7 +1348,7 @@ snapshots: strip-json-comments@2.0.1: {} - strnum@1.1.2: {} + strnum@2.1.1: {} supports-preserve-symlinks-flag@1.0.0: {} @@ -1406,8 +1373,6 @@ snapshots: toidentifier@1.0.1: {} - tr46@0.0.3: {} - ts-mixer@6.0.4: {} tslib@2.8.1: {} @@ -1425,7 +1390,7 @@ snapshots: undici@6.21.3: {} - unfetch@4.2.0: {} + undici@7.13.0: {} unpipe@1.0.0: {} @@ -1435,13 +1400,6 @@ snapshots: vary@1.1.2: {} - webidl-conversions@3.0.1: {} - - whatwg-url@5.0.0: - dependencies: - tr46: 0.0.3 - webidl-conversions: 3.0.1 - wrappy@1.0.2: {} ws@8.18.3: {} diff --git a/src/commands/fun/gelbooru.js b/src/commands/fun/gelbooru.js index af6a8ee..29ba204 100644 --- a/src/commands/fun/gelbooru.js +++ b/src/commands/fun/gelbooru.js @@ -5,7 +5,7 @@ const { stringify } = require("node:querystring"); const { readFileSync } = require("node:fs"); const { decode } = require("html-entities"); const { knex } = require("../../db.js"); -const Booru = require("@himeka/booru"); +const Booru = require("booru"); const boorus = []; for (const site of Object.keys(Booru.sites)) {