From df31ab2d729fa1f9908f5098a78482d8d37f0bc4 Mon Sep 17 00:00:00 2001 From: Eric Date: Thu, 14 Nov 2024 15:48:27 -0800 Subject: [PATCH] fix: bug with telemetry:add (#3094) * Accept app as a string so we don't assume heroku remote * Remove remote as a flag * Fix test --- packages/cli/src/commands/telemetry/add.ts | 3 +-- packages/cli/test/unit/commands/telemetry/add.unit.test.ts | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/cli/src/commands/telemetry/add.ts b/packages/cli/src/commands/telemetry/add.ts index bc7eb89723..6d26e2eae7 100644 --- a/packages/cli/src/commands/telemetry/add.ts +++ b/packages/cli/src/commands/telemetry/add.ts @@ -9,8 +9,7 @@ export default class Add extends Command { static description = 'Add and configure a new telemetry drain. Defaults to collecting all telemetry unless otherwise specified.' static flags = { - app: Flags.app({exactlyOne: ['app', 'remote', 'space'], description: 'app to add a drain to'}), - remote: Flags.remote({description: 'git remote of app to add a drain to'}), + app: Flags.string({char: 'a', exactlyOne: ['app', 'space'], description: 'app to add a drain to'}), space: Flags.string({char: 's', description: 'space to add a drain to'}), signals: Flags.string({default: 'all', description: 'comma-delimited list of signals to collect (traces, metrics, logs). Use "all" to collect all signals.'}), endpoint: Flags.string({required: true, description: 'drain url'}), diff --git a/packages/cli/test/unit/commands/telemetry/add.unit.test.ts b/packages/cli/test/unit/commands/telemetry/add.unit.test.ts index a1825264c9..b852699e01 100644 --- a/packages/cli/test/unit/commands/telemetry/add.unit.test.ts +++ b/packages/cli/test/unit/commands/telemetry/add.unit.test.ts @@ -31,7 +31,7 @@ describe('telemetry:add', function () { ]) } catch (error) { const {message} = error as { message: string } - expect(message).to.contain('Exactly one of the following must be provided: --app, --remote, --space') + expect(message).to.contain('Exactly one of the following must be provided: --app, --space') } })