Compare commits
1 commit
1e3a028bcd
...
d549823b8a
Author | SHA1 | Date | |
---|---|---|---|
d549823b8a |
18 changed files with 261 additions and 306 deletions
5
.dev.env
5
.dev.env
|
@ -16,6 +16,8 @@ BOT_ENV=4
|
||||||
ABOUT_FUNDING=
|
ABOUT_FUNDING=
|
||||||
ABOUT_REPO=
|
ABOUT_REPO=
|
||||||
|
|
||||||
|
DROP_RARITY=-1
|
||||||
|
|
||||||
DB_HOST=127.0.0.1
|
DB_HOST=127.0.0.1
|
||||||
DB_PORT=3301
|
DB_PORT=3301
|
||||||
DB_NAME=carddrop
|
DB_NAME=carddrop
|
||||||
|
@ -27,6 +29,3 @@ DB_LOGGING=true
|
||||||
DB_CARD_FILE=:memory:
|
DB_CARD_FILE=:memory:
|
||||||
|
|
||||||
EXPRESS_PORT=3303
|
EXPRESS_PORT=3303
|
||||||
|
|
||||||
GDRIVESYNC_WHITELIST=147392775707426816,887272961504071690
|
|
||||||
GDRIVESYNC_AUTO=true
|
|
||||||
|
|
|
@ -16,6 +16,8 @@ BOT_ENV=1
|
||||||
ABOUT_FUNDING=
|
ABOUT_FUNDING=
|
||||||
ABOUT_REPO=
|
ABOUT_REPO=
|
||||||
|
|
||||||
|
DROP_RARITY=-1
|
||||||
|
|
||||||
DB_HOST=127.0.0.1
|
DB_HOST=127.0.0.1
|
||||||
DB_PORT=3321
|
DB_PORT=3321
|
||||||
DB_NAME=carddrop
|
DB_NAME=carddrop
|
||||||
|
@ -27,6 +29,3 @@ DB_LOGGING=false
|
||||||
DB_CARD_FILE=:memory:
|
DB_CARD_FILE=:memory:
|
||||||
|
|
||||||
EXPRESS_PORT=3323
|
EXPRESS_PORT=3323
|
||||||
|
|
||||||
GDRIVESYNC_WHITELIST=147392775707426816,887272961504071690
|
|
||||||
GDRIVESYNC_AUTO=false
|
|
||||||
|
|
|
@ -16,6 +16,8 @@ BOT_ENV=2
|
||||||
ABOUT_FUNDING=
|
ABOUT_FUNDING=
|
||||||
ABOUT_REPO=
|
ABOUT_REPO=
|
||||||
|
|
||||||
|
DROP_RARITY=-1
|
||||||
|
|
||||||
DB_HOST=127.0.0.1
|
DB_HOST=127.0.0.1
|
||||||
DB_PORT=3311
|
DB_PORT=3311
|
||||||
DB_NAME=carddrop
|
DB_NAME=carddrop
|
||||||
|
@ -27,6 +29,3 @@ DB_LOGGING=false
|
||||||
DB_CARD_FILE=:memory:
|
DB_CARD_FILE=:memory:
|
||||||
|
|
||||||
EXPRESS_PORT=3313
|
EXPRESS_PORT=3313
|
||||||
|
|
||||||
GDRIVESYNC_WHITELIST=147392775707426816,887272961504071690
|
|
||||||
GDRIVESYNC_AUTO=false
|
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
CREATE TABLE `config` (
|
|
||||||
`Id` VARCHAR(255) NOT NULL,
|
|
||||||
`WhenCreated` DATETIME NOT NULL,
|
|
||||||
`WhenUpdated` DATETIME NOT NULL,
|
|
||||||
`Key` VARCHAR(255) NOT NULL,
|
|
||||||
`Value` VARCHAR(255) NOT NULL,
|
|
||||||
PRIMARY KEY (`Id`)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "card-drop",
|
"name": "card-drop",
|
||||||
"version": "0.2.0",
|
"version": "0.1.8",
|
||||||
"main": "./dist/bot.js",
|
"main": "./dist/bot.js",
|
||||||
"typings": "./dist",
|
"typings": "./dist",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -31,6 +31,7 @@
|
||||||
"discord.js": "^14.3.0",
|
"discord.js": "^14.3.0",
|
||||||
"dotenv": "^16.0.0",
|
"dotenv": "^16.0.0",
|
||||||
"express": "^4.18.2",
|
"express": "^4.18.2",
|
||||||
|
"googleapis": "^127.0.0",
|
||||||
"jest": "^29.0.0",
|
"jest": "^29.0.0",
|
||||||
"jest-mock-extended": "^3.0.0",
|
"jest-mock-extended": "^3.0.0",
|
||||||
"minimatch": "9.0.3",
|
"minimatch": "9.0.3",
|
||||||
|
|
|
@ -4,19 +4,12 @@ import Card from "../database/entities/card/Card";
|
||||||
import Series from "../database/entities/card/Series";
|
import Series from "../database/entities/card/Series";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
import { CardRarity, CardRarityToString } from "../constants/CardRarity";
|
import { CardRarity, CardRarityToString } from "../constants/CardRarity";
|
||||||
import Config from "../database/entities/app/Config";
|
|
||||||
|
|
||||||
export default class CardSetupFunction {
|
export default class CardSetupFunction {
|
||||||
public static async Execute() {
|
public static async Execute() {
|
||||||
if (await Config.GetValue('safemode') == "true") return;
|
await this.ClearDatabase();
|
||||||
|
await this.ReadSeries();
|
||||||
try {
|
await this.ReadCards();
|
||||||
await this.ClearDatabase();
|
|
||||||
await this.ReadSeries();
|
|
||||||
await this.ReadCards();
|
|
||||||
} catch {
|
|
||||||
await Config.SetValue('safemode', 'true');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static async ClearDatabase() {
|
private static async ClearDatabase() {
|
||||||
|
|
19
src/bot.ts
19
src/bot.ts
|
@ -2,8 +2,6 @@ import * as dotenv from "dotenv";
|
||||||
import { CoreClient } from "./client/client";
|
import { CoreClient } from "./client/client";
|
||||||
import { IntentsBitField } from "discord.js";
|
import { IntentsBitField } from "discord.js";
|
||||||
import Registry from "./registry";
|
import Registry from "./registry";
|
||||||
import { existsSync } from "fs";
|
|
||||||
import { ExecException, exec } from "child_process";
|
|
||||||
|
|
||||||
dotenv.config();
|
dotenv.config();
|
||||||
|
|
||||||
|
@ -21,7 +19,6 @@ const requiredConfigs: string[] = [
|
||||||
"DB_SYNC",
|
"DB_SYNC",
|
||||||
"DB_LOGGING",
|
"DB_LOGGING",
|
||||||
"EXPRESS_PORT",
|
"EXPRESS_PORT",
|
||||||
"GDRIVESYNC_WHITELIST",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
requiredConfigs.forEach(config => {
|
requiredConfigs.forEach(config => {
|
||||||
|
@ -39,20 +36,4 @@ Registry.RegisterCommands();
|
||||||
Registry.RegisterEvents();
|
Registry.RegisterEvents();
|
||||||
Registry.RegisterButtonEvents();
|
Registry.RegisterButtonEvents();
|
||||||
|
|
||||||
if (!existsSync(`${process.cwd()}/cards`) && process.env.GDRIVESYNC_AUTO && process.env.GDRIVESYNC_AUTO == 'true') {
|
|
||||||
console.log("Card directory not found, syncing...");
|
|
||||||
|
|
||||||
CoreClient.AllowDrops = false;
|
|
||||||
|
|
||||||
exec(`rclone sync card-drop-gdrive: ${process.cwd()}/cards`, async (error: ExecException | null) => {
|
|
||||||
if (error) {
|
|
||||||
console.error(error.code);
|
|
||||||
throw `Error while running sync command. Code: ${error.code}`;
|
|
||||||
} else {
|
|
||||||
console.log('Synced successfully.');
|
|
||||||
CoreClient.AllowDrops = true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
client.start();
|
client.start();
|
|
@ -4,22 +4,11 @@ import CardDropHelper from "../helpers/CardDropHelper";
|
||||||
import { readFileSync } from "fs";
|
import { readFileSync } from "fs";
|
||||||
import { v4 } from "uuid";
|
import { v4 } from "uuid";
|
||||||
import { CoreClient } from "../client/client";
|
import { CoreClient } from "../client/client";
|
||||||
|
import Card from "../database/entities/card/Card";
|
||||||
import Inventory from "../database/entities/app/Inventory";
|
import Inventory from "../database/entities/app/Inventory";
|
||||||
import Config from "../database/entities/app/Config";
|
|
||||||
|
|
||||||
export default class Reroll extends ButtonEvent {
|
export default class Reroll extends ButtonEvent {
|
||||||
public override async execute(interaction: ButtonInteraction) {
|
public override async execute(interaction: ButtonInteraction) {
|
||||||
if (!CoreClient.AllowDrops) {
|
|
||||||
await interaction.reply('Bot is currently syncing, please wait until its done.');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (await Config.GetValue('safemode') == "true")
|
|
||||||
{
|
|
||||||
await interaction.reply('Safe Mode has been activated, please resync to contunue.');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!interaction.guild || !interaction.guildId) return;
|
if (!interaction.guild || !interaction.guildId) return;
|
||||||
|
|
||||||
let randomCard = await CardDropHelper.GetRandomCard();
|
let randomCard = await CardDropHelper.GetRandomCard();
|
||||||
|
|
|
@ -26,7 +26,6 @@ export class CoreClient extends Client {
|
||||||
|
|
||||||
public static ClaimId: string;
|
public static ClaimId: string;
|
||||||
public static Environment: Environment;
|
public static Environment: Environment;
|
||||||
public static AllowDrops: boolean;
|
|
||||||
|
|
||||||
public static get commandItems(): ICommandItem[] {
|
public static get commandItems(): ICommandItem[] {
|
||||||
return this._commandItems;
|
return this._commandItems;
|
||||||
|
@ -54,8 +53,6 @@ export class CoreClient extends Client {
|
||||||
|
|
||||||
CoreClient.Environment = Number(process.env.BOT_ENV);
|
CoreClient.Environment = Number(process.env.BOT_ENV);
|
||||||
console.log(`Bot Environment: ${CoreClient.Environment}`);
|
console.log(`Bot Environment: ${CoreClient.Environment}`);
|
||||||
|
|
||||||
CoreClient.AllowDrops = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public async start() {
|
public async start() {
|
||||||
|
|
|
@ -4,8 +4,8 @@ import CardDropHelper from "../helpers/CardDropHelper";
|
||||||
import { readFileSync } from "fs";
|
import { readFileSync } from "fs";
|
||||||
import { CoreClient } from "../client/client";
|
import { CoreClient } from "../client/client";
|
||||||
import { v4 } from "uuid";
|
import { v4 } from "uuid";
|
||||||
|
import Card from "../database/entities/card/Card";
|
||||||
import Inventory from "../database/entities/app/Inventory";
|
import Inventory from "../database/entities/app/Inventory";
|
||||||
import Config from "../database/entities/app/Config";
|
|
||||||
|
|
||||||
export default class Drop extends Command {
|
export default class Drop extends Command {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
@ -17,19 +17,12 @@ export default class Drop extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
public override async execute(interaction: CommandInteraction) {
|
public override async execute(interaction: CommandInteraction) {
|
||||||
if (!CoreClient.AllowDrops) {
|
let randomCard = await CardDropHelper.GetRandomCard();
|
||||||
await interaction.reply('Bot is currently syncing, please wait until its done.');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (await Config.GetValue('safemode') == "true")
|
if (process.env.DROP_RARITY && Number(process.env.DROP_RARITY) > 0) {
|
||||||
{
|
randomCard = await CardDropHelper.GetRandomCardByRarity(Number(process.env.DROP_RARITY));
|
||||||
await interaction.reply('Safe Mode has been activated, please resync to contunue.');
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const randomCard = await CardDropHelper.GetRandomCard();
|
|
||||||
|
|
||||||
const image = readFileSync(randomCard.Path);
|
const image = readFileSync(randomCard.Path);
|
||||||
|
|
||||||
await interaction.deferReply();
|
await interaction.deferReply();
|
||||||
|
|
|
@ -1,45 +0,0 @@
|
||||||
import { CacheType, CommandInteraction, PermissionsBitField, SlashCommandBuilder } from "discord.js";
|
|
||||||
import { Command } from "../type/command";
|
|
||||||
import { ExecException, exec } from "child_process";
|
|
||||||
import CardSetupFunction from "../Functions/CardSetupFunction";
|
|
||||||
import { CoreClient } from "../client/client";
|
|
||||||
import Config from "../database/entities/app/Config";
|
|
||||||
|
|
||||||
export default class Gdrivesync extends Command {
|
|
||||||
constructor() {
|
|
||||||
super();
|
|
||||||
|
|
||||||
super.CommandBuilder = new SlashCommandBuilder()
|
|
||||||
.setName('gdrivesync')
|
|
||||||
.setDescription('Sync google drive to the bot')
|
|
||||||
.setDefaultMemberPermissions(PermissionsBitField.Flags.Administrator);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override async execute(interaction: CommandInteraction<CacheType>) {
|
|
||||||
if (!interaction.isChatInputCommand()) return;
|
|
||||||
|
|
||||||
const whitelistedUsers = process.env.GDRIVESYNC_WHITELIST!.split(',');
|
|
||||||
|
|
||||||
if (!whitelistedUsers.find(x => x == interaction.user.id)) {
|
|
||||||
await interaction.reply("Only whitelisted users can use this command.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
await interaction.reply('Syncing, this might take a while...');
|
|
||||||
|
|
||||||
CoreClient.AllowDrops = false;
|
|
||||||
|
|
||||||
exec(`rclone sync card-drop-gdrive: ${process.cwd()}/cards`, async (error: ExecException | null) => {
|
|
||||||
if (error) {
|
|
||||||
await interaction.editReply(`Error while running sync command. Safe Mode has been activated. Code: ${error.code}`);
|
|
||||||
await Config.SetValue('safemode', 'true');
|
|
||||||
} else {
|
|
||||||
await CardSetupFunction.Execute();
|
|
||||||
await interaction.editReply('Synced successfully.');
|
|
||||||
|
|
||||||
CoreClient.AllowDrops = true;
|
|
||||||
await Config.SetValue('safemode', 'false');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,81 +0,0 @@
|
||||||
import { AttachmentBuilder, CacheType, CommandInteraction, DiscordAPIError, SlashCommandBuilder } from "discord.js";
|
|
||||||
import { Command } from "../../type/command";
|
|
||||||
import { CardRarity, CardRarityParse } from "../../constants/CardRarity";
|
|
||||||
import CardDropHelper from "../../helpers/CardDropHelper";
|
|
||||||
import { readFileSync } from "fs";
|
|
||||||
import Inventory from "../../database/entities/app/Inventory";
|
|
||||||
import { v4 } from "uuid";
|
|
||||||
import { CoreClient } from "../../client/client";
|
|
||||||
|
|
||||||
export default class Droprarity extends Command {
|
|
||||||
constructor() {
|
|
||||||
super();
|
|
||||||
|
|
||||||
super.CommandBuilder = new SlashCommandBuilder()
|
|
||||||
.setName('droprarity')
|
|
||||||
.setDescription('(TEST) Summon a random card of a specific rarity')
|
|
||||||
.addStringOption(x =>
|
|
||||||
x
|
|
||||||
.setName('rarity')
|
|
||||||
.setDescription('The rarity you want to summon')
|
|
||||||
.setRequired(true));
|
|
||||||
}
|
|
||||||
|
|
||||||
public override async execute(interaction: CommandInteraction<CacheType>) {
|
|
||||||
if (!interaction.isChatInputCommand()) return;
|
|
||||||
|
|
||||||
const rarity = interaction.options.get('rarity');
|
|
||||||
|
|
||||||
if (!rarity || !rarity.value) {
|
|
||||||
await interaction.reply('Rarity is required');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const rarityType = CardRarityParse(rarity.value.toString());
|
|
||||||
|
|
||||||
if (rarityType == CardRarity.Unknown) {
|
|
||||||
await interaction.reply('Invalid rarity');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const card = await CardDropHelper.GetRandomCardByRarity(rarityType);
|
|
||||||
|
|
||||||
if (!card) {
|
|
||||||
await interaction.reply('Card not found');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const image = readFileSync(card.Path);
|
|
||||||
|
|
||||||
await interaction.deferReply();
|
|
||||||
|
|
||||||
const attachment = new AttachmentBuilder(image, { name: card.FileName });
|
|
||||||
|
|
||||||
const inventory = await Inventory.FetchOneByCardNumberAndUserId(interaction.user.id, card.CardNumber);
|
|
||||||
const quantityClaimed = inventory ? inventory.Quantity : 0;
|
|
||||||
|
|
||||||
const embed = CardDropHelper.GenerateDropEmbed(card, quantityClaimed || 0);
|
|
||||||
|
|
||||||
const claimId = v4();
|
|
||||||
|
|
||||||
const row = CardDropHelper.GenerateDropButtons(card, claimId, interaction.user.id);
|
|
||||||
|
|
||||||
try {
|
|
||||||
await interaction.editReply({
|
|
||||||
embeds: [ embed ],
|
|
||||||
files: [ attachment ],
|
|
||||||
components: [ row ],
|
|
||||||
});
|
|
||||||
} catch (e) {
|
|
||||||
console.error(e);
|
|
||||||
|
|
||||||
if (e instanceof DiscordAPIError) {
|
|
||||||
await interaction.editReply(`Unable to send next drop. Please try again, and report this if it keeps happening. Code: ${e.code}`);
|
|
||||||
} else {
|
|
||||||
await interaction.editReply(`Unable to send next drop. Please try again, and report this if it keeps happening. Code: UNKNOWN`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
CoreClient.ClaimId = claimId;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -42,20 +42,3 @@ export function CardRarityToColour(rarity: CardRarity): number {
|
||||||
return EmbedColours.MangaCard;
|
return EmbedColours.MangaCard;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function CardRarityParse(rarity: string): CardRarity {
|
|
||||||
switch (rarity.toLowerCase()) {
|
|
||||||
case "bronze":
|
|
||||||
return CardRarity.Bronze;
|
|
||||||
case "silver":
|
|
||||||
return CardRarity.Silver;
|
|
||||||
case "gold":
|
|
||||||
return CardRarity.Gold;
|
|
||||||
case "legendary":
|
|
||||||
return CardRarity.Legendary;
|
|
||||||
case "manga":
|
|
||||||
return CardRarity.Manga;
|
|
||||||
default:
|
|
||||||
return CardRarity.Unknown;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,53 +0,0 @@
|
||||||
import { Column, Entity } from "typeorm";
|
|
||||||
import AppBaseEntity from "../../../contracts/AppBaseEntity";
|
|
||||||
import AppDataSource from "../../dataSources/appDataSource";
|
|
||||||
|
|
||||||
@Entity()
|
|
||||||
export default class Config extends AppBaseEntity {
|
|
||||||
constructor(key: string, value: string) {
|
|
||||||
super();
|
|
||||||
|
|
||||||
this.Key = key;
|
|
||||||
this.Value = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
Key: string;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
Value: string;
|
|
||||||
|
|
||||||
public SetValue(value: string) {
|
|
||||||
this.Value = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static async FetchOneByKey(key: string): Promise<Config | null> {
|
|
||||||
const repository = AppDataSource.getRepository(Config);
|
|
||||||
|
|
||||||
const single = await repository.findOne({ where: { Key: key }});
|
|
||||||
|
|
||||||
return single;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static async GetValue(key: string): Promise<string | undefined> {
|
|
||||||
const config = await Config.FetchOneByKey(key);
|
|
||||||
|
|
||||||
if (!config) return undefined;
|
|
||||||
|
|
||||||
return config.Value;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static async SetValue(key: string, value: string) {
|
|
||||||
const config = await Config.FetchOneByKey(key);
|
|
||||||
|
|
||||||
if (!config) {
|
|
||||||
const newConfig = new Config(key, value);
|
|
||||||
|
|
||||||
await newConfig.Save(Config, newConfig);
|
|
||||||
} else {
|
|
||||||
config.SetValue(value);
|
|
||||||
|
|
||||||
await config.Save(Config, config);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,15 +0,0 @@
|
||||||
import { MigrationInterface, QueryRunner } from "typeorm"
|
|
||||||
import MigrationHelper from "../../../../helpers/MigrationHelper"
|
|
||||||
|
|
||||||
export class CreateConfig1699814500650 implements MigrationInterface {
|
|
||||||
|
|
||||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
||||||
MigrationHelper.Up('1699814500650-createConfig', '0.2', [
|
|
||||||
"01-table/Config",
|
|
||||||
], queryRunner);
|
|
||||||
}
|
|
||||||
|
|
||||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
83
src/helpers/GoogleDriveHelper.ts
Normal file
83
src/helpers/GoogleDriveHelper.ts
Normal file
|
@ -0,0 +1,83 @@
|
||||||
|
import { Auth, drive_v3, google } from "googleapis";
|
||||||
|
import IGDriveFolderListing from "../contracts/IGDriveFolderListing";
|
||||||
|
import path, { resolve } from "path";
|
||||||
|
import os from 'os';
|
||||||
|
import uuid, { v4 } from 'uuid';
|
||||||
|
import { createWriteStream } from "fs";
|
||||||
|
|
||||||
|
export default class GoogleDriveHelper {
|
||||||
|
private _auth: Auth.GoogleAuth;
|
||||||
|
private _drive: drive_v3.Drive;
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
this._auth = new google.auth.GoogleAuth({
|
||||||
|
keyFile: "gdrive-credentials.json",
|
||||||
|
scopes: [
|
||||||
|
"https://www.googleapis.com/auth/drive.readonly",
|
||||||
|
"https://www.googleapis.com/auth/drive.metadata.readonly",
|
||||||
|
],
|
||||||
|
});
|
||||||
|
|
||||||
|
this._drive = google.drive( { version: "v3", auth: this._auth });
|
||||||
|
}
|
||||||
|
|
||||||
|
public async listFolder(folderId: string, pageSize: number): Promise<IGDriveFolderListing[]> {
|
||||||
|
const params = {
|
||||||
|
pageSize: pageSize,
|
||||||
|
fields: "nextPageToken, files(id, name)",
|
||||||
|
q: `'${folderId}' in parents and trashed=false`
|
||||||
|
}
|
||||||
|
|
||||||
|
const res = await this._drive.files.list(params);
|
||||||
|
|
||||||
|
return res.data.files as IGDriveFolderListing[];
|
||||||
|
}
|
||||||
|
|
||||||
|
public downloadFile(fileId: string) {
|
||||||
|
const res = this._drive.files.get({
|
||||||
|
fileId: fileId,
|
||||||
|
alt: 'media',
|
||||||
|
}, {
|
||||||
|
responseType: 'stream',
|
||||||
|
})
|
||||||
|
.then(res => {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
const filePath = path.join(process.cwd(), 'temp', v4());
|
||||||
|
const dest = createWriteStream(filePath);
|
||||||
|
let progress = 0;
|
||||||
|
|
||||||
|
res.data
|
||||||
|
.on('end', () => {
|
||||||
|
resolve(filePath);
|
||||||
|
})
|
||||||
|
.on('error', err => {
|
||||||
|
reject(err);
|
||||||
|
})
|
||||||
|
.on('data', d => {
|
||||||
|
progress += d.length;
|
||||||
|
})
|
||||||
|
.pipe(dest);
|
||||||
|
});
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
public async exportFile(fileId: string, mimeType: string) {
|
||||||
|
const destPath = path.join(process.cwd(), 'temp', v4());
|
||||||
|
const dest = createWriteStream(destPath);
|
||||||
|
|
||||||
|
const res = await this._drive.files.export({
|
||||||
|
fileId: fileId,
|
||||||
|
mimeType: mimeType
|
||||||
|
}, {
|
||||||
|
responseType: 'stream',
|
||||||
|
});
|
||||||
|
|
||||||
|
await new Promise((resolve, reject) => {
|
||||||
|
res.data
|
||||||
|
.on('error', reject)
|
||||||
|
.pipe(dest)
|
||||||
|
.on('error', reject)
|
||||||
|
.on('finish', resolve);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
|
@ -3,11 +3,9 @@ import { CoreClient } from "./client/client";
|
||||||
// Global Command Imports
|
// Global Command Imports
|
||||||
import About from "./commands/about";
|
import About from "./commands/about";
|
||||||
import Drop from "./commands/drop";
|
import Drop from "./commands/drop";
|
||||||
import Gdrivesync from "./commands/gdrivesync";
|
|
||||||
|
|
||||||
// Test Command Imports
|
// Test Command Imports
|
||||||
import Dropnumber from "./commands/stage/dropnumber";
|
import Dropnumber from "./commands/stage/dropnumber";
|
||||||
import Droprarity from "./commands/stage/droprarity";
|
|
||||||
|
|
||||||
// Button Event Imports
|
// Button Event Imports
|
||||||
import Claim from "./buttonEvents/Claim";
|
import Claim from "./buttonEvents/Claim";
|
||||||
|
@ -19,11 +17,9 @@ export default class Registry {
|
||||||
// Global Commands
|
// Global Commands
|
||||||
CoreClient.RegisterCommand('about', new About());
|
CoreClient.RegisterCommand('about', new About());
|
||||||
CoreClient.RegisterCommand('drop', new Drop());
|
CoreClient.RegisterCommand('drop', new Drop());
|
||||||
CoreClient.RegisterCommand('gdrivesync', new Gdrivesync());
|
|
||||||
|
|
||||||
// Test Commands
|
// Test Commands
|
||||||
CoreClient.RegisterCommand('dropnumber', new Dropnumber(), Environment.Test);
|
CoreClient.RegisterCommand('dropnumber', new Dropnumber(), Environment.Test);
|
||||||
CoreClient.RegisterCommand('droprarity', new Droprarity(), Environment.Test);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static RegisterEvents() {
|
public static RegisterEvents() {
|
||||||
|
|
180
yarn.lock
180
yarn.lock
|
@ -469,7 +469,7 @@
|
||||||
"@types/node" "*"
|
"@types/node" "*"
|
||||||
jest-mock "^29.7.0"
|
jest-mock "^29.7.0"
|
||||||
|
|
||||||
"@jest/expect-utils@^29.7.0":
|
"@jest/expect-utils@^29.6.2", "@jest/expect-utils@^29.7.0":
|
||||||
version "29.7.0"
|
version "29.7.0"
|
||||||
resolved "https://registry.yarnpkg.com/@jest/expect-utils/-/expect-utils-29.7.0.tgz#023efe5d26a8a70f21677d0a1afc0f0a44e3a1c6"
|
resolved "https://registry.yarnpkg.com/@jest/expect-utils/-/expect-utils-29.7.0.tgz#023efe5d26a8a70f21677d0a1afc0f0a44e3a1c6"
|
||||||
integrity sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==
|
integrity sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==
|
||||||
|
@ -913,9 +913,9 @@
|
||||||
"@types/istanbul-lib-report" "*"
|
"@types/istanbul-lib-report" "*"
|
||||||
|
|
||||||
"@types/jest@^29.0.0":
|
"@types/jest@^29.0.0":
|
||||||
version "29.5.7"
|
version "29.5.6"
|
||||||
resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.5.7.tgz#2c0dafe2715dd958a455bc10e2ec3e1ec47b5036"
|
resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.5.6.tgz#f4cf7ef1b5b0bfc1aa744e41b24d9cc52533130b"
|
||||||
integrity sha512-HLyetab6KVPSiF+7pFcUyMeLsx25LDNDemw9mGsJBkai/oouwrjTycocSDYopMEwFhN2Y4s9oPyOCZNofgSt2g==
|
integrity sha512-/t9NnzkOpXb4Nfvg17ieHE6EeSjDS2SGSpNYfoLbUAeL/EOueU/RSdOWFpfQTXBEM7BguYW1XQ0EbM+6RlIh6w==
|
||||||
dependencies:
|
dependencies:
|
||||||
expect "^29.0.0"
|
expect "^29.0.0"
|
||||||
pretty-format "^29.0.0"
|
pretty-format "^29.0.0"
|
||||||
|
@ -937,20 +937,13 @@
|
||||||
resolved "https://registry.yarnpkg.com/@types/mime/-/mime-1.3.4.tgz#a4ed836e069491414bab92c31fdea9e557aca0d9"
|
resolved "https://registry.yarnpkg.com/@types/mime/-/mime-1.3.4.tgz#a4ed836e069491414bab92c31fdea9e557aca0d9"
|
||||||
integrity sha512-1Gjee59G25MrQGk8bsNvC6fxNiRgUlGn2wlhGf95a59DrprnnHk80FIMMFG9XHMdrfsuA119ht06QPDXA1Z7tw==
|
integrity sha512-1Gjee59G25MrQGk8bsNvC6fxNiRgUlGn2wlhGf95a59DrprnnHk80FIMMFG9XHMdrfsuA119ht06QPDXA1Z7tw==
|
||||||
|
|
||||||
"@types/node@*":
|
"@types/node@*", "@types/node@^20.0.0":
|
||||||
version "20.8.10"
|
version "20.8.10"
|
||||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.8.10.tgz#a5448b895c753ae929c26ce85cab557c6d4a365e"
|
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.8.10.tgz#a5448b895c753ae929c26ce85cab557c6d4a365e"
|
||||||
integrity sha512-TlgT8JntpcbmKUFzjhsyhGfP2fsiz1Mv56im6enJ905xG1DAYesxJaeSbGqQmAw8OWPdhyJGhGSQGKRNJ45u9w==
|
integrity sha512-TlgT8JntpcbmKUFzjhsyhGfP2fsiz1Mv56im6enJ905xG1DAYesxJaeSbGqQmAw8OWPdhyJGhGSQGKRNJ45u9w==
|
||||||
dependencies:
|
dependencies:
|
||||||
undici-types "~5.26.4"
|
undici-types "~5.26.4"
|
||||||
|
|
||||||
"@types/node@^20.0.0":
|
|
||||||
version "20.9.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.9.0.tgz#bfcdc230583aeb891cf51e73cfdaacdd8deae298"
|
|
||||||
integrity sha512-nekiGu2NDb1BcVofVcEKMIwzlx4NjHlcjhoxxKBNLtz15Y1z7MYf549DFvkHSId02Ax6kGwWntIBPC3l/JZcmw==
|
|
||||||
dependencies:
|
|
||||||
undici-types "~5.26.4"
|
|
||||||
|
|
||||||
"@types/normalize-package-data@^2.4.1":
|
"@types/normalize-package-data@^2.4.1":
|
||||||
version "2.4.3"
|
version "2.4.3"
|
||||||
resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.3.tgz#291c243e4b94dbfbc0c0ee26b7666f1d5c030e2c"
|
resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.3.tgz#291c243e4b94dbfbc0c0ee26b7666f1d5c030e2c"
|
||||||
|
@ -1044,6 +1037,13 @@ agent-base@6, agent-base@^6.0.2:
|
||||||
dependencies:
|
dependencies:
|
||||||
debug "4"
|
debug "4"
|
||||||
|
|
||||||
|
agent-base@^7.0.2:
|
||||||
|
version "7.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-7.1.0.tgz#536802b76bc0b34aa50195eb2442276d613e3434"
|
||||||
|
integrity sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==
|
||||||
|
dependencies:
|
||||||
|
debug "^4.3.4"
|
||||||
|
|
||||||
agentkeepalive@^4.1.3:
|
agentkeepalive@^4.1.3:
|
||||||
version "4.5.0"
|
version "4.5.0"
|
||||||
resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-4.5.0.tgz#2673ad1389b3c418c5a20c5d7364f93ca04be923"
|
resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-4.5.0.tgz#2673ad1389b3c418c5a20c5d7364f93ca04be923"
|
||||||
|
@ -1284,7 +1284,7 @@ balanced-match@^1.0.0:
|
||||||
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee"
|
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee"
|
||||||
integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==
|
integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==
|
||||||
|
|
||||||
base64-js@^1.3.1:
|
base64-js@^1.3.0, base64-js@^1.3.1:
|
||||||
version "1.5.1"
|
version "1.5.1"
|
||||||
resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a"
|
resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a"
|
||||||
integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==
|
integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==
|
||||||
|
@ -1299,6 +1299,11 @@ bignumber.js@9.0.0:
|
||||||
resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.0.0.tgz#805880f84a329b5eac6e7cb6f8274b6d82bdf075"
|
resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.0.0.tgz#805880f84a329b5eac6e7cb6f8274b6d82bdf075"
|
||||||
integrity sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A==
|
integrity sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A==
|
||||||
|
|
||||||
|
bignumber.js@^9.0.0:
|
||||||
|
version "9.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.1.1.tgz#c4df7dc496bd849d4c9464344c1aa74228b4dac6"
|
||||||
|
integrity sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig==
|
||||||
|
|
||||||
bl@^4.1.0:
|
bl@^4.1.0:
|
||||||
version "4.1.0"
|
version "4.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/bl/-/bl-4.1.0.tgz#451535264182bec2fbbc83a62ab98cf11d9f7b3a"
|
resolved "https://registry.yarnpkg.com/bl/-/bl-4.1.0.tgz#451535264182bec2fbbc83a62ab98cf11d9f7b3a"
|
||||||
|
@ -1411,6 +1416,11 @@ bser@2.1.1:
|
||||||
dependencies:
|
dependencies:
|
||||||
node-int64 "^0.4.0"
|
node-int64 "^0.4.0"
|
||||||
|
|
||||||
|
buffer-equal-constant-time@1.0.1:
|
||||||
|
version "1.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz#f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819"
|
||||||
|
integrity sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==
|
||||||
|
|
||||||
buffer-from@^1.0.0:
|
buffer-from@^1.0.0:
|
||||||
version "1.1.2"
|
version "1.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5"
|
resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5"
|
||||||
|
@ -2046,6 +2056,13 @@ eastasianwidth@^0.2.0:
|
||||||
resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb"
|
resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb"
|
||||||
integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==
|
integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==
|
||||||
|
|
||||||
|
ecdsa-sig-formatter@1.0.11, ecdsa-sig-formatter@^1.0.11:
|
||||||
|
version "1.0.11"
|
||||||
|
resolved "https://registry.yarnpkg.com/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz#ae0f0fa2d85045ef14a817daa3ce9acd0489e5bf"
|
||||||
|
integrity sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==
|
||||||
|
dependencies:
|
||||||
|
safe-buffer "^5.0.1"
|
||||||
|
|
||||||
ee-first@1.1.1:
|
ee-first@1.1.1:
|
||||||
version "1.1.1"
|
version "1.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
|
resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
|
||||||
|
@ -2192,7 +2209,19 @@ exit@^0.1.2:
|
||||||
resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c"
|
resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c"
|
||||||
integrity sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==
|
integrity sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==
|
||||||
|
|
||||||
expect@^29.0.0, expect@^29.7.0:
|
expect@^29.0.0:
|
||||||
|
version "29.6.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/expect/-/expect-29.6.2.tgz#7b08e83eba18ddc4a2cf62b5f2d1918f5cd84521"
|
||||||
|
integrity sha512-iAErsLxJ8C+S02QbLAwgSGSezLQK+XXRDt8IuFXFpwCNw2ECmzZSmjKcCaFVp5VRMk+WAvz6h6jokzEzBFZEuA==
|
||||||
|
dependencies:
|
||||||
|
"@jest/expect-utils" "^29.6.2"
|
||||||
|
"@types/node" "*"
|
||||||
|
jest-get-type "^29.4.3"
|
||||||
|
jest-matcher-utils "^29.6.2"
|
||||||
|
jest-message-util "^29.6.2"
|
||||||
|
jest-util "^29.6.2"
|
||||||
|
|
||||||
|
expect@^29.7.0:
|
||||||
version "29.7.0"
|
version "29.7.0"
|
||||||
resolved "https://registry.yarnpkg.com/expect/-/expect-29.7.0.tgz#578874590dcb3214514084c08115d8aee61e11bc"
|
resolved "https://registry.yarnpkg.com/expect/-/expect-29.7.0.tgz#578874590dcb3214514084c08115d8aee61e11bc"
|
||||||
integrity sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==
|
integrity sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==
|
||||||
|
@ -2240,6 +2269,11 @@ express@^4.18.2:
|
||||||
utils-merge "1.0.1"
|
utils-merge "1.0.1"
|
||||||
vary "~1.1.2"
|
vary "~1.1.2"
|
||||||
|
|
||||||
|
extend@^3.0.2:
|
||||||
|
version "3.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa"
|
||||||
|
integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==
|
||||||
|
|
||||||
external-editor@^3.0.3, external-editor@^3.1.0:
|
external-editor@^3.0.3, external-editor@^3.1.0:
|
||||||
version "3.1.0"
|
version "3.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495"
|
resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495"
|
||||||
|
@ -2424,6 +2458,24 @@ gauge@^4.0.3:
|
||||||
strip-ansi "^6.0.1"
|
strip-ansi "^6.0.1"
|
||||||
wide-align "^1.1.5"
|
wide-align "^1.1.5"
|
||||||
|
|
||||||
|
gaxios@^6.0.0, gaxios@^6.0.3:
|
||||||
|
version "6.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/gaxios/-/gaxios-6.1.0.tgz#8ab08adbf9cc600368a57545f58e004ccf831ccb"
|
||||||
|
integrity sha512-EIHuesZxNyIkUGcTQKQPMICyOpDD/bi+LJIJx+NLsSGmnS7N+xCLRX5bi4e9yAu9AlSZdVq+qlyWWVuTh/483w==
|
||||||
|
dependencies:
|
||||||
|
extend "^3.0.2"
|
||||||
|
https-proxy-agent "^7.0.1"
|
||||||
|
is-stream "^2.0.0"
|
||||||
|
node-fetch "^2.6.9"
|
||||||
|
|
||||||
|
gcp-metadata@^6.0.0:
|
||||||
|
version "6.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/gcp-metadata/-/gcp-metadata-6.0.0.tgz#2ae12008bef8caa8726cba31fd0a641ebad5fb56"
|
||||||
|
integrity sha512-Ozxyi23/1Ar51wjUT2RDklK+3HxqDr8TLBNK8rBBFQ7T85iIGnXnVusauj06QyqCXRFZig8LZC+TUddWbndlpQ==
|
||||||
|
dependencies:
|
||||||
|
gaxios "^6.0.0"
|
||||||
|
json-bigint "^1.0.0"
|
||||||
|
|
||||||
gensync@^1.0.0-beta.2:
|
gensync@^1.0.0-beta.2:
|
||||||
version "1.0.0-beta.2"
|
version "1.0.0-beta.2"
|
||||||
resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0"
|
resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0"
|
||||||
|
@ -2519,6 +2571,39 @@ globby@^13.1.2:
|
||||||
merge2 "^1.4.1"
|
merge2 "^1.4.1"
|
||||||
slash "^4.0.0"
|
slash "^4.0.0"
|
||||||
|
|
||||||
|
google-auth-library@^9.0.0:
|
||||||
|
version "9.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/google-auth-library/-/google-auth-library-9.0.0.tgz#b159d22464c679a6a25cb46d48a4ac97f9f426a2"
|
||||||
|
integrity sha512-IQGjgQoVUAfOk6khqTVMLvWx26R+yPw9uLyb1MNyMQpdKiKt0Fd9sp4NWoINjyGHR8S3iw12hMTYK7O8J07c6Q==
|
||||||
|
dependencies:
|
||||||
|
base64-js "^1.3.0"
|
||||||
|
ecdsa-sig-formatter "^1.0.11"
|
||||||
|
gaxios "^6.0.0"
|
||||||
|
gcp-metadata "^6.0.0"
|
||||||
|
gtoken "^7.0.0"
|
||||||
|
jws "^4.0.0"
|
||||||
|
lru-cache "^6.0.0"
|
||||||
|
|
||||||
|
googleapis-common@^7.0.0:
|
||||||
|
version "7.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/googleapis-common/-/googleapis-common-7.0.0.tgz#a7b5262e320c922c25b123edea2a3958f15c3edd"
|
||||||
|
integrity sha512-58iSybJPQZ8XZNMpjrklICefuOuyJ0lMxfKmBqmaC0/xGT4SiOs4BE60LAOOGtBURy1n8fHa2X2YUNFEWWbXyQ==
|
||||||
|
dependencies:
|
||||||
|
extend "^3.0.2"
|
||||||
|
gaxios "^6.0.3"
|
||||||
|
google-auth-library "^9.0.0"
|
||||||
|
qs "^6.7.0"
|
||||||
|
url-template "^2.0.8"
|
||||||
|
uuid "^9.0.0"
|
||||||
|
|
||||||
|
googleapis@^127.0.0:
|
||||||
|
version "127.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/googleapis/-/googleapis-127.0.0.tgz#466e723046eda45b83e4ae6e422e5d62b78ddf52"
|
||||||
|
integrity sha512-a27VnPktyqm+7TeWOAOV+iPL2fX2DJN0ueS/v9Zh5PN2PQI9sF/JxWGSeM5dAs5FBT+LI4oKcvCJS72AG9u9GQ==
|
||||||
|
dependencies:
|
||||||
|
google-auth-library "^9.0.0"
|
||||||
|
googleapis-common "^7.0.0"
|
||||||
|
|
||||||
got@^11.8.5:
|
got@^11.8.5:
|
||||||
version "11.8.6"
|
version "11.8.6"
|
||||||
resolved "https://registry.yarnpkg.com/got/-/got-11.8.6.tgz#276e827ead8772eddbcfc97170590b841823233a"
|
resolved "https://registry.yarnpkg.com/got/-/got-11.8.6.tgz#276e827ead8772eddbcfc97170590b841823233a"
|
||||||
|
@ -2563,6 +2648,14 @@ graceful-fs@^4.2.10, graceful-fs@^4.2.6, graceful-fs@^4.2.9:
|
||||||
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3"
|
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3"
|
||||||
integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==
|
integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==
|
||||||
|
|
||||||
|
gtoken@^7.0.0:
|
||||||
|
version "7.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/gtoken/-/gtoken-7.0.1.tgz#b64bd01d88268ea3a3572c9076a85d1c48f1a455"
|
||||||
|
integrity sha512-KcFVtoP1CVFtQu0aSk3AyAt2og66PFhZAlkUOuWKwzMLoulHXG5W5wE5xAnHb+yl3/wEFoqGW7/cDGMU8igDZQ==
|
||||||
|
dependencies:
|
||||||
|
gaxios "^6.0.0"
|
||||||
|
jws "^4.0.0"
|
||||||
|
|
||||||
has-ansi@^2.0.0:
|
has-ansi@^2.0.0:
|
||||||
version "2.0.0"
|
version "2.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91"
|
resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91"
|
||||||
|
@ -2678,6 +2771,14 @@ https-proxy-agent@^5.0.0:
|
||||||
agent-base "6"
|
agent-base "6"
|
||||||
debug "4"
|
debug "4"
|
||||||
|
|
||||||
|
https-proxy-agent@^7.0.1:
|
||||||
|
version "7.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-7.0.1.tgz#0277e28f13a07d45c663633841e20a40aaafe0ab"
|
||||||
|
integrity sha512-Eun8zV0kcYS1g19r78osiQLEFIRspRUDd9tIfBCTBPBeMieF/EsJNL8VI3xOIdYRDEkjQnqOYPsZ2DsWsVsFwQ==
|
||||||
|
dependencies:
|
||||||
|
agent-base "^7.0.2"
|
||||||
|
debug "4"
|
||||||
|
|
||||||
human-signals@^2.1.0:
|
human-signals@^2.1.0:
|
||||||
version "2.1.0"
|
version "2.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0"
|
resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0"
|
||||||
|
@ -3259,7 +3360,7 @@ jest-environment-node@^29.7.0:
|
||||||
jest-mock "^29.7.0"
|
jest-mock "^29.7.0"
|
||||||
jest-util "^29.7.0"
|
jest-util "^29.7.0"
|
||||||
|
|
||||||
jest-get-type@^29.6.3:
|
jest-get-type@^29.4.3, jest-get-type@^29.6.3:
|
||||||
version "29.6.3"
|
version "29.6.3"
|
||||||
resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-29.6.3.tgz#36f499fdcea197c1045a127319c0481723908fd1"
|
resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-29.6.3.tgz#36f499fdcea197c1045a127319c0481723908fd1"
|
||||||
integrity sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==
|
integrity sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==
|
||||||
|
@ -3291,7 +3392,7 @@ jest-leak-detector@^29.7.0:
|
||||||
jest-get-type "^29.6.3"
|
jest-get-type "^29.6.3"
|
||||||
pretty-format "^29.7.0"
|
pretty-format "^29.7.0"
|
||||||
|
|
||||||
jest-matcher-utils@^29.7.0:
|
jest-matcher-utils@^29.6.2, jest-matcher-utils@^29.7.0:
|
||||||
version "29.7.0"
|
version "29.7.0"
|
||||||
resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz#ae8fec79ff249fd592ce80e3ee474e83a6c44f12"
|
resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz#ae8fec79ff249fd592ce80e3ee474e83a6c44f12"
|
||||||
integrity sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==
|
integrity sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==
|
||||||
|
@ -3301,7 +3402,7 @@ jest-matcher-utils@^29.7.0:
|
||||||
jest-get-type "^29.6.3"
|
jest-get-type "^29.6.3"
|
||||||
pretty-format "^29.7.0"
|
pretty-format "^29.7.0"
|
||||||
|
|
||||||
jest-message-util@^29.7.0:
|
jest-message-util@^29.6.2, jest-message-util@^29.7.0:
|
||||||
version "29.7.0"
|
version "29.7.0"
|
||||||
resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-29.7.0.tgz#8bc392e204e95dfe7564abbe72a404e28e51f7f3"
|
resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-29.7.0.tgz#8bc392e204e95dfe7564abbe72a404e28e51f7f3"
|
||||||
integrity sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==
|
integrity sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==
|
||||||
|
@ -3458,7 +3559,7 @@ jest-util@^29.0.0:
|
||||||
graceful-fs "^4.2.9"
|
graceful-fs "^4.2.9"
|
||||||
picomatch "^2.2.3"
|
picomatch "^2.2.3"
|
||||||
|
|
||||||
jest-util@^29.7.0:
|
jest-util@^29.6.2, jest-util@^29.7.0:
|
||||||
version "29.7.0"
|
version "29.7.0"
|
||||||
resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.7.0.tgz#23c2b62bfb22be82b44de98055802ff3710fc0bc"
|
resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.7.0.tgz#23c2b62bfb22be82b44de98055802ff3710fc0bc"
|
||||||
integrity sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==
|
integrity sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==
|
||||||
|
@ -3541,6 +3642,13 @@ jsesc@^2.5.1:
|
||||||
resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4"
|
resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4"
|
||||||
integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==
|
integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==
|
||||||
|
|
||||||
|
json-bigint@^1.0.0:
|
||||||
|
version "1.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/json-bigint/-/json-bigint-1.0.0.tgz#ae547823ac0cad8398667f8cd9ef4730f5b01ff1"
|
||||||
|
integrity sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==
|
||||||
|
dependencies:
|
||||||
|
bignumber.js "^9.0.0"
|
||||||
|
|
||||||
json-buffer@3.0.1:
|
json-buffer@3.0.1:
|
||||||
version "3.0.1"
|
version "3.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13"
|
resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13"
|
||||||
|
@ -3556,6 +3664,23 @@ json5@^2.2.3:
|
||||||
resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283"
|
resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283"
|
||||||
integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==
|
integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==
|
||||||
|
|
||||||
|
jwa@^2.0.0:
|
||||||
|
version "2.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/jwa/-/jwa-2.0.0.tgz#a7e9c3f29dae94027ebcaf49975c9345593410fc"
|
||||||
|
integrity sha512-jrZ2Qx916EA+fq9cEAeCROWPTfCwi1IVHqT2tapuqLEVVDKFDENFw1oL+MwrTvH6msKxsd1YTDVw6uKEcsrLEA==
|
||||||
|
dependencies:
|
||||||
|
buffer-equal-constant-time "1.0.1"
|
||||||
|
ecdsa-sig-formatter "1.0.11"
|
||||||
|
safe-buffer "^5.0.1"
|
||||||
|
|
||||||
|
jws@^4.0.0:
|
||||||
|
version "4.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/jws/-/jws-4.0.0.tgz#2d4e8cf6a318ffaa12615e9dec7e86e6c97310f4"
|
||||||
|
integrity sha512-KDncfTmOZoOMTFG4mBlG0qUIOlc03fmzH+ru6RgYVZhPkyiy/92Owlt/8UEN+a4TXR1FQetfIpJE8ApdvdVxTg==
|
||||||
|
dependencies:
|
||||||
|
jwa "^2.0.0"
|
||||||
|
safe-buffer "^5.0.1"
|
||||||
|
|
||||||
keyv@^4.0.0, keyv@^4.5.3:
|
keyv@^4.0.0, keyv@^4.5.3:
|
||||||
version "4.5.3"
|
version "4.5.3"
|
||||||
resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.3.tgz#00873d2b046df737963157bd04f294ca818c9c25"
|
resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.3.tgz#00873d2b046df737963157bd04f294ca818c9c25"
|
||||||
|
@ -4057,6 +4182,13 @@ node-fetch@^2.6.7:
|
||||||
dependencies:
|
dependencies:
|
||||||
whatwg-url "^5.0.0"
|
whatwg-url "^5.0.0"
|
||||||
|
|
||||||
|
node-fetch@^2.6.9:
|
||||||
|
version "2.6.13"
|
||||||
|
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.13.tgz#a20acbbec73c2e09f9007de5cda17104122e0010"
|
||||||
|
integrity sha512-StxNAxh15zr77QvvkmveSQ8uCQ4+v5FkvNTj0OESmiHu+VRi/gXArXtkWMElOsOUNLtUEvI4yS+rdtOHZTwlQA==
|
||||||
|
dependencies:
|
||||||
|
whatwg-url "^5.0.0"
|
||||||
|
|
||||||
node-gyp@8.x:
|
node-gyp@8.x:
|
||||||
version "8.4.1"
|
version "8.4.1"
|
||||||
resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-8.4.1.tgz#3d49308fc31f768180957d6b5746845fbd429937"
|
resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-8.4.1.tgz#3d49308fc31f768180957d6b5746845fbd429937"
|
||||||
|
@ -4614,6 +4746,13 @@ qs@6.11.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
side-channel "^1.0.4"
|
side-channel "^1.0.4"
|
||||||
|
|
||||||
|
qs@^6.7.0:
|
||||||
|
version "6.11.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.2.tgz#64bea51f12c1f5da1bc01496f48ffcff7c69d7d9"
|
||||||
|
integrity sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA==
|
||||||
|
dependencies:
|
||||||
|
side-channel "^1.0.4"
|
||||||
|
|
||||||
queue-microtask@^1.2.2:
|
queue-microtask@^1.2.2:
|
||||||
version "1.2.3"
|
version "1.2.3"
|
||||||
resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243"
|
resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243"
|
||||||
|
@ -5552,6 +5691,11 @@ update-notifier@^6.0.2:
|
||||||
semver-diff "^4.0.0"
|
semver-diff "^4.0.0"
|
||||||
xdg-basedir "^5.1.0"
|
xdg-basedir "^5.1.0"
|
||||||
|
|
||||||
|
url-template@^2.0.8:
|
||||||
|
version "2.0.8"
|
||||||
|
resolved "https://registry.yarnpkg.com/url-template/-/url-template-2.0.8.tgz#fc565a3cccbff7730c775f5641f9555791439f21"
|
||||||
|
integrity sha512-XdVKMF4SJ0nP/O7XIPB0JwAEuT9lDIYnNsK8yGVe43y0AWoKeJNdv3ZNWh7ksJ6KqQFjOO6ox/VEitLnaVNufw==
|
||||||
|
|
||||||
util-deprecate@^1.0.1, util-deprecate@~1.0.1:
|
util-deprecate@^1.0.1, util-deprecate@~1.0.1:
|
||||||
version "1.0.2"
|
version "1.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
|
resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
|
||||||
|
|
Loading…
Reference in a new issue