heroku 8.3.1-beta.2 → 8.3.1-beta.3

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 CHANGED
@@ -56,6 +56,7 @@ For other issues, [submit a support ticket](https://help.heroku.com/).
56
56
  * [`heroku logs`](docs/logs.md) - display recent log output
57
57
  * [`heroku maintenance`](docs/maintenance.md) - enable/disable access to app
58
58
  * [`heroku members`](docs/members.md) - manage organization members
59
+ * [`heroku notifications`](docs/notifications.md) - display notifications
59
60
  * [`heroku orgs`](docs/orgs.md) - manage organizations
60
61
  * [`heroku pg`](docs/pg.md) - manage postgresql databases
61
62
  * [`heroku pipelines`](docs/pipelines.md) - list pipelines you have access to
@@ -64,6 +65,7 @@ For other issues, [submit a support ticket](https://help.heroku.com/).
64
65
  * [`heroku psql`](docs/psql.md) - open a psql shell to the database
65
66
  * [`heroku redis`](docs/redis.md) - manage heroku redis instances
66
67
  * [`heroku regions`](docs/regions.md) - list available regions for deployment
68
+ * [`heroku releases`](docs/releases.md) - display the releases for an app
67
69
  * [`heroku reviewapps`](docs/reviewapps.md) - disable review apps and/or settings on an existing pipeline
68
70
  * [`heroku run`](docs/run.md) - run a one-off process inside a Heroku dyno
69
71
  * [`heroku sessions`](docs/sessions.md) - OAuth sessions
@@ -6,6 +6,7 @@ const Rollbar = require("rollbar");
6
6
  const command_1 = require("@heroku-cli/command");
7
7
  const core_1 = require("@oclif/core");
8
8
  const api_1 = require("@opentelemetry/api");
9
+ const packageParser_1 = require("./lib/utils/packageParser");
9
10
  const { Resource } = require('@opentelemetry/resources');
10
11
  const { SemanticResourceAttributes } = require('@opentelemetry/semantic-conventions');
11
12
  const { registerInstrumentations } = require('@opentelemetry/instrumentation');
@@ -53,43 +54,29 @@ exports.initializeInstrumentation = initializeInstrumentation;
53
54
  function setupTelemetry(config, opts) {
54
55
  const now = new Date();
55
56
  const cmdStartTime = now.getTime();
56
- const isHelpOrVersionCmd = (opts.id === 'version' || opts.id === '--help');
57
+ const isHelpOrVersionCmd = ((0, packageParser_1.getAllVersionFlags)().includes(opts.id) || (0, packageParser_1.getAllHelpFlags)().includes(opts.id));
57
58
  const isRegularCmd = Boolean(opts.Command);
59
+ const baseTelemetryObject = {
60
+ command: opts.id,
61
+ os: config.platform,
62
+ version: config.version,
63
+ exitCode: 0,
64
+ exitState: 'successful',
65
+ cliRunDuration: 0,
66
+ commandRunDuration: cmdStartTime,
67
+ lifecycleHookCompletion: {
68
+ init: true,
69
+ prerun: false,
70
+ postrun: false,
71
+ command_not_found: false,
72
+ },
73
+ isVersionOrHelp: true,
74
+ };
58
75
  if (isHelpOrVersionCmd) {
59
- return {
60
- command: opts.id,
61
- os: config.platform,
62
- version: config.version,
63
- exitCode: 0,
64
- exitState: 'successful',
65
- cliRunDuration: 0,
66
- commandRunDuration: cmdStartTime,
67
- lifecycleHookCompletion: {
68
- init: true,
69
- prerun: false,
70
- postrun: false,
71
- command_not_found: false,
72
- },
73
- isVersionOrHelp: true,
74
- };
76
+ return baseTelemetryObject;
75
77
  }
76
78
  if (isRegularCmd) {
77
- return {
78
- command: opts.Command.id,
79
- os: config.platform,
80
- version: config.version,
81
- exitCode: 0,
82
- exitState: 'successful',
83
- cliRunDuration: 0,
84
- commandRunDuration: cmdStartTime,
85
- lifecycleHookCompletion: {
86
- init: true,
87
- prerun: true,
88
- postrun: false,
89
- command_not_found: false,
90
- },
91
- isVersionOrHelp: false,
92
- };
79
+ return Object.assign(Object.assign({}, baseTelemetryObject), { command: opts.Command.id, lifecycleHookCompletion: Object.assign(Object.assign({}, baseTelemetryObject.lifecycleHookCompletion), { prerun: true }), isVersionOrHelp: false });
93
80
  }
94
81
  }
95
82
  exports.setupTelemetry = setupTelemetry;
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ const packageParser_1 = require("../../lib/utils/packageParser");
3
4
  const allowlist = [
4
5
  'HEROKU_API_KEY',
5
6
  'HEROKU_APP',
@@ -11,7 +12,7 @@ const allowlist = [
11
12
  'SSL_KEY_FILE',
12
13
  ];
13
14
  const version = async function () {
14
- if (['-v', '--version', 'version'].includes(process.argv[2])) {
15
+ if ((0, packageParser_1.getAllVersionFlags)().includes(process.argv[2])) {
15
16
  for (const env of allowlist) {
16
17
  if (process.env[env]) {
17
18
  const value = env === 'HEROKU_API_KEY' ? 'to [REDACTED]' : `to ${process.env[env]}`;
@@ -0,0 +1,2 @@
1
+ export declare function getAllVersionFlags(): any[];
2
+ export declare function getAllHelpFlags(): any[];
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getAllHelpFlags = exports.getAllVersionFlags = void 0;
4
+ const { oclif } = require('../../../package.json');
5
+ function getAllVersionFlags() {
6
+ return [...oclif.additionalVersionFlags, '--version'];
7
+ }
8
+ exports.getAllVersionFlags = getAllVersionFlags;
9
+ function getAllHelpFlags() {
10
+ return [...oclif.additionalHelpFlags, '--help', 'help'];
11
+ }
12
+ exports.getAllHelpFlags = getAllHelpFlags;
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "8.3.1-beta.2",
2
+ "version": "8.3.1-beta.3",
3
3
  "commands": {
4
4
  "console": {
5
5
  "id": "console",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "heroku",
3
3
  "description": "CLI to interact with Heroku",
4
- "version": "8.3.1-beta.2",
4
+ "version": "8.3.1-beta.3",
5
5
  "author": "Jeff Dickey @jdxcode",
6
6
  "bin": "./bin/run",
7
7
  "bugs": "https://github.com/heroku/cli/issues",
@@ -9,8 +9,8 @@
9
9
  "@heroku-cli/color": "1.1.14",
10
10
  "@heroku-cli/command": "^10.0.0",
11
11
  "@heroku-cli/notifications": "^1.2.2",
12
- "@heroku-cli/plugin-addons-v5": "^8.3.1-beta.2",
13
- "@heroku-cli/plugin-apps-v5": "^8.3.1-beta.2",
12
+ "@heroku-cli/plugin-addons-v5": "^8.3.1-beta.3",
13
+ "@heroku-cli/plugin-apps-v5": "^8.3.1-beta.3",
14
14
  "@heroku-cli/plugin-certs-v5": "^8.2.0",
15
15
  "@heroku-cli/plugin-ci-v5": "^8.2.0",
16
16
  "@heroku-cli/plugin-container-registry-v5": "^8.2.0",
@@ -19,7 +19,7 @@
19
19
  "@heroku-cli/plugin-ps": "^8.1.7",
20
20
  "@heroku-cli/plugin-ps-exec": "^2.4.0",
21
21
  "@heroku-cli/plugin-redis-v5": "^8.2.0",
22
- "@heroku-cli/plugin-spaces": "^8.3.1-beta.2",
22
+ "@heroku-cli/plugin-spaces": "^8.3.1-beta.3",
23
23
  "@heroku-cli/schema": "^1.0.25",
24
24
  "@heroku/buildpack-registry": "^1.0.1",
25
25
  "@heroku/eventsource": "^1.0.7",
@@ -332,5 +332,5 @@
332
332
  "version": "oclif readme --multi && git add README.md ../../docs"
333
333
  },
334
334
  "types": "lib/index.d.ts",
335
- "gitHead": "f44f0d9353d105c2affa15ee69d8866730e84ad3"
335
+ "gitHead": "64393461430887ace7546c02f020bf94d3dc15df"
336
336
  }