From c7ba693e45e25e97d8a9241252cd31029e6e019e Mon Sep 17 00:00:00 2001 From: souvik Date: Wed, 20 Sep 2023 14:58:18 +0530 Subject: [PATCH] feat: update parser-js to v2 --- package-lock.json | 882 ++++++---------------------------------- package.json | 2 +- src/lib/adapter.ts | 12 +- src/lib/asyncapiFile.ts | 5 +- src/lib/connection.ts | 2 +- src/lib/glee.ts | 2 +- src/lib/index.d.ts | 2 +- src/lib/servers.ts | 4 +- src/lib/util.ts | 4 +- src/lib/wsHttpAuth.ts | 6 +- src/registerAdapters.ts | 8 +- 11 files changed, 147 insertions(+), 782 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1a176da74..7ff8c97bc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ "@asyncapi/generator": "^1.12.0", "@asyncapi/html-template": "^0.28.4", "@asyncapi/markdown-template": "^1.3.3", - "@asyncapi/parser": "^1.13.1", + "@asyncapi/parser": "^2.1.0", "@types/jest": "^27.4.0", "@types/qs": "^6.9.7", "ajv": "^6.12.6", @@ -228,38 +228,6 @@ "source-map-support": "^0.5.19" } }, - "node_modules/@asyncapi/generator-react-sdk/node_modules/@asyncapi/parser": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@asyncapi/parser/-/parser-2.1.0.tgz", - "integrity": "sha512-78jjN3eW4ZmgJEa6Ap15lofzADCeItO4wHcAY2Jod3qLB1xf1zFDZQdtm3VSHYLeLhwoC1A33bAtzEf7M5P2bg==", - "dependencies": { - "@asyncapi/specs": "^5.1.0", - "@openapi-contrib/openapi-schema-to-json-schema": "~3.2.0", - "@stoplight/json-ref-resolver": "^3.1.5", - "@stoplight/spectral-core": "^1.16.1", - "@stoplight/spectral-functions": "^1.7.2", - "@stoplight/spectral-parsers": "^1.0.2", - "@types/json-schema": "^7.0.11", - "@types/urijs": "^1.19.19", - "ajv": "^8.11.0", - "ajv-errors": "^3.0.0", - "ajv-formats": "^2.1.1", - "avsc": "^5.7.5", - "js-yaml": "^4.1.0", - "jsonpath-plus": "^7.2.0", - "node-fetch": "2.6.7", - "ramldt2jsonschema": "^1.2.3", - "webapi-parser": "^0.5.0" - } - }, - "node_modules/@asyncapi/generator-react-sdk/node_modules/@asyncapi/specs": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@asyncapi/specs/-/specs-5.1.0.tgz", - "integrity": "sha512-yffhETqehkim43luMnPKOwzY0D0YtU4bKpORIXIaid6p5Y5kDLrMGJaEPkNieQp03HMjhjFrnUPtT8kvqe0+aQ==", - "dependencies": { - "@types/json-schema": "^7.0.11" - } - }, "node_modules/@asyncapi/generator-react-sdk/node_modules/@babel/core": { "version": "7.12.9", "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.9.tgz", @@ -290,64 +258,6 @@ "url": "https://opencollective.com/babel" } }, - "node_modules/@asyncapi/generator-react-sdk/node_modules/ajv": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/@asyncapi/generator-react-sdk/node_modules/ajv-errors": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-3.0.0.tgz", - "integrity": "sha512-V3wD15YHfHz6y0KdhYFjyy9vWtEVALT9UrxfN3zqlI6dMioHnJrqOYfyPKol3oqrnCM9uwkcdCwkJ0WUcbLMTQ==", - "peerDependencies": { - "ajv": "^8.0.1" - } - }, - "node_modules/@asyncapi/generator-react-sdk/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/@asyncapi/generator-react-sdk/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" - }, - "node_modules/@asyncapi/generator-react-sdk/node_modules/node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, "node_modules/@asyncapi/generator-react-sdk/node_modules/semver": { "version": "5.7.2", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", @@ -409,49 +319,6 @@ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" }, - "node_modules/@asyncapi/generator/node_modules/@asyncapi/parser": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@asyncapi/parser/-/parser-2.1.0.tgz", - "integrity": "sha512-78jjN3eW4ZmgJEa6Ap15lofzADCeItO4wHcAY2Jod3qLB1xf1zFDZQdtm3VSHYLeLhwoC1A33bAtzEf7M5P2bg==", - "dependencies": { - "@asyncapi/specs": "^5.1.0", - "@openapi-contrib/openapi-schema-to-json-schema": "~3.2.0", - "@stoplight/json-ref-resolver": "^3.1.5", - "@stoplight/spectral-core": "^1.16.1", - "@stoplight/spectral-functions": "^1.7.2", - "@stoplight/spectral-parsers": "^1.0.2", - "@types/json-schema": "^7.0.11", - "@types/urijs": "^1.19.19", - "ajv": "^8.11.0", - "ajv-errors": "^3.0.0", - "ajv-formats": "^2.1.1", - "avsc": "^5.7.5", - "js-yaml": "^4.1.0", - "jsonpath-plus": "^7.2.0", - "node-fetch": "2.6.7", - "ramldt2jsonschema": "^1.2.3", - "webapi-parser": "^0.5.0" - } - }, - "node_modules/@asyncapi/generator/node_modules/@asyncapi/parser/node_modules/@asyncapi/specs": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@asyncapi/specs/-/specs-5.1.0.tgz", - "integrity": "sha512-yffhETqehkim43luMnPKOwzY0D0YtU4bKpORIXIaid6p5Y5kDLrMGJaEPkNieQp03HMjhjFrnUPtT8kvqe0+aQ==", - "dependencies": { - "@types/json-schema": "^7.0.11" - } - }, - "node_modules/@asyncapi/generator/node_modules/@asyncapi/parser/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, "node_modules/@asyncapi/generator/node_modules/@babel/core": { "version": "7.12.9", "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.9.tgz", @@ -505,14 +372,6 @@ "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/@asyncapi/generator/node_modules/ajv-errors": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-3.0.0.tgz", - "integrity": "sha512-V3wD15YHfHz6y0KdhYFjyy9vWtEVALT9UrxfN3zqlI6dMioHnJrqOYfyPKol3oqrnCM9uwkcdCwkJ0WUcbLMTQ==", - "peerDependencies": { - "ajv": "^8.0.1" - } - }, "node_modules/@asyncapi/generator/node_modules/json-schema-traverse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", @@ -552,6 +411,22 @@ "rimraf": "^3.0.2" } }, + "node_modules/@asyncapi/html-template/node_modules/@asyncapi/parser": { + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/@asyncapi/parser/-/parser-1.18.1.tgz", + "integrity": "sha512-7sU9DajLV+vA2vShTYmD5lbtbTY6TOcGxB4Z4IcpRp8x5pejOsN32iU05eIYCnuamsi5SMscFxoi6fIO2vPK3Q==", + "dependencies": { + "@apidevtools/json-schema-ref-parser": "^9.0.6", + "@asyncapi/specs": "^4.1.1", + "@fmvilas/pseudo-yaml-ast": "^0.3.1", + "ajv": "^6.10.1", + "js-yaml": "^3.13.1", + "json-to-ast": "^2.1.0", + "lodash.clonedeep": "^4.5.0", + "node-fetch": "^2.6.0", + "tiny-merge-patch": "^0.1.2" + } + }, "node_modules/@asyncapi/markdown-template": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/@asyncapi/markdown-template/-/markdown-template-1.3.3.tgz", @@ -564,96 +439,6 @@ "yaml": "^1.10.2" } }, - "node_modules/@asyncapi/markdown-template/node_modules/@asyncapi/parser": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@asyncapi/parser/-/parser-2.1.0.tgz", - "integrity": "sha512-78jjN3eW4ZmgJEa6Ap15lofzADCeItO4wHcAY2Jod3qLB1xf1zFDZQdtm3VSHYLeLhwoC1A33bAtzEf7M5P2bg==", - "dependencies": { - "@asyncapi/specs": "^5.1.0", - "@openapi-contrib/openapi-schema-to-json-schema": "~3.2.0", - "@stoplight/json-ref-resolver": "^3.1.5", - "@stoplight/spectral-core": "^1.16.1", - "@stoplight/spectral-functions": "^1.7.2", - "@stoplight/spectral-parsers": "^1.0.2", - "@types/json-schema": "^7.0.11", - "@types/urijs": "^1.19.19", - "ajv": "^8.11.0", - "ajv-errors": "^3.0.0", - "ajv-formats": "^2.1.1", - "avsc": "^5.7.5", - "js-yaml": "^4.1.0", - "jsonpath-plus": "^7.2.0", - "node-fetch": "2.6.7", - "ramldt2jsonschema": "^1.2.3", - "webapi-parser": "^0.5.0" - } - }, - "node_modules/@asyncapi/markdown-template/node_modules/@asyncapi/specs": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@asyncapi/specs/-/specs-5.1.0.tgz", - "integrity": "sha512-yffhETqehkim43luMnPKOwzY0D0YtU4bKpORIXIaid6p5Y5kDLrMGJaEPkNieQp03HMjhjFrnUPtT8kvqe0+aQ==", - "dependencies": { - "@types/json-schema": "^7.0.11" - } - }, - "node_modules/@asyncapi/markdown-template/node_modules/ajv": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/@asyncapi/markdown-template/node_modules/ajv-errors": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-3.0.0.tgz", - "integrity": "sha512-V3wD15YHfHz6y0KdhYFjyy9vWtEVALT9UrxfN3zqlI6dMioHnJrqOYfyPKol3oqrnCM9uwkcdCwkJ0WUcbLMTQ==", - "peerDependencies": { - "ajv": "^8.0.1" - } - }, - "node_modules/@asyncapi/markdown-template/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/@asyncapi/markdown-template/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" - }, - "node_modules/@asyncapi/markdown-template/node_modules/node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, "node_modules/@asyncapi/openapi-schema-parser": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/@asyncapi/openapi-schema-parser/-/openapi-schema-parser-2.0.3.tgz", @@ -664,32 +449,6 @@ } }, "node_modules/@asyncapi/parser": { - "version": "1.18.1", - "resolved": "https://registry.npmjs.org/@asyncapi/parser/-/parser-1.18.1.tgz", - "integrity": "sha512-7sU9DajLV+vA2vShTYmD5lbtbTY6TOcGxB4Z4IcpRp8x5pejOsN32iU05eIYCnuamsi5SMscFxoi6fIO2vPK3Q==", - "dependencies": { - "@apidevtools/json-schema-ref-parser": "^9.0.6", - "@asyncapi/specs": "^4.1.1", - "@fmvilas/pseudo-yaml-ast": "^0.3.1", - "ajv": "^6.10.1", - "js-yaml": "^3.13.1", - "json-to-ast": "^2.1.0", - "lodash.clonedeep": "^4.5.0", - "node-fetch": "^2.6.0", - "tiny-merge-patch": "^0.1.2" - } - }, - "node_modules/@asyncapi/protobuf-schema-parser": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@asyncapi/protobuf-schema-parser/-/protobuf-schema-parser-3.0.0.tgz", - "integrity": "sha512-kjoLrll611K+xYC/iBUlSnZsCHbrhL999ItVHZhObUOjUB991XgonqbSAaihiiDXTYgceOLhJKAN5llkV/LOOA==", - "dependencies": { - "@asyncapi/parser": "^2.1.0", - "@types/protocol-buffers-schema": "^3.4.1", - "protocol-buffers-schema": "^3.6.0" - } - }, - "node_modules/@asyncapi/protobuf-schema-parser/node_modules/@asyncapi/parser": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/@asyncapi/parser/-/parser-2.1.0.tgz", "integrity": "sha512-78jjN3eW4ZmgJEa6Ap15lofzADCeItO4wHcAY2Jod3qLB1xf1zFDZQdtm3VSHYLeLhwoC1A33bAtzEf7M5P2bg==", @@ -713,7 +472,7 @@ "webapi-parser": "^0.5.0" } }, - "node_modules/@asyncapi/protobuf-schema-parser/node_modules/@asyncapi/specs": { + "node_modules/@asyncapi/parser/node_modules/@asyncapi/specs": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/@asyncapi/specs/-/specs-5.1.0.tgz", "integrity": "sha512-yffhETqehkim43luMnPKOwzY0D0YtU4bKpORIXIaid6p5Y5kDLrMGJaEPkNieQp03HMjhjFrnUPtT8kvqe0+aQ==", @@ -721,7 +480,7 @@ "@types/json-schema": "^7.0.11" } }, - "node_modules/@asyncapi/protobuf-schema-parser/node_modules/ajv": { + "node_modules/@asyncapi/parser/node_modules/ajv": { "version": "8.12.0", "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", @@ -736,7 +495,7 @@ "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/@asyncapi/protobuf-schema-parser/node_modules/ajv-errors": { + "node_modules/@asyncapi/parser/node_modules/ajv-errors": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-3.0.0.tgz", "integrity": "sha512-V3wD15YHfHz6y0KdhYFjyy9vWtEVALT9UrxfN3zqlI6dMioHnJrqOYfyPKol3oqrnCM9uwkcdCwkJ0WUcbLMTQ==", @@ -744,7 +503,7 @@ "ajv": "^8.0.1" } }, - "node_modules/@asyncapi/protobuf-schema-parser/node_modules/js-yaml": { + "node_modules/@asyncapi/parser/node_modules/js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", @@ -755,12 +514,12 @@ "js-yaml": "bin/js-yaml.js" } }, - "node_modules/@asyncapi/protobuf-schema-parser/node_modules/json-schema-traverse": { + "node_modules/@asyncapi/parser/node_modules/json-schema-traverse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" }, - "node_modules/@asyncapi/protobuf-schema-parser/node_modules/node-fetch": { + "node_modules/@asyncapi/parser/node_modules/node-fetch": { "version": "2.6.7", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", @@ -779,6 +538,16 @@ } } }, + "node_modules/@asyncapi/protobuf-schema-parser": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@asyncapi/protobuf-schema-parser/-/protobuf-schema-parser-3.0.0.tgz", + "integrity": "sha512-kjoLrll611K+xYC/iBUlSnZsCHbrhL999ItVHZhObUOjUB991XgonqbSAaihiiDXTYgceOLhJKAN5llkV/LOOA==", + "dependencies": { + "@asyncapi/parser": "^2.1.0", + "@types/protocol-buffers-schema": "^3.4.1", + "protocol-buffers-schema": "^3.6.0" + } + }, "node_modules/@asyncapi/raml-dt-schema-parser": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/@asyncapi/raml-dt-schema-parser/-/raml-dt-schema-parser-4.0.4.tgz", @@ -790,61 +559,6 @@ "webapi-parser": "^0.5.0" } }, - "node_modules/@asyncapi/raml-dt-schema-parser/node_modules/@asyncapi/parser": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@asyncapi/parser/-/parser-2.1.0.tgz", - "integrity": "sha512-78jjN3eW4ZmgJEa6Ap15lofzADCeItO4wHcAY2Jod3qLB1xf1zFDZQdtm3VSHYLeLhwoC1A33bAtzEf7M5P2bg==", - "dependencies": { - "@asyncapi/specs": "^5.1.0", - "@openapi-contrib/openapi-schema-to-json-schema": "~3.2.0", - "@stoplight/json-ref-resolver": "^3.1.5", - "@stoplight/spectral-core": "^1.16.1", - "@stoplight/spectral-functions": "^1.7.2", - "@stoplight/spectral-parsers": "^1.0.2", - "@types/json-schema": "^7.0.11", - "@types/urijs": "^1.19.19", - "ajv": "^8.11.0", - "ajv-errors": "^3.0.0", - "ajv-formats": "^2.1.1", - "avsc": "^5.7.5", - "js-yaml": "^4.1.0", - "jsonpath-plus": "^7.2.0", - "node-fetch": "2.6.7", - "ramldt2jsonschema": "^1.2.3", - "webapi-parser": "^0.5.0" - } - }, - "node_modules/@asyncapi/raml-dt-schema-parser/node_modules/@asyncapi/specs": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@asyncapi/specs/-/specs-5.1.0.tgz", - "integrity": "sha512-yffhETqehkim43luMnPKOwzY0D0YtU4bKpORIXIaid6p5Y5kDLrMGJaEPkNieQp03HMjhjFrnUPtT8kvqe0+aQ==", - "dependencies": { - "@types/json-schema": "^7.0.11" - } - }, - "node_modules/@asyncapi/raml-dt-schema-parser/node_modules/ajv": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/@asyncapi/raml-dt-schema-parser/node_modules/ajv-errors": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-3.0.0.tgz", - "integrity": "sha512-V3wD15YHfHz6y0KdhYFjyy9vWtEVALT9UrxfN3zqlI6dMioHnJrqOYfyPKol3oqrnCM9uwkcdCwkJ0WUcbLMTQ==", - "peerDependencies": { - "ajv": "^8.0.1" - } - }, "node_modules/@asyncapi/raml-dt-schema-parser/node_modules/js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", @@ -856,30 +570,6 @@ "js-yaml": "bin/js-yaml.js" } }, - "node_modules/@asyncapi/raml-dt-schema-parser/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" - }, - "node_modules/@asyncapi/raml-dt-schema-parser/node_modules/node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, "node_modules/@asyncapi/react-component": { "version": "1.0.0-next.47", "resolved": "https://registry.npmjs.org/@asyncapi/react-component/-/react-component-1.0.0-next.47.tgz", @@ -899,6 +589,22 @@ "react-dom": ">=16.8.0" } }, + "node_modules/@asyncapi/react-component/node_modules/@asyncapi/parser": { + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/@asyncapi/parser/-/parser-1.18.1.tgz", + "integrity": "sha512-7sU9DajLV+vA2vShTYmD5lbtbTY6TOcGxB4Z4IcpRp8x5pejOsN32iU05eIYCnuamsi5SMscFxoi6fIO2vPK3Q==", + "dependencies": { + "@apidevtools/json-schema-ref-parser": "^9.0.6", + "@asyncapi/specs": "^4.1.1", + "@fmvilas/pseudo-yaml-ast": "^0.3.1", + "ajv": "^6.10.1", + "js-yaml": "^3.13.1", + "json-to-ast": "^2.1.0", + "lodash.clonedeep": "^4.5.0", + "node-fetch": "^2.6.0", + "tiny-merge-patch": "^0.1.2" + } + }, "node_modules/@asyncapi/specs": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/@asyncapi/specs/-/specs-4.2.0.tgz", @@ -3921,38 +3627,6 @@ "ajv-formats": "^2.1.1" } }, - "node_modules/@smoya/multi-parser/node_modules/@asyncapi/parser": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@asyncapi/parser/-/parser-2.1.0.tgz", - "integrity": "sha512-78jjN3eW4ZmgJEa6Ap15lofzADCeItO4wHcAY2Jod3qLB1xf1zFDZQdtm3VSHYLeLhwoC1A33bAtzEf7M5P2bg==", - "dependencies": { - "@asyncapi/specs": "^5.1.0", - "@openapi-contrib/openapi-schema-to-json-schema": "~3.2.0", - "@stoplight/json-ref-resolver": "^3.1.5", - "@stoplight/spectral-core": "^1.16.1", - "@stoplight/spectral-functions": "^1.7.2", - "@stoplight/spectral-parsers": "^1.0.2", - "@types/json-schema": "^7.0.11", - "@types/urijs": "^1.19.19", - "ajv": "^8.11.0", - "ajv-errors": "^3.0.0", - "ajv-formats": "^2.1.1", - "avsc": "^5.7.5", - "js-yaml": "^4.1.0", - "jsonpath-plus": "^7.2.0", - "node-fetch": "2.6.7", - "ramldt2jsonschema": "^1.2.3", - "webapi-parser": "^0.5.0" - } - }, - "node_modules/@smoya/multi-parser/node_modules/@asyncapi/specs": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@asyncapi/specs/-/specs-5.1.0.tgz", - "integrity": "sha512-yffhETqehkim43luMnPKOwzY0D0YtU4bKpORIXIaid6p5Y5kDLrMGJaEPkNieQp03HMjhjFrnUPtT8kvqe0+aQ==", - "dependencies": { - "@types/json-schema": "^7.0.11" - } - }, "node_modules/@smoya/multi-parser/node_modules/ajv": { "version": "8.12.0", "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", @@ -3976,41 +3650,11 @@ "ajv": "^8.0.1" } }, - "node_modules/@smoya/multi-parser/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, "node_modules/@smoya/multi-parser/node_modules/json-schema-traverse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" }, - "node_modules/@smoya/multi-parser/node_modules/node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, "node_modules/@socket.io/component-emitter": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz", @@ -17467,48 +17111,6 @@ } } }, - "@asyncapi/parser": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@asyncapi/parser/-/parser-2.1.0.tgz", - "integrity": "sha512-78jjN3eW4ZmgJEa6Ap15lofzADCeItO4wHcAY2Jod3qLB1xf1zFDZQdtm3VSHYLeLhwoC1A33bAtzEf7M5P2bg==", - "requires": { - "@asyncapi/specs": "^5.1.0", - "@openapi-contrib/openapi-schema-to-json-schema": "~3.2.0", - "@stoplight/json-ref-resolver": "^3.1.5", - "@stoplight/spectral-core": "^1.16.1", - "@stoplight/spectral-functions": "^1.7.2", - "@stoplight/spectral-parsers": "^1.0.2", - "@types/json-schema": "^7.0.11", - "@types/urijs": "^1.19.19", - "ajv": "^8.11.0", - "ajv-errors": "^3.0.0", - "ajv-formats": "^2.1.1", - "avsc": "^5.7.5", - "js-yaml": "^4.1.0", - "jsonpath-plus": "^7.2.0", - "node-fetch": "2.6.7", - "ramldt2jsonschema": "^1.2.3", - "webapi-parser": "^0.5.0" - }, - "dependencies": { - "@asyncapi/specs": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@asyncapi/specs/-/specs-5.1.0.tgz", - "integrity": "sha512-yffhETqehkim43luMnPKOwzY0D0YtU4bKpORIXIaid6p5Y5kDLrMGJaEPkNieQp03HMjhjFrnUPtT8kvqe0+aQ==", - "requires": { - "@types/json-schema": "^7.0.11" - } - }, - "js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "requires": { - "argparse": "^2.0.1" - } - } - } - }, "@babel/core": { "version": "7.12.9", "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.9.tgz", @@ -17550,12 +17152,6 @@ "uri-js": "^4.2.2" } }, - "ajv-errors": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-3.0.0.tgz", - "integrity": "sha512-V3wD15YHfHz6y0KdhYFjyy9vWtEVALT9UrxfN3zqlI6dMioHnJrqOYfyPKol3oqrnCM9uwkcdCwkJ0WUcbLMTQ==", - "requires": {} - }, "json-schema-traverse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", @@ -17633,46 +17229,14 @@ "@babel/core": "7.12.9", "@babel/preset-env": "^7.12.7", "@babel/preset-react": "^7.12.7", - "@rollup/plugin-babel": "^5.2.1", - "babel-plugin-source-map-support": "^2.1.3", - "prop-types": "^15.7.2", - "react": "^17.0.1", - "rollup": "^2.60.1", - "source-map-support": "^0.5.19" - }, - "dependencies": { - "@asyncapi/parser": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@asyncapi/parser/-/parser-2.1.0.tgz", - "integrity": "sha512-78jjN3eW4ZmgJEa6Ap15lofzADCeItO4wHcAY2Jod3qLB1xf1zFDZQdtm3VSHYLeLhwoC1A33bAtzEf7M5P2bg==", - "requires": { - "@asyncapi/specs": "^5.1.0", - "@openapi-contrib/openapi-schema-to-json-schema": "~3.2.0", - "@stoplight/json-ref-resolver": "^3.1.5", - "@stoplight/spectral-core": "^1.16.1", - "@stoplight/spectral-functions": "^1.7.2", - "@stoplight/spectral-parsers": "^1.0.2", - "@types/json-schema": "^7.0.11", - "@types/urijs": "^1.19.19", - "ajv": "^8.11.0", - "ajv-errors": "^3.0.0", - "ajv-formats": "^2.1.1", - "avsc": "^5.7.5", - "js-yaml": "^4.1.0", - "jsonpath-plus": "^7.2.0", - "node-fetch": "2.6.7", - "ramldt2jsonschema": "^1.2.3", - "webapi-parser": "^0.5.0" - } - }, - "@asyncapi/specs": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@asyncapi/specs/-/specs-5.1.0.tgz", - "integrity": "sha512-yffhETqehkim43luMnPKOwzY0D0YtU4bKpORIXIaid6p5Y5kDLrMGJaEPkNieQp03HMjhjFrnUPtT8kvqe0+aQ==", - "requires": { - "@types/json-schema": "^7.0.11" - } - }, + "@rollup/plugin-babel": "^5.2.1", + "babel-plugin-source-map-support": "^2.1.3", + "prop-types": "^15.7.2", + "react": "^17.0.1", + "rollup": "^2.60.1", + "source-map-support": "^0.5.19" + }, + "dependencies": { "@babel/core": { "version": "7.12.9", "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.9.tgz", @@ -17696,44 +17260,6 @@ "source-map": "^0.5.0" } }, - "ajv": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", - "requires": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - } - }, - "ajv-errors": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-3.0.0.tgz", - "integrity": "sha512-V3wD15YHfHz6y0KdhYFjyy9vWtEVALT9UrxfN3zqlI6dMioHnJrqOYfyPKol3oqrnCM9uwkcdCwkJ0WUcbLMTQ==", - "requires": {} - }, - "js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "requires": { - "argparse": "^2.0.1" - } - }, - "json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" - }, - "node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", - "requires": { - "whatwg-url": "^5.0.0" - } - }, "semver": { "version": "5.7.2", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", @@ -17754,6 +17280,24 @@ "react": "^17.0.2", "react-dom": "^17.0.2", "rimraf": "^3.0.2" + }, + "dependencies": { + "@asyncapi/parser": { + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/@asyncapi/parser/-/parser-1.18.1.tgz", + "integrity": "sha512-7sU9DajLV+vA2vShTYmD5lbtbTY6TOcGxB4Z4IcpRp8x5pejOsN32iU05eIYCnuamsi5SMscFxoi6fIO2vPK3Q==", + "requires": { + "@apidevtools/json-schema-ref-parser": "^9.0.6", + "@asyncapi/specs": "^4.1.1", + "@fmvilas/pseudo-yaml-ast": "^0.3.1", + "ajv": "^6.10.1", + "js-yaml": "^3.13.1", + "json-to-ast": "^2.1.0", + "lodash.clonedeep": "^4.5.0", + "node-fetch": "^2.6.0", + "tiny-merge-patch": "^0.1.2" + } + } } }, "@asyncapi/markdown-template": { @@ -17766,78 +17310,6 @@ "@asyncapi/parser": "^2.1.0", "openapi-sampler": "^1.3.0", "yaml": "^1.10.2" - }, - "dependencies": { - "@asyncapi/parser": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@asyncapi/parser/-/parser-2.1.0.tgz", - "integrity": "sha512-78jjN3eW4ZmgJEa6Ap15lofzADCeItO4wHcAY2Jod3qLB1xf1zFDZQdtm3VSHYLeLhwoC1A33bAtzEf7M5P2bg==", - "requires": { - "@asyncapi/specs": "^5.1.0", - "@openapi-contrib/openapi-schema-to-json-schema": "~3.2.0", - "@stoplight/json-ref-resolver": "^3.1.5", - "@stoplight/spectral-core": "^1.16.1", - "@stoplight/spectral-functions": "^1.7.2", - "@stoplight/spectral-parsers": "^1.0.2", - "@types/json-schema": "^7.0.11", - "@types/urijs": "^1.19.19", - "ajv": "^8.11.0", - "ajv-errors": "^3.0.0", - "ajv-formats": "^2.1.1", - "avsc": "^5.7.5", - "js-yaml": "^4.1.0", - "jsonpath-plus": "^7.2.0", - "node-fetch": "2.6.7", - "ramldt2jsonschema": "^1.2.3", - "webapi-parser": "^0.5.0" - } - }, - "@asyncapi/specs": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@asyncapi/specs/-/specs-5.1.0.tgz", - "integrity": "sha512-yffhETqehkim43luMnPKOwzY0D0YtU4bKpORIXIaid6p5Y5kDLrMGJaEPkNieQp03HMjhjFrnUPtT8kvqe0+aQ==", - "requires": { - "@types/json-schema": "^7.0.11" - } - }, - "ajv": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", - "requires": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - } - }, - "ajv-errors": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-3.0.0.tgz", - "integrity": "sha512-V3wD15YHfHz6y0KdhYFjyy9vWtEVALT9UrxfN3zqlI6dMioHnJrqOYfyPKol3oqrnCM9uwkcdCwkJ0WUcbLMTQ==", - "requires": {} - }, - "js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "requires": { - "argparse": "^2.0.1" - } - }, - "json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" - }, - "node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", - "requires": { - "whatwg-url": "^5.0.0" - } - } } }, "@asyncapi/openapi-schema-parser": { @@ -17850,55 +17322,29 @@ } }, "@asyncapi/parser": { - "version": "1.18.1", - "resolved": "https://registry.npmjs.org/@asyncapi/parser/-/parser-1.18.1.tgz", - "integrity": "sha512-7sU9DajLV+vA2vShTYmD5lbtbTY6TOcGxB4Z4IcpRp8x5pejOsN32iU05eIYCnuamsi5SMscFxoi6fIO2vPK3Q==", - "requires": { - "@apidevtools/json-schema-ref-parser": "^9.0.6", - "@asyncapi/specs": "^4.1.1", - "@fmvilas/pseudo-yaml-ast": "^0.3.1", - "ajv": "^6.10.1", - "js-yaml": "^3.13.1", - "json-to-ast": "^2.1.0", - "lodash.clonedeep": "^4.5.0", - "node-fetch": "^2.6.0", - "tiny-merge-patch": "^0.1.2" - } - }, - "@asyncapi/protobuf-schema-parser": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@asyncapi/protobuf-schema-parser/-/protobuf-schema-parser-3.0.0.tgz", - "integrity": "sha512-kjoLrll611K+xYC/iBUlSnZsCHbrhL999ItVHZhObUOjUB991XgonqbSAaihiiDXTYgceOLhJKAN5llkV/LOOA==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@asyncapi/parser/-/parser-2.1.0.tgz", + "integrity": "sha512-78jjN3eW4ZmgJEa6Ap15lofzADCeItO4wHcAY2Jod3qLB1xf1zFDZQdtm3VSHYLeLhwoC1A33bAtzEf7M5P2bg==", "requires": { - "@asyncapi/parser": "^2.1.0", - "@types/protocol-buffers-schema": "^3.4.1", - "protocol-buffers-schema": "^3.6.0" + "@asyncapi/specs": "^5.1.0", + "@openapi-contrib/openapi-schema-to-json-schema": "~3.2.0", + "@stoplight/json-ref-resolver": "^3.1.5", + "@stoplight/spectral-core": "^1.16.1", + "@stoplight/spectral-functions": "^1.7.2", + "@stoplight/spectral-parsers": "^1.0.2", + "@types/json-schema": "^7.0.11", + "@types/urijs": "^1.19.19", + "ajv": "^8.11.0", + "ajv-errors": "^3.0.0", + "ajv-formats": "^2.1.1", + "avsc": "^5.7.5", + "js-yaml": "^4.1.0", + "jsonpath-plus": "^7.2.0", + "node-fetch": "2.6.7", + "ramldt2jsonschema": "^1.2.3", + "webapi-parser": "^0.5.0" }, "dependencies": { - "@asyncapi/parser": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@asyncapi/parser/-/parser-2.1.0.tgz", - "integrity": "sha512-78jjN3eW4ZmgJEa6Ap15lofzADCeItO4wHcAY2Jod3qLB1xf1zFDZQdtm3VSHYLeLhwoC1A33bAtzEf7M5P2bg==", - "requires": { - "@asyncapi/specs": "^5.1.0", - "@openapi-contrib/openapi-schema-to-json-schema": "~3.2.0", - "@stoplight/json-ref-resolver": "^3.1.5", - "@stoplight/spectral-core": "^1.16.1", - "@stoplight/spectral-functions": "^1.7.2", - "@stoplight/spectral-parsers": "^1.0.2", - "@types/json-schema": "^7.0.11", - "@types/urijs": "^1.19.19", - "ajv": "^8.11.0", - "ajv-errors": "^3.0.0", - "ajv-formats": "^2.1.1", - "avsc": "^5.7.5", - "js-yaml": "^4.1.0", - "jsonpath-plus": "^7.2.0", - "node-fetch": "2.6.7", - "ramldt2jsonschema": "^1.2.3", - "webapi-parser": "^0.5.0" - } - }, "@asyncapi/specs": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/@asyncapi/specs/-/specs-5.1.0.tgz", @@ -17947,6 +17393,16 @@ } } }, + "@asyncapi/protobuf-schema-parser": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@asyncapi/protobuf-schema-parser/-/protobuf-schema-parser-3.0.0.tgz", + "integrity": "sha512-kjoLrll611K+xYC/iBUlSnZsCHbrhL999ItVHZhObUOjUB991XgonqbSAaihiiDXTYgceOLhJKAN5llkV/LOOA==", + "requires": { + "@asyncapi/parser": "^2.1.0", + "@types/protocol-buffers-schema": "^3.4.1", + "protocol-buffers-schema": "^3.6.0" + } + }, "@asyncapi/raml-dt-schema-parser": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/@asyncapi/raml-dt-schema-parser/-/raml-dt-schema-parser-4.0.4.tgz", @@ -17958,55 +17414,6 @@ "webapi-parser": "^0.5.0" }, "dependencies": { - "@asyncapi/parser": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@asyncapi/parser/-/parser-2.1.0.tgz", - "integrity": "sha512-78jjN3eW4ZmgJEa6Ap15lofzADCeItO4wHcAY2Jod3qLB1xf1zFDZQdtm3VSHYLeLhwoC1A33bAtzEf7M5P2bg==", - "requires": { - "@asyncapi/specs": "^5.1.0", - "@openapi-contrib/openapi-schema-to-json-schema": "~3.2.0", - "@stoplight/json-ref-resolver": "^3.1.5", - "@stoplight/spectral-core": "^1.16.1", - "@stoplight/spectral-functions": "^1.7.2", - "@stoplight/spectral-parsers": "^1.0.2", - "@types/json-schema": "^7.0.11", - "@types/urijs": "^1.19.19", - "ajv": "^8.11.0", - "ajv-errors": "^3.0.0", - "ajv-formats": "^2.1.1", - "avsc": "^5.7.5", - "js-yaml": "^4.1.0", - "jsonpath-plus": "^7.2.0", - "node-fetch": "2.6.7", - "ramldt2jsonschema": "^1.2.3", - "webapi-parser": "^0.5.0" - } - }, - "@asyncapi/specs": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@asyncapi/specs/-/specs-5.1.0.tgz", - "integrity": "sha512-yffhETqehkim43luMnPKOwzY0D0YtU4bKpORIXIaid6p5Y5kDLrMGJaEPkNieQp03HMjhjFrnUPtT8kvqe0+aQ==", - "requires": { - "@types/json-schema": "^7.0.11" - } - }, - "ajv": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", - "requires": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - } - }, - "ajv-errors": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-3.0.0.tgz", - "integrity": "sha512-V3wD15YHfHz6y0KdhYFjyy9vWtEVALT9UrxfN3zqlI6dMioHnJrqOYfyPKol3oqrnCM9uwkcdCwkJ0WUcbLMTQ==", - "requires": {} - }, "js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", @@ -18014,19 +17421,6 @@ "requires": { "argparse": "^2.0.1" } - }, - "json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" - }, - "node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", - "requires": { - "whatwg-url": "^5.0.0" - } } } }, @@ -18043,6 +17437,24 @@ "marked": "^4.0.14", "openapi-sampler": "^1.2.1", "use-resize-observer": "^8.0.0" + }, + "dependencies": { + "@asyncapi/parser": { + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/@asyncapi/parser/-/parser-1.18.1.tgz", + "integrity": "sha512-7sU9DajLV+vA2vShTYmD5lbtbTY6TOcGxB4Z4IcpRp8x5pejOsN32iU05eIYCnuamsi5SMscFxoi6fIO2vPK3Q==", + "requires": { + "@apidevtools/json-schema-ref-parser": "^9.0.6", + "@asyncapi/specs": "^4.1.1", + "@fmvilas/pseudo-yaml-ast": "^0.3.1", + "ajv": "^6.10.1", + "js-yaml": "^3.13.1", + "json-to-ast": "^2.1.0", + "lodash.clonedeep": "^4.5.0", + "node-fetch": "^2.6.0", + "tiny-merge-patch": "^0.1.2" + } + } } }, "@asyncapi/specs": { @@ -20245,38 +19657,6 @@ "ajv-formats": "^2.1.1" } }, - "@asyncapi/parser": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@asyncapi/parser/-/parser-2.1.0.tgz", - "integrity": "sha512-78jjN3eW4ZmgJEa6Ap15lofzADCeItO4wHcAY2Jod3qLB1xf1zFDZQdtm3VSHYLeLhwoC1A33bAtzEf7M5P2bg==", - "requires": { - "@asyncapi/specs": "^5.1.0", - "@openapi-contrib/openapi-schema-to-json-schema": "~3.2.0", - "@stoplight/json-ref-resolver": "^3.1.5", - "@stoplight/spectral-core": "^1.16.1", - "@stoplight/spectral-functions": "^1.7.2", - "@stoplight/spectral-parsers": "^1.0.2", - "@types/json-schema": "^7.0.11", - "@types/urijs": "^1.19.19", - "ajv": "^8.11.0", - "ajv-errors": "^3.0.0", - "ajv-formats": "^2.1.1", - "avsc": "^5.7.5", - "js-yaml": "^4.1.0", - "jsonpath-plus": "^7.2.0", - "node-fetch": "2.6.7", - "ramldt2jsonschema": "^1.2.3", - "webapi-parser": "^0.5.0" - } - }, - "@asyncapi/specs": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@asyncapi/specs/-/specs-5.1.0.tgz", - "integrity": "sha512-yffhETqehkim43luMnPKOwzY0D0YtU4bKpORIXIaid6p5Y5kDLrMGJaEPkNieQp03HMjhjFrnUPtT8kvqe0+aQ==", - "requires": { - "@types/json-schema": "^7.0.11" - } - }, "ajv": { "version": "8.12.0", "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", @@ -20294,26 +19674,10 @@ "integrity": "sha512-V3wD15YHfHz6y0KdhYFjyy9vWtEVALT9UrxfN3zqlI6dMioHnJrqOYfyPKol3oqrnCM9uwkcdCwkJ0WUcbLMTQ==", "requires": {} }, - "js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "requires": { - "argparse": "^2.0.1" - } - }, "json-schema-traverse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" - }, - "node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", - "requires": { - "whatwg-url": "^5.0.0" - } } } }, diff --git a/package.json b/package.json index aecae0f8f..441e33714 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "@asyncapi/generator": "^1.12.0", "@asyncapi/html-template": "^0.28.4", "@asyncapi/markdown-template": "^1.3.3", - "@asyncapi/parser": "^1.13.1", + "@asyncapi/parser": "^2.1.0", "@types/jest": "^27.4.0", "@types/qs": "^6.9.7", "ajv": "^6.12.6", diff --git a/src/lib/adapter.ts b/src/lib/adapter.ts index 2119d53df..31318b612 100644 --- a/src/lib/adapter.ts +++ b/src/lib/adapter.ts @@ -1,5 +1,5 @@ /* eslint-disable security/detect-object-injection */ -import { AsyncAPIDocument, Server } from '@asyncapi/parser' +import { AsyncAPIDocumentInterface as AsyncAPIDocument, ServerInterface as Server } from '@asyncapi/parser' import EventEmitter from 'events' import uriTemplates from 'uri-templates' import GleeConnection from './connection.js' @@ -51,7 +51,7 @@ class GleeAdapter extends EventEmitter { this._AsyncAPIServer = server this._parsedAsyncAPI = parsedAsyncAPI - this._channelNames = this._parsedAsyncAPI.channelNames() + this._channelNames = this._parsedAsyncAPI.channels().map(e => e.address()) this._connections = [] const uriTemplateValues = new Map() @@ -229,12 +229,12 @@ class GleeAdapter extends EventEmitter { */ getSubscribedChannels(): string[] { return this._channelNames.filter((channelName) => { - const channel = this._parsedAsyncAPI.channel(channelName) - if (!channel.hasPublish()) return false + const channel = this._parsedAsyncAPI.channels().get(channelName) + if (channel.operations().filterByReceive().length <= 0) return false - const channelServers = channel.hasServers() + const channelServers = channel.servers() ? channel.servers() - : channel.ext('x-servers') || this._parsedAsyncAPI.serverNames() + : channel.extensions().get('x-servers').value() || this._parsedAsyncAPI.channels().map(e => e.address) return channelServers.includes(this._serverName) }) } diff --git a/src/lib/asyncapiFile.ts b/src/lib/asyncapiFile.ts index cc8aba1b0..e8f5101b8 100644 --- a/src/lib/asyncapiFile.ts +++ b/src/lib/asyncapiFile.ts @@ -1,9 +1,10 @@ import { readFile } from 'fs/promises' -import asyncapi, { AsyncAPIDocument } from '@asyncapi/parser' +import asyncapi, { AsyncAPIDocumentInterface as AsyncAPIDocument, Parser, toAsyncAPIDocument} from '@asyncapi/parser' import { getConfigs } from './configs.js' export async function getParsedAsyncAPI(): Promise { const { ASYNCAPI_FILE_PATH } = getConfigs() const asyncapiFileContent = await readFile(ASYNCAPI_FILE_PATH, 'utf-8') - return asyncapi.parse(asyncapiFileContent) + const parser = new Parser() + return toAsyncAPIDocument(parser.parse(asyncapiFileContent)) } diff --git a/src/lib/connection.ts b/src/lib/connection.ts index 9fafcc0e4..473f9196b 100644 --- a/src/lib/connection.ts +++ b/src/lib/connection.ts @@ -1,4 +1,4 @@ -import { Server as AsyncAPIServer, AsyncAPIDocument } from '@asyncapi/parser' +import { ServerInterface as AsyncAPIServer, AsyncAPIDocumentInterface as AsyncAPIDocument } from '@asyncapi/parser' interface IGleeConnectionConstructor { connection: any diff --git a/src/lib/glee.ts b/src/lib/glee.ts index 514881f88..904b6772e 100644 --- a/src/lib/glee.ts +++ b/src/lib/glee.ts @@ -2,7 +2,7 @@ import EventEmitter from 'events' import async from 'async' import Debug from 'debug' -import { AsyncAPIDocument, Server } from '@asyncapi/parser' +import { AsyncAPIDocumentInterface as AsyncAPIDocument, ServerInterface as Server } from '@asyncapi/parser' import GleeAdapter from './adapter.js' import GleeClusterAdapter from './cluster.js' import GleeRouter, { diff --git a/src/lib/index.d.ts b/src/lib/index.d.ts index 5abe5c03d..28c2ea146 100644 --- a/src/lib/index.d.ts +++ b/src/lib/index.d.ts @@ -1,4 +1,4 @@ -import { AsyncAPIDocument } from '@asyncapi/parser' +import { AsyncAPIDocumentInterface as AsyncAPIDocument } from '@asyncapi/parser' import GleeAdapter from './adapter.js' import GleeClusterAdapter from './cluster.js' import GleeConnection from './connection.js' diff --git a/src/lib/servers.ts b/src/lib/servers.ts index 309680d06..a64ba3690 100644 --- a/src/lib/servers.ts +++ b/src/lib/servers.ts @@ -4,11 +4,11 @@ export async function getSelectedServerNames(): Promise { const parsedAsyncAPI = await getParsedAsyncAPI() if (!process.env.GLEE_SERVER_NAMES) { - return parsedAsyncAPI.serverNames() + return parsedAsyncAPI.servers().all().map(e => e.url()) } const arrayOfNames = process.env.GLEE_SERVER_NAMES.split(',') - return parsedAsyncAPI.serverNames().filter((name) => { + return parsedAsyncAPI.servers().all().map(e => e.url()).filter((name) => { return arrayOfNames.includes(name) }) } diff --git a/src/lib/util.ts b/src/lib/util.ts index c2ac3aaad..f83f71f11 100644 --- a/src/lib/util.ts +++ b/src/lib/util.ts @@ -1,4 +1,4 @@ -import { AsyncAPIDocument } from '@asyncapi/parser' +import { AsyncAPIDocumentInterface as AsyncAPIDocument } from '@asyncapi/parser' import Ajv from 'ajv' import betterAjvErrors from 'better-ajv-errors' import { pathToRegexp } from 'path-to-regexp' @@ -138,7 +138,7 @@ export const isRemoteServer = ( parsedAsyncAPI: AsyncAPIDocument, serverName: string ): boolean => { - const remoteServers = parsedAsyncAPI.extension('x-remoteServers') + const remoteServers = parsedAsyncAPI.extensions().get('x-remoteServers').value() if (remoteServers) { return remoteServers.includes(serverName) } diff --git a/src/lib/wsHttpAuth.ts b/src/lib/wsHttpAuth.ts index 60e438f73..09d049a9f 100644 --- a/src/lib/wsHttpAuth.ts +++ b/src/lib/wsHttpAuth.ts @@ -1,4 +1,4 @@ -import { AsyncAPIDocument, SecurityScheme, Server } from '@asyncapi/parser' +import { AsyncAPIDocumentInterface as AsyncAPIDocument, SecuritySchemeInterface as SecurityScheme, ServerInterface as Server } from '@asyncapi/parser' import { resolveFunctions } from './util.js' import { EventEmitter } from 'events' import { HttpAuthConfig, WsAuthConfig, AuthProps } from './index.js' @@ -30,9 +30,9 @@ class GleeAuth extends EventEmitter { checkClientAuthConfig() { this.secReqs = (this.AsyncAPIServer.security() || []).map((sec) => { - const secName = Object.keys(sec.json())[0] + const secName = Object.keys(sec.values())[0] return { - [secName]: this.parsedAsyncAPI.components().securityScheme(secName), + [secName]: this.parsedAsyncAPI.securitySchemes().get(secName).json(), } }) diff --git a/src/registerAdapters.ts b/src/registerAdapters.ts index 9666e94d6..8fa2e493c 100644 --- a/src/registerAdapters.ts +++ b/src/registerAdapters.ts @@ -1,4 +1,4 @@ -import { AsyncAPIDocument, Server } from '@asyncapi/parser' +import { AsyncAPIDocumentV2 as AsyncAPIDocument, ServerInterface } from '@asyncapi/parser' import MqttAdapter from './adapters/mqtt/index.js' import WebSocketServerAdapter from './adapters/ws/server.js' import WebsocketClientAdapter from './adapters/ws/client.js' @@ -19,7 +19,7 @@ export default async ( const serverNames = await getSelectedServerNames() serverNames.forEach((serverName) => { - const server = parsedAsyncAPI.server(serverName) + const server: ServerInterface = parsedAsyncAPI.servers().get(serverName) if (!server) { throw new Error( @@ -35,13 +35,13 @@ export default async ( function registerAdapterForServer( serverName: string, - server: Server, + server: ServerInterface, app: Glee, parsedAsyncAPI: AsyncAPIDocument, config: GleeConfig ) { const protocol = server.protocol() - const remoteServers = parsedAsyncAPI.extension('x-remoteServers') + const remoteServers = parsedAsyncAPI.extensions().get('x-remoteServers').value() if (['mqtt', 'mqtts', 'secure-mqtt'].includes(protocol)) { app.addAdapter(MqttAdapter, { serverName,