@asyncapi/cli 0.48.4 → 0.48.6
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.
- package/lib/commands/diff.js +5 -4
- package/oclif.manifest.json +1 -1
- package/package.json +2 -2
package/lib/commands/diff.js
CHANGED
|
@@ -93,12 +93,12 @@ class Diff extends base_1.default {
|
|
|
93
93
|
this.log(`The output format ${outputFormat} is not supported at the moment.`);
|
|
94
94
|
}
|
|
95
95
|
if (!noError) {
|
|
96
|
-
throwOnBreakingChange(diffOutput);
|
|
96
|
+
throwOnBreakingChange(diffOutput, outputFormat);
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
catch (error) {
|
|
100
100
|
if (error instanceof diff_error_1.DiffBreakingChangeError) {
|
|
101
|
-
|
|
101
|
+
this.error(error);
|
|
102
102
|
}
|
|
103
103
|
throw new validation_error_1.ValidationError({
|
|
104
104
|
type: 'parser-error',
|
|
@@ -218,9 +218,10 @@ const enableWatch = (status, watcher) => {
|
|
|
218
218
|
/**
|
|
219
219
|
* Throws `DiffBreakingChangeError` when breaking changes are detected
|
|
220
220
|
*/
|
|
221
|
-
function throwOnBreakingChange(diffOutput) {
|
|
221
|
+
function throwOnBreakingChange(diffOutput, outputFormat) {
|
|
222
222
|
const breakingChanges = diffOutput.breaking();
|
|
223
|
-
if (breakingChanges.length !== 0)
|
|
223
|
+
if ((outputFormat === 'json' && breakingChanges.length !== 0) ||
|
|
224
|
+
((outputFormat === 'yaml' || outputFormat === 'yml') && breakingChanges !== '[]\n')) {
|
|
224
225
|
throw new diff_error_1.DiffBreakingChangeError();
|
|
225
226
|
}
|
|
226
227
|
}
|
package/oclif.manifest.json
CHANGED
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": "0.48.
|
|
4
|
+
"version": "0.48.6",
|
|
5
5
|
"author": "@asyncapi",
|
|
6
6
|
"bin": {
|
|
7
7
|
"asyncapi": "./bin/run"
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"@asyncapi/converter": "^1.2.0",
|
|
14
14
|
"@asyncapi/diff": "^0.4.1",
|
|
15
15
|
"@asyncapi/generator": "^1.10.8",
|
|
16
|
-
"@asyncapi/modelina": "^1.8.
|
|
16
|
+
"@asyncapi/modelina": "^1.8.6",
|
|
17
17
|
"@asyncapi/openapi-schema-parser": "^3.0.3",
|
|
18
18
|
"@asyncapi/optimizer": "^0.1.18",
|
|
19
19
|
"@asyncapi/parser": "^2.0.3",
|