@asyncapi/cli 0.27.3 → 0.29.0
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 +16 -14
- package/lib/commands/diff.js +1 -1
- package/lib/commands/generate/fromTemplate.js +1 -1
- package/lib/commands/generate/models.js +13 -5
- package/lib/commands/validate.js +1 -1
- package/lib/utils/parser.d.ts +2 -0
- package/lib/utils/parser.js +12 -0
- package/oclif.manifest.json +1 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -131,20 +131,22 @@ USAGE
|
|
|
131
131
|
$ asyncapi [COMMAND]
|
|
132
132
|
|
|
133
133
|
COMMANDS
|
|
134
|
-
config
|
|
135
|
-
diff
|
|
136
|
-
new
|
|
137
|
-
start
|
|
138
|
-
validate
|
|
139
|
-
generate
|
|
140
|
-
models
|
|
141
|
-
typescript
|
|
142
|
-
csharp
|
|
143
|
-
golang
|
|
144
|
-
java
|
|
145
|
-
javascript
|
|
146
|
-
dart
|
|
147
|
-
|
|
134
|
+
config access configs
|
|
135
|
+
diff find diff between two AsyncAPI files
|
|
136
|
+
new creates a new AsyncAPI file
|
|
137
|
+
start starts a new local instance of Studio
|
|
138
|
+
validate validate an AsyncAPI file
|
|
139
|
+
generate generate all kinds of stuff
|
|
140
|
+
models generate all the typed models for the message payloads defined in the AsyncAPI file
|
|
141
|
+
typescript generate the models for TypeScript
|
|
142
|
+
csharp generate the models for C#
|
|
143
|
+
golang generate the models for Go
|
|
144
|
+
java generate the models for Java
|
|
145
|
+
javascript generate the models for JavaScript
|
|
146
|
+
dart generate the models for Dart
|
|
147
|
+
python generate the models for Python
|
|
148
|
+
rust generate the models for Rust
|
|
149
|
+
fromTemplate generate whatever you want using templates compatible with AsyncAPI Generator
|
|
148
150
|
```
|
|
149
151
|
|
|
150
152
|
## Contributing
|
package/lib/commands/diff.js
CHANGED
|
@@ -4,8 +4,8 @@ const tslib_1 = require("tslib");
|
|
|
4
4
|
/* eslint-disable sonarjs/no-duplicate-string */
|
|
5
5
|
const core_1 = require("@oclif/core");
|
|
6
6
|
const diff = tslib_1.__importStar(require("@asyncapi/diff"));
|
|
7
|
-
const parser = tslib_1.__importStar(require("@asyncapi/parser"));
|
|
8
7
|
const fs_1 = require("fs");
|
|
8
|
+
const parser = tslib_1.__importStar(require("../utils/parser"));
|
|
9
9
|
const SpecificationFile_1 = require("../models/SpecificationFile");
|
|
10
10
|
const base_1 = tslib_1.__importDefault(require("../base"));
|
|
11
11
|
const validation_error_1 = require("../errors/validation-error");
|
|
@@ -193,7 +193,7 @@ class Template extends base_1.default {
|
|
|
193
193
|
if (!(yield (0, generator_2.isLocalTemplate)(path_1.default.resolve(generator_1.default.DEFAULT_TEMPLATES_DIR, templateName)))) {
|
|
194
194
|
this.warn(`WARNING: ${template} is a remote template. Changes may be lost on subsequent installations.`);
|
|
195
195
|
}
|
|
196
|
-
watcher.watch(watchHandler, (paths) => {
|
|
196
|
+
yield watcher.watch(watchHandler, (paths) => {
|
|
197
197
|
this.error(`[WATCHER] Could not find the file path ${paths}, are you sure it still exists? If it has been deleted or moved please rerun the generator.`, {
|
|
198
198
|
exit: 1,
|
|
199
199
|
});
|
|
@@ -5,7 +5,7 @@ const modelina_1 = require("@asyncapi/modelina");
|
|
|
5
5
|
const core_1 = require("@oclif/core");
|
|
6
6
|
const base_1 = tslib_1.__importDefault(require("../../base"));
|
|
7
7
|
const SpecificationFile_1 = require("../../models/SpecificationFile");
|
|
8
|
-
const parser_1 = require("
|
|
8
|
+
const parser_1 = require("../../utils/parser");
|
|
9
9
|
var Languages;
|
|
10
10
|
(function (Languages) {
|
|
11
11
|
Languages["typescript"] = "typescript";
|
|
@@ -14,14 +14,16 @@ var Languages;
|
|
|
14
14
|
Languages["java"] = "java";
|
|
15
15
|
Languages["javascript"] = "javascript";
|
|
16
16
|
Languages["dart"] = "dart";
|
|
17
|
+
Languages["python"] = "python";
|
|
18
|
+
Languages["rust"] = "rust";
|
|
17
19
|
})(Languages || (Languages = {}));
|
|
18
20
|
const possibleLanguageValues = Object.values(Languages).join(', ');
|
|
19
21
|
class Models extends base_1.default {
|
|
20
22
|
run() {
|
|
21
23
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
22
|
-
const
|
|
23
|
-
const { tsModelType, tsEnumType, tsModuleSystem, tsExportType, namespace, packageName, output } =
|
|
24
|
-
const { language, file } =
|
|
24
|
+
const { args, flags } = yield this.parse(Models);
|
|
25
|
+
const { tsModelType, tsEnumType, tsModuleSystem, tsExportType, namespace, packageName, output } = flags;
|
|
26
|
+
const { language, file } = args;
|
|
25
27
|
const inputFile = (yield (0, SpecificationFile_1.load)(file)) || (yield (0, SpecificationFile_1.load)());
|
|
26
28
|
const parsedInput = yield (0, parser_1.parse)(inputFile.text());
|
|
27
29
|
modelina_1.Logger.setLogger({
|
|
@@ -51,6 +53,12 @@ class Models extends base_1.default {
|
|
|
51
53
|
exportType: tsExportType
|
|
52
54
|
};
|
|
53
55
|
break;
|
|
56
|
+
case Languages.python:
|
|
57
|
+
fileGenerator = new modelina_1.PythonFileGenerator();
|
|
58
|
+
break;
|
|
59
|
+
case Languages.rust:
|
|
60
|
+
fileGenerator = new modelina_1.RustFileGenerator();
|
|
61
|
+
break;
|
|
54
62
|
case Languages.csharp:
|
|
55
63
|
if (namespace === undefined) {
|
|
56
64
|
throw new Error('In order to generate models to C#, we need to know which namespace they are under. Add `--namespace=NAMESPACE` to set the desired namespace.');
|
|
@@ -105,7 +113,7 @@ class Models extends base_1.default {
|
|
|
105
113
|
return `
|
|
106
114
|
## Model name: ${model.modelName}
|
|
107
115
|
${model.result}
|
|
108
|
-
|
|
116
|
+
`;
|
|
109
117
|
});
|
|
110
118
|
this.log(`Successfully generated the following models: ${generatedModels.join('\n')}`);
|
|
111
119
|
}
|
package/lib/commands/validate.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const core_1 = require("@oclif/core");
|
|
5
|
-
const parser = tslib_1.__importStar(require("
|
|
5
|
+
const parser = tslib_1.__importStar(require("../utils/parser"));
|
|
6
6
|
const base_1 = tslib_1.__importDefault(require("../base"));
|
|
7
7
|
const validation_error_1 = require("../errors/validation-error");
|
|
8
8
|
const SpecificationFile_1 = require("../models/SpecificationFile");
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parse = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const parser_1 = require("@asyncapi/parser");
|
|
6
|
+
Object.defineProperty(exports, "parse", { enumerable: true, get: function () { return parser_1.parse; } });
|
|
7
|
+
const openapi_schema_parser_1 = tslib_1.__importDefault(require("@asyncapi/openapi-schema-parser"));
|
|
8
|
+
const avro_schema_parser_1 = tslib_1.__importDefault(require("@asyncapi/avro-schema-parser"));
|
|
9
|
+
const raml_dt_schema_parser_1 = tslib_1.__importDefault(require("@asyncapi/raml-dt-schema-parser"));
|
|
10
|
+
(0, parser_1.registerSchemaParser)(openapi_schema_parser_1.default);
|
|
11
|
+
(0, parser_1.registerSchemaParser)(avro_schema_parser_1.default);
|
|
12
|
+
(0, parser_1.registerSchemaParser)(raml_dt_schema_parser_1.default);
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"0.27.3","commands":{"convert":{"id":"convert","description":"Convert asyncapi documents older to newer versions","strict":true,"pluginName":"@asyncapi/cli","pluginAlias":"@asyncapi/cli","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"output":{"name":"output","type":"option","char":"o","description":"path to the file where the result is saved","multiple":false},"target-version":{"name":"target-version","type":"option","char":"t","description":"asyncapi version to convert to","multiple":false,"default":"2.5.0"}},"args":[{"name":"spec-file","description":"spec path, url, or context-name","required":false}]},"diff":{"id":"diff","description":"Find diff between two asyncapi files","strict":true,"pluginName":"@asyncapi/cli","pluginAlias":"@asyncapi/cli","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"format":{"name":"format","type":"option","char":"f","description":"format of the output","multiple":false,"options":["json","yaml","yml"],"default":"yaml"},"type":{"name":"type","type":"option","char":"t","description":"type of the output","multiple":false,"options":["breaking","non-breaking","unclassified","all"],"default":"all"},"overrides":{"name":"overrides","type":"option","char":"o","description":"path to JSON file containing the override properties","multiple":false},"watch":{"name":"watch","type":"boolean","char":"w","description":"Enable watch mode","allowNo":false}},"args":[{"name":"old","description":"old spec path, URL or context-name","required":true},{"name":"new","description":"new spec path, URL or context-name","required":true}]},"new":{"id":"new","description":"Creates a new asyncapi file","strict":true,"pluginName":"@asyncapi/cli","pluginAlias":"@asyncapi/cli","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"file-name":{"name":"file-name","type":"option","char":"n","description":"name of the file","multiple":false},"example":{"name":"example","type":"option","char":"e","description":"name of the example to use","multiple":false},"studio":{"name":"studio","type":"boolean","char":"s","description":"open in Studio","allowNo":false},"port":{"name":"port","type":"option","char":"p","description":"port in which to start Studio","multiple":false},"no-tty":{"name":"no-tty","type":"boolean","description":"do not use an interactive terminal","allowNo":false}},"args":[]},"validate":{"id":"validate","description":"validate asyncapi file","strict":true,"pluginName":"@asyncapi/cli","pluginAlias":"@asyncapi/cli","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"watch":{"name":"watch","type":"boolean","char":"w","description":"Enable watch mode","allowNo":false}},"args":[{"name":"spec-file","description":"spec path, url, or context-name","required":false}]},"config":{"id":"config","description":"CLI config settings","strict":true,"pluginName":"@asyncapi/cli","pluginAlias":"@asyncapi/cli","pluginType":"core","aliases":[],"flags":{},"args":[]},"generate:fromTemplate":{"id":"generate:fromTemplate","description":"Generates whatever you want using templates compatible with AsyncAPI Generator.","strict":true,"pluginName":"@asyncapi/cli","pluginAlias":"@asyncapi/cli","pluginType":"core","aliases":[],"examples":["asyncapi generate fromTemplate asyncapi.yaml @asyncapi/html-template --param version=1.0.0 singleFile=true --output ./docs --force-write"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"disable-hook":{"name":"disable-hook","type":"option","char":"d","description":"Disable a specific hook type or hooks from a given hook type","multiple":true},"install":{"name":"install","type":"boolean","char":"i","description":"Installs the template and its dependencies (defaults to false)","allowNo":false},"debug":{"name":"debug","type":"boolean","description":"Enable more specific errors in the console","allowNo":false},"no-overwrite":{"name":"no-overwrite","type":"option","char":"n","description":"Glob or path of the file(s) to skip when regenerating","multiple":true},"output":{"name":"output","type":"option","char":"o","description":"Directory where to put the generated files (defaults to current directory)","multiple":false},"force-write":{"name":"force-write","type":"boolean","description":"Force writing of the generated files to given directory even if it is a git repo with unstaged files or not empty dir (defaults to false)","allowNo":false},"watch":{"name":"watch","type":"boolean","char":"w","description":"Watches the template directory and the AsyncAPI document, and re-generate the files when changes occur. Ignores the output directory.","allowNo":false},"param":{"name":"param","type":"option","char":"p","description":"Additional param to pass to templates","multiple":true},"map-base-url":{"name":"map-base-url","type":"option","description":"Maps all schema references from base url to local folder","multiple":false}},"args":[{"name":"asyncapi","description":"- Local path, url or context-name pointing to AsyncAPI file","required":true},{"name":"template","description":"- Name of the generator template like for example @asyncapi/html-template or https://github.com/asyncapi/html-template","required":true}]},"generate":{"id":"generate","description":"Generate typed models or other things like clients, applications or docs using AsyncAPI Generator templates.","strict":true,"pluginName":"@asyncapi/cli","pluginAlias":"@asyncapi/cli","pluginType":"core","aliases":[],"flags":{},"args":[]},"generate:models":{"id":"generate:models","description":"Generates typed models","strict":true,"pluginName":"@asyncapi/cli","pluginAlias":"@asyncapi/cli","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"output":{"name":"output","type":"option","char":"o","description":"The output directory where the models should be written to. Omitting this flag will write the models to `stdout`.","required":false,"multiple":false},"tsModelType":{"name":"tsModelType","type":"option","description":"TypeScript specific, define which type of model needs to be generated.","required":false,"multiple":false,"options":["class","interface"]},"tsEnumType":{"name":"tsEnumType","type":"option","description":"TypeScript specific, define which type of enums needs to be generated.","required":false,"multiple":false,"options":["enum","union"]},"tsModuleSystem":{"name":"tsModuleSystem","type":"option","description":"TypeScript specific, define the module system to be used.","required":false,"multiple":false,"options":["ESM","CJS"]},"tsExportType":{"name":"tsExportType","type":"option","description":"TypeScript specific, define which type of export needs to be generated.","required":false,"multiple":false,"options":["default","named"]},"packageName":{"name":"packageName","type":"option","description":"Go and Java specific, define the package to use for the generated models. This is required when language is `go` or `java`.","required":false,"multiple":false},"namespace":{"name":"namespace","type":"option","description":"C# specific, define the namespace to use for the generated models. This is required when language is `csharp`.","required":false,"multiple":false}},"args":[{"name":"language","description":"The language you want the typed models generated for.","required":true,"options":["typescript","csharp","golang","java","javascript","dart"]},{"name":"file","description":"Path or URL to the AsyncAPI document, or context-name","required":true}]},"start":{"id":"start","description":"Start asyncapi studio","strict":true,"pluginName":"@asyncapi/cli","pluginAlias":"@asyncapi/cli","pluginType":"core","aliases":[],"flags":{},"args":[]},"start:studio":{"id":"start:studio","description":"starts a new local instance of Studio","strict":true,"pluginName":"@asyncapi/cli","pluginAlias":"@asyncapi/cli","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"file":{"name":"file","type":"option","char":"f","description":"path to the AsyncAPI file to link with Studio","multiple":false},"port":{"name":"port","type":"option","char":"p","description":"port in which to start Studio","multiple":false}},"args":[]},"config:context:add":{"id":"config:context:add","description":"Add or modify a context in the store","strict":true,"pluginName":"@asyncapi/cli","pluginAlias":"@asyncapi/cli","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"context-name","description":"context name","required":true},{"name":"spec-file-path","description":"file path of the spec file","required":true}]},"config:context:current":{"id":"config:context:current","description":"Shows the current context that is being used","strict":true,"pluginName":"@asyncapi/cli","pluginAlias":"@asyncapi/cli","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[]},"config:context":{"id":"config:context","strict":true,"pluginName":"@asyncapi/cli","pluginAlias":"@asyncapi/cli","pluginType":"core","aliases":[],"flags":{},"args":[]},"config:context:list":{"id":"config:context:list","description":"List all the stored context in the store","strict":true,"pluginName":"@asyncapi/cli","pluginAlias":"@asyncapi/cli","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[]},"config:context:remove":{"id":"config:context:remove","description":"Delete a context from the store","strict":true,"pluginName":"@asyncapi/cli","pluginAlias":"@asyncapi/cli","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"context-name","description":"Name of the context to delete","required":true}]},"config:context:use":{"id":"config:context:use","description":"Set a context as current","strict":true,"pluginName":"@asyncapi/cli","pluginAlias":"@asyncapi/cli","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"context-name","description":"name of the saved context","required":true}]}}}
|
|
1
|
+
{"version":"0.29.0","commands":{"convert":{"id":"convert","description":"Convert asyncapi documents older to newer versions","strict":true,"pluginName":"@asyncapi/cli","pluginAlias":"@asyncapi/cli","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"output":{"name":"output","type":"option","char":"o","description":"path to the file where the result is saved","multiple":false},"target-version":{"name":"target-version","type":"option","char":"t","description":"asyncapi version to convert to","multiple":false,"default":"2.5.0"}},"args":[{"name":"spec-file","description":"spec path, url, or context-name","required":false}]},"diff":{"id":"diff","description":"Find diff between two asyncapi files","strict":true,"pluginName":"@asyncapi/cli","pluginAlias":"@asyncapi/cli","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"format":{"name":"format","type":"option","char":"f","description":"format of the output","multiple":false,"options":["json","yaml","yml"],"default":"yaml"},"type":{"name":"type","type":"option","char":"t","description":"type of the output","multiple":false,"options":["breaking","non-breaking","unclassified","all"],"default":"all"},"overrides":{"name":"overrides","type":"option","char":"o","description":"path to JSON file containing the override properties","multiple":false},"watch":{"name":"watch","type":"boolean","char":"w","description":"Enable watch mode","allowNo":false}},"args":[{"name":"old","description":"old spec path, URL or context-name","required":true},{"name":"new","description":"new spec path, URL or context-name","required":true}]},"new":{"id":"new","description":"Creates a new asyncapi file","strict":true,"pluginName":"@asyncapi/cli","pluginAlias":"@asyncapi/cli","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"file-name":{"name":"file-name","type":"option","char":"n","description":"name of the file","multiple":false},"example":{"name":"example","type":"option","char":"e","description":"name of the example to use","multiple":false},"studio":{"name":"studio","type":"boolean","char":"s","description":"open in Studio","allowNo":false},"port":{"name":"port","type":"option","char":"p","description":"port in which to start Studio","multiple":false},"no-tty":{"name":"no-tty","type":"boolean","description":"do not use an interactive terminal","allowNo":false}},"args":[]},"validate":{"id":"validate","description":"validate asyncapi file","strict":true,"pluginName":"@asyncapi/cli","pluginAlias":"@asyncapi/cli","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"watch":{"name":"watch","type":"boolean","char":"w","description":"Enable watch mode","allowNo":false}},"args":[{"name":"spec-file","description":"spec path, url, or context-name","required":false}]},"config":{"id":"config","description":"CLI config settings","strict":true,"pluginName":"@asyncapi/cli","pluginAlias":"@asyncapi/cli","pluginType":"core","aliases":[],"flags":{},"args":[]},"generate:fromTemplate":{"id":"generate:fromTemplate","description":"Generates whatever you want using templates compatible with AsyncAPI Generator.","strict":true,"pluginName":"@asyncapi/cli","pluginAlias":"@asyncapi/cli","pluginType":"core","aliases":[],"examples":["asyncapi generate fromTemplate asyncapi.yaml @asyncapi/html-template --param version=1.0.0 singleFile=true --output ./docs --force-write"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"disable-hook":{"name":"disable-hook","type":"option","char":"d","description":"Disable a specific hook type or hooks from a given hook type","multiple":true},"install":{"name":"install","type":"boolean","char":"i","description":"Installs the template and its dependencies (defaults to false)","allowNo":false},"debug":{"name":"debug","type":"boolean","description":"Enable more specific errors in the console","allowNo":false},"no-overwrite":{"name":"no-overwrite","type":"option","char":"n","description":"Glob or path of the file(s) to skip when regenerating","multiple":true},"output":{"name":"output","type":"option","char":"o","description":"Directory where to put the generated files (defaults to current directory)","multiple":false},"force-write":{"name":"force-write","type":"boolean","description":"Force writing of the generated files to given directory even if it is a git repo with unstaged files or not empty dir (defaults to false)","allowNo":false},"watch":{"name":"watch","type":"boolean","char":"w","description":"Watches the template directory and the AsyncAPI document, and re-generate the files when changes occur. Ignores the output directory.","allowNo":false},"param":{"name":"param","type":"option","char":"p","description":"Additional param to pass to templates","multiple":true},"map-base-url":{"name":"map-base-url","type":"option","description":"Maps all schema references from base url to local folder","multiple":false}},"args":[{"name":"asyncapi","description":"- Local path, url or context-name pointing to AsyncAPI file","required":true},{"name":"template","description":"- Name of the generator template like for example @asyncapi/html-template or https://github.com/asyncapi/html-template","required":true}]},"generate":{"id":"generate","description":"Generate typed models or other things like clients, applications or docs using AsyncAPI Generator templates.","strict":true,"pluginName":"@asyncapi/cli","pluginAlias":"@asyncapi/cli","pluginType":"core","aliases":[],"flags":{},"args":[]},"generate:models":{"id":"generate:models","description":"Generates typed models","strict":true,"pluginName":"@asyncapi/cli","pluginAlias":"@asyncapi/cli","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"output":{"name":"output","type":"option","char":"o","description":"The output directory where the models should be written to. Omitting this flag will write the models to `stdout`.","required":false,"multiple":false},"tsModelType":{"name":"tsModelType","type":"option","description":"TypeScript specific, define which type of model needs to be generated.","required":false,"multiple":false,"options":["class","interface"]},"tsEnumType":{"name":"tsEnumType","type":"option","description":"TypeScript specific, define which type of enums needs to be generated.","required":false,"multiple":false,"options":["enum","union"]},"tsModuleSystem":{"name":"tsModuleSystem","type":"option","description":"TypeScript specific, define the module system to be used.","required":false,"multiple":false,"options":["ESM","CJS"]},"tsExportType":{"name":"tsExportType","type":"option","description":"TypeScript specific, define which type of export needs to be generated.","required":false,"multiple":false,"options":["default","named"]},"packageName":{"name":"packageName","type":"option","description":"Go and Java specific, define the package to use for the generated models. This is required when language is `go` or `java`.","required":false,"multiple":false},"namespace":{"name":"namespace","type":"option","description":"C# specific, define the namespace to use for the generated models. This is required when language is `csharp`.","required":false,"multiple":false}},"args":[{"name":"language","description":"The language you want the typed models generated for.","required":true,"options":["typescript","csharp","golang","java","javascript","dart","python","rust"]},{"name":"file","description":"Path or URL to the AsyncAPI document, or context-name","required":true}]},"start":{"id":"start","description":"Start asyncapi studio","strict":true,"pluginName":"@asyncapi/cli","pluginAlias":"@asyncapi/cli","pluginType":"core","aliases":[],"flags":{},"args":[]},"start:studio":{"id":"start:studio","description":"starts a new local instance of Studio","strict":true,"pluginName":"@asyncapi/cli","pluginAlias":"@asyncapi/cli","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false},"file":{"name":"file","type":"option","char":"f","description":"path to the AsyncAPI file to link with Studio","multiple":false},"port":{"name":"port","type":"option","char":"p","description":"port in which to start Studio","multiple":false}},"args":[]},"config:context:add":{"id":"config:context:add","description":"Add or modify a context in the store","strict":true,"pluginName":"@asyncapi/cli","pluginAlias":"@asyncapi/cli","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"context-name","description":"context name","required":true},{"name":"spec-file-path","description":"file path of the spec file","required":true}]},"config:context:current":{"id":"config:context:current","description":"Shows the current context that is being used","strict":true,"pluginName":"@asyncapi/cli","pluginAlias":"@asyncapi/cli","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[]},"config:context":{"id":"config:context","strict":true,"pluginName":"@asyncapi/cli","pluginAlias":"@asyncapi/cli","pluginType":"core","aliases":[],"flags":{},"args":[]},"config:context:list":{"id":"config:context:list","description":"List all the stored context in the store","strict":true,"pluginName":"@asyncapi/cli","pluginAlias":"@asyncapi/cli","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[]},"config:context:remove":{"id":"config:context:remove","description":"Delete a context from the store","strict":true,"pluginName":"@asyncapi/cli","pluginAlias":"@asyncapi/cli","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"context-name","description":"Name of the context to delete","required":true}]},"config:context:use":{"id":"config:context:use","description":"Set a context as current","strict":true,"pluginName":"@asyncapi/cli","pluginAlias":"@asyncapi/cli","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"Show CLI help.","allowNo":false}},"args":[{"name":"context-name","description":"name of the saved context","required":true}]}}}
|
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.
|
|
4
|
+
"version": "0.29.0",
|
|
5
5
|
"author": "@asyncapi",
|
|
6
6
|
"bin": {
|
|
7
7
|
"asyncapi": "./bin/run"
|
|
@@ -11,12 +11,13 @@
|
|
|
11
11
|
"@asyncapi/converter": "^1.1.0",
|
|
12
12
|
"@asyncapi/diff": "^0.4.1",
|
|
13
13
|
"@asyncapi/generator": "^1.9.12",
|
|
14
|
-
"@asyncapi/modelina": "^0.
|
|
14
|
+
"@asyncapi/modelina": "^1.0.0-next.40",
|
|
15
15
|
"@asyncapi/parser": "^1.17.1",
|
|
16
16
|
"@asyncapi/studio": "^0.15.4",
|
|
17
17
|
"@oclif/core": "^1.18.0",
|
|
18
18
|
"@oclif/errors": "^1.3.5",
|
|
19
19
|
"@oclif/plugin-not-found": "^2.3.1",
|
|
20
|
+
"ajv": "^8.12.0",
|
|
20
21
|
"chalk": "^4.1.0",
|
|
21
22
|
"chokidar": "^3.5.2",
|
|
22
23
|
"indent-string": "^4.0.0",
|