@asyncapi/cli 0.40.3 → 0.40.5
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/README.md +3 -3
- package/lib/parser.js +7 -6
- package/oclif.manifest.json +1 -1
- package/package.json +6 -3
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ CLI to work with your AsyncAPI files. Currently under development, we are workin
|
|
|
20
20
|
<!-- tocstop -->
|
|
21
21
|
|
|
22
22
|
## Installation
|
|
23
|
-
Learn how to install the AsyncAPI CLI
|
|
23
|
+
Learn how to install the AsyncAPI CLI by following the instructions in the [installation guide](/docs/installation.md).
|
|
24
24
|
|
|
25
25
|
## Usage
|
|
26
26
|
The [usage guide](/docs/usage.md) provides information about different ways to use the CLI.
|
|
@@ -39,7 +39,7 @@ Follow these steps:
|
|
|
39
39
|
- Run `npm run test` to make sure everything is properly set up
|
|
40
40
|
- Run `npm run build` and then `bin/run` to try new CLI locally
|
|
41
41
|
|
|
42
|
-
UX developed for the CLI should
|
|
42
|
+
The UX developed for the CLI should comply with the [Command Line Interface Guideline](https://clig.dev/)
|
|
43
43
|
|
|
44
44
|
### Command Structure and Patterns
|
|
45
45
|
|
|
@@ -47,7 +47,7 @@ We are following `verb + noun` and `namespace + noun + [verb]` pattern for makin
|
|
|
47
47
|
|
|
48
48
|
## Contributors
|
|
49
49
|
|
|
50
|
-
Thanks
|
|
50
|
+
Thanks go to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
|
|
51
51
|
|
|
52
52
|
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
|
|
53
53
|
<!-- prettier-ignore-start -->
|
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.5",
|
|
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
|
-
"@asyncapi/modelina": "^1.
|
|
16
|
+
"@asyncapi/modelina": "^1.5.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",
|