diff --git a/package-lock.json b/package-lock.json index a47987d6..15efd109 100644 --- a/package-lock.json +++ b/package-lock.json @@ -39,19 +39,19 @@ } }, "node_modules/@babel/core": { - "version": "7.12.3", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.3.tgz", - "integrity": "sha512-0qXcZYKZp3/6N2jKYVxZv0aNCsxTSVCiK72DTiTYZAu7sjg73W0/aynWjMbiGd87EQL4WyA8reiJVh92AVla9g==", + "version": "7.12.7", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.7.tgz", + "integrity": "sha512-tRKx9B53kJe8NCGGIxEQb2Bkr0riUIEuN7Sc1fxhs5H8lKlCWUvQCSNMVIB0Meva7hcbCRJ76de15KoLltdoqw==", "dev": true, "dependencies": { "@babel/code-frame": "^7.10.4", - "@babel/generator": "^7.12.1", + "@babel/generator": "^7.12.5", "@babel/helper-module-transforms": "^7.12.1", - "@babel/helpers": "^7.12.1", - "@babel/parser": "^7.12.3", - "@babel/template": "^7.10.4", - "@babel/traverse": "^7.12.1", - "@babel/types": "^7.12.1", + "@babel/helpers": "^7.12.5", + "@babel/parser": "^7.12.7", + "@babel/template": "^7.12.7", + "@babel/traverse": "^7.12.7", + "@babel/types": "^7.12.7", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.1", @@ -119,12 +119,12 @@ } }, "node_modules/@babel/helper-member-expression-to-functions": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.12.1.tgz", - "integrity": "sha512-k0CIe3tXUKTRSoEx1LQEPFU9vRQfqHtl+kf8eNnDqb4AUJEy5pz6aIiog+YWtVm2jpggjS1laH68bPsR+KWWPQ==", + "version": "7.12.7", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.12.7.tgz", + "integrity": "sha512-DCsuPyeWxeHgh1Dus7APn7iza42i/qXqiFPWyBDdOFtvS581JQePsc1F/nD+fHrcswhLlRc2UpYS1NwERxZhHw==", "dev": true, "dependencies": { - "@babel/types": "^7.12.1" + "@babel/types": "^7.12.7" } }, "node_modules/@babel/helper-module-imports": { @@ -154,12 +154,12 @@ } }, "node_modules/@babel/helper-optimise-call-expression": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.10.4.tgz", - "integrity": "sha512-n3UGKY4VXwXThEiKrgRAoVPBMqeoPgHVqiHZOanAJCG9nQUL2pLRQirUzl0ioKclHGpGqRgIOkgcIJaIWLpygg==", + "version": "7.12.7", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.7.tgz", + "integrity": "sha512-I5xc9oSJ2h59OwyUqjv95HRyzxj53DAubUERgQMrpcCEYQyToeHA+NEcUEsVWB4j53RDeskeBJ0SgRAYHDBckw==", "dev": true, "dependencies": { - "@babel/types": "^7.10.4" + "@babel/types": "^7.12.7" } }, "node_modules/@babel/helper-plugin-utils": { @@ -298,9 +298,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.12.5", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.5.tgz", - "integrity": "sha512-FVM6RZQ0mn2KCf1VUED7KepYeUWoVShczewOCfm3nzoBybaih51h+sYVVGthW9M6lPByEPTQf+xm27PBdlpwmQ==", + "version": "7.12.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.7.tgz", + "integrity": "sha512-oWR02Ubp4xTLCAqPRiNIuMVgNO5Aif/xpXtabhzW2HWUD47XJsAB4Zd/Rg30+XeQA3juXigV7hlquOTmwqLiwg==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -454,37 +454,37 @@ } }, "node_modules/@babel/template": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz", - "integrity": "sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==", + "version": "7.12.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.12.7.tgz", + "integrity": "sha512-GkDzmHS6GV7ZeXfJZ0tLRBhZcMcY0/Lnb+eEbXDBfCAcZCjrZKe6p3J4we/D24O9Y8enxWAg1cWwof59yLh2ow==", "dev": true, "dependencies": { "@babel/code-frame": "^7.10.4", - "@babel/parser": "^7.10.4", - "@babel/types": "^7.10.4" + "@babel/parser": "^7.12.7", + "@babel/types": "^7.12.7" } }, "node_modules/@babel/traverse": { - "version": "7.12.5", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.5.tgz", - "integrity": "sha512-xa15FbQnias7z9a62LwYAA5SZZPkHIXpd42C6uW68o8uTuua96FHZy1y61Va5P/i83FAAcMpW8+A/QayntzuqA==", + "version": "7.12.7", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.7.tgz", + "integrity": "sha512-nMWaqsQEeSvMNypswUDzjqQ+0rR6pqCtoQpsqGJC4/Khm9cISwPTSpai57F6/jDaOoEGz8yE/WxcO3PV6tKSmQ==", "dev": true, "dependencies": { "@babel/code-frame": "^7.10.4", "@babel/generator": "^7.12.5", "@babel/helper-function-name": "^7.10.4", "@babel/helper-split-export-declaration": "^7.11.0", - "@babel/parser": "^7.12.5", - "@babel/types": "^7.12.5", + "@babel/parser": "^7.12.7", + "@babel/types": "^7.12.7", "debug": "^4.1.0", "globals": "^11.1.0", "lodash": "^4.17.19" } }, "node_modules/@babel/types": { - "version": "7.12.6", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.6.tgz", - "integrity": "sha512-hwyjw6GvjBLiyy3W0YQf0Z5Zf4NpYejUnKFcfcUhZCSffoBBp30w6wP2Wn6pk31jMYZvcOrB/1b7cGXvEoKogA==", + "version": "7.12.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.7.tgz", + "integrity": "sha512-MNyI92qZq6jrQkXvtIiykvl4WtoRrVV9MPn+ZfsoEENjiWcBQ3ZSHrkxnJWgWtLX3XXqX5hrSQ+X69wkmesXuQ==", "dev": true, "dependencies": { "@babel/helper-validator-identifier": "^7.10.4", @@ -940,9 +940,9 @@ "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==" }, "node_modules/@types/node": { - "version": "14.14.7", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.7.tgz", - "integrity": "sha512-Zw1vhUSQZYw+7u5dAwNbIA9TuTotpzY/OF7sJM9FqPOF3SPjKnxrjoTktXDZgUjybf4cWVBP7O8wvKdSaGHweg==" + "version": "14.14.9", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.9.tgz", + "integrity": "sha512-JsoLXFppG62tWTklIoO4knA+oDTYsmqWxHRvd4lpmfQRNhX6osheUOWETP2jMoV/2bEHuMra8Pp3Dmo/stBFcw==" }, "node_modules/@types/node-fetch": { "version": "2.5.7", @@ -987,9 +987,9 @@ "dev": true }, "node_modules/@types/yargs": { - "version": "15.0.9", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.9.tgz", - "integrity": "sha512-HmU8SeIRhZCWcnRskCs36Q1Q00KBV6Cqh/ora8WN1+22dY07AZdn6Gel8QZ3t26XYPImtcL8WV/eqjhVmMEw4g==", + "version": "15.0.10", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.10.tgz", + "integrity": "sha512-z8PNtlhrj7eJNLmrAivM7rjBESG6JwC5xP3RVk12i/8HVP7Xnx/sEmERnRImyEuUaJfO942X0qMOYsoupaJbZQ==", "dev": true, "dependencies": { "@types/yargs-parser": "*" @@ -2485,9 +2485,9 @@ } }, "node_modules/debug": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", - "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", "dependencies": { "ms": "2.1.2" }, @@ -5868,12 +5868,15 @@ "dev": true }, "node_modules/p-each-series": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-2.1.0.tgz", - "integrity": "sha512-ZuRs1miPT4HrjFa+9fRfOFXxGJfORgelKV9f9nNOWw2gl6gVsRaVDOQP0+MI0G0wGKns1Yacsu0GjOFbTK0JFQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-2.2.0.tgz", + "integrity": "sha512-ycIL2+1V32th+8scbpTvyHNaHe02z0sjgh91XXjAk+ZeXoPN4Z46DVUnzdso0aX4KckKw0FNNFHdjZ2UsZvxiA==", "dev": true, "engines": { "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/p-finally": { @@ -6114,9 +6117,9 @@ } }, "node_modules/portfinder/node_modules/debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dependencies": { "ms": "^2.1.1" } @@ -6151,9 +6154,9 @@ } }, "node_modules/prettier": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.1.2.tgz", - "integrity": "sha512-16c7K+x4qVlJg9rEbXl7HEGmQyZlG4R9AgP+oHKRMsMsuk8s+ATStlf1NpDqyBI1HpVyfjLOeMhH2LvuNvV5Vg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.2.0.tgz", + "integrity": "sha512-yYerpkvseM4iKD/BXLYUkQV5aKt4tQPqaGW6EsZjzyu0r7sVZZNPJW4Y8MyKmicp6t42XUPcBVA+H6sB3gqndw==", "dev": true, "bin": { "prettier": "bin-prettier.js" @@ -6310,9 +6313,9 @@ } }, "node_modules/queue-microtask": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.0.tgz", - "integrity": "sha512-J95OVUiS4b8qqmpqhCodN8yPpHG2mpZUPQ8tDGyIY0VhM+kBHszOuvsMJVGNQ1OH2BnTFbqz45i+2jGpDw9H0w==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.1.tgz", + "integrity": "sha512-MXDP6d9DIR+7/Tf2vxfB0Qacg9uRs6bQaWwT1RieFIMQVXDsbJ/+AZOI7tHTrzY+f0VsvSM5qQyh/orfZwOVzw==", "funding": [ { "type": "github", @@ -8330,9 +8333,9 @@ } }, "node_modules/uglify-js": { - "version": "3.11.6", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.11.6.tgz", - "integrity": "sha512-oASI1FOJ7BBFkSCNDZ446EgkSuHkOZBuqRFrwXIKWCoXw8ZXQETooTQjkAcBS03Acab7ubCKsXnwuV2svy061g==", + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.12.0.tgz", + "integrity": "sha512-8lBMSkFZuAK7gGF8LswsXmir8eX8d2AAMOnxSDWjKBx/fBR6MypQjs78m6ML9zQVp1/hD4TBdfeMZMC7nW1TAA==", "extraneous": true, "bin": { "uglifyjs": "bin/uglifyjs" @@ -9836,19 +9839,19 @@ } }, "@babel/core": { - "version": "7.12.3", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.3.tgz", - "integrity": "sha512-0qXcZYKZp3/6N2jKYVxZv0aNCsxTSVCiK72DTiTYZAu7sjg73W0/aynWjMbiGd87EQL4WyA8reiJVh92AVla9g==", + "version": "7.12.7", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.7.tgz", + "integrity": "sha512-tRKx9B53kJe8NCGGIxEQb2Bkr0riUIEuN7Sc1fxhs5H8lKlCWUvQCSNMVIB0Meva7hcbCRJ76de15KoLltdoqw==", "dev": true, "requires": { "@babel/code-frame": "^7.10.4", - "@babel/generator": "^7.12.1", + "@babel/generator": "^7.12.5", "@babel/helper-module-transforms": "^7.12.1", - "@babel/helpers": "^7.12.1", - "@babel/parser": "^7.12.3", - "@babel/template": "^7.10.4", - "@babel/traverse": "^7.12.1", - "@babel/types": "^7.12.1", + "@babel/helpers": "^7.12.5", + "@babel/parser": "^7.12.7", + "@babel/template": "^7.12.7", + "@babel/traverse": "^7.12.7", + "@babel/types": "^7.12.7", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.1", @@ -9907,12 +9910,12 @@ } }, "@babel/helper-member-expression-to-functions": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.12.1.tgz", - "integrity": "sha512-k0CIe3tXUKTRSoEx1LQEPFU9vRQfqHtl+kf8eNnDqb4AUJEy5pz6aIiog+YWtVm2jpggjS1laH68bPsR+KWWPQ==", + "version": "7.12.7", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.12.7.tgz", + "integrity": "sha512-DCsuPyeWxeHgh1Dus7APn7iza42i/qXqiFPWyBDdOFtvS581JQePsc1F/nD+fHrcswhLlRc2UpYS1NwERxZhHw==", "dev": true, "requires": { - "@babel/types": "^7.12.1" + "@babel/types": "^7.12.7" } }, "@babel/helper-module-imports": { @@ -9942,12 +9945,12 @@ } }, "@babel/helper-optimise-call-expression": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.10.4.tgz", - "integrity": "sha512-n3UGKY4VXwXThEiKrgRAoVPBMqeoPgHVqiHZOanAJCG9nQUL2pLRQirUzl0ioKclHGpGqRgIOkgcIJaIWLpygg==", + "version": "7.12.7", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.7.tgz", + "integrity": "sha512-I5xc9oSJ2h59OwyUqjv95HRyzxj53DAubUERgQMrpcCEYQyToeHA+NEcUEsVWB4j53RDeskeBJ0SgRAYHDBckw==", "dev": true, "requires": { - "@babel/types": "^7.10.4" + "@babel/types": "^7.12.7" } }, "@babel/helper-plugin-utils": { @@ -10073,9 +10076,9 @@ } }, "@babel/parser": { - "version": "7.12.5", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.5.tgz", - "integrity": "sha512-FVM6RZQ0mn2KCf1VUED7KepYeUWoVShczewOCfm3nzoBybaih51h+sYVVGthW9M6lPByEPTQf+xm27PBdlpwmQ==", + "version": "7.12.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.7.tgz", + "integrity": "sha512-oWR02Ubp4xTLCAqPRiNIuMVgNO5Aif/xpXtabhzW2HWUD47XJsAB4Zd/Rg30+XeQA3juXigV7hlquOTmwqLiwg==", "dev": true }, "@babel/plugin-syntax-async-generators": { @@ -10187,37 +10190,37 @@ } }, "@babel/template": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz", - "integrity": "sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==", + "version": "7.12.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.12.7.tgz", + "integrity": "sha512-GkDzmHS6GV7ZeXfJZ0tLRBhZcMcY0/Lnb+eEbXDBfCAcZCjrZKe6p3J4we/D24O9Y8enxWAg1cWwof59yLh2ow==", "dev": true, "requires": { "@babel/code-frame": "^7.10.4", - "@babel/parser": "^7.10.4", - "@babel/types": "^7.10.4" + "@babel/parser": "^7.12.7", + "@babel/types": "^7.12.7" } }, "@babel/traverse": { - "version": "7.12.5", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.5.tgz", - "integrity": "sha512-xa15FbQnias7z9a62LwYAA5SZZPkHIXpd42C6uW68o8uTuua96FHZy1y61Va5P/i83FAAcMpW8+A/QayntzuqA==", + "version": "7.12.7", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.7.tgz", + "integrity": "sha512-nMWaqsQEeSvMNypswUDzjqQ+0rR6pqCtoQpsqGJC4/Khm9cISwPTSpai57F6/jDaOoEGz8yE/WxcO3PV6tKSmQ==", "dev": true, "requires": { "@babel/code-frame": "^7.10.4", "@babel/generator": "^7.12.5", "@babel/helper-function-name": "^7.10.4", "@babel/helper-split-export-declaration": "^7.11.0", - "@babel/parser": "^7.12.5", - "@babel/types": "^7.12.5", + "@babel/parser": "^7.12.7", + "@babel/types": "^7.12.7", "debug": "^4.1.0", "globals": "^11.1.0", "lodash": "^4.17.19" } }, "@babel/types": { - "version": "7.12.6", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.6.tgz", - "integrity": "sha512-hwyjw6GvjBLiyy3W0YQf0Z5Zf4NpYejUnKFcfcUhZCSffoBBp30w6wP2Wn6pk31jMYZvcOrB/1b7cGXvEoKogA==", + "version": "7.12.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.7.tgz", + "integrity": "sha512-MNyI92qZq6jrQkXvtIiykvl4WtoRrVV9MPn+ZfsoEENjiWcBQ3ZSHrkxnJWgWtLX3XXqX5hrSQ+X69wkmesXuQ==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.10.4", @@ -10651,9 +10654,9 @@ "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==" }, "@types/node": { - "version": "14.14.7", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.7.tgz", - "integrity": "sha512-Zw1vhUSQZYw+7u5dAwNbIA9TuTotpzY/OF7sJM9FqPOF3SPjKnxrjoTktXDZgUjybf4cWVBP7O8wvKdSaGHweg==" + "version": "14.14.9", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.9.tgz", + "integrity": "sha512-JsoLXFppG62tWTklIoO4knA+oDTYsmqWxHRvd4lpmfQRNhX6osheUOWETP2jMoV/2bEHuMra8Pp3Dmo/stBFcw==" }, "@types/node-fetch": { "version": "2.5.7", @@ -10697,9 +10700,9 @@ "dev": true }, "@types/yargs": { - "version": "15.0.9", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.9.tgz", - "integrity": "sha512-HmU8SeIRhZCWcnRskCs36Q1Q00KBV6Cqh/ora8WN1+22dY07AZdn6Gel8QZ3t26XYPImtcL8WV/eqjhVmMEw4g==", + "version": "15.0.10", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.10.tgz", + "integrity": "sha512-z8PNtlhrj7eJNLmrAivM7rjBESG6JwC5xP3RVk12i/8HVP7Xnx/sEmERnRImyEuUaJfO942X0qMOYsoupaJbZQ==", "dev": true, "requires": { "@types/yargs-parser": "*" @@ -11980,9 +11983,9 @@ } }, "debug": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", - "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", "requires": { "ms": "2.1.2" } @@ -14649,9 +14652,9 @@ "dev": true }, "p-each-series": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-2.1.0.tgz", - "integrity": "sha512-ZuRs1miPT4HrjFa+9fRfOFXxGJfORgelKV9f9nNOWw2gl6gVsRaVDOQP0+MI0G0wGKns1Yacsu0GjOFbTK0JFQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-2.2.0.tgz", + "integrity": "sha512-ycIL2+1V32th+8scbpTvyHNaHe02z0sjgh91XXjAk+ZeXoPN4Z46DVUnzdso0aX4KckKw0FNNFHdjZ2UsZvxiA==", "dev": true }, "p-finally": { @@ -14835,9 +14838,9 @@ }, "dependencies": { "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "requires": { "ms": "^2.1.1" } @@ -14865,9 +14868,9 @@ "dev": true }, "prettier": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.1.2.tgz", - "integrity": "sha512-16c7K+x4qVlJg9rEbXl7HEGmQyZlG4R9AgP+oHKRMsMsuk8s+ATStlf1NpDqyBI1HpVyfjLOeMhH2LvuNvV5Vg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.2.0.tgz", + "integrity": "sha512-yYerpkvseM4iKD/BXLYUkQV5aKt4tQPqaGW6EsZjzyu0r7sVZZNPJW4Y8MyKmicp6t42XUPcBVA+H6sB3gqndw==", "dev": true }, "pretty-format": { @@ -15001,9 +15004,9 @@ "dev": true }, "queue-microtask": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.0.tgz", - "integrity": "sha512-J95OVUiS4b8qqmpqhCodN8yPpHG2mpZUPQ8tDGyIY0VhM+kBHszOuvsMJVGNQ1OH2BnTFbqz45i+2jGpDw9H0w==" + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.1.tgz", + "integrity": "sha512-MXDP6d9DIR+7/Tf2vxfB0Qacg9uRs6bQaWwT1RieFIMQVXDsbJ/+AZOI7tHTrzY+f0VsvSM5qQyh/orfZwOVzw==" }, "randombytes": { "version": "2.1.0", @@ -16601,9 +16604,9 @@ "dev": true }, "uglify-js": { - "version": "3.11.6", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.11.6.tgz", - "integrity": "sha512-oASI1FOJ7BBFkSCNDZ446EgkSuHkOZBuqRFrwXIKWCoXw8ZXQETooTQjkAcBS03Acab7ubCKsXnwuV2svy061g==", + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.12.0.tgz", + "integrity": "sha512-8lBMSkFZuAK7gGF8LswsXmir8eX8d2AAMOnxSDWjKBx/fBR6MypQjs78m6ML9zQVp1/hD4TBdfeMZMC7nW1TAA==", "extraneous": true }, "union-value": { diff --git a/packages/cli/src/commands/join.ts b/packages/cli/src/commands/join.ts index e6b8f0b5..a18aa728 100644 --- a/packages/cli/src/commands/join.ts +++ b/packages/cli/src/commands/join.ts @@ -12,8 +12,8 @@ import { Oas3Tag, loadConfig, formatProblems, - validateDocument, - detectOpenAPI + lintDocument, + detectOpenAPI, } from '@redocly/openapi-core'; import { @@ -423,7 +423,7 @@ function getInfoPrefix(info: any, prefixArg: string | undefined, type: string) { async function validateEntrypoint(document: Document, config: LintConfig, externalRefResolver: BaseResolver, packageVersion: string) { try { - const results = await validateDocument({ document, config, externalRefResolver }); + const results = await lintDocument({ document, config, externalRefResolver }); const fileTotals = getTotals(results); formatProblems(results, { format: 'stylish', totals: fileTotals, version: packageVersion }); printLintTotals(fileTotals, 2); diff --git a/packages/cli/src/commands/lint.ts b/packages/cli/src/commands/lint.ts index 0d1fc5d1..e44413a8 100644 --- a/packages/cli/src/commands/lint.ts +++ b/packages/cli/src/commands/lint.ts @@ -1,4 +1,4 @@ -import { Config, formatProblems, loadConfig, OutputFormat, validate } from '@redocly/openapi-core'; +import { Config, formatProblems, lint, loadConfig, OutputFormat } from '@redocly/openapi-core'; import { getExecutionTime, getFallbackEntryPointsOrExit, @@ -44,7 +44,7 @@ export async function handleLint (argv: { try { const startedAt = performance.now(); process.stderr.write(gray(`validating ${entryPoint}...\n`)); - const results = await validate({ + const results = await lint({ ref: entryPoint, config, }); @@ -87,5 +87,4 @@ export async function handleLint (argv: { printUnusedWarnings(config.lint); process.exit(totals.errors === 0 || argv['generate-ignore-file'] ? 0 : 1); - } diff --git a/packages/core/__tests__/normalizeVisitors.test.ts b/packages/core/__tests__/normalizeVisitors.test.ts index d3ac4b6a..b25e87d5 100644 --- a/packages/core/__tests__/normalizeVisitors.test.ts +++ b/packages/core/__tests__/normalizeVisitors.test.ts @@ -1,5 +1,5 @@ import { normalizeVisitors, VisitorLevelContext } from '../src/visitors'; -import { Oas3RuleSet } from '../src/validate'; +import { Oas3RuleSet } from '../src/lint'; import { Oas3Types } from '../src/types/oas3'; import { normalizeTypes } from '../src/types'; diff --git a/packages/core/__tests__/ref-utils.test.ts b/packages/core/__tests__/ref-utils.test.ts index c70b0ca1..0df177ac 100644 --- a/packages/core/__tests__/ref-utils.test.ts +++ b/packages/core/__tests__/ref-utils.test.ts @@ -1,8 +1,7 @@ import outdent from 'outdent'; - import { parseYamlToDocument } from './utils'; import { parseRef } from '../src/ref-utils'; -import { validateDocument } from '../src/validate'; +import { lintDocument } from '../src/lint'; import { LintConfig } from '../src/config/config'; import { BaseResolver } from '../src/resolve'; @@ -88,7 +87,7 @@ describe('ref-utils', () => { '', ); - const result = await validateDocument({ + const result = await lintDocument({ document, externalRefResolver: new BaseResolver(), config: new LintConfig({}), diff --git a/packages/core/__tests__/utils.ts b/packages/core/__tests__/utils.ts index 6dd09112..6b5fc688 100644 --- a/packages/core/__tests__/utils.ts +++ b/packages/core/__tests__/utils.ts @@ -4,7 +4,7 @@ import * as path from 'path'; import { Document, Source } from '../src/resolve'; import { NormalizedProblem } from '../src/walk'; import { RuleConfig, LintConfig, Plugin } from '../src/config/config'; -import { Oas3RuleSet } from '../src/validate'; +import { Oas3RuleSet } from '../src/lint'; export function parseYamlToDocument(body: string, absoluteRef: string = ''): Document { return { diff --git a/packages/core/__tests__/walk.test.ts b/packages/core/__tests__/walk.test.ts index b3b9142f..5f741559 100644 --- a/packages/core/__tests__/walk.test.ts +++ b/packages/core/__tests__/walk.test.ts @@ -1,7 +1,7 @@ import outdent from 'outdent'; import * as path from 'path'; -import { validateDocument, Oas3RuleSet } from '../src/validate'; +import { lintDocument, Oas3RuleSet } from '../src/lint'; import { parseYamlToDocument, replaceSourceWithRef, makeConfigForRuleset } from './utils'; import { BaseResolver, Document } from '../src/resolve'; @@ -44,7 +44,7 @@ describe('walk order', () => { '', ); - await validateDocument({ + await lintDocument({ externalRefResolver: new BaseResolver(), document, config: makeConfigForRuleset(testRuleSet), @@ -111,7 +111,7 @@ describe('walk order', () => { '', ); - await validateDocument({ + await lintDocument({ externalRefResolver: new BaseResolver(), document, config: makeConfigForRuleset(testRuleSet), @@ -196,7 +196,7 @@ describe('walk order', () => { '', ); - await validateDocument({ + await lintDocument({ externalRefResolver: new BaseResolver(), document, config: makeConfigForRuleset(testRuleSet), @@ -268,7 +268,7 @@ describe('walk order', () => { '', ); - await validateDocument({ + await lintDocument({ externalRefResolver: new BaseResolver(), document, config: makeConfigForRuleset(testRuleSet), @@ -340,7 +340,7 @@ describe('walk order', () => { '', ); - await validateDocument({ + await lintDocument({ externalRefResolver: new BaseResolver(), document, config: makeConfigForRuleset(testRuleSet), @@ -407,7 +407,7 @@ describe('walk order', () => { '', ); - await validateDocument({ + await lintDocument({ externalRefResolver: new BaseResolver(), document, config: makeConfigForRuleset(testRuleSet), @@ -461,7 +461,7 @@ describe('walk order', () => { '', ); - await validateDocument({ + await lintDocument({ externalRefResolver: new BaseResolver(), document, config: makeConfigForRuleset(testRuleSet), @@ -517,7 +517,7 @@ describe('walk order', () => { '', ); - await validateDocument({ + await lintDocument({ externalRefResolver: new BaseResolver(), document, config: makeConfigForRuleset(testRuleSet), @@ -559,7 +559,7 @@ describe('walk order', () => { '', ); - await validateDocument({ + await lintDocument({ externalRefResolver: new BaseResolver(), document, config: makeConfigForRuleset(testRuleSet), @@ -614,7 +614,7 @@ describe('walk order', () => { '', ); - await validateDocument({ + await lintDocument({ externalRefResolver: new BaseResolver(), document, config: makeConfigForRuleset(testRuleSet), @@ -700,7 +700,7 @@ describe('walk order', () => { '', ); - await validateDocument({ + await lintDocument({ externalRefResolver: new BaseResolver(), document, config: makeConfigForRuleset(testRuleSet), @@ -779,7 +779,7 @@ describe('walk order', () => { 'foobar.yaml', ); - await validateDocument({ + await lintDocument({ externalRefResolver: new BaseResolver(), document, config: makeConfigForRuleset(testRuleSet), @@ -851,7 +851,7 @@ describe('walk order', () => { 'foobar.yaml', ); - await validateDocument({ + await lintDocument({ externalRefResolver: new BaseResolver(), document, config: makeConfigForRuleset(testRuleSet), @@ -895,7 +895,7 @@ describe('walk order', () => { 'foobar.yaml', ); - await validateDocument({ + await lintDocument({ externalRefResolver: new BaseResolver(), document, config: makeConfigForRuleset(testRuleSet), @@ -960,7 +960,7 @@ describe('walk order', () => { '', ); - await validateDocument({ + await lintDocument({ externalRefResolver: new BaseResolver(), document, config: makeConfigForRuleset(testRuleSet), @@ -1048,7 +1048,7 @@ describe('context.report', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: makeConfigForRuleset(testRuleSet), @@ -1128,7 +1128,7 @@ describe('context.report', () => { throw 'Should never happen'; } - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: makeConfigForRuleset(testRuleSet), @@ -1236,7 +1236,7 @@ describe('context.resolve', () => { 'foobar.yaml', ); - await validateDocument({ + await lintDocument({ externalRefResolver: new BaseResolver(), document, config: makeConfigForRuleset(testRuleSet), @@ -1282,7 +1282,7 @@ describe('type extensions', () => { 'foobar.yaml', ); - await validateDocument({ + await lintDocument({ externalRefResolver: new BaseResolver(), document, config: makeConfigForRuleset(testRuleSet, { diff --git a/packages/core/src/benchmark/benches/validate-with-many-rules.bench.ts b/packages/core/src/benchmark/benches/lint-with-many-rules.bench.ts similarity index 92% rename from packages/core/src/benchmark/benches/validate-with-many-rules.bench.ts rename to packages/core/src/benchmark/benches/lint-with-many-rules.bench.ts index 76bb5a03..c9006eb4 100644 --- a/packages/core/src/benchmark/benches/validate-with-many-rules.bench.ts +++ b/packages/core/src/benchmark/benches/lint-with-many-rules.bench.ts @@ -1,6 +1,6 @@ import { readFileSync } from 'fs'; import { join as pathJoin, resolve as pathResolve } from 'path'; -import { validateDocument } from '../../validate'; +import { lintDocument } from '../../lint'; import { BaseResolver } from '../../resolve'; import { parseYamlToDocument, makeConfigForRuleset } from '../utils'; @@ -27,7 +27,7 @@ for (let i = 0; i < 50; i++) { const config = makeConfigForRuleset(ruleset); export function measureAsync() { - return validateDocument({ + return lintDocument({ externalRefResolver: new BaseResolver(), document: rebillyDocument, config, diff --git a/packages/core/src/benchmark/benches/validate-with-nested-rule.bench.ts b/packages/core/src/benchmark/benches/lint-with-nested-rule.bench.ts similarity index 92% rename from packages/core/src/benchmark/benches/validate-with-nested-rule.bench.ts rename to packages/core/src/benchmark/benches/lint-with-nested-rule.bench.ts index cbdadc90..dbe1ae5e 100644 --- a/packages/core/src/benchmark/benches/validate-with-nested-rule.bench.ts +++ b/packages/core/src/benchmark/benches/lint-with-nested-rule.bench.ts @@ -1,6 +1,6 @@ import { readFileSync } from 'fs'; import { join as pathJoin, resolve as pathResolve } from 'path'; -import { validateDocument } from '../../validate'; +import { lintDocument } from '../../lint'; import { BaseResolver } from '../../resolve'; import { parseYamlToDocument, makeConfigForRuleset } from '../utils'; @@ -31,7 +31,7 @@ const visitor = { }; const config = makeConfigForRuleset(visitor); export function measureAsync() { - return validateDocument({ + return lintDocument({ externalRefResolver: new BaseResolver(), document: rebillyDocument, config, diff --git a/packages/core/src/benchmark/benches/validate-with-no-rules.bench.ts b/packages/core/src/benchmark/benches/lint-with-no-rules.bench.ts similarity index 89% rename from packages/core/src/benchmark/benches/validate-with-no-rules.bench.ts rename to packages/core/src/benchmark/benches/lint-with-no-rules.bench.ts index ebaf1bd1..3a8cc602 100644 --- a/packages/core/src/benchmark/benches/validate-with-no-rules.bench.ts +++ b/packages/core/src/benchmark/benches/lint-with-no-rules.bench.ts @@ -1,6 +1,6 @@ import { readFileSync } from 'fs'; import { join as pathJoin, resolve as pathResolve } from 'path'; -import { validateDocument } from '../../validate'; +import { lintDocument } from '../../lint'; import { BaseResolver } from '../../resolve'; import { parseYamlToDocument, makeConfigForRuleset } from '../utils'; export const name = 'Validate with no rules'; @@ -12,7 +12,7 @@ const rebillyDocument = parseYamlToDocument( ); const config = makeConfigForRuleset({}); export function measureAsync() { - return validateDocument({ + return lintDocument({ externalRefResolver: new BaseResolver(), document: rebillyDocument, config, diff --git a/packages/core/src/benchmark/benches/validate-with-top-level-rule-report.bench.ts b/packages/core/src/benchmark/benches/lint-with-top-level-rule-report.bench.ts similarity index 92% rename from packages/core/src/benchmark/benches/validate-with-top-level-rule-report.bench.ts rename to packages/core/src/benchmark/benches/lint-with-top-level-rule-report.bench.ts index 8a56b47d..83fd0061 100644 --- a/packages/core/src/benchmark/benches/validate-with-top-level-rule-report.bench.ts +++ b/packages/core/src/benchmark/benches/lint-with-top-level-rule-report.bench.ts @@ -1,6 +1,6 @@ import { readFileSync } from 'fs'; import { join as pathJoin, resolve as pathResolve } from 'path'; -import { validateDocument } from '../../validate'; +import { lintDocument } from '../../lint'; import { BaseResolver } from '../../resolve'; import { parseYamlToDocument, makeConfigForRuleset } from '../utils'; @@ -28,7 +28,7 @@ const config = makeConfigForRuleset({ }); export function measureAsync() { - return validateDocument({ + return lintDocument({ externalRefResolver: new BaseResolver(), document: rebillyDocument, config, diff --git a/packages/core/src/benchmark/benches/validate-with-top-level-rule.bench.ts b/packages/core/src/benchmark/benches/lint-with-top-level-rule.bench.ts similarity index 91% rename from packages/core/src/benchmark/benches/validate-with-top-level-rule.bench.ts rename to packages/core/src/benchmark/benches/lint-with-top-level-rule.bench.ts index a516512f..8757ebec 100644 --- a/packages/core/src/benchmark/benches/validate-with-top-level-rule.bench.ts +++ b/packages/core/src/benchmark/benches/lint-with-top-level-rule.bench.ts @@ -1,6 +1,6 @@ import { readFileSync } from 'fs'; import { join as pathJoin, resolve as pathResolve } from 'path'; -import { validateDocument } from '../../validate'; +import { lintDocument } from '../../lint'; import { BaseResolver } from '../../resolve'; import { parseYamlToDocument, makeConfigForRuleset } from '../utils'; export const name = 'Validate with single top-level rule'; @@ -24,7 +24,7 @@ const config = makeConfigForRuleset({ }); export function measureAsync() { - return validateDocument({ + return lintDocument({ externalRefResolver: new BaseResolver(), document: rebillyDocument, config, diff --git a/packages/core/src/benchmark/benches/recommended-oas3.bench.ts b/packages/core/src/benchmark/benches/recommended-oas3.bench.ts index 4f19af25..ed97504f 100644 --- a/packages/core/src/benchmark/benches/recommended-oas3.bench.ts +++ b/packages/core/src/benchmark/benches/recommended-oas3.bench.ts @@ -1,6 +1,6 @@ import { readFileSync } from 'fs'; import { join as pathJoin, resolve as pathResolve } from 'path'; -import { validateDocument } from '../../validate'; +import { lintDocument } from '../../lint'; import { LintConfig } from '../../config/config'; import { BaseResolver } from '../../resolve'; import { parseYamlToDocument } from '../utils'; @@ -14,7 +14,7 @@ const rebillyDocument = parseYamlToDocument( ); export function measureAsync() { - return validateDocument({ + return lintDocument({ externalRefResolver: new BaseResolver(), document: rebillyDocument, config: new LintConfig({}), diff --git a/packages/core/src/benchmark/utils.ts b/packages/core/src/benchmark/utils.ts index 63d957ba..1839ae92 100644 --- a/packages/core/src/benchmark/utils.ts +++ b/packages/core/src/benchmark/utils.ts @@ -1,6 +1,6 @@ import * as yaml from 'js-yaml'; import { Document, Source } from '../resolve'; -import { Oas3RuleSet } from '../validate'; +import { Oas3RuleSet } from '../lint'; import { RuleConfig, LintConfig, Plugin } from '../config/config'; export function parseYamlToDocument(body: string, absoluteRef: string = ''): Document { diff --git a/packages/core/src/bundle.ts b/packages/core/src/bundle.ts index 348349c5..d6bb961b 100644 --- a/packages/core/src/bundle.ts +++ b/packages/core/src/bundle.ts @@ -5,7 +5,7 @@ import { Oas3Types } from './types/oas3'; import { Oas2Types } from './types/oas2'; import { NormalizedNodeType, normalizeTypes, NodeType } from './types'; import { WalkContext, walkDocument, UserContext } from './walk'; -import { detectOpenAPI, openAPIMajor, OasMajorVersion } from './validate'; +import { detectOpenAPI, openAPIMajor, OasMajorVersion } from './lint'; import { Location, refBaseName } from './ref-utils'; import { Config, LintConfig } from './config/config'; import { initRules } from './config/rules'; diff --git a/packages/core/src/config/config.ts b/packages/core/src/config/config.ts index d218beef..28af007e 100644 --- a/packages/core/src/config/config.ts +++ b/packages/core/src/config/config.ts @@ -15,10 +15,10 @@ import { Oas2RuleSet, Oas2PreprocessorsSet, Oas2DecoratorsSet, -} from '../validate'; +} from '../lint'; import { ProblemSeverity, NormalizedProblem } from '../walk'; -import { Oas3RuleSet } from '../validate'; +import { Oas3RuleSet } from '../lint'; import recommended from './recommended'; import { NodeType } from '../types'; diff --git a/packages/core/src/config/rules.ts b/packages/core/src/config/rules.ts index e287a19a..66a11415 100644 --- a/packages/core/src/config/rules.ts +++ b/packages/core/src/config/rules.ts @@ -1,4 +1,4 @@ -import { RuleSet, OasVersion } from '../validate'; +import { RuleSet, OasVersion } from '../lint'; import { LintConfig } from './config'; import { notUndefined } from '../utils'; diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index 4235a252..b5361dbf 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -11,11 +11,10 @@ export { loadConfig, Config, LintConfig } from './config/config'; export { RedoclyClient } from './redocly'; export { BaseResolver, Document, resolveDocument, ResolveError, YamlParseError } from './resolve'; export { unescapePointer } from './ref-utils'; -export { detectOpenAPI, OasMajorVersion, openAPIMajor } from './validate'; +export { detectOpenAPI, OasMajorVersion, openAPIMajor } from './lint'; export { normalizeVisitors } from './visitors'; export { WalkContext, walkDocument, NormalizedProblem, ProblemSeverity, LineColLocationObject, LocationObject, Loc } from './walk'; export { formatProblems, OutputFormat } from './format/format'; - -export { OasVersion, validate, validateDocument } from './validate'; +export { OasVersion, lint, lint as validate, lintDocument } from './lint'; export { bundle } from './bundle'; diff --git a/packages/core/src/validate.ts b/packages/core/src/lint.ts similarity index 96% rename from packages/core/src/validate.ts rename to packages/core/src/lint.ts index 0fc2b3c8..3cd2ae06 100644 --- a/packages/core/src/validate.ts +++ b/packages/core/src/lint.ts @@ -33,14 +33,14 @@ export type Oas2PreprocessorsSet = Record; export type Oas3DecoratorsSet = Record; export type Oas2DecoratorsSet = Record; -export async function validate(opts: { +export async function lint(opts: { ref: string; config: Config; externalRefResolver?: BaseResolver; }) { const { ref, externalRefResolver = new BaseResolver(opts.config.resolve) } = opts; const document = (await externalRefResolver.resolveDocument(null, ref)) as Document; - return validateDocument({ + return lintDocument({ document, ...opts, externalRefResolver, @@ -48,7 +48,7 @@ export async function validate(opts: { }); } -export async function validateDocument(opts: { +export async function lintDocument(opts: { document: Document; config: LintConfig; customTypes?: Record; diff --git a/packages/core/src/rules/__tests__/no-unresolved-refs.test.ts b/packages/core/src/rules/__tests__/no-unresolved-refs.test.ts index 3d9b3d33..fd03d6d3 100644 --- a/packages/core/src/rules/__tests__/no-unresolved-refs.test.ts +++ b/packages/core/src/rules/__tests__/no-unresolved-refs.test.ts @@ -1,7 +1,7 @@ import path = require('path'); import { outdent } from 'outdent'; -import { validateDocument } from '../../validate'; +import { lintDocument } from '../../lint'; import { LintConfig } from '../..'; import { BaseResolver } from '../../resolve'; @@ -21,7 +21,7 @@ describe('oas3 boolean-parameter-prefixes', () => { path.join(__dirname, 'foobar.yaml'), ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ @@ -64,7 +64,7 @@ describe('oas3 boolean-parameter-prefixes', () => { path.join(__dirname, 'foobar.yaml'), ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ @@ -124,7 +124,7 @@ describe('oas3 boolean-parameter-prefixes', () => { path.join(__dirname, 'foobar.yaml'), ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ @@ -151,7 +151,7 @@ describe('oas3 boolean-parameter-prefixes', () => { path.join(__dirname, 'foobar.yaml'), ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ diff --git a/packages/core/src/rules/common/__tests__/info-description.test.ts b/packages/core/src/rules/common/__tests__/info-description.test.ts index 8fb6a481..4ebb185e 100644 --- a/packages/core/src/rules/common/__tests__/info-description.test.ts +++ b/packages/core/src/rules/common/__tests__/info-description.test.ts @@ -1,6 +1,5 @@ import { outdent } from 'outdent'; - -import { validateDocument } from '../../../validate'; +import { lintDocument } from '../../../lint'; import { parseYamlToDocument, replaceSourceWithRef } from '../../../../__tests__/utils'; import { LintConfig } from '../../../config/config'; import { BaseResolver } from '../../../resolve'; @@ -16,7 +15,7 @@ describe('Oas3 info-description', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ @@ -57,7 +56,7 @@ describe('Oas3 info-description', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ @@ -97,7 +96,7 @@ describe('Oas3 info-description', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ diff --git a/packages/core/src/rules/common/__tests__/info-license.test.ts b/packages/core/src/rules/common/__tests__/info-license.test.ts index b1f6aa11..d585dca0 100644 --- a/packages/core/src/rules/common/__tests__/info-license.test.ts +++ b/packages/core/src/rules/common/__tests__/info-license.test.ts @@ -1,8 +1,6 @@ import { outdent } from 'outdent'; - import { LintConfig } from '../../../config/config'; - -import { validateDocument } from '../../../validate'; +import { lintDocument } from '../../../lint'; import { parseYamlToDocument, replaceSourceWithRef } from '../../../../__tests__/utils'; import { BaseResolver } from '../../../resolve'; @@ -17,7 +15,7 @@ describe('Oas3 info-license', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ extends: [], rules: { 'info-license': 'error' } }), @@ -54,7 +52,7 @@ describe('Oas3 info-license', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ extends: [], rules: { 'info-license': 'error' } }), diff --git a/packages/core/src/rules/common/__tests__/license-url.test.ts b/packages/core/src/rules/common/__tests__/license-url.test.ts index a5ba341b..1a05ea8b 100644 --- a/packages/core/src/rules/common/__tests__/license-url.test.ts +++ b/packages/core/src/rules/common/__tests__/license-url.test.ts @@ -1,8 +1,6 @@ import { outdent } from 'outdent'; - import { LintConfig } from '../../../config/config'; - -import { validateDocument } from '../../../validate'; +import { lintDocument } from '../../../lint'; import { parseYamlToDocument, replaceSourceWithRef } from '../../../../__tests__/utils'; import { BaseResolver } from '../../../resolve'; @@ -18,7 +16,7 @@ describe('Oas3 license-url', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ extends: [], rules: { 'info-license-url': 'error' } }), @@ -55,7 +53,7 @@ describe('Oas3 license-url', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ extends: [], rules: { 'info-license-url': 'error' } }), diff --git a/packages/core/src/rules/common/__tests__/no-ambiguous-paths.test.ts b/packages/core/src/rules/common/__tests__/no-ambiguous-paths.test.ts index 773135dc..e060beb3 100644 --- a/packages/core/src/rules/common/__tests__/no-ambiguous-paths.test.ts +++ b/packages/core/src/rules/common/__tests__/no-ambiguous-paths.test.ts @@ -1,8 +1,6 @@ import { outdent } from 'outdent'; - import { LintConfig } from '../../../config/config'; - -import { validateDocument } from '../../../validate'; +import { lintDocument } from '../../../lint'; import { parseYamlToDocument, replaceSourceWithRef } from '../../../../__tests__/utils'; import { BaseResolver } from '../../../resolve'; @@ -46,7 +44,7 @@ describe('no-ambiguous-paths', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ extends: [], rules: { 'no-ambiguous-paths': 'error' } }), diff --git a/packages/core/src/rules/common/__tests__/no-enum-type-mismatch.test.ts b/packages/core/src/rules/common/__tests__/no-enum-type-mismatch.test.ts index 14ed9498..fc540b6f 100644 --- a/packages/core/src/rules/common/__tests__/no-enum-type-mismatch.test.ts +++ b/packages/core/src/rules/common/__tests__/no-enum-type-mismatch.test.ts @@ -1,8 +1,6 @@ import { outdent } from 'outdent'; - import { LintConfig } from '../../../config/config'; - -import { validateDocument } from '../../../validate'; +import { lintDocument } from '../../../lint'; import { parseYamlToDocument, replaceSourceWithRef } from '../../../../__tests__/utils'; import { BaseResolver } from '../../../resolve'; @@ -29,7 +27,7 @@ describe('Oas3 typed enum', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ extends: [], rules: { 'no-enum-type-mismatch': 'error' } }), @@ -59,7 +57,7 @@ describe('Oas3 typed enum', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ extends: [], rules: { 'no-enum-type-mismatch': 'error' } }), diff --git a/packages/core/src/rules/common/__tests__/no-identical-paths.test.ts b/packages/core/src/rules/common/__tests__/no-identical-paths.test.ts index 869cce1e..677473f5 100644 --- a/packages/core/src/rules/common/__tests__/no-identical-paths.test.ts +++ b/packages/core/src/rules/common/__tests__/no-identical-paths.test.ts @@ -1,8 +1,6 @@ import { outdent } from 'outdent'; - import { LintConfig } from '../../../config/config'; - -import { validateDocument } from '../../../validate'; +import { lintDocument } from '../../../lint'; import { parseYamlToDocument, replaceSourceWithRef } from '../../../../__tests__/utils'; import { BaseResolver } from '../../../resolve'; @@ -34,7 +32,7 @@ describe('no-identical-paths', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ extends: [], rules: { 'no-identical-paths': 'error' } }), diff --git a/packages/core/src/rules/common/__tests__/no-path-trailing-slash.test.ts b/packages/core/src/rules/common/__tests__/no-path-trailing-slash.test.ts index 7f75e4cb..fbcc252c 100644 --- a/packages/core/src/rules/common/__tests__/no-path-trailing-slash.test.ts +++ b/packages/core/src/rules/common/__tests__/no-path-trailing-slash.test.ts @@ -1,8 +1,6 @@ import { outdent } from 'outdent'; - import { LintConfig } from '../../../config/config'; - -import { validateDocument } from '../../../validate'; +import { lintDocument } from '../../../lint'; import { parseYamlToDocument, replaceSourceWithRef } from '../../../../__tests__/utils'; import { BaseResolver } from '../../../resolve'; @@ -19,7 +17,7 @@ describe('no-path-trailing-slash', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ extends: [], rules: { 'no-path-trailing-slash': 'error' } }), @@ -56,7 +54,7 @@ describe('no-path-trailing-slash', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ extends: [], rules: { 'no-path-trailing-slash': 'error' } }), @@ -77,7 +75,7 @@ describe('no-path-trailing-slash', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ extends: [], rules: { 'no-path-trailing-slash': 'error' } }), diff --git a/packages/core/src/rules/common/__tests__/operation-2xx-response.test.ts b/packages/core/src/rules/common/__tests__/operation-2xx-response.test.ts index 87bd9bde..aae6fb16 100644 --- a/packages/core/src/rules/common/__tests__/operation-2xx-response.test.ts +++ b/packages/core/src/rules/common/__tests__/operation-2xx-response.test.ts @@ -1,8 +1,6 @@ import { outdent } from 'outdent'; - import { LintConfig } from '../../../config/config'; - -import { validateDocument } from '../../../validate'; +import { lintDocument } from '../../../lint'; import { parseYamlToDocument, replaceSourceWithRef } from '../../../../__tests__/utils'; import { BaseResolver } from '../../../resolve'; @@ -21,7 +19,7 @@ describe('Oas3 operation-2xx-response', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ extends: [], rules: { 'operation-2xx-response': 'error' } }), @@ -60,7 +58,7 @@ describe('Oas3 operation-2xx-response', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ extends: [], rules: { 'operation-2xx-response': 'error' } }), @@ -83,7 +81,7 @@ describe('Oas3 operation-2xx-response', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ extends: [], rules: { 'operation-2xx-response': 'error' } }), diff --git a/packages/core/src/rules/common/__tests__/operation-operationId-unique.test.ts b/packages/core/src/rules/common/__tests__/operation-operationId-unique.test.ts index 0decff52..d5dc33b9 100644 --- a/packages/core/src/rules/common/__tests__/operation-operationId-unique.test.ts +++ b/packages/core/src/rules/common/__tests__/operation-operationId-unique.test.ts @@ -1,8 +1,6 @@ import { outdent } from 'outdent'; - import { LintConfig } from '../../../config/config'; - -import { validateDocument } from '../../../validate'; +import { lintDocument } from '../../../lint'; import { parseYamlToDocument, replaceSourceWithRef } from '../../../../__tests__/utils'; import { BaseResolver } from '../../../resolve'; @@ -26,7 +24,7 @@ describe('Oas3 operation-operationId-unique', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ extends: [], rules: { 'operation-operationId-unique': 'error' } }), @@ -68,7 +66,7 @@ describe('Oas3 operation-operationId-unique', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ extends: [], rules: { 'peration-operationId-unique': 'error' } }), diff --git a/packages/core/src/rules/common/__tests__/operation-operationId-url-safe.test.ts b/packages/core/src/rules/common/__tests__/operation-operationId-url-safe.test.ts index 420ac184..132360e5 100644 --- a/packages/core/src/rules/common/__tests__/operation-operationId-url-safe.test.ts +++ b/packages/core/src/rules/common/__tests__/operation-operationId-url-safe.test.ts @@ -1,8 +1,6 @@ import { outdent } from 'outdent'; - import { LintConfig } from '../../../config/config'; - -import { validateDocument } from '../../../validate'; +import { lintDocument } from '../../../lint'; import { parseYamlToDocument, replaceSourceWithRef } from '../../../../__tests__/utils'; import { BaseResolver } from '../../../resolve'; @@ -21,7 +19,7 @@ describe('Oas3 operation-operationId-url-safe', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ diff --git a/packages/core/src/rules/common/__tests__/operation-parameters-unique.test.ts b/packages/core/src/rules/common/__tests__/operation-parameters-unique.test.ts index dc4ba0a6..292e9694 100644 --- a/packages/core/src/rules/common/__tests__/operation-parameters-unique.test.ts +++ b/packages/core/src/rules/common/__tests__/operation-parameters-unique.test.ts @@ -1,8 +1,6 @@ import { outdent } from 'outdent'; - import { LintConfig } from '../../../config/config'; - -import { validateDocument } from '../../../validate'; +import { lintDocument } from '../../../lint'; import { parseYamlToDocument, replaceSourceWithRef } from '../../../../__tests__/utils'; import { BaseResolver } from '../../../resolve'; @@ -22,7 +20,7 @@ describe('Oas3 operation-parameters-unique', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ @@ -68,7 +66,7 @@ describe('Oas3 operation-parameters-unique', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ @@ -101,7 +99,7 @@ describe('Oas3 operation-parameters-unique', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ @@ -152,7 +150,7 @@ describe('Oas3 operation-parameters-unique', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ diff --git a/packages/core/src/rules/common/__tests__/operation-security-defined.test.ts b/packages/core/src/rules/common/__tests__/operation-security-defined.test.ts index e9d125c9..473ebf13 100644 --- a/packages/core/src/rules/common/__tests__/operation-security-defined.test.ts +++ b/packages/core/src/rules/common/__tests__/operation-security-defined.test.ts @@ -1,8 +1,6 @@ import { outdent } from 'outdent'; - import { LintConfig } from '../../../config/config'; - -import { validateDocument } from '../../../validate'; +import { lintDocument } from '../../../lint'; import { parseYamlToDocument, replaceSourceWithRef } from '../../../../__tests__/utils'; import { BaseResolver } from '../../../resolve'; @@ -19,7 +17,7 @@ describe('Oas3 operation-security-defined', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ extends: [], rules: { 'operation-security-defined': 'error' } }), @@ -61,7 +59,7 @@ describe('Oas3 operation-security-defined', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ extends: [], rules: { 'operation-security-defined': 'error' } }), diff --git a/packages/core/src/rules/common/__tests__/operation-singular-tag.test.ts b/packages/core/src/rules/common/__tests__/operation-singular-tag.test.ts index 6a1aec1b..3364b8b3 100644 --- a/packages/core/src/rules/common/__tests__/operation-singular-tag.test.ts +++ b/packages/core/src/rules/common/__tests__/operation-singular-tag.test.ts @@ -1,8 +1,6 @@ import { outdent } from 'outdent'; - import { LintConfig } from '../../../config/config'; - -import { validateDocument } from '../../../validate'; +import { lintDocument } from '../../../lint'; import { parseYamlToDocument, replaceSourceWithRef } from '../../../../__tests__/utils'; import { BaseResolver } from '../../../resolve'; @@ -24,7 +22,7 @@ describe('Oas3 operation-singular-tag', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ extends: [], rules: { 'operation-singular-tag': 'error' } }), @@ -64,7 +62,7 @@ describe('Oas3 operation-singular-tag', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ extends: [], rules: { 'operation-singular-tag': 'error' } }), diff --git a/packages/core/src/rules/common/__tests__/path-http-verbs-order.test.ts b/packages/core/src/rules/common/__tests__/path-http-verbs-order.test.ts index f1f8dd98..6bda2e4f 100644 --- a/packages/core/src/rules/common/__tests__/path-http-verbs-order.test.ts +++ b/packages/core/src/rules/common/__tests__/path-http-verbs-order.test.ts @@ -1,8 +1,6 @@ import { outdent } from 'outdent'; - import { LintConfig } from '../../../config/config'; - -import { validateDocument } from '../../../validate'; +import { lintDocument } from '../../../lint'; import { parseYamlToDocument, replaceSourceWithRef } from '../../../../__tests__/utils'; import { BaseResolver } from '../../../resolve'; @@ -23,7 +21,7 @@ describe('Common path-http-verbs-order', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ extends: [], rules: { 'path-http-verbs-order': 'error' } }), @@ -87,7 +85,7 @@ describe('Common path-http-verbs-order', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ extends: [], rules: { 'path-http-verbs-order': 'error' } }), diff --git a/packages/core/src/rules/common/__tests__/path-not-include-query.test.ts b/packages/core/src/rules/common/__tests__/path-not-include-query.test.ts index 84e2a128..0964491d 100644 --- a/packages/core/src/rules/common/__tests__/path-not-include-query.test.ts +++ b/packages/core/src/rules/common/__tests__/path-not-include-query.test.ts @@ -1,8 +1,6 @@ import { outdent } from 'outdent'; - import { LintConfig } from '../../../config/config'; - -import { validateDocument } from '../../../validate'; +import { lintDocument } from '../../../lint'; import { parseYamlToDocument, replaceSourceWithRef } from '../../../../__tests__/utils'; import { BaseResolver } from '../../../resolve'; @@ -19,7 +17,7 @@ describe('Oas3 path-not-include-query', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ extends: [], rules: { 'path-not-include-query': 'error' } }), @@ -56,7 +54,7 @@ describe('Oas3 path-not-include-query', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ extends: [], rules: { 'path-not-include-query': 'error' } }), diff --git a/packages/core/src/rules/common/__tests__/path-params-defined.test.ts b/packages/core/src/rules/common/__tests__/path-params-defined.test.ts index b9c3312b..f174e8fc 100644 --- a/packages/core/src/rules/common/__tests__/path-params-defined.test.ts +++ b/packages/core/src/rules/common/__tests__/path-params-defined.test.ts @@ -1,8 +1,6 @@ import { outdent } from 'outdent'; - import { LintConfig } from '../../../config/config'; - -import { validateDocument } from '../../../validate'; +import { lintDocument } from '../../../lint'; import { parseYamlToDocument, replaceSourceWithRef } from '../../../../__tests__/utils'; import { BaseResolver } from '../../../resolve'; @@ -24,7 +22,7 @@ describe('Oas3 path-params-defined', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ extends: [], rules: { 'path-params-defined': 'error' } }), @@ -52,7 +50,7 @@ describe('Oas3 path-params-defined', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ extends: [], rules: { 'path-params-defined': 'error' } }), @@ -96,7 +94,7 @@ describe('Oas3 path-params-defined', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ extends: [], rules: { 'path-params-defined': 'error' } }), diff --git a/packages/core/src/rules/common/__tests__/paths-kebab-case.test.ts b/packages/core/src/rules/common/__tests__/paths-kebab-case.test.ts index b1ca73b6..fa52e6fe 100644 --- a/packages/core/src/rules/common/__tests__/paths-kebab-case.test.ts +++ b/packages/core/src/rules/common/__tests__/paths-kebab-case.test.ts @@ -1,8 +1,6 @@ import { outdent } from 'outdent'; - import { LintConfig } from '../../../config/config'; - -import { validateDocument } from '../../../validate'; +import { lintDocument } from '../../../lint'; import { parseYamlToDocument, replaceSourceWithRef } from '../../../../__tests__/utils'; import { BaseResolver } from '../../../resolve'; @@ -22,7 +20,7 @@ describe('Oas3 paths-kebab-case', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ extends: [], rules: { 'paths-kebab-case': 'error' } }), diff --git a/packages/core/src/rules/common/__tests__/tag-description.test.ts b/packages/core/src/rules/common/__tests__/tag-description.test.ts index db247697..d8137951 100644 --- a/packages/core/src/rules/common/__tests__/tag-description.test.ts +++ b/packages/core/src/rules/common/__tests__/tag-description.test.ts @@ -1,8 +1,6 @@ import { outdent } from 'outdent'; - import { LintConfig } from '../../../config/config'; - -import { validateDocument } from '../../../validate'; +import { lintDocument } from '../../../lint'; import { parseYamlToDocument, replaceSourceWithRef } from '../../../../__tests__/utils'; import { BaseResolver } from '../../../resolve'; @@ -19,7 +17,7 @@ describe('Oas3 tag-description', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ extends: [], rules: { 'tag-description': 'error' } }), @@ -57,7 +55,7 @@ describe('Oas3 tag-description', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ extends: [], rules: { 'tag-description': 'error' } }), diff --git a/packages/core/src/rules/common/__tests__/tags-alphabetical.test.ts b/packages/core/src/rules/common/__tests__/tags-alphabetical.test.ts index 4dabf527..77c97db0 100644 --- a/packages/core/src/rules/common/__tests__/tags-alphabetical.test.ts +++ b/packages/core/src/rules/common/__tests__/tags-alphabetical.test.ts @@ -1,8 +1,6 @@ import { outdent } from 'outdent'; - import { LintConfig } from '../../../config/config'; - -import { validateDocument } from '../../../validate'; +import { lintDocument } from '../../../lint'; import { parseYamlToDocument, replaceSourceWithRef } from '../../../../__tests__/utils'; import { BaseResolver } from '../../../resolve'; @@ -19,7 +17,7 @@ describe('Oas3 tags-alphabetical', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ extends: [], rules: { 'tags-alphabetical': 'error' } }), @@ -56,7 +54,7 @@ describe('Oas3 tags-alphabetical', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ extends: [], rules: { 'tags-alphabetical': 'error' } }), diff --git a/packages/core/src/rules/oas2/__tests__/boolean-parameter-prefixes.test.ts b/packages/core/src/rules/oas2/__tests__/boolean-parameter-prefixes.test.ts index ff569832..effe6244 100644 --- a/packages/core/src/rules/oas2/__tests__/boolean-parameter-prefixes.test.ts +++ b/packages/core/src/rules/oas2/__tests__/boolean-parameter-prefixes.test.ts @@ -1,7 +1,6 @@ import { outdent } from 'outdent'; - import { parseYamlToDocument, replaceSourceWithRef } from '../../../../__tests__/utils'; -import { validateDocument } from '../../../validate'; +import { lintDocument } from '../../../lint'; import { LintConfig } from '../../..'; import { BaseResolver } from '../../../resolve'; @@ -20,7 +19,7 @@ describe('oas2 boolean-parameter-prefixes', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ extends: [], rules: { 'boolean-parameter-prefixes': 'error' } }), @@ -72,7 +71,7 @@ describe('oas2 boolean-parameter-prefixes', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ extends: [], rules: { 'boolean-parameter-prefixes': 'error' } }), @@ -96,7 +95,7 @@ describe('oas2 boolean-parameter-prefixes', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ diff --git a/packages/core/src/rules/oas2/__tests__/spec/info.test.ts b/packages/core/src/rules/oas2/__tests__/spec/info.test.ts index b3f3ef25..63c2de76 100644 --- a/packages/core/src/rules/oas2/__tests__/spec/info.test.ts +++ b/packages/core/src/rules/oas2/__tests__/spec/info.test.ts @@ -1,5 +1,5 @@ import { outdent } from 'outdent'; -import { validateDoc } from './utils'; +import { lintDoc } from './utils'; describe('OpenAPI Schema 2.0', () => { it('should report if the title of the API is empty ', async () => { @@ -18,7 +18,7 @@ describe('OpenAPI Schema 2.0', () => { `; expect( - await validateDoc(source, { + await lintDoc(source, { spec: 'error', }), ).toMatchInlineSnapshot(` @@ -48,7 +48,7 @@ describe('OpenAPI Schema 2.0', () => { `; expect( - await validateDoc(source, { + await lintDoc(source, { spec: 'error', }), ).toMatchInlineSnapshot(` @@ -78,7 +78,7 @@ describe('OpenAPI Schema 2.0', () => { `; expect( - await validateDoc(source, { + await lintDoc(source, { spec: 'error', }), ).toMatchInlineSnapshot(` @@ -112,7 +112,7 @@ describe('OpenAPI Schema 2.0', () => { `; expect( - await validateDoc(source, { + await lintDoc(source, { spec: 'error', }), ).toMatchInlineSnapshot(`Array []`); @@ -138,7 +138,7 @@ describe('OpenAPI Schema 2.0', () => { `; expect( - await validateDoc(source, { + await lintDoc(source, { spec: 'error', }), ).toMatchInlineSnapshot(` @@ -171,7 +171,7 @@ describe('OpenAPI Schema 2.0', () => { `; expect( - await validateDoc(source, { + await lintDoc(source, { spec: 'error', }), ).toMatchInlineSnapshot(` @@ -203,7 +203,7 @@ describe('OpenAPI Schema 2.0', () => { `; expect( - await validateDoc(source, { + await lintDoc(source, { spec: 'error', }), ).toMatchInlineSnapshot(`Array []`); @@ -227,7 +227,7 @@ describe('OpenAPI Schema 2.0', () => { `; expect( - await validateDoc(source, { + await lintDoc(source, { spec: 'error', }), ).toMatchInlineSnapshot(` @@ -259,7 +259,7 @@ describe('OpenAPI Schema 2.0', () => { `; expect( - await validateDoc(source, { + await lintDoc(source, { spec: 'error', }), ).toMatchInlineSnapshot(` @@ -290,7 +290,7 @@ describe('OpenAPI Schema 2.0', () => { `; expect( - await validateDoc(source, { + await lintDoc(source, { spec: 'error', }), ).toMatchInlineSnapshot(`Array []`); @@ -311,7 +311,7 @@ describe('OpenAPI Schema 2.0', () => { `; expect( - await validateDoc(source, { + await lintDoc(source, { spec: 'error', }), ).toMatchInlineSnapshot(` @@ -340,7 +340,7 @@ describe('OpenAPI Schema 2.0', () => { `; expect( - await validateDoc(source, { + await lintDoc(source, { spec: 'error', }), ).toMatchInlineSnapshot(` diff --git a/packages/core/src/rules/oas2/__tests__/spec/operation.test.ts b/packages/core/src/rules/oas2/__tests__/spec/operation.test.ts index cb4a1e92..cdd2aa41 100644 --- a/packages/core/src/rules/oas2/__tests__/spec/operation.test.ts +++ b/packages/core/src/rules/oas2/__tests__/spec/operation.test.ts @@ -1,5 +1,5 @@ import { outdent } from 'outdent'; -import { validateDoc } from './utils'; +import { lintDoc } from './utils'; describe('OpenAPI Schema 2.0', () => { it('should not report of a valid GET operation object', async () => { @@ -18,7 +18,7 @@ describe('OpenAPI Schema 2.0', () => { `; expect( - await validateDoc(source, { + await lintDoc(source, { spec: 'error', }), ).toMatchInlineSnapshot(`Array []`); @@ -45,7 +45,7 @@ describe('OpenAPI Schema 2.0', () => { `; expect( - await validateDoc(source, { + await lintDoc(source, { spec: 'error', }), ).toMatchInlineSnapshot(`Array []`); @@ -79,7 +79,7 @@ describe('OpenAPI Schema 2.0', () => { `; expect( - await validateDoc(source, { + await lintDoc(source, { spec: 'error', }), ).toMatchInlineSnapshot(`Array []`); @@ -115,7 +115,7 @@ describe('OpenAPI Schema 2.0', () => { `; expect( - await validateDoc(source, { + await lintDoc(source, { spec: 'error', }), ).toMatchInlineSnapshot(`Array []`); diff --git a/packages/core/src/rules/oas2/__tests__/spec/paths.test.ts b/packages/core/src/rules/oas2/__tests__/spec/paths.test.ts index 0ead75bf..1e8f8f98 100644 --- a/packages/core/src/rules/oas2/__tests__/spec/paths.test.ts +++ b/packages/core/src/rules/oas2/__tests__/spec/paths.test.ts @@ -1,5 +1,5 @@ import { outdent } from 'outdent'; -import { validateDoc } from './utils'; +import { lintDoc } from './utils'; describe('OpenAPI Schema', () => { it('should not report if Path object is valid ', async () => { @@ -18,7 +18,7 @@ describe('OpenAPI Schema', () => { `; expect( - await validateDoc(source, { + await lintDoc(source, { spec: 'error', }), ).toMatchInlineSnapshot(`Array []`); @@ -35,7 +35,7 @@ describe('OpenAPI Schema', () => { `; expect( - await validateDoc(source, { + await lintDoc(source, { spec: 'error', }), ).toMatchInlineSnapshot(`Array []`); @@ -50,7 +50,7 @@ describe('OpenAPI Schema', () => { `; expect( - await validateDoc(source, { + await lintDoc(source, { spec: 'error', }), ).toMatchInlineSnapshot(` @@ -74,7 +74,7 @@ describe('OpenAPI Schema', () => { `; expect( - await validateDoc(source, { + await lintDoc(source, { spec: 'error', }), ).toMatchInlineSnapshot(`Array []`); @@ -97,7 +97,7 @@ describe('OpenAPI Schema', () => { `; expect( - await validateDoc(source, { + await lintDoc(source, { spec: 'error', }), ).toMatchInlineSnapshot(` @@ -131,7 +131,7 @@ describe('OpenAPI Schema', () => { `; expect( - await validateDoc(source, { + await lintDoc(source, { 'paths-identical': 'error', }), ).toMatchInlineSnapshot(`Array []`); @@ -158,7 +158,7 @@ describe('OpenAPI Schema', () => { `; expect( - await validateDoc(source, { + await lintDoc(source, { spec: 'error', }), ).toMatchInlineSnapshot(`Array []`); @@ -185,7 +185,7 @@ describe('OpenAPI Schema', () => { `; expect( - await validateDoc(source, { + await lintDoc(source, { spec: 'error', }), ).toMatchInlineSnapshot(`Array []`); @@ -203,7 +203,7 @@ describe('OpenAPI Schema', () => { `; expect( - await validateDoc(source, { + await lintDoc(source, { spec: 'error', }), ).toMatchInlineSnapshot(`Array []`); @@ -237,7 +237,7 @@ describe('OpenAPI Schema', () => { `; expect( - await validateDoc(source, { + await lintDoc(source, { spec: 'error', }), ).toMatchInlineSnapshot(`Array []`); diff --git a/packages/core/src/rules/oas2/__tests__/spec/referenceableScalars.test.ts b/packages/core/src/rules/oas2/__tests__/spec/referenceableScalars.test.ts index 6ef239c4..9bc5f8c5 100644 --- a/packages/core/src/rules/oas2/__tests__/spec/referenceableScalars.test.ts +++ b/packages/core/src/rules/oas2/__tests__/spec/referenceableScalars.test.ts @@ -1,8 +1,6 @@ import { outdent } from 'outdent'; - import { parseYamlToDocument, replaceSourceWithRef } from '../../../../../__tests__/utils'; - -import { validateDocument } from '../../../../validate'; +import { lintDocument } from '../../../../lint'; import { LintConfig } from '../../../..'; import { BaseResolver } from '../../../../resolve'; @@ -21,7 +19,7 @@ describe('Referenceable scalars', () => { __dirname + '/foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ diff --git a/packages/core/src/rules/oas2/__tests__/spec/utils.ts b/packages/core/src/rules/oas2/__tests__/spec/utils.ts index c247801c..cbcfd970 100644 --- a/packages/core/src/rules/oas2/__tests__/spec/utils.ts +++ b/packages/core/src/rules/oas2/__tests__/spec/utils.ts @@ -1,15 +1,15 @@ import { LintConfig, RuleConfig } from '../../../../config/config'; import { parseYamlToDocument } from '../../../../../__tests__/utils'; -import { validateDocument } from '../../../../validate'; +import { lintDocument } from '../../../../lint'; import { BaseResolver } from '../../../../resolve'; -export async function validateDoc( +export async function lintDoc( source: string, rules: Record = { spec: 'error' }, ) { const document = parseYamlToDocument(source, 'foobar.yaml'); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ diff --git a/packages/core/src/rules/oas3/__tests__/boolean-parameter-prefixes.test.ts b/packages/core/src/rules/oas3/__tests__/boolean-parameter-prefixes.test.ts index e1d61529..85f1917e 100644 --- a/packages/core/src/rules/oas3/__tests__/boolean-parameter-prefixes.test.ts +++ b/packages/core/src/rules/oas3/__tests__/boolean-parameter-prefixes.test.ts @@ -1,7 +1,6 @@ import { outdent } from 'outdent'; - import { parseYamlToDocument, replaceSourceWithRef } from '../../../../__tests__/utils'; -import { validateDocument } from '../../../validate'; +import { lintDocument } from '../../../lint'; import { LintConfig } from '../../..'; import { BaseResolver } from '../../../resolve'; @@ -21,7 +20,7 @@ describe('oas3 boolean-parameter-prefixes', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ extends: [], rules: { 'boolean-parameter-prefixes': 'error' } }), @@ -73,7 +72,7 @@ describe('oas3 boolean-parameter-prefixes', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ extends: [], rules: { 'boolean-parameter-prefixes': 'error' } }), @@ -97,7 +96,7 @@ describe('oas3 boolean-parameter-prefixes', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ diff --git a/packages/core/src/rules/oas3/__tests__/no-example-value-and-externalValue.test.ts b/packages/core/src/rules/oas3/__tests__/no-example-value-and-externalValue.test.ts index 37b15786..0334dbd3 100644 --- a/packages/core/src/rules/oas3/__tests__/no-example-value-and-externalValue.test.ts +++ b/packages/core/src/rules/oas3/__tests__/no-example-value-and-externalValue.test.ts @@ -1,8 +1,6 @@ import { outdent } from 'outdent'; - import { LintConfig } from '../../../config/config'; - -import { validateDocument } from '../../../validate'; +import { lintDocument } from '../../../lint'; import { parseYamlToDocument, replaceSourceWithRef } from '../../../../__tests__/utils'; import { BaseResolver } from '../../../resolve'; @@ -20,7 +18,7 @@ describe('Oas3 oas3-no-example-value-and-externalValue', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ @@ -60,7 +58,7 @@ describe('Oas3 oas3-no-example-value-and-externalValue', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ diff --git a/packages/core/src/rules/oas3/__tests__/no-invalid-media-type-examples.test.ts b/packages/core/src/rules/oas3/__tests__/no-invalid-media-type-examples.test.ts index bac5bb07..3ec11cc1 100644 --- a/packages/core/src/rules/oas3/__tests__/no-invalid-media-type-examples.test.ts +++ b/packages/core/src/rules/oas3/__tests__/no-invalid-media-type-examples.test.ts @@ -1,8 +1,6 @@ import { outdent } from 'outdent'; - import { LintConfig } from '../../../config/config'; - -import { validateDocument } from '../../../validate'; +import { lintDocument } from '../../../lint'; import { parseYamlToDocument, replaceSourceWithRef } from '../../../../__tests__/utils'; import { BaseResolver } from '../../../resolve'; @@ -33,7 +31,7 @@ describe('no-invalid-media-type-examples', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ extends: [], rules: { 'no-invalid-media-type-examples': 'error' } }), @@ -106,7 +104,7 @@ describe('no-invalid-media-type-examples', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ @@ -169,7 +167,7 @@ describe('no-invalid-media-type-examples', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ @@ -222,7 +220,7 @@ describe('no-invalid-media-type-examples', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ @@ -278,7 +276,7 @@ describe('no-invalid-media-type-examples', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ extends: [], rules: { 'no-invalid-media-type-examples': 'error' } }), @@ -310,7 +308,7 @@ describe('no-invalid-media-type-examples', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ extends: [], rules: { 'no-invalid-media-type-examples': 'error' } }), diff --git a/packages/core/src/rules/oas3/__tests__/no-server-example.com.test.ts b/packages/core/src/rules/oas3/__tests__/no-server-example.com.test.ts index 44c8c76b..38e31d69 100644 --- a/packages/core/src/rules/oas3/__tests__/no-server-example.com.test.ts +++ b/packages/core/src/rules/oas3/__tests__/no-server-example.com.test.ts @@ -1,8 +1,6 @@ import { outdent } from 'outdent'; - import { LintConfig } from '../../../config/config'; - -import { validateDocument } from '../../../validate'; +import { lintDocument } from '../../../lint'; import { parseYamlToDocument, replaceSourceWithRef } from '../../../../__tests__/utils'; import { BaseResolver } from '../../../resolve'; @@ -17,7 +15,7 @@ describe('Oas3 oas3-no-server-example.com', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ extends: [], rules: { 'no-server-example.com': 'error' } }), @@ -52,7 +50,7 @@ describe('Oas3 oas3-no-server-example.com', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ extends: [], rules: { 'no-server-example.com': 'error' } }), diff --git a/packages/core/src/rules/oas3/__tests__/no-server-trailing-slash.test.ts b/packages/core/src/rules/oas3/__tests__/no-server-trailing-slash.test.ts index 4b8bbb3b..88a82489 100644 --- a/packages/core/src/rules/oas3/__tests__/no-server-trailing-slash.test.ts +++ b/packages/core/src/rules/oas3/__tests__/no-server-trailing-slash.test.ts @@ -1,8 +1,6 @@ import { outdent } from 'outdent'; - import { LintConfig } from '../../../config/config'; - -import { validateDocument } from '../../../validate'; +import { lintDocument } from '../../../lint'; import { parseYamlToDocument, replaceSourceWithRef } from '../../../../__tests__/utils'; import { BaseResolver } from '../../../resolve'; @@ -17,7 +15,7 @@ describe('Oas3 oas3-no-server-trailing-slash', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ extends: [], rules: { 'no-server-trailing-slash': 'error' } }), @@ -52,7 +50,7 @@ describe('Oas3 oas3-no-server-trailing-slash', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ extends: [], rules: { 'no-server-trailing-slash': 'error' } }), diff --git a/packages/core/src/rules/oas3/__tests__/no-unused-components.test.ts b/packages/core/src/rules/oas3/__tests__/no-unused-components.test.ts index 2d967809..9a72de10 100644 --- a/packages/core/src/rules/oas3/__tests__/no-unused-components.test.ts +++ b/packages/core/src/rules/oas3/__tests__/no-unused-components.test.ts @@ -1,8 +1,6 @@ import { outdent } from 'outdent'; - import { LintConfig } from '../../../config/config'; - -import { validateDocument } from '../../../validate'; +import { lintDocument } from '../../../lint'; import { parseYamlToDocument, replaceSourceWithRef } from '../../../../__tests__/utils'; import { BaseResolver } from '../../../resolve'; @@ -42,7 +40,7 @@ describe('Oas3 no-unused-components', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ extends: [], rules: { 'no-unused-components': 'error' } }), diff --git a/packages/core/src/rules/oas3/__tests__/spec/referenceableScalars.test.ts b/packages/core/src/rules/oas3/__tests__/spec/referenceableScalars.test.ts index 0af0fd5d..bfad707f 100644 --- a/packages/core/src/rules/oas3/__tests__/spec/referenceableScalars.test.ts +++ b/packages/core/src/rules/oas3/__tests__/spec/referenceableScalars.test.ts @@ -1,8 +1,6 @@ import { outdent } from 'outdent'; - import { parseYamlToDocument, replaceSourceWithRef } from '../../../../../__tests__/utils'; - -import { validateDocument } from '../../../../validate'; +import { lintDocument } from '../../../../lint'; import { LintConfig } from '../../../..'; import { BaseResolver } from '../../../../resolve'; @@ -21,7 +19,7 @@ describe('Referenceable scalars', () => { __dirname + '/foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ diff --git a/packages/core/src/rules/oas3/__tests__/spec/spec.test.ts b/packages/core/src/rules/oas3/__tests__/spec/spec.test.ts index 6503366c..bb012da0 100644 --- a/packages/core/src/rules/oas3/__tests__/spec/spec.test.ts +++ b/packages/core/src/rules/oas3/__tests__/spec/spec.test.ts @@ -1,6 +1,5 @@ import { outdent } from 'outdent'; - -import { validateDocument } from '../../../../validate'; +import { lintDocument } from '../../../../lint'; import { parseYamlToDocument, replaceSourceWithRef } from '../../../../../__tests__/utils'; import { LintConfig } from '../../../../config/config'; import { BaseResolver } from '../../../../resolve'; @@ -37,7 +36,7 @@ describe('Oas3 Structural visitor basic', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: allConfig, @@ -165,7 +164,7 @@ describe('Oas3 Structural visitor basic', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: allConfig, @@ -234,7 +233,7 @@ describe('Oas3 Structural visitor basic', () => { 'foobar.yaml', ); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: allConfig, diff --git a/packages/core/src/rules/oas3/__tests__/spec/utils.ts b/packages/core/src/rules/oas3/__tests__/spec/utils.ts index c247801c..58002ee3 100644 --- a/packages/core/src/rules/oas3/__tests__/spec/utils.ts +++ b/packages/core/src/rules/oas3/__tests__/spec/utils.ts @@ -1,6 +1,6 @@ import { LintConfig, RuleConfig } from '../../../../config/config'; import { parseYamlToDocument } from '../../../../../__tests__/utils'; -import { validateDocument } from '../../../../validate'; +import { lintDocument } from '../../../../lint'; import { BaseResolver } from '../../../../resolve'; export async function validateDoc( @@ -9,7 +9,7 @@ export async function validateDoc( ) { const document = parseYamlToDocument(source, 'foobar.yaml'); - const results = await validateDocument({ + const results = await lintDocument({ externalRefResolver: new BaseResolver(), document, config: new LintConfig({ diff --git a/packages/core/src/rules/oas3/index.ts b/packages/core/src/rules/oas3/index.ts index f7b6dc1d..58f41152 100644 --- a/packages/core/src/rules/oas3/index.ts +++ b/packages/core/src/rules/oas3/index.ts @@ -1,4 +1,4 @@ -import { Oas3RuleSet } from '../../validate'; +import { Oas3RuleSet } from '../../lint'; import { OasSpec } from '../common/spec'; import { Operation2xxResponse } from '../common/operation-2xx-response'; diff --git a/packages/core/src/walk.ts b/packages/core/src/walk.ts index 9da6690b..235e54f1 100644 --- a/packages/core/src/walk.ts +++ b/packages/core/src/walk.ts @@ -10,7 +10,7 @@ import { import { ResolvedRefMap, Document, ResolveError, YamlParseError, Source } from './resolve'; import { pushStack, popStack } from './utils'; -import { OasVersion } from './validate'; +import { OasVersion } from './lint'; import { NormalizedNodeType, isNamedType } from './types'; type NonUndefined = string | number | boolean | symbol | bigint | object | Record;