Skip to content

Commit 41129c1

Browse files
committed
refactor: enterprise-app-store commands.
1 parent ca9ced3 commit 41129c1

6 files changed

Lines changed: 51 additions & 44 deletions

File tree

docs/enterprise-app-store/version/download-link.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@ appcircle enterprise-app-store version download-link [options]
1010

1111
```plaintext
1212
--entProfileId <uuid> Enterprise profile ID
13+
--entProfile <string> Enterprise profile name (alternative to --entProfileId)
1314
1415
--entVersionId <uuid> App version ID
16+
--entVersion <string> App version name (alternative to --entVersionId)
1517
```
1618

1719
## Options inherited from parent commands

docs/enterprise-app-store/version/list.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ appcircle enterprise-app-store version list [options]
1010

1111
```plaintext
1212
--entProfileId <uuid> Enterprise Profile ID
13+
--entProfile <string> Enterprise profile name (alternative to --entProfileId)
1314
1415
--publishType <number> Publish Type Empty,0=All,1=Beta,2=Live (default: "0")
1516
```

docs/enterprise-app-store/version/remove.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@ appcircle enterprise-app-store version remove [options]
1010

1111
```plaintext
1212
--entProfileId <uuid> Enterprise profile ID
13+
--entProfile <string> Enterprise profile name (alternative to --entProfileId)
1314
1415
--entVersionId <uuid> App version ID
16+
--entVersion <string> App version name (alternative to --entVersionId)
1517
```
1618

1719
## Options inherited from parent commands

docs/enterprise-app-store/version/unpublish.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@ appcircle enterprise-app-store version unpublish [options]
1010

1111
```plaintext
1212
--entProfileId <uuid> Enterprise profile ID
13+
--entProfile <string> Enterprise profile name (alternative to --entProfileId)
1314
1415
--entVersionId <uuid> App version ID
16+
--entVersion <string> App version name (alternative to --entVersionId)
1517
```
1618

1719
## Options inherited from parent commands

src/core/command-runner.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2804,21 +2804,21 @@ const handleEnterpriseAppStoreCommand = async (command: ProgramCommand, params:
28042804
];
28052805

28062806
if (profileRequiredCommands.includes(command.fullCommandName)) {
2807-
if (!params.entProfileId && !params.profile) {
2807+
if (!params.entProfileId && !params.entProfile) {
28082808
const commandParts = command.fullCommandName.replace(`${PROGRAM_NAME}-`, '').split('-');
28092809
const longDescription = getLongDescriptionForCommand(commandParts.join(' '));
28102810
if (longDescription) {
28112811
console.log('\n' + longDescription);
28122812
}
2813-
throw new ProgramError(`Either --entProfileId or --profile parameter is required.`);
2813+
throw new ProgramError(`Either --entProfileId or --entProfile parameter is required.`);
28142814
}
28152815

28162816
// Resolve profile name to ID if needed
2817-
if (params.profile && !params.entProfileId) {
2817+
if (params.entProfile && !params.entProfileId) {
28182818
const profiles = await getEnterpriseProfiles();
2819-
const foundProfile = profiles.find((p: any) => p.name === params.profile);
2819+
const foundProfile = profiles.find((p: any) => p.name === params.entProfile);
28202820
if (!foundProfile) {
2821-
throw new ProgramError(`Enterprise profile with name "${params.profile}" not found.`);
2821+
throw new ProgramError(`Enterprise profile with name "${params.entProfile}" not found.`);
28222822
}
28232823
params.entProfileId = foundProfile.id;
28242824
}
@@ -2833,22 +2833,22 @@ const handleEnterpriseAppStoreCommand = async (command: ProgramCommand, params:
28332833
`${PROGRAM_NAME}-enterprise-app-store-version-download-link`
28342834
];
28352835

2836-
if (appVersionRequiredCommands.includes(command.fullCommandName)) {
2837-
if (!params.entVersionId && !params.appVersion) {
2836+
if (appVersionRequiredCommands.includes(command.fullCommandName)) {
2837+
if (!params.entVersionId && !params.entVersion) {
28382838
const commandParts = command.fullCommandName.replace(`${PROGRAM_NAME}-`, '').split('-');
28392839
const longDescription = getLongDescriptionForCommand(commandParts.join(' '));
28402840
if (longDescription) {
28412841
console.log('\n' + longDescription);
28422842
}
2843-
throw new ProgramError(`Either --entVersionId or --appVersion parameter is required.`);
2843+
throw new ProgramError(`Either --entVersionId or --entVersion parameter is required.`);
28442844
}
28452845

28462846
// Resolve app version name to ID if needed
2847-
if (params.appVersion && !params.entVersionId) {
2847+
if (params.entVersion && !params.entVersionId) {
28482848
const appVersions = await getEnterpriseAppVersions({ entProfileId: params.entProfileId, publishType: "0" });
2849-
const foundAppVersion = appVersions.find((v: any) => v.name === params.appVersion || v.version === params.appVersion);
2849+
const foundAppVersion = appVersions.find((v: any) => v.name === params.entVersion || v.version === params.entVersion);
28502850
if (!foundAppVersion) {
2851-
throw new ProgramError(`App version with name "${params.appVersion}" not found.`);
2851+
throw new ProgramError(`App version with name "${params.entVersion}" not found.`);
28522852
}
28532853
params.entVersionId = foundAppVersion.id;
28542854
}

src/core/commands.ts

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -3977,15 +3977,15 @@ USAGE
39773977
39783978
REQUIRED OPTIONS
39793979
--entProfileId <uuid> Enterprise Profile ID (UUID format)
3980-
--profile <string> Enterprise profile name (alternative to --entProfileId)
3980+
--entProfile <string> Enterprise profile name (alternative to --entProfileId)
39813981
--publishType <type> (Optional) 0=All, 1=Beta, 2=Live
39823982
39833983
DESCRIPTION
39843984
View all app versions uploaded to the specified enterprise profile.
39853985
39863986
EXAMPLES
39873987
appcircle enterprise-app-store version list --entProfileId <uuid>
3988-
appcircle enterprise-app-store version list --profile "Internal Apps" --publishType 2`,
3988+
appcircle enterprise-app-store version list --entProfile "Internal Apps" --publishType 2`,
39893989
params: [
39903990
{
39913991
name: 'entProfileId',
@@ -3995,7 +3995,7 @@ EXAMPLES
39953995
required: false
39963996
},
39973997
{
3998-
name: 'profile',
3998+
name: 'entProfile',
39993999
description: "Enterprise Profile Name instead of 'entProfileId'",
40004000
type: CommandParameterTypes.STRING,
40014001
valueType: 'string',
@@ -4038,9 +4038,9 @@ USAGE
40384038
40394039
REQUIRED OPTIONS
40404040
--entProfileId <uuid> Enterprise Profile ID (UUID format)
4041-
--profile <string> Enterprise profile name (alternative to --entProfileId)
4041+
--entProfile <string> Enterprise profile name (alternative to --entProfileId)
40424042
--entVersionId <uuid> App Version ID (UUID format)
4043-
--appVersion <string> App version name (alternative to --entVersionId)
4043+
--entVersion <string> App version name (alternative to --entVersionId)
40444044
--summary <text> (Optional) Summary text
40454045
--releaseNotes <text> (Optional) Release notes
40464046
--publishType <type> (Optional) 0=None, 1=Beta, 2=Live
@@ -4049,7 +4049,7 @@ DESCRIPTION
40494049
Publish a specific app version to the enterprise app store profile.
40504050
40514051
EXAMPLES
4052-
appcircle enterprise-app-store version publish --profile "Internal Apps" --appVersion "v1.2.3" --publishType 2`,
4052+
appcircle enterprise-app-store version publish --entProfile "Internal Apps" --entVersion "v1.2.3" --publishType 2`,
40534053
params: [
40544054
{
40554055
name: 'entProfileId',
@@ -4059,7 +4059,7 @@ EXAMPLES
40594059
required: false
40604060
},
40614061
{
4062-
name: 'profile',
4062+
name: 'entProfile',
40634063
description: "Enterprise Profile Name instead of 'entProfileId'",
40644064
type: CommandParameterTypes.STRING,
40654065
valueType: 'string',
@@ -4076,8 +4076,8 @@ EXAMPLES
40764076
required: false
40774077
},
40784078
{
4079-
name: 'appVersion',
4080-
description: "App Version Name instead of 'entVersionId'",
4079+
name: 'entVersion',
4080+
description: "Enterprise App Version Name instead of 'entVersionId'",
40814081
type: CommandParameterTypes.STRING,
40824082
valueType: 'string',
40834083
required: false,
@@ -4130,15 +4130,15 @@ USAGE
41304130
41314131
REQUIRED OPTIONS
41324132
--entProfileId <uuid> Enterprise Profile ID (UUID format)
4133-
--profile <string> Enterprise profile name (alternative to --entProfileId)
4133+
--entProfile <string> Enterprise profile name (alternative to --entProfileId)
41344134
--entVersionId <uuid> App Version ID (UUID format)
4135-
--appVersion <string> App version name (alternative to --entVersionId)
4135+
--entVersion <string> App version name (alternative to --entVersionId)
41364136
41374137
DESCRIPTION
41384138
Unpublish a specific app version from the enterprise app store profile.
41394139
41404140
EXAMPLES
4141-
appcircle enterprise-app-store version unpublish --profile "Internal Apps" --appVersion "v1.2.3"`,
4141+
appcircle enterprise-app-store version unpublish --entProfile "Internal Apps" --entVersion "v1.2.3"`,
41424142
params: [
41434143
{
41444144
name: 'entProfileId',
@@ -4148,7 +4148,7 @@ EXAMPLES
41484148
required: false
41494149
},
41504150
{
4151-
name: 'profile',
4151+
name: 'entProfile',
41524152
description: "Enterprise Profile Name instead of 'entProfileId'",
41534153
type: CommandParameterTypes.STRING,
41544154
valueType: 'string',
@@ -4165,8 +4165,8 @@ EXAMPLES
41654165
required: false
41664166
},
41674167
{
4168-
name: 'appVersion',
4169-
description: "App Version Name instead of 'entVersionId'",
4168+
name: 'entVersion',
4169+
description: "Enterprise App Version Name instead of 'entVersionId'",
41704170
type: CommandParameterTypes.STRING,
41714171
valueType: 'string',
41724172
required: false,
@@ -4186,15 +4186,15 @@ USAGE
41864186
41874187
REQUIRED OPTIONS
41884188
--entProfileId <uuid> Enterprise Profile ID (UUID format)
4189-
--profile <string> Enterprise profile name (alternative to --entProfileId)
4189+
--entProfile <string> Enterprise profile name (alternative to --entProfileId)
41904190
--entVersionId <uuid> App Version ID (UUID format)
4191-
--appVersion <string> App version name (alternative to --entVersionId)
4191+
--entVersion <string> App version name (alternative to --entVersionId)
41924192
41934193
DESCRIPTION
41944194
Permanently delete a specific app version from the enterprise app store profile.
41954195
41964196
EXAMPLES
4197-
appcircle enterprise-app-store version remove --profile "Internal Apps" --appVersion "v1.2.3"`,
4197+
appcircle enterprise-app-store version remove --entProfile "Internal Apps" --entVersion "v1.2.3"`,
41984198
params: [
41994199
{
42004200
name: 'entProfileId',
@@ -4204,7 +4204,7 @@ EXAMPLES
42044204
required: false
42054205
},
42064206
{
4207-
name: 'profile',
4207+
name: 'entProfile',
42084208
description: "Enterprise Profile Name instead of 'entProfileId'",
42094209
type: CommandParameterTypes.STRING,
42104210
valueType: 'string',
@@ -4221,8 +4221,8 @@ EXAMPLES
42214221
required: false
42224222
},
42234223
{
4224-
name: 'appVersion',
4225-
description: "App Version Name instead of 'entVersionId'",
4224+
name: 'entVersion',
4225+
description: "Enterprise App Version Name instead of 'entVersionId'",
42264226
type: CommandParameterTypes.STRING,
42274227
valueType: 'string',
42284228
required: false,
@@ -4261,7 +4261,7 @@ EXAMPLES
42614261
required: false
42624262
},
42634263
{
4264-
name: 'profile',
4264+
name: 'entProfile',
42654265
description: "Enterprise Profile Name instead of 'entProfileId'",
42664266
type: CommandParameterTypes.STRING,
42674267
valueType: 'string',
@@ -4278,8 +4278,8 @@ EXAMPLES
42784278
required: false
42794279
},
42804280
{
4281-
name: 'appVersion',
4282-
description: "App Version Name instead of 'entVersionId'",
4281+
name: 'entVersion',
4282+
description: "Enterprise App Version Name instead of 'entVersionId'",
42834283
type: CommandParameterTypes.STRING,
42844284
valueType: 'string',
42854285
required: false,
@@ -4311,14 +4311,14 @@ USAGE
43114311
43124312
REQUIRED OPTIONS
43134313
--entProfileId <uuid> Enterprise Profile ID (UUID format)
4314-
--profile <string> Enterprise profile name (alternative to --entProfileId)
4314+
--entProfile <string> Enterprise profile name (alternative to --entProfileId)
43154315
--app <path> Path to the app binary (ipa/apk/aab)
43164316
43174317
DESCRIPTION
43184318
Upload a new app version to the specified enterprise profile.
43194319
43204320
EXAMPLES
4321-
appcircle enterprise-app-store version upload-for-profile --profile "Internal Apps" --app ./MyApp.ipa`,
4321+
appcircle enterprise-app-store version upload-for-profile --entProfile "Internal Apps" --app ./MyApp.ipa`,
43224322
params: [
43234323
{
43244324
name: 'entProfileId',
@@ -4328,7 +4328,7 @@ EXAMPLES
43284328
required: false
43294329
},
43304330
{
4331-
name: 'profile',
4331+
name: 'entProfile',
43324332
description: "Enterprise Profile Name instead of 'entProfileId'",
43334333
type: CommandParameterTypes.STRING,
43344334
valueType: 'string',
@@ -4380,15 +4380,15 @@ USAGE
43804380
43814381
REQUIRED OPTIONS
43824382
--entProfileId <uuid> Enterprise Profile ID (UUID format)
4383-
--profile <string> Enterprise profile name (alternative to --entProfileId)
4383+
--entProfile <string> Enterprise profile name (alternative to --entProfileId)
43844384
--entVersionId <uuid> App Version ID (UUID format)
4385-
--appVersion <string> App version name (alternative to --entVersionId)
4385+
--entVersion <string> App version name (alternative to --entVersionId)
43864386
43874387
DESCRIPTION
43884388
Retrieve the download link for a specific app version in the enterprise app store profile.
43894389
43904390
EXAMPLES
4391-
appcircle enterprise-app-store version download-link --profile "Internal Apps" --appVersion "v1.2.3"`,
4391+
appcircle enterprise-app-store version download-link --entProfile "Internal Apps" --entVersion "v1.2.3"`,
43924392
params: [
43934393
{
43944394
name: 'entProfileId',
@@ -4398,7 +4398,7 @@ EXAMPLES
43984398
required: false
43994399
},
44004400
{
4401-
name: 'profile',
4401+
name: 'entProfile',
44024402
description: "Enterprise Profile Name instead of 'entProfileId'",
44034403
type: CommandParameterTypes.STRING,
44044404
valueType: 'string',
@@ -4415,8 +4415,8 @@ EXAMPLES
44154415
required: false
44164416
},
44174417
{
4418-
name: 'appVersion',
4419-
description: "App Version Name instead of 'entVersionId'",
4418+
name: 'entVersion',
4419+
description: "Enterprise App Version Name instead of 'entVersionId'",
44204420
type: CommandParameterTypes.STRING,
44214421
valueType: 'string',
44224422
required: false,

0 commit comments

Comments
 (0)