Make the app more modular because why not
All checks were successful
continuous-integration/drone/push Build is passing

Signed-off-by: Sam Therapy <sam@samtherapy.net>
This commit is contained in:
Sam Therapy 2022-02-27 20:47:47 -06:00
parent 4bd7e439b8
commit 9e31c4edff
Signed by: sam
GPG key ID: 4D8B07C18F31ACBD
7 changed files with 280 additions and 256 deletions

View file

@ -6,15 +6,20 @@
"typescript": "^4.5.5"
},
"name": "fediverse-imagebot",
"version": "1.0.0",
"version": "1.1.0",
"description": "Image bot for the fediverse (Pleroma, Mastodon, Misskey)",
"main": "dist/local.js",
"bin": "dist/local.js",
"pkg": {
"scripts": "build/**/*.js",
"targets": ["node16-linux-x64","node16-macos-x64","node16-win-x64"]
},
"scripts": {
"build": "yarn run clean && tsc",
"clean": "rm -rf dist",
"lint": "eslint --ext .ts src",
"local": "node ./dist/local.js",
"package": "pkg dist/*.js -t node16-linux-x64,node16-macos-x64,node16-win-x64 -o dist/imagebot-x64 -C Gzip",
"package": "pkg . -o dist/imagebot-x64 -C Gzip",
"test": "echo \"No tests yet!\" && exit 0"
},
"repository": "https://git.froth.zone/Sam/fediverse-imagebot",
@ -29,4 +34,4 @@
"eslint": "^8.9.0",
"pkg": "^5.5.2"
}
}
}

69
src/helpers/cli.ts Normal file
View file

@ -0,0 +1,69 @@
import commandLineArgs from "command-line-args";
import commandLineUsage from "command-line-usage";
import { exit } from "process";
const optionDefinitions = [
{
name: "help",
type: Boolean,
alias: "h",
description: "Print this usage guide."
},
{
name: "verbose",
type: Boolean,
alias: "v",
description: "Print debugging output."
},
{
name: "config",
type: String,
alias: "c",
description: "Path to the JSON configuration file. (default: ./config.json)",
defaultValue: "./config.json",
typeLabel: "<file.json>"
},
{
name: "directory",
type: String,
alias: "d",
description: "The directory of images to upload. (default: ./images)",
defaultValue: "./images",
typeLabel: "<folder>"
},
{
name: "message",
type: String,
alias: "m",
description: "The message to post with the image.",
defaultValue: "",
typeLabel: "<message>"
}
];
const args = commandLineArgs(optionDefinitions);
if (args.help) {
const usage = commandLineUsage([
{
header: "Fediverse Image Bot",
content: "A bot that posts images from a local directory to the Fediverse."
},
{
header: "Options",
optionList: optionDefinitions
},
{
content: "Project home: {underline https://git.froth.zone/Sam/fediverse-imagebot}"
}
]);
console.log(usage);
exit(0);
}
if (args.verbose) {
console.log("Running in verbose mode.\n");
}
export default args;

20
src/helpers/config.ts Normal file
View file

@ -0,0 +1,20 @@
import args from "./cli";
import crashHandler from "./errors";
import { readFile } from "fs/promises";
// Read the config file and return the contents as a JSON object
export default async function config() {
try {
return JSON.parse(
await readFile(args.config, "utf8")
.catch(err => {
crashHandler("Error reading config file.", err);
return ("");
})
);
}
catch (e: unknown) {
crashHandler("Error reading config file.", e);
}
}

13
src/helpers/errors.ts Normal file
View file

@ -0,0 +1,13 @@
import { exit } from "process";
import args from "./cli";
// Boilerplate for the event any error occurs
export default function crashHandler(msg: string, e: Error | unknown) {
console.error(msg);
if (args.verbose) {
console.error(`--BEGIN FULL ERROR--\n${e}\n--END FULL ERROR--`);
} else
console.error("Run with -v to see the full error.");
exit(1);
}

View file

@ -1,174 +1,53 @@
#!/usr/bin/env node
import commandLineArgs from "command-line-args";
import commandLineUsage from "command-line-usage";
import * as fs from "fs";
import generator, { Entity, Response } from "megalodon";
import { createReadStream, ReadStream } from "fs";
import { readdir } from "fs/promises";
import { exit } from "process";
import args from "./helpers/cli";
import crashHandler from "./helpers/errors";
import post from "./post";
export default async function getLocalImage() {
const sfw_files: string[] = await readdir(`${args.directory}/sfw`).catch(e => {
crashHandler("Error reading SFW image directory.", e);
return [];
});
const nsfw_files: string[] = await readdir(`${args.directory}/nsfw`).catch(e => {
crashHandler("Error reading NSFW image directory.", e);
return [];
});
const random = Math.floor(Math.random() * (sfw_files.length + nsfw_files.length));
const optionDefinitions = [
{
name: "help",
type: Boolean,
alias: "h",
description: "Print this usage guide."
},
{
name: "verbose",
type: Boolean,
alias: "v",
description: "Print debugging output."
},
{
name: "config",
type: String,
alias: "c",
description: "Path to the JSON configuration file. (default: ./config.json)",
defaultValue: "./config.json",
typeLabel: "<file.json>"
},
{
name: "directory",
type: String,
alias: "d",
description: "The directory of images to upload. (default: ./images)",
defaultValue: "./images",
typeLabel: "<folder>"
},
{
name: "message",
type: String,
alias: "m",
description: "The message to post with the image.",
defaultValue: "",
typeLabel: "<message>"
// Filler that is used to get a random file from the directories
let image: ReadStream;
let sensitivity: boolean;
let file = "";
if (random >= sfw_files.length) {
// Image is NSFW, mark it sensitive
file = `${args.directory}/nsfw/${nsfw_files[ random - sfw_files.length ]}`;
image = createReadStream(file)
.on("error", (err: Error) => {
crashHandler(`Error reading file "${file}"`, err);
});
sensitivity = true;
}
else {
// Image is SFW, mark it not sensitive
file = `${args.directory}/sfw/${sfw_files[ random]}`;
image = createReadStream(file)
.on("error", (err: Error) => {
crashHandler(`Error reading file "${file}"`, err);
});
sensitivity = false;
}
];
const args = commandLineArgs(optionDefinitions);
if (args.verbose) {
console.error(`File being sent: ${file}`);
console.error(`Sensitivity: ${sensitivity}`);
}
if (args.help) {
const usage = commandLineUsage([
{
header: "Fediverse Image Bot",
content: "A bot that posts images from a directory to the Fediverse."
},
{
header: "Options",
optionList: optionDefinitions
},
{
content: "Project home: {underline https://git.froth.zone/Sam/fediverse-imagebot}"
}
]);
console.log(usage);
await post(image, sensitivity);
exit(0);
}
if (args.verbose) {
console.log("Running in verbose mode.");
console.log();
}
// JSON object read from config file
let config: {
instance: string,
type: "misskey" | "mastodon" | "pleroma",
accessToken: string,
refreshToken: string | null
};
try {
config = JSON.parse(fs.readFileSync(args.config, "utf8"));
if (args.verbose) {
console.log(`Config: ${JSON.stringify(config)}`);
}
}
catch (e: unknown) {
console.error(`Error reading config file: ${e}`);
exit(1);
}
let sfw_files: string[] = [];
try {
sfw_files = fs.readdirSync(args.directory + "/sfw");
}
catch (e: unknown) {
console.error(`Error reading SFW image directory: ${e}`);
exit(1);
}
let nsfw_files: string[] = [];
try {
nsfw_files = fs.readdirSync(args.directory + "/nsfw");
}
catch (e: unknown) {
console.error(`Error reading NSFW image directory: ${e}`);
exit(1);
}
const random = Math.floor(Math.random() * (sfw_files.length + nsfw_files.length));
// Get image from directory and mark it as sensitive if it's in the nsfw directory
let image: fs.ReadStream;
let sensitivity: boolean;
if (random >= sfw_files.length) {
// Image is NSFW, mark it sensitive
image = fs.createReadStream(args.directory + "/nsfw/" + nsfw_files[ random - sfw_files.length ])
.on("error", (err: Error) => {
console.error("Error reading image from NSFW directory: " + err.message);
if (args.verbose) {
console.error("--BEGIN FULL ERROR--");
console.error(err);
} else
console.error("Run with -v to see the full error.");
exit(1);
});
sensitivity = true;
}
else {
// Image is SFW, mark it not sensitive
image = fs.createReadStream(args.directory + "/sfw/" + sfw_files[ random ])
.on("error", (err: Error) => {
console.error("Error reading image from SFW directory:" + err.message);
if (args.verbose) {
console.error("--BEGIN FULL ERROR--");
console.error(err);
} else
console.error("Run with -v to see the full error.");
exit(1);
});
sensitivity = false;
}
const client = generator(config.type, config.instance, config.accessToken);
client.uploadMedia(image).then((res: Response<Entity.Attachment>) => {
if (args.verbose)
console.log(res.data);
client.postStatus(args.message, {
media_ids: [ res.data.id ],
visibility: "unlisted",
sensitive: sensitivity
}
).then((res: Response<Entity.Status>) => {
console.log("Successfully posted to " + config.instance);
if (args.verbose)
console.log(res.data);
exit(0);
}
).catch((err: Error) => {
console.error("Error posting to " + config.instance + ": " + err.message);
if (args.verbose) {
console.error("--BEGIN FULL ERROR--");
console.error(err);
} else
console.error("Run with -v to see the full error.");
});
}).catch((err: Error) => {
console.error("Error uploading image to " + config.instance + ": " + err.message);
if (args.verbose) {
console.error("--BEGIN FULL ERROR--");
console.error(err);
} else
console.error("Run with -v to see the full error.");
exit(1);
});
getLocalImage();

43
src/post.ts Normal file
View file

@ -0,0 +1,43 @@
import { ReadStream } from "fs";
import generator, { Entity, Response } from "megalodon";
import config from "./helpers/config";
import crashHandler from "./helpers/errors";
import args from "./helpers/cli";
// Uploads an image to the Fediverse
// image: The image to upload
// sensitivity: Whether or not the image is sensitive
export default async function post(image: ReadStream, sensitivity: boolean) {
// Get config
const cfg: {
instance: string,
type: "misskey" | "mastodon" | "pleroma",
accessToken: string,
refreshToken: string | null
} = await config();
// Make a client to upload
const client = generator(cfg.type, cfg.instance, cfg.accessToken, cfg.refreshToken);
// Upload the image
const res: Response<Entity.Attachment> = await client.uploadMedia(image).catch(err => {
crashHandler("Error uploading image.", err);
return ({} as Response<Entity.Attachment>);
});
// Make a status with the image
await client.postStatus(args.message,
{
media_ids: [ res.data.id ],
// Change this to make the post visibility you wish
visibility: "unlisted",
sensitive: sensitivity
}
).catch(err => {
crashHandler("Error posting status.", err);
});
if (args.verbose)
console.log(`Successfully posted to ${cfg.instance}`);
return;
}

173
yarn.lock
View file

@ -20,10 +20,10 @@
"@babel/helper-validator-identifier" "^7.15.7"
to-fast-properties "^2.0.0"
"@eslint/eslintrc@^1.1.0":
version "1.1.0"
resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.1.0.tgz#583d12dbec5d4f22f333f9669f7d0b7c7815b4d3"
integrity sha512-C1DfL7XX4nPqGd6jcP01W9pVM1HYCuUkFk1432D7F0v3JSlUIeOYn9oCoi3eoLZ+iwBSb29BMFxxny0YrrEZqg==
"@eslint/eslintrc@^1.2.0":
version "1.2.0"
resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.2.0.tgz#7ce1547a5c46dfe56e1e45c3c9ed18038c721c6a"
integrity sha512-igm9SjJHNEJRiUnecP/1R5T3wKLEJ7pL6e2P+GUSfCd0dGjPYYZve08uzw8L2J8foVHFz+NGu12JxRcU2gGo6w==
dependencies:
ajv "^6.12.4"
debug "^4.3.2"
@ -36,9 +36,9 @@
strip-json-comments "^3.1.1"
"@humanwhocodes/config-array@^0.9.2":
version "0.9.3"
resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.9.3.tgz#f2564c744b387775b436418491f15fce6601f63e"
integrity sha512-3xSMlXHh03hCcCmFc0rbKp3Ivt2PFEJnQUJDDMTJQ2wkECZWdq4GePs2ctc5H8zV+cHPaq8k2vU8mrQjA6iHdQ==
version "0.9.5"
resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.9.5.tgz#2cbaf9a89460da24b5ca6531b8bbfc23e1df50c7"
integrity sha512-ObyMyWxZiCu/yTisA7uzx81s40xR2fD5Cg/2Kq7G02ajkNubJf6BopgDTmDyc3U7sXpNKM8cYOw7s7Tyr+DnCw==
dependencies:
"@humanwhocodes/object-schema" "^1.2.1"
debug "^4.1.1"
@ -86,9 +86,9 @@
integrity sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==
"@types/node@*", "@types/node@^17.0.18":
version "17.0.18"
resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.18.tgz#3b4fed5cfb58010e3a2be4b6e74615e4847f1074"
integrity sha512-eKj4f/BsN/qcculZiRSujogjvp5O/k4lOW5m35NopjZM/QwLOR075a8pJW5hD+Rtdm2DaCVPENS6KtSQnUD6BA==
version "17.0.21"
resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.21.tgz#864b987c0c68d07b4345845c3e63b75edd143644"
integrity sha512-DBZCJbhII3r90XbQxI8Y9IjjiiOGlZ0Hr32omXIZvwwZ7p4DMMXGrKXVyPfuoBOri9XNtL0UK69jYIBIsRX3QQ==
"@types/oauth@^0.9.0":
version "0.9.1"
@ -97,21 +97,21 @@
dependencies:
"@types/node" "*"
"@types/ws@^8.2.0":
version "8.2.2"
resolved "https://registry.yarnpkg.com/@types/ws/-/ws-8.2.2.tgz#7c5be4decb19500ae6b3d563043cd407bf366c21"
integrity sha512-NOn5eIcgWLOo6qW8AcuLZ7G8PycXu0xTxxkS6Q18VWFxgPUSOwV0pBj2a/4viNZVu25i7RIB7GttdkAIUUXOOg==
"@types/ws@^8.2.3":
version "8.5.1"
resolved "https://registry.yarnpkg.com/@types/ws/-/ws-8.5.1.tgz#79136958b48bc73d5165f286707ceb9f04471599"
integrity sha512-UxlLOfkuQnT2YSBCNq0x86SGOUxas6gAySFeDe2DcnEnA8655UIPoCDorWZCugcvKIL8IUI4oueUfJ1hhZSE2A==
dependencies:
"@types/node" "*"
"@typescript-eslint/eslint-plugin@^5.12.0":
version "5.12.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.12.0.tgz#bb46dd7ce7015c0928b98af1e602118e97df6c70"
integrity sha512-fwCMkDimwHVeIOKeBHiZhRUfJXU8n6xW1FL9diDxAyGAFvKcH4csy0v7twivOQdQdA0KC8TDr7GGRd3L4Lv0rQ==
version "5.12.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.12.1.tgz#b2cd3e288f250ce8332d5035a2ff65aba3374ac4"
integrity sha512-M499lqa8rnNK7mUv74lSFFttuUsubIRdAbHcVaP93oFcKkEmHmLqy2n7jM9C8DVmFMYK61ExrZU6dLYhQZmUpw==
dependencies:
"@typescript-eslint/scope-manager" "5.12.0"
"@typescript-eslint/type-utils" "5.12.0"
"@typescript-eslint/utils" "5.12.0"
"@typescript-eslint/scope-manager" "5.12.1"
"@typescript-eslint/type-utils" "5.12.1"
"@typescript-eslint/utils" "5.12.1"
debug "^4.3.2"
functional-red-black-tree "^1.0.1"
ignore "^5.1.8"
@ -120,68 +120,68 @@
tsutils "^3.21.0"
"@typescript-eslint/parser@^5.12.0":
version "5.12.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.12.0.tgz#0ca669861813df99ce54916f66f524c625ed2434"
integrity sha512-MfSwg9JMBojMUoGjUmX+D2stoQj1CBYTCP0qnnVtu9A+YQXVKNtLjasYh+jozOcrb/wau8TCfWOkQTiOAruBog==
version "5.12.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.12.1.tgz#b090289b553b8aa0899740d799d0f96e6f49771b"
integrity sha512-6LuVUbe7oSdHxUWoX/m40Ni8gsZMKCi31rlawBHt7VtW15iHzjbpj2WLiToG2758KjtCCiLRKZqfrOdl3cNKuw==
dependencies:
"@typescript-eslint/scope-manager" "5.12.0"
"@typescript-eslint/types" "5.12.0"
"@typescript-eslint/typescript-estree" "5.12.0"
"@typescript-eslint/scope-manager" "5.12.1"
"@typescript-eslint/types" "5.12.1"
"@typescript-eslint/typescript-estree" "5.12.1"
debug "^4.3.2"
"@typescript-eslint/scope-manager@5.12.0":
version "5.12.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.12.0.tgz#59619e6e5e2b1ce6cb3948b56014d3a24da83f5e"
integrity sha512-GAMobtIJI8FGf1sLlUWNUm2IOkIjvn7laFWyRx7CLrv6nLBI7su+B7lbStqVlK5NdLvHRFiJo2HhiDF7Ki01WQ==
"@typescript-eslint/scope-manager@5.12.1":
version "5.12.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.12.1.tgz#58734fd45d2d1dec49641aacc075fba5f0968817"
integrity sha512-J0Wrh5xS6XNkd4TkOosxdpObzlYfXjAFIm9QxYLCPOcHVv1FyyFCPom66uIh8uBr0sZCrtS+n19tzufhwab8ZQ==
dependencies:
"@typescript-eslint/types" "5.12.0"
"@typescript-eslint/visitor-keys" "5.12.0"
"@typescript-eslint/types" "5.12.1"
"@typescript-eslint/visitor-keys" "5.12.1"
"@typescript-eslint/type-utils@5.12.0":
version "5.12.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.12.0.tgz#aaf45765de71c6d9707c66ccff76ec2b9aa31bb6"
integrity sha512-9j9rli3zEBV+ae7rlbBOotJcI6zfc6SHFMdKI9M3Nc0sy458LJ79Os+TPWeBBL96J9/e36rdJOfCuyRSgFAA0Q==
"@typescript-eslint/type-utils@5.12.1":
version "5.12.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.12.1.tgz#8d58c6a0bb176b5e9a91581cda1a7f91a114d3f0"
integrity sha512-Gh8feEhsNLeCz6aYqynh61Vsdy+tiNNkQtc+bN3IvQvRqHkXGUhYkUi+ePKzP0Mb42se7FDb+y2SypTbpbR/Sg==
dependencies:
"@typescript-eslint/utils" "5.12.0"
"@typescript-eslint/utils" "5.12.1"
debug "^4.3.2"
tsutils "^3.21.0"
"@typescript-eslint/types@5.12.0":
version "5.12.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.12.0.tgz#5b4030a28222ee01e851836562c07769eecda0b8"
integrity sha512-JowqbwPf93nvf8fZn5XrPGFBdIK8+yx5UEGs2QFAYFI8IWYfrzz+6zqlurGr2ctShMaJxqwsqmra3WXWjH1nRQ==
"@typescript-eslint/types@5.12.1":
version "5.12.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.12.1.tgz#46a36a28ff4d946821b58fe5a73c81dc2e12aa89"
integrity sha512-hfcbq4qVOHV1YRdhkDldhV9NpmmAu2vp6wuFODL71Y0Ixak+FLeEU4rnPxgmZMnGreGEghlEucs9UZn5KOfHJA==
"@typescript-eslint/typescript-estree@5.12.0":
version "5.12.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.12.0.tgz#cabf545fd592722f0e2b4104711e63bf89525cd2"
integrity sha512-Dd9gVeOqt38QHR0BEA8oRaT65WYqPYbIc5tRFQPkfLquVEFPD1HAtbZT98TLBkEcCkvwDYOAvuSvAD9DnQhMfQ==
"@typescript-eslint/typescript-estree@5.12.1":
version "5.12.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.12.1.tgz#6a9425b9c305bcbc38e2d1d9a24c08e15e02b722"
integrity sha512-ahOdkIY9Mgbza7L9sIi205Pe1inCkZWAHE1TV1bpxlU4RZNPtXaDZfiiFWcL9jdxvW1hDYZJXrFm+vlMkXRbBw==
dependencies:
"@typescript-eslint/types" "5.12.0"
"@typescript-eslint/visitor-keys" "5.12.0"
"@typescript-eslint/types" "5.12.1"
"@typescript-eslint/visitor-keys" "5.12.1"
debug "^4.3.2"
globby "^11.0.4"
is-glob "^4.0.3"
semver "^7.3.5"
tsutils "^3.21.0"
"@typescript-eslint/utils@5.12.0":
version "5.12.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.12.0.tgz#92fd3193191621ab863add2f553a7b38b65646af"
integrity sha512-k4J2WovnMPGI4PzKgDtQdNrCnmBHpMUFy21qjX2CoPdoBcSBIMvVBr9P2YDP8jOqZOeK3ThOL6VO/sy6jtnvzw==
"@typescript-eslint/utils@5.12.1":
version "5.12.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.12.1.tgz#447c24a05d9c33f9c6c64cb48f251f2371eef920"
integrity sha512-Qq9FIuU0EVEsi8fS6pG+uurbhNTtoYr4fq8tKjBupsK5Bgbk2I32UGm0Sh+WOyjOPgo/5URbxxSNV6HYsxV4MQ==
dependencies:
"@types/json-schema" "^7.0.9"
"@typescript-eslint/scope-manager" "5.12.0"
"@typescript-eslint/types" "5.12.0"
"@typescript-eslint/typescript-estree" "5.12.0"
"@typescript-eslint/scope-manager" "5.12.1"
"@typescript-eslint/types" "5.12.1"
"@typescript-eslint/typescript-estree" "5.12.1"
eslint-scope "^5.1.1"
eslint-utils "^3.0.0"
"@typescript-eslint/visitor-keys@5.12.0":
version "5.12.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.12.0.tgz#1ac9352ed140b07ba144ebf371b743fdf537ec16"
integrity sha512-cFwTlgnMV6TgezQynx2c/4/tx9Tufbuo9LPzmWqyRC3QC4qTGkAG1C6pBr0/4I10PAI/FlYunI3vJjIcu+ZHMg==
"@typescript-eslint/visitor-keys@5.12.1":
version "5.12.1"
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.12.1.tgz#f722da106c8f9695ae5640574225e45af3e52ec3"
integrity sha512-l1KSLfupuwrXx6wc0AuOmC7Ko5g14ZOQ86wJJqRbdLbXLK02pK/DPiDDqCc7BqqiiA04/eAA6ayL0bgOrAkH7A==
dependencies:
"@typescript-eslint/types" "5.12.0"
"@typescript-eslint/types" "5.12.1"
eslint-visitor-keys "^3.0.0"
acorn-jsx@^5.3.1:
@ -278,12 +278,12 @@ at-least-node@^1.0.0:
resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2"
integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==
axios@^0.24.0:
version "0.24.0"
resolved "https://registry.yarnpkg.com/axios/-/axios-0.24.0.tgz#804e6fa1e4b9c5288501dd9dff56a7a0940d20d6"
integrity sha512-Q6cWsys88HoPgAaFAVUb0WpPk0O8iTeisR9IMqy9G8AbO4NlpVknrnQS03zzF9PGAWgO3cgletO3VjV/P7VztA==
axios@^0.26.0:
version "0.26.0"
resolved "https://registry.yarnpkg.com/axios/-/axios-0.26.0.tgz#9a318f1c69ec108f8cd5f3c3d390366635e13928"
integrity sha512-lKoGLMYtHvFrPVt3r+RBMp9nh34N0M8zEfCWqdWZx6phynIEhQqAdydpyBAAG211zlhX9Rgu08cOamy6XjE5Og==
dependencies:
follow-redirects "^1.14.4"
follow-redirects "^1.14.8"
balanced-match@^1.0.0:
version "1.0.2"
@ -574,11 +574,11 @@ eslint-visitor-keys@^3.0.0, eslint-visitor-keys@^3.3.0:
integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==
eslint@^8.9.0:
version "8.9.0"
resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.9.0.tgz#a2a8227a99599adc4342fd9b854cb8d8d6412fdb"
integrity sha512-PB09IGwv4F4b0/atrbcMFboF/giawbBLVC7fyDamk5Wtey4Jh2K+rYaBhCAbUyEI4QzB1ly09Uglc9iCtFaG2Q==
version "8.10.0"
resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.10.0.tgz#931be395eb60f900c01658b278e05b6dae47199d"
integrity sha512-tcI1D9lfVec+R4LE1mNDnzoJ/f71Kl/9Cv4nG47jOueCMBrCCKYXr4AUVS7go6mWYGFD4+EoN6+eXSrEbRzXVw==
dependencies:
"@eslint/eslintrc" "^1.1.0"
"@eslint/eslintrc" "^1.2.0"
"@humanwhocodes/config-array" "^0.9.2"
ajv "^6.10.0"
chalk "^4.0.0"
@ -729,10 +729,10 @@ flatted@^3.1.0:
resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.5.tgz#76c8584f4fc843db64702a6bd04ab7a8bd666da3"
integrity sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg==
follow-redirects@^1.14.4:
version "1.14.8"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.8.tgz#016996fb9a11a100566398b1c6839337d7bfa8fc"
integrity sha512-1x0S9UVJHsQprFcEC/qnNzBLcIxsjAV905f/UkQxbclCsoTWlacCNOpQa/anodLl2uaEKFhfWOvM2Qg77+15zA==
follow-redirects@^1.14.8:
version "1.14.9"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.9.tgz#dd4ea157de7bfaf9ea9b3fbd85aa16951f78d8d7"
integrity sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w==
form-data@^4.0.0:
version "4.0.0"
@ -1050,22 +1050,22 @@ lru-cache@^6.0.0:
yallist "^4.0.0"
megalodon@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/megalodon/-/megalodon-4.0.0.tgz#d30dafbd0dce00174e85de3c8f6ff0b2c9629557"
integrity sha512-5SIRKJCBWArU9EzedAjZa8OnW+UCWSnUiWHGSr+3AeugzRIFRwxxuyMaw6BbaWz+6B9ER29DTU+P8m8VktjP6g==
version "4.0.1"
resolved "https://registry.yarnpkg.com/megalodon/-/megalodon-4.0.1.tgz#b04dc6ab2279e21faa3691f5f7b38639e4c61c19"
integrity sha512-szX0kSjWJviYJkOFFD5TsGaDI9bosFetgRvS7PCOEUGZfyTGGgRYwtGjE+9nbqnFHXoRs0OxDp9+qFxk4i4mrg==
dependencies:
"@types/oauth" "^0.9.0"
"@types/ws" "^8.2.0"
axios "^0.24.0"
"@types/ws" "^8.2.3"
axios "^0.26.0"
dayjs "^1.10.4"
form-data "^4.0.0"
https-proxy-agent "^5.0.0"
oauth "^0.9.15"
object-assign-deep "^0.4.0"
socks-proxy-agent "^6.1.0"
typescript "4.5.4"
typescript "4.5.5"
uuid "^8.0.0"
ws "8.4.0"
ws "8.5.0"
merge2@^1.3.0, merge2@^1.4.1:
version "1.4.1"
@ -1689,12 +1689,7 @@ type-fest@^0.20.2:
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4"
integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==
typescript@4.5.4:
version "4.5.4"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.5.4.tgz#a17d3a0263bf5c8723b9c52f43c5084edf13c2e8"
integrity sha512-VgYs2A2QIRuGphtzFV7aQJduJ2gyfTljngLzjpfW9FoYZF6xuw1W0vW9ghCKLfcWrCFxK81CSGRAvS1pn4fIUg==
typescript@^4.5.5:
typescript@4.5.5, typescript@^4.5.5:
version "4.5.5"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.5.5.tgz#d8c953832d28924a9e3d37c73d729c846c5896f3"
integrity sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==
@ -1790,10 +1785,10 @@ wrappy@1:
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=
ws@8.4.0:
version "8.4.0"
resolved "https://registry.yarnpkg.com/ws/-/ws-8.4.0.tgz#f05e982a0a88c604080e8581576e2a063802bed6"
integrity sha512-IHVsKe2pjajSUIl4KYMQOdlyliovpEPquKkqbwswulszzI7r0SfQrxnXdWAEqOlDCLrVSJzo+O1hAwdog2sKSQ==
ws@8.5.0:
version "8.5.0"
resolved "https://registry.yarnpkg.com/ws/-/ws-8.5.0.tgz#bfb4be96600757fe5382de12c670dab984a1ed4f"
integrity sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==
y18n@^5.0.5:
version "5.0.8"