diff --git a/package.json b/package.json index 5c0178b2..a5ce35c4 100644 --- a/package.json +++ b/package.json @@ -85,19 +85,19 @@ ] }, "dependencies": { - "aspida": "^1.2.1", - "openapi-types": "^7.0.1", + "aspida": "^1.3.0", + "openapi-types": "^7.2.3", "swagger-parser": "^10.0.2", "swagger2openapi": "^7.0.4" }, "devDependencies": { - "@types/jest": "^26.0.19", + "@types/jest": "^26.0.20", "@types/js-yaml": "^3.12.5", "@types/minimist": "^1.2.1", - "@typescript-eslint/eslint-plugin": "^4.12.0", - "@typescript-eslint/parser": "^4.12.0", - "eslint": "^7.17.0", - "eslint-config-prettier": "^7.1.0", + "@typescript-eslint/eslint-plugin": "^4.14.0", + "@typescript-eslint/parser": "^4.14.0", + "eslint": "^7.18.0", + "eslint-config-prettier": "^7.2.0", "eslint-config-standard": "^16.0.2", "eslint-plugin-import": "^2.22.1", "eslint-plugin-jest": "^24.1.3", diff --git a/src/buildV3.ts b/src/buildV3.ts index 3fbec568..bb61d325 100644 --- a/src/buildV3.ts +++ b/src/buildV3.ts @@ -18,267 +18,265 @@ export default (openapi: OpenAPIV3.Document) => { const schemas = schemas2Props(openapi.components?.schemas, openapi) || [] const parameters = parameters2Props(openapi.components?.parameters, openapi) || [] - if (openapi.paths) { - files.push( - ...Object.keys(openapi.paths) - .map(path => { - const methodProps = Object.keys( - openapi.paths[path] - ).filter((method): method is typeof methodNames[number] => - methodNames.includes(method as typeof methodNames[number]) - ) + files.push( + ...Object.keys(openapi.paths) + .map(path => { + const methodProps = Object.keys( + openapi.paths[path]! + ).filter((method): method is typeof methodNames[number] => + methodNames.includes(method as typeof methodNames[number]) + ) - const file = [ - ...path - .replace(/\/$/, '') - .split('/') - .slice(1) - .map(p => - getDirName(p, [ - ...getParamsList(openapi, openapi.paths[path].parameters), - ...methodProps.reduce( - (prev, c) => [ - ...prev, - ...getParamsList(openapi, openapi.paths[path][c]?.parameters) - ], - [] as OpenAPIV3.ParameterObject[] - ) - ]) - ), - 'index' - ] + const file = [ + ...path + .replace(/\/$/, '') + .split('/') + .slice(1) + .map(p => + getDirName(p, [ + ...getParamsList(openapi, openapi.paths[path]!.parameters), + ...methodProps.reduce( + (prev, c) => [ + ...prev, + ...getParamsList(openapi, openapi.paths[path]![c]?.parameters) + ], + [] as OpenAPIV3.ParameterObject[] + ) + ]) + ), + 'index' + ] - const methods = methodProps - .map(method => { - const target = openapi.paths[path][method]! + const methods = methodProps + .map(method => { + const target = openapi.paths[path]![method]! - if (target.deprecated) return null + if (target.deprecated) return null - const params: Prop[] = [] + const params: Prop[] = [] - if (target.parameters || openapi.paths[path].parameters) { - const reqRefHeaders: PropValue[] = [] - const reqHeaders: Prop[] = [] - const refQuery: PropValue[] = [] - const query: Prop[] = [] - let queryRequired = true + if (target.parameters || openapi.paths[path]!.parameters) { + const reqRefHeaders: PropValue[] = [] + const reqHeaders: Prop[] = [] + const refQuery: PropValue[] = [] + const query: Prop[] = [] + let queryRequired = true - ;[...(openapi.paths[path].parameters || []), ...(target.parameters || [])].forEach( - p => { - if (isRefObject(p)) { - const ref = resolveParamsRef(openapi, p.$ref) - const val = { - isArray: false, - isEnum: false, - nullable: false, - value: $ref2Type(p.$ref) - } + ;[...(openapi.paths[path]!.parameters || []), ...(target.parameters || [])].forEach( + p => { + if (isRefObject(p)) { + const ref = resolveParamsRef(openapi, p.$ref) + const val = { + isArray: false, + isEnum: false, + nullable: false, + value: $ref2Type(p.$ref) + } - switch (ref.in) { - case 'header': - reqRefHeaders.push(val) - break - case 'query': - refQuery.push(val) - queryRequired = ref.required ?? true - break - default: - break - } - } else { - const value = schema2value(p.schema) - if (!value) return + switch (ref.in) { + case 'header': + reqRefHeaders.push(val) + break + case 'query': + refQuery.push(val) + queryRequired = ref.required ?? true + break + default: + break + } + } else { + const value = schema2value(p.schema) + if (!value) return - const prop = { - name: getPropertyName(p.name), - required: p.required ?? true, - values: [value] - } + const prop = { + name: getPropertyName(p.name), + required: p.required ?? true, + values: [value] + } - switch (p.in) { - case 'header': - reqHeaders.push(prop) - break - case 'query': - query.push(prop) - queryRequired = p.required ?? true - break - default: - break - } + switch (p.in) { + case 'header': + reqHeaders.push(prop) + break + case 'query': + query.push(prop) + queryRequired = p.required ?? true + break + default: + break } } - ) - - if (reqHeaders.length || reqRefHeaders.length) { - params.push({ - name: 'reqHeaders', - required: false, - values: [ - ...reqRefHeaders, - ...(reqHeaders.length - ? [{ isArray: false, isEnum: false, nullable: false, value: reqHeaders }] - : []) - ] - }) } + ) - if (refQuery.length || query.length) { - params.push({ - name: 'query', - required: queryRequired, - values: [ - ...refQuery, - ...(query.length - ? [{ isArray: false, isEnum: false, nullable: false, value: query }] - : []) - ] - }) - } + if (reqHeaders.length || reqRefHeaders.length) { + params.push({ + name: 'reqHeaders', + required: false, + values: [ + ...reqRefHeaders, + ...(reqHeaders.length + ? [{ isArray: false, isEnum: false, nullable: false, value: reqHeaders }] + : []) + ] + }) } - if (target.responses) { - const code = Object.keys(target.responses).find(code => code.startsWith('20')) - if (code) { - params.push({ - name: 'status', - required: true, - values: [{ isArray: false, isEnum: false, nullable: false, value: code }] - }) + if (refQuery.length || query.length) { + params.push({ + name: 'query', + required: queryRequired, + values: [ + ...refQuery, + ...(query.length + ? [{ isArray: false, isEnum: false, nullable: false, value: query }] + : []) + ] + }) + } + } - const res = target.responses[code] - const ref = isRefObject(res) ? resolveResRef(openapi, res.$ref) : res + if (target.responses) { + const code = Object.keys(target.responses).find(code => code.startsWith('20')) + if (code) { + params.push({ + name: 'status', + required: true, + values: [{ isArray: false, isEnum: false, nullable: false, value: code }] + }) - if (ref.content?.['application/json']?.schema) { - const val = schema2value(ref.content['application/json'].schema) - val && - params.push({ - name: 'resBody', - required: true, - values: [val] - }) - } + const res = target.responses[code] + const ref = isRefObject(res) ? resolveResRef(openapi, res.$ref) : res - if (ref.headers) { + if (ref.content?.['application/json']?.schema) { + const val = schema2value(ref.content['application/json'].schema) + val && params.push({ - name: 'resHeaders', + name: 'resBody', required: true, - values: [ - { - isArray: false, - isEnum: false, - nullable: false, - value: Object.keys(ref.headers) - .map(header => { - const headerData = ref.headers![header] - const val = isRefObject(headerData) - ? { - isArray: false, - isEnum: false, - value: $ref2Type(headerData.$ref) - } - : schema2value(headerData.schema) - - return ( - val && { - name: getPropertyName(header), - required: isRefObject(headerData) - ? true - : headerData.required ?? true, - values: [val] - } - ) - }) - .filter((v): v is Prop => !!v) - } - ] + values: [val] }) - } } - } - - if (target.requestBody) { - let reqFormat = '' - let reqBody: PropValue | null = null - let required = true - if (isRefObject(target.requestBody)) { - const ref = resolveReqRef(openapi, target.requestBody.$ref) - if (ref.content['multipart/form-data']?.schema) { - reqFormat = 'FormData' - } else if (ref.content['application/x-www-form-urlencoded']?.schema) { - reqFormat = 'URLSearchParams' - } + if (ref.headers) { + params.push({ + name: 'resHeaders', + required: true, + values: [ + { + isArray: false, + isEnum: false, + nullable: false, + value: Object.keys(ref.headers) + .map(header => { + const headerData = ref.headers![header] + const val = isRefObject(headerData) + ? { + isArray: false, + isEnum: false, + value: $ref2Type(headerData.$ref) + } + : schema2value(headerData.schema) - reqBody = { - isArray: false, - isEnum: false, - nullable: false, - value: $ref2Type(target.requestBody.$ref) - } - required = ref.required ?? true - } else { - const typeSet = [ - ['multipart/form-data', 'FormData'], - ['application/x-www-form-urlencoded', 'URLSearchParams'], - ['application/octet-stream', ''], - ['application/json', ''] - ] + return ( + val && { + name: getPropertyName(header), + required: isRefObject(headerData) + ? true + : headerData.required ?? true, + values: [val] + } + ) + }) + .filter((v): v is Prop => !!v) + } + ] + }) + } + } + } - for (let i = 0; i < typeSet.length; i += 1) { - if (target.requestBody.content[typeSet[i][0]]?.schema) { - reqFormat = typeSet[i][1] - reqBody = schema2value(target.requestBody.content[typeSet[i][0]].schema!) - required = target.requestBody.required ?? true + if (target.requestBody) { + let reqFormat = '' + let reqBody: PropValue | null = null + let required = true - break - } - } + if (isRefObject(target.requestBody)) { + const ref = resolveReqRef(openapi, target.requestBody.$ref) + if (ref.content['multipart/form-data']?.schema) { + reqFormat = 'FormData' + } else if (ref.content['application/x-www-form-urlencoded']?.schema) { + reqFormat = 'URLSearchParams' } - if (reqFormat) { - params.push({ - name: 'reqFormat', - required: true, - values: [{ isArray: false, isEnum: false, nullable: false, value: reqFormat }] - }) + reqBody = { + isArray: false, + isEnum: false, + nullable: false, + value: $ref2Type(target.requestBody.$ref) } + required = ref.required ?? true + } else { + const typeSet = [ + ['multipart/form-data', 'FormData'], + ['application/x-www-form-urlencoded', 'URLSearchParams'], + ['application/octet-stream', ''], + ['application/json', ''] + ] - if (reqBody) { - params.push({ - name: 'reqBody', - required, - values: [reqBody] - }) + for (let i = 0; i < typeSet.length; i += 1) { + if (target.requestBody.content[typeSet[i][0]]?.schema) { + reqFormat = typeSet[i][1] + reqBody = schema2value(target.requestBody.content[typeSet[i][0]].schema!) + required = target.requestBody.required ?? true + + break + } } } - return { - name: method, - required: true, - values: [{ isArray: false, isEnum: false, nullable: false, value: params }] + if (reqFormat) { + params.push({ + name: 'reqFormat', + required: true, + values: [{ isArray: false, isEnum: false, nullable: false, value: reqFormat }] + }) } - }) - .filter((method): method is Prop => !!method) - if (methods.length) { - const methodsText = props2String(methods, '') + if (reqBody) { + params.push({ + name: 'reqBody', + required, + values: [reqBody] + }) + } + } return { - file, - methods: `/* eslint-disable */\n${ - / Types\./.test(methodsText) - ? `import * as Types from '${file.map(() => '').join('../')}@types'\n\n` - : '' - }export type Methods = ${methodsText}\n` + name: method, + required: true, + values: [{ isArray: false, isEnum: false, nullable: false, value: params }] } - } else { - return { file, methods: '' } + }) + .filter((method): method is Prop => !!method) + + if (methods.length) { + const methodsText = props2String(methods, '') + + return { + file, + methods: `/* eslint-disable */\n${ + / Types\./.test(methodsText) + ? `import * as Types from '${file.map(() => '').join('../')}@types'\n\n` + : '' + }export type Methods = ${methodsText}\n` } - }) - .filter(file => file.methods) - ) - } + } else { + return { file, methods: '' } + } + }) + .filter(file => file.methods) + ) return { baseURL: openapi.servers?.[0]?.url || '', diff --git a/yarn.lock b/yarn.lock index 411e5646..002c5285 100644 --- a/yarn.lock +++ b/yarn.lock @@ -315,10 +315,10 @@ exec-sh "^0.3.2" minimist "^1.2.0" -"@eslint/eslintrc@^0.2.2": - version "0.2.2" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.2.2.tgz#d01fc791e2fc33e88a29d6f3dc7e93d0cd784b76" - integrity sha512-EfB5OHNYp1F4px/LI/FEnGylop7nOqkQ1LRzCM0KccA2U8tvV8w01KBv37LbO7nW4H+YhKyo2LcJhRwjjV17QQ== +"@eslint/eslintrc@^0.3.0": + version "0.3.0" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.3.0.tgz#d736d6963d7003b6514e6324bec9c602ac340318" + integrity sha512-1JTKgrOKAHVivSvOYw+sJOunkBjUOvjqWk1DPja7ZFhIS2mX/4EgTT8M7eTK9jrKhL/FvXXEbQwIs3pg1xp3dg== dependencies: ajv "^6.12.4" debug "^4.1.1" @@ -327,7 +327,7 @@ ignore "^4.0.6" import-fresh "^3.2.1" js-yaml "^3.13.1" - lodash "^4.17.19" + lodash "^4.17.20" minimatch "^3.0.4" strip-json-comments "^3.1.1" @@ -671,10 +671,10 @@ jest-diff "^25.2.1" pretty-format "^25.2.1" -"@types/jest@^26.0.19": - version "26.0.19" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.19.tgz#e6fa1e3def5842ec85045bd5210e9bb8289de790" - integrity sha512-jqHoirTG61fee6v6rwbnEuKhpSKih0tuhqeFbCmMmErhtu3BYlOZaXWjffgOstMM4S/3iQD31lI5bGLTrs97yQ== +"@types/jest@^26.0.20": + version "26.0.20" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.20.tgz#cd2f2702ecf69e86b586e1f5223a60e454056307" + integrity sha512-9zi2Y+5USJRxd0FsahERhBwlcvFh6D2GLQnY2FH2BzK8J9s9omvNHIbvABwIluXa0fD8XVKMLTO0aOEuUfACAA== dependencies: jest-diff "^26.0.0" pretty-format "^26.0.0" @@ -736,28 +736,29 @@ dependencies: "@types/yargs-parser" "*" -"@typescript-eslint/eslint-plugin@^4.12.0": - version "4.12.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.12.0.tgz#00d1b23b40b58031e6d7c04a5bc6c1a30a2e834a" - integrity sha512-wHKj6q8s70sO5i39H2g1gtpCXCvjVszzj6FFygneNFyIAxRvNSVz9GML7XpqrB9t7hNutXw+MHnLN/Ih6uyB8Q== +"@typescript-eslint/eslint-plugin@^4.14.0": + version "4.14.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.14.0.tgz#92db8e7c357ed7d69632d6843ca70b71be3a721d" + integrity sha512-IJ5e2W7uFNfg4qh9eHkHRUCbgZ8VKtGwD07kannJvM5t/GU8P8+24NX8gi3Hf5jST5oWPY8kyV1s/WtfiZ4+Ww== dependencies: - "@typescript-eslint/experimental-utils" "4.12.0" - "@typescript-eslint/scope-manager" "4.12.0" + "@typescript-eslint/experimental-utils" "4.14.0" + "@typescript-eslint/scope-manager" "4.14.0" debug "^4.1.1" functional-red-black-tree "^1.0.1" + lodash "^4.17.15" regexpp "^3.0.0" semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/experimental-utils@4.12.0": - version "4.12.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.12.0.tgz#372838e76db76c9a56959217b768a19f7129546b" - integrity sha512-MpXZXUAvHt99c9ScXijx7i061o5HEjXltO+sbYfZAAHxv3XankQkPaNi5myy0Yh0Tyea3Hdq1pi7Vsh0GJb0fA== +"@typescript-eslint/experimental-utils@4.14.0": + version "4.14.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.14.0.tgz#5aa7b006736634f588a69ee343ca959cd09988df" + integrity sha512-6i6eAoiPlXMKRbXzvoQD5Yn9L7k9ezzGRvzC/x1V3650rUk3c3AOjQyGYyF9BDxQQDK2ElmKOZRD0CbtdkMzQQ== dependencies: "@types/json-schema" "^7.0.3" - "@typescript-eslint/scope-manager" "4.12.0" - "@typescript-eslint/types" "4.12.0" - "@typescript-eslint/typescript-estree" "4.12.0" + "@typescript-eslint/scope-manager" "4.14.0" + "@typescript-eslint/types" "4.14.0" + "@typescript-eslint/typescript-estree" "4.14.0" eslint-scope "^5.0.0" eslint-utils "^2.0.0" @@ -773,23 +774,23 @@ eslint-scope "^5.0.0" eslint-utils "^2.0.0" -"@typescript-eslint/parser@^4.12.0": - version "4.12.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.12.0.tgz#e1cf30436e4f916c31fcc962158917bd9e9d460a" - integrity sha512-9XxVADAo9vlfjfoxnjboBTxYOiNY93/QuvcPgsiKvHxW6tOZx1W4TvkIQ2jB3k5M0pbFP5FlXihLK49TjZXhuQ== +"@typescript-eslint/parser@^4.14.0": + version "4.14.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.14.0.tgz#62d4cd2079d5c06683e9bfb200c758f292c4dee7" + integrity sha512-sUDeuCjBU+ZF3Lzw0hphTyScmDDJ5QVkyE21pRoBo8iDl7WBtVFS+WDN3blY1CH3SBt7EmYCw6wfmJjF0l/uYg== dependencies: - "@typescript-eslint/scope-manager" "4.12.0" - "@typescript-eslint/types" "4.12.0" - "@typescript-eslint/typescript-estree" "4.12.0" + "@typescript-eslint/scope-manager" "4.14.0" + "@typescript-eslint/types" "4.14.0" + "@typescript-eslint/typescript-estree" "4.14.0" debug "^4.1.1" -"@typescript-eslint/scope-manager@4.12.0": - version "4.12.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.12.0.tgz#beeb8beca895a07b10c593185a5612f1085ef279" - integrity sha512-QVf9oCSVLte/8jvOsxmgBdOaoe2J0wtEmBr13Yz0rkBNkl5D8bfnf6G4Vhox9qqMIoG7QQoVwd2eG9DM/ge4Qg== +"@typescript-eslint/scope-manager@4.14.0": + version "4.14.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.14.0.tgz#55a4743095d684e1f7b7180c4bac2a0a3727f517" + integrity sha512-/J+LlRMdbPh4RdL4hfP1eCwHN5bAhFAGOTsvE6SxsrM/47XQiPSgF5MDgLyp/i9kbZV9Lx80DW0OpPkzL+uf8Q== dependencies: - "@typescript-eslint/types" "4.12.0" - "@typescript-eslint/visitor-keys" "4.12.0" + "@typescript-eslint/types" "4.14.0" + "@typescript-eslint/visitor-keys" "4.14.0" "@typescript-eslint/scope-manager@4.6.1": version "4.6.1" @@ -799,23 +800,23 @@ "@typescript-eslint/types" "4.6.1" "@typescript-eslint/visitor-keys" "4.6.1" -"@typescript-eslint/types@4.12.0": - version "4.12.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.12.0.tgz#fb891fe7ccc9ea8b2bbd2780e36da45d0dc055e5" - integrity sha512-N2RhGeheVLGtyy+CxRmxdsniB7sMSCfsnbh8K/+RUIXYYq3Ub5+sukRCjVE80QerrUBvuEvs4fDhz5AW/pcL6g== +"@typescript-eslint/types@4.14.0": + version "4.14.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.14.0.tgz#d8a8202d9b58831d6fd9cee2ba12f8a5a5dd44b6" + integrity sha512-VsQE4VvpldHrTFuVPY1ZnHn/Txw6cZGjL48e+iBxTi2ksa9DmebKjAeFmTVAYoSkTk7gjA7UqJ7pIsyifTsI4A== "@typescript-eslint/types@4.6.1": version "4.6.1" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.6.1.tgz#d3ad7478f53f22e7339dc006ab61aac131231552" integrity sha512-k2ZCHhJ96YZyPIsykickez+OMHkz06xppVLfJ+DY90i532/Cx2Z+HiRMH8YZQo7a4zVd/TwNBuRCdXlGK4yo8w== -"@typescript-eslint/typescript-estree@4.12.0": - version "4.12.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.12.0.tgz#3963418c850f564bdab3882ae23795d115d6d32e" - integrity sha512-gZkFcmmp/CnzqD2RKMich2/FjBTsYopjiwJCroxqHZIY11IIoN0l5lKqcgoAPKHt33H2mAkSfvzj8i44Jm7F4w== +"@typescript-eslint/typescript-estree@4.14.0": + version "4.14.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.14.0.tgz#4bcd67486e9acafc3d0c982b23a9ab8ac8911ed7" + integrity sha512-wRjZ5qLao+bvS2F7pX4qi2oLcOONIB+ru8RGBieDptq/SudYwshveORwCVU4/yMAd4GK7Fsf8Uq1tjV838erag== dependencies: - "@typescript-eslint/types" "4.12.0" - "@typescript-eslint/visitor-keys" "4.12.0" + "@typescript-eslint/types" "4.14.0" + "@typescript-eslint/visitor-keys" "4.14.0" debug "^4.1.1" globby "^11.0.1" is-glob "^4.0.1" @@ -837,12 +838,12 @@ semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/visitor-keys@4.12.0": - version "4.12.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.12.0.tgz#a470a79be6958075fa91c725371a83baf428a67a" - integrity sha512-hVpsLARbDh4B9TKYz5cLbcdMIOAoBYgFPCSP9FFS/liSF+b33gVNq8JHY3QGhHNVz85hObvL7BEYLlgx553WCw== +"@typescript-eslint/visitor-keys@4.14.0": + version "4.14.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.14.0.tgz#b1090d9d2955b044b2ea2904a22496849acbdf54" + integrity sha512-MeHHzUyRI50DuiPgV9+LxcM52FCJFYjJiWHtXlbyC27b80mfOwKeiKI+MHOTEpcpfmoPFm/vvQS88bYIx6PZTA== dependencies: - "@typescript-eslint/types" "4.12.0" + "@typescript-eslint/types" "4.14.0" eslint-visitor-keys "^2.0.0" "@typescript-eslint/visitor-keys@4.6.1": @@ -1058,13 +1059,13 @@ asn1@~0.2.3: dependencies: safer-buffer "~2.1.0" -aspida@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/aspida/-/aspida-1.2.1.tgz#e1e9f056508f7ccb091a0488dc23d258caee89be" - integrity sha512-9pQUe4lBGHg81HT5HBaUynUHBEhsvcMImfwctKG8i6mtz/H37EnkIstwte3AMm28JWk/nHYaV2jlEtm8lABu9A== +aspida@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/aspida/-/aspida-1.3.0.tgz#75687309c04a5f8eaa1a48807f247a156d936e5d" + integrity sha512-l2mRqGMISPqhtNeKasX7jKDu9EViyfVoASauM7K9rxCf8N8vmwoQWCJwCUXmWPTn6llsnRazoJHkla4VrtG6Bg== dependencies: "@types/minimist" "^1.2.1" - chokidar "^3.4.3" + chokidar "^3.5.1" minimist "^1.2.5" assert-plus@1.0.0, assert-plus@^1.0.0: @@ -1361,10 +1362,10 @@ char-regex@^1.0.2: resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf" integrity sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw== -chokidar@^3.4.3: - version "3.4.3" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.4.3.tgz#c1df38231448e45ca4ac588e6c79573ba6a57d5b" - integrity sha512-DtM3g7juCXQxFVSNPNByEC2+NImtBuxQQvWlHunpJIS5Ocr0lG306cC7FCi7cEA0fzmybPUIl4txBIobk1gGOQ== +chokidar@^3.5.1: + version "3.5.1" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.1.tgz#ee9ce7bbebd2b79f49f304799d5468e31e14e68a" + integrity sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw== dependencies: anymatch "~3.1.1" braces "~3.0.2" @@ -1374,7 +1375,7 @@ chokidar@^3.4.3: normalize-path "~3.0.0" readdirp "~3.5.0" optionalDependencies: - fsevents "~2.1.2" + fsevents "~2.3.1" ci-info@^2.0.0: version "2.0.0" @@ -2003,10 +2004,10 @@ escodegen@^1.14.1: optionalDependencies: source-map "~0.6.1" -eslint-config-prettier@^7.1.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-7.1.0.tgz#5402eb559aa94b894effd6bddfa0b1ca051c858f" - integrity sha512-9sm5/PxaFG7qNJvJzTROMM1Bk1ozXVTKI0buKOyb0Bsr1hrwi0H/TzxF/COtf1uxikIK8SwhX7K6zg78jAzbeA== +eslint-config-prettier@^7.2.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-7.2.0.tgz#f4a4bd2832e810e8cc7c1411ec85b3e85c0c53f9" + integrity sha512-rV4Qu0C3nfJKPOAhFujFxB7RMP+URFyQqqOZW9DMRD7ZDTFyjaIlETU3xzHELt++4ugC0+Jm084HQYkkJe+Ivg== eslint-config-standard@^16.0.2: version "16.0.2" @@ -2125,13 +2126,13 @@ eslint-visitor-keys@^2.0.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz#21fdc8fbcd9c795cc0321f0563702095751511a8" integrity sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ== -eslint@^7.17.0: - version "7.17.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.17.0.tgz#4ccda5bf12572ad3bf760e6f195886f50569adb0" - integrity sha512-zJk08MiBgwuGoxes5sSQhOtibZ75pz0J35XTRlZOk9xMffhpA9BTbQZxoXZzOl5zMbleShbGwtw+1kGferfFwQ== +eslint@^7.18.0: + version "7.18.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.18.0.tgz#7fdcd2f3715a41fe6295a16234bd69aed2c75e67" + integrity sha512-fbgTiE8BfUJZuBeq2Yi7J3RB3WGUQ9PNuNbmgi6jt9Iv8qrkxfy19Ds3OpL1Pm7zg3BtTVhvcUZbIRQ0wmSjAQ== dependencies: "@babel/code-frame" "^7.0.0" - "@eslint/eslintrc" "^0.2.2" + "@eslint/eslintrc" "^0.3.0" ajv "^6.10.0" chalk "^4.0.0" cross-spawn "^7.0.2" @@ -2155,7 +2156,7 @@ eslint@^7.17.0: js-yaml "^3.13.1" json-stable-stringify-without-jsonify "^1.0.1" levn "^0.4.1" - lodash "^4.17.19" + lodash "^4.17.20" minimatch "^3.0.4" natural-compare "^1.4.0" optionator "^0.9.1" @@ -2510,11 +2511,16 @@ fs.realpath@^1.0.0: resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= -fsevents@^2.1.2, fsevents@~2.1.2: +fsevents@^2.1.2: version "2.1.3" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e" integrity sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ== +fsevents@~2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.1.tgz#b209ab14c61012636c8863507edf7fb68cc54e9f" + integrity sha512-YR47Eg4hChJGAB1O3yEAOkGO+rlzutoICGqGo9EZ4lKWokzZRSyIW1QmTzqjtw8MJdj9srP869CuWw/hyzSiBw== + function-bind@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" @@ -4367,10 +4373,10 @@ onetime@^5.1.0: dependencies: mimic-fn "^2.1.0" -openapi-types@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/openapi-types/-/openapi-types-7.0.1.tgz#966bcacfd14119fa12000dbc9d588bfd8df2e4d1" - integrity sha512-6pi4/Fw+JIW1HHda2Ij7LRJ5QJ8f6YzaXnsRA6m44BJz8nLq/j5gVFzPBKJo+uOFhAeHqZC/3uzhTpYPga3Q/A== +openapi-types@^7.2.3: + version "7.2.3" + resolved "https://registry.yarnpkg.com/openapi-types/-/openapi-types-7.2.3.tgz#83829911a3410a022f0e0cf2b0b2e67232ccf96e" + integrity sha512-olbaNxz12R27+mTyJ/ZAFEfUruauHH27AkeQHDHRq5AF0LdNkK1SSV7EourXQDK+4aX7dv2HtyirAGK06WMAsA== optionator@^0.8.1: version "0.8.3"