eas-cli 0.41.0 → 0.43.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 (92) hide show
  1. package/README.md +23 -465
  2. package/bin/dev +17 -0
  3. package/bin/dev.cmd +3 -0
  4. package/bin/run +3 -3
  5. package/build/api.d.ts +1 -0
  6. package/build/api.js +13 -1
  7. package/build/build/configure.js +3 -3
  8. package/build/build/local.js +1 -1
  9. package/build/build/utils/devClient.js +3 -3
  10. package/build/commandUtils/EasCommand.d.ts +2 -1
  11. package/build/commandUtils/EasCommand.js +7 -4
  12. package/build/commands/account/login.d.ts +1 -0
  13. package/build/commands/account/login.js +1 -0
  14. package/build/commands/account/logout.d.ts +1 -0
  15. package/build/commands/account/logout.js +1 -0
  16. package/build/commands/account/view.d.ts +1 -0
  17. package/build/commands/account/view.js +1 -0
  18. package/build/commands/analytics.js +1 -1
  19. package/build/commands/branch/create.d.ts +1 -2
  20. package/build/commands/branch/create.js +11 -7
  21. package/build/commands/branch/delete.d.ts +1 -2
  22. package/build/commands/branch/delete.js +12 -7
  23. package/build/commands/branch/list.d.ts +1 -2
  24. package/build/commands/branch/list.js +8 -5
  25. package/build/commands/branch/rename.d.ts +3 -5
  26. package/build/commands/branch/rename.js +13 -9
  27. package/build/commands/branch/view.d.ts +1 -2
  28. package/build/commands/branch/view.js +33 -29
  29. package/build/commands/build/cancel.js +1 -1
  30. package/build/commands/build/configure.d.ts +1 -2
  31. package/build/commands/build/configure.js +3 -3
  32. package/build/commands/build/index.d.ts +11 -12
  33. package/build/commands/build/index.js +20 -19
  34. package/build/commands/build/inspect.d.ts +7 -7
  35. package/build/commands/build/inspect.js +31 -24
  36. package/build/commands/build/list.d.ts +13 -14
  37. package/build/commands/build/list.js +15 -15
  38. package/build/commands/build/view.d.ts +1 -1
  39. package/build/commands/build/view.js +3 -3
  40. package/build/commands/channel/create.d.ts +1 -2
  41. package/build/commands/channel/create.js +24 -20
  42. package/build/commands/channel/delete.d.ts +15 -0
  43. package/build/commands/channel/delete.js +124 -0
  44. package/build/commands/channel/edit.d.ts +2 -4
  45. package/build/commands/channel/edit.js +14 -10
  46. package/build/commands/channel/list.d.ts +1 -2
  47. package/build/commands/channel/list.js +17 -13
  48. package/build/commands/channel/rollout.d.ts +4 -5
  49. package/build/commands/channel/rollout.js +14 -10
  50. package/build/commands/channel/view.d.ts +1 -2
  51. package/build/commands/channel/view.js +19 -15
  52. package/build/commands/config.d.ts +2 -3
  53. package/build/commands/config.js +4 -4
  54. package/build/commands/device/list.d.ts +1 -2
  55. package/build/commands/device/list.js +3 -3
  56. package/build/commands/device/view.js +1 -1
  57. package/build/commands/diagnostics.js +1 -0
  58. package/build/commands/secret/create.d.ts +4 -5
  59. package/build/commands/secret/create.js +6 -6
  60. package/build/commands/secret/delete.d.ts +1 -2
  61. package/build/commands/secret/delete.js +3 -3
  62. package/build/commands/submit.d.ts +9 -10
  63. package/build/commands/submit.js +13 -14
  64. package/build/commands/update/configure.d.ts +0 -3
  65. package/build/commands/update/configure.js +4 -10
  66. package/build/commands/update/delete.d.ts +1 -2
  67. package/build/commands/update/delete.js +12 -8
  68. package/build/commands/update/index.d.ts +9 -11
  69. package/build/commands/update/index.js +30 -18
  70. package/build/commands/update/view.d.ts +1 -2
  71. package/build/commands/update/view.js +25 -21
  72. package/build/commands/webhook/create.d.ts +3 -4
  73. package/build/commands/webhook/create.js +5 -5
  74. package/build/commands/webhook/delete.js +1 -1
  75. package/build/commands/webhook/list.d.ts +1 -2
  76. package/build/commands/webhook/list.js +3 -3
  77. package/build/commands/webhook/update.d.ts +4 -5
  78. package/build/commands/webhook/update.js +6 -6
  79. package/build/commands/webhook/view.js +1 -1
  80. package/build/graphql/generated.d.ts +33 -0
  81. package/build/index.d.ts +1 -1
  82. package/build/index.js +2 -2
  83. package/build/project/expoSdk.js +2 -2
  84. package/build/project/metroConfig.js +2 -2
  85. package/build/project/publish.js +1 -3
  86. package/build/submit/ios/IosSubmitCommand.js +6 -1
  87. package/build/user/actions.js +2 -2
  88. package/build/utils/expoCli.d.ts +3 -1
  89. package/build/utils/expoCli.js +13 -11
  90. package/build/vcs/clients/git.js +2 -2
  91. package/oclif.manifest.json +1 -1
  92. package/package.json +20 -13
@@ -2,8 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const config_1 = require("@expo/config");
5
- const command_1 = require("@oclif/command");
6
- const errors_1 = require("@oclif/errors");
5
+ const core_1 = require("@oclif/core");
7
6
  const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
8
7
  const EasCommand_1 = (0, tslib_1.__importDefault)(require("../commandUtils/EasCommand"));
9
8
  const AppPlatform_1 = require("../graphql/types/AppPlatform");
@@ -16,7 +15,7 @@ const urls_1 = require("../submit/utils/urls");
16
15
  const profiles_1 = require("../utils/profiles");
17
16
  class Submit extends EasCommand_1.default {
18
17
  async runAsync() {
19
- const { flags: rawFlags } = this.parse(Submit);
18
+ const { flags: rawFlags } = await this.parse(Submit);
20
19
  const flags = await this.sanitizeFlagsAsync(rawFlags);
21
20
  const projectDir = await (0, projectUtils_1.findProjectRootAsync)();
22
21
  const { exp } = (0, config_1.getConfig)(projectDir, { skipSDKVersionRequirement: true });
@@ -55,12 +54,12 @@ class Submit extends EasCommand_1.default {
55
54
  async sanitizeFlagsAsync(flags) {
56
55
  const { platform, verbose, wait, profile, 'non-interactive': nonInteractive, ...archiveFlags } = flags;
57
56
  if (!flags.platform && nonInteractive) {
58
- (0, errors_1.error)('--platform is required when building in non-interactive mode', { exit: 1 });
57
+ core_1.Errors.error('--platform is required when building in non-interactive mode', { exit: 1 });
59
58
  }
60
59
  const requestedPlatform = await (0, platform_1.selectRequestedPlatformAsync)(flags.platform);
61
60
  if (requestedPlatform === platform_1.RequestedPlatform.All) {
62
61
  if (archiveFlags.id || archiveFlags.path || archiveFlags.url) {
63
- (0, errors_1.error)('--id, --path, and --url params are only supported when performing a single-platform submit', { exit: 1 });
62
+ core_1.Errors.error('--id, --path, and --url params are only supported when performing a single-platform submit', { exit: 1 });
64
63
  }
65
64
  }
66
65
  return {
@@ -78,39 +77,39 @@ Submit.description = `Submit build archive to App Store Connect
78
77
  See how to configure submits with eas.json: ${(0, log_1.link)('https://docs.expo.dev/submit/eas-json/')}`;
79
78
  Submit.aliases = ['build:submit'];
80
79
  Submit.flags = {
81
- platform: command_1.flags.enum({
80
+ platform: core_1.Flags.enum({
82
81
  char: 'p',
83
82
  options: ['android', 'ios', 'all'],
84
83
  }),
85
- profile: command_1.flags.string({
84
+ profile: core_1.Flags.string({
86
85
  description: 'Name of the submit profile from eas.json. Defaults to "production" if defined in eas.json.',
87
86
  }),
88
- latest: command_1.flags.boolean({
87
+ latest: core_1.Flags.boolean({
89
88
  description: 'Submit the latest build for specified platform',
90
89
  exclusive: ['id', 'path', 'url'],
91
90
  }),
92
- id: command_1.flags.string({
91
+ id: core_1.Flags.string({
93
92
  description: 'ID of the build to submit',
94
93
  exclusive: ['latest, path, url'],
95
94
  }),
96
- path: command_1.flags.string({
95
+ path: core_1.Flags.string({
97
96
  description: 'Path to the .apk/.aab/.ipa file',
98
97
  exclusive: ['latest', 'id', 'url'],
99
98
  }),
100
- url: command_1.flags.string({
99
+ url: core_1.Flags.string({
101
100
  description: 'App archive url',
102
101
  exclusive: ['latest', 'id', 'path'],
103
102
  }),
104
- verbose: command_1.flags.boolean({
103
+ verbose: core_1.Flags.boolean({
105
104
  description: 'Always print logs from Submission Service',
106
105
  default: false,
107
106
  }),
108
- wait: command_1.flags.boolean({
107
+ wait: core_1.Flags.boolean({
109
108
  description: 'Wait for submission to complete',
110
109
  default: true,
111
110
  allowNo: true,
112
111
  }),
113
- 'non-interactive': command_1.flags.boolean({
112
+ 'non-interactive': core_1.Flags.boolean({
114
113
  default: false,
115
114
  description: 'Run command in non-interactive mode',
116
115
  }),
@@ -1,8 +1,5 @@
1
- import { ExpoConfig } from '@expo/config';
2
1
  import EasCommand from '../../commandUtils/EasCommand';
3
- export declare function getEASUpdateURLAsync(exp: ExpoConfig): Promise<string>;
4
2
  export default class UpdateConfigure extends EasCommand {
5
- static hidden: boolean;
6
3
  static description: string;
7
4
  runAsync(): Promise<void>;
8
5
  }
@@ -1,25 +1,20 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getEASUpdateURLAsync = void 0;
4
3
  const tslib_1 = require("tslib");
5
4
  const config_1 = require("@expo/config");
6
5
  const eas_build_job_1 = require("@expo/eas-build-job");
7
6
  const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
7
+ const api_1 = require("../../api");
8
8
  const EasCommand_1 = (0, tslib_1.__importDefault)(require("../../commandUtils/EasCommand"));
9
9
  const log_1 = (0, tslib_1.__importStar)(require("../../log"));
10
10
  const projectUtils_1 = require("../../project/projectUtils");
11
11
  const workflow_1 = require("../../project/workflow");
12
- const EAS_UPDATE_URL = 'https://u.expo.dev';
13
12
  const DEFAULT_MANAGED_RUNTIME_VERSION = { policy: 'sdkVersion' };
14
13
  const DEFAULT_BARE_RUNTIME_VERSION = '1.0.0';
15
- async function getEASUpdateURLAsync(exp) {
16
- const projectId = await (0, projectUtils_1.getProjectIdAsync)(exp);
17
- return new URL(projectId, EAS_UPDATE_URL).href;
18
- }
19
- exports.getEASUpdateURLAsync = getEASUpdateURLAsync;
20
14
  async function configureProjectForEASUpdateAsync(projectDir, exp, isBare) {
21
15
  var _a, _b;
22
- const easUpdateURL = await getEASUpdateURLAsync(exp);
16
+ const projectId = await (0, projectUtils_1.getProjectIdAsync)(exp);
17
+ const easUpdateURL = (0, api_1.getEASUpdateURL)(projectId);
23
18
  const preexistingRuntimeVersion = exp.runtimeVersion;
24
19
  const defaultRuntimeVersion = isBare
25
20
  ? DEFAULT_BARE_RUNTIME_VERSION
@@ -46,7 +41,7 @@ async function configureProjectForEASUpdateAsync(projectDir, exp, isBare) {
46
41
  log_1.default.addNewLineIfNone();
47
42
  log_1.default.warn(`It looks like you are using a dynamic configuration! ${(0, log_1.learnMore)('https://docs.expo.dev/workflow/configuration/#dynamic-configuration-with-appconfigjs)')}`);
48
43
  log_1.default.warn(`In order to finish configuring your project for EAS Update, you are going to need manually add the following to your app.config.js:\n${(0, log_1.learnMore)('https://expo.fyi/eas-update-config.md')}\n`);
49
- log_1.default.log(chalk_1.default.bold(`{\n updates": {\n "url": "${easUpdateURL}"\n },\n "runtimeVersion": {\n "policy": "sdkVersion"\n }\n}`));
44
+ log_1.default.log(chalk_1.default.bold(`{\n "updates": {\n "url": "${easUpdateURL}"\n },\n "runtimeVersion": {\n "policy": "sdkVersion"\n }\n}`));
50
45
  log_1.default.addNewLineIfNone();
51
46
  throw new Error(result.message);
52
47
  }
@@ -77,5 +72,4 @@ class UpdateConfigure extends EasCommand_1.default {
77
72
  }
78
73
  }
79
74
  exports.default = UpdateConfigure;
80
- UpdateConfigure.hidden = true;
81
75
  UpdateConfigure.description = 'Configure the project to support EAS Update.';
@@ -1,6 +1,5 @@
1
1
  import EasCommand from '../../commandUtils/EasCommand';
2
2
  export default class UpdateDelete extends EasCommand {
3
- static hidden: boolean;
4
3
  static description: string;
5
4
  static args: {
6
5
  name: string;
@@ -8,7 +7,7 @@ export default class UpdateDelete extends EasCommand {
8
7
  description: string;
9
8
  }[];
10
9
  static flags: {
11
- json: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
10
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
12
11
  };
13
12
  runAsync(): Promise<void>;
14
13
  }
@@ -1,13 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
- const command_1 = require("@oclif/command");
4
+ const core_1 = require("@oclif/core");
5
5
  const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
6
6
  const graphql_tag_1 = (0, tslib_1.__importDefault)(require("graphql-tag"));
7
7
  const EasCommand_1 = (0, tslib_1.__importDefault)(require("../../commandUtils/EasCommand"));
8
8
  const client_1 = require("../../graphql/client");
9
9
  const log_1 = (0, tslib_1.__importDefault)(require("../../log"));
10
10
  const prompts_1 = require("../../prompts");
11
+ const json_1 = require("../../utils/json");
11
12
  async function deleteUpdateGroupAsync({ group, }) {
12
13
  return await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
13
14
  .mutation((0, graphql_tag_1.default) `
@@ -23,8 +24,11 @@ async function deleteUpdateGroupAsync({ group, }) {
23
24
  }
24
25
  class UpdateDelete extends EasCommand_1.default {
25
26
  async runAsync() {
26
- const { args: { groupId: group }, flags: { json: jsonFlag }, } = this.parse(UpdateDelete);
27
- if (!jsonFlag) {
27
+ const { args: { groupId: group }, flags: { json: jsonFlag }, } = await this.parse(UpdateDelete);
28
+ if (jsonFlag) {
29
+ (0, json_1.enableJsonOutput)();
30
+ }
31
+ else {
28
32
  const shouldAbort = await (0, prompts_1.confirmAsync)({
29
33
  message: `🚨${chalk_1.default.red('CAUTION')}🚨\n\n` +
30
34
  `${chalk_1.default.yellow(`This will delete all of the updates in group "${group}".`)} ${chalk_1.default.red('This is a permanent operation.')}\n\n` +
@@ -39,14 +43,14 @@ class UpdateDelete extends EasCommand_1.default {
39
43
  }
40
44
  await deleteUpdateGroupAsync({ group });
41
45
  if (jsonFlag) {
42
- log_1.default.log(JSON.stringify({ group }));
43
- return;
46
+ (0, json_1.printJsonOnlyOutput)({ group });
47
+ }
48
+ else {
49
+ log_1.default.withTick(`Deleted update group ${group}`);
44
50
  }
45
- log_1.default.withTick(`Deleted update group ${group}`);
46
51
  }
47
52
  }
48
53
  exports.default = UpdateDelete;
49
- UpdateDelete.hidden = true;
50
54
  UpdateDelete.description = 'Delete all the updates in an update Group.';
51
55
  UpdateDelete.args = [
52
56
  {
@@ -56,7 +60,7 @@ UpdateDelete.args = [
56
60
  },
57
61
  ];
58
62
  UpdateDelete.flags = {
59
- json: command_1.flags.boolean({
63
+ json: core_1.Flags.boolean({
60
64
  description: `Return a json with the group ID of the deleted updates.`,
61
65
  default: false,
62
66
  }),
@@ -1,20 +1,18 @@
1
- import { flags } from '@oclif/command';
2
1
  import EasCommand from '../../commandUtils/EasCommand';
3
2
  import { PublishPlatform } from '../../project/publish';
4
3
  export declare const defaultPublishPlatforms: PublishPlatform[];
5
4
  export default class UpdatePublish extends EasCommand {
6
- static hidden: boolean;
7
5
  static description: string;
8
6
  static flags: {
9
- branch: flags.IOptionFlag<string | undefined>;
10
- message: flags.IOptionFlag<string | undefined>;
11
- republish: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
12
- group: flags.IOptionFlag<string | undefined>;
13
- 'input-dir': flags.IOptionFlag<string>;
14
- 'skip-bundler': import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
15
- platform: flags.IOptionFlag<string>;
16
- json: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
17
- auto: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
7
+ branch: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
8
+ message: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
9
+ republish: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
10
+ group: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
11
+ 'input-dir': import("@oclif/core/lib/interfaces").OptionFlag<string>;
12
+ 'skip-bundler': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
13
+ platform: import("@oclif/core/lib/interfaces").OptionFlag<string>;
14
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
15
+ auto: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
18
16
  };
19
17
  runAsync(): Promise<void>;
20
18
  }
@@ -5,11 +5,12 @@ const tslib_1 = require("tslib");
5
5
  const config_1 = require("@expo/config");
6
6
  const config_plugins_1 = require("@expo/config-plugins");
7
7
  const eas_build_job_1 = require("@expo/eas-build-job");
8
- const command_1 = require("@oclif/command");
8
+ const core_1 = require("@oclif/core");
9
9
  const assert_1 = (0, tslib_1.__importDefault)(require("assert"));
10
10
  const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
11
11
  const dateformat_1 = (0, tslib_1.__importDefault)(require("dateformat"));
12
12
  const graphql_tag_1 = (0, tslib_1.__importDefault)(require("graphql-tag"));
13
+ const api_1 = require("../../api");
13
14
  const EasCommand_1 = (0, tslib_1.__importDefault)(require("../../commandUtils/EasCommand"));
14
15
  const client_1 = require("../../graphql/client");
15
16
  const PublishMutation_1 = require("../../graphql/mutations/PublishMutation");
@@ -22,12 +23,12 @@ const prompts_1 = require("../../prompts");
22
23
  const utils_1 = require("../../update/utils");
23
24
  const uniqBy_1 = (0, tslib_1.__importDefault)(require("../../utils/expodash/uniqBy"));
24
25
  const formatFields_1 = (0, tslib_1.__importDefault)(require("../../utils/formatFields"));
26
+ const json_1 = require("../../utils/json");
25
27
  const vcs_1 = require("../../vcs");
26
28
  const create_1 = require("../branch/create");
27
29
  const list_1 = require("../branch/list");
28
30
  const view_1 = require("../branch/view");
29
31
  const create_2 = require("../channel/create");
30
- const configure_1 = require("./configure");
31
32
  exports.defaultPublishPlatforms = ['android', 'ios'];
32
33
  async function getUpdateGroupAsync({ group, }) {
33
34
  const { updatesByGroup } = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
@@ -85,8 +86,11 @@ async function ensureBranchExistsAsync({ appId, name: branchName, }) {
85
86
  class UpdatePublish extends EasCommand_1.default {
86
87
  async runAsync() {
87
88
  var _a, _b, _c;
88
- let { flags: { branch: branchName, json: jsonFlag, auto: autoFlag, message, republish, group, 'input-dir': inputDir, 'skip-bundler': skipBundler, }, } = this.parse(UpdatePublish);
89
- const platformFlag = this.parse(UpdatePublish).flags.platform;
89
+ let { flags: { branch: branchName, json: jsonFlag, auto: autoFlag, message, republish, group, 'input-dir': inputDir, 'skip-bundler': skipBundler, platform, }, } = await this.parse(UpdatePublish);
90
+ if (jsonFlag) {
91
+ (0, json_1.enableJsonOutput)();
92
+ }
93
+ const platformFlag = platform;
90
94
  // If a group was specified, that means we are republishing it.
91
95
  republish = group ? true : republish;
92
96
  const projectDir = await (0, projectUtils_1.findProjectRootAsync)();
@@ -222,9 +226,17 @@ class UpdatePublish extends EasCommand_1.default {
222
226
  }
223
227
  // build bundle and upload assets for a new publish
224
228
  if (!skipBundler) {
225
- await (0, publish_1.buildBundlesAsync)({ projectDir, inputDir });
229
+ const bundleSpinner = (0, ora_1.ora)().start('Building bundle...');
230
+ try {
231
+ await (0, publish_1.buildBundlesAsync)({ projectDir, inputDir });
232
+ bundleSpinner.succeed('Built bundle!');
233
+ }
234
+ catch (e) {
235
+ bundleSpinner.fail('Failed to build bundle!');
236
+ throw e;
237
+ }
226
238
  }
227
- const assetSpinner = (0, ora_1.ora)('Uploading assets...').start();
239
+ const assetSpinner = (0, ora_1.ora)().start('Uploading assets...');
228
240
  try {
229
241
  const platforms = platformFlag === 'all' ? exports.defaultPublishPlatforms : [platformFlag];
230
242
  const assets = await (0, publish_1.collectAssetsAsync)({ inputDir: inputDir, platforms });
@@ -270,7 +282,7 @@ class UpdatePublish extends EasCommand_1.default {
270
282
  throw e;
271
283
  }
272
284
  if (jsonFlag) {
273
- log_1.default.log(JSON.stringify(newUpdates));
285
+ (0, json_1.printJsonOnlyOutput)(newUpdates);
274
286
  }
275
287
  else {
276
288
  if (new Set(newUpdates.map(update => update.group)).size > 1) {
@@ -299,45 +311,44 @@ class UpdatePublish extends EasCommand_1.default {
299
311
  }
300
312
  }
301
313
  exports.default = UpdatePublish;
302
- UpdatePublish.hidden = true;
303
314
  UpdatePublish.description = 'Publish an update group.';
304
315
  UpdatePublish.flags = {
305
- branch: command_1.flags.string({
316
+ branch: core_1.Flags.string({
306
317
  description: 'Branch to publish the update group on',
307
318
  required: false,
308
319
  }),
309
- message: command_1.flags.string({
320
+ message: core_1.Flags.string({
310
321
  description: 'A short message describing the update',
311
322
  required: false,
312
323
  }),
313
- republish: command_1.flags.boolean({
324
+ republish: core_1.Flags.boolean({
314
325
  description: 'Republish an update group',
315
326
  exclusive: ['input-dir', 'skip-bundler'],
316
327
  }),
317
- group: command_1.flags.string({
328
+ group: core_1.Flags.string({
318
329
  description: 'Update group to republish',
319
330
  exclusive: ['input-dir', 'skip-bundler'],
320
331
  }),
321
- 'input-dir': command_1.flags.string({
332
+ 'input-dir': core_1.Flags.string({
322
333
  description: 'Location of the bundle',
323
334
  default: 'dist',
324
335
  required: false,
325
336
  }),
326
- 'skip-bundler': command_1.flags.boolean({
337
+ 'skip-bundler': core_1.Flags.boolean({
327
338
  description: `Skip running Expo CLI to bundle the app before publishing`,
328
339
  default: false,
329
340
  }),
330
- platform: command_1.flags.enum({
341
+ platform: core_1.Flags.enum({
331
342
  char: 'p',
332
343
  options: [...exports.defaultPublishPlatforms, 'all'],
333
344
  default: 'all',
334
345
  required: false,
335
346
  }),
336
- json: command_1.flags.boolean({
347
+ json: core_1.Flags.boolean({
337
348
  description: 'Enable JSON output, non-JSON messages will be printed to stderr',
338
349
  default: false,
339
350
  }),
340
- auto: command_1.flags.boolean({
351
+ auto: core_1.Flags.boolean({
341
352
  description: 'Use the current git branch and commit message for the EAS branch and update message',
342
353
  default: false,
343
354
  }),
@@ -377,7 +388,8 @@ function formatUpdateTitle(update) {
377
388
  async function checkEASUpdateURLIsSetAsync(exp) {
378
389
  var _a;
379
390
  const configuredURL = (_a = exp.updates) === null || _a === void 0 ? void 0 : _a.url;
380
- const expectedURL = await (0, configure_1.getEASUpdateURLAsync)(exp);
391
+ const projectId = await (0, projectUtils_1.getProjectIdAsync)(exp);
392
+ const expectedURL = (0, api_1.getEASUpdateURL)(projectId);
381
393
  if (configuredURL !== expectedURL) {
382
394
  throw new Error(`The update URL is incorrectly configured for EAS Update. Please set updates.url to ${expectedURL} in your app.json.`);
383
395
  }
@@ -4,7 +4,6 @@ export declare function viewUpdateAsync({ groupId, }: {
4
4
  groupId: string;
5
5
  }): Promise<UpdatesByGroupQuery>;
6
6
  export default class UpdateView extends EasCommand {
7
- static hidden: boolean;
8
7
  static description: string;
9
8
  static args: {
10
9
  name: string;
@@ -12,7 +11,7 @@ export default class UpdateView extends EasCommand {
12
11
  description: string;
13
12
  }[];
14
13
  static flags: {
15
- json: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
14
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
16
15
  };
17
16
  runAsync(): Promise<void>;
18
17
  }
@@ -2,13 +2,14 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.viewUpdateAsync = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const command_1 = require("@oclif/command");
5
+ const core_1 = require("@oclif/core");
6
6
  const cli_table3_1 = (0, tslib_1.__importDefault)(require("cli-table3"));
7
7
  const graphql_tag_1 = (0, tslib_1.__importDefault)(require("graphql-tag"));
8
8
  const EasCommand_1 = (0, tslib_1.__importDefault)(require("../../commandUtils/EasCommand"));
9
9
  const client_1 = require("../../graphql/client");
10
10
  const log_1 = (0, tslib_1.__importDefault)(require("../../log"));
11
11
  const utils_1 = require("../../update/utils");
12
+ const json_1 = require("../../utils/json");
12
13
  async function viewUpdateAsync({ groupId, }) {
13
14
  const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
14
15
  .query((0, graphql_tag_1.default) `
@@ -44,31 +45,34 @@ exports.viewUpdateAsync = viewUpdateAsync;
44
45
  class UpdateView extends EasCommand_1.default {
45
46
  async runAsync() {
46
47
  var _a;
47
- const { args: { groupId }, flags: { json: jsonFlag }, } = this.parse(UpdateView);
48
+ const { args: { groupId }, flags: { json: jsonFlag }, } = await this.parse(UpdateView);
49
+ if (jsonFlag) {
50
+ (0, json_1.enableJsonOutput)();
51
+ }
48
52
  const { updatesByGroup } = await viewUpdateAsync({ groupId });
49
53
  if (jsonFlag) {
50
- log_1.default.log(JSON.stringify(updatesByGroup));
51
- return;
54
+ (0, json_1.printJsonOnlyOutput)(updatesByGroup);
55
+ }
56
+ else {
57
+ const groupTable = new cli_table3_1.default({
58
+ head: [...utils_1.UPDATE_COLUMNS],
59
+ wordWrap: true,
60
+ });
61
+ const representativeUpdate = updatesByGroup[0];
62
+ groupTable.push([
63
+ (0, utils_1.formatUpdate)(representativeUpdate),
64
+ representativeUpdate.runtimeVersion,
65
+ representativeUpdate.group,
66
+ (0, utils_1.getPlatformsForGroup)({
67
+ updates: updatesByGroup,
68
+ group: (_a = updatesByGroup[0]) === null || _a === void 0 ? void 0 : _a.group,
69
+ }),
70
+ ]);
71
+ log_1.default.log(groupTable.toString());
52
72
  }
53
- const groupTable = new cli_table3_1.default({
54
- head: [...utils_1.UPDATE_COLUMNS],
55
- wordWrap: true,
56
- });
57
- const representativeUpdate = updatesByGroup[0];
58
- groupTable.push([
59
- (0, utils_1.formatUpdate)(representativeUpdate),
60
- representativeUpdate.runtimeVersion,
61
- representativeUpdate.group,
62
- (0, utils_1.getPlatformsForGroup)({
63
- updates: updatesByGroup,
64
- group: (_a = updatesByGroup[0]) === null || _a === void 0 ? void 0 : _a.group,
65
- }),
66
- ]);
67
- log_1.default.log(groupTable.toString());
68
73
  }
69
74
  }
70
75
  exports.default = UpdateView;
71
- UpdateView.hidden = true;
72
76
  UpdateView.description = 'Update group details.';
73
77
  UpdateView.args = [
74
78
  {
@@ -78,7 +82,7 @@ UpdateView.args = [
78
82
  },
79
83
  ];
80
84
  UpdateView.flags = {
81
- json: command_1.flags.boolean({
85
+ json: core_1.Flags.boolean({
82
86
  description: `Return a json with the updates belonging to the group.`,
83
87
  default: false,
84
88
  }),
@@ -1,12 +1,11 @@
1
- import { flags } from '@oclif/command';
2
1
  import EasCommand from '../../commandUtils/EasCommand';
3
2
  import { WebhookType } from '../../graphql/generated';
4
3
  export default class WebhookCreate extends EasCommand {
5
4
  static description: string;
6
5
  static flags: {
7
- event: flags.IOptionFlag<WebhookType>;
8
- url: flags.IOptionFlag<string | undefined>;
9
- secret: flags.IOptionFlag<string | undefined>;
6
+ event: import("@oclif/core/lib/interfaces").OptionFlag<WebhookType>;
7
+ url: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
8
+ secret: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
10
9
  };
11
10
  runAsync(): Promise<void>;
12
11
  }
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const config_1 = require("@expo/config");
5
- const command_1 = require("@oclif/command");
5
+ const core_1 = require("@oclif/core");
6
6
  const EasCommand_1 = (0, tslib_1.__importDefault)(require("../../commandUtils/EasCommand"));
7
7
  const generated_1 = require("../../graphql/generated");
8
8
  const WebhookMutation_1 = require("../../graphql/mutations/WebhookMutation");
@@ -11,7 +11,7 @@ const projectUtils_1 = require("../../project/projectUtils");
11
11
  const input_1 = require("../../webhooks/input");
12
12
  class WebhookCreate extends EasCommand_1.default {
13
13
  async runAsync() {
14
- const { flags } = this.parse(WebhookCreate);
14
+ const { flags } = await this.parse(WebhookCreate);
15
15
  const webhookInputParams = await (0, input_1.prepareInputParamsAsync)(flags);
16
16
  const projectDir = await (0, projectUtils_1.findProjectRootAsync)();
17
17
  const { exp } = (0, config_1.getConfig)(projectDir, { skipSDKVersionRequirement: true });
@@ -30,14 +30,14 @@ class WebhookCreate extends EasCommand_1.default {
30
30
  exports.default = WebhookCreate;
31
31
  WebhookCreate.description = 'Create a webhook on the current project.';
32
32
  WebhookCreate.flags = {
33
- event: command_1.flags.enum({
33
+ event: core_1.Flags.enum({
34
34
  description: 'Event type that triggers the webhook',
35
35
  options: [generated_1.WebhookType.Build, generated_1.WebhookType.Submit],
36
36
  }),
37
- url: command_1.flags.string({
37
+ url: core_1.Flags.string({
38
38
  description: 'Webhook URL',
39
39
  }),
40
- secret: command_1.flags.string({
40
+ secret: core_1.Flags.string({
41
41
  description: "Secret used to create a hash signature of the request payload, provided in the 'Expo-Signature' header.",
42
42
  }),
43
43
  };
@@ -15,7 +15,7 @@ const prompts_1 = require("../../prompts");
15
15
  const formatWebhook_1 = require("../../webhooks/formatWebhook");
16
16
  class WebhookDelete extends EasCommand_1.default {
17
17
  async runAsync() {
18
- let { args: { ID: webhookId }, } = this.parse(WebhookDelete);
18
+ let { args: { ID: webhookId }, } = await this.parse(WebhookDelete);
19
19
  const projectDir = await (0, projectUtils_1.findProjectRootAsync)();
20
20
  const { exp } = (0, config_1.getConfig)(projectDir, { skipSDKVersionRequirement: true });
21
21
  const projectId = await (0, projectUtils_1.getProjectIdAsync)(exp);
@@ -1,10 +1,9 @@
1
- import { flags } from '@oclif/command';
2
1
  import EasCommand from '../../commandUtils/EasCommand';
3
2
  import { WebhookType } from '../../graphql/generated';
4
3
  export default class WebhookList extends EasCommand {
5
4
  static description: string;
6
5
  static flags: {
7
- event: flags.IOptionFlag<WebhookType>;
6
+ event: import("@oclif/core/lib/interfaces").OptionFlag<WebhookType>;
8
7
  };
9
8
  runAsync(): Promise<void>;
10
9
  }
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const config_1 = require("@expo/config");
5
- const command_1 = require("@oclif/command");
5
+ const core_1 = require("@oclif/core");
6
6
  const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
7
7
  const EasCommand_1 = (0, tslib_1.__importDefault)(require("../../commandUtils/EasCommand"));
8
8
  const generated_1 = require("../../graphql/generated");
@@ -13,7 +13,7 @@ const projectUtils_1 = require("../../project/projectUtils");
13
13
  const formatWebhook_1 = require("../../webhooks/formatWebhook");
14
14
  class WebhookList extends EasCommand_1.default {
15
15
  async runAsync() {
16
- const { flags: { event }, } = this.parse(WebhookList);
16
+ const { flags: { event }, } = await this.parse(WebhookList);
17
17
  const projectDir = await (0, projectUtils_1.findProjectRootAsync)();
18
18
  const { exp } = (0, config_1.getConfig)(projectDir, { skipSDKVersionRequirement: true });
19
19
  const projectId = await (0, projectUtils_1.getProjectIdAsync)(exp);
@@ -41,7 +41,7 @@ class WebhookList extends EasCommand_1.default {
41
41
  exports.default = WebhookList;
42
42
  WebhookList.description = 'List webhooks on the current project.';
43
43
  WebhookList.flags = {
44
- event: command_1.flags.enum({
44
+ event: core_1.Flags.enum({
45
45
  description: 'Event type that triggers the webhook',
46
46
  options: [generated_1.WebhookType.Build, generated_1.WebhookType.Submit],
47
47
  }),
@@ -1,13 +1,12 @@
1
- import { flags } from '@oclif/command';
2
1
  import EasCommand from '../../commandUtils/EasCommand';
3
2
  import { WebhookType } from '../../graphql/generated';
4
3
  export default class WebhookUpdate extends EasCommand {
5
4
  static description: string;
6
5
  static flags: {
7
- id: flags.IOptionFlag<string>;
8
- event: flags.IOptionFlag<WebhookType>;
9
- url: flags.IOptionFlag<string | undefined>;
10
- secret: flags.IOptionFlag<string | undefined>;
6
+ id: import("@oclif/core/lib/interfaces").OptionFlag<string>;
7
+ event: import("@oclif/core/lib/interfaces").OptionFlag<WebhookType>;
8
+ url: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
9
+ secret: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
11
10
  };
12
11
  runAsync(): Promise<void>;
13
12
  }
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
- const command_1 = require("@oclif/command");
4
+ const core_1 = require("@oclif/core");
5
5
  const EasCommand_1 = (0, tslib_1.__importDefault)(require("../../commandUtils/EasCommand"));
6
6
  const generated_1 = require("../../graphql/generated");
7
7
  const WebhookMutation_1 = require("../../graphql/mutations/WebhookMutation");
@@ -11,7 +11,7 @@ const pick_1 = (0, tslib_1.__importDefault)(require("../../utils/expodash/pick")
11
11
  const input_1 = require("../../webhooks/input");
12
12
  class WebhookUpdate extends EasCommand_1.default {
13
13
  async runAsync() {
14
- const { flags } = this.parse(WebhookUpdate);
14
+ const { flags } = await this.parse(WebhookUpdate);
15
15
  const webhookId = flags.id;
16
16
  const webhook = await WebhookQuery_1.WebhookQuery.byIdAsync(webhookId);
17
17
  const webhookInputParams = await (0, input_1.prepareInputParamsAsync)((0, pick_1.default)(flags, ['event', 'url', 'secret']), webhook);
@@ -29,18 +29,18 @@ class WebhookUpdate extends EasCommand_1.default {
29
29
  exports.default = WebhookUpdate;
30
30
  WebhookUpdate.description = 'Create a webhook on the current project.';
31
31
  WebhookUpdate.flags = {
32
- id: command_1.flags.string({
32
+ id: core_1.Flags.string({
33
33
  description: 'Webhook ID',
34
34
  required: true,
35
35
  }),
36
- event: command_1.flags.enum({
36
+ event: core_1.Flags.enum({
37
37
  description: 'Event type that triggers the webhook',
38
38
  options: [generated_1.WebhookType.Build, generated_1.WebhookType.Submit],
39
39
  }),
40
- url: command_1.flags.string({
40
+ url: core_1.Flags.string({
41
41
  description: 'Webhook URL',
42
42
  }),
43
- secret: command_1.flags.string({
43
+ secret: core_1.Flags.string({
44
44
  description: "Secret used to create a hash signature of the request payload, provided in the 'Expo-Signature' header.",
45
45
  }),
46
46
  };