From 987506822860a945ae89605b480bd7cd21260580 Mon Sep 17 00:00:00 2001 From: Strencher <46447572+Strencher@users.noreply.github.com> Date: Thu, 29 Dec 2022 23:27:52 +0100 Subject: [PATCH 01/15] Add webpack aliases. --- renderer/src/modules/api/webpack.js | 106 ++++++++++++++++++++++++- renderer/src/modules/webpackmodules.js | 39 ++++++++- 2 files changed, 143 insertions(+), 2 deletions(-) diff --git a/renderer/src/modules/api/webpack.js b/renderer/src/modules/api/webpack.js index 6abf86f1..cc553f30 100644 --- a/renderer/src/modules/api/webpack.js +++ b/renderer/src/modules/api/webpack.js @@ -9,6 +9,10 @@ import WebpackModules, {Filters} from "../webpackmodules"; * @name Webpack */ const Webpack = { + /** + * A Proxy that returns the module source by ID. + */ + modules: WebpackModules.modules, /** * Series of {@link Filters} to be used for finding webpack modules. @@ -60,6 +64,22 @@ const Webpack = { combine(...filters) {return Filters.combine(...filters);}, }, + /** + * Searches for a module by value, returns module & matched key. Useful in combination with the Patcher. + * @param {(value: any, index: number, array: any[]) => boolean} filter A function to use to filter the module + * @param {object} [options] Set of options to customize the search + * @param {any} [options.target=null] Optional module target to look inside. + * @param {Boolean} [options.defaultExport=true] Whether to return default export when matching the default export + * @param {Boolean} [options.searchExports=false] Whether to execute the filter on webpack export getters. + * @return {[Any, string]} + */ + getMangled(filter, options = {}) { + if (("first" in options)) return Logger.error("BdApi.Webpack~getModule", "Unsupported option first."); + if (("defaultExport" in options) && typeof(options.defaultExport) !== "boolean") return Logger.error("BdApi.Webpack~getModule", "Unsupported type used for options.defaultExport", options.defaultExport, "boolean expected."); + if (("searchExports" in options) && typeof(options.searchExports) !== "boolean") return Logger.error("BdApi.Webpack~getModule", "Unsupported type used for options.searchExports", options.searchExports, "boolean expected."); + return WebpackModules.getMangled(filter, options); + }, + /** * Finds a module using a filter function. * @memberof Webpack @@ -105,9 +125,93 @@ const Webpack = { if (("searchExports" in options) && typeof(options.searchExports) !== "boolean") return Logger.error("BdApi.Webpack~getModule", "Unsupported type used for options.searchExports", options.searchExports, "boolean expected."); return WebpackModules.getLazy(filter, options); }, + + /** + * Finds all modules matching a filter function. + * @param {Function} filter A function to use to filter modules + */ + getModules(filter) {return WebpackModules.getModule(filter, {first: false});}, + + /** + * Finds a module using its code. + * @param {RegEx} regex A regular expression to use to filter modules + * @param {object} [options] Options to configure the search + * @param {Boolean} [options.defaultExport=true] Whether to return default export when matching the default export + * @param {Boolean} [options.searchExports=false] Whether to execute the filter on webpack exports + * @return {Any} + */ + getByRegex(regex, options = {}) { + return WebpackModules.getModule(Filters.byRegex(regex), options); + }, + + /** + * Finds akk modules using its code. + * @param {RegEx} regex A regular expression to use to filter modules + * @param {object} [options] Options to configure the search + * @param {Boolean} [options.defaultExport=true] Whether to return default export when matching the default export + * @param {Boolean} [options.searchExports=false] Whether to execute the filter on webpack exports + * @return {Any[]} + */ + getAllByRegex(regex, options = {}) { + return WebpackModules.getModule(Filters.byRegex(regex), options); + }, + + /** + * Finds a single module using properties on its prototype. + * @param {...string} prototypes Properties to use to filter modules + * @return {Any} + */ + getByPrototypes(...prototypes) { + return WebpackModules.getModule(Filters.byPrototypeFields(prototypes)); + }, + + /** + * Finds all modules with a set of properties of its prototype. + * @param {...string} prototypes Properties to use to filter modules + * @return {Any[]} + */ + getAllByPrototypes(...prototypes) { + return WebpackModules.getModule(Filters.byPrototypeFields(prototypes), {first: false}); + }, + + /** + * Finds a single module using its own properties. + * @param {...string} props Properties to use to filter modules + * @return {Any} + */ + getByProps(...props) { + return WebpackModules.getModule(Filters.byProps(props)); + }, + + /** + * Finds all modules with a set of properties. + * @param {...string} props Properties to use to filter modules + * @return {Any[]} + */ + getAllByProps(...props) { + return WebpackModules.getModule(Filters.byProps(props), {first: false}); + }, + + /** + * Finds a single module using a set of strings. + * @param {...String} props Strings to use to filter modules + * @return {Any} + */ + getByString(...strings) { + return WebpackModules.getModule(Filters.byStrings(...strings)); + }, + + /** + * Finds all modules with a set of strings. + * @param {...String} strings Strings to use to filter modules + * @return {Any[]} + */ + getAllByString(...strings) { + return WebpackModules.getModule(Filters.byStrings(...strings), {first: false}); + }, }; Object.freeze(Webpack); Object.freeze(Webpack.Filters); -export default Webpack; \ No newline at end of file +export default Webpack; diff --git a/renderer/src/modules/webpackmodules.js b/renderer/src/modules/webpackmodules.js index 96be30b6..b656aa56 100644 --- a/renderer/src/modules/webpackmodules.js +++ b/renderer/src/modules/webpackmodules.js @@ -140,6 +140,25 @@ export default class WebpackModules { static findByUniqueProperties(props, first = true) {return first ? this.getByProps(...props) : this.getAllByProps(...props);} static findByDisplayName(name) {return this.getByDisplayName(name);} + /** + * A Proxy that returns the module source by ID. + */ + static modules = new Proxy({}, { + ownKeys() {return Object.keys(WebpackModules.require.m);}, + getOwnPropertyDescriptor() { + return { + enumerable: true, + configurable: true, // Not actually + }; + }, + get(_, k) { + return WebpackModules.require.m[k]; + }, + set() { + throw new Error("[WebpackModules~modules] Setting modules is not allowed."); + } + }); + /** * Finds a module using a filter function. * @param {function} filter A function to use to filter modules @@ -247,6 +266,24 @@ export default class WebpackModules { return returnedModules; } + /** + * Searches for a module by value, returns module & matched key. Useful in combination with the Patcher. + * @param {(value: any, index: number, array: any[]) => boolean} filter A function to use to filter the module + * @param {object} [options] Set of options to customize the search + * @param {any} [options.target=null] Optional module target to look inside. + * @param {Boolean} [options.defaultExport=true] Whether to return default export when matching the default export + * @param {Boolean} [options.searchExports=false] Whether to execute the filter on webpack export getters. + * @return {[Any, string]} + */ + static *getMangled(filter, {target = null, ...rest} = {}) { + yield target ??= this.getModule(exports => + Object.values(exports).some(filter), + rest + ); + + yield target && Object.keys(target).find(k => filter(target[k])); + } + /** * Finds all modules matching a filter function. * @param {Function} filter A function to use to filter modules @@ -481,4 +518,4 @@ export default class WebpackModules { } } -WebpackModules.initialize(); \ No newline at end of file +WebpackModules.initialize(); From 97138afb7de7e08fa4d9bb7bcb2ee21b1facb93d Mon Sep 17 00:00:00 2001 From: Strencher <46447572+Strencher@users.noreply.github.com> Date: Sat, 31 Dec 2022 17:44:01 +0100 Subject: [PATCH 02/15] Fix typo & options --- renderer/src/modules/api/webpack.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/renderer/src/modules/api/webpack.js b/renderer/src/modules/api/webpack.js index cc553f30..7d651cb0 100644 --- a/renderer/src/modules/api/webpack.js +++ b/renderer/src/modules/api/webpack.js @@ -145,7 +145,7 @@ const Webpack = { }, /** - * Finds akk modules using its code. + * Finds all modules using its code. * @param {RegEx} regex A regular expression to use to filter modules * @param {object} [options] Options to configure the search * @param {Boolean} [options.defaultExport=true] Whether to return default export when matching the default export @@ -153,7 +153,7 @@ const Webpack = { * @return {Any[]} */ getAllByRegex(regex, options = {}) { - return WebpackModules.getModule(Filters.byRegex(regex), options); + return WebpackModules.getModule(Filters.byRegex(regex), Object.assign({}, options, {first: true})); }, /** From 68c6b81ed717b7859bdde2cf184d6b8f3aa20663 Mon Sep 17 00:00:00 2001 From: Strencher <46447572+Strencher@users.noreply.github.com> Date: Thu, 26 Jan 2023 00:00:16 +0100 Subject: [PATCH 03/15] Implement options for - getByProps() methods - getByPrototypes() methods - getByString() methods --- renderer/src/modules/api/webpack.js | 36 ++++++++++++++++++++++++----- 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/renderer/src/modules/api/webpack.js b/renderer/src/modules/api/webpack.js index 7d651cb0..81bbdb57 100644 --- a/renderer/src/modules/api/webpack.js +++ b/renderer/src/modules/api/webpack.js @@ -1,6 +1,18 @@ import Logger from "common/logger"; import WebpackModules, {Filters} from "../webpackmodules"; +const getOptions = (args, defaultOptions = {}) => { + if (args.length > 1 && + typeof(args[args.length - 1]) === "object" && + !Array.isArray(args[args.length - 1]) && + args[args.length - 1] !== null + ) { + Object.assign(defaultOptions, args.pop()); + } + + return defaultOptions; +}; + /** * `Webpack` is a utility class for getting internal webpack modules. Instance is accessible through the {@link BdApi}. * This is extremely useful for interacting with the internals of Discord. @@ -162,7 +174,9 @@ const Webpack = { * @return {Any} */ getByPrototypes(...prototypes) { - return WebpackModules.getModule(Filters.byPrototypeFields(prototypes)); + const options = getOptions(prototypes); + + return WebpackModules.getModule(Filters.byPrototypeFields(prototypes), options); }, /** @@ -171,7 +185,9 @@ const Webpack = { * @return {Any[]} */ getAllByPrototypes(...prototypes) { - return WebpackModules.getModule(Filters.byPrototypeFields(prototypes), {first: false}); + const options = getOptions(prototypes, {first: false}); + + return WebpackModules.getModule(Filters.byPrototypeFields(prototypes), options); }, /** @@ -180,7 +196,9 @@ const Webpack = { * @return {Any} */ getByProps(...props) { - return WebpackModules.getModule(Filters.byProps(props)); + const options = getOptions(props); + + return this.getModule(Filters.byProps(props), options); }, /** @@ -189,7 +207,9 @@ const Webpack = { * @return {Any[]} */ getAllByProps(...props) { - return WebpackModules.getModule(Filters.byProps(props), {first: false}); + const options = getOptions(props, {first: false}); + + return WebpackModules.getModule(Filters.byProps(props), options); }, /** @@ -198,7 +218,9 @@ const Webpack = { * @return {Any} */ getByString(...strings) { - return WebpackModules.getModule(Filters.byStrings(...strings)); + const options = getOptions(strings); + + return WebpackModules.getModule(Filters.byStrings(...strings), options); }, /** @@ -207,7 +229,9 @@ const Webpack = { * @return {Any[]} */ getAllByString(...strings) { - return WebpackModules.getModule(Filters.byStrings(...strings), {first: false}); + const options = getOptions(strings, {first: false}); + + return WebpackModules.getModule(Filters.byStrings(...strings), options); }, }; From 1f48d22e53ddb82ac9e3e5db021c2f7755489bef Mon Sep 17 00:00:00 2001 From: Strencher <46447572+Strencher@users.noreply.github.com> Date: Wed, 12 Apr 2023 23:20:20 +0200 Subject: [PATCH 04/15] fetch api & apply fix current https --- preload/src/api/fetch.js | 88 +++++++++++++++++++++++++++++++ preload/src/api/https.js | 10 +++- preload/src/api/index.js | 1 + renderer/src/modules/api/fetch.js | 63 ++++++++++++++++++++++ renderer/src/modules/api/index.js | 4 ++ 5 files changed, 165 insertions(+), 1 deletion(-) create mode 100644 preload/src/api/fetch.js create mode 100644 renderer/src/modules/api/fetch.js diff --git a/preload/src/api/fetch.js b/preload/src/api/fetch.js new file mode 100644 index 00000000..f423b1df --- /dev/null +++ b/preload/src/api/fetch.js @@ -0,0 +1,88 @@ +import * as https from "https"; +import * as http from "http"; + +const redirectCodes = new Set([301, 302, 307, 308]); + +export function nativeFetch(url, options) { + let state = "PENDING"; + const data = {content: [], headers: null, statusCode: null, url: url, statusText: "", redirected: false}; + const listeners = new Set(); + const errors = new Set(); + + /** * @param {URL} url */ + const execute = (url, options, redirect = false) => { + const Module = url.protocol === "http" ? http : https; + + const req = Module.request(url.href, { + headers: options.headers ?? {}, + method: options.method ?? "GET" + }, res => { + if (redirectCodes.has(res.statusCode) && res.headers.location && options.redirect !== "manual") { + const final = new URL(res.headers.location); + + for (const [key, value] of new URL(url).searchParams.entries()) { + final.searchParams.set(key, value); + } + + return execute(final, options, true); + } + + res.on("data", chunk => data.content.push(chunk)); + res.on("end", () => { + data.content = Buffer.concat(data.content); + data.headers = res.headers; + data.statusCode = res.statusCode; + data.url = url.toString(); + data.statusText = res.statusMessage; + data.redirected = redirect; + state = "DONE"; + + listeners.forEach(listener => listener()); + }); + res.on("error", error => { + state = "ABORTED"; + errors.forEach(e => e(error)); + }); + }); + + if (options.body) { + try {req.write(options.body)} + catch (error) { + state = "ABORTED"; + errors.forEach(e => e(error)); + } finally { + req.end(); + } + } else { + req.end(); + } + + if (options.signal) { + options.signal.addEventListener("abort", () => { + req.end(); + state = "ABORTED"; + }); + } + }; + + execute(new URL(url), options); + + return { + onComplete(listener) { + listeners.add(listener); + }, + onError(listener) { + errors.add(listener); + }, + readData() { + switch (state) { + case "PENDING": + throw new Error("Cannot read data before request is done!"); + case "ABORTED": + throw new Error("Request was aborted."); + case "DONE": + return data; + } + } + }; +} diff --git a/preload/src/api/https.js b/preload/src/api/https.js index dae2ac0f..a65ede15 100644 --- a/preload/src/api/https.js +++ b/preload/src/api/https.js @@ -34,7 +34,15 @@ const makeRequest = (url, options, callback, setReq) => { req.end(); }); }); - req.end(); + + if (options.formData) { + // Make sure to close the socket. + try {req.write(options.formData);} + finally {req.end();} + } else { + req.end(); + } + }; const request = function (url, options, callback) { diff --git a/preload/src/api/index.js b/preload/src/api/index.js index 2d097c76..7907775f 100644 --- a/preload/src/api/index.js +++ b/preload/src/api/index.js @@ -3,6 +3,7 @@ export {default as https} from "./https"; export * as electron from "./electron"; export * as crypto from "./crypto"; export * as vm from "./vm"; +export * from "./fetch"; // We can expose that without any issues. export * as path from "path"; diff --git a/renderer/src/modules/api/fetch.js b/renderer/src/modules/api/fetch.js new file mode 100644 index 00000000..e9a3efb5 --- /dev/null +++ b/renderer/src/modules/api/fetch.js @@ -0,0 +1,63 @@ +import Remote from "../../polyfill/remote"; + +class FetchResponse extends Response { + constructor(options) { + super(options.content, { + headers: new Headers(options.headers), + method: options.method ?? "GET", + body: options.content, + ...options + }); + + this._options = options; + } + + get url() {return this._options.url;} + get redirected() {return this._options.redirected;} +} + +const convertSignal = signal => { + const listeners = new Set(); + + signal.addEventListener("abort", () => { + listeners.forEach(l => l()); + }); + + return { + addEventListener(_, listener) { + listeners.add(listener); + } + }; +}; + +export function fetch(url, options = {}) { + return new Promise((resolve, reject) => { + const ctx = Remote.nativeFetch(url, { + ...(options.headers && {headers: options.headers instanceof Headers ? Object.fromEntries(options.headers.entries()) : options.headers}), + ...(options.body && {body: options.body}), + ...(options.method && {method: options.method}), + ...(options.signal && {signal: convertSignal(options.signal)}) + }); + + ctx.onError(error => { + reject(error); + }); + + ctx.onComplete(() => { + try { + const data = ctx.readData(); + + const req = new FetchResponse({ + method: options.method ?? "GET", + status: data.statusCode, + ...options, + ...data + }); + + resolve(req); + } catch (error) { + reject(error); + } + }); + }); +} diff --git a/renderer/src/modules/api/index.js b/renderer/src/modules/api/index.js index 7f56b7c6..cab1f18f 100644 --- a/renderer/src/modules/api/index.js +++ b/renderer/src/modules/api/index.js @@ -12,6 +12,7 @@ import Utils from "./utils"; import Webpack from "./webpack"; import * as Legacy from "./legacy"; import ContextMenu from "./contextmenu"; +import {fetch} from "./fetch"; import {DiscordModules} from "modules"; const bounded = new Map(); @@ -57,6 +58,7 @@ export default class BdApi { Components = { get Tooltip() {return DiscordModules.Tooltip;} } + fetch = fetch; } // Add legacy functions @@ -126,6 +128,8 @@ BdApi.Components = { get Tooltip() {return DiscordModules.Tooltip;} }; +BdApi.fetch = fetch; + Object.freeze(BdApi); Object.freeze(BdApi.prototype); Object.freeze(BdApi.Components); From bc6a0632de88a3ec90be465dce164f6e21c816bc Mon Sep 17 00:00:00 2001 From: Strencher <46447572+Strencher@users.noreply.github.com> Date: Mon, 1 May 2023 21:36:56 +0200 Subject: [PATCH 05/15] Code cleanup, deprecation notice, add maxRedirects --- preload/src/api/fetch.js | 56 +++++++++++++++++++++++++++---- renderer/src/modules/api/fetch.js | 36 ++++++++++++++++---- renderer/src/modules/api/index.js | 7 ++-- renderer/src/polyfill/index.js | 12 ++++++- 4 files changed, 93 insertions(+), 18 deletions(-) diff --git a/preload/src/api/fetch.js b/preload/src/api/fetch.js index f423b1df..b9f105f6 100644 --- a/preload/src/api/fetch.js +++ b/preload/src/api/fetch.js @@ -1,8 +1,23 @@ import * as https from "https"; import * as http from "http"; +const MAX_DEFAULT_REDIRECTS = 20; const redirectCodes = new Set([301, 302, 307, 308]); +/** + * @typedef {Object} FetchOptions + * @property {"GET" | "PUT" | "POST" | "DELETE"} [method] - Request method. + * @property {Record} [headers] - Request headers. + * @property {"manual" | "follow"} [redirect] - Whether to follow redirects. + * @property {number} [maxRedirects] - Maximum amount of redirects to be followed. + * @property {AbortSignal} [signal] - Signal to abruptly cancel the request + * @property {Uint8Array | string} [body] - Defines a request body. Data must be serializable. + */ + +/** + * @param {string} url + * @param {FetchOptions} options + */ export function nativeFetch(url, options) { let state = "PENDING"; const data = {content: [], headers: null, statusCode: null, url: url, statusText: "", redirected: false}; @@ -10,7 +25,7 @@ export function nativeFetch(url, options) { const errors = new Set(); /** * @param {URL} url */ - const execute = (url, options, redirect = false) => { + const execute = (url, options, redirectCount = 0) => { const Module = url.protocol === "http" ? http : https; const req = Module.request(url.href, { @@ -18,13 +33,31 @@ export function nativeFetch(url, options) { method: options.method ?? "GET" }, res => { if (redirectCodes.has(res.statusCode) && res.headers.location && options.redirect !== "manual") { - const final = new URL(res.headers.location); + redirectCount++; + + if (redirectCount >= (options.maxRedirects ?? MAX_DEFAULT_REDIRECTS)) { + state = "ABORTED"; + const error = new Error(`Maximum amount of redirects reached (${options.maxRedirects ?? MAX_DEFAULT_REDIRECTS})`); + errors.forEach(e => e(error)); + + return; + } + + let final; + try { + final = new URL(res.headers.location); + } + catch (error) { + state = "ABORTED"; + errors.forEach(e => e(error)); + return; + } for (const [key, value] of new URL(url).searchParams.entries()) { final.searchParams.set(key, value); } - return execute(final, options, true); + return execute(final, options, redirectCount); } res.on("data", chunk => data.content.push(chunk)); @@ -34,7 +67,7 @@ export function nativeFetch(url, options) { data.statusCode = res.statusCode; data.url = url.toString(); data.statusText = res.statusMessage; - data.redirected = redirect; + data.redirected = redirectCount > 0; state = "DONE"; listeners.forEach(listener => listener()); @@ -50,10 +83,12 @@ export function nativeFetch(url, options) { catch (error) { state = "ABORTED"; errors.forEach(e => e(error)); - } finally { + } + finally { req.end(); } - } else { + } + else { req.end(); } @@ -65,7 +100,14 @@ export function nativeFetch(url, options) { } }; - execute(new URL(url), options); + try { + const parsed = new URL(url); + execute(parsed, options); + } + catch (error) { + state = "ABORTED"; + errors.forEach(e => e(error)); + } return { onComplete(listener) { diff --git a/renderer/src/modules/api/fetch.js b/renderer/src/modules/api/fetch.js index e9a3efb5..1d541395 100644 --- a/renderer/src/modules/api/fetch.js +++ b/renderer/src/modules/api/fetch.js @@ -1,5 +1,7 @@ import Remote from "../../polyfill/remote"; +const methods = new Set(["GET" | "PUT" | "POST" | "DELETE"]); + class FetchResponse extends Response { constructor(options) { super(options.content, { @@ -30,14 +32,34 @@ const convertSignal = signal => { }; }; -export function fetch(url, options = {}) { +/** + * @typedef {Object} FetchOptions + * @property {"GET" | "PUT" | "POST" | "DELETE"} [method] - Request method. + * @property {Record} [headers] - Request headers. + * @property {"manual" | "follow"} [redirect] - Whether to follow redirects. + * @property {number} [maxRedirects] - Maximum amount of redirects to be followed. + * @property {AbortSignal} [signal] - Signal to abruptly cancel the request + * @property {Uint8Array | string} [body] - Defines a request body. Data must be serializable. + */ + +/** + * @param {string} url + * @param {FetchOptions} options + * @returns {Promise} + */ +export default function fetch(url, options = {}) { return new Promise((resolve, reject) => { - const ctx = Remote.nativeFetch(url, { - ...(options.headers && {headers: options.headers instanceof Headers ? Object.fromEntries(options.headers.entries()) : options.headers}), - ...(options.body && {body: options.body}), - ...(options.method && {method: options.method}), - ...(options.signal && {signal: convertSignal(options.signal)}) - }); + const data = {}; + + if (typeof options.headers === "object") { + data.headers = options.headers instanceof Headers ? Object.fromEntries(options.headers.entries()) : options.headers; + } + + if (typeof options.body === "string" || options.body instanceof Uint8Array) data.body = options.body; + if (typeof options.method === "string" && methods.has(options.method)) data.method = options.method; + if (options.signal instanceof AbortSignal) data.signal = convertSignal(options.signal); + + const ctx = Remote.nativeFetch(url, data); ctx.onError(error => { reject(error); diff --git a/renderer/src/modules/api/index.js b/renderer/src/modules/api/index.js index cab1f18f..a30dba41 100644 --- a/renderer/src/modules/api/index.js +++ b/renderer/src/modules/api/index.js @@ -12,7 +12,7 @@ import Utils from "./utils"; import Webpack from "./webpack"; import * as Legacy from "./legacy"; import ContextMenu from "./contextmenu"; -import {fetch} from "./fetch"; +import fetch from "./fetch"; import {DiscordModules} from "modules"; const bounded = new Map(); @@ -58,7 +58,7 @@ export default class BdApi { Components = { get Tooltip() {return DiscordModules.Tooltip;} } - fetch = fetch; + Net = {fetch}; } // Add legacy functions @@ -128,8 +128,9 @@ BdApi.Components = { get Tooltip() {return DiscordModules.Tooltip;} }; -BdApi.fetch = fetch; +BdApi.Net = {fetch}; Object.freeze(BdApi); +Object.freeze(BdApi.Net); Object.freeze(BdApi.prototype); Object.freeze(BdApi.Components); diff --git a/renderer/src/polyfill/index.js b/renderer/src/polyfill/index.js index 72434088..0c375dd2 100644 --- a/renderer/src/polyfill/index.js +++ b/renderer/src/polyfill/index.js @@ -7,6 +7,12 @@ import * as https from "./https"; import Buffer from "./buffer"; import crypto from "./crypto"; import Remote from "./remote"; +import Logger from "common/logger"; + +const deprecated = new Map([ + ["request", "Use BdApi.Net.fetch instead."], + ["https", "Use BdApi.Net.fetch instead."], +]); const originalFs = Object.assign({}, fs); originalFs.writeFileSync = (path, data, options) => fs.writeFileSync(path, data, Object.assign({}, options, {originalFs: true})); @@ -14,6 +20,10 @@ originalFs.writeFile = (path, data, options) => fs.writeFile(path, data, Object. export const createRequire = function (path) { return mod => { + if (deprecated.has(mod)) { + Logger.warn("Remote~Require", `The "${mod}" module is marked as deprecated. ${deprecated.get(mod)}`); + } + switch (mod) { case "request": return request; case "https": return https; @@ -42,4 +52,4 @@ require.resolve = (path) => { } }; -export default require; \ No newline at end of file +export default require; From 471b1f0343928899cbc7bf949f21d85b628d17a0 Mon Sep 17 00:00:00 2001 From: Zack Rauen Date: Tue, 16 May 2023 02:47:05 -0400 Subject: [PATCH 06/15] fix tests --- babel.config.js | 9 + package.json | 3 + pnpm-lock.yaml | 950 ++++++++++++++++++++++++++---- renderer/src/modules/utilities.js | 2 +- tests/renderer/utilities.js | 77 --- 5 files changed, 840 insertions(+), 201 deletions(-) create mode 100644 babel.config.js diff --git a/babel.config.js b/babel.config.js new file mode 100644 index 00000000..b448406b --- /dev/null +++ b/babel.config.js @@ -0,0 +1,9 @@ +module.exports = (api) => { + api.cache(false); // set cache as true/false + + return { + presets: ["@babel/preset-env"], + // optional if you want to use local .babelrc files + babelrcRoots: [".", "injector", "preload", "renderer"], + }; +}; \ No newline at end of file diff --git a/package.json b/package.json index acb3e747..ed253e2d 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,9 @@ "translations": "node -r dotenv/config scripts/translations.js" }, "devDependencies": { + "@babel/core": "^7.16.12", + "@babel/preset-env": "^7.16.11", + "@babel/register": "^7.16.9", "asar": "^3.2.0", "dotenv": "^16.0.3", "eslint": "^8.23.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8338201c..385ecaa2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4,6 +4,9 @@ importers: .: specifiers: + '@babel/core': ^7.16.12 + '@babel/preset-env': ^7.16.11 + '@babel/register': ^7.16.9 asar: ^3.2.0 dotenv: ^16.0.3 eslint: ^8.23.0 @@ -13,6 +16,9 @@ importers: webpack: ^5.74.0 webpack-cli: ^4.10.0 devDependencies: + '@babel/core': 7.18.6 + '@babel/preset-env': 7.18.6_@babel+core@7.18.6 + '@babel/register': 7.18.6_@babel+core@7.18.6 asar: 3.2.0 dotenv: 16.0.3 eslint: 8.23.0 @@ -37,13 +43,16 @@ importers: renderer: specifiers: '@babel/core': ^7.16.12 + '@babel/plugin-transform-runtime': ^7.21.4 '@babel/preset-env': ^7.16.11 '@babel/preset-react': ^7.16.7 '@babel/register': ^7.16.9 + ava: ^5.2.0 babel-loader: ^8.2.3 babel-plugin-module-resolver: ^4.1.0 circular-dependency-plugin: ^5.2.2 css-loader: ^6.5.1 + mocha: ^10.0.0 postcss: ^8.4.5 postcss-cli: ^9.1.0 postcss-csso: ^6.0.0 @@ -54,13 +63,16 @@ importers: webpack: ^5.73.0 devDependencies: '@babel/core': 7.18.6 + '@babel/plugin-transform-runtime': 7.21.4_@babel+core@7.18.6 '@babel/preset-env': 7.18.6_@babel+core@7.18.6 '@babel/preset-react': 7.18.6_@babel+core@7.18.6 '@babel/register': 7.18.6_@babel+core@7.18.6 + ava: 5.2.0 babel-loader: 8.2.5_fswvdo7jykdwhfxrdcvghfn6pa babel-plugin-module-resolver: 4.1.0 circular-dependency-plugin: 5.2.2_webpack@5.73.0 css-loader: 6.7.1_webpack@5.73.0 + mocha: 10.0.0 postcss: 8.4.14 postcss-cli: 9.1.0_postcss@8.4.14 postcss-csso: 6.0.0_postcss@8.4.14 @@ -119,7 +131,7 @@ packages: resolution: {integrity: sha512-shck+7VLlY72a2w9c3zYWuE1pwOKEiQHV7GTUbSnhyl5eu3i04t30tBY82ZRWrDfo3gkakCFtevExnxbkf2a3A==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.18.8 + '@babel/types': 7.21.5 '@jridgewell/gen-mapping': 0.3.2 jsesc: 2.5.2 dev: true @@ -128,7 +140,7 @@ packages: resolution: {integrity: sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.18.8 + '@babel/types': 7.21.5 dev: true /@babel/helper-builder-binary-assignment-operator-visitor/7.18.6: @@ -136,7 +148,7 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/helper-explode-assignable-expression': 7.18.6 - '@babel/types': 7.18.8 + '@babel/types': 7.21.5 dev: true /@babel/helper-compilation-targets/7.18.6_@babel+core@7.18.6: @@ -148,7 +160,7 @@ packages: '@babel/compat-data': 7.18.8 '@babel/core': 7.18.6 '@babel/helper-validator-option': 7.18.6 - browserslist: 4.21.1 + browserslist: 4.21.5 semver: 6.3.0 dev: true @@ -181,16 +193,14 @@ packages: regexpu-core: 5.1.0 dev: true - /@babel/helper-define-polyfill-provider/0.3.1_@babel+core@7.18.6: - resolution: {integrity: sha512-J9hGMpJQmtWmj46B3kBHmL38UhJGhYX7eqkcq+2gsstyYt341HmPeWspihX43yVRA0mS+8GGk2Gckc7bY/HCmA==} + /@babel/helper-define-polyfill-provider/0.3.3_@babel+core@7.18.6: + resolution: {integrity: sha512-z5aQKU4IzbqCC1XH0nAqfsFLMVSo22SBKUc0BxGrLkolTdPTructy0ToNnlO2zA4j9Q/7pjMZf0DSY+DSTYzww==} peerDependencies: '@babel/core': ^7.4.0-0 dependencies: '@babel/core': 7.18.6 '@babel/helper-compilation-targets': 7.18.6_@babel+core@7.18.6 - '@babel/helper-module-imports': 7.18.6 - '@babel/helper-plugin-utils': 7.18.6 - '@babel/traverse': 7.18.8 + '@babel/helper-plugin-utils': 7.21.5 debug: 4.3.4 lodash.debounce: 4.0.8 resolve: 1.22.1 @@ -208,7 +218,7 @@ packages: resolution: {integrity: sha512-eyAYAsQmB80jNfg4baAtLeWAQHfHFiR483rzFK+BhETlGZaQC9bsfrugfXDCbRHLQbIA7U5NxhhOxN7p/dWIcg==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.18.8 + '@babel/types': 7.21.5 dev: true /@babel/helper-function-name/7.18.6: @@ -216,21 +226,21 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/template': 7.18.6 - '@babel/types': 7.18.8 + '@babel/types': 7.21.5 dev: true /@babel/helper-hoist-variables/7.18.6: resolution: {integrity: sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.18.8 + '@babel/types': 7.21.5 dev: true /@babel/helper-member-expression-to-functions/7.18.6: resolution: {integrity: sha512-CeHxqwwipekotzPDUuJOfIMtcIHBuc7WAzLmTYWctVigqS5RktNMQ5bEwQSuGewzYnCtTWa3BARXeiLxDTv+Ng==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.18.8 + '@babel/types': 7.21.5 dev: true /@babel/helper-module-imports/7.18.6: @@ -240,18 +250,25 @@ packages: '@babel/types': 7.18.8 dev: true + /@babel/helper-module-imports/7.21.4: + resolution: {integrity: sha512-orajc5T2PsRYUN3ZryCEFeMDYwyw09c/pZeaQEZPH0MpKzSvn3e0uXsDBu3k03VI+9DBiRo+l22BfKTpKwa/Wg==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.21.5 + dev: true + /@babel/helper-module-transforms/7.18.8: resolution: {integrity: sha512-che3jvZwIcZxrwh63VfnFTUzcAM9v/lznYkkRxIBGMPt1SudOKHAEec0SIRCfiuIzTcF7VGj/CaTT6gY4eWxvA==} engines: {node: '>=6.9.0'} dependencies: '@babel/helper-environment-visitor': 7.18.6 - '@babel/helper-module-imports': 7.18.6 + '@babel/helper-module-imports': 7.21.4 '@babel/helper-simple-access': 7.18.6 '@babel/helper-split-export-declaration': 7.18.6 - '@babel/helper-validator-identifier': 7.18.6 + '@babel/helper-validator-identifier': 7.19.1 '@babel/template': 7.18.6 '@babel/traverse': 7.18.8 - '@babel/types': 7.18.8 + '@babel/types': 7.21.5 transitivePeerDependencies: - supports-color dev: true @@ -260,7 +277,7 @@ packages: resolution: {integrity: sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.18.8 + '@babel/types': 7.21.5 dev: true /@babel/helper-plugin-utils/7.18.6: @@ -268,6 +285,11 @@ packages: engines: {node: '>=6.9.0'} dev: true + /@babel/helper-plugin-utils/7.21.5: + resolution: {integrity: sha512-0WDaIlXKOX/3KfBK/dwP1oQGiPh6rjMkT7HIRv7i5RR2VUMwrx5ZL0dwBkKx7+SW1zwNdgjHd34IMk5ZjTeHVg==} + engines: {node: '>=6.9.0'} + dev: true + /@babel/helper-remap-async-to-generator/7.18.6_@babel+core@7.18.6: resolution: {integrity: sha512-z5wbmV55TveUPZlCLZvxWHtrjuJd+8inFhk7DG0WW87/oJuGDcjDiu7HIvGcpf5464L6xKCg3vNkmlVVz9hwyQ==} engines: {node: '>=6.9.0'} @@ -278,7 +300,7 @@ packages: '@babel/helper-annotate-as-pure': 7.18.6 '@babel/helper-environment-visitor': 7.18.6 '@babel/helper-wrap-function': 7.18.6 - '@babel/types': 7.18.8 + '@babel/types': 7.21.5 transitivePeerDependencies: - supports-color dev: true @@ -291,7 +313,7 @@ packages: '@babel/helper-member-expression-to-functions': 7.18.6 '@babel/helper-optimise-call-expression': 7.18.6 '@babel/traverse': 7.18.8 - '@babel/types': 7.18.8 + '@babel/types': 7.21.5 transitivePeerDependencies: - supports-color dev: true @@ -300,25 +322,30 @@ packages: resolution: {integrity: sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.18.8 + '@babel/types': 7.21.5 dev: true /@babel/helper-skip-transparent-expression-wrappers/7.18.6: resolution: {integrity: sha512-4KoLhwGS9vGethZpAhYnMejWkX64wsnHPDwvOsKWU6Fg4+AlK2Jz3TyjQLMEPvz+1zemi/WBdkYxCD0bAfIkiw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.18.8 + '@babel/types': 7.21.5 dev: true /@babel/helper-split-export-declaration/7.18.6: resolution: {integrity: sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.18.8 + '@babel/types': 7.21.5 dev: true - /@babel/helper-validator-identifier/7.18.6: - resolution: {integrity: sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g==} + /@babel/helper-string-parser/7.21.5: + resolution: {integrity: sha512-5pTUx3hAJaZIdW99sJ6ZUUgWq/Y+Hja7TowEnLNMm1VivRgZQL3vpBY3qUACVsvw+yQU6+YgfBVmcbLaZtrA1w==} + engines: {node: '>=6.9.0'} + dev: true + + /@babel/helper-validator-identifier/7.19.1: + resolution: {integrity: sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==} engines: {node: '>=6.9.0'} dev: true @@ -334,7 +361,7 @@ packages: '@babel/helper-function-name': 7.18.6 '@babel/template': 7.18.6 '@babel/traverse': 7.18.8 - '@babel/types': 7.18.8 + '@babel/types': 7.21.5 transitivePeerDependencies: - supports-color dev: true @@ -345,7 +372,7 @@ packages: dependencies: '@babel/template': 7.18.6 '@babel/traverse': 7.18.8 - '@babel/types': 7.18.8 + '@babel/types': 7.21.5 transitivePeerDependencies: - supports-color dev: true @@ -354,7 +381,7 @@ packages: resolution: {integrity: sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==} engines: {node: '>=6.9.0'} dependencies: - '@babel/helper-validator-identifier': 7.18.6 + '@babel/helper-validator-identifier': 7.19.1 chalk: 2.4.2 js-tokens: 4.0.0 dev: true @@ -364,7 +391,7 @@ packages: engines: {node: '>=6.0.0'} hasBin: true dependencies: - '@babel/types': 7.18.8 + '@babel/types': 7.21.5 dev: true /@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/7.18.6_@babel+core@7.18.6: @@ -374,7 +401,7 @@ packages: '@babel/core': ^7.0.0 dependencies: '@babel/core': 7.18.6 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 dev: true /@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/7.18.6_@babel+core@7.18.6: @@ -384,7 +411,7 @@ packages: '@babel/core': ^7.13.0 dependencies: '@babel/core': 7.18.6 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 '@babel/helper-skip-transparent-expression-wrappers': 7.18.6 '@babel/plugin-proposal-optional-chaining': 7.18.6_@babel+core@7.18.6 dev: true @@ -397,7 +424,7 @@ packages: dependencies: '@babel/core': 7.18.6 '@babel/helper-environment-visitor': 7.18.6 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 '@babel/helper-remap-async-to-generator': 7.18.6_@babel+core@7.18.6 '@babel/plugin-syntax-async-generators': 7.8.4_@babel+core@7.18.6 transitivePeerDependencies: @@ -412,7 +439,7 @@ packages: dependencies: '@babel/core': 7.18.6 '@babel/helper-create-class-features-plugin': 7.18.6_@babel+core@7.18.6 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 transitivePeerDependencies: - supports-color dev: true @@ -425,7 +452,7 @@ packages: dependencies: '@babel/core': 7.18.6 '@babel/helper-create-class-features-plugin': 7.18.6_@babel+core@7.18.6 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 '@babel/plugin-syntax-class-static-block': 7.14.5_@babel+core@7.18.6 transitivePeerDependencies: - supports-color @@ -438,7 +465,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.18.6 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 '@babel/plugin-syntax-dynamic-import': 7.8.3_@babel+core@7.18.6 dev: true @@ -449,7 +476,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.18.6 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 '@babel/plugin-syntax-export-namespace-from': 7.8.3_@babel+core@7.18.6 dev: true @@ -460,7 +487,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.18.6 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 '@babel/plugin-syntax-json-strings': 7.8.3_@babel+core@7.18.6 dev: true @@ -471,7 +498,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.18.6 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 '@babel/plugin-syntax-logical-assignment-operators': 7.10.4_@babel+core@7.18.6 dev: true @@ -482,7 +509,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.18.6 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3_@babel+core@7.18.6 dev: true @@ -493,7 +520,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.18.6 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 '@babel/plugin-syntax-numeric-separator': 7.10.4_@babel+core@7.18.6 dev: true @@ -506,7 +533,7 @@ packages: '@babel/compat-data': 7.18.8 '@babel/core': 7.18.6 '@babel/helper-compilation-targets': 7.18.6_@babel+core@7.18.6 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 '@babel/plugin-syntax-object-rest-spread': 7.8.3_@babel+core@7.18.6 '@babel/plugin-transform-parameters': 7.18.8_@babel+core@7.18.6 dev: true @@ -518,7 +545,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.18.6 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 '@babel/plugin-syntax-optional-catch-binding': 7.8.3_@babel+core@7.18.6 dev: true @@ -529,7 +556,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.18.6 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 '@babel/helper-skip-transparent-expression-wrappers': 7.18.6 '@babel/plugin-syntax-optional-chaining': 7.8.3_@babel+core@7.18.6 dev: true @@ -542,7 +569,7 @@ packages: dependencies: '@babel/core': 7.18.6 '@babel/helper-create-class-features-plugin': 7.18.6_@babel+core@7.18.6 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 transitivePeerDependencies: - supports-color dev: true @@ -556,7 +583,7 @@ packages: '@babel/core': 7.18.6 '@babel/helper-annotate-as-pure': 7.18.6 '@babel/helper-create-class-features-plugin': 7.18.6_@babel+core@7.18.6 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 '@babel/plugin-syntax-private-property-in-object': 7.14.5_@babel+core@7.18.6 transitivePeerDependencies: - supports-color @@ -570,7 +597,7 @@ packages: dependencies: '@babel/core': 7.18.6 '@babel/helper-create-regexp-features-plugin': 7.18.6_@babel+core@7.18.6 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 dev: true /@babel/plugin-syntax-async-generators/7.8.4_@babel+core@7.18.6: @@ -579,7 +606,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.18.6 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 dev: true /@babel/plugin-syntax-class-properties/7.12.13_@babel+core@7.18.6: @@ -588,7 +615,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.18.6 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 dev: true /@babel/plugin-syntax-class-static-block/7.14.5_@babel+core@7.18.6: @@ -598,7 +625,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.18.6 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 dev: true /@babel/plugin-syntax-dynamic-import/7.8.3_@babel+core@7.18.6: @@ -607,7 +634,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.18.6 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 dev: true /@babel/plugin-syntax-export-namespace-from/7.8.3_@babel+core@7.18.6: @@ -616,7 +643,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.18.6 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 dev: true /@babel/plugin-syntax-import-assertions/7.18.6_@babel+core@7.18.6: @@ -626,7 +653,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.18.6 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 dev: true /@babel/plugin-syntax-json-strings/7.8.3_@babel+core@7.18.6: @@ -635,7 +662,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.18.6 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 dev: true /@babel/plugin-syntax-jsx/7.18.6_@babel+core@7.18.6: @@ -654,7 +681,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.18.6 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 dev: true /@babel/plugin-syntax-nullish-coalescing-operator/7.8.3_@babel+core@7.18.6: @@ -663,7 +690,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.18.6 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 dev: true /@babel/plugin-syntax-numeric-separator/7.10.4_@babel+core@7.18.6: @@ -672,7 +699,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.18.6 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 dev: true /@babel/plugin-syntax-object-rest-spread/7.8.3_@babel+core@7.18.6: @@ -681,7 +708,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.18.6 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 dev: true /@babel/plugin-syntax-optional-catch-binding/7.8.3_@babel+core@7.18.6: @@ -690,7 +717,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.18.6 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 dev: true /@babel/plugin-syntax-optional-chaining/7.8.3_@babel+core@7.18.6: @@ -699,7 +726,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.18.6 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 dev: true /@babel/plugin-syntax-private-property-in-object/7.14.5_@babel+core@7.18.6: @@ -709,7 +736,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.18.6 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 dev: true /@babel/plugin-syntax-top-level-await/7.14.5_@babel+core@7.18.6: @@ -719,7 +746,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.18.6 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 dev: true /@babel/plugin-transform-arrow-functions/7.18.6_@babel+core@7.18.6: @@ -729,7 +756,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.18.6 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 dev: true /@babel/plugin-transform-async-to-generator/7.18.6_@babel+core@7.18.6: @@ -739,8 +766,8 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.18.6 - '@babel/helper-module-imports': 7.18.6 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-module-imports': 7.21.4 + '@babel/helper-plugin-utils': 7.21.5 '@babel/helper-remap-async-to-generator': 7.18.6_@babel+core@7.18.6 transitivePeerDependencies: - supports-color @@ -753,7 +780,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.18.6 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 dev: true /@babel/plugin-transform-block-scoping/7.18.6_@babel+core@7.18.6: @@ -763,7 +790,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.18.6 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 dev: true /@babel/plugin-transform-classes/7.18.8_@babel+core@7.18.6: @@ -777,7 +804,7 @@ packages: '@babel/helper-environment-visitor': 7.18.6 '@babel/helper-function-name': 7.18.6 '@babel/helper-optimise-call-expression': 7.18.6 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 '@babel/helper-replace-supers': 7.18.6 '@babel/helper-split-export-declaration': 7.18.6 globals: 11.12.0 @@ -792,7 +819,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.18.6 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 dev: true /@babel/plugin-transform-destructuring/7.18.6_@babel+core@7.18.6: @@ -802,7 +829,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.18.6 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 dev: true /@babel/plugin-transform-dotall-regex/7.18.6_@babel+core@7.18.6: @@ -813,7 +840,7 @@ packages: dependencies: '@babel/core': 7.18.6 '@babel/helper-create-regexp-features-plugin': 7.18.6_@babel+core@7.18.6 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 dev: true /@babel/plugin-transform-duplicate-keys/7.18.6_@babel+core@7.18.6: @@ -823,7 +850,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.18.6 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 dev: true /@babel/plugin-transform-exponentiation-operator/7.18.6_@babel+core@7.18.6: @@ -834,7 +861,7 @@ packages: dependencies: '@babel/core': 7.18.6 '@babel/helper-builder-binary-assignment-operator-visitor': 7.18.6 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 dev: true /@babel/plugin-transform-for-of/7.18.8_@babel+core@7.18.6: @@ -844,7 +871,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.18.6 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 dev: true /@babel/plugin-transform-function-name/7.18.6_@babel+core@7.18.6: @@ -856,7 +883,7 @@ packages: '@babel/core': 7.18.6 '@babel/helper-compilation-targets': 7.18.6_@babel+core@7.18.6 '@babel/helper-function-name': 7.18.6 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 dev: true /@babel/plugin-transform-literals/7.18.6_@babel+core@7.18.6: @@ -866,7 +893,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.18.6 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 dev: true /@babel/plugin-transform-member-expression-literals/7.18.6_@babel+core@7.18.6: @@ -876,7 +903,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.18.6 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 dev: true /@babel/plugin-transform-modules-amd/7.18.6_@babel+core@7.18.6: @@ -887,7 +914,7 @@ packages: dependencies: '@babel/core': 7.18.6 '@babel/helper-module-transforms': 7.18.8 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 babel-plugin-dynamic-import-node: 2.3.3 transitivePeerDependencies: - supports-color @@ -901,7 +928,7 @@ packages: dependencies: '@babel/core': 7.18.6 '@babel/helper-module-transforms': 7.18.8 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 '@babel/helper-simple-access': 7.18.6 babel-plugin-dynamic-import-node: 2.3.3 transitivePeerDependencies: @@ -917,8 +944,8 @@ packages: '@babel/core': 7.18.6 '@babel/helper-hoist-variables': 7.18.6 '@babel/helper-module-transforms': 7.18.8 - '@babel/helper-plugin-utils': 7.18.6 - '@babel/helper-validator-identifier': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 + '@babel/helper-validator-identifier': 7.19.1 babel-plugin-dynamic-import-node: 2.3.3 transitivePeerDependencies: - supports-color @@ -932,7 +959,7 @@ packages: dependencies: '@babel/core': 7.18.6 '@babel/helper-module-transforms': 7.18.8 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 transitivePeerDependencies: - supports-color dev: true @@ -945,7 +972,7 @@ packages: dependencies: '@babel/core': 7.18.6 '@babel/helper-create-regexp-features-plugin': 7.18.6_@babel+core@7.18.6 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 dev: true /@babel/plugin-transform-new-target/7.18.6_@babel+core@7.18.6: @@ -955,7 +982,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.18.6 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 dev: true /@babel/plugin-transform-object-super/7.18.6_@babel+core@7.18.6: @@ -965,7 +992,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.18.6 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 '@babel/helper-replace-supers': 7.18.6 transitivePeerDependencies: - supports-color @@ -978,7 +1005,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.18.6 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 dev: true /@babel/plugin-transform-property-literals/7.18.6_@babel+core@7.18.6: @@ -988,7 +1015,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.18.6 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 dev: true /@babel/plugin-transform-react-display-name/7.18.6_@babel+core@7.18.6: @@ -1043,7 +1070,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.18.6 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 regenerator-transform: 0.15.0 dev: true @@ -1054,7 +1081,24 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.18.6 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 + dev: true + + /@babel/plugin-transform-runtime/7.21.4_@babel+core@7.18.6: + resolution: {integrity: sha512-1J4dhrw1h1PqnNNpzwxQ2UBymJUF8KuPjAAnlLwZcGhHAIqUigFW7cdK6GHoB64ubY4qXQNYknoUeks4Wz7CUA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.18.6 + '@babel/helper-module-imports': 7.21.4 + '@babel/helper-plugin-utils': 7.21.5 + babel-plugin-polyfill-corejs2: 0.3.3_@babel+core@7.18.6 + babel-plugin-polyfill-corejs3: 0.6.0_@babel+core@7.18.6 + babel-plugin-polyfill-regenerator: 0.4.1_@babel+core@7.18.6 + semver: 6.3.0 + transitivePeerDependencies: + - supports-color dev: true /@babel/plugin-transform-shorthand-properties/7.18.6_@babel+core@7.18.6: @@ -1064,7 +1108,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.18.6 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 dev: true /@babel/plugin-transform-spread/7.18.6_@babel+core@7.18.6: @@ -1074,7 +1118,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.18.6 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 '@babel/helper-skip-transparent-expression-wrappers': 7.18.6 dev: true @@ -1085,7 +1129,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.18.6 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 dev: true /@babel/plugin-transform-template-literals/7.18.6_@babel+core@7.18.6: @@ -1095,7 +1139,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.18.6 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 dev: true /@babel/plugin-transform-typeof-symbol/7.18.6_@babel+core@7.18.6: @@ -1105,7 +1149,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.18.6 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 dev: true /@babel/plugin-transform-unicode-escapes/7.18.6_@babel+core@7.18.6: @@ -1115,7 +1159,7 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.18.6 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 dev: true /@babel/plugin-transform-unicode-regex/7.18.6_@babel+core@7.18.6: @@ -1126,7 +1170,7 @@ packages: dependencies: '@babel/core': 7.18.6 '@babel/helper-create-regexp-features-plugin': 7.18.6_@babel+core@7.18.6 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 dev: true /@babel/preset-env/7.18.6_@babel+core@7.18.6: @@ -1221,10 +1265,10 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.18.6 - '@babel/helper-plugin-utils': 7.18.6 + '@babel/helper-plugin-utils': 7.21.5 '@babel/plugin-proposal-unicode-property-regex': 7.18.6_@babel+core@7.18.6 '@babel/plugin-transform-dotall-regex': 7.18.6_@babel+core@7.18.6 - '@babel/types': 7.18.8 + '@babel/types': 7.21.5 esutils: 2.0.3 dev: true @@ -1261,7 +1305,7 @@ packages: resolution: {integrity: sha512-t9wi7/AW6XtKahAe20Yw0/mMljKq0B1r2fPdvaAdV/KPDZewFXdaaa6K7lxmZBZ8FBNpCiAT6iHPmd6QO9bKfQ==} engines: {node: '>=6.9.0'} dependencies: - regenerator-runtime: 0.13.9 + regenerator-runtime: 0.13.11 dev: true /@babel/template/7.18.6: @@ -1270,7 +1314,7 @@ packages: dependencies: '@babel/code-frame': 7.18.6 '@babel/parser': 7.18.8 - '@babel/types': 7.18.8 + '@babel/types': 7.21.5 dev: true /@babel/traverse/7.18.8: @@ -1284,7 +1328,7 @@ packages: '@babel/helper-hoist-variables': 7.18.6 '@babel/helper-split-export-declaration': 7.18.6 '@babel/parser': 7.18.8 - '@babel/types': 7.18.8 + '@babel/types': 7.21.5 debug: 4.3.4 globals: 11.12.0 transitivePeerDependencies: @@ -1295,7 +1339,16 @@ packages: resolution: {integrity: sha512-qwpdsmraq0aJ3osLJRApsc2ouSJCdnMeZwB0DhbtHAtRpZNZCdlbRnHIgcRKzdE1g0iOGg644fzjOBcdOz9cPw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/helper-validator-identifier': 7.18.6 + '@babel/helper-validator-identifier': 7.19.1 + to-fast-properties: 2.0.0 + dev: true + + /@babel/types/7.21.5: + resolution: {integrity: sha512-m4AfNvVF2mVC/F7fDEdH2El3HzUg9It/XsCxZiOTTA3m3qYfcSVSbTfM6Q9xG+hYDniZssYhlXKKUMD5m8tF4Q==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/helper-string-parser': 7.21.5 + '@babel/helper-validator-identifier': 7.19.1 to-fast-properties: 2.0.0 dev: true @@ -1639,6 +1692,11 @@ packages: acorn: 8.8.0 dev: true + /acorn-walk/8.2.0: + resolution: {integrity: sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==} + engines: {node: '>=0.4.0'} + dev: true + /acorn/8.7.1: resolution: {integrity: sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==} engines: {node: '>=0.4.0'} @@ -1651,6 +1709,20 @@ packages: hasBin: true dev: true + /acorn/8.8.2: + resolution: {integrity: sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==} + engines: {node: '>=0.4.0'} + hasBin: true + dev: true + + /aggregate-error/4.0.1: + resolution: {integrity: sha512-0poP0T7el6Vq3rstR8Mn4V/IQrpBLO6POkUSrN7RhyY+GF/InCFShQzsQ39T25gkHhLgSLByyAz+Kjb+c2L98w==} + engines: {node: '>=12'} + dependencies: + clean-stack: 4.2.0 + indent-string: 5.0.0 + dev: true + /ajv-keywords/3.5.2_ajv@6.12.6: resolution: {integrity: sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==} peerDependencies: @@ -1687,6 +1759,11 @@ packages: engines: {node: '>=8'} dev: true + /ansi-regex/6.0.1: + resolution: {integrity: sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==} + engines: {node: '>=12'} + dev: true + /ansi-styles/3.2.1: resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} engines: {node: '>=4'} @@ -1701,6 +1778,11 @@ packages: color-convert: 2.0.1 dev: true + /ansi-styles/6.2.1: + resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} + engines: {node: '>=12'} + dev: true + /anymatch/3.1.2: resolution: {integrity: sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==} engines: {node: '>= 8'} @@ -1709,10 +1791,21 @@ packages: picomatch: 2.3.1 dev: true + /argparse/1.0.10: + resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} + dependencies: + sprintf-js: 1.0.3 + dev: true + /argparse/2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} dev: true + /array-find-index/1.0.2: + resolution: {integrity: sha512-M1HQyIXcBGtVywBt8WVdim+lrNaK7VHp99Qt5pSNziXznKHViIBbXWtfRTpEFpF/c4FdfxNAsCCwPp5phBYJtw==} + engines: {node: '>=0.10.0'} + dev: true + /array-includes/3.1.5: resolution: {integrity: sha512-iSDYZMMyTPkiFasVqfuAQnWAYcvO/SeBSCGKePoEthjp4LEMTe4uLc7b025o4jAZpHhihh8xPo99TNWUWWkGDQ==} engines: {node: '>= 0.4'} @@ -1756,11 +1849,21 @@ packages: es-shim-unscopables: 1.0.0 dev: true + /arrgv/1.0.2: + resolution: {integrity: sha512-a4eg4yhp7mmruZDQFqVMlxNRFGi/i1r87pt8SDHy0/I8PqSXoUTlWZRdAZo0VXgvEARcujbtTk8kiZRi1uDGRw==} + engines: {node: '>=8.0.0'} + dev: true + /arrify/1.0.1: resolution: {integrity: sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==} engines: {node: '>=0.10.0'} dev: true + /arrify/3.0.0: + resolution: {integrity: sha512-tLkvA81vQG/XqE2mjDkGQHoOINtMHtysSnemrmoGe6PydDPMRbVugqyk4A6V/WDWEfm3l+0d8anA9r8cv/5Jaw==} + engines: {node: '>=12'} + dev: true + /asar/3.2.0: resolution: {integrity: sha512-COdw2ZQvKdFGFxXwX3oYh2/sOsJWJegrdJCGxnN4MZ7IULgRBp9P6665aqj9z1v9VwP4oP1hRBojRDQ//IGgAg==} engines: {node: '>=10.12.0'} @@ -1779,6 +1882,65 @@ packages: engines: {node: '>=8'} dev: true + /ava/5.2.0: + resolution: {integrity: sha512-W8yxFXJr/P68JP55eMpQIa6AiXhCX3VeuajM8nolyWNExcMDD6rnIWKTjw0B/+GkFHBIaN6Jd0LtcMThcoqVfg==} + engines: {node: '>=14.19 <15 || >=16.15 <17 || >=18'} + hasBin: true + peerDependencies: + '@ava/typescript': '*' + peerDependenciesMeta: + '@ava/typescript': + optional: true + dependencies: + acorn: 8.8.2 + acorn-walk: 8.2.0 + ansi-styles: 6.2.1 + arrgv: 1.0.2 + arrify: 3.0.0 + callsites: 4.0.0 + cbor: 8.1.0 + chalk: 5.2.0 + chokidar: 3.5.3 + chunkd: 2.0.1 + ci-info: 3.8.0 + ci-parallel-vars: 1.0.1 + clean-yaml-object: 0.1.0 + cli-truncate: 3.1.0 + code-excerpt: 4.0.0 + common-path-prefix: 3.0.0 + concordance: 5.0.4 + currently-unhandled: 0.4.1 + debug: 4.3.4 + del: 7.0.0 + emittery: 1.0.1 + figures: 5.0.0 + globby: 13.1.4 + ignore-by-default: 2.1.0 + indent-string: 5.0.0 + is-error: 2.2.2 + is-plain-object: 5.0.0 + is-promise: 4.0.0 + matcher: 5.0.0 + mem: 9.0.2 + ms: 2.1.3 + p-event: 5.0.1 + p-map: 5.5.0 + picomatch: 2.3.1 + pkg-conf: 4.0.0 + plur: 5.1.0 + pretty-ms: 8.0.0 + resolve-cwd: 3.0.0 + slash: 3.0.0 + stack-utils: 2.0.6 + strip-ansi: 7.0.1 + supertap: 3.0.1 + temp-dir: 3.0.0 + write-file-atomic: 5.0.1 + yargs: 17.7.2 + transitivePeerDependencies: + - supports-color + dev: true + /babel-loader/8.2.5_fswvdo7jykdwhfxrdcvghfn6pa: resolution: {integrity: sha512-OSiFfH89LrEMiWd4pLNqGz4CwJDtbs2ZVc+iGu2HrkRfPxId9F2anQj38IxWpmRfsUY0aBZYi1EFcd3mhtRMLQ==} engines: {node: '>= 8.9'} @@ -1818,7 +1980,20 @@ packages: dependencies: '@babel/compat-data': 7.18.8 '@babel/core': 7.18.6 - '@babel/helper-define-polyfill-provider': 0.3.1_@babel+core@7.18.6 + '@babel/helper-define-polyfill-provider': 0.3.3_@babel+core@7.18.6 + semver: 6.3.0 + transitivePeerDependencies: + - supports-color + dev: true + + /babel-plugin-polyfill-corejs2/0.3.3_@babel+core@7.18.6: + resolution: {integrity: sha512-8hOdmFYFSZhqg2C/JgLUQ+t52o5nirNwaWM2B9LWteozwIvM14VSwdsCAUET10qT+kmySAlseadmfeeSWFCy+Q==} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/compat-data': 7.18.8 + '@babel/core': 7.18.6 + '@babel/helper-define-polyfill-provider': 0.3.3_@babel+core@7.18.6 semver: 6.3.0 transitivePeerDependencies: - supports-color @@ -1830,8 +2005,20 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.18.6 - '@babel/helper-define-polyfill-provider': 0.3.1_@babel+core@7.18.6 - core-js-compat: 3.23.4 + '@babel/helper-define-polyfill-provider': 0.3.3_@babel+core@7.18.6 + core-js-compat: 3.30.2 + transitivePeerDependencies: + - supports-color + dev: true + + /babel-plugin-polyfill-corejs3/0.6.0_@babel+core@7.18.6: + resolution: {integrity: sha512-+eHqR6OPcBhJOGgsIar7xoAB1GcSwVUA3XjAd7HJNzOXT4wv6/H7KIdA/Nc60cvUlDbKApmqNvD1B1bzOt4nyA==} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.18.6 + '@babel/helper-define-polyfill-provider': 0.3.3_@babel+core@7.18.6 + core-js-compat: 3.30.2 transitivePeerDependencies: - supports-color dev: true @@ -1842,7 +2029,18 @@ packages: '@babel/core': ^7.0.0-0 dependencies: '@babel/core': 7.18.6 - '@babel/helper-define-polyfill-provider': 0.3.1_@babel+core@7.18.6 + '@babel/helper-define-polyfill-provider': 0.3.3_@babel+core@7.18.6 + transitivePeerDependencies: + - supports-color + dev: true + + /babel-plugin-polyfill-regenerator/0.4.1_@babel+core@7.18.6: + resolution: {integrity: sha512-NtQGmyQDXjQqQ+IzRkBVwEOz9lQ4zxAQZgoAYEtU9dJjnl1Oc98qnN7jcp+bE7O7aYzVpavXE3/VKXNzUbh7aw==} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.18.6 + '@babel/helper-define-polyfill-provider': 0.3.3_@babel+core@7.18.6 transitivePeerDependencies: - supports-color dev: true @@ -1864,6 +2062,10 @@ packages: engines: {node: '>=8'} dev: true + /blueimp-md5/2.19.0: + resolution: {integrity: sha512-DRQrD6gJyy8FbiE4s+bDoXS9hiW3Vbx5uCdwvcCf3zLHL+Iv7LtGHLpr+GZV8rHG8tK766FGYBwRbu8pELTt+w==} + dev: true + /brace-expansion/1.1.11: resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} dependencies: @@ -1904,10 +2106,21 @@ packages: engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true dependencies: - caniuse-lite: 1.0.30001359 - electron-to-chromium: 1.4.185 - node-releases: 2.0.5 - update-browserslist-db: 1.0.4_browserslist@4.21.1 + caniuse-lite: 1.0.30001487 + electron-to-chromium: 1.4.396 + node-releases: 2.0.10 + update-browserslist-db: 1.0.11_browserslist@4.21.1 + dev: true + + /browserslist/4.21.5: + resolution: {integrity: sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w==} + engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} + hasBin: true + dependencies: + caniuse-lite: 1.0.30001487 + electron-to-chromium: 1.4.396 + node-releases: 2.0.10 + update-browserslist-db: 1.0.11_browserslist@4.21.5 dev: true /buffer-from/1.1.2: @@ -1926,6 +2139,11 @@ packages: engines: {node: '>=6'} dev: true + /callsites/4.0.0: + resolution: {integrity: sha512-y3jRROutgpKdz5vzEhWM34TidDU8vkJppF8dszITeb1PQmSqV3DTxyV8G/lyO/DNvtE1YTedehmw9MPZsCBHxQ==} + engines: {node: '>=12.20'} + dev: true + /camelcase-keys/6.2.2: resolution: {integrity: sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==} engines: {node: '>=8'} @@ -1949,6 +2167,17 @@ packages: resolution: {integrity: sha512-Xln/BAsPzEuiVLgJ2/45IaqD9jShtk3Y33anKb4+yLwQzws3+v6odKfpgES/cDEaZMLzSChpIGdbOYtH9MyuHw==} dev: true + /caniuse-lite/1.0.30001487: + resolution: {integrity: sha512-83564Z3yWGqXsh2vaH/mhXfEM0wX+NlBCm1jYHOb97TrTWJEmPTccZgeLTPBUUb0PNVo+oomb7wkimZBIERClA==} + dev: true + + /cbor/8.1.0: + resolution: {integrity: sha512-DwGjNW9omn6EwP70aXsn7FQJx5kO12tX0bZkaTjzdVFM6/7nhA4t0EENocKGx6D2Bch9PE2KzCUf5SceBdeijg==} + engines: {node: '>=12.19'} + dependencies: + nofilter: 3.1.0 + dev: true + /chalk/2.4.2: resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} engines: {node: '>=4'} @@ -1966,6 +2195,11 @@ packages: supports-color: 7.2.0 dev: true + /chalk/5.2.0: + resolution: {integrity: sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA==} + engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} + dev: true + /chokidar/3.5.3: resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==} engines: {node: '>= 8.10.0'} @@ -1990,6 +2224,19 @@ packages: resolution: {integrity: sha512-1R5Fho+jBq0DDydt+/vHWj5KJNJCKdARKOCwZUen84I5BreWoLqRLANH1U87eJy1tiASPtMnGqJJq0ZsLoRPOw==} dev: true + /chunkd/2.0.1: + resolution: {integrity: sha512-7d58XsFmOq0j6el67Ug9mHf9ELUXsQXYJBkyxhH/k+6Ke0qXRnv0kbemx+Twc6fRJ07C49lcbdgm9FL1Ei/6SQ==} + dev: true + + /ci-info/3.8.0: + resolution: {integrity: sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==} + engines: {node: '>=8'} + dev: true + + /ci-parallel-vars/1.0.1: + resolution: {integrity: sha512-uvzpYrpmidaoxvIQHM+rKSrigjOe9feHYbw4uOI2gdfe1C3xIlxO+kVXq83WQWNniTf8bAxVpy+cQeFQsMERKg==} + dev: true + /circular-dependency-plugin/5.2.2_webpack@5.73.0: resolution: {integrity: sha512-g38K9Cm5WRwlaH6g03B9OEz/0qRizI+2I7n+Gz+L5DxXJAPAiWQvwlYNm1V1jkdpUv95bOe/ASm2vfi/G560jQ==} engines: {node: '>=6.0.0'} @@ -1999,6 +2246,26 @@ packages: webpack: 5.73.0 dev: true + /clean-stack/4.2.0: + resolution: {integrity: sha512-LYv6XPxoyODi36Dp976riBtSY27VmFo+MKqEU9QCCWyTrdEPDog+RWA7xQWHi6Vbp61j5c4cdzzX1NidnwtUWg==} + engines: {node: '>=12'} + dependencies: + escape-string-regexp: 5.0.0 + dev: true + + /clean-yaml-object/0.1.0: + resolution: {integrity: sha512-3yONmlN9CSAkzNwnRCiJQ7Q2xK5mWuEfL3PuTZcAUzhObbXsfsnMptJzXwz93nc5zn9V9TwCVMmV7w4xsm43dw==} + engines: {node: '>=0.10.0'} + dev: true + + /cli-truncate/3.1.0: + resolution: {integrity: sha512-wfOBkjXteqSnI59oPcJkcPl/ZmwvMMOj340qUIY1SKZCv0B9Cf4D4fAucRkIKQmsIuYK3x1rrgU7MeGRruiuiA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dependencies: + slice-ansi: 5.0.0 + string-width: 5.1.2 + dev: true + /cliui/7.0.4: resolution: {integrity: sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==} dependencies: @@ -2007,6 +2274,15 @@ packages: wrap-ansi: 7.0.0 dev: true + /cliui/8.0.1: + resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} + engines: {node: '>=12'} + dependencies: + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 7.0.0 + dev: true + /clone-deep/4.0.1: resolution: {integrity: sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==} engines: {node: '>=6'} @@ -2023,6 +2299,13 @@ packages: is-regexp: 2.1.0 dev: true + /code-excerpt/4.0.0: + resolution: {integrity: sha512-xxodCmBen3iy2i0WtAK8FlFNrRzjUqjRsMfho58xT/wvZU1YTM3fCnRjcy1gJPMepaRlgm/0e6w8SpWHpn3/cA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dependencies: + convert-to-spaces: 2.0.1 + dev: true + /color-convert/1.9.3: resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} dependencies: @@ -2066,6 +2349,10 @@ packages: engines: {node: '>= 10'} dev: true + /common-path-prefix/3.0.0: + resolution: {integrity: sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w==} + dev: true + /commondir/1.0.1: resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==} dev: true @@ -2074,19 +2361,44 @@ packages: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} dev: true + /concordance/5.0.4: + resolution: {integrity: sha512-OAcsnTEYu1ARJqWVGwf4zh4JDfHZEaSNlNccFmt8YjB2l/n19/PF2viLINHc57vO4FKIAFl2FWASIGZZWZ2Kxw==} + engines: {node: '>=10.18.0 <11 || >=12.14.0 <13 || >=14'} + dependencies: + date-time: 3.1.0 + esutils: 2.0.3 + fast-diff: 1.2.0 + js-string-escape: 1.0.1 + lodash: 4.17.21 + md5-hex: 3.0.1 + semver: 7.3.7 + well-known-symbols: 2.0.0 + dev: true + /convert-source-map/1.8.0: resolution: {integrity: sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==} dependencies: safe-buffer: 5.1.2 dev: true + /convert-to-spaces/2.0.1: + resolution: {integrity: sha512-rcQ1bsQO9799wq24uE5AM2tAILy4gXGIK/njFWcVQkGNZ96edlpY+A7bjwvzjYvLDyzmG1MmMLZhpcsb+klNMQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dev: true + /core-js-compat/3.23.4: resolution: {integrity: sha512-RkSRPe+JYEoflcsuxJWaiMPhnZoFS51FcIxm53k4KzhISCBTmaGlto9dTIrYuk0hnJc3G6pKufAKepHnBq6B6Q==} dependencies: - browserslist: 4.21.1 + browserslist: 4.21.5 semver: 7.0.0 dev: true + /core-js-compat/3.30.2: + resolution: {integrity: sha512-nriW1nuJjUgvkEjIot1Spwakz52V9YkYHZAQG6A1eCgC8AA1p0zngrQEP9R0+V6hji5XilWKG1Bd0YRppmGimA==} + dependencies: + browserslist: 4.21.5 + dev: true + /cosmiconfig/7.0.1: resolution: {integrity: sha512-a1YWNUV2HwGimB7dU2s1wUMurNKjpx60HxBB6xUM8Re+2s1g1IIfJvFR0/iCF+XHdE0GMTKTuLR32UQff4TEyQ==} engines: {node: '>=10'} @@ -2150,6 +2462,20 @@ packages: css-tree: 2.0.4 dev: true + /currently-unhandled/0.4.1: + resolution: {integrity: sha512-/fITjgjGU50vjQ4FH6eUoYu+iUoUKIXws2hL15JJpIR+BbTxaXQsMuuyjtNh2WqsSBS5nsaZHFsFecyw5CCAng==} + engines: {node: '>=0.10.0'} + dependencies: + array-find-index: 1.0.2 + dev: true + + /date-time/3.1.0: + resolution: {integrity: sha512-uqCUKXE5q1PNBXjPqvwhwJf9SwMoAHBgWJ6DcrnS5o+W2JOiIILl0JEdVD8SGujrNS02GGxgwAg2PN2zONgtjg==} + engines: {node: '>=6'} + dependencies: + time-zone: 1.0.0 + dev: true + /debug/4.3.4: resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} engines: {node: '>=6.0'} @@ -2205,6 +2531,20 @@ packages: object-keys: 1.1.1 dev: true + /del/7.0.0: + resolution: {integrity: sha512-tQbV/4u5WVB8HMJr08pgw0b6nG4RGt/tj+7Numvq+zqcvUFeMaIWWOUFltiU+6go8BSO2/ogsB4EasDaj0y68Q==} + engines: {node: '>=14.16'} + dependencies: + globby: 13.1.4 + graceful-fs: 4.2.10 + is-glob: 4.0.3 + is-path-cwd: 3.0.0 + is-path-inside: 4.0.0 + p-map: 5.5.0 + rimraf: 3.0.2 + slash: 4.0.0 + dev: true + /dependency-graph/0.11.0: resolution: {integrity: sha512-JeMq7fEshyepOWDfcfHK06N3MhyPhz++vtqWhMT5O9A3K42rdsEDpfdVqjaqaAhsw6a+ZqeDvQVtD0hFHQWrzg==} engines: {node: '>= 0.6.0'} @@ -2241,14 +2581,31 @@ packages: engines: {node: '>=12'} dev: true + /eastasianwidth/0.2.0: + resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} + dev: true + /electron-to-chromium/1.4.185: resolution: {integrity: sha512-9kV/isoOGpKkBt04yYNaSWIBn3187Q5VZRtoReq8oz5NY/A4XmU6cAoqgQlDp7kKJCZMRjWZ8nsQyxfpFHvfyw==} dev: true + /electron-to-chromium/1.4.396: + resolution: {integrity: sha512-pqKTdqp/c5vsrc0xUPYXTDBo9ixZuGY8es4ZOjjd6HD6bFYbu5QA09VoW3fkY4LF1T0zYk86lN6bZnNlBuOpdQ==} + dev: true + + /emittery/1.0.1: + resolution: {integrity: sha512-2ID6FdrMD9KDLldGesP6317G78K7km/kMcwItRtVFva7I/cSEOIaLpewaUb+YLXVwdAp3Ctfxh/V5zIl1sj7dQ==} + engines: {node: '>=14.16'} + dev: true + /emoji-regex/8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} dev: true + /emoji-regex/9.2.2: + resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} + dev: true + /emojis-list/3.0.0: resolution: {integrity: sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==} engines: {node: '>= 4'} @@ -2340,11 +2697,21 @@ packages: engines: {node: '>=0.8.0'} dev: true + /escape-string-regexp/2.0.0: + resolution: {integrity: sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==} + engines: {node: '>=8'} + dev: true + /escape-string-regexp/4.0.0: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} engines: {node: '>=10'} dev: true + /escape-string-regexp/5.0.0: + resolution: {integrity: sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==} + engines: {node: '>=12'} + dev: true + /eslint-plugin-react-hooks/4.6.0_eslint@8.23.0: resolution: {integrity: sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==} engines: {node: '>=10'} @@ -2470,6 +2837,12 @@ packages: eslint-visitor-keys: 3.3.0 dev: true + /esprima/4.0.1: + resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} + engines: {node: '>=4'} + hasBin: true + dev: true + /esquery/1.4.0: resolution: {integrity: sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==} engines: {node: '>=0.10'} @@ -2515,6 +2888,10 @@ packages: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} dev: true + /fast-diff/1.2.0: + resolution: {integrity: sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==} + dev: true + /fast-glob/3.2.11: resolution: {integrity: sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==} engines: {node: '>=8.6.0'} @@ -2544,6 +2921,14 @@ packages: reusify: 1.0.4 dev: true + /figures/5.0.0: + resolution: {integrity: sha512-ej8ksPF4x6e5wvK9yevct0UCXh8TTFlWGVLlgjZuoBH1HwjIfKE/IdL5mq89sFA7zELi1VhKpmtDnrs7zWyeyg==} + engines: {node: '>=14'} + dependencies: + escape-string-regexp: 5.0.0 + is-unicode-supported: 1.3.0 + dev: true + /file-entry-cache/6.0.1: resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} engines: {node: ^10.12.0 || >=12.0.0} @@ -2607,6 +2992,14 @@ packages: path-exists: 4.0.0 dev: true + /find-up/6.3.0: + resolution: {integrity: sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dependencies: + locate-path: 7.2.0 + path-exists: 5.0.0 + dev: true + /flat-cache/3.0.4: resolution: {integrity: sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==} engines: {node: ^10.12.0 || >=12.0.0} @@ -2795,6 +3188,17 @@ packages: slash: 4.0.0 dev: true + /globby/13.1.4: + resolution: {integrity: sha512-iui/IiiW+QrJ1X1hKH5qwlMQyv34wJAYwH1vrf8b9kBA4sNiif3gKsMHa+BrdnOpEudWjpotfa7LrTzB1ERS/g==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dependencies: + dir-glob: 3.0.1 + fast-glob: 3.2.11 + ignore: 5.2.0 + merge2: 1.4.1 + slash: 4.0.0 + dev: true + /globby/6.1.0: resolution: {integrity: sha512-KVbFv2TQtbzCoxAnfD6JcHZTYCzyliEaaeM/gH8qQdkKr5s0OP9scEgvdcngyk7AVdY6YVW/TJHd+lQ/Df3Daw==} engines: {node: '>=0.10.0'} @@ -2892,6 +3296,11 @@ packages: postcss: 8.4.14 dev: true + /ignore-by-default/2.1.0: + resolution: {integrity: sha512-yiWd4GVmJp0Q6ghmM2B/V3oZGRmjrKLXvHR3TE1nfoXsmoggllfZUQe74EN0fJdPFZu2NIvNdrMMLm3OsV7Ohw==} + engines: {node: '>=10 <11 || >=12 <13 || >=14'} + dev: true + /ignore/5.2.0: resolution: {integrity: sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==} engines: {node: '>= 4'} @@ -2929,6 +3338,11 @@ packages: engines: {node: '>=8'} dev: true + /indent-string/5.0.0: + resolution: {integrity: sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==} + engines: {node: '>=12'} + dev: true + /inflight/1.0.6: resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} dependencies: @@ -2958,6 +3372,11 @@ packages: engines: {node: '>= 0.10'} dev: true + /irregular-plurals/3.5.0: + resolution: {integrity: sha512-1ANGLZ+Nkv1ptFb2pa8oG8Lem4krflKuX/gINiHJHjJUKaJHk/SXk5x6K3J+39/p0h1RQ2saROclJJ+QLvETCQ==} + engines: {node: '>=8'} + dev: true + /is-arrayish/0.2.1: resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} dev: true @@ -3001,6 +3420,10 @@ packages: has-tostringtag: 1.0.0 dev: true + /is-error/2.2.2: + resolution: {integrity: sha512-IOQqts/aHWbiisY5DuPJQ0gcbvaLFCa7fBa9xoLfxBZvQ+ZI/Zh9xoI7Gk+G64N0FdK4AbibytHht2tWgpJWLg==} + dev: true + /is-extglob/2.1.1: resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} engines: {node: '>=0.10.0'} @@ -3011,6 +3434,11 @@ packages: engines: {node: '>=8'} dev: true + /is-fullwidth-code-point/4.0.0: + resolution: {integrity: sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==} + engines: {node: '>=12'} + dev: true + /is-glob/4.0.3: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} engines: {node: '>=0.10.0'} @@ -3035,6 +3463,16 @@ packages: engines: {node: '>=0.12.0'} dev: true + /is-path-cwd/3.0.0: + resolution: {integrity: sha512-kyiNFFLU0Ampr6SDZitD/DwUo4Zs1nSdnygUBqsu3LooL00Qvb5j+UnvApUn/TTj1J3OuE6BTdQ5rudKmU2ZaA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dev: true + + /is-path-inside/4.0.0: + resolution: {integrity: sha512-lJJV/5dYS+RcL8uQdBDW9c9uWFLLBNRyFhnAKXw5tVqLlKZ4RMGZKv+YQ/IA3OhD+RpbJa1LLFM1FQPGyIXvOA==} + engines: {node: '>=12'} + dev: true + /is-plain-obj/1.1.0: resolution: {integrity: sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==} engines: {node: '>=0.10.0'} @@ -3057,6 +3495,10 @@ packages: engines: {node: '>=0.10.0'} dev: true + /is-promise/4.0.0: + resolution: {integrity: sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==} + dev: true + /is-regex/1.1.4: resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} engines: {node: '>= 0.4'} @@ -3095,6 +3537,11 @@ packages: engines: {node: '>=10'} dev: true + /is-unicode-supported/1.3.0: + resolution: {integrity: sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==} + engines: {node: '>=12'} + dev: true + /is-weakref/1.0.2: resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} dependencies: @@ -3119,10 +3566,23 @@ packages: supports-color: 8.1.1 dev: true + /js-string-escape/1.0.1: + resolution: {integrity: sha512-Smw4xcfIQ5LVjAOuJCvN/zIodzA/BBSsluuoSykP+lUvScIi4U6RJLfwHet5cxFnCswUjISV8oAXaqaJDY3chg==} + engines: {node: '>= 0.8'} + dev: true + /js-tokens/4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} dev: true + /js-yaml/3.14.1: + resolution: {integrity: sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==} + hasBin: true + dependencies: + argparse: 1.0.10 + esprima: 4.0.1 + dev: true + /js-yaml/4.1.0: resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} hasBin: true @@ -3215,6 +3675,11 @@ packages: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} dev: true + /load-json-file/7.0.1: + resolution: {integrity: sha512-Gnxj3ev3mB5TkVBGad0JM6dmLiQL+o0t23JPBZ9sd+yvSLk05mFoqKBw5N8gbbkU4TNXyqCgIrl/VM17OgUIgQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dev: true + /loader-runner/4.3.0: resolution: {integrity: sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==} engines: {node: '>=6.11.5'} @@ -3251,6 +3716,13 @@ packages: p-locate: 5.0.0 dev: true + /locate-path/7.2.0: + resolution: {integrity: sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dependencies: + p-locate: 6.0.0 + dev: true + /lodash.debounce/4.0.8: resolution: {integrity: sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==} dev: true @@ -3304,6 +3776,13 @@ packages: semver: 6.3.0 dev: true + /map-age-cleaner/0.1.3: + resolution: {integrity: sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==} + engines: {node: '>=6'} + dependencies: + p-defer: 1.0.0 + dev: true + /map-obj/1.0.1: resolution: {integrity: sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==} engines: {node: '>=0.10.0'} @@ -3314,14 +3793,36 @@ packages: engines: {node: '>=8'} dev: true + /matcher/5.0.0: + resolution: {integrity: sha512-s2EMBOWtXFc8dgqvoAzKJXxNHibcdJMV0gwqKUaw9E2JBJuGUK7DrNKrA6g/i+v72TT16+6sVm5mS3thaMLQUw==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dependencies: + escape-string-regexp: 5.0.0 + dev: true + /mathml-tag-names/2.1.3: resolution: {integrity: sha512-APMBEanjybaPzUrfqU0IMU5I0AswKMH7k8OTLs0vvV4KZpExkTkY87nR/zpbuTPj+gARop7aGUbl11pnDfW6xg==} dev: true + /md5-hex/3.0.1: + resolution: {integrity: sha512-BUiRtTtV39LIJwinWBjqVsU9xhdnz7/i889V859IBFpuqGAj6LuOvHv5XLbgZ2R7ptJoJaEcxkv88/h25T7Ciw==} + engines: {node: '>=8'} + dependencies: + blueimp-md5: 2.19.0 + dev: true + /mdn-data/2.0.23: resolution: {integrity: sha512-IonVb7pfla2U4zW8rc7XGrtgq11BvYeCxWN8HS+KFBnLDE7XDK9AAMVhRuG6fj9BBsjc69Fqsp6WEActEdNTDQ==} dev: true + /mem/9.0.2: + resolution: {integrity: sha512-F2t4YIv9XQUBHt6AOJ0y7lSmP1+cY7Fm1DRh9GClTGzKST7UWLMx6ly9WZdLH/G/ppM5RL4MlQfRT71ri9t19A==} + engines: {node: '>=12.20'} + dependencies: + map-age-cleaner: 0.1.3 + mimic-fn: 4.0.0 + dev: true + /meow/9.0.0: resolution: {integrity: sha512-+obSblOQmRhcyBt62furQqRAQpNyWXo8BuQ5bN7dG8wmwQ+vwHKp/rCFD4CrTP8CsDQD1sjoZ94K417XEUk8IQ==} engines: {node: '>=10'} @@ -3369,6 +3870,11 @@ packages: mime-db: 1.52.0 dev: true + /mimic-fn/4.0.0: + resolution: {integrity: sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==} + engines: {node: '>=12'} + dev: true + /min-indent/1.0.1: resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} engines: {node: '>=4'} @@ -3453,10 +3959,19 @@ packages: resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} dev: true + /node-releases/2.0.10: + resolution: {integrity: sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w==} + dev: true + /node-releases/2.0.5: resolution: {integrity: sha512-U9h1NLROZTq9uE1SNffn6WuPDg8icmi3ns4rEl/oTfIle4iLjTliCzgTsbaIFMq/Xn078/lfY/BL0GWZ+psK4Q==} dev: true + /nofilter/3.1.0: + resolution: {integrity: sha512-l2NNj07e9afPnhAhvgVrCD/oy2Ai1yfLpuo3EpiO1jFTsB4sFz6oIfAfSZyQzVpkZQ9xS8ZS5g1jCBgq4Hwo0g==} + engines: {node: '>=12.19'} + dev: true + /normalize-package-data/2.5.0: resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} dependencies: @@ -3557,6 +4072,18 @@ packages: word-wrap: 1.2.3 dev: true + /p-defer/1.0.0: + resolution: {integrity: sha512-wB3wfAxZpk2AzOfUMJNL+d36xothRSyj8EXOa4f6GMqYDN9BJaaSISbsk+wS9abmnebVw95C2Kb5t85UmpCxuw==} + engines: {node: '>=4'} + dev: true + + /p-event/5.0.1: + resolution: {integrity: sha512-dd589iCQ7m1L0bmC5NLlVYfy3TbBEsMUfWx9PyAgPeIcFZ/E2yaTZ4Rz4MiBmmJShviiftHVXOqfnfzJ6kyMrQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dependencies: + p-timeout: 5.1.0 + dev: true + /p-limit/2.3.0: resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} engines: {node: '>=6'} @@ -3571,6 +4098,13 @@ packages: yocto-queue: 0.1.0 dev: true + /p-limit/4.0.0: + resolution: {integrity: sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dependencies: + yocto-queue: 1.0.0 + dev: true + /p-locate/3.0.0: resolution: {integrity: sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==} engines: {node: '>=6'} @@ -3592,6 +4126,25 @@ packages: p-limit: 3.1.0 dev: true + /p-locate/6.0.0: + resolution: {integrity: sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dependencies: + p-limit: 4.0.0 + dev: true + + /p-map/5.5.0: + resolution: {integrity: sha512-VFqfGDHlx87K66yZrNdI4YGtD70IRyd+zSvgks6mzHPRNkoKy+9EKP4SFC77/vTTQYmRmti7dvqC+m5jBrBAcg==} + engines: {node: '>=12'} + dependencies: + aggregate-error: 4.0.1 + dev: true + + /p-timeout/5.1.0: + resolution: {integrity: sha512-auFDyzzzGZZZdHz3BtET9VEz0SE/uMEAx7uWfGPucfzEwwe/xH0iVeZibQmANYE/hp9T2+UUZT5m+BKyrDp3Ew==} + engines: {node: '>=12'} + dev: true + /p-try/2.2.0: resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} engines: {node: '>=6'} @@ -3614,6 +4167,11 @@ packages: lines-and-columns: 1.2.4 dev: true + /parse-ms/3.0.0: + resolution: {integrity: sha512-Tpb8Z7r7XbbtBTrM9UhpkzzaMrqA2VXMT3YChzYltwV3P3pM6t8wl7TvpMnSTosz1aQAdVib7kdoys7vYOPerw==} + engines: {node: '>=12'} + dev: true + /path-exists/3.0.0: resolution: {integrity: sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==} engines: {node: '>=4'} @@ -3624,6 +4182,11 @@ packages: engines: {node: '>=8'} dev: true + /path-exists/5.0.0: + resolution: {integrity: sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dev: true + /path-is-absolute/1.0.1: resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} engines: {node: '>=0.10.0'} @@ -3684,6 +4247,14 @@ packages: engines: {node: '>= 6'} dev: true + /pkg-conf/4.0.0: + resolution: {integrity: sha512-7dmgi4UY4qk+4mj5Cd8v/GExPo0K+SlY+hulOSdfZ/T6jVH6//y7NtzZo5WrfhDBxuQ0jCa7fLZmNaNh7EWL/w==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dependencies: + find-up: 6.3.0 + load-json-file: 7.0.1 + dev: true + /pkg-dir/3.0.0: resolution: {integrity: sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==} engines: {node: '>=6'} @@ -3705,6 +4276,13 @@ packages: find-up: 3.0.0 dev: true + /plur/5.1.0: + resolution: {integrity: sha512-VP/72JeXqak2KiOzjgKtQen5y3IZHn+9GOuLDafPv0eXa47xq0At93XahYBs26MsifCQ4enGKwbjBTKgb9QJXg==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dependencies: + irregular-plurals: 3.5.0 + dev: true + /postcss-cli/9.1.0_postcss@8.4.14: resolution: {integrity: sha512-zvDN2ADbWfza42sAnj+O2uUWyL0eRL1V+6giM2vi4SqTR3gTYy8XzcpfwccayF2szcUif0HMmXiEaDv9iEhcpw==} engines: {node: '>=12'} @@ -3898,6 +4476,13 @@ packages: engines: {node: '>= 0.8'} dev: true + /pretty-ms/8.0.0: + resolution: {integrity: sha512-ASJqOugUF1bbzI35STMBUpZqdfYKlJugy6JBziGi2EE+AL5JPJGSzvpeVXojxrr0ViUYoToUjb5kjSEGf7Y83Q==} + engines: {node: '>=14.16'} + dependencies: + parse-ms: 3.0.0 + dev: true + /prop-types/15.8.1: resolution: {integrity: sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==} dependencies: @@ -3988,8 +4573,8 @@ packages: resolution: {integrity: sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==} dev: true - /regenerator-runtime/0.13.9: - resolution: {integrity: sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==} + /regenerator-runtime/0.13.11: + resolution: {integrity: sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==} dev: true /regenerator-transform/0.15.0: @@ -4151,6 +4736,13 @@ packages: lru-cache: 6.0.0 dev: true + /serialize-error/7.0.1: + resolution: {integrity: sha512-8I8TjW5KMOKsZQTvoxjuSIa7foAwPWGOts+6o7sgjz41/qMD9VQHEDxi6PBvK2l0MXUmqZyNpUK+T2tQaaElvw==} + engines: {node: '>=10'} + dependencies: + type-fest: 0.13.1 + dev: true + /serialize-javascript/6.0.0: resolution: {integrity: sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==} dependencies: @@ -4188,6 +4780,11 @@ packages: resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} dev: true + /signal-exit/4.0.2: + resolution: {integrity: sha512-MY2/qGx4enyjprQnFaZsHib3Yadh3IXyV2C321GY0pjGfVBu4un0uDJkwgdxqO+Rdx8JMT8IfJIRwbYVz3Ob3Q==} + engines: {node: '>=14'} + dev: true + /slash/3.0.0: resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} engines: {node: '>=8'} @@ -4207,6 +4804,14 @@ packages: is-fullwidth-code-point: 3.0.0 dev: true + /slice-ansi/5.0.0: + resolution: {integrity: sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==} + engines: {node: '>=12'} + dependencies: + ansi-styles: 6.2.1 + is-fullwidth-code-point: 4.0.0 + dev: true + /source-map-js/1.0.2: resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} engines: {node: '>=0.10.0'} @@ -4246,6 +4851,17 @@ packages: resolution: {integrity: sha512-Ctl2BrFiM0X3MANYgj3CkygxhRmr9mi6xhejbdO960nF6EDJApTYpn0BQnDKlnNBULKiCN1n3w9EBkHK8ZWg+g==} dev: true + /sprintf-js/1.0.3: + resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} + dev: true + + /stack-utils/2.0.6: + resolution: {integrity: sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==} + engines: {node: '>=10'} + dependencies: + escape-string-regexp: 2.0.0 + dev: true + /string-width/4.2.3: resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} engines: {node: '>=8'} @@ -4255,6 +4871,15 @@ packages: strip-ansi: 6.0.1 dev: true + /string-width/5.1.2: + resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} + engines: {node: '>=12'} + dependencies: + eastasianwidth: 0.2.0 + emoji-regex: 9.2.2 + strip-ansi: 7.0.1 + dev: true + /string.prototype.matchall/4.0.7: resolution: {integrity: sha512-f48okCX7JiwVi1NXCVWcFnZgADDC/n2vePlQ/KUCNqCikLLilQvwjMO8+BHVKvgzH0JB0J9LEPgxOGT02RoETg==} dependencies: @@ -4291,6 +4916,13 @@ packages: ansi-regex: 5.0.1 dev: true + /strip-ansi/7.0.1: + resolution: {integrity: sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==} + engines: {node: '>=12'} + dependencies: + ansi-regex: 6.0.1 + dev: true + /strip-indent/3.0.0: resolution: {integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==} engines: {node: '>=8'} @@ -4373,6 +5005,16 @@ packages: - supports-color dev: true + /supertap/3.0.1: + resolution: {integrity: sha512-u1ZpIBCawJnO+0QePsEiOknOfCRq0yERxiAchT0i4li0WHNUJbf0evXXSXOcCAR4M8iMDoajXYmstm/qO81Isw==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dependencies: + indent-string: 5.0.0 + js-yaml: 3.14.1 + serialize-error: 7.0.1 + strip-ansi: 7.0.1 + dev: true + /supports-color/5.5.0: resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} engines: {node: '>=4'} @@ -4427,6 +5069,11 @@ packages: engines: {node: '>=6'} dev: true + /temp-dir/3.0.0: + resolution: {integrity: sha512-nHc6S/bwIilKHNRgK/3jlhDoIHcp45YgyiwcAk46Tr0LfEqGBVpmiAyuiuxeVE44m3mXnEeVhaipLOEWmH+Njw==} + engines: {node: '>=14.16'} + dev: true + /terser-webpack-plugin/5.3.3_webpack@5.73.0: resolution: {integrity: sha512-Fx60G5HNYknNTNQnzQ1VePRuu89ZVYWfjRAeT5rITuCY/1b08s49e5kSQwHDirKZWuoKOBRFS98EUUoZ9kLEwQ==} engines: {node: '>= 10.13.0'} @@ -4481,7 +5128,7 @@ packages: hasBin: true dependencies: '@jridgewell/source-map': 0.3.2 - acorn: 8.8.0 + acorn: 8.8.2 commander: 2.20.3 source-map-support: 0.5.21 dev: true @@ -4494,6 +5141,11 @@ packages: resolution: {integrity: sha512-89Gi5raiWA3QZ4b2ePcEwswC3me9JIg+ToSgtE0JWeCynLnLxNr/f9G+xfo9K+Oj4AFdom8YNJjibIARTJmapQ==} dev: true + /time-zone/1.0.0: + resolution: {integrity: sha512-TIsDdtKo6+XrPtiTm1ssmMngN1sAhyKnTO2kunQWqNPWIVvCm15Wmw4SWInwTVgJ5u/Tr04+8Ei9TNcw4x4ONA==} + engines: {node: '>=4'} + dev: true + /to-fast-properties/2.0.0: resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} engines: {node: '>=4'} @@ -4518,6 +5170,11 @@ packages: prelude-ls: 1.2.1 dev: true + /type-fest/0.13.1: + resolution: {integrity: sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==} + engines: {node: '>=10'} + dev: true + /type-fest/0.18.1: resolution: {integrity: sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==} engines: {node: '>=10'} @@ -4575,6 +5232,28 @@ packages: engines: {node: '>= 10.0.0'} dev: true + /update-browserslist-db/1.0.11_browserslist@4.21.1: + resolution: {integrity: sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==} + hasBin: true + peerDependencies: + browserslist: '>= 4.21.0' + dependencies: + browserslist: 4.21.1 + escalade: 3.1.1 + picocolors: 1.0.0 + dev: true + + /update-browserslist-db/1.0.11_browserslist@4.21.5: + resolution: {integrity: sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==} + hasBin: true + peerDependencies: + browserslist: '>= 4.21.0' + dependencies: + browserslist: 4.21.5 + escalade: 3.1.1 + picocolors: 1.0.0 + dev: true + /update-browserslist-db/1.0.4_browserslist@4.21.0: resolution: {integrity: sha512-jnmO2BEGUjsMOe/Fg9u0oczOe/ppIDZPebzccl1yDWGLFP16Pa1/RM5wEoKYPG2zstNcDuAStejyxsOuKINdGA==} hasBin: true @@ -4586,17 +5265,6 @@ packages: picocolors: 1.0.0 dev: true - /update-browserslist-db/1.0.4_browserslist@4.21.1: - resolution: {integrity: sha512-jnmO2BEGUjsMOe/Fg9u0oczOe/ppIDZPebzccl1yDWGLFP16Pa1/RM5wEoKYPG2zstNcDuAStejyxsOuKINdGA==} - hasBin: true - peerDependencies: - browserslist: '>= 4.21.0' - dependencies: - browserslist: 4.21.1 - escalade: 3.1.1 - picocolors: 1.0.0 - dev: true - /uri-js/4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} dependencies: @@ -4755,6 +5423,11 @@ packages: - uglify-js dev: true + /well-known-symbols/2.0.0: + resolution: {integrity: sha512-ZMjC3ho+KXo0BfJb7JgtQ5IBuvnShdlACNkKkdsqBmYw3bPAaJfPeYUo6tLUaT5tG/Gkh7xkpBhKRQ9e7pyg9Q==} + engines: {node: '>=6'} + dev: true + /which-boxed-primitive/1.0.2: resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} dependencies: @@ -4814,6 +5487,14 @@ packages: signal-exit: 3.0.7 dev: true + /write-file-atomic/5.0.1: + resolution: {integrity: sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + dependencies: + imurmurhash: 0.1.4 + signal-exit: 4.0.2 + dev: true + /y18n/5.0.8: resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} engines: {node: '>=10'} @@ -4838,6 +5519,11 @@ packages: engines: {node: '>=12'} dev: true + /yargs-parser/21.1.1: + resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} + engines: {node: '>=12'} + dev: true + /yargs-unparser/2.0.0: resolution: {integrity: sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==} engines: {node: '>=10'} @@ -4874,7 +5560,25 @@ packages: yargs-parser: 21.0.1 dev: true + /yargs/17.7.2: + resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} + engines: {node: '>=12'} + dependencies: + cliui: 8.0.1 + escalade: 3.1.1 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + string-width: 4.2.3 + y18n: 5.0.8 + yargs-parser: 21.1.1 + dev: true + /yocto-queue/0.1.0: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} dev: true + + /yocto-queue/1.0.0: + resolution: {integrity: sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==} + engines: {node: '>=12.20'} + dev: true diff --git a/renderer/src/modules/utilities.js b/renderer/src/modules/utilities.js index 8d17b90e..774f2f12 100644 --- a/renderer/src/modules/utilities.js +++ b/renderer/src/modules/utilities.js @@ -1,4 +1,4 @@ -import Logger from "common/logger"; +import Logger from "../../../common/logger"; export default class Utilities { /** diff --git a/tests/renderer/utilities.js b/tests/renderer/utilities.js index ca49d237..9985ef01 100644 --- a/tests/renderer/utilities.js +++ b/tests/renderer/utilities.js @@ -2,27 +2,6 @@ import assert from "assert"; import Utilities from "../../renderer/src/modules/utilities"; describe("Utilities", function() { - - describe("suppressErrors", function() { - it("Prevent error propagation", function() { - const thrower = () => {throw new Error("Error");}; - const wrapped = Utilities.suppressErrors(thrower); - assert.doesNotThrow(wrapped); - }); - it("Allows arguments through", function() { - const thrower = (foo) => { - assert.equal(foo, "bar"); - }; - const wrapped = Utilities.suppressErrors(thrower); - wrapped("bar"); - }); - it("Retains the return value", function() { - const thrower = () => {return "bar";}; - const wrapped = Utilities.suppressErrors(thrower); - const foo = wrapped(); - assert.equal(foo, "bar"); - }); - }); describe("formatString", function() { it("Should handle direct replacement", function() { @@ -54,30 +33,6 @@ describe("Utilities", function() { }); }); - describe("getNestedProp", function() { - const testObj = {test: {deep: {go: "far"}, other: [0, 1, {test2: "foo"}]}}; - it("Gets a shallow property", function() { - const result = Utilities.getNestedProp(testObj, "test"); - assert.deepEqual(result, testObj.test); - }); - it("Gets a deep property", function() { - const result = Utilities.getNestedProp(testObj, "test.deep.go"); - assert.deepEqual(result, testObj.test.deep.go); - }); - it("Gets a property through index", function() { - const result = Utilities.getNestedProp(testObj, "test.other.2.test2"); - assert.deepEqual(result, testObj.test.other[2].test2); - }); - it("Returns null when the a prop is not found", function() { - const result = Utilities.getNestedProp(testObj, "test.foo"); - assert.equal(result, null); - }); - it("Returns null when several layers are not found", function() { - const result = Utilities.getNestedProp(testObj, "test.deep.far.doit.cmon"); - assert.equal(result, null); - }); - }); - describe("findInTree", function() { const testObj = {test: {deep: {go: "far"}, other: [0, 1, {test2: "foo"}]}}; it("Gets a shallow property using a string", function() { @@ -123,36 +78,4 @@ describe("Utilities", function() { assert.deepEqual(result, walkingObj.otherTest); }); }); - - describe("findInReactTree", function() { - const originalFindInTree = Utilities.findInTree; - - it("Passes the original object", function() { - const myObj = {props: "foo"}; - Utilities.findInTree = function(obj) { assert.deepEqual(obj, myObj); return Reflect.apply(originalFindInTree, Utilities, arguments); }; - const result = Utilities.findInReactTree(myObj, "props"); - assert.equal(result, "foo"); - }); - it("Passes the original filter", function() { - const myObj = {props: "foo"}; - const myFilter = "props"; - Utilities.findInTree = function(obj, filter) { assert.deepEqual(filter, myFilter); return Reflect.apply(originalFindInTree, Utilities, arguments); }; - const result = Utilities.findInReactTree(myObj, myFilter); - assert.equal(result, "foo"); - - const myFilter2 = o => o == "foo"; - Utilities.findInTree = function(obj, filter) { assert.deepEqual(filter, myFilter2); return Reflect.apply(originalFindInTree, Utilities, arguments); }; - const result2 = Utilities.findInReactTree(myObj, myFilter2); - assert.equal(result2, "foo"); - }); - it("Includes the react walkables", function() { - Utilities.findInTree = function(obj, filter, {walkable}) { - const shouldWalk = ["props", "children", "return", "stateNode"]; - assert.ok(shouldWalk.every(k => walkable.includes(k))); - }; - Utilities.findInReactTree({}, "foobar"); - }); - - Utilities.findInTree = originalFindInTree; - }); }); \ No newline at end of file From 72a71ad53e99e31672f424d981792d954b455697 Mon Sep 17 00:00:00 2001 From: Zack Rauen Date: Fri, 19 May 2023 16:38:45 -0400 Subject: [PATCH 07/15] Adjust common module import --- pnpm-lock.yaml | 628 ------------------------ renderer/{.babelrc => .babelrc.js} | 18 +- renderer/jsconfig.json | 2 +- renderer/src/modules/addonmanager.js | 2 +- renderer/src/modules/api/contextmenu.js | 2 +- renderer/src/modules/api/index.js | 2 +- renderer/src/modules/api/legacy.js | 2 +- renderer/src/modules/api/patcher.js | 2 +- renderer/src/modules/api/webpack.js | 2 +- renderer/src/modules/core.js | 2 +- renderer/src/modules/datastore.js | 2 +- renderer/src/modules/ipc.js | 2 +- renderer/src/modules/modules.js | 2 +- renderer/src/modules/patcher.js | 2 +- renderer/src/modules/pluginmanager.js | 2 +- renderer/src/modules/settingsmanager.js | 2 +- renderer/src/modules/updater.js | 2 +- renderer/src/modules/utilities.js | 2 +- renderer/src/polyfill/https.js | 2 +- renderer/src/polyfill/index.js | 2 +- renderer/src/polyfill/module.js | 2 +- renderer/src/structs/builtin.js | 2 +- renderer/src/ui/errorboundary.jsx | 2 +- renderer/src/ui/modals.js | 2 +- renderer/src/ui/notices.js | 3 +- renderer/src/ui/settings/addoncard.jsx | 2 +- renderer/src/ui/toasts.js | 2 +- renderer/src/ui/tooltip.js | 2 +- 28 files changed, 37 insertions(+), 662 deletions(-) rename renderer/{.babelrc => .babelrc.js} (55%) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 385ecaa2..1ab14866 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -43,16 +43,13 @@ importers: renderer: specifiers: '@babel/core': ^7.16.12 - '@babel/plugin-transform-runtime': ^7.21.4 '@babel/preset-env': ^7.16.11 '@babel/preset-react': ^7.16.7 '@babel/register': ^7.16.9 - ava: ^5.2.0 babel-loader: ^8.2.3 babel-plugin-module-resolver: ^4.1.0 circular-dependency-plugin: ^5.2.2 css-loader: ^6.5.1 - mocha: ^10.0.0 postcss: ^8.4.5 postcss-cli: ^9.1.0 postcss-csso: ^6.0.0 @@ -63,16 +60,13 @@ importers: webpack: ^5.73.0 devDependencies: '@babel/core': 7.18.6 - '@babel/plugin-transform-runtime': 7.21.4_@babel+core@7.18.6 '@babel/preset-env': 7.18.6_@babel+core@7.18.6 '@babel/preset-react': 7.18.6_@babel+core@7.18.6 '@babel/register': 7.18.6_@babel+core@7.18.6 - ava: 5.2.0 babel-loader: 8.2.5_fswvdo7jykdwhfxrdcvghfn6pa babel-plugin-module-resolver: 4.1.0 circular-dependency-plugin: 5.2.2_webpack@5.73.0 css-loader: 6.7.1_webpack@5.73.0 - mocha: 10.0.0 postcss: 8.4.14 postcss-cli: 9.1.0_postcss@8.4.14 postcss-csso: 6.0.0_postcss@8.4.14 @@ -1084,23 +1078,6 @@ packages: '@babel/helper-plugin-utils': 7.21.5 dev: true - /@babel/plugin-transform-runtime/7.21.4_@babel+core@7.18.6: - resolution: {integrity: sha512-1J4dhrw1h1PqnNNpzwxQ2UBymJUF8KuPjAAnlLwZcGhHAIqUigFW7cdK6GHoB64ubY4qXQNYknoUeks4Wz7CUA==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.18.6 - '@babel/helper-module-imports': 7.21.4 - '@babel/helper-plugin-utils': 7.21.5 - babel-plugin-polyfill-corejs2: 0.3.3_@babel+core@7.18.6 - babel-plugin-polyfill-corejs3: 0.6.0_@babel+core@7.18.6 - babel-plugin-polyfill-regenerator: 0.4.1_@babel+core@7.18.6 - semver: 6.3.0 - transitivePeerDependencies: - - supports-color - dev: true - /@babel/plugin-transform-shorthand-properties/7.18.6_@babel+core@7.18.6: resolution: {integrity: sha512-eCLXXJqv8okzg86ywZJbRn19YJHU4XUa55oz2wbHhaQVn/MM+XhukiT7SYqp/7o00dg52Rj51Ny+Ecw4oyoygw==} engines: {node: '>=6.9.0'} @@ -1692,11 +1669,6 @@ packages: acorn: 8.8.0 dev: true - /acorn-walk/8.2.0: - resolution: {integrity: sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==} - engines: {node: '>=0.4.0'} - dev: true - /acorn/8.7.1: resolution: {integrity: sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==} engines: {node: '>=0.4.0'} @@ -1715,14 +1687,6 @@ packages: hasBin: true dev: true - /aggregate-error/4.0.1: - resolution: {integrity: sha512-0poP0T7el6Vq3rstR8Mn4V/IQrpBLO6POkUSrN7RhyY+GF/InCFShQzsQ39T25gkHhLgSLByyAz+Kjb+c2L98w==} - engines: {node: '>=12'} - dependencies: - clean-stack: 4.2.0 - indent-string: 5.0.0 - dev: true - /ajv-keywords/3.5.2_ajv@6.12.6: resolution: {integrity: sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==} peerDependencies: @@ -1759,11 +1723,6 @@ packages: engines: {node: '>=8'} dev: true - /ansi-regex/6.0.1: - resolution: {integrity: sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==} - engines: {node: '>=12'} - dev: true - /ansi-styles/3.2.1: resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} engines: {node: '>=4'} @@ -1778,11 +1737,6 @@ packages: color-convert: 2.0.1 dev: true - /ansi-styles/6.2.1: - resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} - engines: {node: '>=12'} - dev: true - /anymatch/3.1.2: resolution: {integrity: sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==} engines: {node: '>= 8'} @@ -1791,21 +1745,10 @@ packages: picomatch: 2.3.1 dev: true - /argparse/1.0.10: - resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} - dependencies: - sprintf-js: 1.0.3 - dev: true - /argparse/2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} dev: true - /array-find-index/1.0.2: - resolution: {integrity: sha512-M1HQyIXcBGtVywBt8WVdim+lrNaK7VHp99Qt5pSNziXznKHViIBbXWtfRTpEFpF/c4FdfxNAsCCwPp5phBYJtw==} - engines: {node: '>=0.10.0'} - dev: true - /array-includes/3.1.5: resolution: {integrity: sha512-iSDYZMMyTPkiFasVqfuAQnWAYcvO/SeBSCGKePoEthjp4LEMTe4uLc7b025o4jAZpHhihh8xPo99TNWUWWkGDQ==} engines: {node: '>= 0.4'} @@ -1849,21 +1792,11 @@ packages: es-shim-unscopables: 1.0.0 dev: true - /arrgv/1.0.2: - resolution: {integrity: sha512-a4eg4yhp7mmruZDQFqVMlxNRFGi/i1r87pt8SDHy0/I8PqSXoUTlWZRdAZo0VXgvEARcujbtTk8kiZRi1uDGRw==} - engines: {node: '>=8.0.0'} - dev: true - /arrify/1.0.1: resolution: {integrity: sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==} engines: {node: '>=0.10.0'} dev: true - /arrify/3.0.0: - resolution: {integrity: sha512-tLkvA81vQG/XqE2mjDkGQHoOINtMHtysSnemrmoGe6PydDPMRbVugqyk4A6V/WDWEfm3l+0d8anA9r8cv/5Jaw==} - engines: {node: '>=12'} - dev: true - /asar/3.2.0: resolution: {integrity: sha512-COdw2ZQvKdFGFxXwX3oYh2/sOsJWJegrdJCGxnN4MZ7IULgRBp9P6665aqj9z1v9VwP4oP1hRBojRDQ//IGgAg==} engines: {node: '>=10.12.0'} @@ -1882,65 +1815,6 @@ packages: engines: {node: '>=8'} dev: true - /ava/5.2.0: - resolution: {integrity: sha512-W8yxFXJr/P68JP55eMpQIa6AiXhCX3VeuajM8nolyWNExcMDD6rnIWKTjw0B/+GkFHBIaN6Jd0LtcMThcoqVfg==} - engines: {node: '>=14.19 <15 || >=16.15 <17 || >=18'} - hasBin: true - peerDependencies: - '@ava/typescript': '*' - peerDependenciesMeta: - '@ava/typescript': - optional: true - dependencies: - acorn: 8.8.2 - acorn-walk: 8.2.0 - ansi-styles: 6.2.1 - arrgv: 1.0.2 - arrify: 3.0.0 - callsites: 4.0.0 - cbor: 8.1.0 - chalk: 5.2.0 - chokidar: 3.5.3 - chunkd: 2.0.1 - ci-info: 3.8.0 - ci-parallel-vars: 1.0.1 - clean-yaml-object: 0.1.0 - cli-truncate: 3.1.0 - code-excerpt: 4.0.0 - common-path-prefix: 3.0.0 - concordance: 5.0.4 - currently-unhandled: 0.4.1 - debug: 4.3.4 - del: 7.0.0 - emittery: 1.0.1 - figures: 5.0.0 - globby: 13.1.4 - ignore-by-default: 2.1.0 - indent-string: 5.0.0 - is-error: 2.2.2 - is-plain-object: 5.0.0 - is-promise: 4.0.0 - matcher: 5.0.0 - mem: 9.0.2 - ms: 2.1.3 - p-event: 5.0.1 - p-map: 5.5.0 - picomatch: 2.3.1 - pkg-conf: 4.0.0 - plur: 5.1.0 - pretty-ms: 8.0.0 - resolve-cwd: 3.0.0 - slash: 3.0.0 - stack-utils: 2.0.6 - strip-ansi: 7.0.1 - supertap: 3.0.1 - temp-dir: 3.0.0 - write-file-atomic: 5.0.1 - yargs: 17.7.2 - transitivePeerDependencies: - - supports-color - dev: true - /babel-loader/8.2.5_fswvdo7jykdwhfxrdcvghfn6pa: resolution: {integrity: sha512-OSiFfH89LrEMiWd4pLNqGz4CwJDtbs2ZVc+iGu2HrkRfPxId9F2anQj38IxWpmRfsUY0aBZYi1EFcd3mhtRMLQ==} engines: {node: '>= 8.9'} @@ -1986,19 +1860,6 @@ packages: - supports-color dev: true - /babel-plugin-polyfill-corejs2/0.3.3_@babel+core@7.18.6: - resolution: {integrity: sha512-8hOdmFYFSZhqg2C/JgLUQ+t52o5nirNwaWM2B9LWteozwIvM14VSwdsCAUET10qT+kmySAlseadmfeeSWFCy+Q==} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/compat-data': 7.18.8 - '@babel/core': 7.18.6 - '@babel/helper-define-polyfill-provider': 0.3.3_@babel+core@7.18.6 - semver: 6.3.0 - transitivePeerDependencies: - - supports-color - dev: true - /babel-plugin-polyfill-corejs3/0.5.2_@babel+core@7.18.6: resolution: {integrity: sha512-G3uJih0XWiID451fpeFaYGVuxHEjzKTHtc9uGFEjR6hHrvNzeS/PX+LLLcetJcytsB5m4j+K3o/EpXJNb/5IEQ==} peerDependencies: @@ -2011,18 +1872,6 @@ packages: - supports-color dev: true - /babel-plugin-polyfill-corejs3/0.6.0_@babel+core@7.18.6: - resolution: {integrity: sha512-+eHqR6OPcBhJOGgsIar7xoAB1GcSwVUA3XjAd7HJNzOXT4wv6/H7KIdA/Nc60cvUlDbKApmqNvD1B1bzOt4nyA==} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.18.6 - '@babel/helper-define-polyfill-provider': 0.3.3_@babel+core@7.18.6 - core-js-compat: 3.30.2 - transitivePeerDependencies: - - supports-color - dev: true - /babel-plugin-polyfill-regenerator/0.3.1_@babel+core@7.18.6: resolution: {integrity: sha512-Y2B06tvgHYt1x0yz17jGkGeeMr5FeKUu+ASJ+N6nB5lQ8Dapfg42i0OVrf8PNGJ3zKL4A23snMi1IRwrqqND7A==} peerDependencies: @@ -2034,17 +1883,6 @@ packages: - supports-color dev: true - /babel-plugin-polyfill-regenerator/0.4.1_@babel+core@7.18.6: - resolution: {integrity: sha512-NtQGmyQDXjQqQ+IzRkBVwEOz9lQ4zxAQZgoAYEtU9dJjnl1Oc98qnN7jcp+bE7O7aYzVpavXE3/VKXNzUbh7aw==} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.18.6 - '@babel/helper-define-polyfill-provider': 0.3.3_@babel+core@7.18.6 - transitivePeerDependencies: - - supports-color - dev: true - /balanced-match/1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} dev: true @@ -2062,10 +1900,6 @@ packages: engines: {node: '>=8'} dev: true - /blueimp-md5/2.19.0: - resolution: {integrity: sha512-DRQrD6gJyy8FbiE4s+bDoXS9hiW3Vbx5uCdwvcCf3zLHL+Iv7LtGHLpr+GZV8rHG8tK766FGYBwRbu8pELTt+w==} - dev: true - /brace-expansion/1.1.11: resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} dependencies: @@ -2139,11 +1973,6 @@ packages: engines: {node: '>=6'} dev: true - /callsites/4.0.0: - resolution: {integrity: sha512-y3jRROutgpKdz5vzEhWM34TidDU8vkJppF8dszITeb1PQmSqV3DTxyV8G/lyO/DNvtE1YTedehmw9MPZsCBHxQ==} - engines: {node: '>=12.20'} - dev: true - /camelcase-keys/6.2.2: resolution: {integrity: sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==} engines: {node: '>=8'} @@ -2171,13 +2000,6 @@ packages: resolution: {integrity: sha512-83564Z3yWGqXsh2vaH/mhXfEM0wX+NlBCm1jYHOb97TrTWJEmPTccZgeLTPBUUb0PNVo+oomb7wkimZBIERClA==} dev: true - /cbor/8.1.0: - resolution: {integrity: sha512-DwGjNW9omn6EwP70aXsn7FQJx5kO12tX0bZkaTjzdVFM6/7nhA4t0EENocKGx6D2Bch9PE2KzCUf5SceBdeijg==} - engines: {node: '>=12.19'} - dependencies: - nofilter: 3.1.0 - dev: true - /chalk/2.4.2: resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} engines: {node: '>=4'} @@ -2195,11 +2017,6 @@ packages: supports-color: 7.2.0 dev: true - /chalk/5.2.0: - resolution: {integrity: sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA==} - engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} - dev: true - /chokidar/3.5.3: resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==} engines: {node: '>= 8.10.0'} @@ -2224,19 +2041,6 @@ packages: resolution: {integrity: sha512-1R5Fho+jBq0DDydt+/vHWj5KJNJCKdARKOCwZUen84I5BreWoLqRLANH1U87eJy1tiASPtMnGqJJq0ZsLoRPOw==} dev: true - /chunkd/2.0.1: - resolution: {integrity: sha512-7d58XsFmOq0j6el67Ug9mHf9ELUXsQXYJBkyxhH/k+6Ke0qXRnv0kbemx+Twc6fRJ07C49lcbdgm9FL1Ei/6SQ==} - dev: true - - /ci-info/3.8.0: - resolution: {integrity: sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==} - engines: {node: '>=8'} - dev: true - - /ci-parallel-vars/1.0.1: - resolution: {integrity: sha512-uvzpYrpmidaoxvIQHM+rKSrigjOe9feHYbw4uOI2gdfe1C3xIlxO+kVXq83WQWNniTf8bAxVpy+cQeFQsMERKg==} - dev: true - /circular-dependency-plugin/5.2.2_webpack@5.73.0: resolution: {integrity: sha512-g38K9Cm5WRwlaH6g03B9OEz/0qRizI+2I7n+Gz+L5DxXJAPAiWQvwlYNm1V1jkdpUv95bOe/ASm2vfi/G560jQ==} engines: {node: '>=6.0.0'} @@ -2246,26 +2050,6 @@ packages: webpack: 5.73.0 dev: true - /clean-stack/4.2.0: - resolution: {integrity: sha512-LYv6XPxoyODi36Dp976riBtSY27VmFo+MKqEU9QCCWyTrdEPDog+RWA7xQWHi6Vbp61j5c4cdzzX1NidnwtUWg==} - engines: {node: '>=12'} - dependencies: - escape-string-regexp: 5.0.0 - dev: true - - /clean-yaml-object/0.1.0: - resolution: {integrity: sha512-3yONmlN9CSAkzNwnRCiJQ7Q2xK5mWuEfL3PuTZcAUzhObbXsfsnMptJzXwz93nc5zn9V9TwCVMmV7w4xsm43dw==} - engines: {node: '>=0.10.0'} - dev: true - - /cli-truncate/3.1.0: - resolution: {integrity: sha512-wfOBkjXteqSnI59oPcJkcPl/ZmwvMMOj340qUIY1SKZCv0B9Cf4D4fAucRkIKQmsIuYK3x1rrgU7MeGRruiuiA==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dependencies: - slice-ansi: 5.0.0 - string-width: 5.1.2 - dev: true - /cliui/7.0.4: resolution: {integrity: sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==} dependencies: @@ -2274,15 +2058,6 @@ packages: wrap-ansi: 7.0.0 dev: true - /cliui/8.0.1: - resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} - engines: {node: '>=12'} - dependencies: - string-width: 4.2.3 - strip-ansi: 6.0.1 - wrap-ansi: 7.0.0 - dev: true - /clone-deep/4.0.1: resolution: {integrity: sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==} engines: {node: '>=6'} @@ -2299,13 +2074,6 @@ packages: is-regexp: 2.1.0 dev: true - /code-excerpt/4.0.0: - resolution: {integrity: sha512-xxodCmBen3iy2i0WtAK8FlFNrRzjUqjRsMfho58xT/wvZU1YTM3fCnRjcy1gJPMepaRlgm/0e6w8SpWHpn3/cA==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dependencies: - convert-to-spaces: 2.0.1 - dev: true - /color-convert/1.9.3: resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} dependencies: @@ -2349,10 +2117,6 @@ packages: engines: {node: '>= 10'} dev: true - /common-path-prefix/3.0.0: - resolution: {integrity: sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w==} - dev: true - /commondir/1.0.1: resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==} dev: true @@ -2361,31 +2125,12 @@ packages: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} dev: true - /concordance/5.0.4: - resolution: {integrity: sha512-OAcsnTEYu1ARJqWVGwf4zh4JDfHZEaSNlNccFmt8YjB2l/n19/PF2viLINHc57vO4FKIAFl2FWASIGZZWZ2Kxw==} - engines: {node: '>=10.18.0 <11 || >=12.14.0 <13 || >=14'} - dependencies: - date-time: 3.1.0 - esutils: 2.0.3 - fast-diff: 1.2.0 - js-string-escape: 1.0.1 - lodash: 4.17.21 - md5-hex: 3.0.1 - semver: 7.3.7 - well-known-symbols: 2.0.0 - dev: true - /convert-source-map/1.8.0: resolution: {integrity: sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==} dependencies: safe-buffer: 5.1.2 dev: true - /convert-to-spaces/2.0.1: - resolution: {integrity: sha512-rcQ1bsQO9799wq24uE5AM2tAILy4gXGIK/njFWcVQkGNZ96edlpY+A7bjwvzjYvLDyzmG1MmMLZhpcsb+klNMQ==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dev: true - /core-js-compat/3.23.4: resolution: {integrity: sha512-RkSRPe+JYEoflcsuxJWaiMPhnZoFS51FcIxm53k4KzhISCBTmaGlto9dTIrYuk0hnJc3G6pKufAKepHnBq6B6Q==} dependencies: @@ -2462,20 +2207,6 @@ packages: css-tree: 2.0.4 dev: true - /currently-unhandled/0.4.1: - resolution: {integrity: sha512-/fITjgjGU50vjQ4FH6eUoYu+iUoUKIXws2hL15JJpIR+BbTxaXQsMuuyjtNh2WqsSBS5nsaZHFsFecyw5CCAng==} - engines: {node: '>=0.10.0'} - dependencies: - array-find-index: 1.0.2 - dev: true - - /date-time/3.1.0: - resolution: {integrity: sha512-uqCUKXE5q1PNBXjPqvwhwJf9SwMoAHBgWJ6DcrnS5o+W2JOiIILl0JEdVD8SGujrNS02GGxgwAg2PN2zONgtjg==} - engines: {node: '>=6'} - dependencies: - time-zone: 1.0.0 - dev: true - /debug/4.3.4: resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} engines: {node: '>=6.0'} @@ -2531,20 +2262,6 @@ packages: object-keys: 1.1.1 dev: true - /del/7.0.0: - resolution: {integrity: sha512-tQbV/4u5WVB8HMJr08pgw0b6nG4RGt/tj+7Numvq+zqcvUFeMaIWWOUFltiU+6go8BSO2/ogsB4EasDaj0y68Q==} - engines: {node: '>=14.16'} - dependencies: - globby: 13.1.4 - graceful-fs: 4.2.10 - is-glob: 4.0.3 - is-path-cwd: 3.0.0 - is-path-inside: 4.0.0 - p-map: 5.5.0 - rimraf: 3.0.2 - slash: 4.0.0 - dev: true - /dependency-graph/0.11.0: resolution: {integrity: sha512-JeMq7fEshyepOWDfcfHK06N3MhyPhz++vtqWhMT5O9A3K42rdsEDpfdVqjaqaAhsw6a+ZqeDvQVtD0hFHQWrzg==} engines: {node: '>= 0.6.0'} @@ -2581,10 +2298,6 @@ packages: engines: {node: '>=12'} dev: true - /eastasianwidth/0.2.0: - resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} - dev: true - /electron-to-chromium/1.4.185: resolution: {integrity: sha512-9kV/isoOGpKkBt04yYNaSWIBn3187Q5VZRtoReq8oz5NY/A4XmU6cAoqgQlDp7kKJCZMRjWZ8nsQyxfpFHvfyw==} dev: true @@ -2593,19 +2306,10 @@ packages: resolution: {integrity: sha512-pqKTdqp/c5vsrc0xUPYXTDBo9ixZuGY8es4ZOjjd6HD6bFYbu5QA09VoW3fkY4LF1T0zYk86lN6bZnNlBuOpdQ==} dev: true - /emittery/1.0.1: - resolution: {integrity: sha512-2ID6FdrMD9KDLldGesP6317G78K7km/kMcwItRtVFva7I/cSEOIaLpewaUb+YLXVwdAp3Ctfxh/V5zIl1sj7dQ==} - engines: {node: '>=14.16'} - dev: true - /emoji-regex/8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} dev: true - /emoji-regex/9.2.2: - resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} - dev: true - /emojis-list/3.0.0: resolution: {integrity: sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==} engines: {node: '>= 4'} @@ -2697,21 +2401,11 @@ packages: engines: {node: '>=0.8.0'} dev: true - /escape-string-regexp/2.0.0: - resolution: {integrity: sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==} - engines: {node: '>=8'} - dev: true - /escape-string-regexp/4.0.0: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} engines: {node: '>=10'} dev: true - /escape-string-regexp/5.0.0: - resolution: {integrity: sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==} - engines: {node: '>=12'} - dev: true - /eslint-plugin-react-hooks/4.6.0_eslint@8.23.0: resolution: {integrity: sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==} engines: {node: '>=10'} @@ -2837,12 +2531,6 @@ packages: eslint-visitor-keys: 3.3.0 dev: true - /esprima/4.0.1: - resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} - engines: {node: '>=4'} - hasBin: true - dev: true - /esquery/1.4.0: resolution: {integrity: sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==} engines: {node: '>=0.10'} @@ -2888,10 +2576,6 @@ packages: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} dev: true - /fast-diff/1.2.0: - resolution: {integrity: sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==} - dev: true - /fast-glob/3.2.11: resolution: {integrity: sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==} engines: {node: '>=8.6.0'} @@ -2921,14 +2605,6 @@ packages: reusify: 1.0.4 dev: true - /figures/5.0.0: - resolution: {integrity: sha512-ej8ksPF4x6e5wvK9yevct0UCXh8TTFlWGVLlgjZuoBH1HwjIfKE/IdL5mq89sFA7zELi1VhKpmtDnrs7zWyeyg==} - engines: {node: '>=14'} - dependencies: - escape-string-regexp: 5.0.0 - is-unicode-supported: 1.3.0 - dev: true - /file-entry-cache/6.0.1: resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} engines: {node: ^10.12.0 || >=12.0.0} @@ -2992,14 +2668,6 @@ packages: path-exists: 4.0.0 dev: true - /find-up/6.3.0: - resolution: {integrity: sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dependencies: - locate-path: 7.2.0 - path-exists: 5.0.0 - dev: true - /flat-cache/3.0.4: resolution: {integrity: sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==} engines: {node: ^10.12.0 || >=12.0.0} @@ -3188,17 +2856,6 @@ packages: slash: 4.0.0 dev: true - /globby/13.1.4: - resolution: {integrity: sha512-iui/IiiW+QrJ1X1hKH5qwlMQyv34wJAYwH1vrf8b9kBA4sNiif3gKsMHa+BrdnOpEudWjpotfa7LrTzB1ERS/g==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dependencies: - dir-glob: 3.0.1 - fast-glob: 3.2.11 - ignore: 5.2.0 - merge2: 1.4.1 - slash: 4.0.0 - dev: true - /globby/6.1.0: resolution: {integrity: sha512-KVbFv2TQtbzCoxAnfD6JcHZTYCzyliEaaeM/gH8qQdkKr5s0OP9scEgvdcngyk7AVdY6YVW/TJHd+lQ/Df3Daw==} engines: {node: '>=0.10.0'} @@ -3296,11 +2953,6 @@ packages: postcss: 8.4.14 dev: true - /ignore-by-default/2.1.0: - resolution: {integrity: sha512-yiWd4GVmJp0Q6ghmM2B/V3oZGRmjrKLXvHR3TE1nfoXsmoggllfZUQe74EN0fJdPFZu2NIvNdrMMLm3OsV7Ohw==} - engines: {node: '>=10 <11 || >=12 <13 || >=14'} - dev: true - /ignore/5.2.0: resolution: {integrity: sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==} engines: {node: '>= 4'} @@ -3338,11 +2990,6 @@ packages: engines: {node: '>=8'} dev: true - /indent-string/5.0.0: - resolution: {integrity: sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==} - engines: {node: '>=12'} - dev: true - /inflight/1.0.6: resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} dependencies: @@ -3372,11 +3019,6 @@ packages: engines: {node: '>= 0.10'} dev: true - /irregular-plurals/3.5.0: - resolution: {integrity: sha512-1ANGLZ+Nkv1ptFb2pa8oG8Lem4krflKuX/gINiHJHjJUKaJHk/SXk5x6K3J+39/p0h1RQ2saROclJJ+QLvETCQ==} - engines: {node: '>=8'} - dev: true - /is-arrayish/0.2.1: resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} dev: true @@ -3420,10 +3062,6 @@ packages: has-tostringtag: 1.0.0 dev: true - /is-error/2.2.2: - resolution: {integrity: sha512-IOQqts/aHWbiisY5DuPJQ0gcbvaLFCa7fBa9xoLfxBZvQ+ZI/Zh9xoI7Gk+G64N0FdK4AbibytHht2tWgpJWLg==} - dev: true - /is-extglob/2.1.1: resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} engines: {node: '>=0.10.0'} @@ -3434,11 +3072,6 @@ packages: engines: {node: '>=8'} dev: true - /is-fullwidth-code-point/4.0.0: - resolution: {integrity: sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==} - engines: {node: '>=12'} - dev: true - /is-glob/4.0.3: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} engines: {node: '>=0.10.0'} @@ -3463,16 +3096,6 @@ packages: engines: {node: '>=0.12.0'} dev: true - /is-path-cwd/3.0.0: - resolution: {integrity: sha512-kyiNFFLU0Ampr6SDZitD/DwUo4Zs1nSdnygUBqsu3LooL00Qvb5j+UnvApUn/TTj1J3OuE6BTdQ5rudKmU2ZaA==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dev: true - - /is-path-inside/4.0.0: - resolution: {integrity: sha512-lJJV/5dYS+RcL8uQdBDW9c9uWFLLBNRyFhnAKXw5tVqLlKZ4RMGZKv+YQ/IA3OhD+RpbJa1LLFM1FQPGyIXvOA==} - engines: {node: '>=12'} - dev: true - /is-plain-obj/1.1.0: resolution: {integrity: sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==} engines: {node: '>=0.10.0'} @@ -3495,10 +3118,6 @@ packages: engines: {node: '>=0.10.0'} dev: true - /is-promise/4.0.0: - resolution: {integrity: sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==} - dev: true - /is-regex/1.1.4: resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} engines: {node: '>= 0.4'} @@ -3537,11 +3156,6 @@ packages: engines: {node: '>=10'} dev: true - /is-unicode-supported/1.3.0: - resolution: {integrity: sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==} - engines: {node: '>=12'} - dev: true - /is-weakref/1.0.2: resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} dependencies: @@ -3566,23 +3180,10 @@ packages: supports-color: 8.1.1 dev: true - /js-string-escape/1.0.1: - resolution: {integrity: sha512-Smw4xcfIQ5LVjAOuJCvN/zIodzA/BBSsluuoSykP+lUvScIi4U6RJLfwHet5cxFnCswUjISV8oAXaqaJDY3chg==} - engines: {node: '>= 0.8'} - dev: true - /js-tokens/4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} dev: true - /js-yaml/3.14.1: - resolution: {integrity: sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==} - hasBin: true - dependencies: - argparse: 1.0.10 - esprima: 4.0.1 - dev: true - /js-yaml/4.1.0: resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} hasBin: true @@ -3675,11 +3276,6 @@ packages: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} dev: true - /load-json-file/7.0.1: - resolution: {integrity: sha512-Gnxj3ev3mB5TkVBGad0JM6dmLiQL+o0t23JPBZ9sd+yvSLk05mFoqKBw5N8gbbkU4TNXyqCgIrl/VM17OgUIgQ==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dev: true - /loader-runner/4.3.0: resolution: {integrity: sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==} engines: {node: '>=6.11.5'} @@ -3716,13 +3312,6 @@ packages: p-locate: 5.0.0 dev: true - /locate-path/7.2.0: - resolution: {integrity: sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dependencies: - p-locate: 6.0.0 - dev: true - /lodash.debounce/4.0.8: resolution: {integrity: sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==} dev: true @@ -3776,13 +3365,6 @@ packages: semver: 6.3.0 dev: true - /map-age-cleaner/0.1.3: - resolution: {integrity: sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==} - engines: {node: '>=6'} - dependencies: - p-defer: 1.0.0 - dev: true - /map-obj/1.0.1: resolution: {integrity: sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==} engines: {node: '>=0.10.0'} @@ -3793,36 +3375,14 @@ packages: engines: {node: '>=8'} dev: true - /matcher/5.0.0: - resolution: {integrity: sha512-s2EMBOWtXFc8dgqvoAzKJXxNHibcdJMV0gwqKUaw9E2JBJuGUK7DrNKrA6g/i+v72TT16+6sVm5mS3thaMLQUw==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dependencies: - escape-string-regexp: 5.0.0 - dev: true - /mathml-tag-names/2.1.3: resolution: {integrity: sha512-APMBEanjybaPzUrfqU0IMU5I0AswKMH7k8OTLs0vvV4KZpExkTkY87nR/zpbuTPj+gARop7aGUbl11pnDfW6xg==} dev: true - /md5-hex/3.0.1: - resolution: {integrity: sha512-BUiRtTtV39LIJwinWBjqVsU9xhdnz7/i889V859IBFpuqGAj6LuOvHv5XLbgZ2R7ptJoJaEcxkv88/h25T7Ciw==} - engines: {node: '>=8'} - dependencies: - blueimp-md5: 2.19.0 - dev: true - /mdn-data/2.0.23: resolution: {integrity: sha512-IonVb7pfla2U4zW8rc7XGrtgq11BvYeCxWN8HS+KFBnLDE7XDK9AAMVhRuG6fj9BBsjc69Fqsp6WEActEdNTDQ==} dev: true - /mem/9.0.2: - resolution: {integrity: sha512-F2t4YIv9XQUBHt6AOJ0y7lSmP1+cY7Fm1DRh9GClTGzKST7UWLMx6ly9WZdLH/G/ppM5RL4MlQfRT71ri9t19A==} - engines: {node: '>=12.20'} - dependencies: - map-age-cleaner: 0.1.3 - mimic-fn: 4.0.0 - dev: true - /meow/9.0.0: resolution: {integrity: sha512-+obSblOQmRhcyBt62furQqRAQpNyWXo8BuQ5bN7dG8wmwQ+vwHKp/rCFD4CrTP8CsDQD1sjoZ94K417XEUk8IQ==} engines: {node: '>=10'} @@ -3870,11 +3430,6 @@ packages: mime-db: 1.52.0 dev: true - /mimic-fn/4.0.0: - resolution: {integrity: sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==} - engines: {node: '>=12'} - dev: true - /min-indent/1.0.1: resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} engines: {node: '>=4'} @@ -3967,11 +3522,6 @@ packages: resolution: {integrity: sha512-U9h1NLROZTq9uE1SNffn6WuPDg8icmi3ns4rEl/oTfIle4iLjTliCzgTsbaIFMq/Xn078/lfY/BL0GWZ+psK4Q==} dev: true - /nofilter/3.1.0: - resolution: {integrity: sha512-l2NNj07e9afPnhAhvgVrCD/oy2Ai1yfLpuo3EpiO1jFTsB4sFz6oIfAfSZyQzVpkZQ9xS8ZS5g1jCBgq4Hwo0g==} - engines: {node: '>=12.19'} - dev: true - /normalize-package-data/2.5.0: resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} dependencies: @@ -4072,18 +3622,6 @@ packages: word-wrap: 1.2.3 dev: true - /p-defer/1.0.0: - resolution: {integrity: sha512-wB3wfAxZpk2AzOfUMJNL+d36xothRSyj8EXOa4f6GMqYDN9BJaaSISbsk+wS9abmnebVw95C2Kb5t85UmpCxuw==} - engines: {node: '>=4'} - dev: true - - /p-event/5.0.1: - resolution: {integrity: sha512-dd589iCQ7m1L0bmC5NLlVYfy3TbBEsMUfWx9PyAgPeIcFZ/E2yaTZ4Rz4MiBmmJShviiftHVXOqfnfzJ6kyMrQ==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dependencies: - p-timeout: 5.1.0 - dev: true - /p-limit/2.3.0: resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} engines: {node: '>=6'} @@ -4098,13 +3636,6 @@ packages: yocto-queue: 0.1.0 dev: true - /p-limit/4.0.0: - resolution: {integrity: sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dependencies: - yocto-queue: 1.0.0 - dev: true - /p-locate/3.0.0: resolution: {integrity: sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==} engines: {node: '>=6'} @@ -4126,25 +3657,6 @@ packages: p-limit: 3.1.0 dev: true - /p-locate/6.0.0: - resolution: {integrity: sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dependencies: - p-limit: 4.0.0 - dev: true - - /p-map/5.5.0: - resolution: {integrity: sha512-VFqfGDHlx87K66yZrNdI4YGtD70IRyd+zSvgks6mzHPRNkoKy+9EKP4SFC77/vTTQYmRmti7dvqC+m5jBrBAcg==} - engines: {node: '>=12'} - dependencies: - aggregate-error: 4.0.1 - dev: true - - /p-timeout/5.1.0: - resolution: {integrity: sha512-auFDyzzzGZZZdHz3BtET9VEz0SE/uMEAx7uWfGPucfzEwwe/xH0iVeZibQmANYE/hp9T2+UUZT5m+BKyrDp3Ew==} - engines: {node: '>=12'} - dev: true - /p-try/2.2.0: resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} engines: {node: '>=6'} @@ -4167,11 +3679,6 @@ packages: lines-and-columns: 1.2.4 dev: true - /parse-ms/3.0.0: - resolution: {integrity: sha512-Tpb8Z7r7XbbtBTrM9UhpkzzaMrqA2VXMT3YChzYltwV3P3pM6t8wl7TvpMnSTosz1aQAdVib7kdoys7vYOPerw==} - engines: {node: '>=12'} - dev: true - /path-exists/3.0.0: resolution: {integrity: sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==} engines: {node: '>=4'} @@ -4182,11 +3689,6 @@ packages: engines: {node: '>=8'} dev: true - /path-exists/5.0.0: - resolution: {integrity: sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dev: true - /path-is-absolute/1.0.1: resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} engines: {node: '>=0.10.0'} @@ -4247,14 +3749,6 @@ packages: engines: {node: '>= 6'} dev: true - /pkg-conf/4.0.0: - resolution: {integrity: sha512-7dmgi4UY4qk+4mj5Cd8v/GExPo0K+SlY+hulOSdfZ/T6jVH6//y7NtzZo5WrfhDBxuQ0jCa7fLZmNaNh7EWL/w==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dependencies: - find-up: 6.3.0 - load-json-file: 7.0.1 - dev: true - /pkg-dir/3.0.0: resolution: {integrity: sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==} engines: {node: '>=6'} @@ -4276,13 +3770,6 @@ packages: find-up: 3.0.0 dev: true - /plur/5.1.0: - resolution: {integrity: sha512-VP/72JeXqak2KiOzjgKtQen5y3IZHn+9GOuLDafPv0eXa47xq0At93XahYBs26MsifCQ4enGKwbjBTKgb9QJXg==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dependencies: - irregular-plurals: 3.5.0 - dev: true - /postcss-cli/9.1.0_postcss@8.4.14: resolution: {integrity: sha512-zvDN2ADbWfza42sAnj+O2uUWyL0eRL1V+6giM2vi4SqTR3gTYy8XzcpfwccayF2szcUif0HMmXiEaDv9iEhcpw==} engines: {node: '>=12'} @@ -4476,13 +3963,6 @@ packages: engines: {node: '>= 0.8'} dev: true - /pretty-ms/8.0.0: - resolution: {integrity: sha512-ASJqOugUF1bbzI35STMBUpZqdfYKlJugy6JBziGi2EE+AL5JPJGSzvpeVXojxrr0ViUYoToUjb5kjSEGf7Y83Q==} - engines: {node: '>=14.16'} - dependencies: - parse-ms: 3.0.0 - dev: true - /prop-types/15.8.1: resolution: {integrity: sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==} dependencies: @@ -4736,13 +4216,6 @@ packages: lru-cache: 6.0.0 dev: true - /serialize-error/7.0.1: - resolution: {integrity: sha512-8I8TjW5KMOKsZQTvoxjuSIa7foAwPWGOts+6o7sgjz41/qMD9VQHEDxi6PBvK2l0MXUmqZyNpUK+T2tQaaElvw==} - engines: {node: '>=10'} - dependencies: - type-fest: 0.13.1 - dev: true - /serialize-javascript/6.0.0: resolution: {integrity: sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==} dependencies: @@ -4780,11 +4253,6 @@ packages: resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} dev: true - /signal-exit/4.0.2: - resolution: {integrity: sha512-MY2/qGx4enyjprQnFaZsHib3Yadh3IXyV2C321GY0pjGfVBu4un0uDJkwgdxqO+Rdx8JMT8IfJIRwbYVz3Ob3Q==} - engines: {node: '>=14'} - dev: true - /slash/3.0.0: resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} engines: {node: '>=8'} @@ -4804,14 +4272,6 @@ packages: is-fullwidth-code-point: 3.0.0 dev: true - /slice-ansi/5.0.0: - resolution: {integrity: sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==} - engines: {node: '>=12'} - dependencies: - ansi-styles: 6.2.1 - is-fullwidth-code-point: 4.0.0 - dev: true - /source-map-js/1.0.2: resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} engines: {node: '>=0.10.0'} @@ -4851,17 +4311,6 @@ packages: resolution: {integrity: sha512-Ctl2BrFiM0X3MANYgj3CkygxhRmr9mi6xhejbdO960nF6EDJApTYpn0BQnDKlnNBULKiCN1n3w9EBkHK8ZWg+g==} dev: true - /sprintf-js/1.0.3: - resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} - dev: true - - /stack-utils/2.0.6: - resolution: {integrity: sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==} - engines: {node: '>=10'} - dependencies: - escape-string-regexp: 2.0.0 - dev: true - /string-width/4.2.3: resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} engines: {node: '>=8'} @@ -4871,15 +4320,6 @@ packages: strip-ansi: 6.0.1 dev: true - /string-width/5.1.2: - resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} - engines: {node: '>=12'} - dependencies: - eastasianwidth: 0.2.0 - emoji-regex: 9.2.2 - strip-ansi: 7.0.1 - dev: true - /string.prototype.matchall/4.0.7: resolution: {integrity: sha512-f48okCX7JiwVi1NXCVWcFnZgADDC/n2vePlQ/KUCNqCikLLilQvwjMO8+BHVKvgzH0JB0J9LEPgxOGT02RoETg==} dependencies: @@ -4916,13 +4356,6 @@ packages: ansi-regex: 5.0.1 dev: true - /strip-ansi/7.0.1: - resolution: {integrity: sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==} - engines: {node: '>=12'} - dependencies: - ansi-regex: 6.0.1 - dev: true - /strip-indent/3.0.0: resolution: {integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==} engines: {node: '>=8'} @@ -5005,16 +4438,6 @@ packages: - supports-color dev: true - /supertap/3.0.1: - resolution: {integrity: sha512-u1ZpIBCawJnO+0QePsEiOknOfCRq0yERxiAchT0i4li0WHNUJbf0evXXSXOcCAR4M8iMDoajXYmstm/qO81Isw==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dependencies: - indent-string: 5.0.0 - js-yaml: 3.14.1 - serialize-error: 7.0.1 - strip-ansi: 7.0.1 - dev: true - /supports-color/5.5.0: resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} engines: {node: '>=4'} @@ -5069,11 +4492,6 @@ packages: engines: {node: '>=6'} dev: true - /temp-dir/3.0.0: - resolution: {integrity: sha512-nHc6S/bwIilKHNRgK/3jlhDoIHcp45YgyiwcAk46Tr0LfEqGBVpmiAyuiuxeVE44m3mXnEeVhaipLOEWmH+Njw==} - engines: {node: '>=14.16'} - dev: true - /terser-webpack-plugin/5.3.3_webpack@5.73.0: resolution: {integrity: sha512-Fx60G5HNYknNTNQnzQ1VePRuu89ZVYWfjRAeT5rITuCY/1b08s49e5kSQwHDirKZWuoKOBRFS98EUUoZ9kLEwQ==} engines: {node: '>= 10.13.0'} @@ -5141,11 +4559,6 @@ packages: resolution: {integrity: sha512-89Gi5raiWA3QZ4b2ePcEwswC3me9JIg+ToSgtE0JWeCynLnLxNr/f9G+xfo9K+Oj4AFdom8YNJjibIARTJmapQ==} dev: true - /time-zone/1.0.0: - resolution: {integrity: sha512-TIsDdtKo6+XrPtiTm1ssmMngN1sAhyKnTO2kunQWqNPWIVvCm15Wmw4SWInwTVgJ5u/Tr04+8Ei9TNcw4x4ONA==} - engines: {node: '>=4'} - dev: true - /to-fast-properties/2.0.0: resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} engines: {node: '>=4'} @@ -5170,11 +4583,6 @@ packages: prelude-ls: 1.2.1 dev: true - /type-fest/0.13.1: - resolution: {integrity: sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==} - engines: {node: '>=10'} - dev: true - /type-fest/0.18.1: resolution: {integrity: sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==} engines: {node: '>=10'} @@ -5423,11 +4831,6 @@ packages: - uglify-js dev: true - /well-known-symbols/2.0.0: - resolution: {integrity: sha512-ZMjC3ho+KXo0BfJb7JgtQ5IBuvnShdlACNkKkdsqBmYw3bPAaJfPeYUo6tLUaT5tG/Gkh7xkpBhKRQ9e7pyg9Q==} - engines: {node: '>=6'} - dev: true - /which-boxed-primitive/1.0.2: resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} dependencies: @@ -5487,14 +4890,6 @@ packages: signal-exit: 3.0.7 dev: true - /write-file-atomic/5.0.1: - resolution: {integrity: sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==} - engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - dependencies: - imurmurhash: 0.1.4 - signal-exit: 4.0.2 - dev: true - /y18n/5.0.8: resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} engines: {node: '>=10'} @@ -5519,11 +4914,6 @@ packages: engines: {node: '>=12'} dev: true - /yargs-parser/21.1.1: - resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} - engines: {node: '>=12'} - dev: true - /yargs-unparser/2.0.0: resolution: {integrity: sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==} engines: {node: '>=10'} @@ -5560,25 +4950,7 @@ packages: yargs-parser: 21.0.1 dev: true - /yargs/17.7.2: - resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} - engines: {node: '>=12'} - dependencies: - cliui: 8.0.1 - escalade: 3.1.1 - get-caller-file: 2.0.5 - require-directory: 2.1.1 - string-width: 4.2.3 - y18n: 5.0.8 - yargs-parser: 21.1.1 - dev: true - /yocto-queue/0.1.0: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} dev: true - - /yocto-queue/1.0.0: - resolution: {integrity: sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==} - engines: {node: '>=12.20'} - dev: true diff --git a/renderer/.babelrc b/renderer/.babelrc.js similarity index 55% rename from renderer/.babelrc rename to renderer/.babelrc.js index e016ad43..35d42594 100644 --- a/renderer/.babelrc +++ b/renderer/.babelrc.js @@ -1,22 +1,24 @@ -{ - "presets": [ +const path = require("path"); + +module.exports = { + presets: [ "@babel/react", ["@babel/env", { - "targets": { - "node": "14.16.0", - "chrome": "91" + targets: { + node: "14.16.0", + chrome: "91" } }] ], - "plugins": [[ + plugins: [[ "module-resolver", { - "alias": { + alias: { "builtins": "./src/builtins/builtins.js", "data": "./src/data/data.js", "modules": "./src/modules/modules.js", - "common": "../common" + "@common": path.join(__dirname, "..", "common"), } } ]] diff --git a/renderer/jsconfig.json b/renderer/jsconfig.json index 27b51680..2de07da2 100644 --- a/renderer/jsconfig.json +++ b/renderer/jsconfig.json @@ -7,7 +7,7 @@ "modules": ["./src/modules/modules.js"], "builtins": ["./src/builtins/builtins.js"], "data": ["./src/data/data.js"], - "common": ["../common"] + "@common/*": ["../common/*"] } }, "exclude": ["node_modules"] diff --git a/renderer/src/modules/addonmanager.js b/renderer/src/modules/addonmanager.js index f361f116..ed8a5f36 100644 --- a/renderer/src/modules/addonmanager.js +++ b/renderer/src/modules/addonmanager.js @@ -1,4 +1,4 @@ -import Logger from "common/logger"; +import Logger from "@common/logger"; import Settings from "./settingsmanager"; import Events from "./emitter"; import DataStore from "./datastore"; diff --git a/renderer/src/modules/api/contextmenu.js b/renderer/src/modules/api/contextmenu.js index 33a9c288..dc1378dc 100644 --- a/renderer/src/modules/api/contextmenu.js +++ b/renderer/src/modules/api/contextmenu.js @@ -1,6 +1,6 @@ import WebpackModules from "../webpackmodules"; import Patcher from "../patcher"; -import Logger from "common/logger"; +import Logger from "@common/logger"; import {React} from "../modules"; let startupComplete = false; diff --git a/renderer/src/modules/api/index.js b/renderer/src/modules/api/index.js index a7f5f2d7..08b34b77 100644 --- a/renderer/src/modules/api/index.js +++ b/renderer/src/modules/api/index.js @@ -1,6 +1,6 @@ import PluginManager from "../pluginmanager"; import ThemeManager from "../thememanager"; -import Logger from "common/logger"; +import Logger from "@common/logger"; import AddonAPI from "./addonapi"; import Data from "./data"; diff --git a/renderer/src/modules/api/legacy.js b/renderer/src/modules/api/legacy.js index 2b6cd45a..72a605c6 100644 --- a/renderer/src/modules/api/legacy.js +++ b/renderer/src/modules/api/legacy.js @@ -7,7 +7,7 @@ import Toasts from "../../ui/toasts"; import Notices from "../../ui/notices"; import Modals from "../../ui/modals"; import Settings from "../settingsmanager"; -import Logger from "common/logger"; +import Logger from "@common/logger"; import Patcher from "../patcher"; import ipc from "../ipc"; diff --git a/renderer/src/modules/api/patcher.js b/renderer/src/modules/api/patcher.js index 008e4dcd..df7673bc 100644 --- a/renderer/src/modules/api/patcher.js +++ b/renderer/src/modules/api/patcher.js @@ -1,4 +1,4 @@ -import Logger from "common/logger"; +import Logger from "@common/logger"; import {default as MainPatcher} from "../patcher"; /** diff --git a/renderer/src/modules/api/webpack.js b/renderer/src/modules/api/webpack.js index 7ac28e20..3fd0e24f 100644 --- a/renderer/src/modules/api/webpack.js +++ b/renderer/src/modules/api/webpack.js @@ -1,4 +1,4 @@ -import Logger from "common/logger"; +import Logger from "@common/logger"; import WebpackModules, {Filters} from "../webpackmodules"; /** diff --git a/renderer/src/modules/core.js b/renderer/src/modules/core.js index 94dde01c..cb7472ad 100644 --- a/renderer/src/modules/core.js +++ b/renderer/src/modules/core.js @@ -1,6 +1,6 @@ import LocaleManager from "./localemanager"; -import Logger from "common/logger"; +import Logger from "@common/logger"; import {Config, Changelog} from "data"; import DOMManager from "./dommanager"; import PluginManager from "./pluginmanager"; diff --git a/renderer/src/modules/datastore.js b/renderer/src/modules/datastore.js index 40d357d1..e31e623c 100644 --- a/renderer/src/modules/datastore.js +++ b/renderer/src/modules/datastore.js @@ -1,5 +1,5 @@ import {Config} from "data"; -import Logger from "common/logger"; +import Logger from "@common/logger"; const fs = require("fs"); const path = require("path"); const releaseChannel = window?.DiscordNative?.app?.getReleaseChannel?.() ?? "stable"; diff --git a/renderer/src/modules/ipc.js b/renderer/src/modules/ipc.js index 705157d3..d5219763 100644 --- a/renderer/src/modules/ipc.js +++ b/renderer/src/modules/ipc.js @@ -2,7 +2,7 @@ import {ipcRenderer as ipc} from "electron"; import Events from "./emitter"; -import * as IPCEvents from "common/constants/ipcevents"; +import * as IPCEvents from "@common/constants/ipcevents"; export default new class IPCRenderer { diff --git a/renderer/src/modules/modules.js b/renderer/src/modules/modules.js index b1377797..e26911cd 100644 --- a/renderer/src/modules/modules.js +++ b/renderer/src/modules/modules.js @@ -14,5 +14,5 @@ export {default as Patcher} from "./patcher"; export {default as LocaleManager} from "./localemanager"; export {default as Strings} from "./strings"; export {default as IPC} from "./ipc"; -export {default as Logger} from "common/logger"; +export {default as Logger} from "@common/logger"; export {default as DiscordClasses} from "./discordclasses"; \ No newline at end of file diff --git a/renderer/src/modules/patcher.js b/renderer/src/modules/patcher.js index 3564c469..3379fe63 100644 --- a/renderer/src/modules/patcher.js +++ b/renderer/src/modules/patcher.js @@ -3,7 +3,7 @@ * instead of the original function. Can also alter arguments and return values. */ - import Logger from "common/logger"; + import Logger from "@common/logger"; import DiscordModules from "./discordmodules"; import WebpackModules from "./webpackmodules"; diff --git a/renderer/src/modules/pluginmanager.js b/renderer/src/modules/pluginmanager.js index c315fd0c..2c885185 100644 --- a/renderer/src/modules/pluginmanager.js +++ b/renderer/src/modules/pluginmanager.js @@ -1,5 +1,5 @@ import {Config} from "data"; -import Logger from "common/logger"; +import Logger from "@common/logger"; import AddonManager from "./addonmanager"; import AddonError from "../structs/addonerror"; import Settings from "./settingsmanager"; diff --git a/renderer/src/modules/settingsmanager.js b/renderer/src/modules/settingsmanager.js index c41652ef..2957f8b7 100644 --- a/renderer/src/modules/settingsmanager.js +++ b/renderer/src/modules/settingsmanager.js @@ -1,5 +1,5 @@ import {SettingsConfig} from "data"; -import Logger from "common/logger"; +import Logger from "@common/logger"; import DataStore from "./datastore"; import Events from "./emitter"; import DiscordModules from "./discordmodules"; diff --git a/renderer/src/modules/updater.js b/renderer/src/modules/updater.js index b5e3b12b..da6c0905 100644 --- a/renderer/src/modules/updater.js +++ b/renderer/src/modules/updater.js @@ -3,7 +3,7 @@ import fileSystem from "fs"; import {Config} from "data"; import path from "path"; -import Logger from "common/logger"; +import Logger from "@common/logger"; import Events from "./emitter"; import IPC from "./ipc"; diff --git a/renderer/src/modules/utilities.js b/renderer/src/modules/utilities.js index 774f2f12..e3d31cb4 100644 --- a/renderer/src/modules/utilities.js +++ b/renderer/src/modules/utilities.js @@ -1,4 +1,4 @@ -import Logger from "../../../common/logger"; +import Logger from "@common/logger"; export default class Utilities { /** diff --git a/renderer/src/polyfill/https.js b/renderer/src/polyfill/https.js index 9ef7e353..db0b97de 100644 --- a/renderer/src/polyfill/https.js +++ b/renderer/src/polyfill/https.js @@ -1,4 +1,4 @@ -import EventEmitter from "common/events"; +import EventEmitter from "@common/events"; import Remote from "./remote"; export function get(url, options = {}, callback) { diff --git a/renderer/src/polyfill/index.js b/renderer/src/polyfill/index.js index 72434088..0f7f18ed 100644 --- a/renderer/src/polyfill/index.js +++ b/renderer/src/polyfill/index.js @@ -2,7 +2,7 @@ import Module from "./module"; import * as vm from "./vm"; import * as fs from "./fs"; import request from "./request"; -import EventEmitter from "common/events"; +import EventEmitter from "@common/events"; import * as https from "./https"; import Buffer from "./buffer"; import crypto from "./crypto"; diff --git a/renderer/src/polyfill/module.js b/renderer/src/polyfill/module.js index 9bf8a6fa..16dc8923 100644 --- a/renderer/src/polyfill/module.js +++ b/renderer/src/polyfill/module.js @@ -1,4 +1,4 @@ -import Logger from "common/logger"; +import Logger from "@common/logger"; import {compileFunction} from "./vm"; import Remote from "./remote"; import fs from "./fs"; diff --git a/renderer/src/structs/builtin.js b/renderer/src/structs/builtin.js index f3c6358c..da5753fb 100644 --- a/renderer/src/structs/builtin.js +++ b/renderer/src/structs/builtin.js @@ -1,4 +1,4 @@ -import Logger from "common/logger"; +import Logger from "@common/logger"; import Events from "../modules/emitter"; import Settings from "../modules/settingsmanager"; import Patcher from "../modules/patcher"; diff --git a/renderer/src/ui/errorboundary.jsx b/renderer/src/ui/errorboundary.jsx index af27c9da..e5ee5af7 100644 --- a/renderer/src/ui/errorboundary.jsx +++ b/renderer/src/ui/errorboundary.jsx @@ -1,4 +1,4 @@ -import Logger from "common/logger"; +import Logger from "@common/logger"; import {React, IPC} from "modules"; export default class ErrorBoundary extends React.Component { diff --git a/renderer/src/ui/modals.js b/renderer/src/ui/modals.js index da72056d..620e7edf 100644 --- a/renderer/src/ui/modals.js +++ b/renderer/src/ui/modals.js @@ -1,5 +1,5 @@ import {Config} from "data"; -import Logger from "common/logger"; +import Logger from "@common/logger"; import {WebpackModules, React, ReactDOM, Settings, Strings, DOMManager, DiscordModules, DiscordClasses} from "modules"; import FormattableString from "../structs/string"; import AddonErrorModal from "./addonerrormodal"; diff --git a/renderer/src/ui/notices.js b/renderer/src/ui/notices.js index f41a5025..7780dd46 100644 --- a/renderer/src/ui/notices.js +++ b/renderer/src/ui/notices.js @@ -1,4 +1,5 @@ -import {WebpackModules, DOMManager} from "modules"; +import WebpackModules from "@modules/webpackmodules"; +import DOMManager from "@modules/dommanager"; export default class Notices { static get baseClass() {return this.__baseClass ??= WebpackModules.getByProps("container", "base")?.base;} diff --git a/renderer/src/ui/settings/addoncard.jsx b/renderer/src/ui/settings/addoncard.jsx index 927877cc..c0d2f9b6 100644 --- a/renderer/src/ui/settings/addoncard.jsx +++ b/renderer/src/ui/settings/addoncard.jsx @@ -1,4 +1,4 @@ -import Logger from "common/logger"; +import Logger from "@common/logger"; import {React, Strings, WebpackModules, DiscordModules} from "modules"; import SimpleMarkdown from "../../structs/markdown"; import EditIcon from "../icons/edit"; diff --git a/renderer/src/ui/toasts.js b/renderer/src/ui/toasts.js index 121c45ec..a8a023fb 100644 --- a/renderer/src/ui/toasts.js +++ b/renderer/src/ui/toasts.js @@ -1,4 +1,4 @@ -import Logger from "common/logger"; +import Logger from "@common/logger"; import {WebpackModules, Settings, DOMManager} from "modules"; export default class Toasts { diff --git a/renderer/src/ui/tooltip.js b/renderer/src/ui/tooltip.js index ef5dac4f..25a19cbf 100644 --- a/renderer/src/ui/tooltip.js +++ b/renderer/src/ui/tooltip.js @@ -1,4 +1,4 @@ -import Logger from "common/logger"; +import Logger from "@common/logger"; import {DOMManager} from "modules"; From 9bf16a8b981f998f900770eb3968bd46363dda1e Mon Sep 17 00:00:00 2001 From: Zack Rauen Date: Fri, 19 May 2023 17:14:55 -0400 Subject: [PATCH 08/15] Adjust module import namespace --- renderer/.babelrc.js | 2 +- renderer/jsconfig.json | 2 +- renderer/src/builtins/customcss.js | 9 ++++++++- renderer/src/builtins/developer/reactdevtools.js | 4 +++- renderer/src/builtins/general/mediakeys.js | 4 +++- renderer/src/builtins/general/voicedisconnect.js | 2 +- renderer/src/builtins/window/transparency.js | 4 +++- renderer/src/modules/api/index.js | 2 +- renderer/src/modules/react.js | 3 +++ renderer/src/modules/reactdom.js | 2 ++ renderer/src/structs/markdown.js | 3 ++- renderer/src/ui/addonerrormodal.jsx | 6 +++++- renderer/src/ui/blankslates/emptyimage.jsx | 3 ++- renderer/src/ui/blankslates/noresults.jsx | 3 ++- renderer/src/ui/customcss/checkbox.jsx | 2 +- renderer/src/ui/customcss/csseditor.jsx | 5 ++++- renderer/src/ui/customcss/editor.jsx | 4 +++- renderer/src/ui/divider.jsx | 2 +- renderer/src/ui/errorboundary.jsx | 3 ++- renderer/src/ui/floating/container.jsx | 3 ++- renderer/src/ui/floating/window.jsx | 3 ++- renderer/src/ui/floatingwindows.js | 6 +++++- renderer/src/ui/icons/bdlogo.jsx | 2 +- renderer/src/ui/icons/check.jsx | 2 +- renderer/src/ui/icons/close.jsx | 2 +- renderer/src/ui/icons/cog.jsx | 2 +- renderer/src/ui/icons/delete.jsx | 2 +- renderer/src/ui/icons/detach.jsx | 2 +- renderer/src/ui/icons/dollarsign.jsx | 2 +- renderer/src/ui/icons/downarrow.jsx | 2 +- renderer/src/ui/icons/edit.jsx | 2 +- renderer/src/ui/icons/error.jsx | 2 +- renderer/src/ui/icons/extension.jsx | 2 +- renderer/src/ui/icons/favorite.jsx | 2 +- renderer/src/ui/icons/fullscreen.jsx | 2 +- renderer/src/ui/icons/github.jsx | 2 +- renderer/src/ui/icons/globe.jsx | 2 +- renderer/src/ui/icons/grid.jsx | 2 +- renderer/src/ui/icons/history.jsx | 2 +- renderer/src/ui/icons/keyboard.jsx | 2 +- renderer/src/ui/icons/list.jsx | 2 +- renderer/src/ui/icons/magnifyingglass.jsx | 2 +- renderer/src/ui/icons/next.jsx | 2 +- renderer/src/ui/icons/patreon.jsx | 2 +- renderer/src/ui/icons/previous.jsx | 2 +- renderer/src/ui/icons/radio.jsx | 2 +- renderer/src/ui/icons/reload.jsx | 2 +- renderer/src/ui/icons/save.jsx | 2 +- renderer/src/ui/icons/search.jsx | 2 +- renderer/src/ui/icons/support.jsx | 2 +- renderer/src/ui/icons/theme.jsx | 2 +- renderer/src/ui/icons/twitch.jsx | 2 +- renderer/src/ui/misc/addoneditor.jsx | 3 ++- renderer/src/ui/modals.js | 9 ++++++++- renderer/src/ui/settings.js | 8 +++++++- renderer/src/ui/settings/addoncard.jsx | 5 ++++- renderer/src/ui/settings/addonlist.jsx | 6 +++++- renderer/src/ui/settings/components/color.jsx | 3 ++- renderer/src/ui/settings/components/dropdown.jsx | 2 +- renderer/src/ui/settings/components/item.jsx | 2 +- renderer/src/ui/settings/components/keybind.jsx | 2 +- renderer/src/ui/settings/components/number.jsx | 2 +- renderer/src/ui/settings/components/radio.jsx | 2 +- renderer/src/ui/settings/components/search.jsx | 2 +- renderer/src/ui/settings/components/slider.jsx | 2 +- renderer/src/ui/settings/components/switch.jsx | 2 +- renderer/src/ui/settings/components/textbox.jsx | 2 +- renderer/src/ui/settings/drawer.jsx | 2 +- renderer/src/ui/settings/group.jsx | 2 +- renderer/src/ui/settings/sidebarheader.jsx | 3 ++- renderer/src/ui/settings/title.jsx | 2 +- renderer/src/ui/toasts.js | 5 ++++- renderer/src/ui/tooltip.js | 2 +- renderer/src/ui/updater.jsx | 4 +++- 74 files changed, 137 insertions(+), 72 deletions(-) create mode 100644 renderer/src/modules/react.js create mode 100644 renderer/src/modules/reactdom.js diff --git a/renderer/.babelrc.js b/renderer/.babelrc.js index 35d42594..6ed6cb95 100644 --- a/renderer/.babelrc.js +++ b/renderer/.babelrc.js @@ -17,7 +17,7 @@ module.exports = { alias: { "builtins": "./src/builtins/builtins.js", "data": "./src/data/data.js", - "modules": "./src/modules/modules.js", + "@modules": path.join(__dirname, "src", "modules"), "@common": path.join(__dirname, "..", "common"), } } diff --git a/renderer/jsconfig.json b/renderer/jsconfig.json index 2de07da2..c98c9b52 100644 --- a/renderer/jsconfig.json +++ b/renderer/jsconfig.json @@ -4,9 +4,9 @@ "allowSyntheticDefaultImports": false, "baseUrl": "./", "paths": { - "modules": ["./src/modules/modules.js"], "builtins": ["./src/builtins/builtins.js"], "data": ["./src/data/data.js"], + "@modules/*": ["./src/modules/*"], "@common/*": ["../common/*"] } }, diff --git a/renderer/src/builtins/customcss.js b/renderer/src/builtins/customcss.js index 6f830f1c..04318093 100644 --- a/renderer/src/builtins/customcss.js +++ b/renderer/src/builtins/customcss.js @@ -1,5 +1,12 @@ import Builtin from "../structs/builtin"; -import {Settings, DataStore, React, WebpackModules, Events, DOMManager, Strings, DiscordModules} from "modules"; +import Settings from "@modules/settingsmanager"; +import DataStore from "@modules/datastore"; +import React from "@modules/react"; +import WebpackModules from "@modules/webpackmodules"; +import Events from "@modules/emitter"; +import DOMManager from "@modules/dommanager"; +import Strings from "@modules/strings"; +import DiscordModules from "@modules/discordmodules"; import CSSEditor from "../ui/customcss/csseditor"; import FloatingWindows from "../ui/floatingwindows"; import SettingsTitle from "../ui/settings/title"; diff --git a/renderer/src/builtins/developer/reactdevtools.js b/renderer/src/builtins/developer/reactdevtools.js index 418360a6..56635fef 100644 --- a/renderer/src/builtins/developer/reactdevtools.js +++ b/renderer/src/builtins/developer/reactdevtools.js @@ -1,6 +1,8 @@ import Builtin from "../../structs/builtin"; import Modals from "../../ui/modals"; -import {Strings, IPC} from "modules"; + +import Strings from "@modules/strings"; +import IPC from "@modules/ipc"; export default new class ReactDevTools extends Builtin { get name() {return "ReactDevTools";} diff --git a/renderer/src/builtins/general/mediakeys.js b/renderer/src/builtins/general/mediakeys.js index e2fe1a86..b1cb210b 100644 --- a/renderer/src/builtins/general/mediakeys.js +++ b/renderer/src/builtins/general/mediakeys.js @@ -1,6 +1,8 @@ import Builtin from "../../structs/builtin"; import Modals from "../../ui/modals"; -import {Strings, IPC} from "modules"; + +import Strings from "@modules/strings"; +import IPC from "@modules/ipc"; export default new class MediaKeys extends Builtin { get name() {return "DisableMediaKeys";} diff --git a/renderer/src/builtins/general/voicedisconnect.js b/renderer/src/builtins/general/voicedisconnect.js index bacd3eff..a8089996 100644 --- a/renderer/src/builtins/general/voicedisconnect.js +++ b/renderer/src/builtins/general/voicedisconnect.js @@ -1,5 +1,5 @@ import Builtin from "../../structs/builtin"; -import {DiscordModules} from "modules"; +import DiscordModules from "@modules/discordmodules"; export default new class VoiceDisconnect extends Builtin { get name() {return "VoiceDisconnect";} diff --git a/renderer/src/builtins/window/transparency.js b/renderer/src/builtins/window/transparency.js index 0b9ee3a5..e49e1efc 100644 --- a/renderer/src/builtins/window/transparency.js +++ b/renderer/src/builtins/window/transparency.js @@ -1,6 +1,8 @@ import Builtin from "../../structs/builtin"; import Modals from "../../ui/modals"; -import {Strings, IPC} from "modules"; + +import Strings from "@modules/strings"; +import IPC from "@modules/ipc"; export default new class WindowTransparency extends Builtin { get name() {return "WindowTransparency";} diff --git a/renderer/src/modules/api/index.js b/renderer/src/modules/api/index.js index 08b34b77..150c61f9 100644 --- a/renderer/src/modules/api/index.js +++ b/renderer/src/modules/api/index.js @@ -12,7 +12,7 @@ import Utils from "./utils"; import Webpack from "./webpack"; import * as Legacy from "./legacy"; import ContextMenu from "./contextmenu"; -import {DiscordModules} from "modules"; +import DiscordModules from "@modules/discordmodules"; const bounded = new Map(); const PluginAPI = new AddonAPI(PluginManager); diff --git a/renderer/src/modules/react.js b/renderer/src/modules/react.js new file mode 100644 index 00000000..b5720fbd --- /dev/null +++ b/renderer/src/modules/react.js @@ -0,0 +1,3 @@ +import DiscordModules from "./discordmodules"; +export default DiscordModules.React; +export const ReactDOM = DiscordModules.ReactDOM; \ No newline at end of file diff --git a/renderer/src/modules/reactdom.js b/renderer/src/modules/reactdom.js new file mode 100644 index 00000000..19d4e76c --- /dev/null +++ b/renderer/src/modules/reactdom.js @@ -0,0 +1,2 @@ +import DiscordModules from "./discordmodules"; +export default DiscordModules.ReactDOM; \ No newline at end of file diff --git a/renderer/src/structs/markdown.js b/renderer/src/structs/markdown.js index fc6464ba..b311407d 100644 --- a/renderer/src/structs/markdown.js +++ b/renderer/src/structs/markdown.js @@ -1,4 +1,5 @@ -import {DiscordModules, Utilities} from "modules"; +import DiscordModules from "@modules/discordmodules"; +import Utilities from "@modules/utilities"; export default class SimpleMarkdownExt { static parseToReact(str) { diff --git a/renderer/src/ui/addonerrormodal.jsx b/renderer/src/ui/addonerrormodal.jsx index 5ac9bfaa..9cd62a74 100644 --- a/renderer/src/ui/addonerrormodal.jsx +++ b/renderer/src/ui/addonerrormodal.jsx @@ -1,4 +1,8 @@ -import {React, Strings, WebpackModules, DiscordClasses} from "modules"; +import React from "@modules/react"; +import Strings from "@modules/strings"; +import DiscordClasses from "@modules/discordclasses"; +import WebpackModules from "@modules/webpackmodules"; + import Extension from "./icons/extension"; import ThemeIcon from "./icons/theme"; import Divider from "./divider"; diff --git a/renderer/src/ui/blankslates/emptyimage.jsx b/renderer/src/ui/blankslates/emptyimage.jsx index 7fd77004..536953f9 100644 --- a/renderer/src/ui/blankslates/emptyimage.jsx +++ b/renderer/src/ui/blankslates/emptyimage.jsx @@ -1,4 +1,5 @@ -import {React, DiscordClasses} from "modules"; +import React from "@modules/react"; +import DiscordClasses from "@modules/discordclasses"; import SimpleMarkdown from "../../structs/markdown"; export default function EmptyImage(props) { diff --git a/renderer/src/ui/blankslates/noresults.jsx b/renderer/src/ui/blankslates/noresults.jsx index 943f7102..005d7844 100644 --- a/renderer/src/ui/blankslates/noresults.jsx +++ b/renderer/src/ui/blankslates/noresults.jsx @@ -1,4 +1,5 @@ -import {React, DiscordModules} from "modules"; +import React from "@modules/react"; +import DiscordModules from "@modules/discordmodules"; import MagnifyingGlass from "../icons/magnifyingglass"; export default function NoResults(props) { diff --git a/renderer/src/ui/customcss/checkbox.jsx b/renderer/src/ui/customcss/checkbox.jsx index 390f00f4..a17e7cc6 100644 --- a/renderer/src/ui/customcss/checkbox.jsx +++ b/renderer/src/ui/customcss/checkbox.jsx @@ -1,4 +1,4 @@ -import {React} from "modules"; +import React from "@modules/react"; const {useState, useCallback} = React; diff --git a/renderer/src/ui/customcss/csseditor.jsx b/renderer/src/ui/customcss/csseditor.jsx index 3c7bd776..32b3cdc5 100644 --- a/renderer/src/ui/customcss/csseditor.jsx +++ b/renderer/src/ui/customcss/csseditor.jsx @@ -1,4 +1,7 @@ -import {React, Settings, Events, Strings} from "modules"; +import React from "@modules/react"; +import Strings from "@modules/strings"; +import Events from "@modules/emitter"; +import Settings from "@modules/settingsmanager"; import Editor from "./editor"; import Refresh from "../icons/reload"; diff --git a/renderer/src/ui/customcss/editor.jsx b/renderer/src/ui/customcss/editor.jsx index bc79399a..ffceeb8b 100644 --- a/renderer/src/ui/customcss/editor.jsx +++ b/renderer/src/ui/customcss/editor.jsx @@ -1,4 +1,6 @@ -import {React, DiscordModules, Settings} from "modules"; +import React from "@modules/react"; +import DiscordModules from "@modules/discordmodules"; +import Settings from "@modules/settingsmanager"; import Checkbox from "./checkbox"; diff --git a/renderer/src/ui/divider.jsx b/renderer/src/ui/divider.jsx index 7f9b2fbd..224619dc 100644 --- a/renderer/src/ui/divider.jsx +++ b/renderer/src/ui/divider.jsx @@ -1,3 +1,3 @@ -import {React} from "modules"; +import React from "@modules/react"; export default ({className}) =>
; \ No newline at end of file diff --git a/renderer/src/ui/errorboundary.jsx b/renderer/src/ui/errorboundary.jsx index e5ee5af7..91762f9f 100644 --- a/renderer/src/ui/errorboundary.jsx +++ b/renderer/src/ui/errorboundary.jsx @@ -1,5 +1,6 @@ import Logger from "@common/logger"; -import {React, IPC} from "modules"; +import React from "@modules/react"; +import IPC from "@modules/ipc"; export default class ErrorBoundary extends React.Component { constructor(props) { diff --git a/renderer/src/ui/floating/container.jsx b/renderer/src/ui/floating/container.jsx index 50008ad3..2722f380 100644 --- a/renderer/src/ui/floating/container.jsx +++ b/renderer/src/ui/floating/container.jsx @@ -1,4 +1,5 @@ -import {React, Events} from "modules"; +import React from "@modules/react"; +import Events from "@modules/emitter"; import FloatingWindow from "./window"; diff --git a/renderer/src/ui/floating/window.jsx b/renderer/src/ui/floating/window.jsx index 220b9844..6474f8aa 100644 --- a/renderer/src/ui/floating/window.jsx +++ b/renderer/src/ui/floating/window.jsx @@ -1,4 +1,5 @@ -import {React, Strings} from "modules"; +import React from "@modules/react"; +import Strings from "@modules/strings"; import Screen from "../../structs/screen"; import CloseButton from "../icons/close"; diff --git a/renderer/src/ui/floatingwindows.js b/renderer/src/ui/floatingwindows.js index c6d1d1cd..2ca0a5d8 100644 --- a/renderer/src/ui/floatingwindows.js +++ b/renderer/src/ui/floatingwindows.js @@ -1,4 +1,8 @@ -import {WebpackModules, React, ReactDOM, DOMManager, Events} from "modules"; +import React from "@modules/react"; +import ReactDOM from "@modules/reactdom"; +import Events from "@modules/emitter"; +import DOMManager from "@modules/dommanager"; +import WebpackModules from "@modules/webpackmodules"; import FloatingWindowContainer from "./floating/container"; /* eslint-disable new-cap */ diff --git a/renderer/src/ui/icons/bdlogo.jsx b/renderer/src/ui/icons/bdlogo.jsx index d6dc74d1..112fec76 100644 --- a/renderer/src/ui/icons/bdlogo.jsx +++ b/renderer/src/ui/icons/bdlogo.jsx @@ -1,4 +1,4 @@ -import {React} from "modules"; +import React from "@modules/react"; export default function BDLogo(props) { return diff --git a/renderer/src/ui/icons/check.jsx b/renderer/src/ui/icons/check.jsx index d994ea89..97900b22 100644 --- a/renderer/src/ui/icons/check.jsx +++ b/renderer/src/ui/icons/check.jsx @@ -1,4 +1,4 @@ -import {React} from "modules"; +import React from "@modules/react"; export default function Checkmark(props) { const size = props.size || "24px"; diff --git a/renderer/src/ui/icons/close.jsx b/renderer/src/ui/icons/close.jsx index 55a45c0a..964b11a8 100644 --- a/renderer/src/ui/icons/close.jsx +++ b/renderer/src/ui/icons/close.jsx @@ -1,4 +1,4 @@ -import {React} from "modules"; +import React from "@modules/react"; export default function Close(props) { const size = props.size || "18px"; diff --git a/renderer/src/ui/icons/cog.jsx b/renderer/src/ui/icons/cog.jsx index 9a929bf5..25dacd26 100644 --- a/renderer/src/ui/icons/cog.jsx +++ b/renderer/src/ui/icons/cog.jsx @@ -1,4 +1,4 @@ -import {React} from "modules"; +import React from "@modules/react"; export default function Cog(props) { const size = props.size || "20px"; diff --git a/renderer/src/ui/icons/delete.jsx b/renderer/src/ui/icons/delete.jsx index 92f4d79d..c1e712d0 100644 --- a/renderer/src/ui/icons/delete.jsx +++ b/renderer/src/ui/icons/delete.jsx @@ -1,4 +1,4 @@ -import {React} from "modules"; +import React from "@modules/react"; export default function Delete(props) { const size = props.size || "24px"; diff --git a/renderer/src/ui/icons/detach.jsx b/renderer/src/ui/icons/detach.jsx index 8e5ade9f..42107a7c 100644 --- a/renderer/src/ui/icons/detach.jsx +++ b/renderer/src/ui/icons/detach.jsx @@ -1,4 +1,4 @@ -import {React} from "modules"; +import React from "@modules/react"; export default function Detach(props) { const size = props.size || "24px"; diff --git a/renderer/src/ui/icons/dollarsign.jsx b/renderer/src/ui/icons/dollarsign.jsx index 5634e440..e1907ac4 100644 --- a/renderer/src/ui/icons/dollarsign.jsx +++ b/renderer/src/ui/icons/dollarsign.jsx @@ -1,4 +1,4 @@ -import {React} from "modules"; +import React from "@modules/react"; export default function DollarSign(props) { const size = props.size || "18px"; diff --git a/renderer/src/ui/icons/downarrow.jsx b/renderer/src/ui/icons/downarrow.jsx index 96d40694..d559aef1 100644 --- a/renderer/src/ui/icons/downarrow.jsx +++ b/renderer/src/ui/icons/downarrow.jsx @@ -1,4 +1,4 @@ -import {React} from "modules"; +import React from "@modules/react"; export default function DownArrow(props) { const size = props.size || "16px"; diff --git a/renderer/src/ui/icons/edit.jsx b/renderer/src/ui/icons/edit.jsx index e7cf3109..33112063 100644 --- a/renderer/src/ui/icons/edit.jsx +++ b/renderer/src/ui/icons/edit.jsx @@ -1,4 +1,4 @@ -import {React} from "modules"; +import React from "@modules/react"; export default function Edit(props) { const size = props.size || "24px"; diff --git a/renderer/src/ui/icons/error.jsx b/renderer/src/ui/icons/error.jsx index 5c6a7e5f..904e4606 100644 --- a/renderer/src/ui/icons/error.jsx +++ b/renderer/src/ui/icons/error.jsx @@ -1,4 +1,4 @@ -import {React} from "modules"; +import React from "@modules/react"; export default function Error(props) { const size = props.size || "24px"; diff --git a/renderer/src/ui/icons/extension.jsx b/renderer/src/ui/icons/extension.jsx index d908cd2c..e0e01ce4 100644 --- a/renderer/src/ui/icons/extension.jsx +++ b/renderer/src/ui/icons/extension.jsx @@ -1,4 +1,4 @@ -import {React} from "modules"; +import React from "@modules/react"; export default function Extension(props) { const size = props.size || "24px"; diff --git a/renderer/src/ui/icons/favorite.jsx b/renderer/src/ui/icons/favorite.jsx index 929bb316..4d35b6a7 100644 --- a/renderer/src/ui/icons/favorite.jsx +++ b/renderer/src/ui/icons/favorite.jsx @@ -1,4 +1,4 @@ -import {React} from "modules"; +import React from "@modules/react"; export default function Favorite(props) { const size = props.size || "24px"; diff --git a/renderer/src/ui/icons/fullscreen.jsx b/renderer/src/ui/icons/fullscreen.jsx index 41ee8d71..61b858ff 100644 --- a/renderer/src/ui/icons/fullscreen.jsx +++ b/renderer/src/ui/icons/fullscreen.jsx @@ -1,4 +1,4 @@ -import {React} from "modules"; +import React from "@modules/react"; export default function FullScreen(props) { const size = props.size || "24px"; diff --git a/renderer/src/ui/icons/github.jsx b/renderer/src/ui/icons/github.jsx index 851bc2cd..6c4b3f24 100644 --- a/renderer/src/ui/icons/github.jsx +++ b/renderer/src/ui/icons/github.jsx @@ -1,4 +1,4 @@ -import {React} from "modules"; +import React from "@modules/react"; export default function GitHub(props) { const size = props.size || "18px"; diff --git a/renderer/src/ui/icons/globe.jsx b/renderer/src/ui/icons/globe.jsx index b89a3d53..9d0f4881 100644 --- a/renderer/src/ui/icons/globe.jsx +++ b/renderer/src/ui/icons/globe.jsx @@ -1,4 +1,4 @@ -import {React} from "modules"; +import React from "@modules/react"; export default function Globe(props) { const size = props.size || "18px"; diff --git a/renderer/src/ui/icons/grid.jsx b/renderer/src/ui/icons/grid.jsx index 1e926576..feba09ab 100644 --- a/renderer/src/ui/icons/grid.jsx +++ b/renderer/src/ui/icons/grid.jsx @@ -1,4 +1,4 @@ -import {React} from "modules"; +import React from "@modules/react"; export default function Grid(props) { const size = props.size || "20px"; diff --git a/renderer/src/ui/icons/history.jsx b/renderer/src/ui/icons/history.jsx index 92999de0..d9951a77 100644 --- a/renderer/src/ui/icons/history.jsx +++ b/renderer/src/ui/icons/history.jsx @@ -1,4 +1,4 @@ -import {React} from "modules"; +import React from "@modules/react"; export default function History(props) { const size = props.size || "18px"; diff --git a/renderer/src/ui/icons/keyboard.jsx b/renderer/src/ui/icons/keyboard.jsx index 52161f60..53e2f2f4 100644 --- a/renderer/src/ui/icons/keyboard.jsx +++ b/renderer/src/ui/icons/keyboard.jsx @@ -1,4 +1,4 @@ -import {React} from "modules"; +import React from "@modules/react"; export default function Keyboard(props) { const size = props.size || "24px"; diff --git a/renderer/src/ui/icons/list.jsx b/renderer/src/ui/icons/list.jsx index b6011e1a..6a7f5e16 100644 --- a/renderer/src/ui/icons/list.jsx +++ b/renderer/src/ui/icons/list.jsx @@ -1,4 +1,4 @@ -import {React} from "modules"; +import React from "@modules/react"; export default function List(props) { const size = props.size || "20px"; diff --git a/renderer/src/ui/icons/magnifyingglass.jsx b/renderer/src/ui/icons/magnifyingglass.jsx index 1d838d50..a2a45ece 100644 --- a/renderer/src/ui/icons/magnifyingglass.jsx +++ b/renderer/src/ui/icons/magnifyingglass.jsx @@ -1,4 +1,4 @@ -import {React} from "modules"; +import React from "@modules/react"; export default function MagnifyingGlass(props) { const size = props.size || "160px"; diff --git a/renderer/src/ui/icons/next.jsx b/renderer/src/ui/icons/next.jsx index c2e01393..149c9502 100644 --- a/renderer/src/ui/icons/next.jsx +++ b/renderer/src/ui/icons/next.jsx @@ -1,4 +1,4 @@ -import {React} from "modules"; +import React from "@modules/react"; export default function ArrowRight(props) { const size = props.size || "24px"; diff --git a/renderer/src/ui/icons/patreon.jsx b/renderer/src/ui/icons/patreon.jsx index 573d8c2a..7e323ccc 100644 --- a/renderer/src/ui/icons/patreon.jsx +++ b/renderer/src/ui/icons/patreon.jsx @@ -1,4 +1,4 @@ -import {React} from "modules"; +import React from "@modules/react"; export default function Patreon(props) { const size = props.size || "18px"; diff --git a/renderer/src/ui/icons/previous.jsx b/renderer/src/ui/icons/previous.jsx index 36407172..6592ba16 100644 --- a/renderer/src/ui/icons/previous.jsx +++ b/renderer/src/ui/icons/previous.jsx @@ -1,4 +1,4 @@ -import {React} from "modules"; +import React from "@modules/react"; export default function ArrowLeft(props) { const size = props.size || "24px"; diff --git a/renderer/src/ui/icons/radio.jsx b/renderer/src/ui/icons/radio.jsx index b08f2445..63688619 100644 --- a/renderer/src/ui/icons/radio.jsx +++ b/renderer/src/ui/icons/radio.jsx @@ -1,4 +1,4 @@ -import {React} from "modules"; +import React from "@modules/react"; export default function Radio(props) { const size = props.size || "24px"; diff --git a/renderer/src/ui/icons/reload.jsx b/renderer/src/ui/icons/reload.jsx index 4ff81a98..8100984f 100644 --- a/renderer/src/ui/icons/reload.jsx +++ b/renderer/src/ui/icons/reload.jsx @@ -1,4 +1,4 @@ -import {React} from "modules"; +import React from "@modules/react"; export default function ReloadIcon(props) { const size = props.size || "24px"; diff --git a/renderer/src/ui/icons/save.jsx b/renderer/src/ui/icons/save.jsx index 5a02f66c..73ca9c22 100644 --- a/renderer/src/ui/icons/save.jsx +++ b/renderer/src/ui/icons/save.jsx @@ -1,4 +1,4 @@ -import {React} from "modules"; +import React from "@modules/react"; export default function Save(props) { const size = props.size || "24px"; diff --git a/renderer/src/ui/icons/search.jsx b/renderer/src/ui/icons/search.jsx index 3a936e90..5cc3c044 100644 --- a/renderer/src/ui/icons/search.jsx +++ b/renderer/src/ui/icons/search.jsx @@ -1,4 +1,4 @@ -import {React} from "modules"; +import React from "@modules/react"; export default function Search(props) { const size = props.size || "16px"; diff --git a/renderer/src/ui/icons/support.jsx b/renderer/src/ui/icons/support.jsx index 732c6409..29ea5ef3 100644 --- a/renderer/src/ui/icons/support.jsx +++ b/renderer/src/ui/icons/support.jsx @@ -1,4 +1,4 @@ -import {React} from "modules"; +import React from "@modules/react"; export default function Support(props) { const size = props.size || "18px"; diff --git a/renderer/src/ui/icons/theme.jsx b/renderer/src/ui/icons/theme.jsx index cccae69b..3c642dbc 100644 --- a/renderer/src/ui/icons/theme.jsx +++ b/renderer/src/ui/icons/theme.jsx @@ -1,4 +1,4 @@ -import {React} from "modules"; +import React from "@modules/react"; export default function Theme(props) { const size = props.size || "24px"; diff --git a/renderer/src/ui/icons/twitch.jsx b/renderer/src/ui/icons/twitch.jsx index 04a313d4..2800b4e3 100644 --- a/renderer/src/ui/icons/twitch.jsx +++ b/renderer/src/ui/icons/twitch.jsx @@ -1,4 +1,4 @@ -import {React} from "modules"; +import React from "@modules/react"; export default function Twitch(props) { const size = props.size || "18px"; diff --git a/renderer/src/ui/misc/addoneditor.jsx b/renderer/src/ui/misc/addoneditor.jsx index 43a1048a..65da77c9 100644 --- a/renderer/src/ui/misc/addoneditor.jsx +++ b/renderer/src/ui/misc/addoneditor.jsx @@ -1,4 +1,5 @@ -import {React, Strings} from "modules"; +import React from "@modules/react"; +import Strings from "@modules/strings"; import Editor from "../customcss/editor"; import Save from "../icons/save"; diff --git a/renderer/src/ui/modals.js b/renderer/src/ui/modals.js index 620e7edf..55f5f6d7 100644 --- a/renderer/src/ui/modals.js +++ b/renderer/src/ui/modals.js @@ -1,6 +1,13 @@ import {Config} from "data"; import Logger from "@common/logger"; -import {WebpackModules, React, ReactDOM, Settings, Strings, DOMManager, DiscordModules, DiscordClasses} from "modules"; +import React from "@modules/react"; +import ReactDOM from "@modules/reactdom"; +import Strings from "@modules/strings"; +import Settings from "@modules/settingsmanager"; +import DiscordModules from "@modules/discordmodules"; +import WebpackModules from "@modules/webpackmodules"; +import DiscordClasses from "@modules/discordclasses"; +import DOMManager from "@modules/dommanager"; import FormattableString from "../structs/string"; import AddonErrorModal from "./addonerrormodal"; import ErrorBoundary from "./errorboundary"; diff --git a/renderer/src/ui/settings.js b/renderer/src/ui/settings.js index 3d6c9f4d..3b5f84cc 100644 --- a/renderer/src/ui/settings.js +++ b/renderer/src/ui/settings.js @@ -1,4 +1,10 @@ -import {React, WebpackModules, Patcher, Utilities, Settings, Events, DataStore} from "modules"; +import React from "@modules/react"; +import Utilities from "@modules/utilities"; +import Events from "@modules/emitter"; +import Settings from "@modules/settingsmanager"; +import DataStore from "@modules/datastore"; +import WebpackModules from "@modules/webpackmodules"; +import Patcher from "@modules/patcher"; import AddonList from "./settings/addonlist"; import SettingsGroup from "./settings/group"; diff --git a/renderer/src/ui/settings/addoncard.jsx b/renderer/src/ui/settings/addoncard.jsx index c0d2f9b6..5ce0b3f0 100644 --- a/renderer/src/ui/settings/addoncard.jsx +++ b/renderer/src/ui/settings/addoncard.jsx @@ -1,5 +1,8 @@ import Logger from "@common/logger"; -import {React, Strings, WebpackModules, DiscordModules} from "modules"; +import React from "@modules/react"; +import Strings from "@modules/strings"; +import WebpackModules from "@modules/webpackmodules"; +import DiscordModules from "@modules/discordmodules"; import SimpleMarkdown from "../../structs/markdown"; import EditIcon from "../icons/edit"; import DeleteIcon from "../icons/delete"; diff --git a/renderer/src/ui/settings/addonlist.jsx b/renderer/src/ui/settings/addonlist.jsx index 2b7b9084..04b1a29b 100644 --- a/renderer/src/ui/settings/addonlist.jsx +++ b/renderer/src/ui/settings/addonlist.jsx @@ -1,4 +1,8 @@ -import {React, Strings, Events, DataStore, DiscordModules} from "modules"; +import React from "@modules/react"; +import Strings from "@modules/strings"; +import Events from "@modules/emitter"; +import DataStore from "@modules/datastore"; +import DiscordModules from "@modules/discordmodules"; import Modals from "../modals"; import SettingsTitle from "./title"; diff --git a/renderer/src/ui/settings/components/color.jsx b/renderer/src/ui/settings/components/color.jsx index 86040ca5..924d4ca5 100644 --- a/renderer/src/ui/settings/components/color.jsx +++ b/renderer/src/ui/settings/components/color.jsx @@ -1,4 +1,5 @@ -import {DiscordModules, React} from "modules"; +import React from "@modules/react"; +import DiscordModules from "@modules/discordmodules"; const {useState, useCallback} = React; diff --git a/renderer/src/ui/settings/components/dropdown.jsx b/renderer/src/ui/settings/components/dropdown.jsx index d4d52946..55d38977 100644 --- a/renderer/src/ui/settings/components/dropdown.jsx +++ b/renderer/src/ui/settings/components/dropdown.jsx @@ -1,4 +1,4 @@ -import {React} from "modules"; +import React from "@modules/react"; import Arrow from "../../icons/downarrow"; const {useState, useCallback} = React; diff --git a/renderer/src/ui/settings/components/item.jsx b/renderer/src/ui/settings/components/item.jsx index 0fdb40e0..c7679cc4 100644 --- a/renderer/src/ui/settings/components/item.jsx +++ b/renderer/src/ui/settings/components/item.jsx @@ -1,4 +1,4 @@ -import {React} from "modules"; +import React from "@modules/react"; export default function SettingItem({id, name, note, inline, children}) { return
diff --git a/renderer/src/ui/settings/components/keybind.jsx b/renderer/src/ui/settings/components/keybind.jsx index 6db46c86..5a6eaa17 100644 --- a/renderer/src/ui/settings/components/keybind.jsx +++ b/renderer/src/ui/settings/components/keybind.jsx @@ -1,4 +1,4 @@ -import {React} from "modules"; +import React from "@modules/react"; import Keyboard from "../../icons/keyboard"; import Close from "../../icons/close"; diff --git a/renderer/src/ui/settings/components/number.jsx b/renderer/src/ui/settings/components/number.jsx index f6e31db0..01180e8e 100644 --- a/renderer/src/ui/settings/components/number.jsx +++ b/renderer/src/ui/settings/components/number.jsx @@ -1,4 +1,4 @@ -import {React} from "modules"; +import React from "@modules/react"; const {useState, useCallback} = React; diff --git a/renderer/src/ui/settings/components/radio.jsx b/renderer/src/ui/settings/components/radio.jsx index 02d5da89..93968825 100644 --- a/renderer/src/ui/settings/components/radio.jsx +++ b/renderer/src/ui/settings/components/radio.jsx @@ -1,4 +1,4 @@ -import {React} from "modules"; +import React from "@modules/react"; import RadioIcon from "../../icons/radio"; diff --git a/renderer/src/ui/settings/components/search.jsx b/renderer/src/ui/settings/components/search.jsx index 77ac05d0..fbb3f3df 100644 --- a/renderer/src/ui/settings/components/search.jsx +++ b/renderer/src/ui/settings/components/search.jsx @@ -1,4 +1,4 @@ -import {React} from "modules"; +import React from "@modules/react"; import SearchIcon from "../../icons/search"; const {useState, useCallback} = React; diff --git a/renderer/src/ui/settings/components/slider.jsx b/renderer/src/ui/settings/components/slider.jsx index 75f833ac..3483d535 100644 --- a/renderer/src/ui/settings/components/slider.jsx +++ b/renderer/src/ui/settings/components/slider.jsx @@ -1,4 +1,4 @@ -import {React} from "modules"; +import React from "@modules/react"; const {useState, useCallback} = React; diff --git a/renderer/src/ui/settings/components/switch.jsx b/renderer/src/ui/settings/components/switch.jsx index a0fdf278..d72099a0 100644 --- a/renderer/src/ui/settings/components/switch.jsx +++ b/renderer/src/ui/settings/components/switch.jsx @@ -1,4 +1,4 @@ -import {React} from "modules"; +import React from "@modules/react"; const {useState, useCallback} = React; diff --git a/renderer/src/ui/settings/components/textbox.jsx b/renderer/src/ui/settings/components/textbox.jsx index 3997ea6e..60bf97ad 100644 --- a/renderer/src/ui/settings/components/textbox.jsx +++ b/renderer/src/ui/settings/components/textbox.jsx @@ -1,4 +1,4 @@ -import {React} from "modules"; +import React from "@modules/react"; const {useState, useCallback} = React; diff --git a/renderer/src/ui/settings/drawer.jsx b/renderer/src/ui/settings/drawer.jsx index 97425c5e..3d362301 100644 --- a/renderer/src/ui/settings/drawer.jsx +++ b/renderer/src/ui/settings/drawer.jsx @@ -1,4 +1,4 @@ -import {React} from "modules"; +import React from "@modules/react"; import Title from "./title"; import Divider from "../divider"; diff --git a/renderer/src/ui/settings/group.jsx b/renderer/src/ui/settings/group.jsx index 0b98e8f8..eed0de8f 100644 --- a/renderer/src/ui/settings/group.jsx +++ b/renderer/src/ui/settings/group.jsx @@ -1,4 +1,4 @@ -import {React} from "modules"; +import React from "@modules/react"; import Drawer from "./drawer"; import Switch from "./components/switch"; import Dropdown from "./components/dropdown"; diff --git a/renderer/src/ui/settings/sidebarheader.jsx b/renderer/src/ui/settings/sidebarheader.jsx index ad99ade4..1eaa88e3 100644 --- a/renderer/src/ui/settings/sidebarheader.jsx +++ b/renderer/src/ui/settings/sidebarheader.jsx @@ -1,5 +1,6 @@ import {Changelog} from "data"; -import {DiscordModules, React} from "modules"; +import React from "@modules/react"; +import DiscordModules from "@modules/discordmodules"; import HistoryIcon from "../icons/history"; import Modals from "../modals"; diff --git a/renderer/src/ui/settings/title.jsx b/renderer/src/ui/settings/title.jsx index cd81f6d7..e42dba86 100644 --- a/renderer/src/ui/settings/title.jsx +++ b/renderer/src/ui/settings/title.jsx @@ -1,4 +1,4 @@ -import {React} from "modules"; +import React from "@modules/react"; const {useCallback} = React; diff --git a/renderer/src/ui/toasts.js b/renderer/src/ui/toasts.js index a8a023fb..c4ab1150 100644 --- a/renderer/src/ui/toasts.js +++ b/renderer/src/ui/toasts.js @@ -1,5 +1,8 @@ import Logger from "@common/logger"; -import {WebpackModules, Settings, DOMManager} from "modules"; + +import Settings from "@modules/settingsmanager"; +import WebpackModules from "@modules/webpackmodules"; +import DOMManager from "@modules/dommanager"; export default class Toasts { diff --git a/renderer/src/ui/tooltip.js b/renderer/src/ui/tooltip.js index 25a19cbf..ad956a78 100644 --- a/renderer/src/ui/tooltip.js +++ b/renderer/src/ui/tooltip.js @@ -1,5 +1,5 @@ import Logger from "@common/logger"; -import {DOMManager} from "modules"; +import DOMManager from "@modules/dommanager"; const toPx = function(value) { diff --git a/renderer/src/ui/updater.jsx b/renderer/src/ui/updater.jsx index 79f88b91..e0edbddf 100644 --- a/renderer/src/ui/updater.jsx +++ b/renderer/src/ui/updater.jsx @@ -1,5 +1,7 @@ import {Config} from "data"; -import {React, Events, Strings} from "modules"; +import React from "@modules/react"; +import Strings from "@modules/strings"; +import Events from "@modules/emitter"; import Drawer from "./settings/drawer"; import SettingItem from "./settings/components/item"; import SettingsTitle from "./settings/title"; From 9bbf318a86d7cc2d9bc678ef30e63d348e90b7ed Mon Sep 17 00:00:00 2001 From: Zack Rauen Date: Fri, 19 May 2023 18:37:21 -0400 Subject: [PATCH 09/15] Revamp all imports --- renderer/.babelrc.js | 12 +++++-- renderer/jsconfig.json | 11 +++++-- renderer/src/builtins/customcss.js | 18 ++++++---- renderer/src/builtins/developer/debugger.js | 2 +- renderer/src/builtins/developer/debuglogs.js | 9 ++--- renderer/src/builtins/developer/devtools.js | 5 +-- .../src/builtins/developer/devtoolswarning.js | 6 ++-- .../src/builtins/developer/inspectelement.js | 5 +-- .../src/builtins/developer/reactdevtools.js | 6 ++-- renderer/src/builtins/general/mediakeys.js | 6 ++-- .../src/builtins/general/voicedisconnect.js | 3 +- .../src/builtins/window/removeminimumsize.js | 7 ++-- renderer/src/builtins/window/transparency.js | 6 ++-- renderer/src/data/data.js | 3 -- renderer/src/index.js | 4 +-- renderer/src/modules/addonmanager.js | 21 +++++++----- renderer/src/modules/api/contextmenu.js | 7 ++-- renderer/src/modules/api/data.js | 3 +- renderer/src/modules/api/dom.js | 3 +- renderer/src/modules/api/index.js | 8 +++-- renderer/src/modules/api/legacy.js | 25 +++++++------- renderer/src/modules/api/patcher.js | 4 ++- renderer/src/modules/api/reactutils.js | 3 +- renderer/src/modules/api/ui.js | 12 ++++--- renderer/src/modules/api/utils.js | 3 +- renderer/src/modules/api/webpack.js | 4 ++- renderer/src/modules/core.js | 24 +++++++++----- renderer/src/modules/datastore.js | 10 ++++-- renderer/src/modules/discordclasses.js | 4 ++- renderer/src/modules/discordmodules.js | 1 + renderer/src/modules/editor.js | 3 +- renderer/src/modules/emitter.js | 2 +- renderer/src/modules/ipc.js | 3 +- renderer/src/modules/localemanager.js | 3 +- renderer/src/modules/modules.js | 18 ---------- renderer/src/modules/patcher.js | 2 ++ renderer/src/modules/pluginmanager.js | 18 ++++++---- renderer/src/modules/settingsmanager.js | 5 ++- renderer/src/modules/strings.js | 4 ++- renderer/src/modules/thememanager.js | 15 +++++---- renderer/src/modules/updater.js | 19 +++++------ renderer/src/modules/utilities.js | 1 + renderer/src/modules/webpackmodules.js | 2 +- renderer/src/polyfill/buffer.js | 2 +- renderer/src/polyfill/crypto.js | 1 + renderer/src/polyfill/fs.js | 2 +- renderer/src/polyfill/https.js | 2 ++ renderer/src/polyfill/index.js | 4 ++- renderer/src/polyfill/module.js | 2 ++ renderer/src/polyfill/request.js | 1 + renderer/src/polyfill/vm.js | 1 + renderer/src/structs/builtin.js | 8 +++-- renderer/src/structs/markdown.js | 1 + renderer/src/structs/string.js | 3 +- renderer/src/ui/addonerrormodal.jsx | 7 ++-- renderer/src/ui/blankslates/emptyimage.jsx | 4 ++- renderer/src/ui/blankslates/noresults.jsx | 4 ++- renderer/src/ui/customcss/csseditor.jsx | 9 ++--- renderer/src/ui/divider.jsx | 1 + renderer/src/ui/errorboundary.jsx | 1 + renderer/src/ui/floating/window.jsx | 10 +++--- renderer/src/ui/floatingwindows.js | 3 +- renderer/src/ui/misc/addoneditor.jsx | 7 ++-- renderer/src/ui/modals.js | 7 ++-- renderer/src/ui/notices.js | 1 + renderer/src/ui/settings.js | 3 +- renderer/src/ui/settings/addoncard.jsx | 33 +++++++++++-------- renderer/src/ui/settings/addonlist.jsx | 15 +++++---- .../src/ui/settings/components/dropdown.jsx | 3 +- renderer/src/ui/settings/components/item.jsx | 1 + .../src/ui/settings/components/keybind.jsx | 4 +-- renderer/src/ui/settings/components/radio.jsx | 2 +- .../src/ui/settings/components/search.jsx | 2 +- renderer/src/ui/settings/drawer.jsx | 4 ++- renderer/src/ui/settings/group.jsx | 1 + renderer/src/ui/settings/sidebarheader.jsx | 9 +++-- renderer/src/ui/toasts.js | 1 + renderer/src/ui/updater.jsx | 6 ++-- 78 files changed, 299 insertions(+), 196 deletions(-) delete mode 100644 renderer/src/data/data.js delete mode 100644 renderer/src/modules/modules.js diff --git a/renderer/.babelrc.js b/renderer/.babelrc.js index 6ed6cb95..54157904 100644 --- a/renderer/.babelrc.js +++ b/renderer/.babelrc.js @@ -15,10 +15,16 @@ module.exports = { "module-resolver", { alias: { - "builtins": "./src/builtins/builtins.js", - "data": "./src/data/data.js", - "@modules": path.join(__dirname, "src", "modules"), + "@assets": path.join(__dirname, "..", "assets"), "@common": path.join(__dirname, "..", "common"), + + "@builtins": path.join(__dirname, "src", "builtins"), + "@data": path.join(__dirname, "src", "data"), + "@modules": path.join(__dirname, "src", "modules"), + "@polyfill": path.join(__dirname, "src", "polyfill"), + "@structs": path.join(__dirname, "src", "structs"), + "@styles": path.join(__dirname, "src", "styles"), + "@ui": path.join(__dirname, "src", "ui"), } } ]] diff --git a/renderer/jsconfig.json b/renderer/jsconfig.json index c98c9b52..4671b46e 100644 --- a/renderer/jsconfig.json +++ b/renderer/jsconfig.json @@ -4,10 +4,15 @@ "allowSyntheticDefaultImports": false, "baseUrl": "./", "paths": { - "builtins": ["./src/builtins/builtins.js"], - "data": ["./src/data/data.js"], + "@assets/*": ["../assets/*"], + "@common/*": ["../common/*"], + "@builtins/*": ["./src/builtins/*"], + "@data/*": ["./src/data/*"], "@modules/*": ["./src/modules/*"], - "@common/*": ["../common/*"] + "@polyfill/*": ["./src/polyfill/*"], + "@structs/*": ["./src/structs/*"], + "@styles/*": ["./src/styles/*"], + "@ui/*": ["./src/ui/*"] } }, "exclude": ["node_modules"] diff --git a/renderer/src/builtins/customcss.js b/renderer/src/builtins/customcss.js index 04318093..9b9307c1 100644 --- a/renderer/src/builtins/customcss.js +++ b/renderer/src/builtins/customcss.js @@ -1,4 +1,8 @@ -import Builtin from "../structs/builtin"; +import fs from "fs"; +import electron from "electron"; + +import Builtin from "@structs/builtin"; + import Settings from "@modules/settingsmanager"; import DataStore from "@modules/datastore"; import React from "@modules/react"; @@ -7,13 +11,13 @@ import Events from "@modules/emitter"; import DOMManager from "@modules/dommanager"; import Strings from "@modules/strings"; import DiscordModules from "@modules/discordmodules"; -import CSSEditor from "../ui/customcss/csseditor"; -import FloatingWindows from "../ui/floatingwindows"; -import SettingsTitle from "../ui/settings/title"; -import Utilities from "../modules/utilities"; +import Utilities from "@modules/utilities"; + +import CSSEditor from "@ui/customcss/csseditor"; +import FloatingWindows from "@ui/floatingwindows"; +import SettingsTitle from "@ui/settings/title"; + -const fs = require("fs"); -const electron = require("electron"); const UserSettings = WebpackModules.getByProps("updateAccount"); const Dispatcher = DiscordModules.Dispatcher; diff --git a/renderer/src/builtins/developer/debugger.js b/renderer/src/builtins/developer/debugger.js index fffebbe4..00d5cd40 100644 --- a/renderer/src/builtins/developer/debugger.js +++ b/renderer/src/builtins/developer/debugger.js @@ -1,4 +1,4 @@ -import Builtin from "../../structs/builtin"; +import Builtin from "@structs/builtin"; export default new class DeveloperMode extends Builtin { get name() {return "Debugger";} diff --git a/renderer/src/builtins/developer/debuglogs.js b/renderer/src/builtins/developer/debuglogs.js index d10a58bb..b1b0ea0f 100644 --- a/renderer/src/builtins/developer/debuglogs.js +++ b/renderer/src/builtins/developer/debuglogs.js @@ -1,7 +1,8 @@ -const fs = require("fs"); -const path = require("path"); -import Builtin from "../../structs/builtin"; -import DataStore from "../../modules/datastore"; +import fs from "fs"; +import path from "path"; + +import Builtin from "@structs/builtin"; +import DataStore from "@modules/datastore"; const timestamp = () => new Date().toISOString().replace("T", " ").replace("Z", ""); diff --git a/renderer/src/builtins/developer/devtools.js b/renderer/src/builtins/developer/devtools.js index 0835efbb..a573117c 100644 --- a/renderer/src/builtins/developer/devtools.js +++ b/renderer/src/builtins/developer/devtools.js @@ -1,5 +1,6 @@ -import Builtin from "../../structs/builtin"; -import IPC from "../../modules/ipc"; +import Builtin from "@structs/builtin"; + +import IPC from "@modules/ipc"; export default new class DevToolsListener extends Builtin { get name() {return "DevTools";} diff --git a/renderer/src/builtins/developer/devtoolswarning.js b/renderer/src/builtins/developer/devtoolswarning.js index a97903f5..e2b9db4d 100644 --- a/renderer/src/builtins/developer/devtoolswarning.js +++ b/renderer/src/builtins/developer/devtoolswarning.js @@ -1,6 +1,6 @@ -import Builtin from "../../structs/builtin"; -import WebpackModules from "../../modules/webpackmodules"; -// import IPC from "../../modules/ipc"; +import Builtin from "@structs/builtin"; + +import WebpackModules from "@modules/webpackmodules"; export default new class StopDevToolsWarning extends Builtin { get name() {return "StopDevToolsWarning";} diff --git a/renderer/src/builtins/developer/inspectelement.js b/renderer/src/builtins/developer/inspectelement.js index 50d6a4ae..09742ebe 100644 --- a/renderer/src/builtins/developer/inspectelement.js +++ b/renderer/src/builtins/developer/inspectelement.js @@ -1,5 +1,6 @@ -import Builtin from "../../structs/builtin"; -import IPC from "../../modules/ipc"; +import Builtin from "@structs/builtin"; + +import IPC from "@modules/ipc"; export default new class InspectElement extends Builtin { get name() {return "InspectElementHotkey";} diff --git a/renderer/src/builtins/developer/reactdevtools.js b/renderer/src/builtins/developer/reactdevtools.js index 56635fef..4b4722c3 100644 --- a/renderer/src/builtins/developer/reactdevtools.js +++ b/renderer/src/builtins/developer/reactdevtools.js @@ -1,9 +1,11 @@ -import Builtin from "../../structs/builtin"; -import Modals from "../../ui/modals"; +import Builtin from "@structs/builtin"; import Strings from "@modules/strings"; import IPC from "@modules/ipc"; +import Modals from "@ui/modals"; + + export default new class ReactDevTools extends Builtin { get name() {return "ReactDevTools";} get category() {return "developer";} diff --git a/renderer/src/builtins/general/mediakeys.js b/renderer/src/builtins/general/mediakeys.js index b1cb210b..78922e93 100644 --- a/renderer/src/builtins/general/mediakeys.js +++ b/renderer/src/builtins/general/mediakeys.js @@ -1,9 +1,11 @@ -import Builtin from "../../structs/builtin"; -import Modals from "../../ui/modals"; +import Builtin from "@structs/builtin"; import Strings from "@modules/strings"; import IPC from "@modules/ipc"; +import Modals from "@ui/modals"; + + export default new class MediaKeys extends Builtin { get name() {return "DisableMediaKeys";} get category() {return "general";} diff --git a/renderer/src/builtins/general/voicedisconnect.js b/renderer/src/builtins/general/voicedisconnect.js index a8089996..f59b877a 100644 --- a/renderer/src/builtins/general/voicedisconnect.js +++ b/renderer/src/builtins/general/voicedisconnect.js @@ -1,4 +1,5 @@ -import Builtin from "../../structs/builtin"; +import Builtin from "@structs/builtin"; + import DiscordModules from "@modules/discordmodules"; export default new class VoiceDisconnect extends Builtin { diff --git a/renderer/src/builtins/window/removeminimumsize.js b/renderer/src/builtins/window/removeminimumsize.js index 964a8f0b..5c6cecbd 100644 --- a/renderer/src/builtins/window/removeminimumsize.js +++ b/renderer/src/builtins/window/removeminimumsize.js @@ -1,6 +1,7 @@ -import Builtin from "../../structs/builtin"; -import IPC from "../../modules/ipc"; -import DataStore from "../../modules/datastore"; +import Builtin from "@structs/builtin"; + +import IPC from "@modules/ipc"; +import DataStore from "@modules/datastore"; const DISCORD_MIN_HEIGHT = 500; const DISCORD_MIN_WIDTH = 940; diff --git a/renderer/src/builtins/window/transparency.js b/renderer/src/builtins/window/transparency.js index e49e1efc..31525073 100644 --- a/renderer/src/builtins/window/transparency.js +++ b/renderer/src/builtins/window/transparency.js @@ -1,9 +1,11 @@ -import Builtin from "../../structs/builtin"; -import Modals from "../../ui/modals"; +import Builtin from "@structs/builtin"; import Strings from "@modules/strings"; import IPC from "@modules/ipc"; +import Modals from "@ui/modals"; + + export default new class WindowTransparency extends Builtin { get name() {return "WindowTransparency";} get category() {return "window";} diff --git a/renderer/src/data/data.js b/renderer/src/data/data.js deleted file mode 100644 index 00775b05..00000000 --- a/renderer/src/data/data.js +++ /dev/null @@ -1,3 +0,0 @@ -export {default as Config} from "./config"; -export {default as SettingsConfig} from "./settings"; -export {default as Changelog} from "./changelog"; \ No newline at end of file diff --git a/renderer/src/index.js b/renderer/src/index.js index 674b2d6d..346a98cd 100644 --- a/renderer/src/index.js +++ b/renderer/src/index.js @@ -1,8 +1,8 @@ import require from "./polyfill"; // eslint-disable-line no-unused-vars import secure from "./secure"; import LoadingIcon from "./loadingicon"; -import BetterDiscord from "./modules/core"; -import BdApi from "./modules/api/index"; +import BetterDiscord from "@modules/core"; +import BdApi from "@modules/api/index"; // Perform some setup secure(); diff --git a/renderer/src/modules/addonmanager.js b/renderer/src/modules/addonmanager.js index ed8a5f36..9f2b6a1f 100644 --- a/renderer/src/modules/addonmanager.js +++ b/renderer/src/modules/addonmanager.js @@ -1,19 +1,22 @@ +import path from "path"; +import fs from "fs"; +import {shell} from "electron"; + import Logger from "@common/logger"; + +import AddonError from "@structs/addonerror"; + import Settings from "./settingsmanager"; import Events from "./emitter"; import DataStore from "./datastore"; -import AddonError from "../structs/addonerror"; -import Toasts from "../ui/toasts"; -import DiscordModules from "./discordmodules"; +import React from "./react"; import Strings from "./strings"; -import AddonEditor from "../ui/misc/addoneditor"; -import FloatingWindows from "../ui/floatingwindows"; -const React = DiscordModules.React; +import AddonEditor from "@ui/misc/addoneditor"; +import FloatingWindows from "@ui/floatingwindows"; +import Toasts from "@ui/toasts"; + -const path = require("path"); -const fs = require("fs"); -const shell = require("electron").shell; const openItem = shell.openItem || shell.openPath; const splitRegex = /[^\S\r\n]*?\r?(?:\r\n|\n)[^\S\r\n]*?\*[^\S\r\n]?/; diff --git a/renderer/src/modules/api/contextmenu.js b/renderer/src/modules/api/contextmenu.js index dc1378dc..692ae9b3 100644 --- a/renderer/src/modules/api/contextmenu.js +++ b/renderer/src/modules/api/contextmenu.js @@ -1,7 +1,8 @@ -import WebpackModules from "../webpackmodules"; -import Patcher from "../patcher"; +import WebpackModules from "@modules/webpackmodules"; +import Patcher from "@modules/patcher"; import Logger from "@common/logger"; -import {React} from "../modules"; +import React from "@modules/react"; + let startupComplete = false; diff --git a/renderer/src/modules/api/data.js b/renderer/src/modules/api/data.js index 7bed623e..f31b08c4 100644 --- a/renderer/src/modules/api/data.js +++ b/renderer/src/modules/api/data.js @@ -1,4 +1,5 @@ -import DataStore from "../datastore"; +import DataStore from "@modules/datastore"; + /** * `Data` is a simple utility class for the management of plugin data. An instance is available on {@link BdApi}. diff --git a/renderer/src/modules/api/dom.js b/renderer/src/modules/api/dom.js index e08cdefa..ae058d27 100644 --- a/renderer/src/modules/api/dom.js +++ b/renderer/src/modules/api/dom.js @@ -1,4 +1,5 @@ -import DOMManager from "../dommanager"; +import DOMManager from "@modules/dommanager"; + /** * `DOM` is a simple utility class for dom manipulation. An instance is available on {@link BdApi}. diff --git a/renderer/src/modules/api/index.js b/renderer/src/modules/api/index.js index 150c61f9..8144d029 100644 --- a/renderer/src/modules/api/index.js +++ b/renderer/src/modules/api/index.js @@ -1,7 +1,9 @@ -import PluginManager from "../pluginmanager"; -import ThemeManager from "../thememanager"; import Logger from "@common/logger"; +import PluginManager from "@modules/pluginmanager"; +import ThemeManager from "@modules/thememanager"; +import DiscordModules from "@modules/discordmodules"; + import AddonAPI from "./addonapi"; import Data from "./data"; import DOM from "./dom"; @@ -12,7 +14,7 @@ import Utils from "./utils"; import Webpack from "./webpack"; import * as Legacy from "./legacy"; import ContextMenu from "./contextmenu"; -import DiscordModules from "@modules/discordmodules"; + const bounded = new Map(); const PluginAPI = new AddonAPI(PluginManager); diff --git a/renderer/src/modules/api/legacy.js b/renderer/src/modules/api/legacy.js index 72a605c6..3d222eec 100644 --- a/renderer/src/modules/api/legacy.js +++ b/renderer/src/modules/api/legacy.js @@ -1,15 +1,18 @@ -import {Config} from "data"; -import WebpackModules from "../webpackmodules"; -import DiscordModules from "../discordmodules"; -import DataStore from "../datastore"; -import DOMManager from "../dommanager"; -import Toasts from "../../ui/toasts"; -import Notices from "../../ui/notices"; -import Modals from "../../ui/modals"; -import Settings from "../settingsmanager"; import Logger from "@common/logger"; -import Patcher from "../patcher"; -import ipc from "../ipc"; + +import Config from "@data/config"; + +import WebpackModules from "@modules/webpackmodules"; +import DiscordModules from "@modules/discordmodules"; +import DataStore from "@modules/datastore"; +import DOMManager from "@modules/dommanager"; +import Settings from "@modules/settingsmanager"; +import Patcher from "@modules/patcher"; +import ipc from "@modules/ipc"; + +import Toasts from "@ui/toasts"; +import Notices from "@ui/notices"; +import Modals from "@ui/modals"; /** * The React module being used inside Discord. diff --git a/renderer/src/modules/api/patcher.js b/renderer/src/modules/api/patcher.js index df7673bc..0cb49a96 100644 --- a/renderer/src/modules/api/patcher.js +++ b/renderer/src/modules/api/patcher.js @@ -1,5 +1,7 @@ import Logger from "@common/logger"; -import {default as MainPatcher} from "../patcher"; + +import {default as MainPatcher} from "@modules/patcher"; + /** * `Patcher` is a utility class for modifying existing functions. Instance is accessible through the {@link BdApi}. diff --git a/renderer/src/modules/api/reactutils.js b/renderer/src/modules/api/reactutils.js index 1046373c..d58ab402 100644 --- a/renderer/src/modules/api/reactutils.js +++ b/renderer/src/modules/api/reactutils.js @@ -1,4 +1,5 @@ -import DiscordModules from "../discordmodules"; +import DiscordModules from "@modules//discordmodules"; + /** * `ReactUtils` is a utility class for interacting with React internals. Instance is accessible through the {@link BdApi}. diff --git a/renderer/src/modules/api/ui.js b/renderer/src/modules/api/ui.js index 3d7cb17d..15332691 100644 --- a/renderer/src/modules/api/ui.js +++ b/renderer/src/modules/api/ui.js @@ -1,8 +1,10 @@ -import Modals from "../../ui/modals"; -import Toasts from "../../ui/toasts"; -import Notices from "../../ui/notices"; -import Tooltip from "../../ui/tooltip"; -import ipc from "../ipc"; +import ipc from "@modules/ipc"; + +import Modals from "@ui/modals"; +import Toasts from "@ui/toasts"; +import Notices from "@ui/notices"; +import Tooltip from "@ui/tooltip"; + /** * `UI` is a utility class for creating user interfaces. Instance is accessible through the {@link BdApi}. diff --git a/renderer/src/modules/api/utils.js b/renderer/src/modules/api/utils.js index 49041f2d..74fd7aa8 100644 --- a/renderer/src/modules/api/utils.js +++ b/renderer/src/modules/api/utils.js @@ -1,4 +1,5 @@ -import Utilities from "../utilities"; +import Utilities from "@modules/utilities"; + /** * `Utils` is a utility containing commonly reused functions. Instance is accessible through the {@link BdApi}. diff --git a/renderer/src/modules/api/webpack.js b/renderer/src/modules/api/webpack.js index 3fd0e24f..76f609ff 100644 --- a/renderer/src/modules/api/webpack.js +++ b/renderer/src/modules/api/webpack.js @@ -1,5 +1,7 @@ import Logger from "@common/logger"; -import WebpackModules, {Filters} from "../webpackmodules"; + +import WebpackModules, {Filters} from "@modules/webpackmodules"; + /** * `Webpack` is a utility class for getting internal webpack modules. Instance is accessible through the {@link BdApi}. diff --git a/renderer/src/modules/core.js b/renderer/src/modules/core.js index cb7472ad..2125c72f 100644 --- a/renderer/src/modules/core.js +++ b/renderer/src/modules/core.js @@ -1,21 +1,29 @@ -import LocaleManager from "./localemanager"; - import Logger from "@common/logger"; -import {Config, Changelog} from "data"; + +import Config from "@data/config"; +import Changelog from "@data/changelog"; + +import * as Builtins from "@builtins/builtins"; + +import LoadingIcon from "../loadingicon"; + +import LocaleManager from "./localemanager"; import DOMManager from "./dommanager"; import PluginManager from "./pluginmanager"; import ThemeManager from "./thememanager"; import Settings from "./settingsmanager"; -import * as Builtins from "builtins"; -import Modals from "../ui/modals"; -import FloatingWindows from "../ui/floatingwindows"; import DataStore from "./datastore"; import DiscordModules from "./discordmodules"; -import LoadingIcon from "../loadingicon"; -import Styles from "../styles/index.css"; + import Editor from "./editor"; import Updater from "./updater"; +import Styles from "@styles/index.css"; + +import Modals from "@ui/modals"; +import FloatingWindows from "@ui/floatingwindows"; + + export default new class Core { async startup() { if (this.hasStarted) return; diff --git a/renderer/src/modules/datastore.js b/renderer/src/modules/datastore.js index e31e623c..6b255dc7 100644 --- a/renderer/src/modules/datastore.js +++ b/renderer/src/modules/datastore.js @@ -1,7 +1,11 @@ -import {Config} from "data"; +import fs from "fs"; +import path from "path"; + import Logger from "@common/logger"; -const fs = require("fs"); -const path = require("path"); + +import Config from "@data/config"; + + const releaseChannel = window?.DiscordNative?.app?.getReleaseChannel?.() ?? "stable"; // Schema diff --git a/renderer/src/modules/discordclasses.js b/renderer/src/modules/discordclasses.js index b8136036..ed73c0a2 100644 --- a/renderer/src/modules/discordclasses.js +++ b/renderer/src/modules/discordclasses.js @@ -1,7 +1,9 @@ +import ClassName from "@structs/classname"; + import Utilities from "./utilities"; -import ClassName from "../structs/classname"; import WebpackModules from "./webpackmodules"; + const combineClasses = function (...props) { return Object.assign({}, ...props.map(prop => WebpackModules.getByProps(...prop))); }; diff --git a/renderer/src/modules/discordmodules.js b/renderer/src/modules/discordmodules.js index 059aaf27..acf56bad 100644 --- a/renderer/src/modules/discordmodules.js +++ b/renderer/src/modules/discordmodules.js @@ -8,6 +8,7 @@ import Utilities from "./utilities"; import WebpackModules, {Filters} from "./webpackmodules"; + export default Utilities.memoizeObject({ get React() {return WebpackModules.getByProps("createElement", "cloneElement");}, get ReactDOM() {return WebpackModules.getByProps("render", "findDOMNode");}, diff --git a/renderer/src/modules/editor.js b/renderer/src/modules/editor.js index 02a26980..f58c2235 100644 --- a/renderer/src/modules/editor.js +++ b/renderer/src/modules/editor.js @@ -1,4 +1,5 @@ -import Logger from "../../../common/logger"; +import Logger from "@common/logger"; + import DOMManager from "./dommanager"; export default new class Editor { diff --git a/renderer/src/modules/emitter.js b/renderer/src/modules/emitter.js index 7fac5f00..b538f439 100644 --- a/renderer/src/modules/emitter.js +++ b/renderer/src/modules/emitter.js @@ -1,4 +1,4 @@ -const EventEmitter = require("events"); +import EventEmitter from "events"; export default new class BDEvents extends EventEmitter { constructor() { diff --git a/renderer/src/modules/ipc.js b/renderer/src/modules/ipc.js index d5219763..df89c3db 100644 --- a/renderer/src/modules/ipc.js +++ b/renderer/src/modules/ipc.js @@ -1,8 +1,9 @@ import {ipcRenderer as ipc} from "electron"; +import * as IPCEvents from "@common/constants/ipcevents"; + import Events from "./emitter"; -import * as IPCEvents from "@common/constants/ipcevents"; export default new class IPCRenderer { diff --git a/renderer/src/modules/localemanager.js b/renderer/src/modules/localemanager.js index 77439b5f..442e0cae 100644 --- a/renderer/src/modules/localemanager.js +++ b/renderer/src/modules/localemanager.js @@ -1,4 +1,5 @@ -import * as Locales from "../../../assets/locales"; +import * as Locales from "@assets/locales/index"; + import DiscordModules from "./discordmodules"; import Utilities from "./utilities"; import Events from "./emitter"; diff --git a/renderer/src/modules/modules.js b/renderer/src/modules/modules.js deleted file mode 100644 index e26911cd..00000000 --- a/renderer/src/modules/modules.js +++ /dev/null @@ -1,18 +0,0 @@ -export {default as WebpackModules} from "./webpackmodules"; - -import DiscordModules from "./discordmodules"; -export const React = DiscordModules.React; -export const ReactDOM = DiscordModules.ReactDOM; -export {DiscordModules}; - -export {default as Utilities} from "./utilities"; -export {default as DataStore} from "./datastore"; -export {default as Events} from "./emitter"; -export {default as Settings} from "./settingsmanager"; -export {default as DOMManager} from "./dommanager"; -export {default as Patcher} from "./patcher"; -export {default as LocaleManager} from "./localemanager"; -export {default as Strings} from "./strings"; -export {default as IPC} from "./ipc"; -export {default as Logger} from "@common/logger"; -export {default as DiscordClasses} from "./discordclasses"; \ No newline at end of file diff --git a/renderer/src/modules/patcher.js b/renderer/src/modules/patcher.js index 3379fe63..274ea2fd 100644 --- a/renderer/src/modules/patcher.js +++ b/renderer/src/modules/patcher.js @@ -4,9 +4,11 @@ */ import Logger from "@common/logger"; + import DiscordModules from "./discordmodules"; import WebpackModules from "./webpackmodules"; + export default class Patcher { static get patches() {return this._patches || (this._patches = []);} diff --git a/renderer/src/modules/pluginmanager.js b/renderer/src/modules/pluginmanager.js index 2c885185..28c2a77f 100644 --- a/renderer/src/modules/pluginmanager.js +++ b/renderer/src/modules/pluginmanager.js @@ -1,17 +1,21 @@ -import {Config} from "data"; +import path from "path"; +import vm from "vm"; + import Logger from "@common/logger"; + +import Config from "@data/config"; + +import AddonError from "@structs/addonerror"; + import AddonManager from "./addonmanager"; -import AddonError from "../structs/addonerror"; import Settings from "./settingsmanager"; import Strings from "./strings"; import Events from "./emitter"; -import Toasts from "../ui/toasts"; -import Modals from "../ui/modals"; -import SettingsRenderer from "../ui/settings"; +import Toasts from "@ui/toasts"; +import Modals from "@ui/modals"; +import SettingsRenderer from "@ui/settings"; -const path = require("path"); -const vm = require("vm"); const normalizeExports = name => ` if (module.exports.default) { diff --git a/renderer/src/modules/settingsmanager.js b/renderer/src/modules/settingsmanager.js index 2957f8b7..63717a68 100644 --- a/renderer/src/modules/settingsmanager.js +++ b/renderer/src/modules/settingsmanager.js @@ -1,10 +1,13 @@ -import {SettingsConfig} from "data"; import Logger from "@common/logger"; + +import SettingsConfig from "@data/settings"; + import DataStore from "./datastore"; import Events from "./emitter"; import DiscordModules from "./discordmodules"; import Strings from "./strings"; + export default new class SettingsManager { constructor() { diff --git a/renderer/src/modules/strings.js b/renderer/src/modules/strings.js index bb02f984..7978c454 100644 --- a/renderer/src/modules/strings.js +++ b/renderer/src/modules/strings.js @@ -1,5 +1,7 @@ +import FormattableString from "@structs/string"; + import LocaleManager from "./localemanager"; -import FormattableString from "../structs/string"; + export default new Proxy(LocaleManager.strings, { get: function(strings, category) { diff --git a/renderer/src/modules/thememanager.js b/renderer/src/modules/thememanager.js index dccfb3ab..008ed669 100644 --- a/renderer/src/modules/thememanager.js +++ b/renderer/src/modules/thememanager.js @@ -1,15 +1,18 @@ -import {Config} from "data"; +import path from "path"; + +import Config from "@data/config"; + +import AddonError from "@structs/addonerror"; + import AddonManager from "./addonmanager"; -import AddonError from "../structs/addonerror"; import Settings from "./settingsmanager"; import DOMManager from "./dommanager"; import Strings from "./strings"; -import Toasts from "../ui/toasts"; -import Modals from "../ui/modals"; -import SettingsRenderer from "../ui/settings"; +import Toasts from "@ui/toasts"; +import Modals from "@ui/modals"; +import SettingsRenderer from "@ui/settings"; -const path = require("path"); export default new class ThemeManager extends AddonManager { get name() {return "ThemeManager";} diff --git a/renderer/src/modules/updater.js b/renderer/src/modules/updater.js index da6c0905..acecf287 100644 --- a/renderer/src/modules/updater.js +++ b/renderer/src/modules/updater.js @@ -1,28 +1,27 @@ import request from "request"; import fileSystem from "fs"; -import {Config} from "data"; import path from "path"; import Logger from "@common/logger"; +import Config from "@data/config"; + +import {comparator as semverComparator, regex as semverRegex} from "@structs/semver"; + import Events from "./emitter"; import IPC from "./ipc"; import Strings from "./strings"; import DataStore from "./datastore"; +import React from "./react"; import Settings from "./settingsmanager"; import PluginManager from "./pluginmanager"; import ThemeManager from "./thememanager"; import WebpackModules from "./webpackmodules"; -import Toasts from "../ui/toasts"; -import Notices from "../ui/notices"; -import Modals from "../ui/modals"; -import UpdaterPanel from "../ui/updater"; -import DiscordModules from "./discordmodules"; - -import {comparator as semverComparator, regex as semverRegex} from "../structs/semver"; - -const React = DiscordModules.React; +import Toasts from "@ui/toasts"; +import Notices from "@ui/notices"; +import Modals from "@ui/modals"; +import UpdaterPanel from "@ui/updater"; const UserSettingsWindow = WebpackModules.getByProps("updateAccount"); diff --git a/renderer/src/modules/utilities.js b/renderer/src/modules/utilities.js index e3d31cb4..b1de98ba 100644 --- a/renderer/src/modules/utilities.js +++ b/renderer/src/modules/utilities.js @@ -1,5 +1,6 @@ import Logger from "@common/logger"; + export default class Utilities { /** * Generates an automatically memoizing version of an object. diff --git a/renderer/src/modules/webpackmodules.js b/renderer/src/modules/webpackmodules.js index 051ed72e..936ffc9c 100644 --- a/renderer/src/modules/webpackmodules.js +++ b/renderer/src/modules/webpackmodules.js @@ -3,7 +3,7 @@ * @module WebpackModules * @version 0.0.2 */ -import Logger from "../../../common/logger"; +import Logger from "@common/logger"; /** * Checks if a given module matches a set of parameters. diff --git a/renderer/src/polyfill/buffer.js b/renderer/src/polyfill/buffer.js index a1b299c0..4dce364d 100644 --- a/renderer/src/polyfill/buffer.js +++ b/renderer/src/polyfill/buffer.js @@ -1,4 +1,4 @@ -import WebpackModules from "../modules/webpackmodules"; +import WebpackModules from "@modules/webpackmodules"; Object.defineProperty(window, "Buffer", { get() {return Buffer.getBuffer().Buffer;}, diff --git a/renderer/src/polyfill/crypto.js b/renderer/src/polyfill/crypto.js index fb053392..5db1e39e 100644 --- a/renderer/src/polyfill/crypto.js +++ b/renderer/src/polyfill/crypto.js @@ -1,5 +1,6 @@ import Remote from "./remote"; + export default { ...Remote.crypto, // Wrap it in Buffer diff --git a/renderer/src/polyfill/fs.js b/renderer/src/polyfill/fs.js index b2510c39..41226a6f 100644 --- a/renderer/src/polyfill/fs.js +++ b/renderer/src/polyfill/fs.js @@ -1,6 +1,6 @@ - import Remote from "./remote"; + export const readFileSync = function (path, options = "utf8") { return Remote.filesystem.readFile(path, options); }; diff --git a/renderer/src/polyfill/https.js b/renderer/src/polyfill/https.js index db0b97de..8a28d58d 100644 --- a/renderer/src/polyfill/https.js +++ b/renderer/src/polyfill/https.js @@ -1,6 +1,8 @@ import EventEmitter from "@common/events"; + import Remote from "./remote"; + export function get(url, options = {}, callback) { if (typeof(options) === "function") { callback = options; diff --git a/renderer/src/polyfill/index.js b/renderer/src/polyfill/index.js index 0f7f18ed..ac8207b7 100644 --- a/renderer/src/polyfill/index.js +++ b/renderer/src/polyfill/index.js @@ -1,13 +1,15 @@ +import EventEmitter from "@common/events"; + import Module from "./module"; import * as vm from "./vm"; import * as fs from "./fs"; import request from "./request"; -import EventEmitter from "@common/events"; import * as https from "./https"; import Buffer from "./buffer"; import crypto from "./crypto"; import Remote from "./remote"; + const originalFs = Object.assign({}, fs); originalFs.writeFileSync = (path, data, options) => fs.writeFileSync(path, data, Object.assign({}, options, {originalFs: true})); originalFs.writeFile = (path, data, options) => fs.writeFile(path, data, Object.assign({}, options, {originalFs: true})); diff --git a/renderer/src/polyfill/module.js b/renderer/src/polyfill/module.js index 16dc8923..8ceae297 100644 --- a/renderer/src/polyfill/module.js +++ b/renderer/src/polyfill/module.js @@ -1,8 +1,10 @@ import Logger from "@common/logger"; + import {compileFunction} from "./vm"; import Remote from "./remote"; import fs from "./fs"; + const path = Remote.path; export const RequireExtensions = { diff --git a/renderer/src/polyfill/request.js b/renderer/src/polyfill/request.js index a37d2264..9d9bb2ee 100644 --- a/renderer/src/polyfill/request.js +++ b/renderer/src/polyfill/request.js @@ -1,5 +1,6 @@ import Remote from "./remote"; + const methods = ["get", "put", "post", "delete", "head"]; const aliases = {del: "delete"}; diff --git a/renderer/src/polyfill/vm.js b/renderer/src/polyfill/vm.js index bc89f797..56ae545d 100644 --- a/renderer/src/polyfill/vm.js +++ b/renderer/src/polyfill/vm.js @@ -1,5 +1,6 @@ import Remote from "./remote"; + export const compileFunction = function(code, params = [], options = {}) { const returned = Remote.vm.compileFunction(code, params, options); if (typeof(returned) === "function") return returned; diff --git a/renderer/src/structs/builtin.js b/renderer/src/structs/builtin.js index da5753fb..21d2421d 100644 --- a/renderer/src/structs/builtin.js +++ b/renderer/src/structs/builtin.js @@ -1,7 +1,9 @@ import Logger from "@common/logger"; -import Events from "../modules/emitter"; -import Settings from "../modules/settingsmanager"; -import Patcher from "../modules/patcher"; + +import Events from "@modules/emitter"; +import Settings from "@modules/settingsmanager"; +import Patcher from "@modules/patcher"; + export default class BuiltinModule { diff --git a/renderer/src/structs/markdown.js b/renderer/src/structs/markdown.js index b311407d..6db0309d 100644 --- a/renderer/src/structs/markdown.js +++ b/renderer/src/structs/markdown.js @@ -1,6 +1,7 @@ import DiscordModules from "@modules/discordmodules"; import Utilities from "@modules/utilities"; + export default class SimpleMarkdownExt { static parseToReact(str) { if (!this._parser) this._initialize(); diff --git a/renderer/src/structs/string.js b/renderer/src/structs/string.js index 8a7735ab..9ea2188b 100644 --- a/renderer/src/structs/string.js +++ b/renderer/src/structs/string.js @@ -1,4 +1,5 @@ -import Utilities from "../modules/utilities"; +import Utilities from "@modules/utilities"; + const LINK = /\[(.+?)]/; diff --git a/renderer/src/ui/addonerrormodal.jsx b/renderer/src/ui/addonerrormodal.jsx index 9cd62a74..6164dace 100644 --- a/renderer/src/ui/addonerrormodal.jsx +++ b/renderer/src/ui/addonerrormodal.jsx @@ -3,16 +3,17 @@ import Strings from "@modules/strings"; import DiscordClasses from "@modules/discordclasses"; import WebpackModules from "@modules/webpackmodules"; -import Extension from "./icons/extension"; -import ThemeIcon from "./icons/theme"; -import Divider from "./divider"; +import Extension from "@ui/icons/extension"; +import ThemeIcon from "@ui/icons/theme"; +import Divider from "@ui/divider"; const Parser = Object(WebpackModules.getByProps("defaultRules", "parse")).defaultRules; const {useState, useCallback, useMemo} = React; const joinClassNames = (...classNames) => classNames.filter(e => e).join(" "); + function AddonError({err, index}) { const [expanded, setExpanded] = useState(false); const toggle = useCallback(() => setExpanded(!expanded), [expanded]); diff --git a/renderer/src/ui/blankslates/emptyimage.jsx b/renderer/src/ui/blankslates/emptyimage.jsx index 536953f9..d88cd6c6 100644 --- a/renderer/src/ui/blankslates/emptyimage.jsx +++ b/renderer/src/ui/blankslates/emptyimage.jsx @@ -1,6 +1,8 @@ +import SimpleMarkdown from "@structs/markdown"; + import React from "@modules/react"; import DiscordClasses from "@modules/discordclasses"; -import SimpleMarkdown from "../../structs/markdown"; + export default function EmptyImage(props) { return
diff --git a/renderer/src/ui/blankslates/noresults.jsx b/renderer/src/ui/blankslates/noresults.jsx index 005d7844..7f9ac924 100644 --- a/renderer/src/ui/blankslates/noresults.jsx +++ b/renderer/src/ui/blankslates/noresults.jsx @@ -1,6 +1,8 @@ import React from "@modules/react"; import DiscordModules from "@modules/discordmodules"; -import MagnifyingGlass from "../icons/magnifyingglass"; + +import MagnifyingGlass from "@ui/icons/magnifyingglass"; + export default function NoResults(props) { return
diff --git a/renderer/src/ui/customcss/csseditor.jsx b/renderer/src/ui/customcss/csseditor.jsx index 32b3cdc5..3ba43a8b 100644 --- a/renderer/src/ui/customcss/csseditor.jsx +++ b/renderer/src/ui/customcss/csseditor.jsx @@ -4,10 +4,11 @@ import Events from "@modules/emitter"; import Settings from "@modules/settingsmanager"; import Editor from "./editor"; -import Refresh from "../icons/reload"; -import Save from "../icons/save"; -import Edit from "../icons/edit"; -import Detach from "../icons/detach"; + +import Refresh from "@ui/icons/reload"; +import Save from "@ui/icons/save"; +import Edit from "@ui/icons/edit"; +import Detach from "@ui/icons/detach"; const {useState, useCallback, useEffect, forwardRef, useImperativeHandle, useRef} = React; diff --git a/renderer/src/ui/divider.jsx b/renderer/src/ui/divider.jsx index 224619dc..605ed252 100644 --- a/renderer/src/ui/divider.jsx +++ b/renderer/src/ui/divider.jsx @@ -1,3 +1,4 @@ import React from "@modules/react"; + export default ({className}) =>
; \ No newline at end of file diff --git a/renderer/src/ui/errorboundary.jsx b/renderer/src/ui/errorboundary.jsx index 91762f9f..f60e746d 100644 --- a/renderer/src/ui/errorboundary.jsx +++ b/renderer/src/ui/errorboundary.jsx @@ -2,6 +2,7 @@ import Logger from "@common/logger"; import React from "@modules/react"; import IPC from "@modules/ipc"; + export default class ErrorBoundary extends React.Component { constructor(props) { super(props); diff --git a/renderer/src/ui/floating/window.jsx b/renderer/src/ui/floating/window.jsx index 6474f8aa..88816fba 100644 --- a/renderer/src/ui/floating/window.jsx +++ b/renderer/src/ui/floating/window.jsx @@ -1,10 +1,12 @@ import React from "@modules/react"; import Strings from "@modules/strings"; -import Screen from "../../structs/screen"; -import CloseButton from "../icons/close"; -import MaximizeIcon from "../icons/fullscreen"; -import Modals from "../modals"; +import Screen from "@structs/screen"; + +import CloseButton from "@ui/icons/close"; +import MaximizeIcon from "@ui/icons/fullscreen"; + +import Modals from "@ui/modals"; const {useState, useCallback, useEffect, useRef} = React; diff --git a/renderer/src/ui/floatingwindows.js b/renderer/src/ui/floatingwindows.js index 2ca0a5d8..7ccd18a6 100644 --- a/renderer/src/ui/floatingwindows.js +++ b/renderer/src/ui/floatingwindows.js @@ -3,10 +3,11 @@ import ReactDOM from "@modules/reactdom"; import Events from "@modules/emitter"; import DOMManager from "@modules/dommanager"; import WebpackModules from "@modules/webpackmodules"; + import FloatingWindowContainer from "./floating/container"; -/* eslint-disable new-cap */ +/* eslint-disable new-cap */ const AppLayerProvider = WebpackModules.getByDisplayName("AppLayerProvider"); let hasInitialized = false; diff --git a/renderer/src/ui/misc/addoneditor.jsx b/renderer/src/ui/misc/addoneditor.jsx index 65da77c9..cf06adf9 100644 --- a/renderer/src/ui/misc/addoneditor.jsx +++ b/renderer/src/ui/misc/addoneditor.jsx @@ -1,9 +1,10 @@ import React from "@modules/react"; import Strings from "@modules/strings"; -import Editor from "../customcss/editor"; -import Save from "../icons/save"; -import Edit from "../icons/edit"; +import Editor from "@ui/customcss/editor"; + +import Save from "@ui/icons/save"; +import Edit from "@ui/icons/edit"; const {useState, useCallback, forwardRef, useImperativeHandle, useRef} = React; diff --git a/renderer/src/ui/modals.js b/renderer/src/ui/modals.js index 55f5f6d7..3e775eed 100644 --- a/renderer/src/ui/modals.js +++ b/renderer/src/ui/modals.js @@ -1,4 +1,7 @@ -import {Config} from "data"; +import Config from "@data/config"; + +import FormattableString from "@structs/string"; + import Logger from "@common/logger"; import React from "@modules/react"; import ReactDOM from "@modules/reactdom"; @@ -8,7 +11,7 @@ import DiscordModules from "@modules/discordmodules"; import WebpackModules from "@modules/webpackmodules"; import DiscordClasses from "@modules/discordclasses"; import DOMManager from "@modules/dommanager"; -import FormattableString from "../structs/string"; + import AddonErrorModal from "./addonerrormodal"; import ErrorBoundary from "./errorboundary"; diff --git a/renderer/src/ui/notices.js b/renderer/src/ui/notices.js index 7780dd46..c57249b1 100644 --- a/renderer/src/ui/notices.js +++ b/renderer/src/ui/notices.js @@ -1,6 +1,7 @@ import WebpackModules from "@modules/webpackmodules"; import DOMManager from "@modules/dommanager"; + export default class Notices { static get baseClass() {return this.__baseClass ??= WebpackModules.getByProps("container", "base")?.base;} static get errorPageClass() {return this.__errorPageClass ??= WebpackModules.getByProps("errorPage")?.errorPage;} diff --git a/renderer/src/ui/settings.js b/renderer/src/ui/settings.js index 3b5f84cc..2f566f6d 100644 --- a/renderer/src/ui/settings.js +++ b/renderer/src/ui/settings.js @@ -3,14 +3,13 @@ import Utilities from "@modules/utilities"; import Events from "@modules/emitter"; import Settings from "@modules/settingsmanager"; import DataStore from "@modules/datastore"; -import WebpackModules from "@modules/webpackmodules"; +import WebpackModules, {Filters} from "@modules/webpackmodules"; import Patcher from "@modules/patcher"; import AddonList from "./settings/addonlist"; import SettingsGroup from "./settings/group"; import SettingsTitle from "./settings/title"; import Header from "./settings/sidebarheader"; -import {Filters} from "../modules/webpackmodules"; export default new class SettingsRenderer { diff --git a/renderer/src/ui/settings/addoncard.jsx b/renderer/src/ui/settings/addoncard.jsx index 5ce0b3f0..ba6d7436 100644 --- a/renderer/src/ui/settings/addoncard.jsx +++ b/renderer/src/ui/settings/addoncard.jsx @@ -1,24 +1,29 @@ import Logger from "@common/logger"; + +import SimpleMarkdown from "@structs/markdown"; + import React from "@modules/react"; import Strings from "@modules/strings"; import WebpackModules from "@modules/webpackmodules"; import DiscordModules from "@modules/discordmodules"; -import SimpleMarkdown from "../../structs/markdown"; -import EditIcon from "../icons/edit"; -import DeleteIcon from "../icons/delete"; -import CogIcon from "../icons/cog"; + + import Switch from "./components/switch"; -import GitHubIcon from "../icons/github"; -import MoneyIcon from "../icons/dollarsign"; -import WebIcon from "../icons/globe"; -import PatreonIcon from "../icons/patreon"; -import SupportIcon from "../icons/support"; -import ExtIcon from "../icons/extension"; -import ErrorIcon from "../icons/error"; -import ThemeIcon from "../icons/theme"; -import Modals from "../modals"; -import Toasts from "../toasts"; +import Modals from "@ui/modals"; +import Toasts from "@ui/toasts"; + +import EditIcon from "@ui/icons/edit"; +import DeleteIcon from "@ui/icons/delete"; +import CogIcon from "@ui/icons/cog"; +import GitHubIcon from "@ui/icons/github"; +import MoneyIcon from "@ui/icons/dollarsign"; +import WebIcon from "@ui/icons/globe"; +import PatreonIcon from "@ui/icons/patreon"; +import SupportIcon from "@ui/icons/support"; +import ExtIcon from "@ui/icons/extension"; +import ErrorIcon from "@ui/icons/error"; +import ThemeIcon from "@ui/icons/theme"; const {useState, useCallback, useMemo} = React; diff --git a/renderer/src/ui/settings/addonlist.jsx b/renderer/src/ui/settings/addonlist.jsx index 04b1a29b..8e61f093 100644 --- a/renderer/src/ui/settings/addonlist.jsx +++ b/renderer/src/ui/settings/addonlist.jsx @@ -4,20 +4,23 @@ import Events from "@modules/emitter"; import DataStore from "@modules/datastore"; import DiscordModules from "@modules/discordmodules"; -import Modals from "../modals"; import SettingsTitle from "./title"; import AddonCard from "./addoncard"; import Dropdown from "./components/dropdown"; import Search from "./components/search"; -import ErrorBoundary from "../errorboundary"; -import ListIcon from "../icons/list"; -import GridIcon from "../icons/grid"; -import NoResults from "../blankslates/noresults"; -import EmptyImage from "../blankslates/emptyimage"; +import Modals from "@ui/modals"; +import ErrorBoundary from "@ui/errorboundary"; + +import ListIcon from "@ui/icons/list"; +import GridIcon from "@ui/icons/grid"; + +import NoResults from "@ui/blankslates/noresults"; +import EmptyImage from "@ui/blankslates/emptyimage"; const {useState, useCallback, useEffect, useReducer, useMemo} = React; + const SORT_OPTIONS = [ {label: Strings.Addons.name, value: "name"}, {label: Strings.Addons.author, value: "author"}, diff --git a/renderer/src/ui/settings/components/dropdown.jsx b/renderer/src/ui/settings/components/dropdown.jsx index 55d38977..34ebad58 100644 --- a/renderer/src/ui/settings/components/dropdown.jsx +++ b/renderer/src/ui/settings/components/dropdown.jsx @@ -1,5 +1,6 @@ import React from "@modules/react"; -import Arrow from "../../icons/downarrow"; + +import Arrow from "@ui/icons/downarrow"; const {useState, useCallback} = React; diff --git a/renderer/src/ui/settings/components/item.jsx b/renderer/src/ui/settings/components/item.jsx index c7679cc4..4fd21243 100644 --- a/renderer/src/ui/settings/components/item.jsx +++ b/renderer/src/ui/settings/components/item.jsx @@ -1,5 +1,6 @@ import React from "@modules/react"; + export default function SettingItem({id, name, note, inline, children}) { return
diff --git a/renderer/src/ui/settings/components/keybind.jsx b/renderer/src/ui/settings/components/keybind.jsx index 5a6eaa17..992cf1cb 100644 --- a/renderer/src/ui/settings/components/keybind.jsx +++ b/renderer/src/ui/settings/components/keybind.jsx @@ -1,7 +1,7 @@ import React from "@modules/react"; -import Keyboard from "../../icons/keyboard"; -import Close from "../../icons/close"; +import Keyboard from "@ui/icons/keyboard"; +import Close from "@ui/icons/close"; const {useState, useCallback, useEffect} = React; diff --git a/renderer/src/ui/settings/components/radio.jsx b/renderer/src/ui/settings/components/radio.jsx index 93968825..ea293de0 100644 --- a/renderer/src/ui/settings/components/radio.jsx +++ b/renderer/src/ui/settings/components/radio.jsx @@ -1,6 +1,6 @@ import React from "@modules/react"; -import RadioIcon from "../../icons/radio"; +import RadioIcon from "@ui/icons/radio"; const {useState, useCallback} = React; diff --git a/renderer/src/ui/settings/components/search.jsx b/renderer/src/ui/settings/components/search.jsx index fbb3f3df..1bd481c8 100644 --- a/renderer/src/ui/settings/components/search.jsx +++ b/renderer/src/ui/settings/components/search.jsx @@ -1,5 +1,5 @@ import React from "@modules/react"; -import SearchIcon from "../../icons/search"; +import SearchIcon from "@ui/icons/search"; const {useState, useCallback} = React; diff --git a/renderer/src/ui/settings/drawer.jsx b/renderer/src/ui/settings/drawer.jsx index 3d362301..957df5d1 100644 --- a/renderer/src/ui/settings/drawer.jsx +++ b/renderer/src/ui/settings/drawer.jsx @@ -1,6 +1,8 @@ import React from "@modules/react"; + import Title from "./title"; -import Divider from "../divider"; + +import Divider from "@ui/divider"; const {useState, useCallback, useRef} = React; diff --git a/renderer/src/ui/settings/group.jsx b/renderer/src/ui/settings/group.jsx index eed0de8f..aba72f62 100644 --- a/renderer/src/ui/settings/group.jsx +++ b/renderer/src/ui/settings/group.jsx @@ -1,4 +1,5 @@ import React from "@modules/react"; + import Drawer from "./drawer"; import Switch from "./components/switch"; import Dropdown from "./components/dropdown"; diff --git a/renderer/src/ui/settings/sidebarheader.jsx b/renderer/src/ui/settings/sidebarheader.jsx index 1eaa88e3..0bb6ab71 100644 --- a/renderer/src/ui/settings/sidebarheader.jsx +++ b/renderer/src/ui/settings/sidebarheader.jsx @@ -1,8 +1,11 @@ -import {Changelog} from "data"; +import Changelog from "@data/changelog"; + import React from "@modules/react"; import DiscordModules from "@modules/discordmodules"; -import HistoryIcon from "../icons/history"; -import Modals from "../modals"; + +import HistoryIcon from "@ui/icons/history"; + +import Modals from "@ui/modals"; export default function SettingsTitle() { diff --git a/renderer/src/ui/toasts.js b/renderer/src/ui/toasts.js index c4ab1150..7e1190bb 100644 --- a/renderer/src/ui/toasts.js +++ b/renderer/src/ui/toasts.js @@ -4,6 +4,7 @@ import Settings from "@modules/settingsmanager"; import WebpackModules from "@modules/webpackmodules"; import DOMManager from "@modules/dommanager"; + export default class Toasts { static get ChannelsClass() {return WebpackModules.getByProps("sidebar", "hasNotice").sidebar.split(" ")[0];} diff --git a/renderer/src/ui/updater.jsx b/renderer/src/ui/updater.jsx index e0edbddf..b274b738 100644 --- a/renderer/src/ui/updater.jsx +++ b/renderer/src/ui/updater.jsx @@ -1,13 +1,15 @@ -import {Config} from "data"; +import Config from "@data/config"; + import React from "@modules/react"; import Strings from "@modules/strings"; import Events from "@modules/emitter"; + import Drawer from "./settings/drawer"; import SettingItem from "./settings/components/item"; import SettingsTitle from "./settings/title"; import Toasts from "./toasts"; -import Checkmark from "./icons/check"; +import Checkmark from "@ui/icons/check"; const {useState, useCallback, useEffect} = React; From a9d6d6ad117eef27c8158e1bc783f5dd3159cac2 Mon Sep 17 00:00:00 2001 From: Zack Rauen Date: Fri, 19 May 2023 19:38:26 -0400 Subject: [PATCH 10/15] Fix for polyfill modules --- preload/src/api/https.js | 2 +- renderer/src/polyfill/fs.js | 2 ++ renderer/src/polyfill/index.js | 6 +++--- renderer/src/polyfill/vm.js | 4 +++- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/preload/src/api/https.js b/preload/src/api/https.js index dae2ac0f..42713097 100644 --- a/preload/src/api/https.js +++ b/preload/src/api/https.js @@ -1,6 +1,6 @@ import * as https from "https"; -const methods = ["get", "put", "post", "delete"]; +const methods = ["get", "put", "post", "delete", "head"]; const redirectCodes = new Set([301, 302, 307, 308]); const headersToClone = ["statusCode", "statusMessage", "url", "headers", "method", "aborted", "complete", "rawHeaders", "end"]; diff --git a/renderer/src/polyfill/fs.js b/renderer/src/polyfill/fs.js index 41226a6f..4db835ca 100644 --- a/renderer/src/polyfill/fs.js +++ b/renderer/src/polyfill/fs.js @@ -179,6 +179,8 @@ export default { rmSync, rmdir, rmdirSync, + stat, + statSync, unlink, unlinkSync, watch, diff --git a/renderer/src/polyfill/index.js b/renderer/src/polyfill/index.js index ac8207b7..0bddb075 100644 --- a/renderer/src/polyfill/index.js +++ b/renderer/src/polyfill/index.js @@ -1,10 +1,10 @@ import EventEmitter from "@common/events"; import Module from "./module"; -import * as vm from "./vm"; -import * as fs from "./fs"; +import vm from "./vm"; +import fs from "./fs"; import request from "./request"; -import * as https from "./https"; +import https from "./https"; import Buffer from "./buffer"; import crypto from "./crypto"; import Remote from "./remote"; diff --git a/renderer/src/polyfill/vm.js b/renderer/src/polyfill/vm.js index 56ae545d..66b065eb 100644 --- a/renderer/src/polyfill/vm.js +++ b/renderer/src/polyfill/vm.js @@ -7,4 +7,6 @@ export const compileFunction = function(code, params = [], options = {}) { const syntaxError = new SyntaxError(returned.message); syntaxError.stack = returned.stack; throw syntaxError; -}; \ No newline at end of file +}; + +export default {compileFunction}; \ No newline at end of file From 8386da0722d08a6fd184a11def5083134f4c1e03 Mon Sep 17 00:00:00 2001 From: Zack Rauen Date: Wed, 24 May 2023 14:08:26 -0400 Subject: [PATCH 11/15] Fix fetch methods --- renderer/src/modules/api/fetch.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/renderer/src/modules/api/fetch.js b/renderer/src/modules/api/fetch.js index 1d541395..7138a15f 100644 --- a/renderer/src/modules/api/fetch.js +++ b/renderer/src/modules/api/fetch.js @@ -1,6 +1,6 @@ import Remote from "../../polyfill/remote"; -const methods = new Set(["GET" | "PUT" | "POST" | "DELETE"]); +const methods = new Set(["GET", "PUT", "POST", "DELETE"]); class FetchResponse extends Response { constructor(options) { From 83c0c81079bf2d08890d5e5baa4d029e8fe3ba0c Mon Sep 17 00:00:00 2001 From: Strencher <46447572+Strencher@users.noreply.github.com> Date: Wed, 24 May 2023 23:00:42 +0200 Subject: [PATCH 12/15] Cleanup & Improvements - Rename `getByProps()` to `getByKeys()` and deprecated *byProps methods & filters. - Fix a couple string errors - Rename `getByPrototypes()` to `getByPrototypeFields()` - Rename `getMangled()` to `getWithKey()` --- renderer/src/modules/api/webpack.js | 44 ++++++++++++++++---------- renderer/src/modules/webpackmodules.js | 8 ++--- 2 files changed, 31 insertions(+), 21 deletions(-) diff --git a/renderer/src/modules/api/webpack.js b/renderer/src/modules/api/webpack.js index 81bbdb57..801db941 100644 --- a/renderer/src/modules/api/webpack.js +++ b/renderer/src/modules/api/webpack.js @@ -32,12 +32,17 @@ const Webpack = { * @memberof Webpack */ Filters: { + /** + * @deprecated + */ + byProps(...props) {return Filters.byKeys(props);}, + /** * Generates a function that filters by a set of properties. - * @param {...string} props List of property names + * @param {...string} keys List of property names * @returns {function} A filter that checks for a set of properties */ - byProps(...props) {return Filters.byProps(props);}, + byKeys(...keys) {return Filters.byKeys(keys);}, /** * Generates a function that filters by a set of properties on the object's prototype. @@ -85,11 +90,11 @@ const Webpack = { * @param {Boolean} [options.searchExports=false] Whether to execute the filter on webpack export getters. * @return {[Any, string]} */ - getMangled(filter, options = {}) { - if (("first" in options)) return Logger.error("BdApi.Webpack~getModule", "Unsupported option first."); - if (("defaultExport" in options) && typeof(options.defaultExport) !== "boolean") return Logger.error("BdApi.Webpack~getModule", "Unsupported type used for options.defaultExport", options.defaultExport, "boolean expected."); - if (("searchExports" in options) && typeof(options.searchExports) !== "boolean") return Logger.error("BdApi.Webpack~getModule", "Unsupported type used for options.searchExports", options.searchExports, "boolean expected."); - return WebpackModules.getMangled(filter, options); + getWithKey(filter, options = {}) { + if (("first" in options)) return Logger.error("BdApi.Webpack~getWithKey", "Unsupported option first."); + if (("defaultExport" in options) && typeof(options.defaultExport) !== "boolean") return Logger.error("BdApi.Webpack~getWithKey", "Unsupported type used for options.defaultExport", options.defaultExport, "boolean expected."); + if (("searchExports" in options) && typeof(options.searchExports) !== "boolean") return Logger.error("BdApi.Webpack~getWithKey", "Unsupported type used for options.searchExports", options.searchExports, "boolean expected."); + return WebpackModules.getWithKey(filter, options); }, /** @@ -102,13 +107,18 @@ const Webpack = { * @param {Boolean} [options.searchExports=false] Whether to execute the filter on webpack exports * @return {any} */ - getModule(filter, options = {}) { - if (("first" in options) && typeof(options.first) !== "boolean") return Logger.error("BdApi.Webpack~getModule", "Unsupported type used for options.first", options.first, "boolean expected."); - if (("defaultExport" in options) && typeof(options.defaultExport) !== "boolean") return Logger.error("BdApi.Webpack~getModule", "Unsupported type used for options.defaultExport", options.defaultExport, "boolean expected."); - if (("searchExports" in options) && typeof(options.searchExports) !== "boolean") return Logger.error("BdApi.Webpack~getModule", "Unsupported type used for options.searchExports", options.searchExports, "boolean expected."); + get(filter, options = {}) { + if (("first" in options) && typeof(options.first) !== "boolean") return Logger.error("BdApi.Webpack~get", "Unsupported type used for options.first", options.first, "boolean expected."); + if (("defaultExport" in options) && typeof(options.defaultExport) !== "boolean") return Logger.error("BdApi.Webpack~get", "Unsupported type used for options.defaultExport", options.defaultExport, "boolean expected."); + if (("searchExports" in options) && typeof(options.searchExports) !== "boolean") return Logger.error("BdApi.Webpack~get", "Unsupported type used for options.searchExports", options.searchExports, "boolean expected."); return WebpackModules.getModule(filter, options); }, + /** + * @deprecated + */ + getModule() {return this.get.apply(this, arguments);}, + /** * Finds multiple modules using multiple filters. * @memberof Webpack @@ -134,7 +144,7 @@ const Webpack = { waitForModule(filter, options = {}) { if (("defaultExport" in options) && typeof(options.defaultExport) !== "boolean") return Logger.error("BdApi.Webpack~waitForModule", "Unsupported type used for options.defaultExport", options.defaultExport, "boolean expected."); if (("signal" in options) && !(options.signal instanceof AbortSignal)) return Logger.error("BdApi.Webpack~waitForModule", "Unsupported type used for options.signal", options.signal, "AbortSignal expected."); - if (("searchExports" in options) && typeof(options.searchExports) !== "boolean") return Logger.error("BdApi.Webpack~getModule", "Unsupported type used for options.searchExports", options.searchExports, "boolean expected."); + if (("searchExports" in options) && typeof(options.searchExports) !== "boolean") return Logger.error("BdApi.Webpack~waitForModule", "Unsupported type used for options.searchExports", options.searchExports, "boolean expected."); return WebpackModules.getLazy(filter, options); }, @@ -184,7 +194,7 @@ const Webpack = { * @param {...string} prototypes Properties to use to filter modules * @return {Any[]} */ - getAllByPrototypes(...prototypes) { + getAllByPrototypeFields(...prototypes) { const options = getOptions(prototypes, {first: false}); return WebpackModules.getModule(Filters.byPrototypeFields(prototypes), options); @@ -195,10 +205,10 @@ const Webpack = { * @param {...string} props Properties to use to filter modules * @return {Any} */ - getByProps(...props) { + getByKeys(...props) { const options = getOptions(props); - return this.getModule(Filters.byProps(props), options); + return WebpackModules.getModule(Filters.byKeys(props), options); }, /** @@ -206,10 +216,10 @@ const Webpack = { * @param {...string} props Properties to use to filter modules * @return {Any[]} */ - getAllByProps(...props) { + getAllByKeys(...props) { const options = getOptions(props, {first: false}); - return WebpackModules.getModule(Filters.byProps(props), options); + return WebpackModules.getModule(Filters.byKeys(props), options); }, /** diff --git a/renderer/src/modules/webpackmodules.js b/renderer/src/modules/webpackmodules.js index b656aa56..f44877b1 100644 --- a/renderer/src/modules/webpackmodules.js +++ b/renderer/src/modules/webpackmodules.js @@ -22,7 +22,7 @@ export class Filters { * @param {module:WebpackModules.Filters~filter} filter - Additional filter * @returns {module:WebpackModules.Filters~filter} - A filter that checks for a set of properties */ - static byProps(props, filter = m => m) { + static byKeys(props, filter = m => m) { return module => { if (!module) return false; if (typeof(module) !== "object" && typeof(module) !== "function") return false; @@ -275,7 +275,7 @@ export default class WebpackModules { * @param {Boolean} [options.searchExports=false] Whether to execute the filter on webpack export getters. * @return {[Any, string]} */ - static *getMangled(filter, {target = null, ...rest} = {}) { + static *getWithKey(filter, {target = null, ...rest} = {}) { yield target ??= this.getModule(exports => Object.values(exports).some(filter), rest @@ -333,7 +333,7 @@ export default class WebpackModules { * @return {Any} */ static getByProps(...props) { - return this.getModule(Filters.byProps(props)); + return this.getModule(Filters.byKeys(props)); } /** @@ -342,7 +342,7 @@ export default class WebpackModules { * @return {Any} */ static getAllByProps(...props) { - return this.getModule(Filters.byProps(props), {first: false}); + return this.getModule(Filters.byKeys(props), {first: false}); } /** From 0acc5a6f857168b0aafad1526399df6a2767010b Mon Sep 17 00:00:00 2001 From: Zack Rauen Date: Wed, 24 May 2023 18:24:18 -0400 Subject: [PATCH 13/15] Change to prototype keys --- renderer/src/modules/api/webpack.js | 29 +++++++++++++++----------- renderer/src/modules/webpackmodules.js | 6 +++--- renderer/src/ui/settings.js | 2 +- 3 files changed, 21 insertions(+), 16 deletions(-) diff --git a/renderer/src/modules/api/webpack.js b/renderer/src/modules/api/webpack.js index 801db941..037468a6 100644 --- a/renderer/src/modules/api/webpack.js +++ b/renderer/src/modules/api/webpack.js @@ -44,12 +44,17 @@ const Webpack = { */ byKeys(...keys) {return Filters.byKeys(keys);}, + /** + * @deprecated + */ + byPrototypeFields(...props) {return Filters.byPrototypeKeys(props);}, + /** * Generates a function that filters by a set of properties on the object's prototype. * @param {...string} props List of property names * @returns {function} A filter that checks for a set of properties on the object's prototype. */ - byPrototypeFields(...props) {return Filters.byPrototypeFields(props);}, + byPrototypeKeys(...props) {return Filters.byPrototypeKeys(props);}, /** * Generates a function that filters by a regex. @@ -114,10 +119,16 @@ const Webpack = { return WebpackModules.getModule(filter, options); }, + /** + * Finds all modules matching a filter function. + * @param {Function} filter A function to use to filter modules + */ + getAll(filter) {return WebpackModules.getModule(filter, {first: false});}, + /** * @deprecated */ - getModule() {return this.get.apply(this, arguments);}, + getModule() {return Webpack.get(...arguments);}, /** * Finds multiple modules using multiple filters. @@ -148,12 +159,6 @@ const Webpack = { return WebpackModules.getLazy(filter, options); }, - /** - * Finds all modules matching a filter function. - * @param {Function} filter A function to use to filter modules - */ - getModules(filter) {return WebpackModules.getModule(filter, {first: false});}, - /** * Finds a module using its code. * @param {RegEx} regex A regular expression to use to filter modules @@ -183,10 +188,10 @@ const Webpack = { * @param {...string} prototypes Properties to use to filter modules * @return {Any} */ - getByPrototypes(...prototypes) { + getByPrototypeKeys(...prototypes) { const options = getOptions(prototypes); - return WebpackModules.getModule(Filters.byPrototypeFields(prototypes), options); + return WebpackModules.getModule(Filters.byPrototypeKeys(prototypes), options); }, /** @@ -194,10 +199,10 @@ const Webpack = { * @param {...string} prototypes Properties to use to filter modules * @return {Any[]} */ - getAllByPrototypeFields(...prototypes) { + getAllByPrototypeKeys(...prototypes) { const options = getOptions(prototypes, {first: false}); - return WebpackModules.getModule(Filters.byPrototypeFields(prototypes), options); + return WebpackModules.getModule(Filters.byPrototypeKeys(prototypes), options); }, /** diff --git a/renderer/src/modules/webpackmodules.js b/renderer/src/modules/webpackmodules.js index f44877b1..8cc303a8 100644 --- a/renderer/src/modules/webpackmodules.js +++ b/renderer/src/modules/webpackmodules.js @@ -41,7 +41,7 @@ export class Filters { * @param {module:WebpackModules.Filters~filter} filter - Additional filter * @returns {module:WebpackModules.Filters~filter} - A filter that checks for a set of properties on the object's prototype */ - static byPrototypeFields(fields, filter = m => m) { + static byPrototypeKeys(fields, filter = m => m) { return module => { if (!module) return false; if (typeof(module) !== "object" && typeof(module) !== "function") return false; @@ -315,7 +315,7 @@ export default class WebpackModules { * @return {Any} */ static getByPrototypes(...prototypes) { - return this.getModule(Filters.byPrototypeFields(prototypes)); + return this.getModule(Filters.byPrototypeKeys(prototypes)); } /** @@ -324,7 +324,7 @@ export default class WebpackModules { * @return {Any} */ static getAllByPrototypes(...prototypes) { - return this.getModule(Filters.byPrototypeFields(prototypes), {first: false}); + return this.getModule(Filters.byPrototypeKeys(prototypes), {first: false}); } /** diff --git a/renderer/src/ui/settings.js b/renderer/src/ui/settings.js index 8b56da87..492ea12c 100644 --- a/renderer/src/ui/settings.js +++ b/renderer/src/ui/settings.js @@ -62,7 +62,7 @@ export default new class SettingsRenderer { } async patchSections() { - const UserSettings = await WebpackModules.getLazy(Filters.byPrototypeFields(["getPredicateSections"])); + const UserSettings = await WebpackModules.getLazy(Filters.byPrototypeKeys(["getPredicateSections"])); Patcher.after("SettingsManager", UserSettings.prototype, "getPredicateSections", (thisObject, args, returnValue) => { let location = returnValue.findIndex(s => s.section.toLowerCase() == "changelog") - 1; From 09d883007e263088142467c08eb2443264ebf737 Mon Sep 17 00:00:00 2001 From: Zack Rauen Date: Fri, 9 Jun 2023 09:29:19 -0400 Subject: [PATCH 14/15] Add store search and fix others --- renderer/src/modules/api/webpack.js | 39 ++++++++++++++++++-------- renderer/src/modules/webpackmodules.js | 12 +++++++- 2 files changed, 39 insertions(+), 12 deletions(-) diff --git a/renderer/src/modules/api/webpack.js b/renderer/src/modules/api/webpack.js index 037468a6..16db9ce3 100644 --- a/renderer/src/modules/api/webpack.js +++ b/renderer/src/modules/api/webpack.js @@ -78,6 +78,13 @@ const Webpack = { */ byDisplayName(name) {return Filters.byDisplayName(name);}, + /** + * Generates a function that filters by a specific internal Store name. + * @param {string} name Name the store should have + * @returns {function} A filter that checks for a Store name match + */ + byStoreName(name) {return Filters.byStoreName(name);}, + /** * Generates a combined function from a list of filters. * @param {...function} filters A list of filters @@ -112,23 +119,26 @@ const Webpack = { * @param {Boolean} [options.searchExports=false] Whether to execute the filter on webpack exports * @return {any} */ - get(filter, options = {}) { + getModule(filter, options = {}) { if (("first" in options) && typeof(options.first) !== "boolean") return Logger.error("BdApi.Webpack~get", "Unsupported type used for options.first", options.first, "boolean expected."); - if (("defaultExport" in options) && typeof(options.defaultExport) !== "boolean") return Logger.error("BdApi.Webpack~get", "Unsupported type used for options.defaultExport", options.defaultExport, "boolean expected."); - if (("searchExports" in options) && typeof(options.searchExports) !== "boolean") return Logger.error("BdApi.Webpack~get", "Unsupported type used for options.searchExports", options.searchExports, "boolean expected."); + if (("defaultExport" in options) && typeof(options.defaultExport) !== "boolean") return Logger.error("BdApi.Webpack~getModule", "Unsupported type used for options.defaultExport", options.defaultExport, "boolean expected."); + if (("searchExports" in options) && typeof(options.searchExports) !== "boolean") return Logger.error("BdApi.Webpack~getModule", "Unsupported type used for options.searchExports", options.searchExports, "boolean expected."); return WebpackModules.getModule(filter, options); }, /** * Finds all modules matching a filter function. * @param {Function} filter A function to use to filter modules + * @param {object} [options] Options to configure the search + * @param {Boolean} [options.defaultExport=true] Whether to return default export when matching the default export + * @param {Boolean} [options.searchExports=false] Whether to execute the filter on webpack exports + * @return {any[]} */ - getAll(filter) {return WebpackModules.getModule(filter, {first: false});}, - - /** - * @deprecated - */ - getModule() {return Webpack.get(...arguments);}, + getModules(filter, options = {}) { + if (("defaultExport" in options) && typeof(options.defaultExport) !== "boolean") return Logger.error("BdApi.Webpack~getModules", "Unsupported type used for options.defaultExport", options.defaultExport, "boolean expected."); + if (("searchExports" in options) && typeof(options.searchExports) !== "boolean") return Logger.error("BdApi.Webpack~getModules", "Unsupported type used for options.searchExports", options.searchExports, "boolean expected."); + return WebpackModules.getModule(filter, Object.assign(options, {first: false})); + }, /** * Finds multiple modules using multiple filters. @@ -232,7 +242,7 @@ const Webpack = { * @param {...String} props Strings to use to filter modules * @return {Any} */ - getByString(...strings) { + getByStrings(...strings) { const options = getOptions(strings); return WebpackModules.getModule(Filters.byStrings(...strings), options); @@ -243,11 +253,18 @@ const Webpack = { * @param {...String} strings Strings to use to filter modules * @return {Any[]} */ - getAllByString(...strings) { + getAllByStrings(...strings) { const options = getOptions(strings, {first: false}); return WebpackModules.getModule(Filters.byStrings(...strings), options); }, + + /** + * Finds an internal Store module using the name. + * @param {String} name Name of the store to find (usually includes "Store") + * @return {Any} + */ + getStore(name) {return WebpackModules.getModule(Filters.byStoreName(name));}, }; Object.freeze(Webpack); diff --git a/renderer/src/modules/webpackmodules.js b/renderer/src/modules/webpackmodules.js index 8cc303a8..b8e5652b 100644 --- a/renderer/src/modules/webpackmodules.js +++ b/renderer/src/modules/webpackmodules.js @@ -94,7 +94,6 @@ export class Filters { /** * Generates a {@link module:WebpackModules.Filters~filter} that filters by a set of properties. * @param {string} name - Name the module should have - * @param {module:WebpackModules.Filters~filter} filter - Additional filter * @returns {module:WebpackModules.Filters~filter} - A filter that checks for a set of properties */ static byDisplayName(name) { @@ -103,6 +102,17 @@ export class Filters { }; } + /** + * Generates a {@link module:WebpackModules.Filters~filter} that filters by a set of properties. + * @param {string} name - Name the store should have (usually includes the word Store) + * @returns {module:WebpackModules.Filters~filter} - A filter that checks for a set of properties + */ + static byStoreName(name) { + return module => { + return module?._dispatchToken && module?.getName?.() === name; + }; + } + /** * Generates a combined {@link module:WebpackModules.Filters~filter} from a list of filters. * @param {...module:WebpackModules.Filters~filter} filters - A list of filters From 9bb71d646249f684099f1301c541cd9c40e5edbe Mon Sep 17 00:00:00 2001 From: Zack Rauen Date: Wed, 14 Jun 2023 21:17:44 -0400 Subject: [PATCH 15/15] Fix tooltip search --- renderer/src/modules/discordmodules.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/renderer/src/modules/discordmodules.js b/renderer/src/modules/discordmodules.js index 059aaf27..2e46f8e5 100644 --- a/renderer/src/modules/discordmodules.js +++ b/renderer/src/modules/discordmodules.js @@ -160,6 +160,6 @@ export default Utilities.memoizeObject({ // Make fallback component just pass children, so it can at least render that. const fallback = props => props.children?.({}) ?? null; - return WebpackModules.getModule(Filters.byPrototypeFields(["renderTooltip"]), {searchExports: true}) ?? fallback; + return WebpackModules.getModule(Filters.byPrototypeKeys(["renderTooltip"]), {searchExports: true}) ?? fallback; } });