diff --git a/README.md b/README.md index 79d139a..47de0fb 100644 --- a/README.md +++ b/README.md @@ -2,28 +2,38 @@ ![revolt-api](https://img.shields.io/npm/v/revolt-api) -This package contains typings for objects in the [Revolt API](https://developers.revolt.chat/api/) and code for generating the OpenAPI specification. - -For most cases, if not all, you should only be concerned with `revolt-api/types`. +This package contains typings for objects in the [Revolt API](https://developers.revolt.chat/api/) and a fully typed API request builder. ### Example Usage +If you just need access to types: + ```typescript -import type { User } from 'revolt-api/types/Users'; +import type { User } from 'revolt-api'; ``` -### Tip (for development) +If you want to send requests: -For faster compile times when working on API routes, comment out the categories you don't care about. +```typescript +import { API } from 'revolt-api'; -```ts -/// src/routes/index.ts -export async function load() { - // await import('./core.js'); - // await import('./users.js'); - // await import('./channels.js'); - await import('./servers.js'); -} +// Initialise a new API client: +const client = new API(); -await load(); +// or with authentication: +const client = new API({ authentication: { revolt: 'bot-token' } }); + +// Make requests with ease: +client.get('/users/@me') + // Fully typed responses! + .then(user => user.username); + +// No need to worry about the details: +let channel_id = "some channel id"; +client.post(`/channels/${channel_id}/messages`, { + // Parameters given are fully typed as well! + content: "some content" +}); ``` + +For more details on how this works, see the [README of @insertish/oapi](https://github.com/insertish/oapi#example). diff --git a/package.json b/package.json index 331ce20..ef748b5 100644 --- a/package.json +++ b/package.json @@ -1,26 +1,25 @@ { "name": "revolt-api", - "version": "0.5.3-rc.1", - "description": "Revolt API typings", + "version": "0.5.3-rc.1-patch.0", + "description": "Revolt API Library", "main": "dist/index.js", - "type": "module", "homepage": "https://developers.revolt.chat", "repository": "https://gitlab.insrt.uk/revolt/api.git", "author": "Paul Makles ", "license": "MIT", "scripts": { - "build": "tsc", - "watch": "tsc-watch --onSuccess \"node --experimental-specifier-resolution=node dist\"", - "routes": "node scripts/generate_routes.js", - "exports": "node scripts/generate_exports.js", - "convert": "openapi-typescript OpenAPI.json --output src/schema.ts && node scripts/generate_routes.js && node scripts/generate_exports.js" + "build": "oapilib && tsc", + "prepublish": "in-publish && yarn build || echo Skipping build." }, "devDependencies": { - "tsc-watch": "^4.4.0", - "typescript": "^4.3.5" + "@types/lodash.defaultsdeep": "^4.6.6", + "in-publish": "^2.0.1", + "openapi-typescript": "^5.2.0", + "typescript": "^4.6.2" }, "dependencies": { + "@insertish/oapi": "^0.1.6", "axios": "^0.26.1", - "openapi-typescript": "^5.2.0" + "lodash.defaultsdeep": "^4.6.1" } } diff --git a/scripts/generate_exports.js b/scripts/generate_exports.js deleted file mode 100644 index ee6d131..0000000 --- a/scripts/generate_exports.js +++ /dev/null @@ -1,17 +0,0 @@ -import { readFile, writeFile } from 'fs/promises'; - -const NOTICE = `// This file was auto-generated!\n`; - -readFile('OpenAPI.json') - .then(data => { - const entries = ["import { components } from './schema';"]; - - const spec = JSON.parse(data); - const schemas = spec.components.schemas; - - for (const schema of Object.keys(schemas)) { - entries.push(`export type ${schema} = components['schemas']['${schema}'];`); - } - - writeFile('src/types.ts', NOTICE + entries.join('\n') + ";"); - }); diff --git a/scripts/generate_routes.js b/scripts/generate_routes.js deleted file mode 100644 index b2a1177..0000000 --- a/scripts/generate_routes.js +++ /dev/null @@ -1,81 +0,0 @@ -import { readFile, writeFile } from 'fs/promises'; - -const NOTICE = `// This file was auto-generated!\n`; - -readFile('OpenAPI.json') - .then(data => { - const entries = ["import { paths } from './schema';", "export type APIRoutes ="]; - - const spec = JSON.parse(data); - const paths = Object.keys(spec.paths); - const queryData = {}; - - for (const path of paths) { - const data = spec.paths[path]; - const methods = Object.keys(data); - - const template = path.replace(/\{\w+\}/g, '${string}'); - - for (const method of methods) { - const OPERATION = `paths['${path}']['${method}']`; - - const route = data[method]; - const response = Object.keys(route['responses']).find(x => x !== 'default') ?? 'default'; - const contentType = Object.keys(route['responses'][response]['content'] ?? {})[0]; - const RESPONSE = response === '204' || !contentType ? 'undefined' : `${OPERATION}['responses']['${response}']['content']['${contentType}']`; - - let queryParams = []; - let hasBody = false; - - if (route['parameters']) { - for (const parameter of route['parameters']) { - if (parameter.in === 'query') { - queryParams.push(parameter.name); - } - } - } - - if (route['requestBody']?.['content']?.['application/json']) { - hasBody = true; - } - - let params = 'undefined'; - if (hasBody || queryParams.length > 0) { - let entries = []; - - if (queryParams.length > 0) { - entries.push(`${OPERATION}['parameters']['query']`); - } - - if (hasBody) { - entries.push(`${OPERATION}['requestBody']['content']['application/json']`); - } - - params = entries.join('|'); - } - - const object = `{ method: '${method}', path: \`${template}\`, params: ${params}, response: ${RESPONSE} }`; - entries.push(`| ${object}`); - - queryData[path] = { - ...queryData[path], - [method]: queryParams, - }; - } - } - - const pathResolve = {}; - for (const path of paths) { - const segments = path.split('/'); - segments.shift(); - pathResolve[segments.length] = [ - ...(pathResolve[segments.length] ?? []), - segments.map(key => /\{.*\}/.test(key) ? [key] : key) - ]; - } - - writeFile('src/routes.ts', NOTICE + entries.join('\n') + ";"); - writeFile('src/params.ts', NOTICE - + "export const pathResolve = " + JSON.stringify(pathResolve) + ";\n" - + "export const queryParams = " + JSON.stringify(queryData) + ";"); - }); diff --git a/src/baseURL.ts b/src/baseURL.ts new file mode 100644 index 0000000..b8e0feb --- /dev/null +++ b/src/baseURL.ts @@ -0,0 +1,2 @@ +// This file was auto-generated by @insertish/oapi! +export const defaultBaseURL = "https://api.revolt.chat"; \ No newline at end of file diff --git a/src/index.ts b/src/index.ts index ecc18a7..dcba9ac 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,9 +1,13 @@ +// This file was auto-generated by @insertish/oapi! +import Axios from 'axios'; +import type { AxiosRequestConfig } from 'axios'; + +import defaultsDeep from 'lodash.defaultsdeep'; + export * from './types'; - -import type { Session } from './types'; import type { APIRoutes } from './routes'; -import Axios, { AxiosRequestConfig } from 'axios'; +import { defaultBaseURL } from './baseURL'; import { pathResolve, queryParams } from './params'; /** @@ -42,7 +46,7 @@ type PostRoutes = PickRoutes<'post'>; /** * Client configuration options */ -export interface Options { + export interface Options { /** * Base URL of the Revolt node */ @@ -50,19 +54,56 @@ export interface Options { /** * Authentication used for requests */ - authentication: Session | string | undefined; + authentication: { + rauth?: string | undefined; + revolt?: { token: string } | string | undefined; + }; } /** - * Revolt API Client + * API Client */ -export class RevoltAPI { - private baseURL: string; - private authentication: Session | string | undefined; +export class API { + private baseURL: Options['baseURL']; + private authentication: Options['authentication']; constructor({ baseURL, authentication }: Partial = { }) { - this.baseURL = baseURL ?? 'https://api.revolt.chat'; - this.authentication = authentication; + this.baseURL = baseURL ?? defaultBaseURL; + this.authentication = authentication ?? { }; + } + + /** + * Generate authentication options. + */ + get auth(): AxiosRequestConfig { + if (this.authentication.rauth) { + if (typeof this.authentication.rauth === 'string') { + return { + headers: { + 'X-Session-Token': this.authentication.rauth + } + } + } + } else if (this.authentication.revolt) { + switch (typeof this.authentication.revolt) { + case 'string': { + return { + headers: { + 'X-Bot-Token': this.authentication.revolt + } + } + } + case 'object': { + return { + headers: { + 'X-Session-Token': this.authentication.revolt.token + } + } + } + } + } + + return { }; } /** @@ -71,11 +112,7 @@ export class RevoltAPI { get config(): AxiosRequestConfig { return { baseURL: this.baseURL, - headers: typeof this.authentication === 'string' - ? { 'X-Bot-Token': this.authentication } - : typeof this.authentication === 'object' - ? { 'X-Session-Token': this.authentication.token } - : undefined + ...this.auth, }; } @@ -112,13 +149,14 @@ export class RevoltAPI { } } - return Axios(path, { - ...this.config, - ...config, + return Axios(path, defaultsDeep({ method, params: query, data: body - }) + }, defaultsDeep( + config, + this.config + ))) .then(res => res.data); } diff --git a/src/params.ts b/src/params.ts index bdd405a..766b248 100644 --- a/src/params.ts +++ b/src/params.ts @@ -1,3 +1,3 @@ -// This file was auto-generated! +// This file was auto-generated by @insertish/oapi! export const pathResolve = {"1":[[""]],"2":[["users","@me"],["users",["{target}"]],["users","dms"],["bots","create"],["bots",["{target}"]],["bots","@me"],["channels",["{target}"]],["channels","create"],["servers","create"],["servers",["{target}"]],["invites",["{target}"]],["onboard","hello"],["onboard","complete"],["push","subscribe"],["push","unsubscribe"],["sync","unreads"]],"3":[["users","@me","username"],["users",["{target}"],"default_avatar"],["users",["{target}"],"profile"],["users",["{target}"],"dm"],["users",["{target}"],"mutual"],["users",["{username}"],"friend"],["users",["{target}"],"friend"],["users",["{target}"],"block"],["bots",["{target}"],"invite"],["channels",["{target}"],"members"],["channels",["{target}"],"invites"],["channels",["{target}"],"messages"],["channels",["{target}"],"search"],["channels",["{_target}"],"join_call"],["servers",["{target}"],"ack"],["servers",["{target}"],"channels"],["servers",["{target}"],"members"],["servers",["{target}"],"bans"],["servers",["{target}"],"invites"],["servers",["{target}"],"roles"],["auth","account","create"],["auth","account","reverify"],["auth","account",""],["auth","account","reset_password"],["auth","session","login"],["auth","session","logout"],["auth","session","all"],["auth","session",["{id}"]],["sync","settings","fetch"],["sync","settings","set"]],"4":[["channels",["{target}"],"ack",["{message}"]],["channels",["{_target}"],"messages","stale"],["channels",["{target}"],"messages",["{msg}"]],["channels",["{target}"],"recipients",["{member}"]],["channels",["{target}"],"permissions",["{role_id}"]],["channels",["{target}"],"permissions","default"],["servers",["{target}"],"members",["{member}"]],["servers",["{server}"],"members",["{target}"]],["servers",["{server}"],"bans",["{target}"]],["servers",["{target}"],"roles",["{role_id}"]],["servers",["{target}"],"permissions",["{role_id}"]],["servers",["{target}"],"permissions","default"],["auth","account","change","password"],["auth","account","change","email"],["auth","account","verify",["{code}"]]]}; export const queryParams = {"/":{"get":[]},"/users/@me":{"get":[],"patch":[]},"/users/{target}":{"get":[]},"/users/@me/username":{"patch":[]},"/users/{target}/default_avatar":{"get":[]},"/users/{target}/profile":{"get":[]},"/users/dms":{"get":[]},"/users/{target}/dm":{"get":[]},"/users/{target}/mutual":{"get":[]},"/users/{username}/friend":{"put":[]},"/users/{target}/friend":{"delete":[]},"/users/{target}/block":{"put":[],"delete":[]},"/bots/create":{"post":[]},"/bots/{target}/invite":{"get":[],"post":[]},"/bots/{target}":{"get":[],"delete":[],"patch":[]},"/bots/@me":{"get":[]},"/channels/{target}/ack/{message}":{"put":[]},"/channels/{target}":{"get":[],"delete":[],"patch":[]},"/channels/{target}/members":{"get":[]},"/channels/{target}/invites":{"post":[]},"/channels/{target}/messages":{"get":["limit","before","after","sort","nearby","include_users"],"post":[]},"/channels/{target}/search":{"post":[]},"/channels/{_target}/messages/stale":{"post":[]},"/channels/{target}/messages/{msg}":{"get":[],"delete":[],"patch":[]},"/channels/create":{"post":[]},"/channels/{target}/recipients/{member}":{"put":[],"delete":[]},"/channels/{_target}/join_call":{"post":[]},"/channels/{target}/permissions/{role_id}":{"put":[]},"/channels/{target}/permissions/default":{"put":[]},"/servers/create":{"post":[]},"/servers/{target}":{"get":[],"delete":[],"patch":[]},"/servers/{target}/ack":{"put":[]},"/servers/{target}/channels":{"post":[]},"/servers/{target}/members":{"get":[]},"/servers/{target}/members/{member}":{"get":[],"delete":[]},"/servers/{server}/members/{target}":{"patch":[]},"/servers/{server}/bans/{target}":{"put":[],"delete":[]},"/servers/{target}/bans":{"get":[]},"/servers/{target}/invites":{"get":[]},"/servers/{target}/roles":{"post":[]},"/servers/{target}/roles/{role_id}":{"delete":[],"patch":[]},"/servers/{target}/permissions/{role_id}":{"put":[]},"/servers/{target}/permissions/default":{"put":[]},"/invites/{target}":{"get":[],"post":[],"delete":[]},"/auth/account/create":{"post":[]},"/auth/account/reverify":{"post":[]},"/auth/account/":{"get":[]},"/auth/account/change/password":{"patch":[]},"/auth/account/change/email":{"patch":[]},"/auth/account/verify/{code}":{"post":[]},"/auth/account/reset_password":{"post":[],"patch":[]},"/auth/session/login":{"post":[]},"/auth/session/logout":{"post":[]},"/auth/session/all":{"get":[],"delete":["revoke_self"]},"/auth/session/{id}":{"delete":[],"patch":[]},"/onboard/hello":{"get":[]},"/onboard/complete":{"post":[]},"/push/subscribe":{"post":[]},"/push/unsubscribe":{"post":[]},"/sync/settings/fetch":{"post":[]},"/sync/settings/set":{"post":["timestamp"]},"/sync/unreads":{"get":[]}}; \ No newline at end of file diff --git a/src/routes.ts b/src/routes.ts index 8280ee7..94923c2 100644 --- a/src/routes.ts +++ b/src/routes.ts @@ -1,4 +1,4 @@ -// This file was auto-generated! +// This file was auto-generated by @insertish/oapi! import { paths } from './schema'; export type APIRoutes = | { method: 'get', path: `/`, params: undefined, response: paths['/']['get']['responses']['200']['content']['application/json'] } diff --git a/src/types.ts b/src/types.ts index 06aa814..e5e7a4c 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,3 +1,4 @@ +// This file was auto-generated by @insertish/oapi! import { components } from './schema'; export type RevoltConfig = components['schemas']['RevoltConfig']; export type RevoltFeatures = components['schemas']['RevoltFeatures']; diff --git a/tsconfig.json b/tsconfig.json index d3c89ac..1a878fe 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,8 +4,8 @@ /* Basic Options */ // "incremental": true, /* Enable incremental compilation */ - "target": "es2020", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', 'ES2021', or 'ESNEXT'. */ - "module": "ESNext", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ + "target": "es2016", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', 'ES2021', or 'ESNEXT'. */ + "module": "CommonJS", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ // "lib": [], /* Specify library files to be included in the compilation. */ // "allowJs": true, /* Allow javascript files to be compiled. */ // "checkJs": true, /* Report errors in .js files. */ @@ -44,7 +44,7 @@ // "noPropertyAccessFromIndexSignature": true, /* Require undeclared properties from index signatures to use element accesses. */ /* Module Resolution Options */ - "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ + // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ diff --git a/yarn.lock b/yarn.lock index 53318f1..2a9ede1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,10 +2,27 @@ # yarn lockfile v1 -ansi-regex@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" - integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== +"@insertish/oapi@^0.1.6": + version "0.1.6" + resolved "https://registry.yarnpkg.com/@insertish/oapi/-/oapi-0.1.6.tgz#21a72f6bc7eb732c6636466545221cd79d7ec853" + integrity sha512-5swxp/nPbzQon6j23hDVER2Dw70SPhh0JlomR7smGpwmh5MslUEAwkVDNfYM8lcr/yPlkPLEyV0nihllJvnGiQ== + dependencies: + typescript "^4.6.2" + optionalDependencies: + axios "^0.26.1" + openapi-typescript "^5.2.0" + +"@types/lodash.defaultsdeep@^4.6.6": + version "4.6.6" + resolved "https://registry.yarnpkg.com/@types/lodash.defaultsdeep/-/lodash.defaultsdeep-4.6.6.tgz#d2e87c07ec8d0361e4b79aa000815732b210be04" + integrity sha512-k3bXTg1/54Obm6uFEtSwvDm2vCyK9jSROv0V9X3gFFNPu7eKmvqqadPSXx0SkVVixSilR30BxhFlnIj8OavXOA== + dependencies: + "@types/lodash" "*" + +"@types/lodash@*": + version "4.14.180" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.180.tgz#4ab7c9ddfc92ec4a887886483bc14c79fb380670" + integrity sha512-XOKXa1KIxtNXgASAnwj7cnttJxS4fksBRywK/9LzRV5YxrF80BXZIGeQSuoESQ/VkUj30Ae0+YcuHc15wJCB2g== argparse@^2.0.1: version "2.0.1" @@ -19,43 +36,11 @@ axios@^0.26.1: dependencies: follow-redirects "^1.14.8" -cross-spawn@^7.0.3: - version "7.0.3" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" - integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== - dependencies: - path-key "^3.1.0" - shebang-command "^2.0.0" - which "^2.0.1" - -duplexer@~0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.2.tgz#3abe43aef3835f8ae077d136ddce0f276b0400e6" - integrity sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg== - -event-stream@=3.3.4: - version "3.3.4" - resolved "https://registry.yarnpkg.com/event-stream/-/event-stream-3.3.4.tgz#4ab4c9a0f5a54db9338b4c34d86bfce8f4b35571" - integrity sha1-SrTJoPWlTbkzi0w02Gv86PSzVXE= - dependencies: - duplexer "~0.1.1" - from "~0" - map-stream "~0.1.0" - pause-stream "0.0.11" - split "0.3" - stream-combiner "~0.0.4" - through "~2.3.1" - follow-redirects@^1.14.8: version "1.14.9" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.9.tgz#dd4ea157de7bfaf9ea9b3fbd85aa16951f78d8d7" integrity sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w== -from@~0: - version "0.1.7" - resolved "https://registry.yarnpkg.com/from/-/from-0.1.7.tgz#83c60afc58b9c56997007ed1a768b3ab303a44fe" - integrity sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4= - globalyzer@0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/globalyzer/-/globalyzer-0.1.0.tgz#cb76da79555669a1519d5a8edf093afaa0bf1465" @@ -66,10 +51,10 @@ globrex@^0.1.2: resolved "https://registry.yarnpkg.com/globrex/-/globrex-0.1.2.tgz#dd5d9ec826232730cd6793a5e33a9302985e6098" integrity sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg== -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= +in-publish@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/in-publish/-/in-publish-2.0.1.tgz#948b1a535c8030561cea522f73f78f4be357e00c" + integrity sha512-oDM0kUSNFC31ShNxHKUyfZKy8ZeXZBWMjMdZHKLOk13uvT27VTL/QzRGfRUcevJhpkZAvlhPYuXkF7eNWrtyxQ== js-yaml@^4.1.0: version "4.1.0" @@ -78,21 +63,16 @@ js-yaml@^4.1.0: dependencies: argparse "^2.0.1" -map-stream@~0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/map-stream/-/map-stream-0.1.0.tgz#e56aa94c4c8055a16404a0674b78f215f7c8e194" - integrity sha1-5WqpTEyAVaFkBKBnS3jyFffI4ZQ= +lodash.defaultsdeep@^4.6.1: + version "4.6.1" + resolved "https://registry.yarnpkg.com/lodash.defaultsdeep/-/lodash.defaultsdeep-4.6.1.tgz#512e9bd721d272d94e3d3a63653fa17516741ca6" + integrity sha512-3j8wdDzYuWO3lM3Reg03MuQR957t287Rpcxp1njpEa8oDrikb+FwGdW3n+FELh/A6qib6yPit0j/pv9G/yeAqA== mime@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/mime/-/mime-3.0.0.tgz#b374550dca3a0c18443b0c950a6a58f1931cf7a7" integrity sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A== -node-cleanup@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/node-cleanup/-/node-cleanup-2.1.2.tgz#7ac19abd297e09a7f72a71545d951b517e4dde2c" - integrity sha1-esGavSl+Caf3KnFUXZUbUX5N3iw= - openapi-typescript@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/openapi-typescript/-/openapi-typescript-5.2.0.tgz#c0712d7a17e4502ac083162c42f946c0e966a505" @@ -105,73 +85,11 @@ openapi-typescript@^5.2.0: undici "^4.14.1" yargs-parser "^21.0.0" -path-key@^3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" - integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== - -pause-stream@0.0.11: - version "0.0.11" - resolved "https://registry.yarnpkg.com/pause-stream/-/pause-stream-0.0.11.tgz#fe5a34b0cbce12b5aa6a2b403ee2e73b602f1445" - integrity sha1-/lo0sMvOErWqaitAPuLnO2AvFEU= - dependencies: - through "~2.3" - prettier@^2.5.1: version "2.6.0" resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.6.0.tgz#12f8f504c4d8ddb76475f441337542fa799207d4" integrity sha512-m2FgJibYrBGGgQXNzfd0PuDGShJgRavjUoRCw1mZERIWVSXF0iLzLm+aOqTAbLnC3n6JzUhAA8uZnFVghHJ86A== -ps-tree@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/ps-tree/-/ps-tree-1.2.0.tgz#5e7425b89508736cdd4f2224d028f7bb3f722ebd" - integrity sha512-0VnamPPYHl4uaU/nSFeZZpR21QAWRz+sRv4iW9+v/GS/J5U5iZB5BNN6J0RMoOvdx2gWM2+ZFMIm58q24e4UYA== - dependencies: - event-stream "=3.3.4" - -shebang-command@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" - integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== - dependencies: - shebang-regex "^3.0.0" - -shebang-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" - integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== - -split@0.3: - version "0.3.3" - resolved "https://registry.yarnpkg.com/split/-/split-0.3.3.tgz#cd0eea5e63a211dfff7eb0f091c4133e2d0dd28f" - integrity sha1-zQ7qXmOiEd//frDwkcQTPi0N0o8= - dependencies: - through "2" - -stream-combiner@~0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/stream-combiner/-/stream-combiner-0.0.4.tgz#4d5e433c185261dde623ca3f44c586bcf5c4ad14" - integrity sha1-TV5DPBhSYd3mI8o/RMWGvPXErRQ= - dependencies: - duplexer "~0.1.1" - -string-argv@^0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.1.2.tgz#c5b7bc03fb2b11983ba3a72333dd0559e77e4738" - integrity sha512-mBqPGEOMNJKXRo7z0keX0wlAhbBAjilUdPW13nN0PecVryZxdHIeM7TqbsSUA7VYuS00HGC6mojP7DlQzfa9ZA== - -strip-ansi@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532" - integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w== - dependencies: - ansi-regex "^5.0.0" - -through@2, through@~2.3, through@~2.3.1: - version "2.3.8" - resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" - integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= - tiny-glob@^0.2.9: version "0.2.9" resolved "https://registry.yarnpkg.com/tiny-glob/-/tiny-glob-0.2.9.tgz#2212d441ac17928033b110f8b3640683129d31e2" @@ -180,34 +98,16 @@ tiny-glob@^0.2.9: globalyzer "0.1.0" globrex "^0.1.2" -tsc-watch@^4.4.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/tsc-watch/-/tsc-watch-4.4.0.tgz#3ebbf1db54bcef6bfe534b330fa87284a4139320" - integrity sha512-+0Yey6ptOOXAnt44OKTk2/EnQnmA0auL7VWXm9d9abMS4tabt0Xdr9B4AK6OJbWAre9ZdLA81+Nk8sz9unptyA== - dependencies: - cross-spawn "^7.0.3" - node-cleanup "^2.1.2" - ps-tree "^1.2.0" - string-argv "^0.1.1" - strip-ansi "^6.0.0" - -typescript@^4.3.5: - version "4.3.5" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.5.tgz#4d1c37cc16e893973c45a06886b7113234f119f4" - integrity sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA== +typescript@^4.6.2: + version "4.6.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.6.2.tgz#fe12d2727b708f4eef40f51598b3398baa9611d4" + integrity sha512-HM/hFigTBHZhLXshn9sN37H085+hQGeJHJ/X7LpBWLID/fbc2acUMfU+lGD98X81sKP+pFa9f0DZmCwB9GnbAg== undici@^4.14.1: version "4.16.0" resolved "https://registry.yarnpkg.com/undici/-/undici-4.16.0.tgz#469bb87b3b918818d3d7843d91a1d08da357d5ff" integrity sha512-tkZSECUYi+/T1i4u+4+lwZmQgLXd4BLGlrc7KZPcLIW7Jpq99+Xpc30ONv7nS6F5UNOxp/HBZSSL9MafUrvJbw== -which@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" - integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== - dependencies: - isexe "^2.0.0" - yargs-parser@^21.0.0: version "21.0.1" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.0.1.tgz#0267f286c877a4f0f728fceb6f8a3e4cb95c6e35"