@asyncapi/cli 0.40.3 → 0.40.4
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/parser.js +7 -6
- package/oclif.manifest.json +1 -1
- package/package.json +5 -2
package/lib/parser.js
CHANGED
|
@@ -5,9 +5,9 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const core_1 = require("@oclif/core");
|
|
6
6
|
const cjs_1 = require("@asyncapi/parser/cjs");
|
|
7
7
|
Object.defineProperty(exports, "convertToOldAPI", { enumerable: true, get: function () { return cjs_1.convertToOldAPI; } });
|
|
8
|
-
const avro_schema_parser_1 = require("@asyncapi/
|
|
9
|
-
const openapi_schema_parser_1 = require("@asyncapi/
|
|
10
|
-
const
|
|
8
|
+
const avro_schema_parser_1 = require("@asyncapi/avro-schema-parser");
|
|
9
|
+
const openapi_schema_parser_1 = require("@asyncapi/openapi-schema-parser");
|
|
10
|
+
const raml_dt_schema_parser_1 = require("@asyncapi/raml-dt-schema-parser");
|
|
11
11
|
const spectral_core_1 = require("@stoplight/spectral-core");
|
|
12
12
|
const formatters_1 = require("@stoplight/spectral-cli/dist/formatters");
|
|
13
13
|
const config_1 = require("@stoplight/spectral-cli/dist/services/config");
|
|
@@ -20,7 +20,7 @@ const parser = new cjs_1.Parser({
|
|
|
20
20
|
});
|
|
21
21
|
parser.registerSchemaParser((0, avro_schema_parser_1.AvroSchemaParser)());
|
|
22
22
|
parser.registerSchemaParser((0, openapi_schema_parser_1.OpenAPISchemaParser)());
|
|
23
|
-
parser.registerSchemaParser((0,
|
|
23
|
+
parser.registerSchemaParser((0, raml_dt_schema_parser_1.RamlDTSchemaParser)());
|
|
24
24
|
function validationFlags({ logDiagnostics = true } = {}) {
|
|
25
25
|
return {
|
|
26
26
|
'log-diagnostics': core_1.Flags.boolean({
|
|
@@ -57,9 +57,10 @@ function parse(command, specFile, options = {}) {
|
|
|
57
57
|
}
|
|
58
58
|
exports.parse = parse;
|
|
59
59
|
function logDiagnostics(diagnostics, command, specFile, options = {}) {
|
|
60
|
+
var _a, _b;
|
|
60
61
|
const logDiagnostics = options['log-diagnostics'];
|
|
61
|
-
const failSeverity = options['fail-severity']
|
|
62
|
-
const diagnosticsFormat = options['diagnostics-format']
|
|
62
|
+
const failSeverity = (_a = options['fail-severity']) !== null && _a !== void 0 ? _a : 'error';
|
|
63
|
+
const diagnosticsFormat = (_b = options['diagnostics-format']) !== null && _b !== void 0 ? _b : 'stylish';
|
|
63
64
|
const sourceString = specFile.toSourceString();
|
|
64
65
|
if (diagnostics.length) {
|
|
65
66
|
if (hasFailSeverity(diagnostics, failSeverity)) {
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,20 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@asyncapi/cli",
|
|
3
3
|
"description": "All in one CLI for all AsyncAPI tools",
|
|
4
|
-
"version": "0.40.
|
|
4
|
+
"version": "0.40.4",
|
|
5
5
|
"author": "@asyncapi",
|
|
6
6
|
"bin": {
|
|
7
7
|
"asyncapi": "./bin/run"
|
|
8
8
|
},
|
|
9
9
|
"bugs": "https://github.com/asyncapi/cli/issues",
|
|
10
10
|
"dependencies": {
|
|
11
|
+
"@asyncapi/avro-schema-parser": "^3.0.0",
|
|
11
12
|
"@asyncapi/bundler": "^0.3.8",
|
|
12
13
|
"@asyncapi/converter": "^1.2.0",
|
|
13
14
|
"@asyncapi/diff": "^0.4.1",
|
|
14
15
|
"@asyncapi/generator": "^1.9.17",
|
|
15
16
|
"@asyncapi/modelina": "^1.4.0",
|
|
17
|
+
"@asyncapi/openapi-schema-parser": "^3.0.0",
|
|
16
18
|
"@asyncapi/optimizer": "^0.1.18",
|
|
17
|
-
"@asyncapi/parser": "2.0.0
|
|
19
|
+
"@asyncapi/parser": "^2.0.0",
|
|
20
|
+
"@asyncapi/raml-dt-schema-parser": "^4.0.0",
|
|
18
21
|
"@asyncapi/studio": "^0.17.3",
|
|
19
22
|
"@oclif/core": "^1.26.2",
|
|
20
23
|
"@oclif/errors": "^1.3.6",
|