From b5dd8c498aa506f523e448528b0644ab162102e5 Mon Sep 17 00:00:00 2001 From: amy Date: Mon, 14 Apr 2025 18:49:18 +0330 Subject: [PATCH 01/10] this is significantly less shit --- src/commands/lastlistened.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/commands/lastlistened.ts b/src/commands/lastlistened.ts index 2ac6806..78004a7 100644 --- a/src/commands/lastlistened.ts +++ b/src/commands/lastlistened.ts @@ -31,12 +31,19 @@ export default class LastListenedCommand extends Command { async run(interaction: ChatInputCommandInteraction, config: Config) { await interaction.deferReply() const user = interaction.options.getString("user") ?? config.listenbrainzAccount; + const historyAmount = interaction.options.getInteger("count") ?? 3; const meow = await fetch(`https://api.listenbrainz.org/1/user/${user}/listens`).then((res) => res.json()); const zodded = listenBrainzListensShape.parse(meow) - const object = zodded.payload.listens.slice(0, 3); + const object = zodded.payload.listens.slice(0, historyAmount); + + const songs = object.slice(0, historyAmount).map((i) => { + const shit = i.track_metadata; + const name = shit.track_name; + return `- ${name} by ${shit.artist_name}`; + }).join('\n'); await interaction.followUp({ - content: `the last 3 songs of ${user} was:\n\n- ${object[0].track_metadata.release_name} by ${object[0].track_metadata.artist_name}\n- ${object[1].track_metadata.release_name} by ${object[1].track_metadata.artist_name}\n- ${object[2].track_metadata.release_name} by ${object[2].track_metadata.artist_name}` + content: `The last ${historyAmount} songs of ${user} were:\n\n${songs}` }); } @@ -45,6 +52,9 @@ export default class LastListenedCommand extends Command { .setDescription("get that last listened music of a person").setIntegrationTypes([ ApplicationIntegrationType.UserInstall ]) + .addIntegerOption(option => { + return option.setName("count").setDescription("amount of history you want").setRequired(false) + }) .addStringOption(option => { return option.setName("user").setDescription("listenbrainz username").setRequired(false) }) From 5f4e28f7bc58eb13e38b609beb6a9e1f80d70ab1 Mon Sep 17 00:00:00 2001 From: amy Date: Wed, 30 Apr 2025 23:10:04 +0330 Subject: [PATCH 02/10] randnum --- .idea/prettier.xml | 7 +++++++ src/commands/randnum.ts | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 .idea/prettier.xml create mode 100644 src/commands/randnum.ts diff --git a/.idea/prettier.xml b/.idea/prettier.xml new file mode 100644 index 0000000..0c83ac4 --- /dev/null +++ b/.idea/prettier.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/src/commands/randnum.ts b/src/commands/randnum.ts new file mode 100644 index 0000000..88a5ae6 --- /dev/null +++ b/src/commands/randnum.ts @@ -0,0 +1,41 @@ +import {Command} from "../command.ts"; +import { + ApplicationIntegrationType, + ChatInputCommandInteraction, + InteractionContextType, + SlashCommandBuilder +} from "discord.js"; +import { type Config } from "../config.ts"; + +export default class PingCommand extends Command { + async run(interaction: ChatInputCommandInteraction, config: Config) { + const upperbound = interaction.options.getInteger("upperbound")!; + const comment = interaction.options.getString("comment"); + + if (comment === null){ + await interaction.reply({ + content: "random number is: " + `${Math.floor(Math.random() * upperbound)}`, + }); + return + } + await interaction.reply({ + content: `chances of ${comment} out of ${upperbound} is ${Math.floor(Math.random() * upperbound)}`, + }); + + } + + slashCommand = new SlashCommandBuilder() + .setName("randnum") + .setDescription("random number").setIntegrationTypes([ + ApplicationIntegrationType.UserInstall + ]).addIntegerOption(option => { + return option.setName("upperbound").setRequired(true).setDescription("idk nea told me") + }).addStringOption(option => { + return option.setName("comment").setRequired(false).setDescription("comment") + }) + .setContexts([ + InteractionContextType.BotDM, + InteractionContextType.Guild, + InteractionContextType.PrivateChannel + ]); +} From 13457c3fbede83c01beb379f0f7f6b02b9111706 Mon Sep 17 00:00:00 2001 From: amy Date: Sun, 11 May 2025 19:41:42 +0330 Subject: [PATCH 03/10] in my components v2 arc --- package.json | 2 +- pnpm-lock.yaml | 97 +++++++++++++++++++------------------- src/commands/nowplaying.ts | 39 ++++++++------- 3 files changed, 72 insertions(+), 66 deletions(-) diff --git a/package.json b/package.json index 0bd496d..1d0031f 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "acorn": "^8.14.1", "astring": "^1.9.0", "canvas": "^3.1.0", - "discord.js": "^14.17.2", + "discord.js": "^14.19.3", "sharp": "git+ssh://git@github.com/lovell/sharp.git", "ts-node": "^10.9.2", "zod": "^3.24.2" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c65f982..6197224 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -26,8 +26,8 @@ importers: specifier: ^3.1.0 version: 3.1.0 discord.js: - specifier: ^14.17.2 - version: 14.17.2 + specifier: ^14.19.3 + version: 14.19.3 sharp: specifier: git+ssh://git@github.com/lovell/sharp.git version: https://codeload.github.com/lovell/sharp/tar.gz/03e1b19764719d1b031045420223e78160db9bd0(patch_hash=aec393aef46aa4fa39e5c8d152bbe386c4b9df13f70cc0a46ee371547d7395dc) @@ -48,8 +48,8 @@ packages: resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} engines: {node: '>=12'} - '@discordjs/builders@1.10.0': - resolution: {integrity: sha512-ikVZsZP+3shmVJ5S1oM+7SveUCK3L9fTyfA8aJ7uD9cNQlTqF+3Irbk2Y22KXTb3C3RNUahRkSInClJMkHrINg==} + '@discordjs/builders@1.11.2': + resolution: {integrity: sha512-F1WTABdd8/R9D1icJzajC4IuLyyS8f3rTOz66JsSI3pKvpCAtsMBweu8cyNYsIyvcrKAVn9EPK+Psoymq+XC0A==} engines: {node: '>=16.11.0'} '@discordjs/collection@1.5.3': @@ -60,20 +60,20 @@ packages: resolution: {integrity: sha512-LiSusze9Tc7qF03sLCujF5iZp7K+vRNEDBZ86FT9aQAv3vxMLihUvKvpsCWiQ2DJq1tVckopKm1rxomgNUc9hg==} engines: {node: '>=18'} - '@discordjs/formatters@0.6.0': - resolution: {integrity: sha512-YIruKw4UILt/ivO4uISmrGq2GdMY6EkoTtD0oS0GvkJFRZbTSdPhzYiUILbJ/QslsvC9H9nTgGgnarnIl4jMfw==} + '@discordjs/formatters@0.6.1': + resolution: {integrity: sha512-5cnX+tASiPCqCWtFcFslxBVUaCetB0thvM/JyavhbXInP1HJIEU+Qv/zMrnuwSsX3yWH2lVXNJZeDK3EiP4HHg==} engines: {node: '>=16.11.0'} - '@discordjs/rest@2.4.2': - resolution: {integrity: sha512-9bOvXYLQd5IBg/kKGuEFq3cstVxAMJ6wMxO2U3wjrgO+lHv8oNCT+BBRpuzVQh7BoXKvk/gpajceGvQUiRoJ8g==} + '@discordjs/rest@2.5.0': + resolution: {integrity: sha512-PWhchxTzpn9EV3vvPRpwS0EE2rNYB9pvzDU/eLLW3mByJl0ZHZjHI2/wA8EbH2gRMQV7nu+0FoDF84oiPl8VAQ==} engines: {node: '>=18'} '@discordjs/util@1.1.1': resolution: {integrity: sha512-eddz6UnOBEB1oITPinyrB2Pttej49M9FZQY8NxgEvc3tq6ZICZ19m70RsmzRdDHk80O9NoYN/25AqJl8vPVf/g==} engines: {node: '>=18'} - '@discordjs/ws@1.2.0': - resolution: {integrity: sha512-QH5CAFe3wHDiedbO+EI3OOiyipwWd+Q6BdoFZUw/Wf2fw5Cv2fgU/9UEtJRmJa9RecI+TAhdGPadMaEIur5yJg==} + '@discordjs/ws@1.2.2': + resolution: {integrity: sha512-dyfq7yn0wO0IYeYOs3z79I6/HumhmKISzFL0Z+007zQJMtAFGtt3AEoq1nuLXtcunUE5YYYQqgKvybXukAK8/w==} engines: {node: '>=16.11.0'} '@emnapi/runtime@1.3.1': @@ -226,8 +226,8 @@ packages: '@types/node@22.14.0': resolution: {integrity: sha512-Kmpl+z84ILoG+3T/zQFyAJsU6EPTmOCj8/2+83fSN6djd6I4o7uOuGIH6vq3PrjY5BGitSbFuMN18j3iknubbA==} - '@types/ws@8.5.13': - resolution: {integrity: sha512-osM/gWBTPKgHV8XkTunnegTRIsvF6owmf5w+JtAfOw472dptdm0dlGv4xCt6GwQRcC2XVOvvRE/0bAoQcL2QkA==} + '@types/ws@8.18.1': + resolution: {integrity: sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==} '@vladfrangu/async_event_emitter@2.4.6': resolution: {integrity: sha512-RaI5qZo6D2CVS6sTHFKg1v5Ohq/+Bo2LZ5gzUEwZ/WkHhwtGTCB/sVLw8ijOkAUxasZ+WshN/Rzj4ywsABJ5ZA==} @@ -298,11 +298,11 @@ packages: resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} engines: {node: '>=0.3.1'} - discord-api-types@0.37.115: - resolution: {integrity: sha512-ivPnJotSMrXW8HLjFu+0iCVs8zP6KSliMelhr7HgcB2ki1QzpORkb26m71l1pzSnnGfm7gb5n/VtRTtpw8kXFA==} + discord-api-types@0.38.4: + resolution: {integrity: sha512-EgxEQ4vrJUjXaTjif4ItOGoD6TH87nfESJ6XBSqoVgqkZrcmdLPjkciCzuIMdHxLjY2al3BcIcElqnpOoaqxHg==} - discord.js@14.17.2: - resolution: {integrity: sha512-mrH6ziLVtNtId4bV4bsaUt5jE6NUaiHMPqO5VsSw1VVhFnjFi9duD8ctlo90/6cUH+8uyKBkoq9mSJ35SuuZ7Q==} + discord.js@14.19.3: + resolution: {integrity: sha512-lncTRk0k+8Q5D3nThnODBR8fR8x2fM798o8Vsr40Krx0DjPwpZCuxxTcFMrXMQVOqM1QB9wqWgaXPg3TbmlHqA==} engines: {node: '>=18'} end-of-stream@1.4.4: @@ -339,8 +339,8 @@ packages: lodash@4.17.21: resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} - magic-bytes.js@1.10.0: - resolution: {integrity: sha512-/k20Lg2q8LE5xiaaSkMXk4sfvI+9EGEykFS4b0CHHGWqDYU0bGUFSwchNOMA56D7TCs9GwVTkqe9als1/ns8UQ==} + magic-bytes.js@1.12.1: + resolution: {integrity: sha512-ThQLOhN86ZkJ7qemtVRGYM+gRgR8GEXNli9H/PMvpnZsE44Xfh3wx9kGJaldg314v85m+bFW6WBMaVHJc/c3zA==} make-error@1.3.6: resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} @@ -451,8 +451,8 @@ packages: undici-types@6.21.0: resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==} - undici@6.19.8: - resolution: {integrity: sha512-U8uCCl2x9TK3WANvmBavymRzxbfFYG+tAu+fgx3zxQy3qdagQqBLwJVrdyO1TBfUXvfKveMKJZhpvUYoOjM+4g==} + undici@6.21.1: + resolution: {integrity: sha512-q/1rj5D0/zayJB2FraXdaWxbhWiNKDvu8naDT2dl1yTlvJp4BLtOcp2a5BvgGNQpYYJzau7tf1WgKv3b+7mqpQ==} engines: {node: '>=18.17'} util-deprecate@1.0.2: @@ -464,8 +464,8 @@ packages: wrappy@1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} - ws@8.18.0: - resolution: {integrity: sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==} + ws@8.18.2: + resolution: {integrity: sha512-DMricUmwGZUVr++AEAe2uiVM7UoO9MAVZMDu05UQOaUII0lp+zOzLLU4Xqh/JvTqklB1T4uELaaPBKyjE1r4fQ==} engines: {node: '>=10.0.0'} peerDependencies: bufferutil: ^4.0.1 @@ -489,12 +489,12 @@ snapshots: dependencies: '@jridgewell/trace-mapping': 0.3.9 - '@discordjs/builders@1.10.0': + '@discordjs/builders@1.11.2': dependencies: - '@discordjs/formatters': 0.6.0 + '@discordjs/formatters': 0.6.1 '@discordjs/util': 1.1.1 '@sapphire/shapeshift': 4.0.0 - discord-api-types: 0.37.115 + discord-api-types: 0.38.4 fast-deep-equal: 3.1.3 ts-mixer: 6.0.4 tslib: 2.8.1 @@ -503,35 +503,35 @@ snapshots: '@discordjs/collection@2.1.1': {} - '@discordjs/formatters@0.6.0': + '@discordjs/formatters@0.6.1': dependencies: - discord-api-types: 0.37.115 + discord-api-types: 0.38.4 - '@discordjs/rest@2.4.2': + '@discordjs/rest@2.5.0': dependencies: '@discordjs/collection': 2.1.1 '@discordjs/util': 1.1.1 '@sapphire/async-queue': 1.5.5 '@sapphire/snowflake': 3.5.3 '@vladfrangu/async_event_emitter': 2.4.6 - discord-api-types: 0.37.115 - magic-bytes.js: 1.10.0 + discord-api-types: 0.38.4 + magic-bytes.js: 1.12.1 tslib: 2.8.1 - undici: 6.19.8 + undici: 6.21.1 '@discordjs/util@1.1.1': {} - '@discordjs/ws@1.2.0': + '@discordjs/ws@1.2.2': dependencies: '@discordjs/collection': 2.1.1 - '@discordjs/rest': 2.4.2 + '@discordjs/rest': 2.5.0 '@discordjs/util': 1.1.1 '@sapphire/async-queue': 1.5.5 - '@types/ws': 8.5.13 + '@types/ws': 8.18.1 '@vladfrangu/async_event_emitter': 2.4.6 - discord-api-types: 0.37.115 + discord-api-types: 0.38.4 tslib: 2.8.1 - ws: 8.18.0 + ws: 8.18.2 transitivePeerDependencies: - bufferutil - utf-8-validate @@ -649,7 +649,7 @@ snapshots: dependencies: undici-types: 6.21.0 - '@types/ws@8.5.13': + '@types/ws@8.18.1': dependencies: '@types/node': 22.14.0 @@ -713,22 +713,23 @@ snapshots: diff@4.0.2: {} - discord-api-types@0.37.115: {} + discord-api-types@0.38.4: {} - discord.js@14.17.2: + discord.js@14.19.3: dependencies: - '@discordjs/builders': 1.10.0 + '@discordjs/builders': 1.11.2 '@discordjs/collection': 1.5.3 - '@discordjs/formatters': 0.6.0 - '@discordjs/rest': 2.4.2 + '@discordjs/formatters': 0.6.1 + '@discordjs/rest': 2.5.0 '@discordjs/util': 1.1.1 - '@discordjs/ws': 1.2.0 + '@discordjs/ws': 1.2.2 '@sapphire/snowflake': 3.5.3 - discord-api-types: 0.37.115 + discord-api-types: 0.38.4 fast-deep-equal: 3.1.3 lodash.snakecase: 4.1.1 + magic-bytes.js: 1.12.1 tslib: 2.8.1 - undici: 6.19.8 + undici: 6.21.1 transitivePeerDependencies: - bufferutil - utf-8-validate @@ -757,7 +758,7 @@ snapshots: lodash@4.17.21: {} - magic-bytes.js@1.10.0: {} + magic-bytes.js@1.12.1: {} make-error@1.3.6: {} @@ -906,7 +907,7 @@ snapshots: undici-types@6.21.0: {} - undici@6.19.8: {} + undici@6.21.1: {} util-deprecate@1.0.2: {} @@ -914,7 +915,7 @@ snapshots: wrappy@1.0.2: {} - ws@8.18.0: {} + ws@8.18.2: {} yn@3.1.1: {} diff --git a/src/commands/nowplaying.ts b/src/commands/nowplaying.ts index 0b406b0..b310d28 100644 --- a/src/commands/nowplaying.ts +++ b/src/commands/nowplaying.ts @@ -4,10 +4,11 @@ import { ApplicationIntegrationType, ButtonBuilder, ButtonStyle, - ChatInputCommandInteraction, + ChatInputCommandInteraction, ContainerBuilder, EmbedBuilder, - InteractionContextType, - SlashCommandBuilder + MessageFlags, + InteractionContextType, type MessageActionRowComponentBuilder, MessageFlagsBitField, + SlashCommandBuilder, TextDisplayBuilder, SectionBuilder, ThumbnailBuilder } from "discord.js"; import {getSongOnPreferredProvider, kyzaify} from "../helper.ts" @@ -51,17 +52,21 @@ export default class PingCommand extends Command { } const songlink = await fetch(`https://api.song.link/v1-alpha.1/links?url=${link}`).then(a => a.json()) const preferredApi = getSongOnPreferredProvider(songlink, link) - + if (preferredApi && usesonglink) { - const embed = new EmbedBuilder() - .setAuthor({ - name: preferredApi.artist, - }) - .setTitle(preferredApi.title) - .setThumbnail(preferredApi.thumbnailUrl) - .setFooter({ - text: "amy jr", - }); + const components = [ + new ContainerBuilder() + .addSectionComponents( + new SectionBuilder() + .setThumbnailAccessory( + new ThumbnailBuilder() + .setURL(preferredApi.thumbnailUrl) + ) + .addTextDisplayComponents( + new TextDisplayBuilder().setContent(`# ${preferredApi.artist} - ${preferredApi.title}`), + ), + ) + ]; const meow = Object.keys(songlink.linksByPlatform) let message = "" @@ -80,14 +85,14 @@ export default class PingCommand extends Command { .setStyle(ButtonStyle.Link) ); } + components[0].addActionRowComponents(nya) if (currentRow.components.length > 0) { nya.push(currentRow); } - await interaction.followUp({ - components: nya, - embeds: [embed] - }); + components: components, + flags: [MessageFlags.IsComponentsV2], + }) } else { const embedfallback = new EmbedBuilder() .setAuthor({ From 6ff915efca26e670723d031f08efe4dbfb76546e Mon Sep 17 00:00:00 2001 From: amy Date: Tue, 13 May 2025 04:13:49 +0330 Subject: [PATCH 04/10] me after S3ing my shitpost --- package.json | 1 + pnpm-lock.yaml | 1180 ++++++++++++++++++++++++++++++++++++ src/command.ts | 5 +- src/commands/fediemoji.ts | 2 +- src/commands/nowplaying.ts | 4 +- src/commands/shitpost.ts | 58 ++ src/config.ts | 4 +- src/index.ts | 13 +- 8 files changed, 1259 insertions(+), 8 deletions(-) create mode 100644 src/commands/shitpost.ts diff --git a/package.json b/package.json index 1d0031f..72e03b9 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "check": "tsc" }, "dependencies": { + "@aws-sdk/client-s3": "^3.808.0", "@types/node": "^22.14.0", "acorn": "^8.14.1", "astring": "^1.9.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6197224..c138af1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,6 +13,9 @@ importers: .: dependencies: + '@aws-sdk/client-s3': + specifier: ^3.808.0 + version: 3.808.0 '@types/node': specifier: ^22.14.0 version: 22.14.0 @@ -44,6 +47,157 @@ importers: packages: + '@aws-crypto/crc32@5.2.0': + resolution: {integrity: sha512-nLbCWqQNgUiwwtFsen1AdzAtvuLRsQS8rYgMuxCrdKf9kOssamGLuPwyTY9wyYblNr9+1XM8v6zoDTPPSIeANg==} + engines: {node: '>=16.0.0'} + + '@aws-crypto/crc32c@5.2.0': + resolution: {integrity: sha512-+iWb8qaHLYKrNvGRbiYRHSdKRWhto5XlZUEBwDjYNf+ly5SVYG6zEoYIdxvf5R3zyeP16w4PLBn3rH1xc74Rag==} + + '@aws-crypto/sha1-browser@5.2.0': + resolution: {integrity: sha512-OH6lveCFfcDjX4dbAvCFSYUjJZjDr/3XJ3xHtjn3Oj5b9RjojQo8npoLeA/bNwkOkrSQ0wgrHzXk4tDRxGKJeg==} + + '@aws-crypto/sha256-browser@5.2.0': + resolution: {integrity: sha512-AXfN/lGotSQwu6HNcEsIASo7kWXZ5HYWvfOmSNKDsEqC4OashTp8alTmaz+F7TC2L083SFv5RdB+qU3Vs1kZqw==} + + '@aws-crypto/sha256-js@5.2.0': + resolution: {integrity: sha512-FFQQyu7edu4ufvIZ+OadFpHHOt+eSTBaYaki44c+akjg7qZg9oOQeLlk77F6tSYqjDAFClrHJk9tMf0HdVyOvA==} + engines: {node: '>=16.0.0'} + + '@aws-crypto/supports-web-crypto@5.2.0': + resolution: {integrity: sha512-iAvUotm021kM33eCdNfwIN//F77/IADDSs58i+MDaOqFrVjZo9bAal0NK7HurRuWLLpF1iLX7gbWrjHjeo+YFg==} + + '@aws-crypto/util@5.2.0': + resolution: {integrity: sha512-4RkU9EsI6ZpBve5fseQlGNUWKMa1RLPQ1dnjnQoe07ldfIzcsGb5hC5W0Dm7u423KWzawlrpbjXBrXCEv9zazQ==} + + '@aws-sdk/client-s3@3.808.0': + resolution: {integrity: sha512-8RY3Jsm84twmYfiqnMkxznuY6pBX7y2GiuEJVdW1ZJLXRDOiCPkTBHsO6jUwppfMua7HRhO2OTAdWr7aSBAdPw==} + engines: {node: '>=18.0.0'} + + '@aws-sdk/client-sso@3.808.0': + resolution: {integrity: sha512-NxGomD0x9q30LPOXf4x7haOm6l2BJdLEzpiC/bPEXUkf2+4XudMQumMA/hDfErY5hCE19mFAouoO465m3Gl3JQ==} + engines: {node: '>=18.0.0'} + + '@aws-sdk/core@3.808.0': + resolution: {integrity: sha512-+nTmxJVIPtAarGq9Fd/uU2qU/Ngfb9EntT0/kwXdKKMI0wU9fQNWi10xSTVeqOtzWERbQpOJgBAdta+v3W7cng==} + engines: {node: '>=18.0.0'} + + '@aws-sdk/credential-provider-env@3.808.0': + resolution: {integrity: sha512-snPRQnwG9PV4kYHQimo1tenf7P974RcdxkHUThzWSxPEV7HpjxTFYNWGlKbOKBhL4AcgeCVeiZ/j+zveF2lEPA==} + engines: {node: '>=18.0.0'} + + '@aws-sdk/credential-provider-http@3.808.0': + resolution: {integrity: sha512-gNXjlx3BIUeX7QpVqxbjBxG6zm45lC39QvUIo92WzEJd2OTPcR8TU0OTTsgq/lpn2FrKcISj5qXvhWykd41+CA==} + engines: {node: '>=18.0.0'} + + '@aws-sdk/credential-provider-ini@3.808.0': + resolution: {integrity: sha512-Y53CW0pCvFQQEvtVFwExCCMbTg+6NOl8b3YOuZVzPmVmDoW7M1JIn9IScesqoGERXL3VoXny6nYTsZj+vfpp7Q==} + engines: {node: '>=18.0.0'} + + '@aws-sdk/credential-provider-node@3.808.0': + resolution: {integrity: sha512-lASHlXJ6U5Cpnt9Gs+mWaaSmWcEibr1AFGhp+5UNvfyd+UU2Oiwgbo7rYXygmaVDGkbfXEiTkgYtoNOBSddnWQ==} + engines: {node: '>=18.0.0'} + + '@aws-sdk/credential-provider-process@3.808.0': + resolution: {integrity: sha512-ZLqp+xsQUatoo8pMozcfLwf/pwfXeIk0w3n0Lo/rWBgT3RcdECmmPCRcnkYBqxHQyE66aS9HiJezZUwMYPqh6w==} + engines: {node: '>=18.0.0'} + + '@aws-sdk/credential-provider-sso@3.808.0': + resolution: {integrity: sha512-gWZByAokHX+aps1+syIW/hbKUBrjE2RpPRd/RGQvrBbVVgwsJzsHKsW0zy1B6mgARPG6IahmSUMjNkBCVsiAgw==} + engines: {node: '>=18.0.0'} + + '@aws-sdk/credential-provider-web-identity@3.808.0': + resolution: {integrity: sha512-SsGa1Gfa05aJM/qYOtHmfg0OKKW6Fl6kyMCcai63jWDVDYy0QSHcesnqRayJolISkdsVK6bqoWoFcPxiopcFcg==} + engines: {node: '>=18.0.0'} + + '@aws-sdk/middleware-bucket-endpoint@3.808.0': + resolution: {integrity: sha512-wEPlNcs8dir9lXbuviEGtSzYSxG/NRKQrJk5ybOc7OpPGHovsN+QhDOdY3lcjOFdwMTiMIG9foUkPz3zBpLB1A==} + engines: {node: '>=18.0.0'} + + '@aws-sdk/middleware-expect-continue@3.804.0': + resolution: {integrity: sha512-YW1hySBolALMII6C8y7Z0CRG2UX1dGJjLEBNFeefhO/xP7ZuE1dvnmfJGaEuBMnvc3wkRS63VZ3aqX6sevM1CA==} + engines: {node: '>=18.0.0'} + + '@aws-sdk/middleware-flexible-checksums@3.808.0': + resolution: {integrity: sha512-NW1yoTYDH2h8ycqMPNkvW3d1XT2vEeXfXclagL2tv82P7Qt7vPXYcObs/YtETvNZ7hdnmOftJ/IJv7YrFC8vtQ==} + engines: {node: '>=18.0.0'} + + '@aws-sdk/middleware-host-header@3.804.0': + resolution: {integrity: sha512-bum1hLVBrn2lJCi423Z2fMUYtsbkGI2s4N+2RI2WSjvbaVyMSv/WcejIrjkqiiMR+2Y7m5exgoKeg4/TODLDPQ==} + engines: {node: '>=18.0.0'} + + '@aws-sdk/middleware-location-constraint@3.804.0': + resolution: {integrity: sha512-AMtKnllIWKgoo7hiJfphLYotEwTERfjVMO2+cKAncz9w1g+bnYhHxiVhJJoR94y047c06X4PU5MsTxvdQ73Znw==} + engines: {node: '>=18.0.0'} + + '@aws-sdk/middleware-logger@3.804.0': + resolution: {integrity: sha512-w/qLwL3iq0KOPQNat0Kb7sKndl9BtceigINwBU7SpkYWX9L/Lem6f8NPEKrC9Tl4wDBht3Yztub4oRTy/horJA==} + engines: {node: '>=18.0.0'} + + '@aws-sdk/middleware-recursion-detection@3.804.0': + resolution: {integrity: sha512-zqHOrvLRdsUdN/ehYfZ9Tf8svhbiLLz5VaWUz22YndFv6m9qaAcijkpAOlKexsv3nLBMJdSdJ6GUTAeIy3BZzw==} + engines: {node: '>=18.0.0'} + + '@aws-sdk/middleware-sdk-s3@3.808.0': + resolution: {integrity: sha512-qvyJTDf0HIsPpZzBUqhNQm5g8stAn2EOwVsaAolsOHuBsdaBAE/s/NgPzazDlSXwdF0ITvsIouUVDCn4fJGJqQ==} + engines: {node: '>=18.0.0'} + + '@aws-sdk/middleware-ssec@3.804.0': + resolution: {integrity: sha512-Tk8jK0gOIUBvEPTz/wwSlP1V70zVQ3QYqsLPAjQRMO6zfOK9ax31dln3MgKvFDJxBydS2tS3wsn53v+brxDxTA==} + engines: {node: '>=18.0.0'} + + '@aws-sdk/middleware-user-agent@3.808.0': + resolution: {integrity: sha512-VckV6l5cf/rL3EtgzSHVTTD4mI0gd8UxDDWbKJsxbQ2bpNPDQG2L1wWGLaolTSzjEJ5f3ijDwQrNDbY9l85Mmg==} + engines: {node: '>=18.0.0'} + + '@aws-sdk/nested-clients@3.808.0': + resolution: {integrity: sha512-NparPojwoBul7XPCasy4psFMJbw7Ys4bz8lVB93ljEUD4VV7mM7zwK27Uhz20B8mBFGmFEoAprPsVymJcK9Vcw==} + engines: {node: '>=18.0.0'} + + '@aws-sdk/region-config-resolver@3.808.0': + resolution: {integrity: sha512-9x2QWfphkARZY5OGkl9dJxZlSlYM2l5inFeo2bKntGuwg4A4YUe5h7d5yJ6sZbam9h43eBrkOdumx03DAkQF9A==} + engines: {node: '>=18.0.0'} + + '@aws-sdk/signature-v4-multi-region@3.808.0': + resolution: {integrity: sha512-lQuEB6JK81eKV7fdiktmRq06Y1KCcJbx9fLf7b19nSfYUbJSn/kfSpHPv/tOkJK2HKnN61JsfG19YU8k4SOU8Q==} + engines: {node: '>=18.0.0'} + + '@aws-sdk/token-providers@3.808.0': + resolution: {integrity: sha512-PsfKanHmnyO7FxowXqxbLQ+QjURCdSGxyhUiSdZbfvlvme/wqaMyIoMV/i4jppndksoSdPbW2kZXjzOqhQF+ew==} + engines: {node: '>=18.0.0'} + + '@aws-sdk/types@3.804.0': + resolution: {integrity: sha512-A9qnsy9zQ8G89vrPPlNG9d1d8QcKRGqJKqwyGgS0dclJpwy6d1EWgQLIolKPl6vcFpLoe6avLOLxr+h8ur5wpg==} + engines: {node: '>=18.0.0'} + + '@aws-sdk/util-arn-parser@3.804.0': + resolution: {integrity: sha512-wmBJqn1DRXnZu3b4EkE6CWnoWMo1ZMvlfkqU5zPz67xx1GMaXlDCchFvKAXMjk4jn/L1O3tKnoFDNsoLV1kgNQ==} + engines: {node: '>=18.0.0'} + + '@aws-sdk/util-endpoints@3.808.0': + resolution: {integrity: sha512-N6Lic98uc4ADB7fLWlzx+1uVnq04VgVjngZvwHoujcRg9YDhIg9dUDiTzD5VZv13g1BrPYmvYP1HhsildpGV6w==} + engines: {node: '>=18.0.0'} + + '@aws-sdk/util-locate-window@3.804.0': + resolution: {integrity: sha512-zVoRfpmBVPodYlnMjgVjfGoEZagyRF5IPn3Uo6ZvOZp24chnW/FRstH7ESDHDDRga4z3V+ElUQHKpFDXWyBW5A==} + engines: {node: '>=18.0.0'} + + '@aws-sdk/util-user-agent-browser@3.804.0': + resolution: {integrity: sha512-KfW6T6nQHHM/vZBBdGn6fMyG/MgX5lq82TDdX4HRQRRuHKLgBWGpKXqqvBwqIaCdXwWHgDrg2VQups6GqOWW2A==} + + '@aws-sdk/util-user-agent-node@3.808.0': + resolution: {integrity: sha512-5UmB6u7RBSinXZAVP2iDgqyeVA/odO2SLEcrXaeTCw8ICXEoqF0K+GL36T4iDbzCBOAIugOZ6OcQX5vH3ck5UA==} + engines: {node: '>=18.0.0'} + peerDependencies: + aws-crt: '>=1.0.0' + peerDependenciesMeta: + aws-crt: + optional: true + + '@aws-sdk/xml-builder@3.804.0': + resolution: {integrity: sha512-JbGWp36IG9dgxtvC6+YXwt5WDZYfuamWFtVfK6fQpnmL96dx+GUPOXPKRWdw67WLKf2comHY28iX2d3z35I53Q==} + engines: {node: '>=18.0.0'} + '@cspotcode/source-map-support@0.8.1': resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} engines: {node: '>=12'} @@ -211,6 +365,218 @@ packages: resolution: {integrity: sha512-jjmJywLAFoWeBi1W7994zZyiNWPIiqRRNAmSERxyg93xRGzNYvGjlZ0gR6x0F4gPRi2+0O6S71kOZYyr3cxaIQ==} engines: {node: '>=v14.0.0', npm: '>=7.0.0'} + '@smithy/abort-controller@4.0.2': + resolution: {integrity: sha512-Sl/78VDtgqKxN2+1qduaVE140XF+Xg+TafkncspwM4jFP/LHr76ZHmIY/y3V1M0mMLNk+Je6IGbzxy23RSToMw==} + engines: {node: '>=18.0.0'} + + '@smithy/chunked-blob-reader-native@4.0.0': + resolution: {integrity: sha512-R9wM2yPmfEMsUmlMlIgSzOyICs0x9uu7UTHoccMyt7BWw8shcGM8HqB355+BZCPBcySvbTYMs62EgEQkNxz2ig==} + engines: {node: '>=18.0.0'} + + '@smithy/chunked-blob-reader@5.0.0': + resolution: {integrity: sha512-+sKqDBQqb036hh4NPaUiEkYFkTUGYzRsn3EuFhyfQfMy6oGHEUJDurLP9Ufb5dasr/XiAmPNMr6wa9afjQB+Gw==} + engines: {node: '>=18.0.0'} + + '@smithy/config-resolver@4.1.2': + resolution: {integrity: sha512-7r6mZGwb5LmLJ+zPtkLoznf2EtwEuSWdtid10pjGl/7HefCE4mueOkrfki8JCUm99W6UfP47/r3tbxx9CfBN5A==} + engines: {node: '>=18.0.0'} + + '@smithy/core@3.3.2': + resolution: {integrity: sha512-GlLv+syoWolhtjX12XplL9BXBu10cjjD8iQC69fiKTrVNOB3Fjt8CVI9ccm6G3bLbMNe1gzrLD7yyMkYo4hchw==} + engines: {node: '>=18.0.0'} + + '@smithy/credential-provider-imds@4.0.4': + resolution: {integrity: sha512-jN6M6zaGVyB8FmNGG+xOPQB4N89M1x97MMdMnm1ESjljLS3Qju/IegQizKujaNcy2vXAvrz0en8bobe6E55FEA==} + engines: {node: '>=18.0.0'} + + '@smithy/eventstream-codec@4.0.2': + resolution: {integrity: sha512-p+f2kLSK7ZrXVfskU/f5dzksKTewZk8pJLPvER3aFHPt76C2MxD9vNatSfLzzQSQB4FNO96RK4PSXfhD1TTeMQ==} + engines: {node: '>=18.0.0'} + + '@smithy/eventstream-serde-browser@4.0.2': + resolution: {integrity: sha512-CepZCDs2xgVUtH7ZZ7oDdZFH8e6Y2zOv8iiX6RhndH69nlojCALSKK+OXwZUgOtUZEUaZ5e1hULVCHYbCn7pug==} + engines: {node: '>=18.0.0'} + + '@smithy/eventstream-serde-config-resolver@4.1.0': + resolution: {integrity: sha512-1PI+WPZ5TWXrfj3CIoKyUycYynYJgZjuQo8U+sphneOtjsgrttYybdqESFReQrdWJ+LKt6NEdbYzmmfDBmjX2A==} + engines: {node: '>=18.0.0'} + + '@smithy/eventstream-serde-node@4.0.2': + resolution: {integrity: sha512-C5bJ/C6x9ENPMx2cFOirspnF9ZsBVnBMtP6BdPl/qYSuUawdGQ34Lq0dMcf42QTjUZgWGbUIZnz6+zLxJlb9aw==} + engines: {node: '>=18.0.0'} + + '@smithy/eventstream-serde-universal@4.0.2': + resolution: {integrity: sha512-St8h9JqzvnbB52FtckiHPN4U/cnXcarMniXRXTKn0r4b4XesZOGiAyUdj1aXbqqn1icSqBlzzUsCl6nPB018ng==} + engines: {node: '>=18.0.0'} + + '@smithy/fetch-http-handler@5.0.2': + resolution: {integrity: sha512-+9Dz8sakS9pe7f2cBocpJXdeVjMopUDLgZs1yWeu7h++WqSbjUYv/JAJwKwXw1HV6gq1jyWjxuyn24E2GhoEcQ==} + engines: {node: '>=18.0.0'} + + '@smithy/hash-blob-browser@4.0.2': + resolution: {integrity: sha512-3g188Z3DyhtzfBRxpZjU8R9PpOQuYsbNnyStc/ZVS+9nVX1f6XeNOa9IrAh35HwwIZg+XWk8bFVtNINVscBP+g==} + engines: {node: '>=18.0.0'} + + '@smithy/hash-node@4.0.2': + resolution: {integrity: sha512-VnTpYPnRUE7yVhWozFdlxcYknv9UN7CeOqSrMH+V877v4oqtVYuoqhIhtSjmGPvYrYnAkaM61sLMKHvxL138yg==} + engines: {node: '>=18.0.0'} + + '@smithy/hash-stream-node@4.0.2': + resolution: {integrity: sha512-POWDuTznzbIwlEXEvvXoPMS10y0WKXK790soe57tFRfvf4zBHyzE529HpZMqmDdwG9MfFflnyzndUQ8j78ZdSg==} + engines: {node: '>=18.0.0'} + + '@smithy/invalid-dependency@4.0.2': + resolution: {integrity: sha512-GatB4+2DTpgWPday+mnUkoumP54u/MDM/5u44KF9hIu8jF0uafZtQLcdfIKkIcUNuF/fBojpLEHZS/56JqPeXQ==} + engines: {node: '>=18.0.0'} + + '@smithy/is-array-buffer@2.2.0': + resolution: {integrity: sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==} + engines: {node: '>=14.0.0'} + + '@smithy/is-array-buffer@4.0.0': + resolution: {integrity: sha512-saYhF8ZZNoJDTvJBEWgeBccCg+yvp1CX+ed12yORU3NilJScfc6gfch2oVb4QgxZrGUx3/ZJlb+c/dJbyupxlw==} + engines: {node: '>=18.0.0'} + + '@smithy/md5-js@4.0.2': + resolution: {integrity: sha512-Hc0R8EiuVunUewCse2syVgA2AfSRco3LyAv07B/zCOMa+jpXI9ll+Q21Nc6FAlYPcpNcAXqBzMhNs1CD/pP2bA==} + engines: {node: '>=18.0.0'} + + '@smithy/middleware-content-length@4.0.2': + resolution: {integrity: sha512-hAfEXm1zU+ELvucxqQ7I8SszwQ4znWMbNv6PLMndN83JJN41EPuS93AIyh2N+gJ6x8QFhzSO6b7q2e6oClDI8A==} + engines: {node: '>=18.0.0'} + + '@smithy/middleware-endpoint@4.1.5': + resolution: {integrity: sha512-WlpC9KVkajQf7RaGwi3n6lhHZzYTgm2PyX/2JjcwSHG417gFloNmYqN8rzDRXjT527/ZxZuvCsqq1gWZPW8lag==} + engines: {node: '>=18.0.0'} + + '@smithy/middleware-retry@4.1.6': + resolution: {integrity: sha512-bl8q95nvCf7d22spxsBfs2giUDFf7prWLAxF5tmfgGBYHbUNW+OfnwMnabC15GMLA2AoE4HOtQR18a59lx6Blw==} + engines: {node: '>=18.0.0'} + + '@smithy/middleware-serde@4.0.4': + resolution: {integrity: sha512-CaLvBtz+Xgs7eOwoinTXhZ02/9u8b28RT8lQAaDh7Q59nygeYYp1UiJjwl6zsay+lp0qVT/S7qLVI5RgcxjyfQ==} + engines: {node: '>=18.0.0'} + + '@smithy/middleware-stack@4.0.2': + resolution: {integrity: sha512-eSPVcuJJGVYrFYu2hEq8g8WWdJav3sdrI4o2c6z/rjnYDd3xH9j9E7deZQCzFn4QvGPouLngH3dQ+QVTxv5bOQ==} + engines: {node: '>=18.0.0'} + + '@smithy/node-config-provider@4.1.1': + resolution: {integrity: sha512-1slS5jf5icHETwl5hxEVBj+mh6B+LbVW4yRINsGtUKH+nxM5Pw2H59+qf+JqYFCHp9jssG4vX81f5WKnjMN3Vw==} + engines: {node: '>=18.0.0'} + + '@smithy/node-http-handler@4.0.4': + resolution: {integrity: sha512-/mdqabuAT3o/ihBGjL94PUbTSPSRJ0eeVTdgADzow0wRJ0rN4A27EOrtlK56MYiO1fDvlO3jVTCxQtQmK9dZ1g==} + engines: {node: '>=18.0.0'} + + '@smithy/property-provider@4.0.2': + resolution: {integrity: sha512-wNRoQC1uISOuNc2s4hkOYwYllmiyrvVXWMtq+TysNRVQaHm4yoafYQyjN/goYZS+QbYlPIbb/QRjaUZMuzwQ7A==} + engines: {node: '>=18.0.0'} + + '@smithy/protocol-http@5.1.0': + resolution: {integrity: sha512-KxAOL1nUNw2JTYrtviRRjEnykIDhxc84qMBzxvu1MUfQfHTuBlCG7PA6EdVwqpJjH7glw7FqQoFxUJSyBQgu7g==} + engines: {node: '>=18.0.0'} + + '@smithy/querystring-builder@4.0.2': + resolution: {integrity: sha512-NTOs0FwHw1vimmQM4ebh+wFQvOwkEf/kQL6bSM1Lock+Bv4I89B3hGYoUEPkmvYPkDKyp5UdXJYu+PoTQ3T31Q==} + engines: {node: '>=18.0.0'} + + '@smithy/querystring-parser@4.0.2': + resolution: {integrity: sha512-v6w8wnmZcVXjfVLjxw8qF7OwESD9wnpjp0Dqry/Pod0/5vcEA3qxCr+BhbOHlxS8O+29eLpT3aagxXGwIoEk7Q==} + engines: {node: '>=18.0.0'} + + '@smithy/service-error-classification@4.0.3': + resolution: {integrity: sha512-FTbcajmltovWMjj3tksDQdD23b2w6gH+A0DYA1Yz3iSpjDj8fmkwy62UnXcWMy4d5YoMoSyLFHMfkEVEzbiN8Q==} + engines: {node: '>=18.0.0'} + + '@smithy/shared-ini-file-loader@4.0.2': + resolution: {integrity: sha512-J9/gTWBGVuFZ01oVA6vdb4DAjf1XbDhK6sLsu3OS9qmLrS6KB5ygpeHiM3miIbj1qgSJ96GYszXFWv6ErJ8QEw==} + engines: {node: '>=18.0.0'} + + '@smithy/signature-v4@5.1.0': + resolution: {integrity: sha512-4t5WX60sL3zGJF/CtZsUQTs3UrZEDO2P7pEaElrekbLqkWPYkgqNW1oeiNYC6xXifBnT9dVBOnNQRvOE9riU9w==} + engines: {node: '>=18.0.0'} + + '@smithy/smithy-client@4.2.5': + resolution: {integrity: sha512-T3gA/TShe52Ln0ywWGVoDiqRvaxqvrU0CKRRmzT71/I1rRBD8mY85rvMMME6vw5RpBLJC9ADmXSLmpohF7RRhA==} + engines: {node: '>=18.0.0'} + + '@smithy/types@4.2.0': + resolution: {integrity: sha512-7eMk09zQKCO+E/ivsjQv+fDlOupcFUCSC/L2YUPgwhvowVGWbPQHjEFcmjt7QQ4ra5lyowS92SV53Zc6XD4+fg==} + engines: {node: '>=18.0.0'} + + '@smithy/url-parser@4.0.2': + resolution: {integrity: sha512-Bm8n3j2ScqnT+kJaClSVCMeiSenK6jVAzZCNewsYWuZtnBehEz4r2qP0riZySZVfzB+03XZHJeqfmJDkeeSLiQ==} + engines: {node: '>=18.0.0'} + + '@smithy/util-base64@4.0.0': + resolution: {integrity: sha512-CvHfCmO2mchox9kjrtzoHkWHxjHZzaFojLc8quxXY7WAAMAg43nuxwv95tATVgQFNDwd4M9S1qFzj40Ul41Kmg==} + engines: {node: '>=18.0.0'} + + '@smithy/util-body-length-browser@4.0.0': + resolution: {integrity: sha512-sNi3DL0/k64/LO3A256M+m3CDdG6V7WKWHdAiBBMUN8S3hK3aMPhwnPik2A/a2ONN+9doY9UxaLfgqsIRg69QA==} + engines: {node: '>=18.0.0'} + + '@smithy/util-body-length-node@4.0.0': + resolution: {integrity: sha512-q0iDP3VsZzqJyje8xJWEJCNIu3lktUGVoSy1KB0UWym2CL1siV3artm+u1DFYTLejpsrdGyCSWBdGNjJzfDPjg==} + engines: {node: '>=18.0.0'} + + '@smithy/util-buffer-from@2.2.0': + resolution: {integrity: sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==} + engines: {node: '>=14.0.0'} + + '@smithy/util-buffer-from@4.0.0': + resolution: {integrity: sha512-9TOQ7781sZvddgO8nxueKi3+yGvkY35kotA0Y6BWRajAv8jjmigQ1sBwz0UX47pQMYXJPahSKEKYFgt+rXdcug==} + engines: {node: '>=18.0.0'} + + '@smithy/util-config-provider@4.0.0': + resolution: {integrity: sha512-L1RBVzLyfE8OXH+1hsJ8p+acNUSirQnWQ6/EgpchV88G6zGBTDPdXiiExei6Z1wR2RxYvxY/XLw6AMNCCt8H3w==} + engines: {node: '>=18.0.0'} + + '@smithy/util-defaults-mode-browser@4.0.13': + resolution: {integrity: sha512-HCLfXAyTEpVWLuyxDABg8UQukeRwChL1UErpSQ4KJK2ZoadmXuQY68pTL9KcuEtasTkIjnzyLUL9vhLdJ3VFHQ==} + engines: {node: '>=18.0.0'} + + '@smithy/util-defaults-mode-node@4.0.13': + resolution: {integrity: sha512-lu8E2RyzKzzFbNu4ICmY/2HltMZlJxMNg3saJ+r8I9vWbWbwdX7GOWUJdP4fbjEOm6aa52mnnd+uIRrT3dNEyA==} + engines: {node: '>=18.0.0'} + + '@smithy/util-endpoints@3.0.4': + resolution: {integrity: sha512-VfFATC1bmZLV2858B/O1NpMcL32wYo8DPPhHxYxDCodDl3f3mSZ5oJheW1IF91A0EeAADz2WsakM/hGGPGNKLg==} + engines: {node: '>=18.0.0'} + + '@smithy/util-hex-encoding@4.0.0': + resolution: {integrity: sha512-Yk5mLhHtfIgW2W2WQZWSg5kuMZCVbvhFmC7rV4IO2QqnZdbEFPmQnCcGMAX2z/8Qj3B9hYYNjZOhWym+RwhePw==} + engines: {node: '>=18.0.0'} + + '@smithy/util-middleware@4.0.2': + resolution: {integrity: sha512-6GDamTGLuBQVAEuQ4yDQ+ti/YINf/MEmIegrEeg7DdB/sld8BX1lqt9RRuIcABOhAGTA50bRbPzErez7SlDtDQ==} + engines: {node: '>=18.0.0'} + + '@smithy/util-retry@4.0.3': + resolution: {integrity: sha512-DPuYjZQDXmKr/sNvy9Spu8R/ESa2e22wXZzSAY6NkjOLj6spbIje/Aq8rT97iUMdDj0qHMRIe+bTxvlU74d9Ng==} + engines: {node: '>=18.0.0'} + + '@smithy/util-stream@4.2.0': + resolution: {integrity: sha512-Vj1TtwWnuWqdgQI6YTUF5hQ/0jmFiOYsc51CSMgj7QfyO+RF4EnT2HNjoviNlOOmgzgvf3f5yno+EiC4vrnaWQ==} + engines: {node: '>=18.0.0'} + + '@smithy/util-uri-escape@4.0.0': + resolution: {integrity: sha512-77yfbCbQMtgtTylO9itEAdpPXSog3ZxMe09AEhm0dU0NLTalV70ghDZFR+Nfi1C60jnJoh/Re4090/DuZh2Omg==} + engines: {node: '>=18.0.0'} + + '@smithy/util-utf8@2.3.0': + resolution: {integrity: sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==} + engines: {node: '>=14.0.0'} + + '@smithy/util-utf8@4.0.0': + resolution: {integrity: sha512-b+zebfKCfRdgNJDknHCob3O7FpeYQN6ZG6YLExMcasDHsCXlsXCEuiPZeLnJLpwa5dvPetGlnGCiMHuLwGvFow==} + engines: {node: '>=18.0.0'} + + '@smithy/util-waiter@4.0.3': + resolution: {integrity: sha512-JtaY3FxmD+te+KSI2FJuEcfNC9T/DGGVf551babM7fAaXhjJUt7oSYurH1Devxd2+BOSUACCgt3buinx4UnmEA==} + engines: {node: '>=18.0.0'} + '@tsconfig/node10@1.0.11': resolution: {integrity: sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==} @@ -255,6 +621,9 @@ packages: bl@4.1.0: resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==} + bowser@2.11.0: + resolution: {integrity: sha512-AlcaJBi/pqqJBIQ8U9Mcpc9i8Aqxn88Skv5d+xBX006BY5u8N3mGLHa5Lgppa7L/HfwgwLgZ6NYs+Ag6uUmJRA==} + buffer@5.7.1: resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} @@ -315,6 +684,10 @@ packages: fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} + fast-xml-parser@4.4.1: + resolution: {integrity: sha512-xkjOecfnKGkSsOwtZ5Pz7Us/T6mrbPQrq0nh+aCO5V9nk5NLWmasAHumTKjiPJPWANe+kAZ84Jc8ooJkzZ88Sw==} + hasBin: true + fs-constants@1.0.0: resolution: {integrity: sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==} @@ -413,6 +786,9 @@ packages: resolution: {integrity: sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==} engines: {node: '>=0.10.0'} + strnum@1.1.2: + resolution: {integrity: sha512-vrN+B7DBIoTTZjnPNewwhx6cBA/H+IS7rfW68n7XxC1y7uoiGQBxaKzqucGUgavX15dJgiGztLJ8vxuEzwqBdA==} + tar-fs@2.1.2: resolution: {integrity: sha512-EsaAXwxmx8UB7FRKqeozqEPop69DXcmYwTQwXvyAPF352HJsPdkVhvTaDPYqfNgruveJIJy3TA2l+2zj8LJIJA==} @@ -458,6 +834,10 @@ packages: util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} + uuid@9.0.1: + resolution: {integrity: sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==} + hasBin: true + v8-compile-cache-lib@3.0.1: resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} @@ -485,6 +865,464 @@ packages: snapshots: + '@aws-crypto/crc32@5.2.0': + dependencies: + '@aws-crypto/util': 5.2.0 + '@aws-sdk/types': 3.804.0 + tslib: 2.8.1 + + '@aws-crypto/crc32c@5.2.0': + dependencies: + '@aws-crypto/util': 5.2.0 + '@aws-sdk/types': 3.804.0 + tslib: 2.8.1 + + '@aws-crypto/sha1-browser@5.2.0': + dependencies: + '@aws-crypto/supports-web-crypto': 5.2.0 + '@aws-crypto/util': 5.2.0 + '@aws-sdk/types': 3.804.0 + '@aws-sdk/util-locate-window': 3.804.0 + '@smithy/util-utf8': 2.3.0 + tslib: 2.8.1 + + '@aws-crypto/sha256-browser@5.2.0': + dependencies: + '@aws-crypto/sha256-js': 5.2.0 + '@aws-crypto/supports-web-crypto': 5.2.0 + '@aws-crypto/util': 5.2.0 + '@aws-sdk/types': 3.804.0 + '@aws-sdk/util-locate-window': 3.804.0 + '@smithy/util-utf8': 2.3.0 + tslib: 2.8.1 + + '@aws-crypto/sha256-js@5.2.0': + dependencies: + '@aws-crypto/util': 5.2.0 + '@aws-sdk/types': 3.804.0 + tslib: 2.8.1 + + '@aws-crypto/supports-web-crypto@5.2.0': + dependencies: + tslib: 2.8.1 + + '@aws-crypto/util@5.2.0': + dependencies: + '@aws-sdk/types': 3.804.0 + '@smithy/util-utf8': 2.3.0 + tslib: 2.8.1 + + '@aws-sdk/client-s3@3.808.0': + dependencies: + '@aws-crypto/sha1-browser': 5.2.0 + '@aws-crypto/sha256-browser': 5.2.0 + '@aws-crypto/sha256-js': 5.2.0 + '@aws-sdk/core': 3.808.0 + '@aws-sdk/credential-provider-node': 3.808.0 + '@aws-sdk/middleware-bucket-endpoint': 3.808.0 + '@aws-sdk/middleware-expect-continue': 3.804.0 + '@aws-sdk/middleware-flexible-checksums': 3.808.0 + '@aws-sdk/middleware-host-header': 3.804.0 + '@aws-sdk/middleware-location-constraint': 3.804.0 + '@aws-sdk/middleware-logger': 3.804.0 + '@aws-sdk/middleware-recursion-detection': 3.804.0 + '@aws-sdk/middleware-sdk-s3': 3.808.0 + '@aws-sdk/middleware-ssec': 3.804.0 + '@aws-sdk/middleware-user-agent': 3.808.0 + '@aws-sdk/region-config-resolver': 3.808.0 + '@aws-sdk/signature-v4-multi-region': 3.808.0 + '@aws-sdk/types': 3.804.0 + '@aws-sdk/util-endpoints': 3.808.0 + '@aws-sdk/util-user-agent-browser': 3.804.0 + '@aws-sdk/util-user-agent-node': 3.808.0 + '@aws-sdk/xml-builder': 3.804.0 + '@smithy/config-resolver': 4.1.2 + '@smithy/core': 3.3.2 + '@smithy/eventstream-serde-browser': 4.0.2 + '@smithy/eventstream-serde-config-resolver': 4.1.0 + '@smithy/eventstream-serde-node': 4.0.2 + '@smithy/fetch-http-handler': 5.0.2 + '@smithy/hash-blob-browser': 4.0.2 + '@smithy/hash-node': 4.0.2 + '@smithy/hash-stream-node': 4.0.2 + '@smithy/invalid-dependency': 4.0.2 + '@smithy/md5-js': 4.0.2 + '@smithy/middleware-content-length': 4.0.2 + '@smithy/middleware-endpoint': 4.1.5 + '@smithy/middleware-retry': 4.1.6 + '@smithy/middleware-serde': 4.0.4 + '@smithy/middleware-stack': 4.0.2 + '@smithy/node-config-provider': 4.1.1 + '@smithy/node-http-handler': 4.0.4 + '@smithy/protocol-http': 5.1.0 + '@smithy/smithy-client': 4.2.5 + '@smithy/types': 4.2.0 + '@smithy/url-parser': 4.0.2 + '@smithy/util-base64': 4.0.0 + '@smithy/util-body-length-browser': 4.0.0 + '@smithy/util-body-length-node': 4.0.0 + '@smithy/util-defaults-mode-browser': 4.0.13 + '@smithy/util-defaults-mode-node': 4.0.13 + '@smithy/util-endpoints': 3.0.4 + '@smithy/util-middleware': 4.0.2 + '@smithy/util-retry': 4.0.3 + '@smithy/util-stream': 4.2.0 + '@smithy/util-utf8': 4.0.0 + '@smithy/util-waiter': 4.0.3 + tslib: 2.8.1 + transitivePeerDependencies: + - aws-crt + + '@aws-sdk/client-sso@3.808.0': + dependencies: + '@aws-crypto/sha256-browser': 5.2.0 + '@aws-crypto/sha256-js': 5.2.0 + '@aws-sdk/core': 3.808.0 + '@aws-sdk/middleware-host-header': 3.804.0 + '@aws-sdk/middleware-logger': 3.804.0 + '@aws-sdk/middleware-recursion-detection': 3.804.0 + '@aws-sdk/middleware-user-agent': 3.808.0 + '@aws-sdk/region-config-resolver': 3.808.0 + '@aws-sdk/types': 3.804.0 + '@aws-sdk/util-endpoints': 3.808.0 + '@aws-sdk/util-user-agent-browser': 3.804.0 + '@aws-sdk/util-user-agent-node': 3.808.0 + '@smithy/config-resolver': 4.1.2 + '@smithy/core': 3.3.2 + '@smithy/fetch-http-handler': 5.0.2 + '@smithy/hash-node': 4.0.2 + '@smithy/invalid-dependency': 4.0.2 + '@smithy/middleware-content-length': 4.0.2 + '@smithy/middleware-endpoint': 4.1.5 + '@smithy/middleware-retry': 4.1.6 + '@smithy/middleware-serde': 4.0.4 + '@smithy/middleware-stack': 4.0.2 + '@smithy/node-config-provider': 4.1.1 + '@smithy/node-http-handler': 4.0.4 + '@smithy/protocol-http': 5.1.0 + '@smithy/smithy-client': 4.2.5 + '@smithy/types': 4.2.0 + '@smithy/url-parser': 4.0.2 + '@smithy/util-base64': 4.0.0 + '@smithy/util-body-length-browser': 4.0.0 + '@smithy/util-body-length-node': 4.0.0 + '@smithy/util-defaults-mode-browser': 4.0.13 + '@smithy/util-defaults-mode-node': 4.0.13 + '@smithy/util-endpoints': 3.0.4 + '@smithy/util-middleware': 4.0.2 + '@smithy/util-retry': 4.0.3 + '@smithy/util-utf8': 4.0.0 + tslib: 2.8.1 + transitivePeerDependencies: + - aws-crt + + '@aws-sdk/core@3.808.0': + dependencies: + '@aws-sdk/types': 3.804.0 + '@smithy/core': 3.3.2 + '@smithy/node-config-provider': 4.1.1 + '@smithy/property-provider': 4.0.2 + '@smithy/protocol-http': 5.1.0 + '@smithy/signature-v4': 5.1.0 + '@smithy/smithy-client': 4.2.5 + '@smithy/types': 4.2.0 + '@smithy/util-middleware': 4.0.2 + fast-xml-parser: 4.4.1 + tslib: 2.8.1 + + '@aws-sdk/credential-provider-env@3.808.0': + dependencies: + '@aws-sdk/core': 3.808.0 + '@aws-sdk/types': 3.804.0 + '@smithy/property-provider': 4.0.2 + '@smithy/types': 4.2.0 + tslib: 2.8.1 + + '@aws-sdk/credential-provider-http@3.808.0': + dependencies: + '@aws-sdk/core': 3.808.0 + '@aws-sdk/types': 3.804.0 + '@smithy/fetch-http-handler': 5.0.2 + '@smithy/node-http-handler': 4.0.4 + '@smithy/property-provider': 4.0.2 + '@smithy/protocol-http': 5.1.0 + '@smithy/smithy-client': 4.2.5 + '@smithy/types': 4.2.0 + '@smithy/util-stream': 4.2.0 + tslib: 2.8.1 + + '@aws-sdk/credential-provider-ini@3.808.0': + dependencies: + '@aws-sdk/core': 3.808.0 + '@aws-sdk/credential-provider-env': 3.808.0 + '@aws-sdk/credential-provider-http': 3.808.0 + '@aws-sdk/credential-provider-process': 3.808.0 + '@aws-sdk/credential-provider-sso': 3.808.0 + '@aws-sdk/credential-provider-web-identity': 3.808.0 + '@aws-sdk/nested-clients': 3.808.0 + '@aws-sdk/types': 3.804.0 + '@smithy/credential-provider-imds': 4.0.4 + '@smithy/property-provider': 4.0.2 + '@smithy/shared-ini-file-loader': 4.0.2 + '@smithy/types': 4.2.0 + tslib: 2.8.1 + transitivePeerDependencies: + - aws-crt + + '@aws-sdk/credential-provider-node@3.808.0': + dependencies: + '@aws-sdk/credential-provider-env': 3.808.0 + '@aws-sdk/credential-provider-http': 3.808.0 + '@aws-sdk/credential-provider-ini': 3.808.0 + '@aws-sdk/credential-provider-process': 3.808.0 + '@aws-sdk/credential-provider-sso': 3.808.0 + '@aws-sdk/credential-provider-web-identity': 3.808.0 + '@aws-sdk/types': 3.804.0 + '@smithy/credential-provider-imds': 4.0.4 + '@smithy/property-provider': 4.0.2 + '@smithy/shared-ini-file-loader': 4.0.2 + '@smithy/types': 4.2.0 + tslib: 2.8.1 + transitivePeerDependencies: + - aws-crt + + '@aws-sdk/credential-provider-process@3.808.0': + dependencies: + '@aws-sdk/core': 3.808.0 + '@aws-sdk/types': 3.804.0 + '@smithy/property-provider': 4.0.2 + '@smithy/shared-ini-file-loader': 4.0.2 + '@smithy/types': 4.2.0 + tslib: 2.8.1 + + '@aws-sdk/credential-provider-sso@3.808.0': + dependencies: + '@aws-sdk/client-sso': 3.808.0 + '@aws-sdk/core': 3.808.0 + '@aws-sdk/token-providers': 3.808.0 + '@aws-sdk/types': 3.804.0 + '@smithy/property-provider': 4.0.2 + '@smithy/shared-ini-file-loader': 4.0.2 + '@smithy/types': 4.2.0 + tslib: 2.8.1 + transitivePeerDependencies: + - aws-crt + + '@aws-sdk/credential-provider-web-identity@3.808.0': + dependencies: + '@aws-sdk/core': 3.808.0 + '@aws-sdk/nested-clients': 3.808.0 + '@aws-sdk/types': 3.804.0 + '@smithy/property-provider': 4.0.2 + '@smithy/types': 4.2.0 + tslib: 2.8.1 + transitivePeerDependencies: + - aws-crt + + '@aws-sdk/middleware-bucket-endpoint@3.808.0': + dependencies: + '@aws-sdk/types': 3.804.0 + '@aws-sdk/util-arn-parser': 3.804.0 + '@smithy/node-config-provider': 4.1.1 + '@smithy/protocol-http': 5.1.0 + '@smithy/types': 4.2.0 + '@smithy/util-config-provider': 4.0.0 + tslib: 2.8.1 + + '@aws-sdk/middleware-expect-continue@3.804.0': + dependencies: + '@aws-sdk/types': 3.804.0 + '@smithy/protocol-http': 5.1.0 + '@smithy/types': 4.2.0 + tslib: 2.8.1 + + '@aws-sdk/middleware-flexible-checksums@3.808.0': + dependencies: + '@aws-crypto/crc32': 5.2.0 + '@aws-crypto/crc32c': 5.2.0 + '@aws-crypto/util': 5.2.0 + '@aws-sdk/core': 3.808.0 + '@aws-sdk/types': 3.804.0 + '@smithy/is-array-buffer': 4.0.0 + '@smithy/node-config-provider': 4.1.1 + '@smithy/protocol-http': 5.1.0 + '@smithy/types': 4.2.0 + '@smithy/util-middleware': 4.0.2 + '@smithy/util-stream': 4.2.0 + '@smithy/util-utf8': 4.0.0 + tslib: 2.8.1 + + '@aws-sdk/middleware-host-header@3.804.0': + dependencies: + '@aws-sdk/types': 3.804.0 + '@smithy/protocol-http': 5.1.0 + '@smithy/types': 4.2.0 + tslib: 2.8.1 + + '@aws-sdk/middleware-location-constraint@3.804.0': + dependencies: + '@aws-sdk/types': 3.804.0 + '@smithy/types': 4.2.0 + tslib: 2.8.1 + + '@aws-sdk/middleware-logger@3.804.0': + dependencies: + '@aws-sdk/types': 3.804.0 + '@smithy/types': 4.2.0 + tslib: 2.8.1 + + '@aws-sdk/middleware-recursion-detection@3.804.0': + dependencies: + '@aws-sdk/types': 3.804.0 + '@smithy/protocol-http': 5.1.0 + '@smithy/types': 4.2.0 + tslib: 2.8.1 + + '@aws-sdk/middleware-sdk-s3@3.808.0': + dependencies: + '@aws-sdk/core': 3.808.0 + '@aws-sdk/types': 3.804.0 + '@aws-sdk/util-arn-parser': 3.804.0 + '@smithy/core': 3.3.2 + '@smithy/node-config-provider': 4.1.1 + '@smithy/protocol-http': 5.1.0 + '@smithy/signature-v4': 5.1.0 + '@smithy/smithy-client': 4.2.5 + '@smithy/types': 4.2.0 + '@smithy/util-config-provider': 4.0.0 + '@smithy/util-middleware': 4.0.2 + '@smithy/util-stream': 4.2.0 + '@smithy/util-utf8': 4.0.0 + tslib: 2.8.1 + + '@aws-sdk/middleware-ssec@3.804.0': + dependencies: + '@aws-sdk/types': 3.804.0 + '@smithy/types': 4.2.0 + tslib: 2.8.1 + + '@aws-sdk/middleware-user-agent@3.808.0': + dependencies: + '@aws-sdk/core': 3.808.0 + '@aws-sdk/types': 3.804.0 + '@aws-sdk/util-endpoints': 3.808.0 + '@smithy/core': 3.3.2 + '@smithy/protocol-http': 5.1.0 + '@smithy/types': 4.2.0 + tslib: 2.8.1 + + '@aws-sdk/nested-clients@3.808.0': + dependencies: + '@aws-crypto/sha256-browser': 5.2.0 + '@aws-crypto/sha256-js': 5.2.0 + '@aws-sdk/core': 3.808.0 + '@aws-sdk/middleware-host-header': 3.804.0 + '@aws-sdk/middleware-logger': 3.804.0 + '@aws-sdk/middleware-recursion-detection': 3.804.0 + '@aws-sdk/middleware-user-agent': 3.808.0 + '@aws-sdk/region-config-resolver': 3.808.0 + '@aws-sdk/types': 3.804.0 + '@aws-sdk/util-endpoints': 3.808.0 + '@aws-sdk/util-user-agent-browser': 3.804.0 + '@aws-sdk/util-user-agent-node': 3.808.0 + '@smithy/config-resolver': 4.1.2 + '@smithy/core': 3.3.2 + '@smithy/fetch-http-handler': 5.0.2 + '@smithy/hash-node': 4.0.2 + '@smithy/invalid-dependency': 4.0.2 + '@smithy/middleware-content-length': 4.0.2 + '@smithy/middleware-endpoint': 4.1.5 + '@smithy/middleware-retry': 4.1.6 + '@smithy/middleware-serde': 4.0.4 + '@smithy/middleware-stack': 4.0.2 + '@smithy/node-config-provider': 4.1.1 + '@smithy/node-http-handler': 4.0.4 + '@smithy/protocol-http': 5.1.0 + '@smithy/smithy-client': 4.2.5 + '@smithy/types': 4.2.0 + '@smithy/url-parser': 4.0.2 + '@smithy/util-base64': 4.0.0 + '@smithy/util-body-length-browser': 4.0.0 + '@smithy/util-body-length-node': 4.0.0 + '@smithy/util-defaults-mode-browser': 4.0.13 + '@smithy/util-defaults-mode-node': 4.0.13 + '@smithy/util-endpoints': 3.0.4 + '@smithy/util-middleware': 4.0.2 + '@smithy/util-retry': 4.0.3 + '@smithy/util-utf8': 4.0.0 + tslib: 2.8.1 + transitivePeerDependencies: + - aws-crt + + '@aws-sdk/region-config-resolver@3.808.0': + dependencies: + '@aws-sdk/types': 3.804.0 + '@smithy/node-config-provider': 4.1.1 + '@smithy/types': 4.2.0 + '@smithy/util-config-provider': 4.0.0 + '@smithy/util-middleware': 4.0.2 + tslib: 2.8.1 + + '@aws-sdk/signature-v4-multi-region@3.808.0': + dependencies: + '@aws-sdk/middleware-sdk-s3': 3.808.0 + '@aws-sdk/types': 3.804.0 + '@smithy/protocol-http': 5.1.0 + '@smithy/signature-v4': 5.1.0 + '@smithy/types': 4.2.0 + tslib: 2.8.1 + + '@aws-sdk/token-providers@3.808.0': + dependencies: + '@aws-sdk/nested-clients': 3.808.0 + '@aws-sdk/types': 3.804.0 + '@smithy/property-provider': 4.0.2 + '@smithy/shared-ini-file-loader': 4.0.2 + '@smithy/types': 4.2.0 + tslib: 2.8.1 + transitivePeerDependencies: + - aws-crt + + '@aws-sdk/types@3.804.0': + dependencies: + '@smithy/types': 4.2.0 + tslib: 2.8.1 + + '@aws-sdk/util-arn-parser@3.804.0': + dependencies: + tslib: 2.8.1 + + '@aws-sdk/util-endpoints@3.808.0': + dependencies: + '@aws-sdk/types': 3.804.0 + '@smithy/types': 4.2.0 + '@smithy/util-endpoints': 3.0.4 + tslib: 2.8.1 + + '@aws-sdk/util-locate-window@3.804.0': + dependencies: + tslib: 2.8.1 + + '@aws-sdk/util-user-agent-browser@3.804.0': + dependencies: + '@aws-sdk/types': 3.804.0 + '@smithy/types': 4.2.0 + bowser: 2.11.0 + tslib: 2.8.1 + + '@aws-sdk/util-user-agent-node@3.808.0': + dependencies: + '@aws-sdk/middleware-user-agent': 3.808.0 + '@aws-sdk/types': 3.804.0 + '@smithy/node-config-provider': 4.1.1 + '@smithy/types': 4.2.0 + tslib: 2.8.1 + + '@aws-sdk/xml-builder@3.804.0': + dependencies: + '@smithy/types': 4.2.0 + tslib: 2.8.1 + '@cspotcode/source-map-support@0.8.1': dependencies: '@jridgewell/trace-mapping': 0.3.9 @@ -637,6 +1475,338 @@ snapshots: '@sapphire/snowflake@3.5.3': {} + '@smithy/abort-controller@4.0.2': + dependencies: + '@smithy/types': 4.2.0 + tslib: 2.8.1 + + '@smithy/chunked-blob-reader-native@4.0.0': + dependencies: + '@smithy/util-base64': 4.0.0 + tslib: 2.8.1 + + '@smithy/chunked-blob-reader@5.0.0': + dependencies: + tslib: 2.8.1 + + '@smithy/config-resolver@4.1.2': + dependencies: + '@smithy/node-config-provider': 4.1.1 + '@smithy/types': 4.2.0 + '@smithy/util-config-provider': 4.0.0 + '@smithy/util-middleware': 4.0.2 + tslib: 2.8.1 + + '@smithy/core@3.3.2': + dependencies: + '@smithy/middleware-serde': 4.0.4 + '@smithy/protocol-http': 5.1.0 + '@smithy/types': 4.2.0 + '@smithy/util-body-length-browser': 4.0.0 + '@smithy/util-middleware': 4.0.2 + '@smithy/util-stream': 4.2.0 + '@smithy/util-utf8': 4.0.0 + tslib: 2.8.1 + + '@smithy/credential-provider-imds@4.0.4': + dependencies: + '@smithy/node-config-provider': 4.1.1 + '@smithy/property-provider': 4.0.2 + '@smithy/types': 4.2.0 + '@smithy/url-parser': 4.0.2 + tslib: 2.8.1 + + '@smithy/eventstream-codec@4.0.2': + dependencies: + '@aws-crypto/crc32': 5.2.0 + '@smithy/types': 4.2.0 + '@smithy/util-hex-encoding': 4.0.0 + tslib: 2.8.1 + + '@smithy/eventstream-serde-browser@4.0.2': + dependencies: + '@smithy/eventstream-serde-universal': 4.0.2 + '@smithy/types': 4.2.0 + tslib: 2.8.1 + + '@smithy/eventstream-serde-config-resolver@4.1.0': + dependencies: + '@smithy/types': 4.2.0 + tslib: 2.8.1 + + '@smithy/eventstream-serde-node@4.0.2': + dependencies: + '@smithy/eventstream-serde-universal': 4.0.2 + '@smithy/types': 4.2.0 + tslib: 2.8.1 + + '@smithy/eventstream-serde-universal@4.0.2': + dependencies: + '@smithy/eventstream-codec': 4.0.2 + '@smithy/types': 4.2.0 + tslib: 2.8.1 + + '@smithy/fetch-http-handler@5.0.2': + dependencies: + '@smithy/protocol-http': 5.1.0 + '@smithy/querystring-builder': 4.0.2 + '@smithy/types': 4.2.0 + '@smithy/util-base64': 4.0.0 + tslib: 2.8.1 + + '@smithy/hash-blob-browser@4.0.2': + dependencies: + '@smithy/chunked-blob-reader': 5.0.0 + '@smithy/chunked-blob-reader-native': 4.0.0 + '@smithy/types': 4.2.0 + tslib: 2.8.1 + + '@smithy/hash-node@4.0.2': + dependencies: + '@smithy/types': 4.2.0 + '@smithy/util-buffer-from': 4.0.0 + '@smithy/util-utf8': 4.0.0 + tslib: 2.8.1 + + '@smithy/hash-stream-node@4.0.2': + dependencies: + '@smithy/types': 4.2.0 + '@smithy/util-utf8': 4.0.0 + tslib: 2.8.1 + + '@smithy/invalid-dependency@4.0.2': + dependencies: + '@smithy/types': 4.2.0 + tslib: 2.8.1 + + '@smithy/is-array-buffer@2.2.0': + dependencies: + tslib: 2.8.1 + + '@smithy/is-array-buffer@4.0.0': + dependencies: + tslib: 2.8.1 + + '@smithy/md5-js@4.0.2': + dependencies: + '@smithy/types': 4.2.0 + '@smithy/util-utf8': 4.0.0 + tslib: 2.8.1 + + '@smithy/middleware-content-length@4.0.2': + dependencies: + '@smithy/protocol-http': 5.1.0 + '@smithy/types': 4.2.0 + tslib: 2.8.1 + + '@smithy/middleware-endpoint@4.1.5': + dependencies: + '@smithy/core': 3.3.2 + '@smithy/middleware-serde': 4.0.4 + '@smithy/node-config-provider': 4.1.1 + '@smithy/shared-ini-file-loader': 4.0.2 + '@smithy/types': 4.2.0 + '@smithy/url-parser': 4.0.2 + '@smithy/util-middleware': 4.0.2 + tslib: 2.8.1 + + '@smithy/middleware-retry@4.1.6': + dependencies: + '@smithy/node-config-provider': 4.1.1 + '@smithy/protocol-http': 5.1.0 + '@smithy/service-error-classification': 4.0.3 + '@smithy/smithy-client': 4.2.5 + '@smithy/types': 4.2.0 + '@smithy/util-middleware': 4.0.2 + '@smithy/util-retry': 4.0.3 + tslib: 2.8.1 + uuid: 9.0.1 + + '@smithy/middleware-serde@4.0.4': + dependencies: + '@smithy/protocol-http': 5.1.0 + '@smithy/types': 4.2.0 + tslib: 2.8.1 + + '@smithy/middleware-stack@4.0.2': + dependencies: + '@smithy/types': 4.2.0 + tslib: 2.8.1 + + '@smithy/node-config-provider@4.1.1': + dependencies: + '@smithy/property-provider': 4.0.2 + '@smithy/shared-ini-file-loader': 4.0.2 + '@smithy/types': 4.2.0 + tslib: 2.8.1 + + '@smithy/node-http-handler@4.0.4': + dependencies: + '@smithy/abort-controller': 4.0.2 + '@smithy/protocol-http': 5.1.0 + '@smithy/querystring-builder': 4.0.2 + '@smithy/types': 4.2.0 + tslib: 2.8.1 + + '@smithy/property-provider@4.0.2': + dependencies: + '@smithy/types': 4.2.0 + tslib: 2.8.1 + + '@smithy/protocol-http@5.1.0': + dependencies: + '@smithy/types': 4.2.0 + tslib: 2.8.1 + + '@smithy/querystring-builder@4.0.2': + dependencies: + '@smithy/types': 4.2.0 + '@smithy/util-uri-escape': 4.0.0 + tslib: 2.8.1 + + '@smithy/querystring-parser@4.0.2': + dependencies: + '@smithy/types': 4.2.0 + tslib: 2.8.1 + + '@smithy/service-error-classification@4.0.3': + dependencies: + '@smithy/types': 4.2.0 + + '@smithy/shared-ini-file-loader@4.0.2': + dependencies: + '@smithy/types': 4.2.0 + tslib: 2.8.1 + + '@smithy/signature-v4@5.1.0': + dependencies: + '@smithy/is-array-buffer': 4.0.0 + '@smithy/protocol-http': 5.1.0 + '@smithy/types': 4.2.0 + '@smithy/util-hex-encoding': 4.0.0 + '@smithy/util-middleware': 4.0.2 + '@smithy/util-uri-escape': 4.0.0 + '@smithy/util-utf8': 4.0.0 + tslib: 2.8.1 + + '@smithy/smithy-client@4.2.5': + dependencies: + '@smithy/core': 3.3.2 + '@smithy/middleware-endpoint': 4.1.5 + '@smithy/middleware-stack': 4.0.2 + '@smithy/protocol-http': 5.1.0 + '@smithy/types': 4.2.0 + '@smithy/util-stream': 4.2.0 + tslib: 2.8.1 + + '@smithy/types@4.2.0': + dependencies: + tslib: 2.8.1 + + '@smithy/url-parser@4.0.2': + dependencies: + '@smithy/querystring-parser': 4.0.2 + '@smithy/types': 4.2.0 + tslib: 2.8.1 + + '@smithy/util-base64@4.0.0': + dependencies: + '@smithy/util-buffer-from': 4.0.0 + '@smithy/util-utf8': 4.0.0 + tslib: 2.8.1 + + '@smithy/util-body-length-browser@4.0.0': + dependencies: + tslib: 2.8.1 + + '@smithy/util-body-length-node@4.0.0': + dependencies: + tslib: 2.8.1 + + '@smithy/util-buffer-from@2.2.0': + dependencies: + '@smithy/is-array-buffer': 2.2.0 + tslib: 2.8.1 + + '@smithy/util-buffer-from@4.0.0': + dependencies: + '@smithy/is-array-buffer': 4.0.0 + tslib: 2.8.1 + + '@smithy/util-config-provider@4.0.0': + dependencies: + tslib: 2.8.1 + + '@smithy/util-defaults-mode-browser@4.0.13': + dependencies: + '@smithy/property-provider': 4.0.2 + '@smithy/smithy-client': 4.2.5 + '@smithy/types': 4.2.0 + bowser: 2.11.0 + tslib: 2.8.1 + + '@smithy/util-defaults-mode-node@4.0.13': + dependencies: + '@smithy/config-resolver': 4.1.2 + '@smithy/credential-provider-imds': 4.0.4 + '@smithy/node-config-provider': 4.1.1 + '@smithy/property-provider': 4.0.2 + '@smithy/smithy-client': 4.2.5 + '@smithy/types': 4.2.0 + tslib: 2.8.1 + + '@smithy/util-endpoints@3.0.4': + dependencies: + '@smithy/node-config-provider': 4.1.1 + '@smithy/types': 4.2.0 + tslib: 2.8.1 + + '@smithy/util-hex-encoding@4.0.0': + dependencies: + tslib: 2.8.1 + + '@smithy/util-middleware@4.0.2': + dependencies: + '@smithy/types': 4.2.0 + tslib: 2.8.1 + + '@smithy/util-retry@4.0.3': + dependencies: + '@smithy/service-error-classification': 4.0.3 + '@smithy/types': 4.2.0 + tslib: 2.8.1 + + '@smithy/util-stream@4.2.0': + dependencies: + '@smithy/fetch-http-handler': 5.0.2 + '@smithy/node-http-handler': 4.0.4 + '@smithy/types': 4.2.0 + '@smithy/util-base64': 4.0.0 + '@smithy/util-buffer-from': 4.0.0 + '@smithy/util-hex-encoding': 4.0.0 + '@smithy/util-utf8': 4.0.0 + tslib: 2.8.1 + + '@smithy/util-uri-escape@4.0.0': + dependencies: + tslib: 2.8.1 + + '@smithy/util-utf8@2.3.0': + dependencies: + '@smithy/util-buffer-from': 2.2.0 + tslib: 2.8.1 + + '@smithy/util-utf8@4.0.0': + dependencies: + '@smithy/util-buffer-from': 4.0.0 + tslib: 2.8.1 + + '@smithy/util-waiter@4.0.3': + dependencies: + '@smithy/abort-controller': 4.0.2 + '@smithy/types': 4.2.0 + tslib: 2.8.1 + '@tsconfig/node10@1.0.11': {} '@tsconfig/node12@1.0.11': {} @@ -673,6 +1843,8 @@ snapshots: inherits: 2.0.4 readable-stream: 3.6.2 + bowser@2.11.0: {} + buffer@5.7.1: dependencies: base64-js: 1.5.1 @@ -742,6 +1914,10 @@ snapshots: fast-deep-equal@3.1.3: {} + fast-xml-parser@4.4.1: + dependencies: + strnum: 1.1.2 + fs-constants@1.0.0: {} github-from-package@0.0.0: {} @@ -862,6 +2038,8 @@ snapshots: strip-json-comments@2.0.1: {} + strnum@1.1.2: {} + tar-fs@2.1.2: dependencies: chownr: 1.1.4 @@ -911,6 +2089,8 @@ snapshots: util-deprecate@1.0.2: {} + uuid@9.0.1: {} + v8-compile-cache-lib@3.0.1: {} wrappy@1.0.2: {} diff --git a/src/command.ts b/src/command.ts index 8fc233b..99d4e8a 100644 --- a/src/command.ts +++ b/src/command.ts @@ -1,5 +1,6 @@ import { ApplicationCommandType, type AutocompleteFocusedOption, AutocompleteInteraction, ChatInputCommandInteraction, ContextMenuCommandBuilder, ContextMenuCommandInteraction, Message, SharedSlashCommand, User } from "discord.js"; import { type Config } from "./config.ts"; +import type {S3Client} from "@aws-sdk/client-s3"; export abstract class ICommand { } @@ -13,8 +14,8 @@ export abstract class ContextCommand extends ICommand } export abstract class Command extends ICommand { - abstract run(interaction: ChatInputCommandInteraction, config: Config): Promise; - autoComplete(interaction: AutocompleteInteraction, config: Config, option: AutocompleteFocusedOption): Promise { + abstract run(interaction: ChatInputCommandInteraction, config: Config, s3: S3Client): Promise; + autoComplete(interaction: AutocompleteInteraction, config: Config, option: AutocompleteFocusedOption, s3: S3Client): Promise { throw new Error("Autocompletion called on command that does not have #autoComplete implemented."); } abstract slashCommand: SharedSlashCommand diff --git a/src/commands/fediemoji.ts b/src/commands/fediemoji.ts index 94d65a6..d40887c 100644 --- a/src/commands/fediemoji.ts +++ b/src/commands/fediemoji.ts @@ -14,7 +14,7 @@ export default class FediemojiCommand extends Command { return typedEmojis } - async run(interaction: ChatInputCommandInteraction, config: Config) { + async run(interaction: ChatInputCommandInteraction, config: Config, ) { await interaction.deferReply(); const emojiname = interaction.options.getString("emoji"); const shit = await interaction.client.application.emojis.fetch(); diff --git a/src/commands/nowplaying.ts b/src/commands/nowplaying.ts index b310d28..9fe0b92 100644 --- a/src/commands/nowplaying.ts +++ b/src/commands/nowplaying.ts @@ -13,6 +13,7 @@ import { import {getSongOnPreferredProvider, kyzaify} from "../helper.ts" import {type Config} from "../config.ts"; +import type {S3Client} from "@aws-sdk/client-s3"; function keepV(url: string): string { const urlObj = new URL(url); @@ -28,12 +29,11 @@ function keepV(url: string): string { } export default class PingCommand extends Command { - async run(interaction: ChatInputCommandInteraction, config: Config) { + async run(interaction: ChatInputCommandInteraction, config: Config, s3: S3Client): Promise { await interaction.deferReply() const user = interaction.options.getString("user") ?? config.listenbrainzAccount; const usesonglink = interaction.options.getBoolean("usesonglink") ?? true const useitunes = interaction.options.getBoolean("useitunes") ?? true - const meow = await fetch(`https://api.listenbrainz.org/1/user/${user}/playing-now`).then((res) => res.json()); if (!meow) { await interaction.followUp("something shat itself!"); diff --git a/src/commands/shitpost.ts b/src/commands/shitpost.ts new file mode 100644 index 0000000..cc477fb --- /dev/null +++ b/src/commands/shitpost.ts @@ -0,0 +1,58 @@ +import {Command} from "../command.ts"; +import { + ApplicationIntegrationType, AttachmentBuilder, type AutocompleteFocusedOption, AutocompleteInteraction, + ChatInputCommandInteraction, + InteractionContextType, + SlashCommandBuilder +} from "discord.js"; +import { config, type Config } from "../config.ts"; +import {ListObjectsV2Command, type S3Client} from "@aws-sdk/client-s3"; +import {inspect} from "node:util"; + +export default class ShitPostCommand extends Command { + + + async run(interaction: ChatInputCommandInteraction, config: Config, s3: S3Client) { + const shitpost = interaction.options.getString("shitpost")!; + + const shitpostUrl = "https://sp.amy.rip/" + encodeURIComponent(shitpost); + + try { + const response = await fetch(shitpostUrl); + + if (!response.ok) { + await interaction.reply({ content: "S3 bucket shat itself??????" }); + return; + } + + const buffer = await response.arrayBuffer(); + const attachment = new AttachmentBuilder(Buffer.from(buffer), { name: shitpost }); + + await interaction.reply({ files: [attachment] }); + + } catch (error) { + await interaction.reply({ content: "fileproccessing shat itself" }); + } + } + + async autoComplete(interaction: AutocompleteInteraction, config: Config, option: AutocompleteFocusedOption, s3: S3Client): Promise { + + await interaction.respond((await s3.send(new ListObjectsV2Command({ Bucket: "shitposts" }))).Contents! + .filter((i): i is { Key: string } => !!i.Key) + .map(key => ({ name: key.Key, value: key.Key }))) + + } + slashCommand = new SlashCommandBuilder() + .setName("shitpost") + .setDescription("shitpost with S3!!!!!").setIntegrationTypes([ + ApplicationIntegrationType.UserInstall + ]).addStringOption(option => { + return option.setName("shitpost").setRequired(true).setDescription("the shitposts name") + .setAutocomplete(true) + }) + .setContexts([ + InteractionContextType.BotDM, + InteractionContextType.Guild, + InteractionContextType.PrivateChannel + ]); +} diff --git a/src/config.ts b/src/config.ts index a9830e1..5d28678 100644 --- a/src/config.ts +++ b/src/config.ts @@ -5,7 +5,9 @@ const configT = z.object({ listenbrainzAccount: z.string(), gitapi: z.string(), sharkeyInstance:z.string(), - // applicationid: z.string(), + R2AccountID: z.string(), + R2AccessKeyId: z.string(), + R2SecretAccessKey: z.string(), }); export type Config = z.infer; export const config: Config = configT.parse(rawconfig); diff --git a/src/index.ts b/src/index.ts index 1737481..5a1fc73 100644 --- a/src/index.ts +++ b/src/index.ts @@ -10,6 +10,7 @@ import fs from "node:fs"; import { Command, ContextCommand, ICommand } from "./command.ts"; import { fileURLToPath } from "url"; import { config } from "./config.ts"; +import {ListObjectsV2Command, S3Client} from "@aws-sdk/client-s3"; const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); @@ -20,6 +21,14 @@ const client = new Client({ const allCommands: ICommand[] = [] +const S3 = new S3Client({ + region: "auto", + endpoint: `https://${config.R2AccountID}.r2.cloudflarestorage.com`, + credentials: { + accessKeyId: config.R2AccessKeyId, + secretAccessKey: config.R2SecretAccessKey, + }, +}); const commandDir = path.join(__dirname, "commands"); for (const file of fs.readdirSync(commandDir)) { if (!file.endsWith('.ts')) continue @@ -89,7 +98,7 @@ client.on(Events.InteractionCreate, async (interaction) => { } try { - await command.run(interaction, config); + await command.run(interaction, config, S3); } catch (e) { console.error("error during command execution: " + commandName, e) interaction.reply("something sharted itself") @@ -108,7 +117,7 @@ client.on(Events.InteractionCreate, async (interaction) => { } try { - await command.autoComplete(interaction, config, interaction.options.getFocused(true)); + await command.autoComplete(interaction, config, interaction.options.getFocused(true), S3); } catch (e) { console.error("error during command execution: " + commandName, e) } From 7d035b1479800d51da741786241332efccec6d4d Mon Sep 17 00:00:00 2001 From: amy Date: Wed, 14 May 2025 20:23:33 +0330 Subject: [PATCH 05/10] loss --- src/commands/loss.ts | 58 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 src/commands/loss.ts diff --git a/src/commands/loss.ts b/src/commands/loss.ts new file mode 100644 index 0000000..43eebac --- /dev/null +++ b/src/commands/loss.ts @@ -0,0 +1,58 @@ +import {Command} from "../command.ts"; +import { + ActionRowBuilder, + ApplicationIntegrationType, ButtonBuilder, ButtonStyle, + ChatInputCommandInteraction, ContainerBuilder, + InteractionContextType, type MessageActionRowComponentBuilder, MessageFlags, + SlashCommandBuilder +} from "discord.js"; +import { type Config } from "../config.ts"; + +export default class LossCommand extends Command { + async run(interaction: ChatInputCommandInteraction, config: Config) { + const components = [ + new ContainerBuilder() + .addActionRowComponents( + new ActionRowBuilder() + .addComponents( + new ButtonBuilder() + .setStyle(ButtonStyle.Secondary) + .setLabel("|") + .setCustomId("a"), + new ButtonBuilder() + .setStyle(ButtonStyle.Secondary) + .setLabel("|i") + .setCustomId("b"), + ), + ) + .addActionRowComponents( + new ActionRowBuilder() + .addComponents( + new ButtonBuilder() + .setStyle(ButtonStyle.Secondary) + .setLabel("||") + .setCustomId("c"), + new ButtonBuilder() + .setStyle(ButtonStyle.Secondary) + .setLabel("|_") + .setCustomId("d"), + ), + ), + ]; + await interaction.reply({ + components: components, + flags: [MessageFlags.IsComponentsV2], + }); + } + + slashCommand = new SlashCommandBuilder() + .setName("loss") + .setDescription("why").setIntegrationTypes([ + ApplicationIntegrationType.UserInstall + ]) + .setContexts([ + InteractionContextType.BotDM, + InteractionContextType.Guild, + InteractionContextType.PrivateChannel + ]); +} From 4eb781732ba0f20c12dff1cd1ac4f2fe993f15b5 Mon Sep 17 00:00:00 2001 From: amy Date: Wed, 14 May 2025 21:19:29 +0330 Subject: [PATCH 06/10] ADD TO SHITPOSTS --- src/command.ts | 2 +- src/commands/addtoshitpost.ts | 41 +++++++++++++++++++++++++++++++++++ src/commands/shitpost.ts | 21 ++++++++++-------- src/config.ts | 6 +++-- src/index.ts | 9 ++++---- 5 files changed, 63 insertions(+), 16 deletions(-) create mode 100644 src/commands/addtoshitpost.ts diff --git a/src/command.ts b/src/command.ts index 99d4e8a..c114239 100644 --- a/src/command.ts +++ b/src/command.ts @@ -10,7 +10,7 @@ export abstract class ContextCommand extends ICommand T extends Message ? ApplicationCommandType.Message : never; abstract contextDefinition: ContextMenuCommandBuilder - abstract run(interaction: ContextMenuCommandInteraction, target: T extends User ? User : T extends Message ? Message : never): Promise + abstract run(interaction: ContextMenuCommandInteraction, target: T extends User ? User : T extends Message ? Message : never, config: Config): Promise } export abstract class Command extends ICommand { diff --git a/src/commands/addtoshitpost.ts b/src/commands/addtoshitpost.ts new file mode 100644 index 0000000..2e4a1bc --- /dev/null +++ b/src/commands/addtoshitpost.ts @@ -0,0 +1,41 @@ +import { + ApplicationCommandType, type Attachment, + ContextMenuCommandBuilder, + ContextMenuCommandInteraction, + Message +} from "discord.js"; +import { ContextCommand } from "../command.ts"; +import {PutObjectCommand, type S3Client} from "@aws-sdk/client-s3"; +import type {Config} from "../config.ts"; +import {BUCKETNAME} from "./shitpost.ts"; + +export default class Mock extends ContextCommand { + targetType: ApplicationCommandType.Message = ApplicationCommandType.Message; + contextDefinition: ContextMenuCommandBuilder = + new ContextMenuCommandBuilder() + .setName('AddToShitposts') + .setType(ApplicationCommandType.Message) + async run(interaction: ContextMenuCommandInteraction, target: Message, config:Config): Promise { + await interaction.deferReply() + await interaction.followUp({content: "uploading..."}) + for (const [_, attachment] of target.attachments) { + + const response = await fetch(attachment.proxyURL); + + if (!response.ok) { + await interaction.reply({ content: "discord shat itself??????" }); + return; + } + + const buffer = await response.arrayBuffer(); + + const command = new PutObjectCommand({ + Bucket: BUCKETNAME, + Key: attachment.name, + Body: Buffer.from(buffer), + }); + await config.s3.send(command) + } + await interaction.editReply({content: "shits have been posted"}) + } +} \ No newline at end of file diff --git a/src/commands/shitpost.ts b/src/commands/shitpost.ts index cc477fb..b9829c6 100644 --- a/src/commands/shitpost.ts +++ b/src/commands/shitpost.ts @@ -5,15 +5,17 @@ import { InteractionContextType, SlashCommandBuilder } from "discord.js"; -import { config, type Config } from "../config.ts"; +import {config, type Config} from "../config.ts"; import {ListObjectsV2Command, type S3Client} from "@aws-sdk/client-s3"; import {inspect} from "node:util"; +export const BUCKETNAME = "shitposts" as const; export default class ShitPostCommand extends Command { async run(interaction: ChatInputCommandInteraction, config: Config, s3: S3Client) { - const shitpost = interaction.options.getString("shitpost")!; + await interaction.deferReply(); + const shitpost = interaction.options.getString("shitpost")!; const shitpostUrl = "https://sp.amy.rip/" + encodeURIComponent(shitpost); @@ -21,27 +23,28 @@ export default class ShitPostCommand extends Command { const response = await fetch(shitpostUrl); if (!response.ok) { - await interaction.reply({ content: "S3 bucket shat itself??????" }); + await interaction.followUp({content: "S3 bucket shat itself??????"}); return; } const buffer = await response.arrayBuffer(); - const attachment = new AttachmentBuilder(Buffer.from(buffer), { name: shitpost }); + const attachment = new AttachmentBuilder(Buffer.from(buffer), {name: shitpost}); - await interaction.reply({ files: [attachment] }); + await interaction.followUp({files: [attachment]}); } catch (error) { - await interaction.reply({ content: "fileproccessing shat itself" }); + await interaction.followUp({content: "fileproccessing shat itself"}); } } async autoComplete(interaction: AutocompleteInteraction, config: Config, option: AutocompleteFocusedOption, s3: S3Client): Promise { - await interaction.respond((await s3.send(new ListObjectsV2Command({ Bucket: "shitposts" }))).Contents! - .filter((i): i is { Key: string } => !!i.Key) - .map(key => ({ name: key.Key, value: key.Key }))) + await interaction.respond((await s3.send(new ListObjectsV2Command({Bucket: BUCKETNAME}))).Contents! + .filter((i): i is { Key: string } => !!i.Key) + .map(key => ({name: key.Key, value: key.Key}))) } + slashCommand = new SlashCommandBuilder() .setName("shitpost") .setDescription("shitpost with S3!!!!!").setIntegrationTypes([ diff --git a/src/config.ts b/src/config.ts index 5d28678..85b8b8e 100644 --- a/src/config.ts +++ b/src/config.ts @@ -1,5 +1,6 @@ import rawconfig from "../config.json" with {type: "json"}; import {z} from 'zod'; +import type {S3Client} from "@aws-sdk/client-s3"; const configT = z.object({ token: z.string(), listenbrainzAccount: z.string(), @@ -9,7 +10,8 @@ const configT = z.object({ R2AccessKeyId: z.string(), R2SecretAccessKey: z.string(), }); -export type Config = z.infer; -export const config: Config = configT.parse(rawconfig); +export type RawConfig = z.infer; +export type Config = RawConfig & {s3: S3Client} +export const config: RawConfig = configT.parse(rawconfig); diff --git a/src/index.ts b/src/index.ts index 5a1fc73..5729db4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -9,7 +9,7 @@ import path from "node:path"; import fs from "node:fs"; import { Command, ContextCommand, ICommand } from "./command.ts"; import { fileURLToPath } from "url"; -import { config } from "./config.ts"; +import {type Config, config} from "./config.ts"; import {ListObjectsV2Command, S3Client} from "@aws-sdk/client-s3"; const __filename = fileURLToPath(import.meta.url); @@ -29,6 +29,7 @@ const S3 = new S3Client({ secretAccessKey: config.R2SecretAccessKey, }, }); +const enrichedConfig = {...config, s3:S3} satisfies Config; const commandDir = path.join(__dirname, "commands"); for (const file of fs.readdirSync(commandDir)) { if (!file.endsWith('.ts')) continue @@ -80,7 +81,7 @@ client.on(Events.InteractionCreate, async (interaction) => { if (command.targetType != (interaction.isUserContextMenuCommand() ? ApplicationCommandType.User : ApplicationCommandType.Message)) console.error("Out of date discord definition of this context command") try { - await command.run(interaction, interaction.isUserContextMenuCommand() ? interaction.targetUser : interaction.targetMessage) + await command.run(interaction, interaction.isUserContextMenuCommand() ? interaction.targetUser : interaction.targetMessage, enrichedConfig) } catch (e) { console.error("error during context command execution: " + commandName, e) interaction.reply("something sharted itself") @@ -98,7 +99,7 @@ client.on(Events.InteractionCreate, async (interaction) => { } try { - await command.run(interaction, config, S3); + await command.run(interaction, enrichedConfig, S3); } catch (e) { console.error("error during command execution: " + commandName, e) interaction.reply("something sharted itself") @@ -117,7 +118,7 @@ client.on(Events.InteractionCreate, async (interaction) => { } try { - await command.autoComplete(interaction, config, interaction.options.getFocused(true), S3); + await command.autoComplete(interaction, enrichedConfig, interaction.options.getFocused(true), S3); } catch (e) { console.error("error during command execution: " + commandName, e) } From ef03b23fa9060c1ede40c7e0d0d8b3ee1479d792 Mon Sep 17 00:00:00 2001 From: amy Date: Thu, 22 May 2025 02:52:03 +0330 Subject: [PATCH 07/10] friendship ended with S3, now posix file system is my best friend --- .gitignore | 2 +- src/command.ts | 4 +- src/commands/addtoshitpost.ts | 45 ++++++++++++++------ src/commands/nowplaying.ts | 2 +- src/commands/shitpost.ts | 78 +++++++++++++++++++++++++---------- src/config.ts | 5 +-- src/index.ts | 16 ++----- 7 files changed, 99 insertions(+), 53 deletions(-) diff --git a/.gitignore b/.gitignore index 1e0aeee..56e862c 100644 --- a/.gitignore +++ b/.gitignore @@ -10,5 +10,5 @@ yarn-error.log* /.pnp src/**/*.js .pnp.js - +/shitposts .vscode/* \ No newline at end of file diff --git a/src/command.ts b/src/command.ts index c114239..1ae4e61 100644 --- a/src/command.ts +++ b/src/command.ts @@ -14,8 +14,8 @@ export abstract class ContextCommand extends ICommand } export abstract class Command extends ICommand { - abstract run(interaction: ChatInputCommandInteraction, config: Config, s3: S3Client): Promise; - autoComplete(interaction: AutocompleteInteraction, config: Config, option: AutocompleteFocusedOption, s3: S3Client): Promise { + abstract run(interaction: ChatInputCommandInteraction, config: Config): Promise; + autoComplete(interaction: AutocompleteInteraction, config: Config, option: AutocompleteFocusedOption): Promise { throw new Error("Autocompletion called on command that does not have #autoComplete implemented."); } abstract slashCommand: SharedSlashCommand diff --git a/src/commands/addtoshitpost.ts b/src/commands/addtoshitpost.ts index 2e4a1bc..3584b51 100644 --- a/src/commands/addtoshitpost.ts +++ b/src/commands/addtoshitpost.ts @@ -5,9 +5,14 @@ import { Message } from "discord.js"; import { ContextCommand } from "../command.ts"; -import {PutObjectCommand, type S3Client} from "@aws-sdk/client-s3"; import type {Config} from "../config.ts"; import {BUCKETNAME} from "./shitpost.ts"; +import fs from "node:fs/promises"; +import path from "node:path"; +import {fileURLToPath} from "url"; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); export default class Mock extends ContextCommand { targetType: ApplicationCommandType.Message = ApplicationCommandType.Message; @@ -16,26 +21,40 @@ export default class Mock extends ContextCommand { .setName('AddToShitposts') .setType(ApplicationCommandType.Message) async run(interaction: ContextMenuCommandInteraction, target: Message, config:Config): Promise { - await interaction.deferReply() - await interaction.followUp({content: "uploading..."}) - for (const [_, attachment] of target.attachments) { + await interaction.deferReply(); + await interaction.followUp({content: "uploading..."}); - const response = await fetch(attachment.proxyURL); + const downloadFolderPath = path.join(__dirname, '..', '..', 'shitposts'); + + try { + await fs.mkdir(downloadFolderPath, { recursive: true }); + } catch (error) { + console.error("Error creating download folder:", error); + await interaction.editReply({ content: "the fucking posix file system failed me (download foler couldnt be made)" }); + return; + } + + for (const [_, attachment] of target.attachments) { + const response = await fetch(attachment.url); if (!response.ok) { - await interaction.reply({ content: "discord shat itself??????" }); + await interaction.editReply({ content: "discord shat itself while fetching an attachment!?" }); return; } const buffer = await response.arrayBuffer(); + const fileName = attachment.name || `attachment_${attachment.id}`; + const filePath = path.join(downloadFolderPath, fileName); - const command = new PutObjectCommand({ - Bucket: BUCKETNAME, - Key: attachment.name, - Body: Buffer.from(buffer), - }); - await config.s3.send(command) + try { + await fs.writeFile(filePath, Buffer.from(buffer)); + console.log(`Downloaded: ${fileName}`); + } catch (error) { + console.error(`Error downloading ${fileName}:`, error); + await interaction.editReply({ content: `Failed to download ${fileName}.` }); + return; + } } - await interaction.editReply({content: "shits have been posted"}) + await interaction.editReply({content: "shits have been posted!"}); } } \ No newline at end of file diff --git a/src/commands/nowplaying.ts b/src/commands/nowplaying.ts index 9fe0b92..d226799 100644 --- a/src/commands/nowplaying.ts +++ b/src/commands/nowplaying.ts @@ -29,7 +29,7 @@ function keepV(url: string): string { } export default class PingCommand extends Command { - async run(interaction: ChatInputCommandInteraction, config: Config, s3: S3Client): Promise { + async run(interaction: ChatInputCommandInteraction, config: Config): Promise { await interaction.deferReply() const user = interaction.options.getString("user") ?? config.listenbrainzAccount; const usesonglink = interaction.options.getBoolean("usesonglink") ?? true diff --git a/src/commands/shitpost.ts b/src/commands/shitpost.ts index b9829c6..ad785b6 100644 --- a/src/commands/shitpost.ts +++ b/src/commands/shitpost.ts @@ -6,48 +6,84 @@ import { SlashCommandBuilder } from "discord.js"; import {config, type Config} from "../config.ts"; -import {ListObjectsV2Command, type S3Client} from "@aws-sdk/client-s3"; import {inspect} from "node:util"; +import fs from "node:fs/promises"; +import path from "node:path"; +import {fileURLToPath} from "url"; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); export const BUCKETNAME = "shitposts" as const; +export const DOWNLOAD_FOLDER_PATH = path.join(__dirname, '..', '..', 'shitposts'); +async function getFilesInFolder(folderPath: string): Promise<{ name: string, value: string }[]> { + try { + const files = await fs.readdir(folderPath); + const fileList: { name: string, value: string }[] = []; + + for (const file of files) { + const filePath = path.join(folderPath, file); + const stats = await fs.stat(filePath); + + if (stats.isFile()) { + fileList.push({ + name: file, + value: file + }); + } + } + return fileList; + } catch (error) { + console.error(`Error reading directory ${folderPath}:`, error); + return []; + } +} export default class ShitPostCommand extends Command { - async run(interaction: ChatInputCommandInteraction, config: Config, s3: S3Client) { + async run(interaction: ChatInputCommandInteraction, config: Config) { await interaction.deferReply(); - const shitpost = interaction.options.getString("shitpost")!; + const fileName = interaction.options.getString('shitpost', true); - const shitpostUrl = "https://sp.amy.rip/" + encodeURIComponent(shitpost); + const filePath = path.join(DOWNLOAD_FOLDER_PATH, fileName); try { - const response = await fetch(shitpostUrl); + await fs.access(filePath); + const attachment = new AttachmentBuilder(filePath, { name: fileName }); + await interaction.editReply({ + files: [attachment] + }); - if (!response.ok) { - await interaction.followUp({content: "S3 bucket shat itself??????"}); - return; + } catch (error: any) { + if (error.code === 'ENOENT') { + console.error(`file not found ${filePath}`, error); + await interaction.editReply({ + content: `\`${fileName}\`. wasnt found, aka something shat itself`, + }); + } else { + console.error(`Error sending file ${fileName}:`, error); + await interaction.editReply({ + content: `buh, shitpost (\`${fileName}\`) wasnt posted.`, + }); } - - const buffer = await response.arrayBuffer(); - const attachment = new AttachmentBuilder(Buffer.from(buffer), {name: shitpost}); - - await interaction.followUp({files: [attachment]}); - - } catch (error) { - await interaction.followUp({content: "fileproccessing shat itself"}); } } - async autoComplete(interaction: AutocompleteInteraction, config: Config, option: AutocompleteFocusedOption, s3: S3Client): Promise { - await interaction.respond((await s3.send(new ListObjectsV2Command({Bucket: BUCKETNAME}))).Contents! - .filter((i): i is { Key: string } => !!i.Key) - .map(key => ({name: key.Key, value: key.Key}))) + async autoComplete(interaction: AutocompleteInteraction, config: Config, option: AutocompleteFocusedOption): Promise { + const files = await getFilesInFolder(DOWNLOAD_FOLDER_PATH); + const focusedValue = option.value.toLowerCase(); + const filteredFiles = files.filter(choice => choice.name.toLowerCase().includes(focusedValue)); + + await interaction.respond( + filteredFiles.slice(0, 25) + ); } slashCommand = new SlashCommandBuilder() .setName("shitpost") - .setDescription("shitpost with S3!!!!!").setIntegrationTypes([ + .setDescription("shitpost with the posix file system!!!!!!").setIntegrationTypes([ ApplicationIntegrationType.UserInstall ]).addStringOption(option => { return option.setName("shitpost").setRequired(true).setDescription("the shitposts name") diff --git a/src/config.ts b/src/config.ts index 85b8b8e..2745b51 100644 --- a/src/config.ts +++ b/src/config.ts @@ -10,8 +10,7 @@ const configT = z.object({ R2AccessKeyId: z.string(), R2SecretAccessKey: z.string(), }); -export type RawConfig = z.infer; -export type Config = RawConfig & {s3: S3Client} -export const config: RawConfig = configT.parse(rawconfig); +export type Config = z.infer; +export const config: Config = configT.parse(rawconfig); diff --git a/src/index.ts b/src/index.ts index 5729db4..2539594 100644 --- a/src/index.ts +++ b/src/index.ts @@ -21,15 +21,7 @@ const client = new Client({ const allCommands: ICommand[] = [] -const S3 = new S3Client({ - region: "auto", - endpoint: `https://${config.R2AccountID}.r2.cloudflarestorage.com`, - credentials: { - accessKeyId: config.R2AccessKeyId, - secretAccessKey: config.R2SecretAccessKey, - }, -}); -const enrichedConfig = {...config, s3:S3} satisfies Config; + const commandDir = path.join(__dirname, "commands"); for (const file of fs.readdirSync(commandDir)) { if (!file.endsWith('.ts')) continue @@ -81,7 +73,7 @@ client.on(Events.InteractionCreate, async (interaction) => { if (command.targetType != (interaction.isUserContextMenuCommand() ? ApplicationCommandType.User : ApplicationCommandType.Message)) console.error("Out of date discord definition of this context command") try { - await command.run(interaction, interaction.isUserContextMenuCommand() ? interaction.targetUser : interaction.targetMessage, enrichedConfig) + await command.run(interaction, interaction.isUserContextMenuCommand() ? interaction.targetUser : interaction.targetMessage, config) } catch (e) { console.error("error during context command execution: " + commandName, e) interaction.reply("something sharted itself") @@ -99,7 +91,7 @@ client.on(Events.InteractionCreate, async (interaction) => { } try { - await command.run(interaction, enrichedConfig, S3); + await command.run(interaction, config); } catch (e) { console.error("error during command execution: " + commandName, e) interaction.reply("something sharted itself") @@ -118,7 +110,7 @@ client.on(Events.InteractionCreate, async (interaction) => { } try { - await command.autoComplete(interaction, enrichedConfig, interaction.options.getFocused(true), S3); + await command.autoComplete(interaction, config, interaction.options.getFocused(true)); } catch (e) { console.error("error during command execution: " + commandName, e) } From 994e4f72b271d0ca787df31c074a0887a901033f Mon Sep 17 00:00:00 2001 From: amy Date: Fri, 23 May 2025 08:55:08 +0330 Subject: [PATCH 08/10] rename shitpost --- src/commands/renameshitpost.ts | 51 ++++++++++++++++++++++++++++++++++ src/commands/shitpost.ts | 2 +- 2 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 src/commands/renameshitpost.ts diff --git a/src/commands/renameshitpost.ts b/src/commands/renameshitpost.ts new file mode 100644 index 0000000..a5f4eab --- /dev/null +++ b/src/commands/renameshitpost.ts @@ -0,0 +1,51 @@ +import {Command} from "../command.ts"; +import { + ApplicationIntegrationType, type AutocompleteFocusedOption, AutocompleteInteraction, + ChatInputCommandInteraction, + InteractionContextType, + SlashCommandBuilder +} from "discord.js"; +import { config, type Config } from "../config.ts"; +import {DOWNLOAD_FOLDER_PATH, getFilesInFolder} from "./shitpost.ts"; +import fs from "node:fs"; +import path from "node:path"; + +export default class RenameshitpostCommand extends Command { + + async run(interaction: ChatInputCommandInteraction, config: Config, ) { + await interaction.deferReply(); + const originalname = interaction.options.getString("originalname")!; + const newname = interaction.options.getString("newname")!; + + fs.renameSync(path.join(DOWNLOAD_FOLDER_PATH, originalname), path.join(DOWNLOAD_FOLDER_PATH, newname)); + await interaction.followUp("uhhh this shit shouldve worked") + } + + async autoComplete(interaction: AutocompleteInteraction, config: Config, option: AutocompleteFocusedOption): Promise { + if (option.name === 'originalname') { + const files = await getFilesInFolder(DOWNLOAD_FOLDER_PATH); + + const focusedValue = option.value.toLowerCase(); + const filteredFiles = files.filter(choice => choice.name.toLowerCase().includes(focusedValue)); + + await interaction.respond( + filteredFiles.slice(0, 25) + ); + } + } + slashCommand = new SlashCommandBuilder() + .setName("renameshitpost") + .setDescription("rename the shitpost").setIntegrationTypes([ + ApplicationIntegrationType.UserInstall + ]).addStringOption(option => { + return option.setName("originalname").setRequired(true).setDescription("the original shitpost name") + .setAutocomplete(true) + }).addStringOption(option => { + return option.setName("newname").setRequired(true).setDescription("the new shitpost name") + }) + .setContexts([ + InteractionContextType.BotDM, + InteractionContextType.Guild, + InteractionContextType.PrivateChannel + ]); +} diff --git a/src/commands/shitpost.ts b/src/commands/shitpost.ts index ad785b6..6058151 100644 --- a/src/commands/shitpost.ts +++ b/src/commands/shitpost.ts @@ -16,7 +16,7 @@ const __dirname = path.dirname(__filename); export const BUCKETNAME = "shitposts" as const; export const DOWNLOAD_FOLDER_PATH = path.join(__dirname, '..', '..', 'shitposts'); -async function getFilesInFolder(folderPath: string): Promise<{ name: string, value: string }[]> { +export async function getFilesInFolder(folderPath: string): Promise<{ name: string, value: string }[]> { try { const files = await fs.readdir(folderPath); const fileList: { name: string, value: string }[] = []; From 79740a8639278dd1cb76f8bb25d9e5e6b9ad4d89 Mon Sep 17 00:00:00 2001 From: amy Date: Mon, 26 May 2025 04:22:09 +0330 Subject: [PATCH 09/10] this commit right here, is so large and long that it took 7 days to upload. its also really important. the importancy of this update cannot the described by words, you just have to read the code --- src/commands/nowplaying.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/nowplaying.ts b/src/commands/nowplaying.ts index d226799..65bdad6 100644 --- a/src/commands/nowplaying.ts +++ b/src/commands/nowplaying.ts @@ -33,7 +33,7 @@ export default class PingCommand extends Command { await interaction.deferReply() const user = interaction.options.getString("user") ?? config.listenbrainzAccount; const usesonglink = interaction.options.getBoolean("usesonglink") ?? true - const useitunes = interaction.options.getBoolean("useitunes") ?? true + const useitunes = interaction.options.getBoolean("useitunes") ?? false const meow = await fetch(`https://api.listenbrainz.org/1/user/${user}/playing-now`).then((res) => res.json()); if (!meow) { await interaction.followUp("something shat itself!"); From 29cfc2ab1059ee59fb1ce1f4a23ebe85dedc9fc4 Mon Sep 17 00:00:00 2001 From: amy Date: Tue, 27 May 2025 14:51:05 +0330 Subject: [PATCH 10/10] one line fucked everything up --- src/commands/nowplaying.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/commands/nowplaying.ts b/src/commands/nowplaying.ts index 65bdad6..d468498 100644 --- a/src/commands/nowplaying.ts +++ b/src/commands/nowplaying.ts @@ -68,7 +68,6 @@ export default class PingCommand extends Command { ) ]; const meow = Object.keys(songlink.linksByPlatform) - let message = "" const nya: ActionRowBuilder[] = []; let currentRow = new ActionRowBuilder(); @@ -85,10 +84,10 @@ export default class PingCommand extends Command { .setStyle(ButtonStyle.Link) ); } - components[0].addActionRowComponents(nya) if (currentRow.components.length > 0) { nya.push(currentRow); } + components[0].addActionRowComponents(nya) await interaction.followUp({ components: components, flags: [MessageFlags.IsComponentsV2], @@ -102,7 +101,7 @@ export default class PingCommand extends Command { .setFooter({ text: "song.link proxying was turned off or failed - amy jr", }); - + await interaction.followUp({embeds:[embedfallback]}) } }