Skip to content

Commit ab85b41

Browse files
fix(environmentId): make environmentId a common arg fixes #457 (#458)
1 parent 4456f18 commit ab85b41

File tree

17 files changed

+29
-16
lines changed

17 files changed

+29
-16
lines changed

src/commands/cloudmanager/commerce/bin-magento/indexer/reindex.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ governing permissions and limitations under the License.
1313
const BaseCommerceCliCommand = require('../../../../../base-commerce-cli-command')
1414
const { getProgramId } = require('../../../../../cloudmanager-helpers')
1515
const commonFlags = require('../../../../../common-flags')
16+
const commonArgs = require('../../../../../common-args')
1617

1718
class IndexerReindexCommand extends BaseCommerceCliCommand {
1819
async run () {
@@ -39,7 +40,7 @@ IndexerReindexCommand.flags = {
3940
}
4041

4142
IndexerReindexCommand.args = [
42-
{ name: 'environmentId', required: true, description: 'the environment id' },
43+
commonArgs.environmentId,
4344
]
4445

4546
IndexerReindexCommand.aliases = [

src/commands/cloudmanager/commerce/bin-magento/maintenance/status.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ governing permissions and limitations under the License.
1313
const BaseCommerceCliCommand = require('../../../../../base-commerce-cli-command')
1414
const { getProgramId } = require('../../../../../cloudmanager-helpers')
1515
const commonFlags = require('../../../../../common-flags')
16+
const commonArgs = require('../../../../../common-args')
1617

1718
class MaintenanceStatusCommand extends BaseCommerceCliCommand {
1819
async run () {
@@ -39,7 +40,7 @@ MaintenanceStatusCommand.flags = {
3940
}
4041

4142
MaintenanceStatusCommand.args = [
42-
{ name: 'environmentId', required: true, description: 'the environment id' },
43+
commonArgs.environmentId,
4344
]
4445

4546
MaintenanceStatusCommand.aliases = [

src/commands/cloudmanager/commerce/get-command-execution.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ const BaseCommand = require('../../../base-command')
1414
const { initSdk, formatTime, getProgramId } = require('../../../cloudmanager-helpers')
1515
const { cli } = require('cli-ux')
1616
const commonFlags = require('../../../common-flags')
17+
const commonArgs = require('../../../common-args')
1718

1819
class GetCommandExecutionCommand extends BaseCommand {
1920
async run () {
@@ -76,7 +77,7 @@ GetCommandExecutionCommand.flags = {
7677
}
7778

7879
GetCommandExecutionCommand.args = [
79-
{ name: 'environmentId', required: true, description: 'the environment id' },
80+
commonArgs.environmentId,
8081
{ name: 'commandExecutionId', required: true, description: 'the command execution id' },
8182
]
8283

src/commands/cloudmanager/commerce/list-command-executions.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ const {
1919
const { cli } = require('cli-ux')
2020
const { flags } = require('@oclif/command')
2121
const commonFlags = require('../../../common-flags')
22+
const commonArgs = require('../../../common-args')
2223

2324
class ListCommandExecutionsCommand extends BaseCommand {
2425
async run () {
@@ -128,7 +129,7 @@ ListCommandExecutionsCommand.flags = {
128129
}
129130

130131
ListCommandExecutionsCommand.args = [
131-
{ name: 'environmentId', required: true, description: 'the environment id' },
132+
commonArgs.environmentId,
132133
]
133134

134135
module.exports = ListCommandExecutionsCommand

src/commands/cloudmanager/environment/bind-ip-allowlist.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class BindIPAllowlist extends BaseCommand {
3636
BindIPAllowlist.description = 'Bind an IP Allowlist to an environment'
3737

3838
BindIPAllowlist.args = [
39-
{ name: 'environmentId', required: true, description: 'the environment id' },
39+
commonArgs.environmentId,
4040
{ name: 'ipAllowlistId', required: true, description: 'the IP allowlist id' },
4141
commonArgs.service,
4242
]

src/commands/cloudmanager/environment/delete.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ governing permissions and limitations under the License.
1313
const { initSdk, getProgramId, sanitizeEnvironmentId } = require('../../../cloudmanager-helpers')
1414
const { cli } = require('cli-ux')
1515
const commonFlags = require('../../../common-flags')
16+
const commonArgs = require('../../../common-args')
1617
const BaseCommand = require('../../../base-command')
1718

1819
class DeleteEnvironmentCommand extends BaseCommand {
@@ -46,7 +47,7 @@ DeleteEnvironmentCommand.flags = {
4647
}
4748

4849
DeleteEnvironmentCommand.args = [
49-
{ name: 'environmentId', required: true, description: 'the environment id' },
50+
commonArgs.environmentId,
5051
]
5152

5253
DeleteEnvironmentCommand.aliases = [

src/commands/cloudmanager/environment/download-logs.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ const { initSdk, getProgramId, sanitizeEnvironmentId } = require('../../../cloud
1515
const { cli } = require('cli-ux')
1616
const path = require('path')
1717
const commonFlags = require('../../../common-flags')
18+
const commonArgs = require('../../../common-args')
1819
const BaseCommand = require('../../../base-command')
1920

2021
class DownloadLogs extends BaseCommand {
@@ -57,7 +58,7 @@ class DownloadLogs extends BaseCommand {
5758
DownloadLogs.description = 'downloads log files for the specified environment, service and log name for one or more days'
5859

5960
DownloadLogs.args = [
60-
{ name: 'environmentId', required: true, description: 'the environment id' },
61+
commonArgs.environmentId,
6162
{ name: 'service', required: true, description: 'the service' },
6263
{ name: 'name', required: true, description: 'the log name' },
6364
{ name: 'days', required: false, description: 'the number of days', default: '1' },

src/commands/cloudmanager/environment/list-available-log-options.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ governing permissions and limitations under the License.
1313
const { initSdk, getProgramId, sanitizeEnvironmentId, getOutputFormat } = require('../../../cloudmanager-helpers')
1414
const { cli } = require('cli-ux')
1515
const commonFlags = require('../../../common-flags')
16+
const commonArgs = require('../../../common-args')
1617
const BaseCommand = require('../../../base-command')
1718

1819
class ListAvailableLogOptionsCommand extends BaseCommand {
@@ -53,7 +54,7 @@ class ListAvailableLogOptionsCommand extends BaseCommand {
5354
ListAvailableLogOptionsCommand.description = 'lists available log options for an environment in a Cloud Manager program'
5455

5556
ListAvailableLogOptionsCommand.args = [
56-
{ name: 'environmentId', required: true, description: 'the environment id' },
57+
commonArgs.environmentId,
5758
]
5859

5960
ListAvailableLogOptionsCommand.flags = {

src/commands/cloudmanager/environment/list-ip-allowlist-bindings.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ const { getProgramId, getOutputFormat, columnWithArray } = require('../../../clo
1414
const { cli } = require('cli-ux')
1515
const _ = require('lodash')
1616
const commonFlags = require('../../../common-flags')
17+
const commonArgs = require('../../../common-args')
1718
const ListIpAllowlists = require('../program/list-ip-allowlists')
1819
const BaseCommand = require('../../../base-command')
1920

@@ -55,7 +56,7 @@ class ListIPAllowlistBindings extends BaseCommand {
5556
ListIPAllowlistBindings.description = 'lists IP Allowlists bound to an environment'
5657

5758
ListIPAllowlistBindings.args = [
58-
{ name: 'environmentId', required: true, description: 'the environment id' },
59+
commonArgs.environmentId,
5960
]
6061

6162
ListIPAllowlistBindings.flags = {

src/commands/cloudmanager/environment/list-variables.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ const BaseEnvironmentVariablesCommand = require('../../../base-environment-varia
1414
const BaseVariablesCommand = require('../../../base-variables-command')
1515
const { getProgramId } = require('../../../cloudmanager-helpers')
1616
const commonFlags = require('../../../common-flags')
17+
const commonArgs = require('../../../common-args')
1718

1819
class ListEnvironmentVariablesCommand extends BaseEnvironmentVariablesCommand {
1920
async run () {
@@ -32,7 +33,7 @@ class ListEnvironmentVariablesCommand extends BaseEnvironmentVariablesCommand {
3233
ListEnvironmentVariablesCommand.description = 'lists variables set on an environment'
3334

3435
ListEnvironmentVariablesCommand.args = [
35-
{ name: 'environmentId', required: true, description: 'the environment id' },
36+
commonArgs.environmentId,
3637
]
3738

3839
ListEnvironmentVariablesCommand.flags = {

0 commit comments

Comments
 (0)