eas-cli 0.31.1 → 0.34.0

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.
Files changed (128) hide show
  1. package/README.md +29 -28
  2. package/build/analytics.js +3 -9
  3. package/build/build/android/UpdatesModule.js +4 -15
  4. package/build/build/android/configure.js +3 -3
  5. package/build/build/android/graphql.js +2 -4
  6. package/build/build/android/prepareJob.js +4 -3
  7. package/build/build/build.js +2 -2
  8. package/build/build/configure.js +26 -13
  9. package/build/build/ios/UpdatesModule.js +6 -18
  10. package/build/build/ios/configure.js +1 -1
  11. package/build/build/ios/graphql.js +2 -23
  12. package/build/build/ios/prepareJob.js +4 -6
  13. package/build/build/metadata.js +5 -10
  14. package/build/build/utils/appJson.d.ts +1 -0
  15. package/build/build/utils/appJson.js +13 -4
  16. package/build/build/utils/devClient.d.ts +4 -4
  17. package/build/build/utils/devClient.js +10 -18
  18. package/build/build/utils/repository.js +10 -7
  19. package/build/build/validate.js +4 -4
  20. package/build/commandUtils/EasCommand.d.ts +1 -0
  21. package/build/commandUtils/EasCommand.js +21 -0
  22. package/build/commands/branch/create.js +3 -2
  23. package/build/commands/branch/delete.js +1 -1
  24. package/build/commands/branch/list.js +1 -1
  25. package/build/commands/branch/publish.js +20 -48
  26. package/build/commands/branch/view.js +1 -1
  27. package/build/commands/build/index.d.ts +1 -1
  28. package/build/commands/build/index.js +64 -49
  29. package/build/commands/channel/edit.js +1 -1
  30. package/build/commands/channel/list.js +1 -1
  31. package/build/commands/channel/view.js +1 -1
  32. package/build/commands/diagnostics.js +2 -2
  33. package/build/commands/project/info.js +1 -1
  34. package/build/commands/submit.js +16 -11
  35. package/build/commands/update/view.js +1 -1
  36. package/build/credentials/android/api/graphql/queries/GoogleServiceAccountKeyQuery.js +2 -0
  37. package/build/credentials/context.d.ts +1 -1
  38. package/build/credentials/context.js +5 -5
  39. package/build/credentials/credentialsJson/update.js +5 -4
  40. package/build/credentials/errors.d.ts +3 -0
  41. package/build/credentials/errors.js +7 -1
  42. package/build/credentials/ios/IosCredentialsProvider.js +1 -1
  43. package/build/credentials/ios/actions/AscApiKeyUtils.d.ts +5 -0
  44. package/build/credentials/ios/actions/AscApiKeyUtils.js +63 -0
  45. package/build/credentials/ios/actions/CreateDistributionCertificate.js +1 -1
  46. package/build/credentials/ios/actions/CreatePushKey.js +1 -1
  47. package/build/credentials/ios/actions/DistributionCertificateUtils.d.ts +1 -1
  48. package/build/credentials/ios/actions/DistributionCertificateUtils.js +10 -12
  49. package/build/credentials/ios/actions/PushKeyUtils.d.ts +1 -1
  50. package/build/credentials/ios/actions/PushKeyUtils.js +5 -5
  51. package/build/credentials/ios/actions/SetupTargetBuildCredentials.js +1 -1
  52. package/build/credentials/ios/api/graphql/queries/AppQuery.js +3 -1
  53. package/build/credentials/ios/api/graphql/queries/AppleDeviceQuery.js +6 -2
  54. package/build/credentials/ios/api/graphql/queries/AppleDistributionCertificateQuery.js +7 -1
  55. package/build/credentials/ios/api/graphql/queries/AppleProvisioningProfileQuery.js +5 -1
  56. package/build/credentials/ios/api/graphql/queries/ApplePushKeyQuery.js +2 -0
  57. package/build/credentials/ios/api/graphql/queries/AppleTeamQuery.js +5 -1
  58. package/build/credentials/ios/appstore/AppStoreApi.d.ts +7 -1
  59. package/build/credentials/ios/appstore/AppStoreApi.js +17 -0
  60. package/build/credentials/ios/appstore/Credentials.js +3 -3
  61. package/build/credentials/ios/appstore/Credentials.types.d.ts +13 -0
  62. package/build/credentials/ios/appstore/ascApiKey.d.ts +9 -0
  63. package/build/credentials/ios/appstore/ascApiKey.js +99 -0
  64. package/build/credentials/ios/credentials.d.ts +17 -0
  65. package/build/credentials/ios/credentials.js +16 -1
  66. package/build/credentials/manager/Actions.d.ts +47 -0
  67. package/build/credentials/manager/Actions.js +48 -0
  68. package/build/credentials/manager/AndroidActions.d.ts +6 -0
  69. package/build/credentials/manager/AndroidActions.js +114 -0
  70. package/build/credentials/manager/IosActions.d.ts +6 -0
  71. package/build/credentials/manager/IosActions.js +110 -0
  72. package/build/credentials/manager/ManageAndroid.d.ts +1 -29
  73. package/build/credentials/manager/ManageAndroid.js +26 -159
  74. package/build/credentials/manager/ManageIos.d.ts +1 -29
  75. package/build/credentials/manager/ManageIos.js +28 -155
  76. package/build/graphql/client.d.ts +8 -2
  77. package/build/graphql/generated.d.ts +134 -121
  78. package/build/graphql/generated.js +46 -28
  79. package/build/graphql/queries/BuildQuery.js +4 -1
  80. package/build/graphql/queries/EnvironmentSecretsQuery.js +4 -2
  81. package/build/graphql/queries/ProjectQuery.js +3 -1
  82. package/build/graphql/queries/PublishQuery.js +4 -1
  83. package/build/graphql/queries/SubmissionQuery.js +5 -2
  84. package/build/graphql/queries/UserQuery.js +4 -1
  85. package/build/graphql/queries/WebhookQuery.js +6 -2
  86. package/build/log.d.ts +11 -3
  87. package/build/log.js +23 -22
  88. package/build/project/android/applicationId.d.ts +1 -1
  89. package/build/project/android/applicationId.js +7 -6
  90. package/build/project/ios/bundleIdentifier.d.ts +1 -1
  91. package/build/project/ios/bundleIdentifier.js +7 -6
  92. package/build/project/projectUtils.js +1 -1
  93. package/build/project/publish.js +2 -2
  94. package/build/project/workflow.js +2 -2
  95. package/build/submit/ArchiveSource.d.ts +7 -2
  96. package/build/submit/ArchiveSource.js +94 -11
  97. package/build/submit/ios/AscApiKeySource.d.ts +28 -0
  98. package/build/submit/ios/AscApiKeySource.js +51 -0
  99. package/build/submit/ios/IosSubmitCommand.d.ts +2 -0
  100. package/build/submit/ios/IosSubmitCommand.js +55 -3
  101. package/build/submit/ios/IosSubmitter.d.ts +3 -1
  102. package/build/submit/ios/IosSubmitter.js +49 -5
  103. package/build/submit/submit.js +1 -1
  104. package/build/submit/utils/builds.d.ts +3 -1
  105. package/build/submit/utils/builds.js +6 -6
  106. package/build/user/User.js +1 -0
  107. package/build/utils/easCli.d.ts +1 -0
  108. package/build/utils/easCli.js +5 -0
  109. package/build/utils/{expoCommand.d.ts → expoCli.d.ts} +0 -0
  110. package/build/utils/{expoCommand.js → expoCli.js} +0 -0
  111. package/build/utils/profiles.d.ts +11 -0
  112. package/build/utils/profiles.js +46 -0
  113. package/build/vcs/clients/git.d.ts +26 -0
  114. package/build/vcs/clients/git.js +184 -0
  115. package/build/vcs/clients/gitNoCommit.d.ts +7 -0
  116. package/build/vcs/clients/gitNoCommit.js +27 -0
  117. package/build/vcs/clients/noVcs.d.ts +6 -0
  118. package/build/vcs/clients/noVcs.js +19 -0
  119. package/build/vcs/git.d.ts +10 -17
  120. package/build/vcs/git.js +7 -175
  121. package/build/vcs/index.d.ts +2 -2
  122. package/build/vcs/index.js +15 -6
  123. package/build/vcs/local.d.ts +18 -5
  124. package/build/vcs/local.js +61 -32
  125. package/build/vcs/vcs.d.ts +2 -1
  126. package/build/vcs/vcs.js +8 -4
  127. package/oclif.manifest.json +1 -1
  128. package/package.json +7 -7
@@ -0,0 +1,114 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.gsaKeyActions = exports.fcmActions = exports.buildCredentialsActions = exports.credentialsJsonActions = exports.highLevelActions = void 0;
4
+ const Actions_1 = require("./Actions");
5
+ exports.highLevelActions = [
6
+ {
7
+ value: Actions_1.AndroidActionType.ManageBuildCredentials,
8
+ title: 'Keystore: Manage everything needed to build your project',
9
+ scope: Actions_1.Scope.Manager,
10
+ },
11
+ {
12
+ value: Actions_1.AndroidActionType.ManageFcm,
13
+ title: 'Push Notifications: Manage your FCM Api Key',
14
+ scope: Actions_1.Scope.Manager,
15
+ },
16
+ {
17
+ value: Actions_1.AndroidActionType.ManageGoogleServiceAccountKey,
18
+ title: 'Google Service Account: Manage your Service Account Key',
19
+ scope: Actions_1.Scope.Manager,
20
+ },
21
+ {
22
+ value: Actions_1.AndroidActionType.ManageCredentialsJson,
23
+ title: 'credentials.json: Upload/Download credentials between EAS servers and your local json ',
24
+ scope: Actions_1.Scope.Manager,
25
+ },
26
+ {
27
+ value: Actions_1.AndroidActionType.GoBackToCaller,
28
+ title: 'Go back',
29
+ scope: Actions_1.Scope.Manager,
30
+ },
31
+ ];
32
+ exports.credentialsJsonActions = [
33
+ {
34
+ value: Actions_1.AndroidActionType.UpdateCredentialsJson,
35
+ title: 'Download credentials from EAS to credentials.json',
36
+ scope: Actions_1.Scope.Project,
37
+ },
38
+ {
39
+ value: Actions_1.AndroidActionType.SetupBuildCredentialsFromCredentialsJson,
40
+ title: 'Upload credentials from credentials.json to EAS',
41
+ scope: Actions_1.Scope.Project,
42
+ },
43
+ {
44
+ value: Actions_1.AndroidActionType.GoBackToHighLevelActions,
45
+ title: 'Go back',
46
+ scope: Actions_1.Scope.Manager,
47
+ },
48
+ ];
49
+ exports.buildCredentialsActions = [
50
+ {
51
+ value: Actions_1.AndroidActionType.CreateKeystore,
52
+ title: 'Set up a new keystore',
53
+ scope: Actions_1.Scope.Project,
54
+ },
55
+ {
56
+ value: Actions_1.AndroidActionType.DownloadKeystore,
57
+ title: 'Download existing keystore',
58
+ scope: Actions_1.Scope.Project,
59
+ },
60
+ {
61
+ value: Actions_1.AndroidActionType.RemoveKeystore,
62
+ title: 'Delete your keystore',
63
+ scope: Actions_1.Scope.Project,
64
+ },
65
+ {
66
+ value: Actions_1.AndroidActionType.GoBackToHighLevelActions,
67
+ title: 'Go back',
68
+ scope: Actions_1.Scope.Manager,
69
+ },
70
+ ];
71
+ exports.fcmActions = [
72
+ {
73
+ value: Actions_1.AndroidActionType.CreateFcm,
74
+ title: 'Upload an FCM Api Key',
75
+ scope: Actions_1.Scope.Project,
76
+ },
77
+ {
78
+ value: Actions_1.AndroidActionType.RemoveFcm,
79
+ title: 'Delete your FCM Api Key',
80
+ scope: Actions_1.Scope.Project,
81
+ },
82
+ {
83
+ value: Actions_1.AndroidActionType.GoBackToHighLevelActions,
84
+ title: 'Go back',
85
+ scope: Actions_1.Scope.Manager,
86
+ },
87
+ ];
88
+ exports.gsaKeyActions = [
89
+ {
90
+ value: Actions_1.AndroidActionType.SetupGsaKey,
91
+ title: 'Setup a Google Service Account Key',
92
+ scope: Actions_1.Scope.Project,
93
+ },
94
+ {
95
+ value: Actions_1.AndroidActionType.CreateGsaKey,
96
+ title: 'Upload a Google Service Account Key',
97
+ scope: Actions_1.Scope.Project,
98
+ },
99
+ {
100
+ value: Actions_1.AndroidActionType.UseExistingGsaKey,
101
+ title: 'Use an existing Google Service Account Key',
102
+ scope: Actions_1.Scope.Project,
103
+ },
104
+ {
105
+ value: Actions_1.AndroidActionType.RemoveGsaKey,
106
+ title: 'Delete a Google Service Account Key',
107
+ scope: Actions_1.Scope.Project,
108
+ },
109
+ {
110
+ value: Actions_1.AndroidActionType.GoBackToHighLevelActions,
111
+ title: 'Go back',
112
+ scope: Actions_1.Scope.Manager,
113
+ },
114
+ ];
@@ -0,0 +1,6 @@
1
+ import { CredentialsContext } from '../context';
2
+ import { ActionInfo } from './Actions';
3
+ export declare const highLevelActions: ActionInfo[];
4
+ export declare const credentialsJsonActions: ActionInfo[];
5
+ export declare function getPushKeyActions(ctx: CredentialsContext): ActionInfo[];
6
+ export declare function getBuildCredentialsActions(ctx: CredentialsContext): ActionInfo[];
@@ -0,0 +1,110 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getBuildCredentialsActions = exports.getPushKeyActions = exports.credentialsJsonActions = exports.highLevelActions = void 0;
4
+ const Actions_1 = require("./Actions");
5
+ exports.highLevelActions = [
6
+ {
7
+ value: Actions_1.IosActionType.ManageBuildCredentials,
8
+ title: 'Build Credentials: Manage everything needed to build your project',
9
+ scope: Actions_1.Scope.Manager,
10
+ },
11
+ {
12
+ value: Actions_1.IosActionType.ManagePushKey,
13
+ title: 'Push Notifications: Manage your Apple Push Notifications Key',
14
+ scope: Actions_1.Scope.Manager,
15
+ },
16
+ {
17
+ value: Actions_1.IosActionType.ManageCredentialsJson,
18
+ title: 'credentials.json: Upload/Download credentials between EAS servers and your local json ',
19
+ scope: Actions_1.Scope.Manager,
20
+ },
21
+ {
22
+ value: Actions_1.IosActionType.GoBackToCaller,
23
+ title: 'Go back',
24
+ scope: Actions_1.Scope.Manager,
25
+ },
26
+ ];
27
+ exports.credentialsJsonActions = [
28
+ {
29
+ value: Actions_1.IosActionType.UpdateCredentialsJson,
30
+ title: 'Download credentials from EAS to credentials.json',
31
+ scope: Actions_1.Scope.Project,
32
+ },
33
+ {
34
+ value: Actions_1.IosActionType.SetupBuildCredentialsFromCredentialsJson,
35
+ title: 'Upload credentials from credentials.json to EAS',
36
+ scope: Actions_1.Scope.Project,
37
+ },
38
+ {
39
+ value: Actions_1.IosActionType.GoBackToHighLevelActions,
40
+ title: 'Go back',
41
+ scope: Actions_1.Scope.Manager,
42
+ },
43
+ ];
44
+ function getPushKeyActions(ctx) {
45
+ return [
46
+ {
47
+ value: Actions_1.IosActionType.SetupPushKey,
48
+ title: 'Setup your project to use Push Notifications',
49
+ scope: Actions_1.Scope.Project,
50
+ },
51
+ {
52
+ value: Actions_1.IosActionType.CreatePushKey,
53
+ title: 'Add a new push key',
54
+ scope: ctx.hasProjectContext ? Actions_1.Scope.Project : Actions_1.Scope.Account,
55
+ },
56
+ {
57
+ value: Actions_1.IosActionType.UseExistingPushKey,
58
+ title: 'Use an existing push key',
59
+ scope: Actions_1.Scope.Project,
60
+ },
61
+ {
62
+ value: Actions_1.IosActionType.RemovePushKey,
63
+ title: 'Remove a push key from your account',
64
+ scope: Actions_1.Scope.Account,
65
+ },
66
+ {
67
+ value: Actions_1.IosActionType.GoBackToHighLevelActions,
68
+ title: 'Go back',
69
+ scope: Actions_1.Scope.Manager,
70
+ },
71
+ ];
72
+ }
73
+ exports.getPushKeyActions = getPushKeyActions;
74
+ function getBuildCredentialsActions(ctx) {
75
+ return [
76
+ {
77
+ // This command will be triggered during build to ensure all credentials are ready
78
+ // I'm leaving it here for now to simplify testing
79
+ value: Actions_1.IosActionType.SetupBuildCredentials,
80
+ title: 'All: Set up all the required credentials to build your project',
81
+ scope: Actions_1.Scope.Project,
82
+ },
83
+ {
84
+ value: Actions_1.IosActionType.UseExistingDistributionCertificate,
85
+ title: 'Distribution Certificate: Use an existing one for your project',
86
+ scope: Actions_1.Scope.Project,
87
+ },
88
+ {
89
+ value: Actions_1.IosActionType.CreateDistributionCertificate,
90
+ title: `Distribution Certificate: Add a new one to your account`,
91
+ scope: ctx.hasProjectContext ? Actions_1.Scope.Project : Actions_1.Scope.Account,
92
+ },
93
+ {
94
+ value: Actions_1.IosActionType.RemoveDistributionCertificate,
95
+ title: 'Distribution Certificate: Delete one from your account',
96
+ scope: Actions_1.Scope.Account,
97
+ },
98
+ {
99
+ value: Actions_1.IosActionType.RemoveProvisioningProfile,
100
+ title: 'Provisioning Profile: Delete one from your project',
101
+ scope: Actions_1.Scope.Project,
102
+ },
103
+ {
104
+ value: Actions_1.IosActionType.GoBackToHighLevelActions,
105
+ title: 'Go back',
106
+ scope: Actions_1.Scope.Manager,
107
+ },
108
+ ];
109
+ }
110
+ exports.getBuildCredentialsActions = getBuildCredentialsActions;
@@ -1,33 +1,6 @@
1
1
  import { CredentialsContext } from '../context';
2
+ import { ActionInfo } from './Actions';
2
3
  import { Action } from './HelperActions';
3
- declare enum ActionType {
4
- ManageBuildCredentials = 0,
5
- ManageFcm = 1,
6
- ManageGoogleServiceAccountKey = 2,
7
- ManageCredentialsJson = 3,
8
- GoBackToCaller = 4,
9
- GoBackToHighLevelActions = 5,
10
- CreateKeystore = 6,
11
- DownloadKeystore = 7,
12
- RemoveKeystore = 8,
13
- CreateFcm = 9,
14
- RemoveFcm = 10,
15
- CreateGsaKey = 11,
16
- UseExistingGsaKey = 12,
17
- RemoveGsaKey = 13,
18
- SetupGsaKey = 14,
19
- UpdateCredentialsJson = 15,
20
- SetupBuildCredentialsFromCredentialsJson = 16
21
- }
22
- declare enum Scope {
23
- Project = 0,
24
- Manager = 1
25
- }
26
- declare type ActionInfo = {
27
- value: ActionType;
28
- title: string;
29
- scope: Scope;
30
- };
31
4
  export declare class ManageAndroid {
32
5
  private callingAction;
33
6
  constructor(callingAction: Action);
@@ -35,4 +8,3 @@ export declare class ManageAndroid {
35
8
  private createProjectContextAsync;
36
9
  private runProjectSpecificActionAsync;
37
10
  }
38
- export {};
@@ -25,149 +25,16 @@ const SetupGoogleServiceAccountKey_1 = require("../android/actions/SetupGoogleSe
25
25
  const UpdateCredentialsJson_1 = require("../android/actions/UpdateCredentialsJson");
26
26
  const UseExistingGoogleServiceAccountKey_1 = require("../android/actions/UseExistingGoogleServiceAccountKey");
27
27
  const printCredentials_1 = require("../android/utils/printCredentials");
28
+ const Actions_1 = require("./Actions");
29
+ const AndroidActions_1 = require("./AndroidActions");
28
30
  const HelperActions_1 = require("./HelperActions");
29
31
  const SelectAndroidBuildCredentials_1 = require("./SelectAndroidBuildCredentials");
30
32
  const SelectBuildProfileFromEasJson_1 = require("./SelectBuildProfileFromEasJson");
31
- var ActionType;
32
- (function (ActionType) {
33
- ActionType[ActionType["ManageBuildCredentials"] = 0] = "ManageBuildCredentials";
34
- ActionType[ActionType["ManageFcm"] = 1] = "ManageFcm";
35
- ActionType[ActionType["ManageGoogleServiceAccountKey"] = 2] = "ManageGoogleServiceAccountKey";
36
- ActionType[ActionType["ManageCredentialsJson"] = 3] = "ManageCredentialsJson";
37
- ActionType[ActionType["GoBackToCaller"] = 4] = "GoBackToCaller";
38
- ActionType[ActionType["GoBackToHighLevelActions"] = 5] = "GoBackToHighLevelActions";
39
- ActionType[ActionType["CreateKeystore"] = 6] = "CreateKeystore";
40
- ActionType[ActionType["DownloadKeystore"] = 7] = "DownloadKeystore";
41
- ActionType[ActionType["RemoveKeystore"] = 8] = "RemoveKeystore";
42
- ActionType[ActionType["CreateFcm"] = 9] = "CreateFcm";
43
- ActionType[ActionType["RemoveFcm"] = 10] = "RemoveFcm";
44
- ActionType[ActionType["CreateGsaKey"] = 11] = "CreateGsaKey";
45
- ActionType[ActionType["UseExistingGsaKey"] = 12] = "UseExistingGsaKey";
46
- ActionType[ActionType["RemoveGsaKey"] = 13] = "RemoveGsaKey";
47
- ActionType[ActionType["SetupGsaKey"] = 14] = "SetupGsaKey";
48
- ActionType[ActionType["UpdateCredentialsJson"] = 15] = "UpdateCredentialsJson";
49
- ActionType[ActionType["SetupBuildCredentialsFromCredentialsJson"] = 16] = "SetupBuildCredentialsFromCredentialsJson";
50
- })(ActionType || (ActionType = {}));
51
- var Scope;
52
- (function (Scope) {
53
- Scope[Scope["Project"] = 0] = "Project";
54
- Scope[Scope["Manager"] = 1] = "Manager";
55
- })(Scope || (Scope = {}));
56
- const highLevelActions = [
57
- {
58
- value: ActionType.ManageBuildCredentials,
59
- title: 'Keystore: Manage everything needed to build your project',
60
- scope: Scope.Manager,
61
- },
62
- {
63
- value: ActionType.ManageFcm,
64
- title: 'Push Notifications: Manage your FCM Api Key',
65
- scope: Scope.Manager,
66
- },
67
- {
68
- value: ActionType.ManageGoogleServiceAccountKey,
69
- title: 'Google Service Account: Manage your Service Account Key',
70
- scope: Scope.Manager,
71
- },
72
- {
73
- value: ActionType.ManageCredentialsJson,
74
- title: 'Credentials.json: Upload/Download credentials between EAS servers and your local json ',
75
- scope: Scope.Manager,
76
- },
77
- {
78
- value: ActionType.GoBackToCaller,
79
- title: 'Go back',
80
- scope: Scope.Manager,
81
- },
82
- ];
83
- const credentialsJsonActions = [
84
- {
85
- value: ActionType.UpdateCredentialsJson,
86
- title: 'Download credentials from EAS to credentials.json',
87
- scope: Scope.Project,
88
- },
89
- {
90
- value: ActionType.SetupBuildCredentialsFromCredentialsJson,
91
- title: 'Upload credentials from credentials.json to EAS',
92
- scope: Scope.Project,
93
- },
94
- {
95
- value: ActionType.GoBackToHighLevelActions,
96
- title: 'Go back',
97
- scope: Scope.Manager,
98
- },
99
- ];
100
- const buildCredentialsActions = [
101
- {
102
- value: ActionType.CreateKeystore,
103
- title: 'Set up a new keystore',
104
- scope: Scope.Project,
105
- },
106
- {
107
- value: ActionType.DownloadKeystore,
108
- title: 'Download existing keystore',
109
- scope: Scope.Project,
110
- },
111
- {
112
- value: ActionType.RemoveKeystore,
113
- title: 'Delete your keystore',
114
- scope: Scope.Project,
115
- },
116
- {
117
- value: ActionType.GoBackToHighLevelActions,
118
- title: 'Go back',
119
- scope: Scope.Manager,
120
- },
121
- ];
122
- const fcmActions = [
123
- {
124
- value: ActionType.CreateFcm,
125
- title: 'Upload an FCM Api Key',
126
- scope: Scope.Project,
127
- },
128
- {
129
- value: ActionType.RemoveFcm,
130
- title: 'Delete your FCM Api Key',
131
- scope: Scope.Project,
132
- },
133
- {
134
- value: ActionType.GoBackToHighLevelActions,
135
- title: 'Go back',
136
- scope: Scope.Manager,
137
- },
138
- ];
139
- const gsaKeyActions = [
140
- {
141
- value: ActionType.SetupGsaKey,
142
- title: 'Setup a Google Service Account Key',
143
- scope: Scope.Project,
144
- },
145
- {
146
- value: ActionType.CreateGsaKey,
147
- title: 'Upload a Google Service Account Key',
148
- scope: Scope.Project,
149
- },
150
- {
151
- value: ActionType.UseExistingGsaKey,
152
- title: 'Use an existing Google Service Account Key',
153
- scope: Scope.Project,
154
- },
155
- {
156
- value: ActionType.RemoveGsaKey,
157
- title: 'Delete a Google Service Account Key',
158
- scope: Scope.Project,
159
- },
160
- {
161
- value: ActionType.GoBackToHighLevelActions,
162
- title: 'Go back',
163
- scope: Scope.Manager,
164
- },
165
- ];
166
33
  class ManageAndroid {
167
34
  constructor(callingAction) {
168
35
  this.callingAction = callingAction;
169
36
  }
170
- async runAsync(ctx, currentActions = highLevelActions) {
37
+ async runAsync(ctx, currentActions = AndroidActions_1.highLevelActions) {
171
38
  const accountName = ctx.hasProjectContext
172
39
  ? (0, projectUtils_1.getProjectAccountName)(ctx.exp, ctx.user)
173
40
  : (0, actions_1.ensureActorHasUsername)(ctx.user);
@@ -210,28 +77,28 @@ class ManageAndroid {
210
77
  if (!actionInfo) {
211
78
  throw new Error('Action not supported yet');
212
79
  }
213
- if (actionInfo.scope === Scope.Manager) {
214
- if (chosenAction === ActionType.ManageBuildCredentials) {
215
- currentActions = buildCredentialsActions;
80
+ if (actionInfo.scope === Actions_1.Scope.Manager) {
81
+ if (chosenAction === Actions_1.AndroidActionType.ManageBuildCredentials) {
82
+ currentActions = AndroidActions_1.buildCredentialsActions;
216
83
  continue;
217
84
  }
218
- else if (chosenAction === ActionType.ManageFcm) {
219
- currentActions = fcmActions;
85
+ else if (chosenAction === Actions_1.AndroidActionType.ManageFcm) {
86
+ currentActions = AndroidActions_1.fcmActions;
220
87
  continue;
221
88
  }
222
- else if (chosenAction === ActionType.ManageGoogleServiceAccountKey) {
223
- currentActions = gsaKeyActions;
89
+ else if (chosenAction === Actions_1.AndroidActionType.ManageGoogleServiceAccountKey) {
90
+ currentActions = AndroidActions_1.gsaKeyActions;
224
91
  continue;
225
92
  }
226
- else if (chosenAction === ActionType.ManageCredentialsJson) {
227
- currentActions = credentialsJsonActions;
93
+ else if (chosenAction === Actions_1.AndroidActionType.ManageCredentialsJson) {
94
+ currentActions = AndroidActions_1.credentialsJsonActions;
228
95
  continue;
229
96
  }
230
- else if (chosenAction === ActionType.GoBackToHighLevelActions) {
231
- currentActions = highLevelActions;
97
+ else if (chosenAction === Actions_1.AndroidActionType.GoBackToHighLevelActions) {
98
+ currentActions = AndroidActions_1.highLevelActions;
232
99
  continue;
233
100
  }
234
- else if (chosenAction === ActionType.GoBackToCaller) {
101
+ else if (chosenAction === Actions_1.AndroidActionType.GoBackToCaller) {
235
102
  return await this.callingAction.runAsync(ctx);
236
103
  }
237
104
  }
@@ -265,7 +132,7 @@ class ManageAndroid {
265
132
  async runProjectSpecificActionAsync(ctx, action, gradleContext) {
266
133
  (0, assert_1.default)(ctx.hasProjectContext, 'You must be in your project directory in order to perform this action');
267
134
  const appLookupParams = await (0, BuildCredentialsUtils_1.getAppLookupParamsFromContextAsync)(ctx, gradleContext);
268
- if (action === ActionType.CreateKeystore) {
135
+ if (action === Actions_1.AndroidActionType.CreateKeystore) {
269
136
  const selectBuildCredentialsResult = await new SelectAndroidBuildCredentials_1.SelectAndroidBuildCredentials(appLookupParams).runAsync(ctx);
270
137
  const keystore = await new CreateKeystore_1.CreateKeystore(appLookupParams.account).runAsync(ctx);
271
138
  if (selectBuildCredentialsResult.resultType ===
@@ -281,48 +148,48 @@ class ManageAndroid {
281
148
  });
282
149
  }
283
150
  }
284
- else if (action === ActionType.DownloadKeystore) {
151
+ else if (action === Actions_1.AndroidActionType.DownloadKeystore) {
285
152
  const buildCredentials = await new SelectAndroidBuildCredentials_1.SelectExistingAndroidBuildCredentials(appLookupParams).runAsync(ctx);
286
153
  if (buildCredentials) {
287
154
  await new DownloadKeystore_1.DownloadKeystore({ app: appLookupParams }).runAsync(ctx, buildCredentials);
288
155
  }
289
156
  }
290
- else if (action === ActionType.RemoveKeystore) {
157
+ else if (action === Actions_1.AndroidActionType.RemoveKeystore) {
291
158
  const buildCredentials = await new SelectAndroidBuildCredentials_1.SelectExistingAndroidBuildCredentials(appLookupParams).runAsync(ctx);
292
159
  if (buildCredentials) {
293
160
  await new RemoveKeystore_1.RemoveKeystore(appLookupParams).runAsync(ctx, buildCredentials);
294
161
  }
295
162
  }
296
- else if (action === ActionType.CreateFcm) {
163
+ else if (action === Actions_1.AndroidActionType.CreateFcm) {
297
164
  const fcm = await new CreateFcm_1.CreateFcm(appLookupParams.account).runAsync(ctx);
298
165
  await new AssignFcm_1.AssignFcm(appLookupParams).runAsync(ctx, fcm);
299
166
  }
300
- else if (action === ActionType.RemoveFcm) {
167
+ else if (action === Actions_1.AndroidActionType.RemoveFcm) {
301
168
  await new RemoveFcm_1.RemoveFcm(appLookupParams).runAsync(ctx);
302
169
  }
303
- else if (action === ActionType.CreateGsaKey) {
170
+ else if (action === Actions_1.AndroidActionType.CreateGsaKey) {
304
171
  const gsaKey = await new CreateGoogleServiceAccountKey_1.CreateGoogleServiceAccountKey(appLookupParams.account).runAsync(ctx);
305
172
  await new AssignGoogleServiceAccountKey_1.AssignGoogleServiceAccountKey(appLookupParams).runAsync(ctx, gsaKey);
306
173
  }
307
- else if (action === ActionType.UseExistingGsaKey) {
174
+ else if (action === Actions_1.AndroidActionType.UseExistingGsaKey) {
308
175
  const gsaKey = await new UseExistingGoogleServiceAccountKey_1.UseExistingGoogleServiceAccountKey(appLookupParams.account).runAsync(ctx);
309
176
  if (gsaKey) {
310
177
  await new AssignGoogleServiceAccountKey_1.AssignGoogleServiceAccountKey(appLookupParams).runAsync(ctx, gsaKey);
311
178
  }
312
179
  }
313
- else if (action === ActionType.RemoveGsaKey) {
180
+ else if (action === Actions_1.AndroidActionType.RemoveGsaKey) {
314
181
  await new RemoveGoogleServiceAccountKey_1.SelectAndRemoveGoogleServiceAccountKey(appLookupParams.account).runAsync(ctx);
315
182
  }
316
- else if (action === ActionType.SetupGsaKey) {
183
+ else if (action === Actions_1.AndroidActionType.SetupGsaKey) {
317
184
  await new SetupGoogleServiceAccountKey_1.SetupGoogleServiceAccountKey(appLookupParams).runAsync(ctx);
318
185
  }
319
- else if (action === ActionType.UpdateCredentialsJson) {
186
+ else if (action === Actions_1.AndroidActionType.UpdateCredentialsJson) {
320
187
  const buildCredentials = await new SelectAndroidBuildCredentials_1.SelectExistingAndroidBuildCredentials(appLookupParams).runAsync(ctx);
321
188
  if (buildCredentials) {
322
189
  await new UpdateCredentialsJson_1.UpdateCredentialsJson().runAsync(ctx, buildCredentials);
323
190
  }
324
191
  }
325
- else if (action === ActionType.SetupBuildCredentialsFromCredentialsJson) {
192
+ else if (action === Actions_1.AndroidActionType.SetupBuildCredentialsFromCredentialsJson) {
326
193
  await new SetupBuildCredentialsFromCredentialsJson_1.SetupBuildCredentialsFromCredentialsJson(appLookupParams).runAsync(ctx);
327
194
  }
328
195
  }
@@ -1,33 +1,6 @@
1
1
  import { CredentialsContext } from '../context';
2
+ import { ActionInfo } from './Actions';
2
3
  import { Action } from './HelperActions';
3
- declare enum ActionType {
4
- ManageCredentialsJson = 0,
5
- ManageBuildCredentials = 1,
6
- ManagePushKey = 2,
7
- GoBackToCaller = 3,
8
- GoBackToHighLevelActions = 4,
9
- SetupBuildCredentials = 5,
10
- SetupBuildCredentialsFromCredentialsJson = 6,
11
- UpdateCredentialsJson = 7,
12
- UseExistingDistributionCertificate = 8,
13
- RemoveProvisioningProfile = 9,
14
- CreateDistributionCertificate = 10,
15
- RemoveDistributionCertificate = 11,
16
- SetupPushKey = 12,
17
- CreatePushKey = 13,
18
- UseExistingPushKey = 14,
19
- RemovePushKey = 15
20
- }
21
- declare enum Scope {
22
- Project = 0,
23
- Account = 1,
24
- Manager = 2
25
- }
26
- declare type ActionInfo = {
27
- value: ActionType;
28
- title: string;
29
- scope: Scope;
30
- };
31
4
  export declare class ManageIos {
32
5
  private callingAction;
33
6
  constructor(callingAction: Action);
@@ -38,4 +11,3 @@ export declare class ManageIos {
38
11
  private setupProvisioningProfileWithSpecificDistCertAsync;
39
12
  private selectTargetAsync;
40
13
  }
41
- export {};