@asyncapi/cli 2.13.0 → 2.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -38,9 +38,6 @@ class Diff extends base_1.default {
38
38
  }
39
39
  try {
40
40
  firstDocument = yield (0, SpecificationFile_1.load)(firstDocumentPath);
41
- if (firstDocument.isAsyncAPI3()) {
42
- this.error('Diff command does not support AsyncAPI v3 yet which was your first document, please checkout https://github.com/asyncapi/diff/issues/154');
43
- }
44
41
  enableWatch(watchMode, {
45
42
  spec: firstDocument,
46
43
  handler: this,
@@ -60,9 +57,6 @@ class Diff extends base_1.default {
60
57
  }
61
58
  try {
62
59
  secondDocument = yield (0, SpecificationFile_1.load)(secondDocumentPath);
63
- if (secondDocument.isAsyncAPI3()) {
64
- this.error('Diff command does not support AsyncAPI v3 yet which was your second document, please checkout https://github.com/asyncapi/diff/issues/154');
65
- }
66
60
  enableWatch(watchMode, {
67
61
  spec: secondDocument,
68
62
  handler: this,
@@ -116,7 +110,7 @@ class Diff extends base_1.default {
116
110
  }
117
111
  }
118
112
  catch (error) {
119
- if (error instanceof diff_error_1.DiffBreakingChangeError) {
113
+ if (error instanceof diff_error_1.DiffBreakingChangeError || error instanceof TypeError) {
120
114
  this.error(error);
121
115
  }
122
116
  throw new validation_error_1.ValidationError({
@@ -174,13 +168,11 @@ function genericOutput(diffOutput, outputType) {
174
168
  }
175
169
  function parseDocuments(command, firstDocument, secondDocument, flags) {
176
170
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
177
- const { document: newFirstDocumentParsed, status: firstDocumentStatus } = yield (0, parser_1.parse)(command, firstDocument, flags);
178
- const { document: newSecondDocumentParsed, status: secondDocumentStatus } = yield (0, parser_1.parse)(command, secondDocument, flags);
179
- if (!newFirstDocumentParsed || !newSecondDocumentParsed || firstDocumentStatus === 'invalid' || secondDocumentStatus === 'invalid') {
171
+ const { document: firstDocumentParsed, status: firstDocumentStatus } = yield (0, parser_1.parse)(command, firstDocument, flags);
172
+ const { document: secondDocumentParsed, status: secondDocumentStatus } = yield (0, parser_1.parse)(command, secondDocument, flags);
173
+ if (!firstDocumentParsed || !secondDocumentParsed || firstDocumentStatus === 'invalid' || secondDocumentStatus === 'invalid') {
180
174
  return;
181
175
  }
182
- const firstDocumentParsed = (0, parser_1.convertToOldAPI)(newFirstDocumentParsed);
183
- const secondDocumentParsed = (0, parser_1.convertToOldAPI)(newSecondDocumentParsed);
184
176
  return { firstDocumentParsed, secondDocumentParsed };
185
177
  });
186
178
  }
@@ -1732,5 +1732,5 @@
1732
1732
  ]
1733
1733
  }
1734
1734
  },
1735
- "version": "2.13.0"
1735
+ "version": "2.13.1"
1736
1736
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@asyncapi/cli",
3
3
  "description": "All in one CLI for all AsyncAPI tools",
4
- "version": "2.13.0",
4
+ "version": "2.13.1",
5
5
  "author": "@asyncapi",
6
6
  "bin": {
7
7
  "asyncapi": "./bin/run_bin"
@@ -11,13 +11,13 @@
11
11
  "@asyncapi/avro-schema-parser": "^3.0.23",
12
12
  "@asyncapi/bundler": "^0.6.4",
13
13
  "@asyncapi/converter": "^1.6.2",
14
- "@asyncapi/diff": "^0.4.1",
14
+ "@asyncapi/diff": "^0.5.0",
15
15
  "@asyncapi/generator": "^1.17.25",
16
16
  "@asyncapi/modelina-cli": "^4.0.0-next.48",
17
17
  "@asyncapi/openapi-schema-parser": "^3.0.24",
18
18
  "@asyncapi/optimizer": "^1.0.4",
19
19
  "@asyncapi/parser": "^3.3.0",
20
- "@asyncapi/protobuf-schema-parser": "^3.3.0",
20
+ "@asyncapi/protobuf-schema-parser": "^3.4.0",
21
21
  "@asyncapi/raml-dt-schema-parser": "^4.0.24",
22
22
  "@asyncapi/studio": "^0.20.0",
23
23
  "@changesets/changelog-git": "^0.2.0",