@salesforce/plugin-info 1.1.0 → 1.1.1

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/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [1.1.1](https://github.com/salesforcecli/plugin-info/compare/v1.1.0...v1.1.1) (2021-11-30)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * add more telemetry ([b8af2d7](https://github.com/salesforcecli/plugin-info/commit/b8af2d7e516cd1f5347d379d1c29d6389299fab8))
11
+
5
12
  ## [1.1.0](https://github.com/salesforcecli/plugin-info/compare/v1.0.0...v1.1.0) (2021-11-22)
6
13
 
7
14
 
@@ -34,6 +34,7 @@ class Display extends command_1.SfdxCommand {
34
34
  // In most cases we will log a message, but here we only trace log in case someone using stdout of the update command
35
35
  this.logger.trace(`release notes disabled via env var: ${HIDE_NOTES}`);
36
36
  this.logger.trace('exiting');
37
+ await core_1.Lifecycle.getInstance().emitTelemetry({ eventName: 'NOTES_HIDDEN' });
37
38
  return;
38
39
  }
39
40
  const isHook = !!this.flags.hook;
@@ -51,18 +52,34 @@ class Display extends command_1.SfdxCommand {
51
52
  renderer: new TerminalRenderer(),
52
53
  });
53
54
  this.ux.log(marked_1.marked.parser(tokens));
54
- if (isHook && !env.getBoolean(HIDE_FOOTER)) {
55
- const footer = messages.getMessage('footer', [this.config.bin, releaseNotesPath, HIDE_NOTES, HIDE_FOOTER]);
56
- this.ux.log(marked_1.marked.parse(footer));
55
+ if (isHook) {
56
+ if (env.getBoolean(HIDE_FOOTER)) {
57
+ await core_1.Lifecycle.getInstance().emitTelemetry({ eventName: 'FOOTER_HIDDEN' });
58
+ }
59
+ else {
60
+ const footer = messages.getMessage('footer', [this.config.bin, releaseNotesPath, HIDE_NOTES, HIDE_FOOTER]);
61
+ this.ux.log(marked_1.marked.parse(footer));
62
+ }
57
63
  }
58
64
  }
59
65
  catch (err) {
60
66
  if (isHook) {
61
67
  // Do not throw error if --hook is passed, just warn so we don't exit any processes.
62
68
  // --hook is passed in the post install/update scripts
63
- const { message, stack } = err;
69
+ const { message, stack, name } = err;
64
70
  this.ux.warn(`${this.id} failed: ${message}`);
65
71
  this.logger.trace(stack);
72
+ await core_1.Lifecycle.getInstance().emitTelemetry({
73
+ eventName: 'COMMAND_ERROR',
74
+ type: 'EXCEPTION',
75
+ errorName: name,
76
+ errorMessage: message,
77
+ Error: Object.assign({
78
+ name,
79
+ message,
80
+ stack,
81
+ }, err),
82
+ });
66
83
  return;
67
84
  }
68
85
  throw err;
@@ -1 +1 @@
1
- {"version":3,"file":"display.js","sourceRoot":"","sources":["../../../../src/commands/info/releasenotes/display.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAEH,4EAA4E;AAC5E,uDAAuD;AAEvD,yBAAyB;AACzB,mCAAgC;AAChC,oDAAoD;AACpD,yCAAsC;AACtC,iDAAyD;AACzD,2CAA4C;AAC5C,iEAA8D;AAC9D,qEAAkE;AAClE,yEAAsE;AACtE,yEAAsE;AAEtE,wDAAwD;AACxD,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAE5C,MAAM,UAAU,GAAG,gCAAgC,CAAC;AACpD,MAAM,WAAW,GAAG,yBAAyB,CAAC;AAE9C,iGAAiG;AACjG,mFAAmF;AACnF,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,yBAAyB,EAAE,SAAS,CAAC,CAAC;AAE7E,MAAqB,OAAQ,SAAQ,qBAAW;IAoBvC,KAAK,CAAC,GAAG;;QACd,MAAM,GAAG,GAAG,IAAI,SAAG,EAAE,CAAC;QAEtB,IAAI,GAAG,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE;YAC9B,kFAAkF;YAClF,qHAAqH;YACrH,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,uCAAuC,UAAU,EAAE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- {"version":"1.1.0","commands":{"info:releasenotes:display":{"id":"info:releasenotes:display","description":"display Salesforce CLI release notes on the command line","usage":"<%= command.id %> [-v <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-info","pluginType":"core","aliases":["whatsnew"],"examples":["Display release notes for the currently installed CLI version:"," <%= config.bin %> <%= command.id %>","","Display release notes for CLI version 7.120.0:"," <%= config.bin %> <%= command.id %> --version 7.120.0","","Display release notes for the CLI version that corresponds to a tag (stable, stable-rc, latest, latest-rc, rc):"," <%= config.bin %> <%= command.id %> --version latest"," "],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"version":{"name":"version","type":"option","char":"v","description":"CLI version or tag for which to display release notes"},"hook":{"name":"hook","type":"boolean","description":"suppresses errors; this is a hidden parameter used after install or update","hidden":true,"allowNo":false}},"args":[]}}}
1
+ {"version":"1.1.1","commands":{"info:releasenotes:display":{"id":"info:releasenotes:display","description":"display Salesforce CLI release notes on the command line","usage":"<%= command.id %> [-v <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-info","pluginType":"core","aliases":["whatsnew"],"examples":["Display release notes for the currently installed CLI version:"," <%= config.bin %> <%= command.id %>","","Display release notes for CLI version 7.120.0:"," <%= config.bin %> <%= command.id %> --version 7.120.0","","Display release notes for the CLI version that corresponds to a tag (stable, stable-rc, latest, latest-rc, rc):"," <%= config.bin %> <%= command.id %> --version latest"," "],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"version":{"name":"version","type":"option","char":"v","description":"CLI version or tag for which to display release notes"},"hook":{"name":"hook","type":"boolean","description":"suppresses errors; this is a hidden parameter used after install or update","hidden":true,"allowNo":false}},"args":[]}}}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@salesforce/plugin-info",
3
3
  "description": "Plugin for accessing cli info from the command line",
4
- "version": "1.1.0",
4
+ "version": "1.1.1",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/forcedotcom/cli/issues",
7
7
  "dependencies": {
@@ -126,7 +126,7 @@
126
126
  "access": "public"
127
127
  },
128
128
  "sfdx": {
129
- "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-info/1.1.0.crt",
130
- "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-info/1.1.0.sig"
129
+ "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-info/1.1.1.crt",
130
+ "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-info/1.1.1.sig"
131
131
  }
132
132
  }