@asyncapi/cli 1.15.3 → 1.16.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/lib/base.js CHANGED
@@ -127,7 +127,7 @@ class default_1 extends core_1.Command {
127
127
  recorderFromEnv(prefix) {
128
128
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
129
129
  let sink = new DiscardSink();
130
- const analyticsConfigFile = (0, path_1.join)((0, os_1.homedir)(), '.asyncapi-analytics');
130
+ const analyticsConfigFile = process.env.ASYNCAPI_METRICS_CONFIG_PATH || (0, path_1.join)((0, os_1.homedir)(), '.asyncapi-analytics');
131
131
  if (!(0, fs_extra_1.existsSync)(analyticsConfigFile)) {
132
132
  yield writeFile(analyticsConfigFile, JSON.stringify({ analyticsEnabled: 'true', infoMessageShown: 'false', userID: (0, uuid_1.v4)() }), { encoding: 'utf8' });
133
133
  }
@@ -11,7 +11,7 @@ class Analytics extends base_1.default {
11
11
  run() {
12
12
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
13
13
  const { flags } = yield this.parse(Analytics);
14
- const analyticsConfigFile = (0, path_1.join)((0, os_1.homedir)(), '.asyncapi-analytics');
14
+ const analyticsConfigFile = process.env.ASYNCAPI_METRICS_CONFIG_PATH || (0, path_1.join)((0, os_1.homedir)(), '.asyncapi-analytics');
15
15
  try {
16
16
  const analyticsConfigFileContent = JSON.parse(yield readFile((0, path_1.resolve)(analyticsConfigFile), { encoding: 'utf8' }));
17
17
  if (flags.disable) {
@@ -39,7 +39,7 @@ class Analytics extends base_1.default {
39
39
  catch (e) {
40
40
  switch (e.code) {
41
41
  case 'ENOENT':
42
- this.error(`Unable to access the analytics configuration file. We tried to access the ".asyncapi-analytics" file in your user's home directory ("${(0, os_1.homedir)()}") but the file could not be found.`);
42
+ this.error(`Unable to access the analytics configuration file. We tried to access the ".asyncapi-analytics" file in in the path "${analyticsConfigFile}" but the file could not be found.`);
43
43
  break;
44
44
  case 'EEXIST':
45
45
  this.error(`Unable to update the analytics configuration file. We tried to update your ".asyncapi-analytics" file in the path "${analyticsConfigFile}" but the file does not exist.`);
@@ -1476,5 +1476,5 @@
1476
1476
  ]
1477
1477
  }
1478
1478
  },
1479
- "version": "1.15.3"
1479
+ "version": "1.16.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.15.3",
4
+ "version": "1.16.0",
5
5
  "author": "@asyncapi",
6
6
  "bin": {
7
7
  "asyncapi": "./bin/run_bin"
@@ -9,7 +9,7 @@
9
9
  "bugs": "https://github.com/asyncapi/cli/issues",
10
10
  "dependencies": {
11
11
  "@asyncapi/avro-schema-parser": "^3.0.22",
12
- "@asyncapi/bundler": "^0.5.1",
12
+ "@asyncapi/bundler": "^0.5.2",
13
13
  "@asyncapi/converter": "^1.4.19",
14
14
  "@asyncapi/diff": "^0.4.1",
15
15
  "@asyncapi/generator": "^1.17.25",