eas-cli 3.2.1 → 3.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.
@@ -11,7 +11,6 @@ const figures_1 = tslib_1.__importDefault(require("figures"));
11
11
  const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
12
12
  const path_1 = tslib_1.__importDefault(require("path"));
13
13
  const runBuildAndSubmit_1 = require("../../build/runBuildAndSubmit");
14
- const types_1 = require("../../build/types");
15
14
  const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
16
15
  const flags_1 = require("../../commandUtils/flags");
17
16
  const generated_1 = require("../../graphql/generated");
@@ -41,7 +40,7 @@ class Build extends EasCommand_1.default {
41
40
  await (0, runBuildAndSubmit_1.runBuildAndSubmitAsync)(graphqlClient, analytics, projectDir, flagsWithPlatform, actor, getDynamicProjectConfigAsync);
42
41
  }
43
42
  sanitizeFlags(flags) {
44
- var _b, _c;
43
+ var _b;
45
44
  const nonInteractive = flags['non-interactive'];
46
45
  if (!flags.local && flags.output) {
47
46
  core_1.Errors.error('--output is allowed only for local builds', { exit: 1 });
@@ -52,12 +51,6 @@ class Build extends EasCommand_1.default {
52
51
  if (flags.json && !nonInteractive) {
53
52
  core_1.Errors.error('--json is allowed only when building in non-interactive mode', { exit: 1 });
54
53
  }
55
- if (flags['resource-class'] === types_1.UserInputResourceClass.M1_EXPERIMENTAL &&
56
- flags.platform !== eas_build_job_1.Platform.IOS) {
57
- core_1.Errors.error(`Resource class ${types_1.UserInputResourceClass.M1_EXPERIMENTAL} is only available for iOS builds`, {
58
- exit: 1,
59
- });
60
- }
61
54
  const requestedPlatform = flags.platform &&
62
55
  Object.values(platform_1.RequestedPlatform).includes(flags.platform.toLowerCase())
63
56
  ? flags.platform.toLowerCase()
@@ -93,7 +86,7 @@ class Build extends EasCommand_1.default {
93
86
  json: flags['json'],
94
87
  autoSubmit: flags['auto-submit'] || flags['auto-submit-with-profile'] !== undefined,
95
88
  submitProfile: (_b = flags['auto-submit-with-profile']) !== null && _b !== void 0 ? _b : profile,
96
- userInputResourceClass: (_c = flags['resource-class']) !== null && _c !== void 0 ? _c : types_1.UserInputResourceClass.DEFAULT,
89
+ resourceClass: flags['resource-class'],
97
90
  message,
98
91
  };
99
92
  }
@@ -167,8 +160,11 @@ Build.flags = {
167
160
  exclusive: ['auto-submit'],
168
161
  }),
169
162
  'resource-class': core_1.Flags.enum({
170
- options: Object.values(types_1.UserInputResourceClass),
163
+ options: Object.values(eas_json_1.ResourceClass),
171
164
  hidden: true,
165
+ deprecated: {
166
+ message: chalk_1.default.yellow('The --resource-class flag has been deprecated. Define the resource class in eas.json.\nLearn more: https://docs.expo.dev/build-reference/eas-json/'),
167
+ },
172
168
  description: 'The instance type that will be used to run this build [experimental]',
173
169
  }),
174
170
  message: core_1.Flags.string({
@@ -154,7 +154,7 @@ class ProjectInit extends EasCommand_1.default {
154
154
  // if regular user, put primary account first
155
155
  const sortedAccounts = actor.__typename === 'Robot'
156
156
  ? allAccounts
157
- : [...allAccounts].sort((a, _b) => (a.name === actor.username ? -1 : 1));
157
+ : [...allAccounts].sort((a, _b) => actor.__typename === 'User' ? (a.name === actor.username ? -1 : 1) : 0);
158
158
  const choices = sortedAccounts.map(account => ({
159
159
  title: account.name,
160
160
  value: account,
@@ -256,7 +256,7 @@ class UpdatePublish extends EasCommand_1.default {
256
256
  throw e;
257
257
  }
258
258
  if (jsonFlag) {
259
- (0, json_1.printJsonOnlyOutput)(newUpdates);
259
+ (0, json_1.printJsonOnlyOutput)((0, utils_2.getUpdateGroupJsonInfo)(newUpdates));
260
260
  }
261
261
  else {
262
262
  if (new Set(newUpdates.map(update => update.group)).size > 1) {
@@ -17,11 +17,11 @@ class UpdateView extends EasCommand_1.default {
17
17
  (0, json_1.enableJsonOutput)();
18
18
  }
19
19
  const updatesByGroup = await UpdateQuery_1.UpdateQuery.viewUpdateGroupAsync(graphqlClient, { groupId });
20
- const [updateGroupDescription] = (0, utils_1.getUpdateGroupDescriptions)([updatesByGroup]);
21
20
  if (jsonFlag) {
22
- (0, json_1.printJsonOnlyOutput)(updateGroupDescription);
21
+ (0, json_1.printJsonOnlyOutput)((0, utils_1.getUpdateGroupJsonInfo)(updatesByGroup));
23
22
  }
24
23
  else {
24
+ const [updateGroupDescription] = (0, utils_1.getUpdateGroupDescriptions)([updatesByGroup]);
25
25
  log_1.default.log(chalk_1.default.bold('Update group:'));
26
26
  log_1.default.log((0, utils_1.formatUpdateGroup)(updateGroupDescription));
27
27
  }