@asyncapi/cli 1.16.1 → 1.17.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.
@@ -17,10 +17,12 @@ class Analytics extends base_1.default {
17
17
  if (flags.disable) {
18
18
  analyticsConfigFileContent.analyticsEnabled = 'false';
19
19
  this.log('\nAnalytics disabled.\n');
20
+ this.metricsMetadata.analytics_disabled = flags.disable;
20
21
  }
21
22
  else if (flags.enable) {
22
23
  analyticsConfigFileContent.analyticsEnabled = 'true';
23
24
  this.log('\nAnalytics enabled.\n');
25
+ this.metricsMetadata.analytics_enabled = flags.enable;
24
26
  }
25
27
  else if (!flags.status) {
26
28
  this.log('\nPlease append the "--disable" flag to the command in case you prefer to disable analytics, or use the "--enable" flag if you want to enable analytics back again. In case you do not know the analytics current status, then you can append the "--status" flag to be aware of it.\n');
@@ -34,6 +36,7 @@ class Analytics extends base_1.default {
34
36
  else {
35
37
  this.log('\nAnalytics are disabled. Please append the "--enable" flag to the command in case you prefer to enable analytics.\n');
36
38
  }
39
+ this.metricsMetadata.analytics_status_checked = flags.status;
37
40
  }
38
41
  }
39
42
  catch (e) {
@@ -31,6 +31,11 @@ class Diff extends base_1.default {
31
31
  let firstDocument, secondDocument;
32
32
  checkAndWarnFalseFlag(outputFormat, markdownSubtype);
33
33
  markdownSubtype = setDefaultMarkdownSubtype(outputFormat, markdownSubtype);
34
+ this.metricsMetadata.output_format = outputFormat;
35
+ this.metricsMetadata.output_type = outputType;
36
+ if (outputFormat === 'md') {
37
+ this.metricsMetadata.output_markdown_subtype = flags['markdownSubtype'];
38
+ }
34
39
  try {
35
40
  firstDocument = yield (0, SpecificationFile_1.load)(firstDocumentPath);
36
41
  if (firstDocument.isAsyncAPI3()) {
@@ -132,6 +132,8 @@ class NewGlee extends base_1.default {
132
132
  if (file) {
133
133
  console.log('file running');
134
134
  yield this.handleGenerateProjectWithFile(file, CURRENT_GLEE_TEMPLATE, projectName, forceWrite);
135
+ this.specFile = yield (0, SpecificationFile_1.load)(flags.file);
136
+ this.metricsMetadata.template = flags.template;
135
137
  }
136
138
  else {
137
139
  try {
@@ -162,6 +164,8 @@ class NewGlee extends base_1.default {
162
164
  catch (err) {
163
165
  this.error(`Unable to create the project. Please check the following message for further info about the error:\n\n${err}`);
164
166
  }
167
+ this.specFile = yield (0, SpecificationFile_1.load)(`${GLEE_TEMPLATES_DIRECTORY}/asyncapi.yaml`);
168
+ this.metricsMetadata.template = flags.template;
165
169
  }
166
170
  });
167
171
  }
@@ -11,6 +11,8 @@ class StartStudio extends base_1.default {
11
11
  const { flags } = yield this.parse(StartStudio);
12
12
  const filePath = flags.file || (yield (0, SpecificationFile_1.load)()).getFilePath();
13
13
  const port = flags.port;
14
+ this.specFile = yield (0, SpecificationFile_1.load)(filePath);
15
+ this.metricsMetadata.port = port;
14
16
  (0, Studio_1.start)(filePath, port);
15
17
  });
16
18
  }
@@ -1476,5 +1476,5 @@
1476
1476
  ]
1477
1477
  }
1478
1478
  },
1479
- "version": "1.16.1"
1479
+ "version": "1.17.0"
1480
1480
  }
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": "1.16.1",
4
+ "version": "1.17.0",
5
5
  "author": "@asyncapi",
6
6
  "bin": {
7
7
  "asyncapi": "./bin/run_bin"