From a5c178438994ee90bfcae648f904c595a72fd7c6 Mon Sep 17 00:00:00 2001 From: Heiko Henning Date: Thu, 7 Sep 2023 11:18:08 +0000 Subject: [PATCH] feat: support protobuf --- lib/parser.js | 2 ++ package-lock.json | 47 +++++++++++++++++++++++++++++++++++++++++++++++ package.json | 1 + 3 files changed, 50 insertions(+) diff --git a/lib/parser.js b/lib/parser.js index 94305905c..823b92ba4 100644 --- a/lib/parser.js +++ b/lib/parser.js @@ -4,6 +4,7 @@ const { Parser, convertToOldAPI } = require('@asyncapi/parser/cjs'); const { OpenAPISchemaParser } = require('@asyncapi/openapi-schema-parser'); const { AvroSchemaParser } = require('@asyncapi/avro-schema-parser'); const { RamlDTSchemaParser } = require('@asyncapi/raml-dt-schema-parser'); +const { ProtoBuffSchemaParser } = require('@asyncapi/protobuf-schema-parser'); const parser = module.exports; @@ -12,6 +13,7 @@ const defaultParser = new Parser({ OpenAPISchemaParser(), AvroSchemaParser(), RamlDTSchemaParser(), + ProtoBuffSchemaParser(), ], }); diff --git a/package-lock.json b/package-lock.json index 09579967d..de472ca6e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,6 +13,7 @@ "@asyncapi/generator-react-sdk": "^1.0.0", "@asyncapi/openapi-schema-parser": "^3.0.4", "@asyncapi/parser": "^2.1.0", + "@asyncapi/protobuf-schema-parser": "3.0.0", "@asyncapi/raml-dt-schema-parser": "^4.0.4", "@npmcli/arborist": "^2.2.4", "ajv": "^8.12.0", @@ -231,6 +232,16 @@ "webidl-conversions": "^3.0.0" } }, + "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", @@ -3376,6 +3387,14 @@ "integrity": "sha512-5qOlnZscTn4xxM5MeGXAMOsIOIKIbh9e85zJWfBRVPlRMEVawzoPhINYbRGkBZCI8LxvBe7tJCdWiarA99OZfQ==", "dev": true }, + "node_modules/@types/protocol-buffers-schema": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/@types/protocol-buffers-schema/-/protocol-buffers-schema-3.4.1.tgz", + "integrity": "sha512-CBpqIDa1+/F3Z5EL8Uz/t+1eygIinJiMS37KP8O9TN+n38OlckYQhU+t/vYpsF7XhSDuiZS0zAJyfRrAeDKDUw==", + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/stack-utils": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-1.0.1.tgz", @@ -11356,6 +11375,11 @@ "react-is": "^16.13.1" } }, + "node_modules/protocol-buffers-schema": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/protocol-buffers-schema/-/protocol-buffers-schema-3.6.0.tgz", + "integrity": "sha512-TdDRD+/QNdrCGCE7v8340QyuXd4kIWIgapsE2+n/SaGiSSbomYl4TjHlvIoCWRpE7wFt02EpB35VVA2ImcBVqw==" + }, "node_modules/psl": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", @@ -14746,6 +14770,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", @@ -17077,6 +17111,14 @@ "integrity": "sha512-5qOlnZscTn4xxM5MeGXAMOsIOIKIbh9e85zJWfBRVPlRMEVawzoPhINYbRGkBZCI8LxvBe7tJCdWiarA99OZfQ==", "dev": true }, + "@types/protocol-buffers-schema": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/@types/protocol-buffers-schema/-/protocol-buffers-schema-3.4.1.tgz", + "integrity": "sha512-CBpqIDa1+/F3Z5EL8Uz/t+1eygIinJiMS37KP8O9TN+n38OlckYQhU+t/vYpsF7XhSDuiZS0zAJyfRrAeDKDUw==", + "requires": { + "@types/node": "*" + } + }, "@types/stack-utils": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-1.0.1.tgz", @@ -23226,6 +23268,11 @@ "react-is": "^16.13.1" } }, + "protocol-buffers-schema": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/protocol-buffers-schema/-/protocol-buffers-schema-3.6.0.tgz", + "integrity": "sha512-TdDRD+/QNdrCGCE7v8340QyuXd4kIWIgapsE2+n/SaGiSSbomYl4TjHlvIoCWRpE7wFt02EpB35VVA2ImcBVqw==" + }, "psl": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", diff --git a/package.json b/package.json index 9e541ac21..2f1e68294 100644 --- a/package.json +++ b/package.json @@ -53,6 +53,7 @@ "@asyncapi/openapi-schema-parser": "^3.0.4", "@asyncapi/parser": "^2.1.0", "@asyncapi/raml-dt-schema-parser": "^4.0.4", + "@asyncapi/protobuf-schema-parser": "3.0.0", "@npmcli/arborist": "^2.2.4", "ajv": "^8.12.0", "chokidar": "^3.4.0",