eas-cli 0.40.0 → 0.42.4

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 (103) hide show
  1. package/README.md +466 -101
  2. package/bin/run +3 -4
  3. package/build/api.d.ts +1 -0
  4. package/build/api.js +13 -1
  5. package/build/build/build.js +3 -3
  6. package/build/build/configure.js +3 -3
  7. package/build/build/context.d.ts +2 -1
  8. package/build/build/createContext.d.ts +3 -2
  9. package/build/build/createContext.js +2 -2
  10. package/build/build/local.d.ts +9 -1
  11. package/build/build/local.js +35 -5
  12. package/build/build/runBuildAndSubmit.d.ts +15 -0
  13. package/build/build/runBuildAndSubmit.js +173 -0
  14. package/build/build/utils/devClient.js +3 -3
  15. package/build/commandUtils/EasCommand.d.ts +2 -1
  16. package/build/commandUtils/EasCommand.js +7 -4
  17. package/build/commands/account/login.d.ts +1 -0
  18. package/build/commands/account/login.js +1 -0
  19. package/build/commands/account/logout.d.ts +1 -0
  20. package/build/commands/account/logout.js +1 -0
  21. package/build/commands/account/view.d.ts +1 -0
  22. package/build/commands/account/view.js +1 -0
  23. package/build/commands/analytics.js +1 -1
  24. package/build/commands/branch/create.d.ts +1 -2
  25. package/build/commands/branch/create.js +3 -4
  26. package/build/commands/branch/delete.d.ts +1 -2
  27. package/build/commands/branch/delete.js +4 -5
  28. package/build/commands/branch/list.d.ts +1 -2
  29. package/build/commands/branch/list.js +4 -5
  30. package/build/commands/branch/rename.d.ts +3 -5
  31. package/build/commands/branch/rename.js +5 -6
  32. package/build/commands/branch/view.d.ts +1 -2
  33. package/build/commands/branch/view.js +3 -4
  34. package/build/commands/build/cancel.js +1 -1
  35. package/build/commands/build/configure.d.ts +1 -2
  36. package/build/commands/build/configure.js +3 -3
  37. package/build/commands/build/index.d.ts +11 -17
  38. package/build/commands/build/index.js +27 -177
  39. package/build/commands/build/inspect.d.ts +21 -0
  40. package/build/commands/build/inspect.js +129 -0
  41. package/build/commands/build/list.d.ts +13 -14
  42. package/build/commands/build/list.js +15 -15
  43. package/build/commands/build/view.d.ts +1 -1
  44. package/build/commands/build/view.js +3 -3
  45. package/build/commands/channel/create.d.ts +1 -2
  46. package/build/commands/channel/create.js +3 -4
  47. package/build/commands/channel/edit.d.ts +2 -4
  48. package/build/commands/channel/edit.js +4 -5
  49. package/build/commands/channel/list.d.ts +1 -2
  50. package/build/commands/channel/list.js +3 -4
  51. package/build/commands/channel/rollout.d.ts +4 -5
  52. package/build/commands/channel/rollout.js +6 -7
  53. package/build/commands/channel/view.d.ts +1 -2
  54. package/build/commands/channel/view.js +3 -4
  55. package/build/commands/config.d.ts +2 -3
  56. package/build/commands/config.js +4 -4
  57. package/build/commands/device/list.d.ts +1 -2
  58. package/build/commands/device/list.js +3 -3
  59. package/build/commands/device/view.js +1 -1
  60. package/build/commands/diagnostics.js +1 -0
  61. package/build/commands/secret/create.d.ts +4 -5
  62. package/build/commands/secret/create.js +6 -6
  63. package/build/commands/secret/delete.d.ts +1 -2
  64. package/build/commands/secret/delete.js +3 -3
  65. package/build/commands/submit.d.ts +9 -10
  66. package/build/commands/submit.js +13 -14
  67. package/build/commands/update/configure.d.ts +0 -3
  68. package/build/commands/update/configure.js +14 -15
  69. package/build/commands/update/delete.d.ts +1 -2
  70. package/build/commands/update/delete.js +3 -4
  71. package/build/commands/update/index.d.ts +9 -11
  72. package/build/commands/update/index.js +60 -29
  73. package/build/commands/update/view.d.ts +1 -2
  74. package/build/commands/update/view.js +3 -4
  75. package/build/commands/webhook/create.d.ts +3 -4
  76. package/build/commands/webhook/create.js +5 -5
  77. package/build/commands/webhook/delete.js +1 -1
  78. package/build/commands/webhook/list.d.ts +1 -2
  79. package/build/commands/webhook/list.js +3 -3
  80. package/build/commands/webhook/update.d.ts +4 -5
  81. package/build/commands/webhook/update.js +6 -6
  82. package/build/commands/webhook/view.js +1 -1
  83. package/build/graphql/generated.d.ts +31 -11
  84. package/build/graphql/generated.js +6 -1
  85. package/build/graphql/types/Submission.js +1 -0
  86. package/build/index.d.ts +1 -1
  87. package/build/index.js +2 -2
  88. package/build/project/expoSdk.d.ts +3 -0
  89. package/build/project/expoSdk.js +30 -0
  90. package/build/project/metroConfig.js +2 -2
  91. package/build/project/publish.js +1 -3
  92. package/build/prompts.d.ts +3 -3
  93. package/build/submit/ios/IosSubmitCommand.js +6 -1
  94. package/build/submit/utils/urls.js +1 -1
  95. package/build/update/utils.js +4 -4
  96. package/build/user/actions.js +2 -2
  97. package/build/utils/expoCli.d.ts +3 -1
  98. package/build/utils/expoCli.js +13 -11
  99. package/build/utils/profiles.d.ts +1 -1
  100. package/build/utils/profiles.js +80 -30
  101. package/build/vcs/clients/git.js +2 -2
  102. package/oclif.manifest.json +1 -1
  103. package/package.json +17 -12
@@ -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
  };
@@ -8,7 +8,7 @@ const ora_1 = require("../../ora");
8
8
  const formatWebhook_1 = require("../../webhooks/formatWebhook");
9
9
  class WebhookView extends EasCommand_1.default {
10
10
  async runAsync() {
11
- const { args: { ID: webhookId }, } = this.parse(WebhookView);
11
+ const { args: { ID: webhookId }, } = await this.parse(WebhookView);
12
12
  const spinner = (0, ora_1.ora)(`Fetching the webhook details for ID ${webhookId}`).start();
13
13
  try {
14
14
  const webhook = await WebhookQuery_1.WebhookQuery.byIdAsync(webhookId);
@@ -632,6 +632,7 @@ export declare type Build = ActivityTimelineProjectActivity & BuildOrBuildJob &
632
632
  appBuildVersion?: Maybe<Scalars['String']>;
633
633
  sdkVersion?: Maybe<Scalars['String']>;
634
634
  runtimeVersion?: Maybe<Scalars['String']>;
635
+ reactNativeVersion?: Maybe<Scalars['String']>;
635
636
  releaseChannel?: Maybe<Scalars['String']>;
636
637
  channel?: Maybe<Scalars['String']>;
637
638
  metrics?: Maybe<BuildMetrics>;
@@ -1535,6 +1536,7 @@ export declare type InvoiceQuery = {
1535
1536
  export declare type InvoiceQueryPreviewInvoiceForSubscriptionUpdateArgs = {
1536
1537
  accountId: Scalars['String'];
1537
1538
  newPlanIdentifier: Scalars['String'];
1539
+ couponCode?: Maybe<Scalars['String']>;
1538
1540
  };
1539
1541
  export declare type Invoice = {
1540
1542
  __typename?: 'Invoice';
@@ -1545,12 +1547,28 @@ export declare type Invoice = {
1545
1547
  amountPaid: Scalars['Int'];
1546
1548
  /** The total amount that needs to be paid, considering any discounts or account credit. Value is in cents. */
1547
1549
  amountRemaining: Scalars['Int'];
1550
+ discount?: Maybe<InvoiceDiscount>;
1551
+ totalDiscountedAmount: Scalars['Int'];
1548
1552
  lineItems: Array<InvoiceLineItem>;
1549
1553
  period: InvoicePeriod;
1550
1554
  startingBalance: Scalars['Int'];
1551
1555
  subtotal: Scalars['Int'];
1552
1556
  total: Scalars['Int'];
1553
1557
  };
1558
+ export declare type InvoiceDiscount = {
1559
+ __typename?: 'InvoiceDiscount';
1560
+ id: Scalars['ID'];
1561
+ name: Scalars['String'];
1562
+ type: InvoiceDiscountType;
1563
+ duration: Scalars['String'];
1564
+ durationInMonths?: Maybe<Scalars['Int']>;
1565
+ /** The coupon's discount value, in percentage or in dollar amount */
1566
+ amount: Scalars['Int'];
1567
+ };
1568
+ export declare enum InvoiceDiscountType {
1569
+ Percentage = "PERCENTAGE",
1570
+ Amount = "AMOUNT"
1571
+ }
1554
1572
  export declare type InvoiceLineItem = {
1555
1573
  __typename?: 'InvoiceLineItem';
1556
1574
  id: Scalars['ID'];
@@ -1818,6 +1836,7 @@ export declare type AccountMutationCancelSubscriptionArgs = {
1818
1836
  export declare type AccountMutationChangePlanArgs = {
1819
1837
  accountID: Scalars['ID'];
1820
1838
  newPlanIdentifier: Scalars['String'];
1839
+ couponCode?: Maybe<Scalars['String']>;
1821
1840
  };
1822
1841
  export declare type AccountMutationCancelScheduledSubscriptionChangeArgs = {
1823
1842
  accountID: Scalars['ID'];
@@ -2307,6 +2326,7 @@ export declare type BuildMetadataInput = {
2307
2326
  credentialsSource?: Maybe<BuildCredentialsSource>;
2308
2327
  sdkVersion?: Maybe<Scalars['String']>;
2309
2328
  runtimeVersion?: Maybe<Scalars['String']>;
2329
+ reactNativeVersion?: Maybe<Scalars['String']>;
2310
2330
  releaseChannel?: Maybe<Scalars['String']>;
2311
2331
  channel?: Maybe<Scalars['String']>;
2312
2332
  distribution?: Maybe<DistributionType>;
@@ -3060,16 +3080,6 @@ export declare type BranchesByAppQuery = ({
3060
3080
  });
3061
3081
  });
3062
3082
  });
3063
- export declare type GetUpdateGroupAsyncQueryVariables = Exact<{
3064
- group: Scalars['ID'];
3065
- }>;
3066
- export declare type GetUpdateGroupAsyncQuery = ({
3067
- __typename?: 'RootQuery';
3068
- } & {
3069
- updatesByGroup: Array<({
3070
- __typename?: 'Update';
3071
- } & Pick<Update, 'id' | 'group' | 'runtimeVersion' | 'manifestFragment' | 'platform' | 'message'>)>;
3072
- });
3073
3083
  export declare type EditUpdateBranchMutationVariables = Exact<{
3074
3084
  input: EditUpdateBranchInput;
3075
3085
  }>;
@@ -3277,6 +3287,16 @@ export declare type DeleteUpdateGroupMutation = ({
3277
3287
  } & Pick<DeleteUpdateGroupResult, 'group'>);
3278
3288
  });
3279
3289
  });
3290
+ export declare type GetUpdateGroupAsyncQueryVariables = Exact<{
3291
+ group: Scalars['ID'];
3292
+ }>;
3293
+ export declare type GetUpdateGroupAsyncQuery = ({
3294
+ __typename?: 'RootQuery';
3295
+ } & {
3296
+ updatesByGroup: Array<({
3297
+ __typename?: 'Update';
3298
+ } & Pick<Update, 'id' | 'group' | 'runtimeVersion' | 'manifestFragment' | 'platform' | 'message'>)>;
3299
+ });
3280
3300
  export declare type UpdatesByGroupQueryVariables = Exact<{
3281
3301
  groupId: Scalars['ID'];
3282
3302
  }>;
@@ -4585,7 +4605,7 @@ export declare type SubmissionFragment = ({
4585
4605
  } & Pick<Submission, 'id' | 'status' | 'platform' | 'logsUrl'> & {
4586
4606
  app: ({
4587
4607
  __typename?: 'App';
4588
- } & Pick<App, 'id' | 'name'> & {
4608
+ } & Pick<App, 'id' | 'name' | 'slug'> & {
4589
4609
  ownerAccount: ({
4590
4610
  __typename?: 'Account';
4591
4611
  } & Pick<Account, 'id' | 'name'>);
@@ -6,7 +6,7 @@
6
6
  * For more info and docs, visit https://graphql-code-generator.com/
7
7
  */
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.CacheControlScope = exports.IosManagedBuildType = exports.IosSchemeBuildConfiguration = exports.StandardOffer = exports.MailchimpAudience = exports.MailchimpTag = exports.UploadSessionType = exports.IosBuildType = exports.EasBuildDeprecationInfoType = exports.BuildCredentialsSource = exports.AndroidBuildType = exports.ProjectArchiveSourceType = exports.BuildWorkflow = exports.Order = exports.AssetMetadataStatus = exports.AppSort = exports.AppsFilter = exports.WebhookType = exports.AndroidKeystoreType = exports.AndroidFcmVersion = exports.AppStoreConnectUserRole = exports.IosDistributionType = exports.AppleDeviceClass = exports.BuildJobStatus = exports.BuildJobLogsFormat = exports.SubmissionAndroidReleaseStatus = exports.SubmissionAndroidTrack = exports.SubmissionAndroidArchiveType = exports.SubmissionStatus = exports.BuildIosEnterpriseProvisioning = exports.ActivityTimelineProjectActivityType = exports.Role = exports.Permission = exports.SecondFactorMethod = exports.DistributionType = exports.BuildStatus = exports.AppPlatform = exports.AppPrivacy = exports.Feature = exports.OfferType = void 0;
9
+ exports.CacheControlScope = exports.IosManagedBuildType = exports.IosSchemeBuildConfiguration = exports.StandardOffer = exports.MailchimpAudience = exports.MailchimpTag = exports.UploadSessionType = exports.IosBuildType = exports.EasBuildDeprecationInfoType = exports.BuildCredentialsSource = exports.AndroidBuildType = exports.ProjectArchiveSourceType = exports.BuildWorkflow = exports.InvoiceDiscountType = exports.Order = exports.AssetMetadataStatus = exports.AppSort = exports.AppsFilter = exports.WebhookType = exports.AndroidKeystoreType = exports.AndroidFcmVersion = exports.AppStoreConnectUserRole = exports.IosDistributionType = exports.AppleDeviceClass = exports.BuildJobStatus = exports.BuildJobLogsFormat = exports.SubmissionAndroidReleaseStatus = exports.SubmissionAndroidTrack = exports.SubmissionAndroidArchiveType = exports.SubmissionStatus = exports.BuildIosEnterpriseProvisioning = exports.ActivityTimelineProjectActivityType = exports.Role = exports.Permission = exports.SecondFactorMethod = exports.DistributionType = exports.BuildStatus = exports.AppPlatform = exports.AppPrivacy = exports.Feature = exports.OfferType = void 0;
10
10
  var OfferType;
11
11
  (function (OfferType) {
12
12
  /** Term subscription */
@@ -202,6 +202,11 @@ var Order;
202
202
  Order["Desc"] = "DESC";
203
203
  Order["Asc"] = "ASC";
204
204
  })(Order = exports.Order || (exports.Order = {}));
205
+ var InvoiceDiscountType;
206
+ (function (InvoiceDiscountType) {
207
+ InvoiceDiscountType["Percentage"] = "PERCENTAGE";
208
+ InvoiceDiscountType["Amount"] = "AMOUNT";
209
+ })(InvoiceDiscountType = exports.InvoiceDiscountType || (exports.InvoiceDiscountType = {}));
205
210
  var BuildWorkflow;
206
211
  (function (BuildWorkflow) {
207
212
  BuildWorkflow["Generic"] = "GENERIC";
@@ -11,6 +11,7 @@ exports.SubmissionFragmentNode = (0, graphql_tag_1.default) `
11
11
  app {
12
12
  id
13
13
  name
14
+ slug
14
15
  ownerAccount {
15
16
  id
16
17
  name
package/build/index.d.ts CHANGED
@@ -1 +1 @@
1
- export { run } from '@oclif/command';
1
+ export { run } from '@oclif/core';
package/build/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.run = void 0;
4
- var command_1 = require("@oclif/command");
5
- Object.defineProperty(exports, "run", { enumerable: true, get: function () { return command_1.run; } });
4
+ var core_1 = require("@oclif/core");
5
+ Object.defineProperty(exports, "run", { enumerable: true, get: function () { return core_1.run; } });
@@ -0,0 +1,3 @@
1
+ import { Platform } from '@expo/eas-build-job';
2
+ import { BuildContext } from '../build/context';
3
+ export declare function checkExpoSdkIsSupportedAsync(ctx: BuildContext<Platform>): Promise<void>;
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.checkExpoSdkIsSupportedAsync = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const eas_build_job_1 = require("@expo/eas-build-job");
6
+ const core_1 = require("@oclif/core");
7
+ const assert_1 = (0, tslib_1.__importDefault)(require("assert"));
8
+ const semver_1 = (0, tslib_1.__importDefault)(require("semver"));
9
+ const log_1 = (0, tslib_1.__importDefault)(require("../log"));
10
+ const prompts_1 = require("../prompts");
11
+ const SUPPORTED_EXPO_SDK_VERSIONS = '>= 41.0.0';
12
+ (0, assert_1.default)(semver_1.default.validRange(SUPPORTED_EXPO_SDK_VERSIONS), 'Must be a valid version range');
13
+ async function checkExpoSdkIsSupportedAsync(ctx) {
14
+ (0, assert_1.default)(ctx.workflow === eas_build_job_1.Workflow.MANAGED, 'Must be a managed workflow project');
15
+ if (ctx.exp.sdkVersion && semver_1.default.satisfies(ctx.exp.sdkVersion, SUPPORTED_EXPO_SDK_VERSIONS)) {
16
+ return;
17
+ }
18
+ const unsupportedSdkMessage = 'EAS Build does not officially support building managed project with Expo SDK < 41.';
19
+ if (ctx.nonInteractive) {
20
+ log_1.default.warn(`${unsupportedSdkMessage} Proceeding because you are running in non-interactive mode.`);
21
+ return;
22
+ }
23
+ const proceed = await (0, prompts_1.confirmAsync)({
24
+ message: `${unsupportedSdkMessage} Do you want to proceed?`,
25
+ });
26
+ if (!proceed) {
27
+ core_1.Errors.exit(1);
28
+ }
29
+ }
30
+ exports.checkExpoSdkIsSupportedAsync = checkExpoSdkIsSupportedAsync;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.validateMetroConfigForManagedWorkflowAsync = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const errors_1 = require("@oclif/errors");
5
+ const core_1 = require("@oclif/core");
6
6
  const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
7
7
  const resolve_from_1 = (0, tslib_1.__importDefault)(require("resolve-from"));
8
8
  const log_1 = (0, tslib_1.__importStar)(require("../log"));
@@ -32,7 +32,7 @@ async function validateMetroConfigForManagedWorkflowAsync(ctx) {
32
32
  });
33
33
  if (shouldAbort) {
34
34
  log_1.default.error('Aborting...');
35
- (0, errors_1.exit)(1);
35
+ core_1.Errors.exit(1);
36
36
  }
37
37
  }
38
38
  }
@@ -11,7 +11,6 @@ const path_1 = (0, tslib_1.__importDefault)(require("path"));
11
11
  const generated_1 = require("../graphql/generated");
12
12
  const PublishMutation_1 = require("../graphql/mutations/PublishMutation");
13
13
  const PublishQuery_1 = require("../graphql/queries/PublishQuery");
14
- const log_1 = (0, tslib_1.__importDefault)(require("../log"));
15
14
  const uploads_1 = require("../uploads");
16
15
  const expoCli_1 = require("../utils/expoCli");
17
16
  const uniqBy_1 = (0, tslib_1.__importDefault)(require("../utils/expodash/uniqBy"));
@@ -107,8 +106,7 @@ async function buildBundlesAsync({ projectDir, inputDir, }) {
107
106
  if (!packageJSON) {
108
107
  throw new Error('Could not locate package.json');
109
108
  }
110
- log_1.default.withTick(`Building bundle with expo-cli...`);
111
- await (0, expoCli_1.expoCommandAsync)(projectDir, ['export', '--output-dir', inputDir, '--experimental-bundle']);
109
+ await (0, expoCli_1.expoCommandAsync)(projectDir, ['export', '--output-dir', inputDir, '--experimental-bundle'], { silent: true });
112
110
  }
113
111
  exports.buildBundlesAsync = buildBundlesAsync;
114
112
  async function resolveInputDirectoryAsync(customInputDirectory) {
@@ -1,11 +1,11 @@
1
1
  import { Answers, Choice, Options, PromptType, PromptObject as Question } from 'prompts';
2
2
  export { PromptType, Question, Choice };
3
+ export interface ExpoChoice<T> extends Choice {
4
+ value: T;
5
+ }
3
6
  declare type NamelessQuestion = Omit<Question<'value'>, 'name' | 'type'>;
4
7
  export declare function promptAsync<T extends string = string>(questions: Question<T> | Question<T>[], options?: Options): Promise<Answers<T>>;
5
8
  export declare function confirmAsync(question: NamelessQuestion, options?: Options): Promise<boolean>;
6
- interface ExpoChoice<T> extends Choice {
7
- value: T;
8
- }
9
9
  export declare function selectAsync<T>(message: string, choices: ExpoChoice<T>[], options?: Options): Promise<T>;
10
10
  /**
11
11
  * Create a more dynamic yes/no confirmation that can be cancelled.
@@ -138,7 +138,12 @@ class IosSubmitCommand {
138
138
  }
139
139
  // interpret this to mean the user had some intention of passing in ASC Api key
140
140
  if (ascApiKeyPath || ascApiKeyIssuerId || ascApiKeyId) {
141
- log_1.default.warn(`ascApiKeyPath, ascApiKeyIssuerId and ascApiKeyId must all be defined in eas.json`);
141
+ const message = `ascApiKeyPath, ascApiKeyIssuerId and ascApiKeyId must all be defined in eas.json`;
142
+ // in non-interactive mode, we should fail
143
+ if (this.ctx.nonInteractive) {
144
+ throw new Error(message);
145
+ }
146
+ log_1.default.warn(message);
142
147
  return (0, results_1.result)({
143
148
  sourceType: AscApiKeySource_1.AscApiKeySourceType.prompt,
144
149
  });
@@ -21,6 +21,6 @@ function printSubmissionDetailsUrls(submissions) {
21
21
  exports.printSubmissionDetailsUrls = printSubmissionDetailsUrls;
22
22
  function getSubmissionDetailsUrl(submission) {
23
23
  const { id, app } = submission;
24
- return new url_1.URL(`/accounts/${app.ownerAccount.name}/projects/${app.name}/submissions/${id}`, (0, api_1.getExpoWebsiteBaseUrl)()).toString();
24
+ return new url_1.URL(`/accounts/${app.ownerAccount.name}/projects/${app.slug}/submissions/${id}`, (0, api_1.getExpoWebsiteBaseUrl)()).toString();
25
25
  }
26
26
  exports.getSubmissionDetailsUrl = getSubmissionDetailsUrl;
@@ -6,10 +6,10 @@ const timeago_js_1 = require("@expo/timeago.js");
6
6
  const User_1 = require("../user/User");
7
7
  const groupBy_1 = (0, tslib_1.__importDefault)(require("../utils/expodash/groupBy"));
8
8
  exports.UPDATE_COLUMNS = [
9
- 'update description',
10
- 'update runtime version',
11
- 'update group ID',
12
- 'platforms',
9
+ 'Update message',
10
+ 'Update runtime version',
11
+ 'Update group ID',
12
+ 'Update platforms',
13
13
  ];
14
14
  function getPlatformsForGroup({ group, updates, }) {
15
15
  const groupedUpdates = (0, groupBy_1.default)(updates, update => update.group);
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ensureActorHasUsername = exports.ensureLoggedInAsync = exports.showLoginPromptAsync = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const errors_1 = require("@oclif/errors");
5
+ const core_1 = require("@oclif/core");
6
6
  const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
7
7
  const nullthrows_1 = (0, tslib_1.__importDefault)(require("nullthrows"));
8
8
  const ApiV2Error_1 = (0, tslib_1.__importDefault)(require("../ApiV2Error"));
@@ -12,7 +12,7 @@ const User_1 = require("./User");
12
12
  const otp_1 = require("./otp");
13
13
  async function showLoginPromptAsync({ nonInteractive = false, printNewLine = false, } = {}) {
14
14
  if (nonInteractive) {
15
- (0, errors_1.error)(`Either log in with ${chalk_1.default.bold('eas login')} or set the ${chalk_1.default.bold('EXPO_TOKEN')} environment variable if you're using EAS CLI on CI (${(0, log_1.learnMore)('https://docs.expo.dev/accounts/programmatic-access/', { dim: false })})`);
15
+ core_1.Errors.error(`Either log in with ${chalk_1.default.bold('eas login')} or set the ${chalk_1.default.bold('EXPO_TOKEN')} environment variable if you're using EAS CLI on CI (${(0, log_1.learnMore)('https://docs.expo.dev/accounts/programmatic-access/', { dim: false })})`);
16
16
  }
17
17
  if (printNewLine) {
18
18
  log_1.default.newLine();
@@ -1 +1,3 @@
1
- export declare function expoCommandAsync(projectDir: string, args: string[]): Promise<void>;
1
+ export declare function expoCommandAsync(projectDir: string, args: string[], { silent }?: {
2
+ silent?: boolean;
3
+ }): Promise<void>;
@@ -6,7 +6,7 @@ const spawn_async_1 = (0, tslib_1.__importDefault)(require("@expo/spawn-async"))
6
6
  const chalk_1 = (0, tslib_1.__importDefault)(require("chalk"));
7
7
  const resolve_from_1 = (0, tslib_1.__importDefault)(require("resolve-from"));
8
8
  const log_1 = (0, tslib_1.__importDefault)(require("../log"));
9
- async function expoCommandAsync(projectDir, args) {
9
+ async function expoCommandAsync(projectDir, args, { silent = false } = {}) {
10
10
  const expoCliPath = (0, resolve_from_1.default)(projectDir, 'expo/bin/cli.js');
11
11
  const spawnPromise = (0, spawn_async_1.default)(expoCliPath, args, {
12
12
  stdio: ['inherit', 'pipe', 'pipe'], // inherit stdin so user can install a missing expo-cli from inside this command
@@ -15,16 +15,18 @@ async function expoCommandAsync(projectDir, args) {
15
15
  if (!(stdout && stderr)) {
16
16
  throw new Error('Failed to spawn expo-cli');
17
17
  }
18
- stdout.on('data', data => {
19
- for (const line of data.toString().trim().split('\n')) {
20
- log_1.default.log(`${chalk_1.default.gray('[expo-cli]')} ${line}`);
21
- }
22
- });
23
- stderr.on('data', data => {
24
- for (const line of data.toString().trim().split('\n')) {
25
- log_1.default.warn(`${chalk_1.default.gray('[expo-cli]')} ${line}`);
26
- }
27
- });
18
+ if (!silent) {
19
+ stdout.on('data', data => {
20
+ for (const line of data.toString().trim().split('\n')) {
21
+ log_1.default.log(`${chalk_1.default.gray('[expo-cli]')} ${line}`);
22
+ }
23
+ });
24
+ stderr.on('data', data => {
25
+ for (const line of data.toString().trim().split('\n')) {
26
+ log_1.default.warn(`${chalk_1.default.gray('[expo-cli]')} ${line}`);
27
+ }
28
+ });
29
+ }
28
30
  await spawnPromise;
29
31
  }
30
32
  exports.expoCommandAsync = expoCommandAsync;
@@ -6,7 +6,7 @@ export declare type ProfileData<T extends ProfileType> = {
6
6
  platform: Platform;
7
7
  profileName: string;
8
8
  };
9
- export declare function getProfilesAsync<T extends ProfileType>({ projectDir, platforms, profileName: profileNameArg, type, }: {
9
+ export declare function getProfilesAsync<T extends ProfileType>({ projectDir, platforms, profileName, type, }: {
10
10
  projectDir: string;
11
11
  platforms: Platform[];
12
12
  profileName?: string;