From 01e75f77b6ba250208bb0beac32d0b5165f53429 Mon Sep 17 00:00:00 2001 From: Aayush Sahu Date: Tue, 13 Jun 2023 21:55:46 +0530 Subject: [PATCH 01/15] feat: diff will show error on breaking changes (#646) Co-authored-by: souvik --- src/commands/diff.ts | 22 ++++++++++++++++++++++ src/errors/diff-error.ts | 8 ++++++++ test/commands/diff.test.ts | 25 +++++++++++++++++++++++++ 3 files changed, 55 insertions(+) diff --git a/src/commands/diff.ts b/src/commands/diff.ts index 314ea4abeb2..0ca1a93e7dd 100644 --- a/src/commands/diff.ts +++ b/src/commands/diff.ts @@ -8,6 +8,7 @@ import Command from '../base'; import { ValidationError } from '../errors/validation-error'; import { SpecificationFileNotFound } from '../errors/specification-file'; import { + DiffBreakingChangeError, DiffOverrideFileError, DiffOverrideJSONError, } from '../errors/diff-error'; @@ -40,6 +41,9 @@ export default class Diff extends Command { char: 'o', description: 'path to JSON file containing the override properties', }), + 'no-error': Flags.boolean({ + description: 'don\'t show error on breaking changes', + }), watch: watchFlag(), ...validationFlags({ logDiagnostics: false }), }; @@ -57,6 +61,7 @@ export default class Diff extends Command { }, ]; + /* eslint-disable sonarjs/cognitive-complexity */ async run() { const { args, flags } = await this.parse(Diff); // NOSONAR const firstDocumentPath = args['old']; @@ -66,6 +71,7 @@ export default class Diff extends Command { const outputType = flags['type']; const overrideFilePath = flags['overrides']; const watchMode = flags['watch']; + const noError = flags['no-error']; let firstDocument: Specification, secondDocument: Specification; try { @@ -143,7 +149,13 @@ export default class Diff extends Command { `The output format ${outputFormat} is not supported at the moment.` ); } + if (!noError) { + throwOnBreakingChange(diffOutput); + } } catch (error) { + if (error instanceof DiffBreakingChangeError) { + throw error; + } throw new ValidationError({ type: 'parser-error', err: error, @@ -222,3 +234,13 @@ const enableWatch = (status: boolean, watcher: SpecWatcherParams) => { specWatcher(watcher); } }; + +/** + * Throws `DiffBreakingChangeError` when breaking changes are detected + */ +function throwOnBreakingChange(diffOutput: AsyncAPIDiff) { + const breakingChanges = diffOutput.breaking(); + if (breakingChanges.length !== 0) { + throw new DiffBreakingChangeError(); + } +} diff --git a/src/errors/diff-error.ts b/src/errors/diff-error.ts index 27de7f664ff..b085fbe29b2 100644 --- a/src/errors/diff-error.ts +++ b/src/errors/diff-error.ts @@ -13,3 +13,11 @@ export class DiffOverrideJSONError extends Error { this.message = 'Provided override file is not a valid JSON file'; } } + +export class DiffBreakingChangeError extends Error { + constructor() { + super(); + this.name = 'DiffBreakingChangeError'; + this.message = 'Breaking changes detected'; + } +} diff --git a/test/commands/diff.test.ts b/test/commands/diff.test.ts index 6a2731f6fec..0b7be57f4a3 100644 --- a/test/commands/diff.test.ts +++ b/test/commands/diff.test.ts @@ -28,6 +28,7 @@ describe('diff', () => { './test/fixtures/asyncapi_v2.yml', '--type=all', '--format=json', + '--no-error', ]) .it('works when file path is passed', (ctx, done) => { expect(JSON.stringify(ctx.stdout)).toEqual( @@ -48,6 +49,7 @@ describe('diff', () => { './test/fixtures/asyncapi_v2.yml', '--type=breaking', '--format=json', + '--no-error', ]) .it('works when file path is passed', (ctx, done) => { expect(JSON.stringify(ctx.stdout)).toEqual( @@ -68,6 +70,7 @@ describe('diff', () => { './test/fixtures/asyncapi_v2.yml', '--type=non-breaking', '--format=json', + '--no-error', ]) .it('works when file path is passed', (ctx, done) => { expect(JSON.stringify(ctx.stdout)).toEqual( @@ -88,6 +91,7 @@ describe('diff', () => { './test/fixtures/asyncapi_v2.yml', '--type=unclassified', '--format=json', + '--no-error', ]) .it('works when file path is passed', (ctx, done) => { expect(JSON.stringify(ctx.stdout)).toEqual( @@ -107,6 +111,7 @@ describe('diff', () => { './test/fixtures/asyncapi_v1.yml', './test/fixtures/asyncapi_v2.yml', '--format=json', + '--no-error', ]) // eslint-disable-next-line sonarjs/no-identical-functions .it('works when file path is passed', (ctx, done) => { @@ -128,6 +133,7 @@ describe('diff', () => { './test/fixtures/asyncapi_v2.yml', '--overrides=./test/fixtures/overrides.json', '--format=json', + '--no-error', ]) .it((ctx, done) => { expect(JSON.stringify(ctx.stdout)).toEqual( @@ -186,6 +192,7 @@ describe('diff', () => { './test/fixtures/asyncapi_v1.yml', './test/fixtures/asyncapi_v2.yml', '--type=all', + '--no-error', ]) .it('works when file path is passed', (ctx, done) => { expect(JSON.stringify(ctx.stdout)).toEqual( @@ -196,6 +203,24 @@ describe('diff', () => { }); }); + describe('should show error on breaking changes', () => { + test + .stderr() + .stdout() + .command([ + 'diff', + './test/fixtures/asyncapi_v1.yml', + './test/fixtures/asyncapi_v2.yml', + ]) + .it('works when file path is passed', (ctx, done) => { + expect(JSON.stringify(ctx.stdout)).toEqual( + '"changes:\\n - action: edit\\n path: >-\\n /channels/light~1measured/publish/message/x-parser-original-payload/properties/id/minimum\\n before: 0\\n after: 1\\n type: unclassified\\n - action: edit\\n path: /channels/light~1measured/publish/message/payload/properties/id/minimum\\n before: 0\\n after: 1\\n type: unclassified\\n - action: edit\\n path: /servers/mosquitto/protocol\\n before: mqtt\\n after: http\\n type: unclassified\\n - action: edit\\n path: /servers/mosquitto/url\\n before: mqtt://test.mosquitto.org\\n after: http://test.mosquitto.org\\n type: breaking\\n - action: edit\\n path: /info/title\\n before: Streetlights API\\n after: Streetlights API V2\\n type: non-breaking\\n\\n"' + ); + expect(ctx.stderr).toEqual('DiffBreakingChangeError: Breaking changes detected\n'); + done(); + }); + }); + describe('with logging diagnostics', () => { test .stderr() From baacad0176db2cd8fecb8314ae03d37dc9f5f4f0 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Wed, 14 Jun 2023 09:50:07 +0200 Subject: [PATCH 02/15] chore(release): v0.48.0 (#647) Co-authored-by: asyncapi-bot --- docs/usage.md | 25 +++++++++++++------------ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/docs/usage.md b/docs/usage.md index 85a0dae098f..a1abdfb2d0d 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -29,7 +29,7 @@ $ npm install -g @asyncapi/cli $ asyncapi COMMAND running command... $ asyncapi (--version) -@asyncapi/cli/0.47.8 linux-x64 node-v18.16.0 +@asyncapi/cli/0.47.9 linux-x64 node-v18.16.0 $ asyncapi --help [COMMAND] USAGE $ asyncapi COMMAND @@ -91,7 +91,7 @@ EXAMPLES $ asyncapi bundle ./asyncapi.yaml ./features.yaml --base ./asyncapi.yaml --reference-into-components ``` -_See code: [src/commands/bundle.ts](https://github.com/asyncapi/cli/blob/v0.47.8/src/commands/bundle.ts)_ +_See code: [src/commands/bundle.ts](https://github.com/asyncapi/cli/blob/v0.47.9/src/commands/bundle.ts)_ ## `asyncapi config` @@ -105,7 +105,7 @@ DESCRIPTION CLI config settings ``` -_See code: [src/commands/config/index.ts](https://github.com/asyncapi/cli/blob/v0.47.8/src/commands/config/index.ts)_ +_See code: [src/commands/config/index.ts](https://github.com/asyncapi/cli/blob/v0.47.9/src/commands/config/index.ts)_ ## `asyncapi config context` @@ -234,7 +234,7 @@ DESCRIPTION Convert asyncapi documents older to newer versions ``` -_See code: [src/commands/convert.ts](https://github.com/asyncapi/cli/blob/v0.47.8/src/commands/convert.ts)_ +_See code: [src/commands/convert.ts](https://github.com/asyncapi/cli/blob/v0.47.9/src/commands/convert.ts)_ ## `asyncapi diff OLD NEW` @@ -243,8 +243,8 @@ Find diff between two asyncapi files ``` USAGE $ asyncapi diff OLD NEW [-h] [-f json|yaml|yml] [-t breaking|non-breaking|unclassified|all] [-o ] - [-w] [--log-diagnostics] [--diagnostics-format json|stylish|junit|html|text|teamcity|pretty] [--fail-severity - error|warn|info|hint] + [--no-error] [-w] [--log-diagnostics] [--diagnostics-format json|stylish|junit|html|text|teamcity|pretty] + [--fail-severity error|warn|info|hint] ARGUMENTS OLD old spec path, URL or context-name @@ -264,12 +264,13 @@ FLAGS --fail-severity=(error|warn|info|hint) [default: error] diagnostics of this level or above will trigger a failure exit code --[no-]log-diagnostics log validation diagnostics or not + --no-error don't show error on breaking changes DESCRIPTION Find diff between two asyncapi files ``` -_See code: [src/commands/diff.ts](https://github.com/asyncapi/cli/blob/v0.47.8/src/commands/diff.ts)_ +_See code: [src/commands/diff.ts](https://github.com/asyncapi/cli/blob/v0.47.9/src/commands/diff.ts)_ ## `asyncapi generate` @@ -283,7 +284,7 @@ DESCRIPTION Generate typed models or other things like clients, applications or docs using AsyncAPI Generator templates. ``` -_See code: [src/commands/generate/index.ts](https://github.com/asyncapi/cli/blob/v0.47.8/src/commands/generate/index.ts)_ +_See code: [src/commands/generate/index.ts](https://github.com/asyncapi/cli/blob/v0.47.9/src/commands/generate/index.ts)_ ## `asyncapi generate fromTemplate ASYNCAPI TEMPLATE` @@ -407,7 +408,7 @@ DESCRIPTION Creates a new asyncapi file ``` -_See code: [src/commands/new/index.ts](https://github.com/asyncapi/cli/blob/v0.47.8/src/commands/new/index.ts)_ +_See code: [src/commands/new/index.ts](https://github.com/asyncapi/cli/blob/v0.47.9/src/commands/new/index.ts)_ ## `asyncapi new file` @@ -495,7 +496,7 @@ EXAMPLES $ asyncapi optimize ./asyncapi.yaml --optimization=remove-components,reuse-components,move-to-components --output=terminal --no-tty ``` -_See code: [src/commands/optimize.ts](https://github.com/asyncapi/cli/blob/v0.47.8/src/commands/optimize.ts)_ +_See code: [src/commands/optimize.ts](https://github.com/asyncapi/cli/blob/v0.47.9/src/commands/optimize.ts)_ ## `asyncapi start` @@ -509,7 +510,7 @@ DESCRIPTION Start asyncapi studio ``` -_See code: [src/commands/start/index.ts](https://github.com/asyncapi/cli/blob/v0.47.8/src/commands/start/index.ts)_ +_See code: [src/commands/start/index.ts](https://github.com/asyncapi/cli/blob/v0.47.9/src/commands/start/index.ts)_ ## `asyncapi start studio` @@ -553,5 +554,5 @@ DESCRIPTION validate asyncapi file ``` -_See code: [src/commands/validate.ts](https://github.com/asyncapi/cli/blob/v0.47.8/src/commands/validate.ts)_ +_See code: [src/commands/validate.ts](https://github.com/asyncapi/cli/blob/v0.47.9/src/commands/validate.ts)_ diff --git a/package-lock.json b/package-lock.json index b7c414a9d14..22517f116be 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@asyncapi/cli", - "version": "0.47.9", + "version": "0.48.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@asyncapi/cli", - "version": "0.47.9", + "version": "0.48.0", "license": "Apache-2.0", "dependencies": { "@asyncapi/avro-schema-parser": "^3.0.1", diff --git a/package.json b/package.json index 90c98ef946c..7db48c50c20 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@asyncapi/cli", "description": "All in one CLI for all AsyncAPI tools", - "version": "0.47.9", + "version": "0.48.0", "author": "@asyncapi", "bin": { "asyncapi": "./bin/run" From acf15a51b5e19686280dd3439690ba1dcfa6a595 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Wed, 14 Jun 2023 14:52:54 +0200 Subject: [PATCH 03/15] fix: update @asyncapi/parser to 2.0.3 version (#648) --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 22517f116be..be0f2edb821 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ "@asyncapi/modelina": "^1.8.4", "@asyncapi/openapi-schema-parser": "^3.0.0", "@asyncapi/optimizer": "^0.1.18", - "@asyncapi/parser": "^2.0.2", + "@asyncapi/parser": "^2.0.3", "@asyncapi/raml-dt-schema-parser": "^4.0.2", "@asyncapi/studio": "^0.17.3", "@oclif/core": "^1.26.2", @@ -549,9 +549,9 @@ } }, "node_modules/@asyncapi/parser": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@asyncapi/parser/-/parser-2.0.2.tgz", - "integrity": "sha512-VYQSa/nYt6IYQMijr84tavfKn4qQheKDLzGM/rY/PUyikn7G8PM+lC6QmtNg84dHMq/Kahxe+yc9B3TfIXDJ2w==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@asyncapi/parser/-/parser-2.0.3.tgz", + "integrity": "sha512-2gtIQOaCz8sR70JFREpg6UwgUBboC/26JcAGySkXY/f1ayjcfDoNLi4LsDvmu6G21qLrGN2lI83i8iLG1AzTAw==", "dependencies": { "@asyncapi/specs": "^5.1.0", "@openapi-contrib/openapi-schema-to-json-schema": "~3.2.0", @@ -23927,9 +23927,9 @@ } }, "@asyncapi/parser": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@asyncapi/parser/-/parser-2.0.2.tgz", - "integrity": "sha512-VYQSa/nYt6IYQMijr84tavfKn4qQheKDLzGM/rY/PUyikn7G8PM+lC6QmtNg84dHMq/Kahxe+yc9B3TfIXDJ2w==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@asyncapi/parser/-/parser-2.0.3.tgz", + "integrity": "sha512-2gtIQOaCz8sR70JFREpg6UwgUBboC/26JcAGySkXY/f1ayjcfDoNLi4LsDvmu6G21qLrGN2lI83i8iLG1AzTAw==", "requires": { "@asyncapi/specs": "^5.1.0", "@openapi-contrib/openapi-schema-to-json-schema": "~3.2.0", diff --git a/package.json b/package.json index 7db48c50c20..6cebd4e55ce 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "@asyncapi/modelina": "^1.8.4", "@asyncapi/openapi-schema-parser": "^3.0.0", "@asyncapi/optimizer": "^0.1.18", - "@asyncapi/parser": "^2.0.2", + "@asyncapi/parser": "^2.0.3", "@asyncapi/raml-dt-schema-parser": "^4.0.2", "@asyncapi/studio": "^0.17.3", "@oclif/core": "^1.26.2", From 8d14a3ddc4a77efab75e7c632d0169a2d3d1ebed Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Wed, 14 Jun 2023 15:09:08 +0200 Subject: [PATCH 04/15] fix: update @asyncapi/generator to 1.10.7 version (#649) --- package-lock.json | 22 +++++++++++----------- package.json | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index be0f2edb821..98ac604b3d2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "@asyncapi/bundler": "^0.3.8", "@asyncapi/converter": "^1.2.0", "@asyncapi/diff": "^0.4.1", - "@asyncapi/generator": "^1.10.5", + "@asyncapi/generator": "^1.10.7", "@asyncapi/modelina": "^1.8.4", "@asyncapi/openapi-schema-parser": "^3.0.0", "@asyncapi/optimizer": "^0.1.18", @@ -258,14 +258,14 @@ } }, "node_modules/@asyncapi/generator": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/@asyncapi/generator/-/generator-1.10.5.tgz", - "integrity": "sha512-E4gAyvrsx3kgcFNvII9Yp0dGIMCkzjI+YiKZY+y0bcMxUxP6ooO8WcX5G+5Dd4UQaPjyBCjV549J5uH0ZqxEMQ==", + "version": "1.10.7", + "resolved": "https://registry.npmjs.org/@asyncapi/generator/-/generator-1.10.7.tgz", + "integrity": "sha512-oOkUryddBR8F/OgQGuE0w+vOLhJsYPWOrMHwC+GB6NC1SmxWijV8yr25oSU322l+boujndJX6LNfiHSBDBO4zQ==", "dependencies": { "@asyncapi/avro-schema-parser": "^3.0.0", "@asyncapi/generator-react-sdk": "^0.2.23", - "@asyncapi/openapi-schema-parser": "^3.0.1", - "@asyncapi/parser": "^2.0.2", + "@asyncapi/openapi-schema-parser": "^3.0.2", + "@asyncapi/parser": "^2.0.3", "@asyncapi/raml-dt-schema-parser": "^4.0.1", "@npmcli/arborist": "^2.2.4", "ajv": "^8.12.0", @@ -23679,14 +23679,14 @@ } }, "@asyncapi/generator": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/@asyncapi/generator/-/generator-1.10.5.tgz", - "integrity": "sha512-E4gAyvrsx3kgcFNvII9Yp0dGIMCkzjI+YiKZY+y0bcMxUxP6ooO8WcX5G+5Dd4UQaPjyBCjV549J5uH0ZqxEMQ==", + "version": "1.10.7", + "resolved": "https://registry.npmjs.org/@asyncapi/generator/-/generator-1.10.7.tgz", + "integrity": "sha512-oOkUryddBR8F/OgQGuE0w+vOLhJsYPWOrMHwC+GB6NC1SmxWijV8yr25oSU322l+boujndJX6LNfiHSBDBO4zQ==", "requires": { "@asyncapi/avro-schema-parser": "^3.0.0", "@asyncapi/generator-react-sdk": "^0.2.23", - "@asyncapi/openapi-schema-parser": "^3.0.1", - "@asyncapi/parser": "^2.0.2", + "@asyncapi/openapi-schema-parser": "^3.0.2", + "@asyncapi/parser": "^2.0.3", "@asyncapi/raml-dt-schema-parser": "^4.0.1", "@npmcli/arborist": "^2.2.4", "ajv": "^8.12.0", diff --git a/package.json b/package.json index 6cebd4e55ce..121bbd4f8d7 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "@asyncapi/bundler": "^0.3.8", "@asyncapi/converter": "^1.2.0", "@asyncapi/diff": "^0.4.1", - "@asyncapi/generator": "^1.10.5", + "@asyncapi/generator": "^1.10.7", "@asyncapi/modelina": "^1.8.4", "@asyncapi/openapi-schema-parser": "^3.0.0", "@asyncapi/optimizer": "^0.1.18", From 9686521bb81c516bdaeab33417d6edb30c8ae27b Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Wed, 14 Jun 2023 15:22:59 +0200 Subject: [PATCH 05/15] chore(release): v0.48.1 (#652) --- docs/usage.md | 20 ++++++++++---------- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/usage.md b/docs/usage.md index a1abdfb2d0d..7eddb971c6b 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -29,7 +29,7 @@ $ npm install -g @asyncapi/cli $ asyncapi COMMAND running command... $ asyncapi (--version) -@asyncapi/cli/0.47.9 linux-x64 node-v18.16.0 +@asyncapi/cli/0.48.0 linux-x64 node-v18.16.0 $ asyncapi --help [COMMAND] USAGE $ asyncapi COMMAND @@ -91,7 +91,7 @@ EXAMPLES $ asyncapi bundle ./asyncapi.yaml ./features.yaml --base ./asyncapi.yaml --reference-into-components ``` -_See code: [src/commands/bundle.ts](https://github.com/asyncapi/cli/blob/v0.47.9/src/commands/bundle.ts)_ +_See code: [src/commands/bundle.ts](https://github.com/asyncapi/cli/blob/v0.48.0/src/commands/bundle.ts)_ ## `asyncapi config` @@ -105,7 +105,7 @@ DESCRIPTION CLI config settings ``` -_See code: [src/commands/config/index.ts](https://github.com/asyncapi/cli/blob/v0.47.9/src/commands/config/index.ts)_ +_See code: [src/commands/config/index.ts](https://github.com/asyncapi/cli/blob/v0.48.0/src/commands/config/index.ts)_ ## `asyncapi config context` @@ -234,7 +234,7 @@ DESCRIPTION Convert asyncapi documents older to newer versions ``` -_See code: [src/commands/convert.ts](https://github.com/asyncapi/cli/blob/v0.47.9/src/commands/convert.ts)_ +_See code: [src/commands/convert.ts](https://github.com/asyncapi/cli/blob/v0.48.0/src/commands/convert.ts)_ ## `asyncapi diff OLD NEW` @@ -270,7 +270,7 @@ DESCRIPTION Find diff between two asyncapi files ``` -_See code: [src/commands/diff.ts](https://github.com/asyncapi/cli/blob/v0.47.9/src/commands/diff.ts)_ +_See code: [src/commands/diff.ts](https://github.com/asyncapi/cli/blob/v0.48.0/src/commands/diff.ts)_ ## `asyncapi generate` @@ -284,7 +284,7 @@ DESCRIPTION Generate typed models or other things like clients, applications or docs using AsyncAPI Generator templates. ``` -_See code: [src/commands/generate/index.ts](https://github.com/asyncapi/cli/blob/v0.47.9/src/commands/generate/index.ts)_ +_See code: [src/commands/generate/index.ts](https://github.com/asyncapi/cli/blob/v0.48.0/src/commands/generate/index.ts)_ ## `asyncapi generate fromTemplate ASYNCAPI TEMPLATE` @@ -408,7 +408,7 @@ DESCRIPTION Creates a new asyncapi file ``` -_See code: [src/commands/new/index.ts](https://github.com/asyncapi/cli/blob/v0.47.9/src/commands/new/index.ts)_ +_See code: [src/commands/new/index.ts](https://github.com/asyncapi/cli/blob/v0.48.0/src/commands/new/index.ts)_ ## `asyncapi new file` @@ -496,7 +496,7 @@ EXAMPLES $ asyncapi optimize ./asyncapi.yaml --optimization=remove-components,reuse-components,move-to-components --output=terminal --no-tty ``` -_See code: [src/commands/optimize.ts](https://github.com/asyncapi/cli/blob/v0.47.9/src/commands/optimize.ts)_ +_See code: [src/commands/optimize.ts](https://github.com/asyncapi/cli/blob/v0.48.0/src/commands/optimize.ts)_ ## `asyncapi start` @@ -510,7 +510,7 @@ DESCRIPTION Start asyncapi studio ``` -_See code: [src/commands/start/index.ts](https://github.com/asyncapi/cli/blob/v0.47.9/src/commands/start/index.ts)_ +_See code: [src/commands/start/index.ts](https://github.com/asyncapi/cli/blob/v0.48.0/src/commands/start/index.ts)_ ## `asyncapi start studio` @@ -554,5 +554,5 @@ DESCRIPTION validate asyncapi file ``` -_See code: [src/commands/validate.ts](https://github.com/asyncapi/cli/blob/v0.47.9/src/commands/validate.ts)_ +_See code: [src/commands/validate.ts](https://github.com/asyncapi/cli/blob/v0.48.0/src/commands/validate.ts)_ diff --git a/package-lock.json b/package-lock.json index 98ac604b3d2..60b7c832aa7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@asyncapi/cli", - "version": "0.48.0", + "version": "0.48.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@asyncapi/cli", - "version": "0.48.0", + "version": "0.48.1", "license": "Apache-2.0", "dependencies": { "@asyncapi/avro-schema-parser": "^3.0.1", diff --git a/package.json b/package.json index 121bbd4f8d7..dea72567e41 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@asyncapi/cli", "description": "All in one CLI for all AsyncAPI tools", - "version": "0.48.0", + "version": "0.48.1", "author": "@asyncapi", "bin": { "asyncapi": "./bin/run" From cb97718994f4605221c7c14f4c917c94a3544817 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Wed, 14 Jun 2023 16:00:57 +0200 Subject: [PATCH 06/15] fix: update @asyncapi/generator to 1.10.8 version (#654) --- package-lock.json | 34 +++++++++++++++++----------------- package.json | 2 +- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/package-lock.json b/package-lock.json index 60b7c832aa7..f4d0b738872 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "@asyncapi/bundler": "^0.3.8", "@asyncapi/converter": "^1.2.0", "@asyncapi/diff": "^0.4.1", - "@asyncapi/generator": "^1.10.7", + "@asyncapi/generator": "^1.10.8", "@asyncapi/modelina": "^1.8.4", "@asyncapi/openapi-schema-parser": "^3.0.0", "@asyncapi/optimizer": "^0.1.18", @@ -258,13 +258,13 @@ } }, "node_modules/@asyncapi/generator": { - "version": "1.10.7", - "resolved": "https://registry.npmjs.org/@asyncapi/generator/-/generator-1.10.7.tgz", - "integrity": "sha512-oOkUryddBR8F/OgQGuE0w+vOLhJsYPWOrMHwC+GB6NC1SmxWijV8yr25oSU322l+boujndJX6LNfiHSBDBO4zQ==", + "version": "1.10.8", + "resolved": "https://registry.npmjs.org/@asyncapi/generator/-/generator-1.10.8.tgz", + "integrity": "sha512-tdIXMTM0L43B//kRpHboY5N0anHzSjGEzqGXsu6s05CjyNK1R+/PKQTM5w12hrKfyEWkhEYT523LJhV58cU7Kg==", "dependencies": { "@asyncapi/avro-schema-parser": "^3.0.0", "@asyncapi/generator-react-sdk": "^0.2.23", - "@asyncapi/openapi-schema-parser": "^3.0.2", + "@asyncapi/openapi-schema-parser": "^3.0.3", "@asyncapi/parser": "^2.0.3", "@asyncapi/raml-dt-schema-parser": "^4.0.1", "@npmcli/arborist": "^2.2.4", @@ -458,11 +458,11 @@ } }, "node_modules/@asyncapi/openapi-schema-parser": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@asyncapi/openapi-schema-parser/-/openapi-schema-parser-3.0.2.tgz", - "integrity": "sha512-+VD3Ro/Z5u83mB9nNN8oLHEJnfDascHhZwaqzTYeVbBhwwwOkp2QI8ozbphPqmtcfbMBH64pPGscSAWSwrnSVA==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@asyncapi/openapi-schema-parser/-/openapi-schema-parser-3.0.3.tgz", + "integrity": "sha512-R78pdOmkbWEnzYKAfx7PYUMJuR3hrReGJ0nfyUXs/nSz+yjH4kl2VHPmF2icKOpShdpv0nBkN0pup3w4D53FrQ==", "dependencies": { - "@asyncapi/parser": "^2.0.2", + "@asyncapi/parser": "^2.0.3", "@openapi-contrib/openapi-schema-to-json-schema": "~3.2.0", "ajv": "^8.11.0", "ajv-errors": "^3.0.0", @@ -23679,13 +23679,13 @@ } }, "@asyncapi/generator": { - "version": "1.10.7", - "resolved": "https://registry.npmjs.org/@asyncapi/generator/-/generator-1.10.7.tgz", - "integrity": "sha512-oOkUryddBR8F/OgQGuE0w+vOLhJsYPWOrMHwC+GB6NC1SmxWijV8yr25oSU322l+boujndJX6LNfiHSBDBO4zQ==", + "version": "1.10.8", + "resolved": "https://registry.npmjs.org/@asyncapi/generator/-/generator-1.10.8.tgz", + "integrity": "sha512-tdIXMTM0L43B//kRpHboY5N0anHzSjGEzqGXsu6s05CjyNK1R+/PKQTM5w12hrKfyEWkhEYT523LJhV58cU7Kg==", "requires": { "@asyncapi/avro-schema-parser": "^3.0.0", "@asyncapi/generator-react-sdk": "^0.2.23", - "@asyncapi/openapi-schema-parser": "^3.0.2", + "@asyncapi/openapi-schema-parser": "^3.0.3", "@asyncapi/parser": "^2.0.3", "@asyncapi/raml-dt-schema-parser": "^4.0.1", "@npmcli/arborist": "^2.2.4", @@ -23843,11 +23843,11 @@ } }, "@asyncapi/openapi-schema-parser": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@asyncapi/openapi-schema-parser/-/openapi-schema-parser-3.0.2.tgz", - "integrity": "sha512-+VD3Ro/Z5u83mB9nNN8oLHEJnfDascHhZwaqzTYeVbBhwwwOkp2QI8ozbphPqmtcfbMBH64pPGscSAWSwrnSVA==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@asyncapi/openapi-schema-parser/-/openapi-schema-parser-3.0.3.tgz", + "integrity": "sha512-R78pdOmkbWEnzYKAfx7PYUMJuR3hrReGJ0nfyUXs/nSz+yjH4kl2VHPmF2icKOpShdpv0nBkN0pup3w4D53FrQ==", "requires": { - "@asyncapi/parser": "^2.0.2", + "@asyncapi/parser": "^2.0.3", "@openapi-contrib/openapi-schema-to-json-schema": "~3.2.0", "ajv": "^8.11.0", "ajv-errors": "^3.0.0", diff --git a/package.json b/package.json index dea72567e41..61d60b45cbf 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "@asyncapi/bundler": "^0.3.8", "@asyncapi/converter": "^1.2.0", "@asyncapi/diff": "^0.4.1", - "@asyncapi/generator": "^1.10.7", + "@asyncapi/generator": "^1.10.8", "@asyncapi/modelina": "^1.8.4", "@asyncapi/openapi-schema-parser": "^3.0.0", "@asyncapi/optimizer": "^0.1.18", From f9397d4dff39bce1b21dd0860bf9239742ce1bd1 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Thu, 15 Jun 2023 07:50:50 +0200 Subject: [PATCH 07/15] fix: update @asyncapi/openapi-schema-parser to 3.0.3 version (#650) Co-authored-by: asyncapi-bot-eve %0ACo-authored-by: asyncapi-bot --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index f4d0b738872..3784de3f44e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,7 +15,7 @@ "@asyncapi/diff": "^0.4.1", "@asyncapi/generator": "^1.10.8", "@asyncapi/modelina": "^1.8.4", - "@asyncapi/openapi-schema-parser": "^3.0.0", + "@asyncapi/openapi-schema-parser": "^3.0.3", "@asyncapi/optimizer": "^0.1.18", "@asyncapi/parser": "^2.0.3", "@asyncapi/raml-dt-schema-parser": "^4.0.2", diff --git a/package.json b/package.json index 61d60b45cbf..25bf7701c2d 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "@asyncapi/diff": "^0.4.1", "@asyncapi/generator": "^1.10.8", "@asyncapi/modelina": "^1.8.4", - "@asyncapi/openapi-schema-parser": "^3.0.0", + "@asyncapi/openapi-schema-parser": "^3.0.3", "@asyncapi/optimizer": "^0.1.18", "@asyncapi/parser": "^2.0.3", "@asyncapi/raml-dt-schema-parser": "^4.0.2", From ace3fcb647b3bcff177dd37ec926e5ee0f05ab7d Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Thu, 15 Jun 2023 07:59:57 +0200 Subject: [PATCH 08/15] fix: update @asyncapi/avro-schema-parser to 3.0.2 version (#651) Co-authored-by: asyncapi-bot-eve %0ACo-authored-by: asyncapi-bot --- package-lock.json | 18 +++++++++--------- package.json | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3784de3f44e..e755e215a9c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "0.48.1", "license": "Apache-2.0", "dependencies": { - "@asyncapi/avro-schema-parser": "^3.0.1", + "@asyncapi/avro-schema-parser": "^3.0.2", "@asyncapi/bundler": "^0.3.8", "@asyncapi/converter": "^1.2.0", "@asyncapi/diff": "^0.4.1", @@ -178,11 +178,11 @@ } }, "node_modules/@asyncapi/avro-schema-parser": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@asyncapi/avro-schema-parser/-/avro-schema-parser-3.0.1.tgz", - "integrity": "sha512-jXovhjvkFQvcv9PfTldS7jRAWuExLkeQKn/2HQf8vAR9azCVw63GfqJQ3HBPlouWt0CoS2VtGu/SpN2MS8Li8Q==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@asyncapi/avro-schema-parser/-/avro-schema-parser-3.0.2.tgz", + "integrity": "sha512-TZZedLaflgyYivwidJPqTN2LMk+Lqg0IByXtdzNYQZLNpLpcyEnXCxongoW0TVYgYGLWAghN3AmMOrrsVcGGOw==", "dependencies": { - "@asyncapi/parser": "^2.0.1", + "@asyncapi/parser": "^2.0.3", "@types/json-schema": "^7.0.11", "avsc": "^5.7.6" } @@ -23604,11 +23604,11 @@ } }, "@asyncapi/avro-schema-parser": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@asyncapi/avro-schema-parser/-/avro-schema-parser-3.0.1.tgz", - "integrity": "sha512-jXovhjvkFQvcv9PfTldS7jRAWuExLkeQKn/2HQf8vAR9azCVw63GfqJQ3HBPlouWt0CoS2VtGu/SpN2MS8Li8Q==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@asyncapi/avro-schema-parser/-/avro-schema-parser-3.0.2.tgz", + "integrity": "sha512-TZZedLaflgyYivwidJPqTN2LMk+Lqg0IByXtdzNYQZLNpLpcyEnXCxongoW0TVYgYGLWAghN3AmMOrrsVcGGOw==", "requires": { - "@asyncapi/parser": "^2.0.1", + "@asyncapi/parser": "^2.0.3", "@types/json-schema": "^7.0.11", "avsc": "^5.7.6" } diff --git a/package.json b/package.json index 25bf7701c2d..700569e0297 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ }, "bugs": "https://github.com/asyncapi/cli/issues", "dependencies": { - "@asyncapi/avro-schema-parser": "^3.0.1", + "@asyncapi/avro-schema-parser": "^3.0.2", "@asyncapi/bundler": "^0.3.8", "@asyncapi/converter": "^1.2.0", "@asyncapi/diff": "^0.4.1", From 27cc7d859460a604ce73bbb72078c53862819568 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Thu, 15 Jun 2023 08:20:26 +0200 Subject: [PATCH 09/15] chore(release): v0.48.2 (#656) Co-authored-by: asyncapi-bot-eve %0ACo-authored-by: asyncapi-bot --- docs/usage.md | 20 ++++++++++---------- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/usage.md b/docs/usage.md index 7eddb971c6b..5330d44929f 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -29,7 +29,7 @@ $ npm install -g @asyncapi/cli $ asyncapi COMMAND running command... $ asyncapi (--version) -@asyncapi/cli/0.48.0 linux-x64 node-v18.16.0 +@asyncapi/cli/0.48.1 linux-x64 node-v18.16.0 $ asyncapi --help [COMMAND] USAGE $ asyncapi COMMAND @@ -91,7 +91,7 @@ EXAMPLES $ asyncapi bundle ./asyncapi.yaml ./features.yaml --base ./asyncapi.yaml --reference-into-components ``` -_See code: [src/commands/bundle.ts](https://github.com/asyncapi/cli/blob/v0.48.0/src/commands/bundle.ts)_ +_See code: [src/commands/bundle.ts](https://github.com/asyncapi/cli/blob/v0.48.1/src/commands/bundle.ts)_ ## `asyncapi config` @@ -105,7 +105,7 @@ DESCRIPTION CLI config settings ``` -_See code: [src/commands/config/index.ts](https://github.com/asyncapi/cli/blob/v0.48.0/src/commands/config/index.ts)_ +_See code: [src/commands/config/index.ts](https://github.com/asyncapi/cli/blob/v0.48.1/src/commands/config/index.ts)_ ## `asyncapi config context` @@ -234,7 +234,7 @@ DESCRIPTION Convert asyncapi documents older to newer versions ``` -_See code: [src/commands/convert.ts](https://github.com/asyncapi/cli/blob/v0.48.0/src/commands/convert.ts)_ +_See code: [src/commands/convert.ts](https://github.com/asyncapi/cli/blob/v0.48.1/src/commands/convert.ts)_ ## `asyncapi diff OLD NEW` @@ -270,7 +270,7 @@ DESCRIPTION Find diff between two asyncapi files ``` -_See code: [src/commands/diff.ts](https://github.com/asyncapi/cli/blob/v0.48.0/src/commands/diff.ts)_ +_See code: [src/commands/diff.ts](https://github.com/asyncapi/cli/blob/v0.48.1/src/commands/diff.ts)_ ## `asyncapi generate` @@ -284,7 +284,7 @@ DESCRIPTION Generate typed models or other things like clients, applications or docs using AsyncAPI Generator templates. ``` -_See code: [src/commands/generate/index.ts](https://github.com/asyncapi/cli/blob/v0.48.0/src/commands/generate/index.ts)_ +_See code: [src/commands/generate/index.ts](https://github.com/asyncapi/cli/blob/v0.48.1/src/commands/generate/index.ts)_ ## `asyncapi generate fromTemplate ASYNCAPI TEMPLATE` @@ -408,7 +408,7 @@ DESCRIPTION Creates a new asyncapi file ``` -_See code: [src/commands/new/index.ts](https://github.com/asyncapi/cli/blob/v0.48.0/src/commands/new/index.ts)_ +_See code: [src/commands/new/index.ts](https://github.com/asyncapi/cli/blob/v0.48.1/src/commands/new/index.ts)_ ## `asyncapi new file` @@ -496,7 +496,7 @@ EXAMPLES $ asyncapi optimize ./asyncapi.yaml --optimization=remove-components,reuse-components,move-to-components --output=terminal --no-tty ``` -_See code: [src/commands/optimize.ts](https://github.com/asyncapi/cli/blob/v0.48.0/src/commands/optimize.ts)_ +_See code: [src/commands/optimize.ts](https://github.com/asyncapi/cli/blob/v0.48.1/src/commands/optimize.ts)_ ## `asyncapi start` @@ -510,7 +510,7 @@ DESCRIPTION Start asyncapi studio ``` -_See code: [src/commands/start/index.ts](https://github.com/asyncapi/cli/blob/v0.48.0/src/commands/start/index.ts)_ +_See code: [src/commands/start/index.ts](https://github.com/asyncapi/cli/blob/v0.48.1/src/commands/start/index.ts)_ ## `asyncapi start studio` @@ -554,5 +554,5 @@ DESCRIPTION validate asyncapi file ``` -_See code: [src/commands/validate.ts](https://github.com/asyncapi/cli/blob/v0.48.0/src/commands/validate.ts)_ +_See code: [src/commands/validate.ts](https://github.com/asyncapi/cli/blob/v0.48.1/src/commands/validate.ts)_ diff --git a/package-lock.json b/package-lock.json index e755e215a9c..b7f4b3ea16f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@asyncapi/cli", - "version": "0.48.1", + "version": "0.48.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@asyncapi/cli", - "version": "0.48.1", + "version": "0.48.2", "license": "Apache-2.0", "dependencies": { "@asyncapi/avro-schema-parser": "^3.0.2", diff --git a/package.json b/package.json index 700569e0297..331232ec294 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@asyncapi/cli", "description": "All in one CLI for all AsyncAPI tools", - "version": "0.48.1", + "version": "0.48.2", "author": "@asyncapi", "bin": { "asyncapi": "./bin/run" From f8fd6f20369b8f0600693ac4b9b91ac5b462b68f Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Thu, 15 Jun 2023 08:28:02 +0200 Subject: [PATCH 10/15] fix: update @asyncapi/raml-dt-schema-parser to 4.0.3 version (#653) Co-authored-by: asyncapi-bot-eve %0ACo-authored-by: asyncapi-bot --- package-lock.json | 18 +++++++++--------- package.json | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index b7f4b3ea16f..d9ef7fbc7cf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,7 +18,7 @@ "@asyncapi/openapi-schema-parser": "^3.0.3", "@asyncapi/optimizer": "^0.1.18", "@asyncapi/parser": "^2.0.3", - "@asyncapi/raml-dt-schema-parser": "^4.0.2", + "@asyncapi/raml-dt-schema-parser": "^4.0.3", "@asyncapi/studio": "^0.17.3", "@oclif/core": "^1.26.2", "@oclif/errors": "^1.3.6", @@ -597,11 +597,11 @@ } }, "node_modules/@asyncapi/raml-dt-schema-parser": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@asyncapi/raml-dt-schema-parser/-/raml-dt-schema-parser-4.0.2.tgz", - "integrity": "sha512-9XiHDTipurmui0BryZ3iGkccw1Qp8OV0GQhjn4H2dhoLf6KNTfp4uYhpBfo3NOP2wRLzDyE9aaRsOnBTRzKRgQ==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@asyncapi/raml-dt-schema-parser/-/raml-dt-schema-parser-4.0.3.tgz", + "integrity": "sha512-HYqFOS9wVhkmPLJ84dMP465yDXkElNQSiHb66NNHbNycfXqKTzqCTn7U9iy5w+pTfqKL1w98LlTz1K1jAez9aw==", "dependencies": { - "@asyncapi/parser": "^2.0.2", + "@asyncapi/parser": "^2.0.3", "js-yaml": "^4.1.0", "ramldt2jsonschema": "^1.2.3", "webapi-parser": "^0.5.0" @@ -23974,11 +23974,11 @@ } }, "@asyncapi/raml-dt-schema-parser": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@asyncapi/raml-dt-schema-parser/-/raml-dt-schema-parser-4.0.2.tgz", - "integrity": "sha512-9XiHDTipurmui0BryZ3iGkccw1Qp8OV0GQhjn4H2dhoLf6KNTfp4uYhpBfo3NOP2wRLzDyE9aaRsOnBTRzKRgQ==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@asyncapi/raml-dt-schema-parser/-/raml-dt-schema-parser-4.0.3.tgz", + "integrity": "sha512-HYqFOS9wVhkmPLJ84dMP465yDXkElNQSiHb66NNHbNycfXqKTzqCTn7U9iy5w+pTfqKL1w98LlTz1K1jAez9aw==", "requires": { - "@asyncapi/parser": "^2.0.2", + "@asyncapi/parser": "^2.0.3", "js-yaml": "^4.1.0", "ramldt2jsonschema": "^1.2.3", "webapi-parser": "^0.5.0" diff --git a/package.json b/package.json index 331232ec294..ce0ee0d5fa2 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "@asyncapi/openapi-schema-parser": "^3.0.3", "@asyncapi/optimizer": "^0.1.18", "@asyncapi/parser": "^2.0.3", - "@asyncapi/raml-dt-schema-parser": "^4.0.2", + "@asyncapi/raml-dt-schema-parser": "^4.0.3", "@asyncapi/studio": "^0.17.3", "@oclif/core": "^1.26.2", "@oclif/errors": "^1.3.6", From f4a2f805ac41f3359dcb08a973e0efb129ae8c1f Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Thu, 15 Jun 2023 08:38:21 +0200 Subject: [PATCH 11/15] chore(release): v0.48.4 (#659) --- docs/usage.md | 20 ++++++++++---------- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/usage.md b/docs/usage.md index 5330d44929f..29c1ae22e48 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -29,7 +29,7 @@ $ npm install -g @asyncapi/cli $ asyncapi COMMAND running command... $ asyncapi (--version) -@asyncapi/cli/0.48.1 linux-x64 node-v18.16.0 +@asyncapi/cli/0.48.2 linux-x64 node-v18.16.0 $ asyncapi --help [COMMAND] USAGE $ asyncapi COMMAND @@ -91,7 +91,7 @@ EXAMPLES $ asyncapi bundle ./asyncapi.yaml ./features.yaml --base ./asyncapi.yaml --reference-into-components ``` -_See code: [src/commands/bundle.ts](https://github.com/asyncapi/cli/blob/v0.48.1/src/commands/bundle.ts)_ +_See code: [src/commands/bundle.ts](https://github.com/asyncapi/cli/blob/v0.48.2/src/commands/bundle.ts)_ ## `asyncapi config` @@ -105,7 +105,7 @@ DESCRIPTION CLI config settings ``` -_See code: [src/commands/config/index.ts](https://github.com/asyncapi/cli/blob/v0.48.1/src/commands/config/index.ts)_ +_See code: [src/commands/config/index.ts](https://github.com/asyncapi/cli/blob/v0.48.2/src/commands/config/index.ts)_ ## `asyncapi config context` @@ -234,7 +234,7 @@ DESCRIPTION Convert asyncapi documents older to newer versions ``` -_See code: [src/commands/convert.ts](https://github.com/asyncapi/cli/blob/v0.48.1/src/commands/convert.ts)_ +_See code: [src/commands/convert.ts](https://github.com/asyncapi/cli/blob/v0.48.2/src/commands/convert.ts)_ ## `asyncapi diff OLD NEW` @@ -270,7 +270,7 @@ DESCRIPTION Find diff between two asyncapi files ``` -_See code: [src/commands/diff.ts](https://github.com/asyncapi/cli/blob/v0.48.1/src/commands/diff.ts)_ +_See code: [src/commands/diff.ts](https://github.com/asyncapi/cli/blob/v0.48.2/src/commands/diff.ts)_ ## `asyncapi generate` @@ -284,7 +284,7 @@ DESCRIPTION Generate typed models or other things like clients, applications or docs using AsyncAPI Generator templates. ``` -_See code: [src/commands/generate/index.ts](https://github.com/asyncapi/cli/blob/v0.48.1/src/commands/generate/index.ts)_ +_See code: [src/commands/generate/index.ts](https://github.com/asyncapi/cli/blob/v0.48.2/src/commands/generate/index.ts)_ ## `asyncapi generate fromTemplate ASYNCAPI TEMPLATE` @@ -408,7 +408,7 @@ DESCRIPTION Creates a new asyncapi file ``` -_See code: [src/commands/new/index.ts](https://github.com/asyncapi/cli/blob/v0.48.1/src/commands/new/index.ts)_ +_See code: [src/commands/new/index.ts](https://github.com/asyncapi/cli/blob/v0.48.2/src/commands/new/index.ts)_ ## `asyncapi new file` @@ -496,7 +496,7 @@ EXAMPLES $ asyncapi optimize ./asyncapi.yaml --optimization=remove-components,reuse-components,move-to-components --output=terminal --no-tty ``` -_See code: [src/commands/optimize.ts](https://github.com/asyncapi/cli/blob/v0.48.1/src/commands/optimize.ts)_ +_See code: [src/commands/optimize.ts](https://github.com/asyncapi/cli/blob/v0.48.2/src/commands/optimize.ts)_ ## `asyncapi start` @@ -510,7 +510,7 @@ DESCRIPTION Start asyncapi studio ``` -_See code: [src/commands/start/index.ts](https://github.com/asyncapi/cli/blob/v0.48.1/src/commands/start/index.ts)_ +_See code: [src/commands/start/index.ts](https://github.com/asyncapi/cli/blob/v0.48.2/src/commands/start/index.ts)_ ## `asyncapi start studio` @@ -554,5 +554,5 @@ DESCRIPTION validate asyncapi file ``` -_See code: [src/commands/validate.ts](https://github.com/asyncapi/cli/blob/v0.48.1/src/commands/validate.ts)_ +_See code: [src/commands/validate.ts](https://github.com/asyncapi/cli/blob/v0.48.2/src/commands/validate.ts)_ diff --git a/package-lock.json b/package-lock.json index d9ef7fbc7cf..ab9e7a68fa9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@asyncapi/cli", - "version": "0.48.2", + "version": "0.48.4", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@asyncapi/cli", - "version": "0.48.2", + "version": "0.48.4", "license": "Apache-2.0", "dependencies": { "@asyncapi/avro-schema-parser": "^3.0.2", diff --git a/package.json b/package.json index ce0ee0d5fa2..2a42fb9c530 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@asyncapi/cli", "description": "All in one CLI for all AsyncAPI tools", - "version": "0.48.2", + "version": "0.48.4", "author": "@asyncapi", "bin": { "asyncapi": "./bin/run" From 05ec6b50edcf18d138e09a6d0a2fa25fab75d467 Mon Sep 17 00:00:00 2001 From: Aayush Sahu Date: Thu, 15 Jun 2023 14:03:10 +0530 Subject: [PATCH 12/15] fix: diff output error for yaml output (#657) --- src/commands/diff.ts | 13 ++++++++----- test/commands/diff.test.ts | 14 ++++++++++++++ 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/src/commands/diff.ts b/src/commands/diff.ts index 0ca1a93e7dd..bb992b334f7 100644 --- a/src/commands/diff.ts +++ b/src/commands/diff.ts @@ -150,11 +150,11 @@ export default class Diff extends Command { ); } if (!noError) { - throwOnBreakingChange(diffOutput); + throwOnBreakingChange(diffOutput, outputFormat); } } catch (error) { if (error instanceof DiffBreakingChangeError) { - throw error; + this.error(error); } throw new ValidationError({ type: 'parser-error', @@ -238,9 +238,12 @@ const enableWatch = (status: boolean, watcher: SpecWatcherParams) => { /** * Throws `DiffBreakingChangeError` when breaking changes are detected */ -function throwOnBreakingChange(diffOutput: AsyncAPIDiff) { +function throwOnBreakingChange(diffOutput: AsyncAPIDiff, outputFormat: string) { const breakingChanges = diffOutput.breaking(); - if (breakingChanges.length !== 0) { + if ( + (outputFormat === 'json' && breakingChanges.length !== 0) || + ((outputFormat === 'yaml' || outputFormat === 'yml') && breakingChanges !== '[]\n') + ) { throw new DiffBreakingChangeError(); - } + } } diff --git a/test/commands/diff.test.ts b/test/commands/diff.test.ts index 0b7be57f4a3..46651f97269 100644 --- a/test/commands/diff.test.ts +++ b/test/commands/diff.test.ts @@ -17,6 +17,20 @@ describe('diff', () => { done(); }); }); + + describe('yaml output: with file paths, and there are no difference between the files', () => { + test + .stderr() + .stdout() + .command(['diff', './test/specification.yml', './test/specification.yml']) + .it('works when file path is passed', (ctx, done) => { + expect(JSON.stringify(ctx.stdout)).toEqual( + '"changes: []\\n\\n"' + ); + expect(ctx.stderr).toEqual(''); + done(); + }); + }); describe('with file paths, and getting all changes', () => { test From da7df00dc8788b382fd17a7b8a6ff0c9ac35ba46 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Thu, 15 Jun 2023 10:43:11 +0200 Subject: [PATCH 13/15] chore(release): v0.48.5 (#660) --- docs/usage.md | 20 ++++++++++---------- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/usage.md b/docs/usage.md index 29c1ae22e48..71e3cc4f68e 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -29,7 +29,7 @@ $ npm install -g @asyncapi/cli $ asyncapi COMMAND running command... $ asyncapi (--version) -@asyncapi/cli/0.48.2 linux-x64 node-v18.16.0 +@asyncapi/cli/0.48.4 linux-x64 node-v18.16.0 $ asyncapi --help [COMMAND] USAGE $ asyncapi COMMAND @@ -91,7 +91,7 @@ EXAMPLES $ asyncapi bundle ./asyncapi.yaml ./features.yaml --base ./asyncapi.yaml --reference-into-components ``` -_See code: [src/commands/bundle.ts](https://github.com/asyncapi/cli/blob/v0.48.2/src/commands/bundle.ts)_ +_See code: [src/commands/bundle.ts](https://github.com/asyncapi/cli/blob/v0.48.4/src/commands/bundle.ts)_ ## `asyncapi config` @@ -105,7 +105,7 @@ DESCRIPTION CLI config settings ``` -_See code: [src/commands/config/index.ts](https://github.com/asyncapi/cli/blob/v0.48.2/src/commands/config/index.ts)_ +_See code: [src/commands/config/index.ts](https://github.com/asyncapi/cli/blob/v0.48.4/src/commands/config/index.ts)_ ## `asyncapi config context` @@ -234,7 +234,7 @@ DESCRIPTION Convert asyncapi documents older to newer versions ``` -_See code: [src/commands/convert.ts](https://github.com/asyncapi/cli/blob/v0.48.2/src/commands/convert.ts)_ +_See code: [src/commands/convert.ts](https://github.com/asyncapi/cli/blob/v0.48.4/src/commands/convert.ts)_ ## `asyncapi diff OLD NEW` @@ -270,7 +270,7 @@ DESCRIPTION Find diff between two asyncapi files ``` -_See code: [src/commands/diff.ts](https://github.com/asyncapi/cli/blob/v0.48.2/src/commands/diff.ts)_ +_See code: [src/commands/diff.ts](https://github.com/asyncapi/cli/blob/v0.48.4/src/commands/diff.ts)_ ## `asyncapi generate` @@ -284,7 +284,7 @@ DESCRIPTION Generate typed models or other things like clients, applications or docs using AsyncAPI Generator templates. ``` -_See code: [src/commands/generate/index.ts](https://github.com/asyncapi/cli/blob/v0.48.2/src/commands/generate/index.ts)_ +_See code: [src/commands/generate/index.ts](https://github.com/asyncapi/cli/blob/v0.48.4/src/commands/generate/index.ts)_ ## `asyncapi generate fromTemplate ASYNCAPI TEMPLATE` @@ -408,7 +408,7 @@ DESCRIPTION Creates a new asyncapi file ``` -_See code: [src/commands/new/index.ts](https://github.com/asyncapi/cli/blob/v0.48.2/src/commands/new/index.ts)_ +_See code: [src/commands/new/index.ts](https://github.com/asyncapi/cli/blob/v0.48.4/src/commands/new/index.ts)_ ## `asyncapi new file` @@ -496,7 +496,7 @@ EXAMPLES $ asyncapi optimize ./asyncapi.yaml --optimization=remove-components,reuse-components,move-to-components --output=terminal --no-tty ``` -_See code: [src/commands/optimize.ts](https://github.com/asyncapi/cli/blob/v0.48.2/src/commands/optimize.ts)_ +_See code: [src/commands/optimize.ts](https://github.com/asyncapi/cli/blob/v0.48.4/src/commands/optimize.ts)_ ## `asyncapi start` @@ -510,7 +510,7 @@ DESCRIPTION Start asyncapi studio ``` -_See code: [src/commands/start/index.ts](https://github.com/asyncapi/cli/blob/v0.48.2/src/commands/start/index.ts)_ +_See code: [src/commands/start/index.ts](https://github.com/asyncapi/cli/blob/v0.48.4/src/commands/start/index.ts)_ ## `asyncapi start studio` @@ -554,5 +554,5 @@ DESCRIPTION validate asyncapi file ``` -_See code: [src/commands/validate.ts](https://github.com/asyncapi/cli/blob/v0.48.2/src/commands/validate.ts)_ +_See code: [src/commands/validate.ts](https://github.com/asyncapi/cli/blob/v0.48.4/src/commands/validate.ts)_ diff --git a/package-lock.json b/package-lock.json index ab9e7a68fa9..d44526b9425 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@asyncapi/cli", - "version": "0.48.4", + "version": "0.48.5", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@asyncapi/cli", - "version": "0.48.4", + "version": "0.48.5", "license": "Apache-2.0", "dependencies": { "@asyncapi/avro-schema-parser": "^3.0.2", diff --git a/package.json b/package.json index 2a42fb9c530..4f12e19d41d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@asyncapi/cli", "description": "All in one CLI for all AsyncAPI tools", - "version": "0.48.4", + "version": "0.48.5", "author": "@asyncapi", "bin": { "asyncapi": "./bin/run" From c12949bdf6152e43c50376d9b243c65a68f2ea2e Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Fri, 16 Jun 2023 04:44:23 +0200 Subject: [PATCH 14/15] fix: update @asyncapi/modelina to 1.8.6 version (#661) --- package-lock.json | 22 +++++++++++----------- package.json | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index d44526b9425..88efd5e43c5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "@asyncapi/converter": "^1.2.0", "@asyncapi/diff": "^0.4.1", "@asyncapi/generator": "^1.10.8", - "@asyncapi/modelina": "^1.8.4", + "@asyncapi/modelina": "^1.8.6", "@asyncapi/openapi-schema-parser": "^3.0.3", "@asyncapi/optimizer": "^0.1.18", "@asyncapi/parser": "^2.0.3", @@ -436,15 +436,15 @@ "link": true }, "node_modules/@asyncapi/modelina": { - "version": "1.8.4", - "resolved": "https://registry.npmjs.org/@asyncapi/modelina/-/modelina-1.8.4.tgz", - "integrity": "sha512-R/6wP2pRYtA4E4OIQmoz9Gl2OPZRpAwsTdNXyvUC+eMUsBbAj0EITH7m4mS0cNz6UD3/i9rm+1X24zMjzqNVhA==", + "version": "1.8.6", + "resolved": "https://registry.npmjs.org/@asyncapi/modelina/-/modelina-1.8.6.tgz", + "integrity": "sha512-Ie2sjW5Qgt0fqMj2YAOxDBzxZPFN2KaJ752E6MtYSSpCzj8T+pHVuTpSMyY2SUzxAfpWBbKGhpdHFnvOfcG28w==", "dependencies": { "@apidevtools/json-schema-ref-parser": "^9.0.9", "@apidevtools/swagger-parser": "^10.0.3", - "@asyncapi/avro-schema-parser": "^3.0.0", + "@asyncapi/avro-schema-parser": "^3.0.2", "@asyncapi/openapi-schema-parser": "^3.0.2", - "@asyncapi/parser": "^2.0.1", + "@asyncapi/parser": "^2.0.3", "@asyncapi/raml-dt-schema-parser": "^4.0.2", "@swc/core": "^1.3.5", "@swc/jest": "^0.2.23", @@ -23824,15 +23824,15 @@ } }, "@asyncapi/modelina": { - "version": "1.8.4", - "resolved": "https://registry.npmjs.org/@asyncapi/modelina/-/modelina-1.8.4.tgz", - "integrity": "sha512-R/6wP2pRYtA4E4OIQmoz9Gl2OPZRpAwsTdNXyvUC+eMUsBbAj0EITH7m4mS0cNz6UD3/i9rm+1X24zMjzqNVhA==", + "version": "1.8.6", + "resolved": "https://registry.npmjs.org/@asyncapi/modelina/-/modelina-1.8.6.tgz", + "integrity": "sha512-Ie2sjW5Qgt0fqMj2YAOxDBzxZPFN2KaJ752E6MtYSSpCzj8T+pHVuTpSMyY2SUzxAfpWBbKGhpdHFnvOfcG28w==", "requires": { "@apidevtools/json-schema-ref-parser": "^9.0.9", "@apidevtools/swagger-parser": "^10.0.3", - "@asyncapi/avro-schema-parser": "^3.0.0", + "@asyncapi/avro-schema-parser": "^3.0.2", "@asyncapi/openapi-schema-parser": "^3.0.2", - "@asyncapi/parser": "^2.0.1", + "@asyncapi/parser": "^2.0.3", "@asyncapi/raml-dt-schema-parser": "^4.0.2", "@swc/core": "^1.3.5", "@swc/jest": "^0.2.23", diff --git a/package.json b/package.json index 4f12e19d41d..7b40f356e9b 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "@asyncapi/converter": "^1.2.0", "@asyncapi/diff": "^0.4.1", "@asyncapi/generator": "^1.10.8", - "@asyncapi/modelina": "^1.8.4", + "@asyncapi/modelina": "^1.8.6", "@asyncapi/openapi-schema-parser": "^3.0.3", "@asyncapi/optimizer": "^0.1.18", "@asyncapi/parser": "^2.0.3", From f7995e8f182222d38162ce3905506b6c17b79e99 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Fri, 16 Jun 2023 04:54:02 +0200 Subject: [PATCH 15/15] chore(release): v0.48.6 (#662) --- docs/usage.md | 20 ++++++++++---------- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/usage.md b/docs/usage.md index 71e3cc4f68e..08ee3bb9187 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -29,7 +29,7 @@ $ npm install -g @asyncapi/cli $ asyncapi COMMAND running command... $ asyncapi (--version) -@asyncapi/cli/0.48.4 linux-x64 node-v18.16.0 +@asyncapi/cli/0.48.5 linux-x64 node-v18.16.0 $ asyncapi --help [COMMAND] USAGE $ asyncapi COMMAND @@ -91,7 +91,7 @@ EXAMPLES $ asyncapi bundle ./asyncapi.yaml ./features.yaml --base ./asyncapi.yaml --reference-into-components ``` -_See code: [src/commands/bundle.ts](https://github.com/asyncapi/cli/blob/v0.48.4/src/commands/bundle.ts)_ +_See code: [src/commands/bundle.ts](https://github.com/asyncapi/cli/blob/v0.48.5/src/commands/bundle.ts)_ ## `asyncapi config` @@ -105,7 +105,7 @@ DESCRIPTION CLI config settings ``` -_See code: [src/commands/config/index.ts](https://github.com/asyncapi/cli/blob/v0.48.4/src/commands/config/index.ts)_ +_See code: [src/commands/config/index.ts](https://github.com/asyncapi/cli/blob/v0.48.5/src/commands/config/index.ts)_ ## `asyncapi config context` @@ -234,7 +234,7 @@ DESCRIPTION Convert asyncapi documents older to newer versions ``` -_See code: [src/commands/convert.ts](https://github.com/asyncapi/cli/blob/v0.48.4/src/commands/convert.ts)_ +_See code: [src/commands/convert.ts](https://github.com/asyncapi/cli/blob/v0.48.5/src/commands/convert.ts)_ ## `asyncapi diff OLD NEW` @@ -270,7 +270,7 @@ DESCRIPTION Find diff between two asyncapi files ``` -_See code: [src/commands/diff.ts](https://github.com/asyncapi/cli/blob/v0.48.4/src/commands/diff.ts)_ +_See code: [src/commands/diff.ts](https://github.com/asyncapi/cli/blob/v0.48.5/src/commands/diff.ts)_ ## `asyncapi generate` @@ -284,7 +284,7 @@ DESCRIPTION Generate typed models or other things like clients, applications or docs using AsyncAPI Generator templates. ``` -_See code: [src/commands/generate/index.ts](https://github.com/asyncapi/cli/blob/v0.48.4/src/commands/generate/index.ts)_ +_See code: [src/commands/generate/index.ts](https://github.com/asyncapi/cli/blob/v0.48.5/src/commands/generate/index.ts)_ ## `asyncapi generate fromTemplate ASYNCAPI TEMPLATE` @@ -408,7 +408,7 @@ DESCRIPTION Creates a new asyncapi file ``` -_See code: [src/commands/new/index.ts](https://github.com/asyncapi/cli/blob/v0.48.4/src/commands/new/index.ts)_ +_See code: [src/commands/new/index.ts](https://github.com/asyncapi/cli/blob/v0.48.5/src/commands/new/index.ts)_ ## `asyncapi new file` @@ -496,7 +496,7 @@ EXAMPLES $ asyncapi optimize ./asyncapi.yaml --optimization=remove-components,reuse-components,move-to-components --output=terminal --no-tty ``` -_See code: [src/commands/optimize.ts](https://github.com/asyncapi/cli/blob/v0.48.4/src/commands/optimize.ts)_ +_See code: [src/commands/optimize.ts](https://github.com/asyncapi/cli/blob/v0.48.5/src/commands/optimize.ts)_ ## `asyncapi start` @@ -510,7 +510,7 @@ DESCRIPTION Start asyncapi studio ``` -_See code: [src/commands/start/index.ts](https://github.com/asyncapi/cli/blob/v0.48.4/src/commands/start/index.ts)_ +_See code: [src/commands/start/index.ts](https://github.com/asyncapi/cli/blob/v0.48.5/src/commands/start/index.ts)_ ## `asyncapi start studio` @@ -554,5 +554,5 @@ DESCRIPTION validate asyncapi file ``` -_See code: [src/commands/validate.ts](https://github.com/asyncapi/cli/blob/v0.48.4/src/commands/validate.ts)_ +_See code: [src/commands/validate.ts](https://github.com/asyncapi/cli/blob/v0.48.5/src/commands/validate.ts)_ diff --git a/package-lock.json b/package-lock.json index 88efd5e43c5..f06200add15 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@asyncapi/cli", - "version": "0.48.5", + "version": "0.48.6", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@asyncapi/cli", - "version": "0.48.5", + "version": "0.48.6", "license": "Apache-2.0", "dependencies": { "@asyncapi/avro-schema-parser": "^3.0.2", diff --git a/package.json b/package.json index 7b40f356e9b..17ca50c9fa4 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@asyncapi/cli", "description": "All in one CLI for all AsyncAPI tools", - "version": "0.48.5", + "version": "0.48.6", "author": "@asyncapi", "bin": { "asyncapi": "./bin/run"