Archived
0
0
Fork 0

feat: basic api client

This commit is contained in:
Daryl Ronningen 2021-07-06 11:50:06 -05:00
parent f85f15aa52
commit c7204f7e85
Signed by: Daryl Ronningen
GPG key ID: FD23F0C934A5EC6B
9 changed files with 625 additions and 40 deletions

View file

@ -7,6 +7,8 @@
}, },
"extends": [ "extends": [
"eslint:recommended", "eslint:recommended",
"plugin:import/recommended",
"plugin:import/typescript",
"plugin:@typescript-eslint/eslint-recommended", "plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended" "plugin:@typescript-eslint/recommended"
], ],
@ -58,6 +60,12 @@
], ],
"no-case-declarations": "off", "no-case-declarations": "off",
"camelcase": "off", "camelcase": "off",
"keyword-spacing": "error",
"spaced-comment": [
"error",
"always"
],
"no-var": "error",
// TypeScript Rules // TypeScript Rules
"@typescript-eslint/naming-convention": [ "@typescript-eslint/naming-convention": [
"error", "error",
@ -101,6 +109,7 @@
"accessibility": "explicit" "accessibility": "explicit"
} }
], ],
"@typescript-eslint/explicit-function-return-type": "error",
// Unicorn Rules // Unicorn Rules
"unicorn/filename-case": [ "unicorn/filename-case": [
"error", "error",

View file

@ -35,6 +35,9 @@
"release": "semantic-release" "release": "semantic-release"
}, },
"dependencies": { "dependencies": {
"abort-controller": "^3.0.0",
"async": "^3.2.0",
"form-data": "^4.0.0",
"node-fetch": "^2.6.1", "node-fetch": "^2.6.1",
"tslib": "^2.3.0", "tslib": "^2.3.0",
"ws": "^7.5.2" "ws": "^7.5.2"
@ -50,6 +53,7 @@
"@semantic-release/git": "^9.0.0", "@semantic-release/git": "^9.0.0",
"@semantic-release/npm": "^7.1.3", "@semantic-release/npm": "^7.1.3",
"@semantic-release/release-notes-generator": "^9.0.3", "@semantic-release/release-notes-generator": "^9.0.3",
"@types/async": "^3",
"@types/chai": "^4.2.19", "@types/chai": "^4.2.19",
"@types/eslint": "^7.2.13", "@types/eslint": "^7.2.13",
"@types/mocha": "^8.2.2", "@types/mocha": "^8.2.2",
@ -67,6 +71,7 @@
"eslint": "^7.29.0", "eslint": "^7.29.0",
"eslint-formatter-pretty": "^4.1.0", "eslint-formatter-pretty": "^4.1.0",
"eslint-plugin-header": "^3.1.1", "eslint-plugin-header": "^3.1.1",
"eslint-plugin-import": "^2.23.4",
"eslint-plugin-unicorn": "^34.0.1", "eslint-plugin-unicorn": "^34.0.1",
"husky": "^7.0.0", "husky": "^7.0.0",
"inquirer": "^8.1.1", "inquirer": "^8.1.1",
@ -85,7 +90,6 @@
}, },
"optionalDependencies": { "optionalDependencies": {
"bufferutil": "^4.0.3", "bufferutil": "^4.0.3",
"erlpack": "^0.1.3",
"utf-8-validate": "^5.0.5", "utf-8-validate": "^5.0.5",
"zlib-sync": "^0.1.7" "zlib-sync": "^0.1.7"
}, },

27
src/api/apiClient.ts Normal file
View file

@ -0,0 +1,27 @@
import { ApiHandler } from './apiHandler';
import type { DeepRequired, IApiClientOptions } from '../utils/types';
export class ApiClient {
public handler: ApiHandler
public options: DeepRequired<IApiClientOptions>;
private _token: string;
public constructor(token: string, options: DeepRequired<IApiClientOptions>) {
this.options = options;
this._token = token;
this.handler = new ApiHandler(this._token, this.options);
}
public async get<T>(): Promise<T> {
return this.handler.makeRequest<T>({
method: 'GET',
body: '',
headers: {},
path: '/',
requireAuth: false,
});
}
}

65
src/api/apiHandler.ts Normal file
View file

@ -0,0 +1,65 @@
import { AbortController } from 'abort-controller';
import { queue, QueueObject } from 'async';
import FormData from 'form-data';
import fetch from 'node-fetch';
import type { DeepRequired, IApiClientOptions, IMakeRequestOptions } from '../utils/types';
export class ApiHandler {
public options: DeepRequired<IApiClientOptions>;
public queue: QueueObject<unknown>;
private _token: string;
public constructor(token: string, options: DeepRequired<IApiClientOptions>) {
this.options = options;
this._token = token;
this.queue = queue(async (requestOptions: IMakeRequestOptions, callback) => {
callback(await this.makeRequest(requestOptions));
});
}
public get baseApiUrl(): string {
return `${this.options.apiUrl}/${this.options.apiVersion}`;
}
public async makeRequest<T>(options: IMakeRequestOptions): Promise<T> {
let headers: Record<string, unknown> = options.headers ?? {};
if (options.requireAuth) headers['Authorization'] = `Bot ${this._token}`;
if (options.reason) headers['X-Audit-Log-Reason'] = encodeURIComponent(options.reason);
let body: FormData | string;
if (options.files && options.files.length) {
body = new FormData();
for (const file of options.files) if (file && file.file) body.append(file.name, file.file, file.name);
if (options.body) body.append('payload_json', JSON.stringify(options.body));
headers = Object.assign(headers, body.getHeaders());
} else if (options.body) {
body = JSON.stringify(options.body);
headers['Content-Type'] = 'application/json';
}
const controller = new AbortController();
const timeout = setTimeout(() => controller.abort(), this.options.apiRequestTimeout);
try {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
const res = await fetch(`${this.baseApiUrl}/${options.path}`, { method: options.method, headers, signal: controller.signal, body });
// TODO: handle Ratelimits
// TODO: Handle non-2xx responses
return res.json() as unknown as T;
} finally {
clearTimeout(timeout);
}
}
public async push<T>(requestOptions: IMakeRequestOptions): Promise<T> {
return await this.queue.pushAsync<T>(requestOptions);
}
}

View file

@ -1,8 +1,18 @@
export default class Client { import { ApiClient } from '../api/apiClient';
import { defaults } from '../utils/defaults';
import type { DeepRequired, IClientOptions } from '../utils/types';
export class Client {
public api: ApiClient;
public options: DeepRequired<IClientOptions>;
private _token: string; private _token: string;
public constructor(token: string) { public constructor(token: string, options?: DeepRequired<IClientOptions>) {
this.options = Object.assign(options, defaults.clientOptions);
this._token = token; this._token = token;
this.api = new ApiClient(this._token, this.options.api);
} }
} }

10
src/utils/defaults.ts Normal file
View file

@ -0,0 +1,10 @@
import type { IDefaultOptions } from './types';
export const defaults: IDefaultOptions = {
clientOptions: {
api: {
apiUrl: 'https://discord.com/api',
apiVersion: 9,
},
},
};

62
src/utils/types.ts Normal file
View file

@ -0,0 +1,62 @@
// Interfaces
export interface IApiClientOptions {
apiUrl?: string;
apiVersion?: number;
apiRequestTimeout?: number;
}
export interface IClientOptions {
api?: IApiClientOptions;
}
export interface IDefaultOptions {
clientOptions: IClientOptions;
}
export interface IMakeRequestOptions {
path: string;
reason?: string;
requireAuth?: boolean;
body?: unknown;
headers?: Record<string, undefined>;
method: ApiMethods;
files?: {
name: string;
file: Buffer;
}[];
}
// Enums
// Type Aliases
export type ApiMethods = 'GET' | 'POST' | 'DELETE';
export type Primitives = string | number | boolean | bigint | symbol | undefined | null;
// eslint-disable-next-line @typescript-eslint/ban-types
export type Builtin = Primitives | Function | Date | Error | RegExp;
export type DeepRequired<T> = T extends Builtin
? NonNullable<T>
: T extends Map<infer K, infer V>
? Map<DeepRequired<K>, DeepRequired<V>>
: T extends ReadonlyMap<infer K, infer V>
? ReadonlyMap<DeepRequired<K>, DeepRequired<V>>
: T extends WeakMap<infer K, infer V>
? WeakMap<DeepRequired<K>, DeepRequired<V>>
: T extends Set<infer U>
? Set<DeepRequired<U>>
: T extends ReadonlySet<infer U>
? ReadonlySet<DeepRequired<U>>
: T extends WeakSet<infer U>
? WeakSet<DeepRequired<U>>
: T extends Promise<infer U>
? Promise<DeepRequired<U>>
// eslint-disable-next-line @typescript-eslint/ban-types
: T extends {}
? { [K in keyof T]-?: DeepRequired<T[K]> }
: NonNullable<T>;

0
src/utils/utils.ts Normal file
View file

470
yarn.lock
View file

@ -546,6 +546,7 @@ __metadata:
"@semantic-release/git": ^9.0.0 "@semantic-release/git": ^9.0.0
"@semantic-release/npm": ^7.1.3 "@semantic-release/npm": ^7.1.3
"@semantic-release/release-notes-generator": ^9.0.3 "@semantic-release/release-notes-generator": ^9.0.3
"@types/async": ^3
"@types/chai": ^4.2.19 "@types/chai": ^4.2.19
"@types/eslint": ^7.2.13 "@types/eslint": ^7.2.13
"@types/mocha": ^8.2.2 "@types/mocha": ^8.2.2
@ -558,14 +559,17 @@ __metadata:
"@typescript-eslint/eslint-plugin": ^4.28.1 "@typescript-eslint/eslint-plugin": ^4.28.1
"@typescript-eslint/parser": ^4.28.1 "@typescript-eslint/parser": ^4.28.1
"@typescript-eslint/typescript-estree": ^4.28.1 "@typescript-eslint/typescript-estree": ^4.28.1
abort-controller: ^3.0.0
async: ^3.2.0
bufferutil: ^4.0.3 bufferutil: ^4.0.3
chai: ^4.3.4 chai: ^4.3.4
commitizen: ^4.2.4 commitizen: ^4.2.4
erlpack: ^0.1.3
eslint: ^7.29.0 eslint: ^7.29.0
eslint-formatter-pretty: ^4.1.0 eslint-formatter-pretty: ^4.1.0
eslint-plugin-header: ^3.1.1 eslint-plugin-header: ^3.1.1
eslint-plugin-import: ^2.23.4
eslint-plugin-unicorn: ^34.0.1 eslint-plugin-unicorn: ^34.0.1
form-data: ^4.0.0
husky: ^7.0.0 husky: ^7.0.0
inquirer: ^8.1.1 inquirer: ^8.1.1
lint-staged: ^11.0.0 lint-staged: ^11.0.0
@ -588,8 +592,6 @@ __metadata:
dependenciesMeta: dependenciesMeta:
bufferutil: bufferutil:
optional: true optional: true
erlpack:
optional: true
utf-8-validate: utf-8-validate:
optional: true optional: true
zlib-sync: zlib-sync:
@ -1160,6 +1162,13 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"@types/async@npm:^3":
version: 3.2.6
resolution: "@types/async@npm:3.2.6"
checksum: a4d06f473d7167b7537247f629f9bd5df8ad43001ea5bf421e94dd55df1d19685b5900b4943b795febe53d719fd32b21b4792516f7920e35249c6c8de60254f0
languageName: node
linkType: hard
"@types/cacheable-request@npm:^6.0.1": "@types/cacheable-request@npm:^6.0.1":
version: 6.0.1 version: 6.0.1
resolution: "@types/cacheable-request@npm:6.0.1" resolution: "@types/cacheable-request@npm:6.0.1"
@ -1472,6 +1481,15 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"abort-controller@npm:^3.0.0":
version: 3.0.0
resolution: "abort-controller@npm:3.0.0"
dependencies:
event-target-shim: ^5.0.0
checksum: 170bdba9b47b7e65906a28c8ce4f38a7a369d78e2271706f020849c1bfe0ee2067d4261df8bbb66eb84f79208fd5b710df759d64191db58cfba7ce8ef9c54b75
languageName: node
linkType: hard
"acorn-jsx@npm:^5.3.1": "acorn-jsx@npm:^5.3.1":
version: 5.3.1 version: 5.3.1
resolution: "acorn-jsx@npm:5.3.1" resolution: "acorn-jsx@npm:5.3.1"
@ -1714,6 +1732,19 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"array-includes@npm:^3.1.3":
version: 3.1.3
resolution: "array-includes@npm:3.1.3"
dependencies:
call-bind: ^1.0.2
define-properties: ^1.1.3
es-abstract: ^1.18.0-next.2
get-intrinsic: ^1.1.1
is-string: ^1.0.5
checksum: eaab8812412b5ec921c8fe678a9d61f501b12f6c72e271e0e8652fe7f4145276cc7ad79ff303ac4ed69cbf5135155bfb092b1b6d552e423e75106d1c887da150
languageName: node
linkType: hard
"array-union@npm:^2.1.0": "array-union@npm:^2.1.0":
version: 2.1.0 version: 2.1.0
resolution: "array-union@npm:2.1.0" resolution: "array-union@npm:2.1.0"
@ -1721,6 +1752,17 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"array.prototype.flat@npm:^1.2.4":
version: 1.2.4
resolution: "array.prototype.flat@npm:1.2.4"
dependencies:
call-bind: ^1.0.0
define-properties: ^1.1.3
es-abstract: ^1.18.0-next.1
checksum: 1ec5d9887ae45e70e4b993e801b440ae5ddcd0d2c6d1dbe214c311e91436152f510916bdac82b066693544b9801a3c510dfbec8a278ababf8de7eb0bde74636f
languageName: node
linkType: hard
"arrify@npm:^1.0.1": "arrify@npm:^1.0.1":
version: 1.0.1 version: 1.0.1
resolution: "arrify@npm:1.0.1" resolution: "arrify@npm:1.0.1"
@ -1765,6 +1807,13 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"async@npm:^3.2.0":
version: 3.2.0
resolution: "async@npm:3.2.0"
checksum: 6739fae769e6c9f76b272558f118ef041d45c979c573a8fe93f8cfbc32eb9c92da032e9effe6bbcc9b1131292cde6c4a9e61a442894aa06a262addd8dd3adda1
languageName: node
linkType: hard
"asynckit@npm:^0.4.0": "asynckit@npm:^0.4.0":
version: 0.4.0 version: 0.4.0
resolution: "asynckit@npm:0.4.0" resolution: "asynckit@npm:0.4.0"
@ -1844,15 +1893,6 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"bindings@npm:^1.5.0":
version: 1.5.0
resolution: "bindings@npm:1.5.0"
dependencies:
file-uri-to-path: 1.0.0
checksum: 65b6b48095717c2e6105a021a7da4ea435aa8d3d3cd085cb9e85bcb6e5773cf318c4745c3f7c504412855940b585bdf9b918236612a1c7a7942491de176f1ae7
languageName: node
linkType: hard
"bl@npm:^4.1.0": "bl@npm:^4.1.0":
version: 4.1.0 version: 4.1.0
resolution: "bl@npm:4.1.0" resolution: "bl@npm:4.1.0"
@ -2029,6 +2069,16 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"call-bind@npm:^1.0.0, call-bind@npm:^1.0.2":
version: 1.0.2
resolution: "call-bind@npm:1.0.2"
dependencies:
function-bind: ^1.1.1
get-intrinsic: ^1.0.2
checksum: f8e31de9d19988a4b80f3e704788c4a2d6b6f3d17cfec4f57dc29ced450c53a49270dc66bf0fbd693329ee948dd33e6c90a329519aef17474a4d961e8d6426b0
languageName: node
linkType: hard
"callsites@npm:^3.0.0": "callsites@npm:^3.0.0":
version: 3.1.0 version: 3.1.0
resolution: "callsites@npm:3.1.0" resolution: "callsites@npm:3.1.0"
@ -2674,6 +2724,24 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"debug@npm:^2.6.9":
version: 2.6.9
resolution: "debug@npm:2.6.9"
dependencies:
ms: 2.0.0
checksum: d2f51589ca66df60bf36e1fa6e4386b318c3f1e06772280eea5b1ae9fd3d05e9c2b7fd8a7d862457d00853c75b00451aa2d7459b924629ee385287a650f58fe6
languageName: node
linkType: hard
"debug@npm:^3.2.7":
version: 3.2.7
resolution: "debug@npm:3.2.7"
dependencies:
ms: ^2.1.1
checksum: b3d8c5940799914d30314b7c3304a43305fd0715581a919dacb8b3176d024a782062368405b47491516d2091d6462d4d11f2f4974a405048094f8bfebfa3071c
languageName: node
linkType: hard
"debuglog@npm:^1.0.1": "debuglog@npm:^1.0.1":
version: 1.0.1 version: 1.0.1
resolution: "debuglog@npm:1.0.1" resolution: "debuglog@npm:1.0.1"
@ -2769,6 +2837,15 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"define-properties@npm:^1.1.3":
version: 1.1.3
resolution: "define-properties@npm:1.1.3"
dependencies:
object-keys: ^1.0.12
checksum: da80dba55d0cd76a5a7ab71ef6ea0ebcb7b941f803793e4e0257b384cb772038faa0c31659d244e82c4342edef841c1a1212580006a05a5068ee48223d787317
languageName: node
linkType: hard
"del@npm:^6.0.0": "del@npm:^6.0.0":
version: 6.0.0 version: 6.0.0
resolution: "del@npm:6.0.0" resolution: "del@npm:6.0.0"
@ -2860,6 +2937,15 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"doctrine@npm:^2.1.0":
version: 2.1.0
resolution: "doctrine@npm:2.1.0"
dependencies:
esutils: ^2.0.2
checksum: a45e277f7feaed309fe658ace1ff286c6e2002ac515af0aaf37145b8baa96e49899638c7cd47dccf84c3d32abfc113246625b3ac8f552d1046072adee13b0dc8
languageName: node
linkType: hard
"doctrine@npm:^3.0.0": "doctrine@npm:^3.0.0":
version: 3.0.0 version: 3.0.0
resolution: "doctrine@npm:3.0.0" resolution: "doctrine@npm:3.0.0"
@ -2962,17 +3048,6 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"erlpack@npm:^0.1.3":
version: 0.1.3
resolution: "erlpack@npm:0.1.3"
dependencies:
bindings: ^1.5.0
nan: ^2.14.0
node-gyp: latest
checksum: 7ef4effc58ec90f31bae6450f732abac7f7b52942a3838dc25aac2866a7ef3385ac38fa324669b4be913f6fbacd36a4e512fd083fdbd7592240789db689c95d6
languageName: node
linkType: hard
"err-code@npm:^2.0.2": "err-code@npm:^2.0.2":
version: 2.0.3 version: 2.0.3
resolution: "err-code@npm:2.0.3" resolution: "err-code@npm:2.0.3"
@ -2989,6 +3064,41 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"es-abstract@npm:^1.18.0-next.1, es-abstract@npm:^1.18.0-next.2, es-abstract@npm:^1.18.2":
version: 1.18.3
resolution: "es-abstract@npm:1.18.3"
dependencies:
call-bind: ^1.0.2
es-to-primitive: ^1.2.1
function-bind: ^1.1.1
get-intrinsic: ^1.1.1
has: ^1.0.3
has-symbols: ^1.0.2
is-callable: ^1.2.3
is-negative-zero: ^2.0.1
is-regex: ^1.1.3
is-string: ^1.0.6
object-inspect: ^1.10.3
object-keys: ^1.1.1
object.assign: ^4.1.2
string.prototype.trimend: ^1.0.4
string.prototype.trimstart: ^1.0.4
unbox-primitive: ^1.0.1
checksum: 6bbf526b5a60cdbd390397644facbf654fc6616564614533a5ce223ecc185f7812a1f45c3ab6d0334b4ff2e8f554237539f4d05a0fceb036be24dd5d1ec022b0
languageName: node
linkType: hard
"es-to-primitive@npm:^1.2.1":
version: 1.2.1
resolution: "es-to-primitive@npm:1.2.1"
dependencies:
is-callable: ^1.1.4
is-date-object: ^1.0.1
is-symbol: ^1.0.2
checksum: 4ead6671a2c1402619bdd77f3503991232ca15e17e46222b0a41a5d81aebc8740a77822f5b3c965008e631153e9ef0580540007744521e72de8e33599fca2eed
languageName: node
linkType: hard
"es6-error@npm:^4.0.1": "es6-error@npm:^4.0.1":
version: 4.1.1 version: 4.1.1
resolution: "es6-error@npm:4.1.1" resolution: "es6-error@npm:4.1.1"
@ -3033,6 +3143,26 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"eslint-import-resolver-node@npm:^0.3.4":
version: 0.3.4
resolution: "eslint-import-resolver-node@npm:0.3.4"
dependencies:
debug: ^2.6.9
resolve: ^1.13.1
checksum: a0db55ec26c5bb385c8681af6b8d6dee16768d5f27dff72c3113407d0f028f28e56dcb1cc3a4689c79396a5f6a9c24bd0cac9a2c9c588c7d7357d24a42bec876
languageName: node
linkType: hard
"eslint-module-utils@npm:^2.6.1":
version: 2.6.1
resolution: "eslint-module-utils@npm:2.6.1"
dependencies:
debug: ^3.2.7
pkg-dir: ^2.0.0
checksum: 3cc43a36a0075d300db6a3946203ec92249b6da1539694ef205a43b4ccfbc2eaf4961475d4b89c24b12c187d6bfd882c7c7d0b2ce02adb40c2dedb7fd022a7e2
languageName: node
linkType: hard
"eslint-plugin-header@npm:^3.1.1": "eslint-plugin-header@npm:^3.1.1":
version: 3.1.1 version: 3.1.1
resolution: "eslint-plugin-header@npm:3.1.1" resolution: "eslint-plugin-header@npm:3.1.1"
@ -3042,6 +3172,31 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"eslint-plugin-import@npm:^2.23.4":
version: 2.23.4
resolution: "eslint-plugin-import@npm:2.23.4"
dependencies:
array-includes: ^3.1.3
array.prototype.flat: ^1.2.4
debug: ^2.6.9
doctrine: ^2.1.0
eslint-import-resolver-node: ^0.3.4
eslint-module-utils: ^2.6.1
find-up: ^2.0.0
has: ^1.0.3
is-core-module: ^2.4.0
minimatch: ^3.0.4
object.values: ^1.1.3
pkg-up: ^2.0.0
read-pkg-up: ^3.0.0
resolve: ^1.20.0
tsconfig-paths: ^3.9.0
peerDependencies:
eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0
checksum: 8c64bb96fa35607de3da1ddf5d127a5913aebde5677bc276c55fecb3e539a7287569dc697af4f5c523bd2b08bff8f5b525448df5aa7d6256c86436b615be5abc
languageName: node
linkType: hard
"eslint-plugin-unicorn@npm:^34.0.1": "eslint-plugin-unicorn@npm:^34.0.1":
version: 34.0.1 version: 34.0.1
resolution: "eslint-plugin-unicorn@npm:34.0.1" resolution: "eslint-plugin-unicorn@npm:34.0.1"
@ -3240,6 +3395,13 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"event-target-shim@npm:^5.0.0":
version: 5.0.1
resolution: "event-target-shim@npm:5.0.1"
checksum: 1ffe3bb22a6d51bdeb6bf6f7cf97d2ff4a74b017ad12284cc9e6a279e727dc30a5de6bb613e5596ff4dc3e517841339ad09a7eec44266eccb1aa201a30448166
languageName: node
linkType: hard
"execa@npm:^4.0.0": "execa@npm:^4.0.0":
version: 4.1.0 version: 4.1.0
resolution: "execa@npm:4.1.0" resolution: "execa@npm:4.1.0"
@ -3385,13 +3547,6 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"file-uri-to-path@npm:1.0.0":
version: 1.0.0
resolution: "file-uri-to-path@npm:1.0.0"
checksum: b648580bdd893a008c92c7ecc96c3ee57a5e7b6c4c18a9a09b44fb5d36d79146f8e442578bc0e173dc027adf3987e254ba1dfd6e3ec998b7c282873010502144
languageName: node
linkType: hard
"fill-range@npm:^7.0.1": "fill-range@npm:^7.0.1":
version: 7.0.1 version: 7.0.1
resolution: "fill-range@npm:7.0.1" resolution: "fill-range@npm:7.0.1"
@ -3439,7 +3594,7 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"find-up@npm:^2.0.0": "find-up@npm:^2.0.0, find-up@npm:^2.1.0":
version: 2.1.0 version: 2.1.0
resolution: "find-up@npm:2.1.0" resolution: "find-up@npm:2.1.0"
dependencies: dependencies:
@ -3533,6 +3688,17 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"form-data@npm:^4.0.0":
version: 4.0.0
resolution: "form-data@npm:4.0.0"
dependencies:
asynckit: ^0.4.0
combined-stream: ^1.0.8
mime-types: ^2.1.12
checksum: 01135bf8675f9d5c61ff18e2e2932f719ca4de964e3be90ef4c36aacfc7b9cb2fceb5eca0b7e0190e3383fe51c5b37f4cb80b62ca06a99aaabfcfd6ac7c9328c
languageName: node
linkType: hard
"form-data@npm:~2.3.2": "form-data@npm:~2.3.2":
version: 2.3.3 version: 2.3.3
resolution: "form-data@npm:2.3.3" resolution: "form-data@npm:2.3.3"
@ -3680,6 +3846,17 @@ fsevents@~2.3.2:
languageName: node languageName: node
linkType: hard linkType: hard
"get-intrinsic@npm:^1.0.2, get-intrinsic@npm:^1.1.1":
version: 1.1.1
resolution: "get-intrinsic@npm:1.1.1"
dependencies:
function-bind: ^1.1.1
has: ^1.0.3
has-symbols: ^1.0.1
checksum: a9fe2ca8fa3f07f9b0d30fb202bcd01f3d9b9b6b732452e79c48e79f7d6d8d003af3f9e38514250e3553fdc83c61650851cb6870832ac89deaaceb08e3721a17
languageName: node
linkType: hard
"get-own-enumerable-property-symbols@npm:^3.0.0": "get-own-enumerable-property-symbols@npm:^3.0.0":
version: 3.0.2 version: 3.0.2
resolution: "get-own-enumerable-property-symbols@npm:3.0.2" resolution: "get-own-enumerable-property-symbols@npm:3.0.2"
@ -3943,6 +4120,13 @@ fsevents@~2.3.2:
languageName: node languageName: node
linkType: hard linkType: hard
"has-bigints@npm:^1.0.1":
version: 1.0.1
resolution: "has-bigints@npm:1.0.1"
checksum: 44ab55868174470065d2e0f8f6def1c990d12b82162a8803c679699fa8a39f966e336f2a33c185092fe8aea7e8bf2e85f1c26add5f29d98f2318bd270096b183
languageName: node
linkType: hard
"has-flag@npm:^3.0.0": "has-flag@npm:^3.0.0":
version: 3.0.0 version: 3.0.0
resolution: "has-flag@npm:3.0.0" resolution: "has-flag@npm:3.0.0"
@ -3957,6 +4141,13 @@ fsevents@~2.3.2:
languageName: node languageName: node
linkType: hard linkType: hard
"has-symbols@npm:^1.0.1, has-symbols@npm:^1.0.2":
version: 1.0.2
resolution: "has-symbols@npm:1.0.2"
checksum: 2309c426071731be792b5be43b3da6fb4ed7cbe8a9a6bcfca1862587709f01b33d575ce8f5c264c1eaad09fca2f9a8208c0a2be156232629daa2dd0c0740976b
languageName: node
linkType: hard
"has-unicode@npm:^2.0.0": "has-unicode@npm:^2.0.0":
version: 2.0.1 version: 2.0.1
resolution: "has-unicode@npm:2.0.1" resolution: "has-unicode@npm:2.0.1"
@ -4318,6 +4509,13 @@ fsevents@~2.3.2:
languageName: node languageName: node
linkType: hard linkType: hard
"is-bigint@npm:^1.0.1":
version: 1.0.2
resolution: "is-bigint@npm:1.0.2"
checksum: 5268edbde844583d8d5ce86f8e47669bf9dd9b3d4de0238b25bb2ddfc620b47e0e226171a906f19ac4c10debba160353fb98c134d0309898495e1b691efcfb80
languageName: node
linkType: hard
"is-binary-path@npm:~2.1.0": "is-binary-path@npm:~2.1.0":
version: 2.1.0 version: 2.1.0
resolution: "is-binary-path@npm:2.1.0" resolution: "is-binary-path@npm:2.1.0"
@ -4327,6 +4525,15 @@ fsevents@~2.3.2:
languageName: node languageName: node
linkType: hard linkType: hard
"is-boolean-object@npm:^1.1.0":
version: 1.1.1
resolution: "is-boolean-object@npm:1.1.1"
dependencies:
call-bind: ^1.0.2
checksum: 95b832242638b8495d012538716761122dfc4a930baf2aa676e0bc344fe39cda2364c739893a6d07d10863ced67cc95e11884732104d7904bd0d896033414d11
languageName: node
linkType: hard
"is-builtin-module@npm:^3.1.0": "is-builtin-module@npm:^3.1.0":
version: 3.1.0 version: 3.1.0
resolution: "is-builtin-module@npm:3.1.0" resolution: "is-builtin-module@npm:3.1.0"
@ -4336,6 +4543,13 @@ fsevents@~2.3.2:
languageName: node languageName: node
linkType: hard linkType: hard
"is-callable@npm:^1.1.4, is-callable@npm:^1.2.3":
version: 1.2.3
resolution: "is-callable@npm:1.2.3"
checksum: 084a732afd78e14a40cd5f6f34001edd500f43bb542991c1305b88842cab5f2fb6b48f0deed4cd72270b2e71cab3c3a56c69b324e3a02d486f937824bb7de553
languageName: node
linkType: hard
"is-cidr@npm:^4.0.2": "is-cidr@npm:^4.0.2":
version: 4.0.2 version: 4.0.2
resolution: "is-cidr@npm:4.0.2" resolution: "is-cidr@npm:4.0.2"
@ -4345,7 +4559,7 @@ fsevents@~2.3.2:
languageName: node languageName: node
linkType: hard linkType: hard
"is-core-module@npm:^2.2.0": "is-core-module@npm:^2.2.0, is-core-module@npm:^2.4.0":
version: 2.4.0 version: 2.4.0
resolution: "is-core-module@npm:2.4.0" resolution: "is-core-module@npm:2.4.0"
dependencies: dependencies:
@ -4354,6 +4568,13 @@ fsevents@~2.3.2:
languageName: node languageName: node
linkType: hard linkType: hard
"is-date-object@npm:^1.0.1":
version: 1.0.4
resolution: "is-date-object@npm:1.0.4"
checksum: 20ce7b73fda926b4dfad2457e0d6fa04bb0a4cf555456d68918e334cbf80ac30523155adac420be0c8a4bc126fafe0874c4cfc0ffe0d97bac6333a8f02de1b94
languageName: node
linkType: hard
"is-extglob@npm:^2.1.1": "is-extglob@npm:^2.1.1":
version: 2.1.1 version: 2.1.1
resolution: "is-extglob@npm:2.1.1" resolution: "is-extglob@npm:2.1.1"
@ -4407,6 +4628,20 @@ fsevents@~2.3.2:
languageName: node languageName: node
linkType: hard linkType: hard
"is-negative-zero@npm:^2.0.1":
version: 2.0.1
resolution: "is-negative-zero@npm:2.0.1"
checksum: a46f2e0cb5e16fdb8f2011ed488979386d7e68d381966682e3f4c98fc126efe47f26827912baca2d06a02a644aee458b9cba307fb389f6b161e759125db7a3b8
languageName: node
linkType: hard
"is-number-object@npm:^1.0.4":
version: 1.0.5
resolution: "is-number-object@npm:1.0.5"
checksum: 8c217b4a16632fc3a900121792e4293f2d2d3c73158895deca4593aa4779995203fc6f31b57b47d90df981936a82ea4e8e8a3af2e5ed646cf979287c1d201089
languageName: node
linkType: hard
"is-number@npm:^7.0.0": "is-number@npm:^7.0.0":
version: 7.0.0 version: 7.0.0
resolution: "is-number@npm:7.0.0" resolution: "is-number@npm:7.0.0"
@ -4463,6 +4698,16 @@ fsevents@~2.3.2:
languageName: node languageName: node
linkType: hard linkType: hard
"is-regex@npm:^1.1.3":
version: 1.1.3
resolution: "is-regex@npm:1.1.3"
dependencies:
call-bind: ^1.0.2
has-symbols: ^1.0.2
checksum: 19a831a1ba88d09bb43ab30194672e6ae1461caff27254d2c160ed63c95015155ad8784e80995e46a637d0880da8f4ed63b5c3242af1b49c0b5c4666a7a2d3d8
languageName: node
linkType: hard
"is-regexp@npm:^1.0.0": "is-regexp@npm:^1.0.0":
version: 1.0.0 version: 1.0.0
resolution: "is-regexp@npm:1.0.0" resolution: "is-regexp@npm:1.0.0"
@ -4477,6 +4722,22 @@ fsevents@~2.3.2:
languageName: node languageName: node
linkType: hard linkType: hard
"is-string@npm:^1.0.5, is-string@npm:^1.0.6":
version: 1.0.6
resolution: "is-string@npm:1.0.6"
checksum: 9990bf0abf2eea6255f0218f82ba1bcfc8d27923af99bcbb2c77ec5eae4ddbe6c23f1f916d6f19f9e9aa57ec7cd8a91a3e026a34e207c51af35fced1ad50bba8
languageName: node
linkType: hard
"is-symbol@npm:^1.0.2, is-symbol@npm:^1.0.3":
version: 1.0.4
resolution: "is-symbol@npm:1.0.4"
dependencies:
has-symbols: ^1.0.2
checksum: 92805812ef590738d9de49d677cd17dfd486794773fb6fa0032d16452af46e9b91bb43ffe82c983570f015b37136f4b53b28b8523bfb10b0ece7a66c31a54510
languageName: node
linkType: hard
"is-text-path@npm:^1.0.1": "is-text-path@npm:^1.0.1":
version: 1.0.1 version: 1.0.1
resolution: "is-text-path@npm:1.0.1" resolution: "is-text-path@npm:1.0.1"
@ -5612,6 +5873,13 @@ fsevents@~2.3.2:
languageName: node languageName: node
linkType: hard linkType: hard
"ms@npm:2.0.0":
version: 2.0.0
resolution: "ms@npm:2.0.0"
checksum: 0e6a22b8b746d2e0b65a430519934fefd41b6db0682e3477c10f60c76e947c4c0ad06f63ffdf1d78d335f83edee8c0aa928aa66a36c7cd95b69b26f468d527f4
languageName: node
linkType: hard
"ms@npm:2.1.2": "ms@npm:2.1.2":
version: 2.1.2 version: 2.1.2
resolution: "ms@npm:2.1.2" resolution: "ms@npm:2.1.2"
@ -5619,7 +5887,7 @@ fsevents@~2.3.2:
languageName: node languageName: node
linkType: hard linkType: hard
"ms@npm:2.1.3, ms@npm:^2.0.0, ms@npm:^2.1.2": "ms@npm:2.1.3, ms@npm:^2.0.0, ms@npm:^2.1.1, ms@npm:^2.1.2":
version: 2.1.3 version: 2.1.3
resolution: "ms@npm:2.1.3" resolution: "ms@npm:2.1.3"
checksum: aa92de608021b242401676e35cfa5aa42dd70cbdc082b916da7fb925c542173e36bce97ea3e804923fe92c0ad991434e4a38327e15a1b5b5f945d66df615ae6d checksum: aa92de608021b242401676e35cfa5aa42dd70cbdc082b916da7fb925c542173e36bce97ea3e804923fe92c0ad991434e4a38327e15a1b5b5f945d66df615ae6d
@ -5800,7 +6068,7 @@ fsevents@~2.3.2:
languageName: node languageName: node
linkType: hard linkType: hard
"normalize-package-data@npm:^2.5.0": "normalize-package-data@npm:^2.3.2, normalize-package-data@npm:^2.5.0":
version: 2.5.0 version: 2.5.0
resolution: "normalize-package-data@npm:2.5.0" resolution: "normalize-package-data@npm:2.5.0"
dependencies: dependencies:
@ -6097,6 +6365,43 @@ fsevents@~2.3.2:
languageName: node languageName: node
linkType: hard linkType: hard
"object-inspect@npm:^1.10.3":
version: 1.10.3
resolution: "object-inspect@npm:1.10.3"
checksum: 9a56db2e0146fe94a7a9c78f677a2a28eec11d0ae13430e0bb2cb908fdd2d3feb7dbba7c638b9b7f88ace01d9a937227a8801709d13afb76613775aeb68632d3
languageName: node
linkType: hard
"object-keys@npm:^1.0.12, object-keys@npm:^1.1.1":
version: 1.1.1
resolution: "object-keys@npm:1.1.1"
checksum: b363c5e7644b1e1b04aa507e88dcb8e3a2f52b6ffd0ea801e4c7a62d5aa559affe21c55a07fd4b1fd55fc03a33c610d73426664b20032405d7b92a1414c34d6a
languageName: node
linkType: hard
"object.assign@npm:^4.1.2":
version: 4.1.2
resolution: "object.assign@npm:4.1.2"
dependencies:
call-bind: ^1.0.0
define-properties: ^1.1.3
has-symbols: ^1.0.1
object-keys: ^1.1.1
checksum: d621d832ed7b16ac74027adb87196804a500d80d9aca536fccb7ba48d33a7e9306a75f94c1d29cbfa324bc091bfc530bc24789568efdaee6a47fcfa298993814
languageName: node
linkType: hard
"object.values@npm:^1.1.3":
version: 1.1.4
resolution: "object.values@npm:1.1.4"
dependencies:
call-bind: ^1.0.2
define-properties: ^1.1.3
es-abstract: ^1.18.2
checksum: 1a2f1e9d0bcfc299b8491170a50e6e7ca23392641d7781a8528e96c72f0013ba7ee731792ff8586c8eaec0328acda16c59622924c82c58bd0eb5c4ee67794856
languageName: node
linkType: hard
"once@npm:^1.3.0, once@npm:^1.3.1, once@npm:^1.4.0": "once@npm:^1.3.0, once@npm:^1.3.1, once@npm:^1.4.0":
version: 1.4.0 version: 1.4.0
resolution: "once@npm:1.4.0" resolution: "once@npm:1.4.0"
@ -6470,6 +6775,15 @@ fsevents@~2.3.2:
languageName: node languageName: node
linkType: hard linkType: hard
"path-type@npm:^3.0.0":
version: 3.0.0
resolution: "path-type@npm:3.0.0"
dependencies:
pify: ^3.0.0
checksum: 735b35e256bad181f38fa021033b1c33cfbe62ead42bb2222b56c210e42938eecb272ae1949f3b6db4ac39597a61b44edd8384623ec4d79bfdc9a9c0f12537a6
languageName: node
linkType: hard
"path-type@npm:^4.0.0": "path-type@npm:^4.0.0":
version: 4.0.0 version: 4.0.0
resolution: "path-type@npm:4.0.0" resolution: "path-type@npm:4.0.0"
@ -6526,6 +6840,15 @@ fsevents@~2.3.2:
languageName: node languageName: node
linkType: hard linkType: hard
"pkg-dir@npm:^2.0.0":
version: 2.0.0
resolution: "pkg-dir@npm:2.0.0"
dependencies:
find-up: ^2.1.0
checksum: 8c72b712305b51e1108f0ffda5ec1525a8307e54a5855db8fb1dcf77561a5ae98e2ba3b4814c9806a679f76b2f7e5dd98bde18d07e594ddd9fdd25e9cf242ea1
languageName: node
linkType: hard
"pkg-dir@npm:^4.1.0": "pkg-dir@npm:^4.1.0":
version: 4.2.0 version: 4.2.0
resolution: "pkg-dir@npm:4.2.0" resolution: "pkg-dir@npm:4.2.0"
@ -6535,6 +6858,15 @@ fsevents@~2.3.2:
languageName: node languageName: node
linkType: hard linkType: hard
"pkg-up@npm:^2.0.0":
version: 2.0.0
resolution: "pkg-up@npm:2.0.0"
dependencies:
find-up: ^2.1.0
checksum: de4b418175281a082e366ce1a919f032520ee53cf421578b35173f03816f6ec4c19e1552066840bb0988c3e1215859653948efd6ca3507a23f4f44229269500d
languageName: node
linkType: hard
"please-upgrade-node@npm:^3.2.0": "please-upgrade-node@npm:^3.2.0":
version: 3.2.0 version: 3.2.0
resolution: "please-upgrade-node@npm:3.2.0" resolution: "please-upgrade-node@npm:3.2.0"
@ -6757,6 +7089,16 @@ fsevents@~2.3.2:
languageName: node languageName: node
linkType: hard linkType: hard
"read-pkg-up@npm:^3.0.0":
version: 3.0.0
resolution: "read-pkg-up@npm:3.0.0"
dependencies:
find-up: ^2.0.0
read-pkg: ^3.0.0
checksum: 16175573f2914ab9788897bcbe2a62b5728d0075e62285b3680cebe97059e2911e0134a062cf6e51ebe3e3775312bc788ac2039ed6af38ec68d2c10c6f2b30fb
languageName: node
linkType: hard
"read-pkg-up@npm:^7.0.0, read-pkg-up@npm:^7.0.1": "read-pkg-up@npm:^7.0.0, read-pkg-up@npm:^7.0.1":
version: 7.0.1 version: 7.0.1
resolution: "read-pkg-up@npm:7.0.1" resolution: "read-pkg-up@npm:7.0.1"
@ -6768,6 +7110,17 @@ fsevents@~2.3.2:
languageName: node languageName: node
linkType: hard linkType: hard
"read-pkg@npm:^3.0.0":
version: 3.0.0
resolution: "read-pkg@npm:3.0.0"
dependencies:
load-json-file: ^4.0.0
normalize-package-data: ^2.3.2
path-type: ^3.0.0
checksum: 398903ebae6c7e9965419a1062924436cc0b6f516c42c4679a90290d2f87448ed8f977e7aa2dbba4aa1ac09248628c43e493ac25b2bc76640e946035200e34c6
languageName: node
linkType: hard
"read-pkg@npm:^5.0.0, read-pkg@npm:^5.2.0": "read-pkg@npm:^5.0.0, read-pkg@npm:^5.2.0":
version: 5.2.0 version: 5.2.0
resolution: "read-pkg@npm:5.2.0" resolution: "read-pkg@npm:5.2.0"
@ -6978,7 +7331,7 @@ fsevents@~2.3.2:
languageName: node languageName: node
linkType: hard linkType: hard
"resolve@^1.10.0, resolve@^1.20.0": "resolve@^1.10.0, resolve@^1.13.1, resolve@^1.20.0":
version: 1.20.0 version: 1.20.0
resolution: "resolve@npm:1.20.0" resolution: "resolve@npm:1.20.0"
dependencies: dependencies:
@ -6988,7 +7341,7 @@ fsevents@~2.3.2:
languageName: node languageName: node
linkType: hard linkType: hard
"resolve@patch:resolve@^1.10.0#~builtin<compat/resolve>, resolve@patch:resolve@^1.20.0#~builtin<compat/resolve>": "resolve@patch:resolve@^1.10.0#~builtin<compat/resolve>, resolve@patch:resolve@^1.13.1#~builtin<compat/resolve>, resolve@patch:resolve@^1.20.0#~builtin<compat/resolve>":
version: 1.20.0 version: 1.20.0
resolution: "resolve@patch:resolve@npm%3A1.20.0#~builtin<compat/resolve>::version=1.20.0&hash=00b1ff" resolution: "resolve@patch:resolve@npm%3A1.20.0#~builtin<compat/resolve>::version=1.20.0&hash=00b1ff"
dependencies: dependencies:
@ -7524,6 +7877,26 @@ fsevents@~2.3.2:
languageName: node languageName: node
linkType: hard linkType: hard
"string.prototype.trimend@npm:^1.0.4":
version: 1.0.4
resolution: "string.prototype.trimend@npm:1.0.4"
dependencies:
call-bind: ^1.0.2
define-properties: ^1.1.3
checksum: 17e5aa45c3983f582693161f972c1c1fa4bbbdf22e70e582b00c91b6575f01680dc34e83005b98e31abe4d5d29e0b21fcc24690239c106c7b2315aade6a898ac
languageName: node
linkType: hard
"string.prototype.trimstart@npm:^1.0.4":
version: 1.0.4
resolution: "string.prototype.trimstart@npm:1.0.4"
dependencies:
call-bind: ^1.0.2
define-properties: ^1.1.3
checksum: 3fb06818d3cccac5fa3f5f9873d984794ca0e9f6616fae6fcc745885d9efed4e17fe15f832515d9af5e16c279857fdbffdfc489ca4ed577811b017721b30302f
languageName: node
linkType: hard
"string_decoder@npm:^1.1.1": "string_decoder@npm:^1.1.1":
version: 1.3.0 version: 1.3.0
resolution: "string_decoder@npm:1.3.0" resolution: "string_decoder@npm:1.3.0"
@ -8063,6 +8436,18 @@ typescript@^4.3.5:
languageName: node languageName: node
linkType: hard linkType: hard
"unbox-primitive@npm:^1.0.1":
version: 1.0.1
resolution: "unbox-primitive@npm:1.0.1"
dependencies:
function-bind: ^1.1.1
has-bigints: ^1.0.1
has-symbols: ^1.0.2
which-boxed-primitive: ^1.0.2
checksum: 89d950e18fb45672bc6b3c961f1e72c07beb9640c7ceed847b571ba6f7d2af570ae1a2584cfee268b9d9ea1e3293f7e33e0bc29eaeb9f8e8a0bab057ff9e6bba
languageName: node
linkType: hard
"unique-filename@npm:^1.1.1": "unique-filename@npm:^1.1.1":
version: 1.1.1 version: 1.1.1
resolution: "unique-filename@npm:1.1.1" resolution: "unique-filename@npm:1.1.1"
@ -8206,6 +8591,19 @@ typescript@^4.3.5:
languageName: node languageName: node
linkType: hard linkType: hard
"which-boxed-primitive@npm:^1.0.2":
version: 1.0.2
resolution: "which-boxed-primitive@npm:1.0.2"
dependencies:
is-bigint: ^1.0.1
is-boolean-object: ^1.1.0
is-number-object: ^1.0.4
is-string: ^1.0.5
is-symbol: ^1.0.3
checksum: 53ce774c7379071729533922adcca47220228405e1895f26673bbd71bdf7fb09bee38c1d6399395927c6289476b5ae0629863427fd151491b71c4b6cb04f3a5e
languageName: node
linkType: hard
"which-module@npm:^2.0.0": "which-module@npm:^2.0.0":
version: 2.0.0 version: 2.0.0
resolution: "which-module@npm:2.0.0" resolution: "which-module@npm:2.0.0"