eas-cli 18.1.0 → 18.3.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 (181) hide show
  1. package/README.md +521 -506
  2. package/bin/dev +6 -13
  3. package/bin/run +4 -4
  4. package/build/commandUtils/flags.d.ts +14 -7
  5. package/build/commandUtils/flags.js +13 -8
  6. package/build/commandUtils/pagination.d.ts +4 -4
  7. package/build/commandUtils/pagination.js +4 -2
  8. package/build/commands/account/usage.d.ts +2 -3
  9. package/build/commands/account/usage.js +5 -5
  10. package/build/commands/account/view.js +6 -2
  11. package/build/commands/analytics.d.ts +2 -3
  12. package/build/commands/analytics.js +6 -1
  13. package/build/commands/branch/create.d.ts +2 -4
  14. package/build/commands/branch/create.js +10 -6
  15. package/build/commands/branch/delete.d.ts +2 -4
  16. package/build/commands/branch/delete.js +6 -6
  17. package/build/commands/branch/list.d.ts +1 -1
  18. package/build/commands/branch/list.js +2 -1
  19. package/build/commands/branch/rename.d.ts +2 -2
  20. package/build/commands/branch/rename.js +2 -1
  21. package/build/commands/branch/view.d.ts +3 -5
  22. package/build/commands/branch/view.js +6 -6
  23. package/build/commands/build/cancel.d.ts +4 -4
  24. package/build/commands/build/cancel.js +6 -4
  25. package/build/commands/build/configure.d.ts +1 -1
  26. package/build/commands/build/configure.js +2 -2
  27. package/build/commands/build/delete.d.ts +4 -4
  28. package/build/commands/build/delete.js +6 -4
  29. package/build/commands/build/dev.d.ts +2 -2
  30. package/build/commands/build/dev.js +2 -2
  31. package/build/commands/build/download.d.ts +2 -2
  32. package/build/commands/build/download.js +4 -3
  33. package/build/commands/build/index.d.ts +8 -8
  34. package/build/commands/build/index.js +8 -11
  35. package/build/commands/build/inspect.d.ts +4 -4
  36. package/build/commands/build/inspect.js +4 -4
  37. package/build/commands/build/internal.d.ts +3 -3
  38. package/build/commands/build/internal.js +2 -2
  39. package/build/commands/build/list.d.ts +13 -13
  40. package/build/commands/build/list.js +8 -7
  41. package/build/commands/build/resign.d.ts +5 -5
  42. package/build/commands/build/resign.js +4 -4
  43. package/build/commands/build/run.d.ts +6 -6
  44. package/build/commands/build/run.js +2 -2
  45. package/build/commands/build/version/get.d.ts +2 -2
  46. package/build/commands/build/version/get.js +8 -7
  47. package/build/commands/build/version/set.d.ts +2 -2
  48. package/build/commands/build/version/set.js +2 -2
  49. package/build/commands/build/version/sync.d.ts +2 -2
  50. package/build/commands/build/version/sync.js +2 -2
  51. package/build/commands/build/view.d.ts +2 -2
  52. package/build/commands/build/view.js +4 -1
  53. package/build/commands/channel/create.d.ts +2 -4
  54. package/build/commands/channel/create.js +10 -6
  55. package/build/commands/channel/delete.d.ts +2 -4
  56. package/build/commands/channel/delete.js +7 -6
  57. package/build/commands/channel/edit.d.ts +3 -5
  58. package/build/commands/channel/edit.js +6 -6
  59. package/build/commands/channel/list.d.ts +1 -1
  60. package/build/commands/channel/list.js +1 -1
  61. package/build/commands/channel/pause.d.ts +3 -5
  62. package/build/commands/channel/pause.js +6 -6
  63. package/build/commands/channel/resume.d.ts +3 -5
  64. package/build/commands/channel/resume.js +6 -6
  65. package/build/commands/channel/rollout.d.ts +8 -9
  66. package/build/commands/channel/rollout.js +9 -11
  67. package/build/commands/channel/view.d.ts +3 -5
  68. package/build/commands/channel/view.js +6 -6
  69. package/build/commands/config.d.ts +2 -2
  70. package/build/commands/config.js +6 -5
  71. package/build/commands/credentials/configure-build.d.ts +2 -2
  72. package/build/commands/credentials/configure-build.js +2 -2
  73. package/build/commands/credentials/index.d.ts +1 -1
  74. package/build/commands/credentials/index.js +1 -1
  75. package/build/commands/deploy/alias/delete.d.ts +2 -2
  76. package/build/commands/deploy/alias/delete.js +7 -3
  77. package/build/commands/deploy/alias/index.d.ts +2 -2
  78. package/build/commands/deploy/alias/index.js +3 -2
  79. package/build/commands/deploy/delete.d.ts +2 -2
  80. package/build/commands/deploy/delete.js +7 -3
  81. package/build/commands/deploy/index.d.ts +5 -4
  82. package/build/commands/deploy/index.js +12 -3
  83. package/build/commands/device/delete.d.ts +2 -2
  84. package/build/commands/device/list.d.ts +2 -2
  85. package/build/commands/device/rename.d.ts +3 -3
  86. package/build/commands/device/view.d.ts +2 -2
  87. package/build/commands/device/view.js +4 -1
  88. package/build/commands/env/create.d.ts +8 -11
  89. package/build/commands/env/create.js +6 -7
  90. package/build/commands/env/delete.d.ts +5 -8
  91. package/build/commands/env/delete.js +4 -5
  92. package/build/commands/env/exec.d.ts +3 -4
  93. package/build/commands/env/exec.js +7 -8
  94. package/build/commands/env/get.d.ts +6 -9
  95. package/build/commands/env/get.js +4 -5
  96. package/build/commands/env/list.d.ts +5 -8
  97. package/build/commands/env/list.js +4 -5
  98. package/build/commands/env/pull.d.ts +4 -6
  99. package/build/commands/env/pull.js +4 -5
  100. package/build/commands/env/push.d.ts +7 -7
  101. package/build/commands/env/push.js +4 -5
  102. package/build/commands/env/update.d.ts +10 -13
  103. package/build/commands/env/update.js +6 -7
  104. package/build/commands/fingerprint/compare.d.ts +6 -7
  105. package/build/commands/fingerprint/compare.js +10 -11
  106. package/build/commands/fingerprint/generate.d.ts +3 -3
  107. package/build/commands/fingerprint/generate.js +4 -3
  108. package/build/commands/go.d.ts +2 -2
  109. package/build/commands/metadata/lint.d.ts +1 -1
  110. package/build/commands/metadata/pull.d.ts +1 -1
  111. package/build/commands/metadata/push.d.ts +1 -1
  112. package/build/commands/project/init.d.ts +1 -1
  113. package/build/commands/project/new.d.ts +3 -5
  114. package/build/commands/project/new.js +6 -7
  115. package/build/commands/project/onboarding.d.ts +2 -2
  116. package/build/commands/project/onboarding.js +4 -1
  117. package/build/commands/secret/create.d.ts +4 -4
  118. package/build/commands/secret/create.js +7 -6
  119. package/build/commands/secret/delete.d.ts +1 -1
  120. package/build/commands/secret/push.d.ts +2 -2
  121. package/build/commands/secret/push.js +2 -2
  122. package/build/commands/submit/internal.d.ts +3 -3
  123. package/build/commands/submit/internal.js +2 -2
  124. package/build/commands/submit.d.ts +7 -7
  125. package/build/commands/submit.js +2 -2
  126. package/build/commands/update/configure.d.ts +2 -2
  127. package/build/commands/update/configure.js +2 -2
  128. package/build/commands/update/delete.d.ts +2 -4
  129. package/build/commands/update/delete.js +7 -6
  130. package/build/commands/update/edit.d.ts +4 -5
  131. package/build/commands/update/edit.js +7 -6
  132. package/build/commands/update/index.d.ts +9 -9
  133. package/build/commands/update/index.js +29 -13
  134. package/build/commands/update/list.d.ts +4 -4
  135. package/build/commands/update/list.js +4 -3
  136. package/build/commands/update/republish.d.ts +9 -9
  137. package/build/commands/update/republish.js +4 -4
  138. package/build/commands/update/revert-update-rollout.d.ts +5 -5
  139. package/build/commands/update/revert-update-rollout.js +2 -2
  140. package/build/commands/update/roll-back-to-embedded.d.ts +6 -6
  141. package/build/commands/update/roll-back-to-embedded.js +4 -4
  142. package/build/commands/update/rollback.d.ts +1 -1
  143. package/build/commands/update/view.d.ts +2 -4
  144. package/build/commands/update/view.js +5 -5
  145. package/build/commands/upload.d.ts +3 -3
  146. package/build/commands/upload.js +4 -3
  147. package/build/commands/webhook/create.d.ts +3 -3
  148. package/build/commands/webhook/create.js +2 -2
  149. package/build/commands/webhook/delete.d.ts +2 -4
  150. package/build/commands/webhook/delete.js +8 -6
  151. package/build/commands/webhook/list.d.ts +1 -1
  152. package/build/commands/webhook/list.js +2 -2
  153. package/build/commands/webhook/update.d.ts +4 -4
  154. package/build/commands/webhook/update.js +2 -2
  155. package/build/commands/webhook/view.d.ts +2 -4
  156. package/build/commands/webhook/view.js +5 -5
  157. package/build/commands/workflow/create.d.ts +2 -4
  158. package/build/commands/workflow/create.js +4 -5
  159. package/build/commands/workflow/logs.d.ts +2 -3
  160. package/build/commands/workflow/logs.js +5 -3
  161. package/build/commands/workflow/run.d.ts +4 -5
  162. package/build/commands/workflow/run.js +6 -1
  163. package/build/commands/workflow/runs.d.ts +2 -2
  164. package/build/commands/workflow/runs.js +2 -2
  165. package/build/commands/workflow/status.d.ts +2 -3
  166. package/build/commands/workflow/status.js +7 -5
  167. package/build/commands/workflow/validate.d.ts +2 -4
  168. package/build/commands/workflow/validate.js +5 -5
  169. package/build/commands/workflow/view.d.ts +2 -3
  170. package/build/commands/workflow/view.js +6 -1
  171. package/build/credentials/android/actions/BuildCredentialsUtils.js +0 -1
  172. package/build/credentials/android/actions/CreateKeystore.js +9 -10
  173. package/build/credentials/android/actions/SetUpBuildCredentials.js +0 -4
  174. package/build/graphql/generated.d.ts +1 -0
  175. package/build/graphql/queries/UserQuery.js +3 -0
  176. package/build/update/utils.d.ts +2 -2
  177. package/build/update/utils.js +21 -10
  178. package/build/worker/assets.d.ts +3 -1
  179. package/build/worker/assets.js +4 -1
  180. package/oclif.manifest.json +8084 -3178
  181. package/package.json +7 -7
package/bin/dev CHANGED
@@ -1,17 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const oclif = require('@oclif/core');
4
- const path = require('path');
3
+ (async () => {
4
+ const oclif = require('@oclif/core');
5
5
 
6
- const project = path.join(__dirname, '..', 'tsconfig.json');
6
+ // Keep dev entrypoint failures verbose for local debugging.
7
+ oclif.settings.debug = true;
7
8
 
8
- // In dev mode -> use ts-node and dev plugins
9
- process.env.NODE_ENV = 'development';
10
-
11
- require('ts-node').register({ project });
12
-
13
- // In dev mode, always show stack traces
14
- oclif.settings.disableJsonFlag = true
15
-
16
- // Start the CLI
17
- oclif.run().then(oclif.flush).catch(oclif.Errors.handle);
9
+ await oclif.execute({ development: true, dir: __dirname });
10
+ })();
package/bin/run CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- require('@oclif/core')
4
- .run()
5
- .then(require('@oclif/core/flush'))
6
- .catch(require('@oclif/core/handle'));
3
+ (async () => {
4
+ const oclif = require('@oclif/core');
5
+ await oclif.execute({ dir: __dirname });
6
+ })();
@@ -2,24 +2,31 @@ export declare const EasNonInteractiveAndJsonFlags: {
2
2
  json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
3
3
  'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
4
4
  };
5
+ export declare function resolveNonInteractiveAndJsonFlags(flags: {
6
+ json?: boolean;
7
+ 'non-interactive'?: boolean;
8
+ }): {
9
+ json: boolean;
10
+ nonInteractive: boolean;
11
+ };
5
12
  export declare const EasEnvironmentFlagParameters: {
6
13
  description: string;
7
14
  };
8
15
  export declare const EASEnvironmentFlag: {
9
- environment: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
16
+ environment: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
10
17
  };
11
18
  export declare const EASMultiEnvironmentFlag: {
12
- environment: import("@oclif/core/lib/interfaces").OptionFlag<string[] | undefined>;
19
+ environment: import("@oclif/core/lib/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
13
20
  };
14
21
  export declare const EASVariableFormatFlag: {
15
- format: import("@oclif/core/lib/interfaces").OptionFlag<string>;
22
+ format: import("@oclif/core/lib/interfaces").OptionFlag<"long" | "short", import("@oclif/core/lib/interfaces").CustomOptions>;
16
23
  };
17
24
  export declare const EASVariableVisibilityFlag: {
18
- visibility: import("@oclif/core/lib/interfaces").OptionFlag<"plaintext" | "sensitive" | "secret" | undefined>;
25
+ visibility: import("@oclif/core/lib/interfaces").OptionFlag<"plaintext" | "sensitive" | "secret" | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
19
26
  };
20
27
  export type EASEnvironmentVariableScopeFlagValue = 'project' | 'account';
21
28
  export declare const EASEnvironmentVariableScopeFlag: {
22
- scope: import("@oclif/core/lib/interfaces").OptionFlag<EASEnvironmentVariableScopeFlagValue>;
29
+ scope: import("@oclif/core/lib/interfaces").OptionFlag<"project" | "account", import("@oclif/core/lib/interfaces").CustomOptions>;
23
30
  };
24
31
  export declare const EASNonInteractiveFlag: {
25
32
  'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
@@ -28,8 +35,8 @@ export declare const EasJsonOnlyFlag: {
28
35
  json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
29
36
  };
30
37
  export declare const EasUpdateEnvironmentFlag: {
31
- environment: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
38
+ environment: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
32
39
  };
33
40
  export declare const EasUpdateEnvironmentRequiredFlag: {
34
- environment: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
41
+ environment: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
35
42
  };
@@ -1,16 +1,21 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.EasUpdateEnvironmentRequiredFlag = exports.EasUpdateEnvironmentFlag = exports.EasJsonOnlyFlag = exports.EASNonInteractiveFlag = exports.EASEnvironmentVariableScopeFlag = exports.EASVariableVisibilityFlag = exports.EASVariableFormatFlag = exports.EASMultiEnvironmentFlag = exports.EASEnvironmentFlag = exports.EasEnvironmentFlagParameters = exports.EasNonInteractiveAndJsonFlags = void 0;
4
+ exports.resolveNonInteractiveAndJsonFlags = resolveNonInteractiveAndJsonFlags;
4
5
  const core_1 = require("@oclif/core");
5
6
  exports.EasNonInteractiveAndJsonFlags = {
6
7
  json: core_1.Flags.boolean({
7
- description: 'Enable JSON output, non-JSON messages will be printed to stderr.',
8
- dependsOn: ['non-interactive'],
8
+ description: 'Enable JSON output, non-JSON messages will be printed to stderr. Implies --non-interactive.',
9
9
  }),
10
10
  'non-interactive': core_1.Flags.boolean({
11
11
  description: 'Run the command in non-interactive mode.',
12
12
  }),
13
13
  };
14
+ function resolveNonInteractiveAndJsonFlags(flags) {
15
+ const json = flags.json ?? false;
16
+ const nonInteractive = flags['non-interactive'] || json;
17
+ return { json, nonInteractive };
18
+ }
14
19
  exports.EasEnvironmentFlagParameters = {
15
20
  description: "Environment variable's environment, e.g. 'production', 'preview', 'development'",
16
21
  };
@@ -26,24 +31,24 @@ exports.EASMultiEnvironmentFlag = {
26
31
  }),
27
32
  };
28
33
  exports.EASVariableFormatFlag = {
29
- format: core_1.Flags.enum({
34
+ format: core_1.Flags.option({
30
35
  description: 'Output format',
31
36
  options: ['long', 'short'],
32
37
  default: 'short',
33
- }),
38
+ })(),
34
39
  };
35
40
  exports.EASVariableVisibilityFlag = {
36
- visibility: core_1.Flags.enum({
41
+ visibility: core_1.Flags.option({
37
42
  description: 'Visibility of the variable',
38
43
  options: ['plaintext', 'sensitive', 'secret'],
39
- }),
44
+ })(),
40
45
  };
41
46
  exports.EASEnvironmentVariableScopeFlag = {
42
- scope: core_1.Flags.enum({
47
+ scope: core_1.Flags.option({
43
48
  description: 'Scope for the variable',
44
49
  options: ['project', 'account'],
45
50
  default: 'project',
46
- }),
51
+ })(),
47
52
  };
48
53
  exports.EASNonInteractiveFlag = {
49
54
  'non-interactive': core_1.Flags.boolean({
@@ -1,13 +1,13 @@
1
- import { OptionFlag } from '@oclif/core/lib/interfaces';
1
+ import { Interfaces } from '@oclif/core';
2
2
  import { EasNonInteractiveAndJsonFlags } from './flags';
3
3
  export declare const getPaginatedQueryOptions: (flags: Partial<Record<keyof typeof EasPaginatedQueryFlags | keyof typeof EasNonInteractiveAndJsonFlags, any>>) => PaginatedQueryOptions;
4
4
  export declare const getLimitFlagWithCustomValues: ({ defaultTo, limit, }: {
5
5
  defaultTo: number;
6
6
  limit: number;
7
- }) => OptionFlag<number | undefined>;
7
+ }) => Interfaces.OptionFlag<number | undefined>;
8
8
  export declare const EasPaginatedQueryFlags: {
9
- offset: OptionFlag<number | undefined>;
10
- limit: OptionFlag<number | undefined>;
9
+ offset: Interfaces.OptionFlag<number | undefined, Interfaces.CustomOptions>;
10
+ limit: Interfaces.OptionFlag<number | undefined>;
11
11
  };
12
12
  export type PaginatedQueryOptions = {
13
13
  nonInteractive: boolean;
@@ -2,12 +2,14 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.EasPaginatedQueryFlags = exports.getLimitFlagWithCustomValues = exports.getPaginatedQueryOptions = void 0;
4
4
  const core_1 = require("@oclif/core");
5
+ const flags_1 = require("./flags");
5
6
  const getPaginatedQueryOptions = (flags) => {
7
+ const { json, nonInteractive } = (0, flags_1.resolveNonInteractiveAndJsonFlags)(flags);
6
8
  return {
7
9
  ...('limit' in flags && { limit: flags.limit }),
8
10
  offset: flags.offset ?? 0,
9
- nonInteractive: flags['non-interactive'] ?? false,
10
- json: flags.json ?? false,
11
+ nonInteractive,
12
+ json,
11
13
  };
12
14
  };
13
15
  exports.getPaginatedQueryOptions = getPaginatedQueryOptions;
@@ -2,9 +2,8 @@ import EasCommand from '../../commandUtils/EasCommand';
2
2
  export default class AccountUsage extends EasCommand {
3
3
  static description: string;
4
4
  static args: {
5
- name: string;
6
- description: string;
7
- }[];
5
+ ACCOUNT_NAME: import("@oclif/core/lib/interfaces").Arg<string | undefined, Record<string, unknown>>;
6
+ };
8
7
  static flags: {
9
8
  'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
10
9
  json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
+ const core_1 = require("@oclif/core");
4
5
  const chalk_1 = tslib_1.__importDefault(require("chalk"));
5
6
  const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
6
7
  const flags_1 = require("../../commandUtils/flags");
@@ -148,12 +149,11 @@ function displayUsage(data, usageData) {
148
149
  }
149
150
  class AccountUsage extends EasCommand_1.default {
150
151
  static description = 'view account usage and billing for the current cycle';
151
- static args = [
152
- {
153
- name: 'ACCOUNT_NAME',
152
+ static args = {
153
+ ACCOUNT_NAME: core_1.Args.string({
154
154
  description: 'Account name to view usage for. If not provided, the account will be selected interactively (or defaults to the only account if there is just one)',
155
- },
156
- ];
155
+ }),
156
+ };
157
157
  static flags = {
158
158
  ...flags_1.EasJsonOnlyFlag,
159
159
  ...flags_1.EASNonInteractiveFlag,
@@ -16,10 +16,14 @@ class AccountView extends EasCommand_1.default {
16
16
  async runAsync() {
17
17
  const { maybeLoggedIn: { actor, authenticationInfo }, } = await this.getContextAsync(AccountView, { nonInteractive: true });
18
18
  if (actor) {
19
+ const displayName = (0, User_1.getActorDisplayName)(actor);
19
20
  const loggedInAs = authenticationInfo.accessToken
20
- ? `${(0, User_1.getActorDisplayName)(actor)} (authenticated using EXPO_TOKEN)`
21
- : (0, User_1.getActorDisplayName)(actor);
21
+ ? `${displayName} (authenticated using EXPO_TOKEN)`
22
+ : displayName;
22
23
  log_1.default.log(chalk_1.default.green(loggedInAs));
24
+ if ('email' in actor) {
25
+ log_1.default.log(actor.email);
26
+ }
23
27
  // personal account is included, only show if more accounts that personal account
24
28
  // but do show personal account in list if there are more
25
29
  const accountExcludingPersonalAccount = actor.accounts.filter(account => !('username' in actor) || account.name !== actor.username);
@@ -2,8 +2,7 @@ import EasCommand from '../commandUtils/EasCommand';
2
2
  export default class AnalyticsView extends EasCommand {
3
3
  static description: string;
4
4
  static args: {
5
- name: string;
6
- options: string[];
7
- }[];
5
+ STATUS: import("@oclif/core/lib/interfaces").Arg<string | undefined, Record<string, unknown>>;
6
+ };
8
7
  runAsync(): Promise<void>;
9
8
  }
@@ -1,12 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
+ const core_1 = require("@oclif/core");
4
5
  const AnalyticsManager_1 = require("../analytics/AnalyticsManager");
5
6
  const EasCommand_1 = tslib_1.__importDefault(require("../commandUtils/EasCommand"));
6
7
  const log_1 = tslib_1.__importDefault(require("../log"));
7
8
  class AnalyticsView extends EasCommand_1.default {
8
9
  static description = 'display or change analytics settings';
9
- static args = [{ name: 'STATUS', options: ['on', 'off'] }];
10
+ static args = {
11
+ STATUS: core_1.Args.string({
12
+ options: ['on', 'off'],
13
+ }),
14
+ };
10
15
  async runAsync() {
11
16
  const { STATUS: status } = (await this.parse(AnalyticsView)).args;
12
17
  if (status) {
@@ -2,10 +2,8 @@ import EasCommand from '../../commandUtils/EasCommand';
2
2
  export default class BranchCreate extends EasCommand {
3
3
  static description: string;
4
4
  static args: {
5
- name: string;
6
- required: boolean;
7
- description: string;
8
- }[];
5
+ name: import("@oclif/core/lib/interfaces").Arg<string | undefined, Record<string, unknown>>;
6
+ };
9
7
  static flags: {
10
8
  json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
11
9
  'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
+ const core_1 = require("@oclif/core");
4
5
  const chalk_1 = tslib_1.__importDefault(require("chalk"));
5
6
  const queries_1 = require("../../branch/queries");
6
7
  const utils_1 = require("../../branch/utils");
@@ -12,13 +13,12 @@ const prompts_1 = require("../../prompts");
12
13
  const json_1 = require("../../utils/json");
13
14
  class BranchCreate extends EasCommand_1.default {
14
15
  static description = 'create a branch';
15
- static args = [
16
- {
17
- name: 'name',
16
+ static args = {
17
+ name: core_1.Args.string({
18
18
  required: false,
19
19
  description: 'Name of the branch to create',
20
- },
21
- ];
20
+ }),
21
+ };
22
22
  static flags = {
23
23
  ...flags_1.EasNonInteractiveAndJsonFlags,
24
24
  };
@@ -28,7 +28,8 @@ class BranchCreate extends EasCommand_1.default {
28
28
  ...this.ContextOptions.Vcs,
29
29
  };
30
30
  async runAsync() {
31
- let { args: { name }, flags: { json: jsonFlag, 'non-interactive': nonInteractive }, } = await this.parse(BranchCreate);
31
+ let { args: { name }, flags, } = await this.parse(BranchCreate);
32
+ const { json: jsonFlag, nonInteractive } = (0, flags_1.resolveNonInteractiveAndJsonFlags)(flags);
32
33
  const { projectId, loggedIn: { graphqlClient }, vcsClient, } = await this.getContextAsync(BranchCreate, {
33
34
  nonInteractive,
34
35
  });
@@ -48,6 +49,9 @@ class BranchCreate extends EasCommand_1.default {
48
49
  initial: (await (0, utils_1.getDefaultBranchNameAsync)(vcsClient)) ?? undefined,
49
50
  validate: value => (value ? true : validationMessage),
50
51
  }));
52
+ if (!name) {
53
+ throw new Error(validationMessage);
54
+ }
51
55
  }
52
56
  const newBranch = await (0, queries_1.createUpdateBranchOnAppAsync)(graphqlClient, { appId: projectId, name });
53
57
  if (jsonFlag) {
@@ -6,10 +6,8 @@ export default class BranchDelete extends EasCommand {
6
6
  projectId: import("../../commandUtils/context/ProjectIdContextField").ProjectIdContextField;
7
7
  };
8
8
  static args: {
9
- name: string;
10
- required: boolean;
11
- description: string;
12
- }[];
9
+ name: import("@oclif/core/lib/interfaces").Arg<string | undefined, Record<string, unknown>>;
10
+ };
13
11
  static flags: {
14
12
  json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
15
13
  'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
+ const core_1 = require("@oclif/core");
4
5
  const chalk_1 = tslib_1.__importDefault(require("chalk"));
5
6
  const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
6
7
  const delete_1 = require("../../branch/delete");
@@ -41,19 +42,18 @@ class BranchDelete extends EasCommand_1.default {
41
42
  ...this.ContextOptions.ProjectId,
42
43
  ...this.ContextOptions.LoggedIn,
43
44
  };
44
- static args = [
45
- {
46
- name: 'name',
45
+ static args = {
46
+ name: core_1.Args.string({
47
47
  required: false,
48
48
  description: 'Name of the branch to delete',
49
- },
50
- ];
49
+ }),
50
+ };
51
51
  static flags = {
52
52
  ...flags_1.EasNonInteractiveAndJsonFlags,
53
53
  };
54
54
  async runAsync() {
55
55
  let { args: { name: branchName }, flags, } = await this.parse(BranchDelete);
56
- const { json: jsonFlag, 'non-interactive': nonInteractive } = flags;
56
+ const { json: jsonFlag, nonInteractive } = (0, flags_1.resolveNonInteractiveAndJsonFlags)(flags);
57
57
  const paginatedQueryOptions = (0, pagination_1.getPaginatedQueryOptions)(flags);
58
58
  if (jsonFlag) {
59
59
  (0, json_1.enableJsonOutput)();
@@ -4,7 +4,7 @@ export default class BranchList extends EasCommand {
4
4
  static flags: {
5
5
  json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
6
6
  'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
7
- offset: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined>;
7
+ offset: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
8
8
  limit: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined>;
9
9
  };
10
10
  static contextDefinition: {
@@ -18,8 +18,9 @@ class BranchList extends EasCommand_1.default {
18
18
  };
19
19
  async runAsync() {
20
20
  const { flags } = await this.parse(BranchList);
21
+ const { nonInteractive } = (0, flags_1.resolveNonInteractiveAndJsonFlags)(flags);
21
22
  const { projectId, loggedIn: { graphqlClient }, } = await this.getContextAsync(BranchList, {
22
- nonInteractive: flags['non-interactive'],
23
+ nonInteractive,
23
24
  });
24
25
  const paginatedQueryOptions = (0, pagination_1.getPaginatedQueryOptions)(flags);
25
26
  if (paginatedQueryOptions.json) {
@@ -4,8 +4,8 @@ export default class BranchRename extends EasCommand {
4
4
  static flags: {
5
5
  json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
6
6
  'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
7
- from: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
8
- to: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
7
+ from: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
8
+ to: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
9
9
  };
10
10
  static contextDefinition: {
11
11
  loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
@@ -50,7 +50,8 @@ class BranchRename extends EasCommand_1.default {
50
50
  ...this.ContextOptions.LoggedIn,
51
51
  };
52
52
  async runAsync() {
53
- let { flags: { json: jsonFlag, from: currentName, to: newName, 'non-interactive': nonInteractive }, } = await this.parse(BranchRename);
53
+ let { flags: { from: currentName, to: newName, ...rawFlags }, } = await this.parse(BranchRename);
54
+ const { json: jsonFlag, nonInteractive } = (0, flags_1.resolveNonInteractiveAndJsonFlags)(rawFlags);
54
55
  const { projectId, loggedIn: { graphqlClient }, } = await this.getContextAsync(BranchRename, {
55
56
  nonInteractive,
56
57
  });
@@ -2,15 +2,13 @@ import EasCommand from '../../commandUtils/EasCommand';
2
2
  export default class BranchView extends EasCommand {
3
3
  static description: string;
4
4
  static args: {
5
- name: string;
6
- required: boolean;
7
- description: string;
8
- }[];
5
+ name: import("@oclif/core/lib/interfaces").Arg<string | undefined, Record<string, unknown>>;
6
+ };
9
7
  static flags: {
10
8
  limit: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined>;
11
9
  json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
12
10
  'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
13
- offset: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined>;
11
+ offset: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
14
12
  };
15
13
  static contextDefinition: {
16
14
  loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
+ const core_1 = require("@oclif/core");
4
5
  const queries_1 = require("../../branch/queries");
5
6
  const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
6
7
  const flags_1 = require("../../commandUtils/flags");
@@ -9,13 +10,12 @@ const queries_2 = require("../../update/queries");
9
10
  const json_1 = require("../../utils/json");
10
11
  class BranchView extends EasCommand_1.default {
11
12
  static description = 'view a branch';
12
- static args = [
13
- {
14
- name: 'name',
13
+ static args = {
14
+ name: core_1.Args.string({
15
15
  required: false,
16
16
  description: 'Name of the branch to view',
17
- },
18
- ];
17
+ }),
18
+ };
19
19
  static flags = {
20
20
  ...pagination_1.EasPaginatedQueryFlags,
21
21
  ...flags_1.EasNonInteractiveAndJsonFlags,
@@ -27,7 +27,7 @@ class BranchView extends EasCommand_1.default {
27
27
  };
28
28
  async runAsync() {
29
29
  let { args: { name: branchName }, flags, } = await this.parse(BranchView);
30
- const { 'non-interactive': nonInteractive } = flags;
30
+ const { nonInteractive } = (0, flags_1.resolveNonInteractiveAndJsonFlags)(flags);
31
31
  const { projectId, loggedIn: { graphqlClient }, } = await this.getContextAsync(BranchView, {
32
32
  nonInteractive,
33
33
  });
@@ -8,11 +8,11 @@ export declare function selectBuildToCancelAsync(graphqlClient: ExpoGraphqlClien
8
8
  export default class BuildCancel extends EasCommand {
9
9
  static description: string;
10
10
  static args: {
11
- name: string;
12
- }[];
11
+ BUILD_ID: import("@oclif/core/lib/interfaces").Arg<string | undefined, Record<string, unknown>>;
12
+ };
13
13
  static flags: {
14
- platform: import("@oclif/core/lib/interfaces").OptionFlag<RequestedPlatform | undefined>;
15
- profile: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
14
+ platform: import("@oclif/core/lib/interfaces").OptionFlag<RequestedPlatform | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
15
+ profile: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
16
16
  'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
17
17
  };
18
18
  static contextDefinition: {
@@ -65,14 +65,16 @@ async function selectBuildToCancelAsync(graphqlClient, projectId, projectDisplay
65
65
  }
66
66
  class BuildCancel extends EasCommand_1.default {
67
67
  static description = 'cancel a build';
68
- static args = [{ name: 'BUILD_ID' }];
68
+ static args = {
69
+ BUILD_ID: core_1.Args.string({}),
70
+ };
69
71
  static flags = {
70
72
  ...flags_1.EASNonInteractiveFlag,
71
- platform: core_1.Flags.enum({
73
+ platform: core_1.Flags.option({
72
74
  char: 'p',
73
75
  description: 'Filter builds by the platform if build ID is not provided',
74
76
  options: Object.values(platform_1.RequestedPlatform),
75
- }),
77
+ })(),
76
78
  profile: core_1.Flags.string({
77
79
  char: 'e',
78
80
  description: 'Filter builds by build profile if build ID is not provided',
@@ -96,7 +98,7 @@ class BuildCancel extends EasCommand_1.default {
96
98
  if (buildIdFromArg) {
97
99
  await (0, builds_1.ensureBuildExistsAsync)(graphqlClient, buildIdFromArg);
98
100
  }
99
- let buildId = buildIdFromArg;
101
+ let buildId = buildIdFromArg ?? null;
100
102
  if (!buildId) {
101
103
  if (nonInteractive) {
102
104
  throw new Error('Build ID must be provided in non-interactive mode');
@@ -2,7 +2,7 @@ import EasCommand from '../../commandUtils/EasCommand';
2
2
  export default class BuildConfigure extends EasCommand {
3
3
  static description: string;
4
4
  static flags: {
5
- platform: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
5
+ platform: import("@oclif/core/lib/interfaces").OptionFlag<"android" | "ios" | "all" | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
6
6
  };
7
7
  static contextDefinition: {
8
8
  vcsClient: import("../../commandUtils/context/VcsClientContextField").default;
@@ -19,11 +19,11 @@ const prompts_1 = require("../../utils/prompts");
19
19
  class BuildConfigure extends EasCommand_1.default {
20
20
  static description = 'configure the project to support EAS Build';
21
21
  static flags = {
22
- platform: core_1.Flags.enum({
22
+ platform: core_1.Flags.option({
23
23
  description: 'Platform to configure',
24
24
  char: 'p',
25
25
  options: ['android', 'ios', 'all'],
26
- }),
26
+ })(),
27
27
  };
28
28
  static contextDefinition = {
29
29
  ...this.ContextOptions.ProjectConfig,
@@ -8,11 +8,11 @@ export declare function selectBuildToDeleteAsync(graphqlClient: ExpoGraphqlClien
8
8
  export default class BuildDelete extends EasCommand {
9
9
  static description: string;
10
10
  static args: {
11
- name: string;
12
- }[];
11
+ BUILD_ID: import("@oclif/core/lib/interfaces").Arg<string | undefined, Record<string, unknown>>;
12
+ };
13
13
  static flags: {
14
- platform: import("@oclif/core/lib/interfaces").OptionFlag<RequestedPlatform | undefined>;
15
- profile: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
14
+ platform: import("@oclif/core/lib/interfaces").OptionFlag<RequestedPlatform | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
15
+ profile: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
16
16
  'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
17
17
  };
18
18
  static contextDefinition: {
@@ -56,14 +56,16 @@ async function selectBuildToDeleteAsync(graphqlClient, projectId, projectDisplay
56
56
  }
57
57
  class BuildDelete extends EasCommand_1.default {
58
58
  static description = 'delete a build';
59
- static args = [{ name: 'BUILD_ID' }];
59
+ static args = {
60
+ BUILD_ID: core_1.Args.string({}),
61
+ };
60
62
  static flags = {
61
63
  ...flags_1.EASNonInteractiveFlag,
62
- platform: core_1.Flags.enum({
64
+ platform: core_1.Flags.option({
63
65
  char: 'p',
64
66
  description: 'Filter builds by the platform if build ID is not provided',
65
67
  options: Object.values(platform_1.RequestedPlatform),
66
- }),
68
+ })(),
67
69
  profile: core_1.Flags.string({
68
70
  char: 'e',
69
71
  description: 'Filter builds by build profile if build ID is not provided',
@@ -85,7 +87,7 @@ class BuildDelete extends EasCommand_1.default {
85
87
  if (buildIdFromArg) {
86
88
  await (0, builds_1.ensureBuildExistsAsync)(graphqlClient, buildIdFromArg);
87
89
  }
88
- let buildId = buildIdFromArg;
90
+ let buildId = buildIdFromArg ?? null;
89
91
  if (!buildId) {
90
92
  if (nonInteractive) {
91
93
  throw new Error('Build ID must be provided in non-interactive mode');
@@ -4,8 +4,8 @@ export default class BuildDev extends EasCommand {
4
4
  static hidden: true;
5
5
  static description: string;
6
6
  static flags: {
7
- platform: import("@oclif/core/lib/interfaces").OptionFlag<Platform | undefined>;
8
- profile: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
7
+ platform: import("@oclif/core/lib/interfaces").OptionFlag<Platform | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
8
+ profile: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
9
9
  };
10
10
  static contextDefinition: {
11
11
  projectId: import("../../commandUtils/context/ProjectIdContextField").ProjectIdContextField;
@@ -25,10 +25,10 @@ class BuildDev extends EasCommand_1.default {
25
25
  static hidden;
26
26
  static description = 'run dev client simulator/emulator build with matching fingerprint or create a new one';
27
27
  static flags = {
28
- platform: core_1.Flags.enum({
28
+ platform: core_1.Flags.option({
29
29
  char: 'p',
30
30
  options: [eas_build_job_1.Platform.IOS, eas_build_job_1.Platform.ANDROID],
31
- }),
31
+ })(),
32
32
  profile: core_1.Flags.string({
33
33
  char: 'e',
34
34
  description: `Name of the build profile from eas.json. It must be a profile allowing to create emulator/simulator internal distribution dev client builds. The "${DEFAULT_EAS_BUILD_RUN_PROFILE_NAME}" build profile will be selected by default.`,