eas-cli 0.50.0 → 0.53.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 (79) hide show
  1. package/README.md +46 -45
  2. package/build/build/android/version.js +1 -1
  3. package/build/build/build.js +36 -27
  4. package/build/build/ios/build.js +3 -1
  5. package/build/build/ios/credentials.js +2 -6
  6. package/build/build/local.js +1 -1
  7. package/build/commands/branch/create.js +2 -2
  8. package/build/commands/branch/delete.js +2 -2
  9. package/build/commands/branch/list.js +2 -2
  10. package/build/commands/branch/rename.js +2 -2
  11. package/build/commands/branch/view.js +2 -2
  12. package/build/commands/build/cancel.js +3 -3
  13. package/build/commands/build/configure.js +2 -2
  14. package/build/commands/build/inspect.js +1 -1
  15. package/build/commands/build/list.js +2 -2
  16. package/build/commands/build/view.js +2 -2
  17. package/build/commands/channel/create.js +2 -2
  18. package/build/commands/channel/delete.js +2 -2
  19. package/build/commands/channel/edit.js +2 -2
  20. package/build/commands/channel/list.js +2 -2
  21. package/build/commands/channel/rollout.js +2 -2
  22. package/build/commands/channel/view.js +3 -3
  23. package/build/commands/device/delete.js +2 -2
  24. package/build/commands/device/list.js +2 -2
  25. package/build/commands/device/view.js +2 -2
  26. package/build/commands/project/info.js +2 -2
  27. package/build/commands/project/init.js +2 -2
  28. package/build/commands/secret/create.js +2 -2
  29. package/build/commands/secret/delete.js +2 -2
  30. package/build/commands/secret/list.js +2 -2
  31. package/build/commands/submit.js +2 -2
  32. package/build/commands/update/configure.js +2 -3
  33. package/build/commands/update/index.d.ts +1 -0
  34. package/build/commands/update/index.js +28 -6
  35. package/build/commands/update/list.js +2 -2
  36. package/build/commands/webhook/create.js +2 -2
  37. package/build/commands/webhook/delete.js +2 -2
  38. package/build/commands/webhook/list.js +2 -2
  39. package/build/credentials/android/actions/CreateGoogleServiceAccountKey.js +24 -9
  40. package/build/credentials/android/utils/googleServiceAccountKey.js +1 -1
  41. package/build/credentials/android/utils/keystore.js +1 -1
  42. package/build/credentials/android/utils/keystoreNew.js +2 -2
  43. package/build/credentials/context.js +2 -3
  44. package/build/credentials/credentialsJson/read.js +1 -1
  45. package/build/credentials/ios/IosCredentialsProvider.d.ts +0 -2
  46. package/build/credentials/ios/IosCredentialsProvider.js +0 -1
  47. package/build/credentials/ios/actions/SetUpBuildCredentials.d.ts +0 -2
  48. package/build/credentials/ios/actions/SetUpBuildCredentials.js +3 -1
  49. package/build/credentials/ios/actions/SetUpTargetBuildCredentials.d.ts +2 -2
  50. package/build/credentials/ios/actions/SetUpTargetBuildCredentials.js +2 -2
  51. package/build/credentials/ios/types.d.ts +2 -0
  52. package/build/credentials/ios/utils/printCredentials.d.ts +1 -1
  53. package/build/credentials/ios/utils/provisioningProfile.js +1 -1
  54. package/build/credentials/ios/validators/validateProvisioningProfile.js +1 -1
  55. package/build/credentials/manager/ManageIos.js +8 -7
  56. package/build/graphql/generated.d.ts +66 -21
  57. package/build/graphql/generated.js +5 -0
  58. package/build/project/android/applicationId.js +1 -1
  59. package/build/project/ios/bundleIdentifier.js +1 -1
  60. package/build/project/ios/entitlements.d.ts +8 -0
  61. package/build/{credentials/ios/appstore → project/ios}/entitlements.js +7 -19
  62. package/build/project/ios/target.d.ts +9 -3
  63. package/build/project/ios/target.js +68 -47
  64. package/build/project/publish.js +2 -1
  65. package/build/submit/ArchiveSource.js +1 -1
  66. package/build/submit/android/ServiceAccountSource.js +1 -1
  67. package/build/submit/utils/errors.js +6 -2
  68. package/build/submit/utils/files.js +1 -1
  69. package/build/submit/utils/logs.js +1 -1
  70. package/build/update/android/UpdatesModule.js +2 -2
  71. package/build/update/ios/UpdatesModule.js +2 -2
  72. package/build/user/actions.js +1 -1
  73. package/build/utils/code-signing.js +11 -14
  74. package/build/vcs/clients/git.js +5 -5
  75. package/build/vcs/git.js +1 -1
  76. package/build/webhooks/input.js +1 -1
  77. package/oclif.manifest.json +1 -1
  78. package/package.json +38 -38
  79. package/build/credentials/ios/appstore/entitlements.d.ts +0 -4
@@ -91,7 +91,7 @@ export declare type Account = {
91
91
  apps: Array<App>;
92
92
  /** @deprecated Build packs are no longer supported */
93
93
  availableBuilds?: Maybe<Scalars['Int']>;
94
- /** Billing information */
94
+ /** Billing information. Only visible to members with the ADMIN or OWNER role. */
95
95
  billing?: Maybe<Billing>;
96
96
  billingPeriod: BillingPeriod;
97
97
  /** Build Jobs associated with this account */
@@ -295,7 +295,9 @@ export declare type AccountMutationRenameArgs = {
295
295
  };
296
296
  export declare type AccountMutationRequestRefundArgs = {
297
297
  accountID: Scalars['ID'];
298
- chargeIdentifier: Scalars['ID'];
298
+ chargeID: Scalars['ID'];
299
+ description?: InputMaybe<Scalars['String']>;
300
+ reason?: InputMaybe<Scalars['String']>;
299
301
  };
300
302
  export declare type AccountMutationRevokeActorPermissionsArgs = {
301
303
  accountID: Scalars['ID'];
@@ -334,18 +336,34 @@ export declare type AccountQueryByNameArgs = {
334
336
  };
335
337
  export declare type AccountUsageMetric = {
336
338
  __typename?: 'AccountUsageMetric';
337
- metric: EasServiceMetric;
339
+ id: Scalars['ID'];
338
340
  metricType: UsageMetricType;
341
+ serviceMetric: EasServiceMetric;
339
342
  timestamp: Scalars['DateTime'];
340
343
  value: Scalars['Float'];
341
344
  };
345
+ export declare type AccountUsageMetricAndCost = {
346
+ __typename?: 'AccountUsageMetricAndCost';
347
+ id: Scalars['ID'];
348
+ /** The limit, in units, allowed by this plan */
349
+ limit: Scalars['Float'];
350
+ metricType: UsageMetricType;
351
+ serviceMetric: EasServiceMetric;
352
+ /** Total cost of this particular metric, in cents */
353
+ totalCost: Scalars['Float'];
354
+ value: Scalars['Float'];
355
+ };
342
356
  export declare type AccountUsageMetrics = {
343
357
  __typename?: 'AccountUsageMetrics';
358
+ byBillingPeriod: UsageMetricTotal;
344
359
  metricsForServiceMetric: Array<AccountUsageMetric>;
345
360
  };
361
+ export declare type AccountUsageMetricsByBillingPeriodArgs = {
362
+ date: Scalars['DateTime'];
363
+ };
346
364
  export declare type AccountUsageMetricsMetricsForServiceMetricArgs = {
347
365
  granularity: UsageMetricsGranularity;
348
- metric: EasServiceMetric;
366
+ serviceMetric: EasServiceMetric;
349
367
  timespan: UsageMetricsTimespan;
350
368
  };
351
369
  export declare type ActivityTimelineProjectActivity = {
@@ -842,14 +860,18 @@ export declare type AppDataInput = {
842
860
  };
843
861
  export declare type AppIcon = {
844
862
  __typename?: 'AppIcon';
845
- /** Nullable color palette of the app icon. If null, color palette couldn't be retrieved from external service (imgix) */
863
+ /** @deprecated No longer supported */
846
864
  colorPalette?: Maybe<Scalars['JSON']>;
847
865
  originalUrl: Scalars['String'];
848
866
  primaryColor?: Maybe<Scalars['String']>;
849
867
  url: Scalars['String'];
850
868
  };
869
+ export declare type AppInfoInput = {
870
+ displayName?: InputMaybe<Scalars['String']>;
871
+ };
851
872
  export declare type AppInput = {
852
873
  accountId: Scalars['ID'];
874
+ appInfo?: InputMaybe<AppInfoInput>;
853
875
  privacy: AppPrivacy;
854
876
  projectName: Scalars['String'];
855
877
  };
@@ -859,6 +881,8 @@ export declare type AppMutation = {
859
881
  createApp: App;
860
882
  /** @deprecated No longer supported */
861
883
  grantAccess?: Maybe<App>;
884
+ /** Set display info for app */
885
+ setAppInfo: App;
862
886
  /** Require api token to send push notifs for experience */
863
887
  setPushSecurityEnabled: App;
864
888
  };
@@ -869,6 +893,10 @@ export declare type AppMutationGrantAccessArgs = {
869
893
  accessLevel?: InputMaybe<Scalars['String']>;
870
894
  toUser: Scalars['ID'];
871
895
  };
896
+ export declare type AppMutationSetAppInfoArgs = {
897
+ appId: Scalars['ID'];
898
+ appInfo: AppInfoInput;
899
+ };
872
900
  export declare type AppMutationSetPushSecurityEnabledArgs = {
873
901
  appId: Scalars['ID'];
874
902
  pushSecurityEnabled: Scalars['Boolean'];
@@ -1594,6 +1622,12 @@ export declare type CodeSigningInfoInput = {
1594
1622
  keyid: Scalars['String'];
1595
1623
  sig: Scalars['String'];
1596
1624
  };
1625
+ export declare type Concurrencies = {
1626
+ __typename?: 'Concurrencies';
1627
+ android: Scalars['Int'];
1628
+ ios: Scalars['Int'];
1629
+ total: Scalars['Int'];
1630
+ };
1597
1631
  export declare type CreateAccessTokenInput = {
1598
1632
  actorID: Scalars['ID'];
1599
1633
  note?: InputMaybe<Scalars['String']>;
@@ -1607,6 +1641,7 @@ export declare type CreateAccessTokenResponse = {
1607
1641
  };
1608
1642
  export declare type CreateAndroidSubmissionInput = {
1609
1643
  appId: Scalars['ID'];
1644
+ archiveUrl?: InputMaybe<Scalars['String']>;
1610
1645
  config: AndroidSubmissionConfigInput;
1611
1646
  submittedBuildId?: InputMaybe<Scalars['ID']>;
1612
1647
  };
@@ -1621,15 +1656,10 @@ export declare type CreateEnvironmentSecretInput = {
1621
1656
  };
1622
1657
  export declare type CreateIosSubmissionInput = {
1623
1658
  appId: Scalars['ID'];
1659
+ archiveUrl?: InputMaybe<Scalars['String']>;
1624
1660
  config: IosSubmissionConfigInput;
1625
1661
  submittedBuildId?: InputMaybe<Scalars['ID']>;
1626
1662
  };
1627
- export declare type CreateSubmissionInput = {
1628
- appId: Scalars['ID'];
1629
- config: Scalars['JSONObject'];
1630
- platform: AppPlatform;
1631
- submittedBuildId?: InputMaybe<Scalars['ID']>;
1632
- };
1633
1663
  export declare type CreateSubmissionResult = {
1634
1664
  __typename?: 'CreateSubmissionResult';
1635
1665
  /** Created submission */
@@ -1720,7 +1750,10 @@ export declare enum EasBuildDeprecationInfoType {
1720
1750
  UserFacing = "USER_FACING"
1721
1751
  }
1722
1752
  export declare enum EasServiceMetric {
1723
- ManifestRequests = "MANIFEST_REQUESTS"
1753
+ AssetsRequests = "ASSETS_REQUESTS",
1754
+ BandwidthUsage = "BANDWIDTH_USAGE",
1755
+ ManifestRequests = "MANIFEST_REQUESTS",
1756
+ UniqueUsers = "UNIQUE_USERS"
1724
1757
  }
1725
1758
  export declare type EditUpdateBranchInput = {
1726
1759
  appId?: InputMaybe<Scalars['ID']>;
@@ -2595,6 +2628,8 @@ export declare type Submission = ActivityTimelineProjectActivity & {
2595
2628
  actor?: Maybe<Actor>;
2596
2629
  androidConfig?: Maybe<AndroidSubmissionConfig>;
2597
2630
  app: App;
2631
+ archiveUrl?: Maybe<Scalars['String']>;
2632
+ canRetry: Scalars['Boolean'];
2598
2633
  cancelingActor?: Maybe<Actor>;
2599
2634
  createdAt: Scalars['DateTime'];
2600
2635
  error?: Maybe<SubmissionError>;
@@ -2602,6 +2637,7 @@ export declare type Submission = ActivityTimelineProjectActivity & {
2602
2637
  initiatingActor?: Maybe<Actor>;
2603
2638
  iosConfig?: Maybe<IosSubmissionConfig>;
2604
2639
  logsUrl?: Maybe<Scalars['String']>;
2640
+ parentSubmission?: Maybe<Submission>;
2605
2641
  platform: AppPlatform;
2606
2642
  status: SubmissionStatus;
2607
2643
  submittedBuild?: Maybe<Build>;
@@ -2640,14 +2676,11 @@ export declare type SubmissionMutation = {
2640
2676
  createAndroidSubmission: CreateSubmissionResult;
2641
2677
  /** Create an iOS EAS Submit submission */
2642
2678
  createIosSubmission: CreateSubmissionResult;
2643
- /**
2644
- * Create an EAS Submit submission
2645
- * @deprecated Use createIosSubmission / createAndroidSubmission instead
2646
- */
2647
- createSubmission: CreateSubmissionResult;
2679
+ /** Retry an EAS Submit submission */
2680
+ retrySubmission: CreateSubmissionResult;
2648
2681
  };
2649
2682
  export declare type SubmissionMutationCancelSubmissionArgs = {
2650
- submissionId?: InputMaybe<Scalars['ID']>;
2683
+ submissionId: Scalars['ID'];
2651
2684
  };
2652
2685
  export declare type SubmissionMutationCreateAndroidSubmissionArgs = {
2653
2686
  input: CreateAndroidSubmissionInput;
@@ -2655,8 +2688,8 @@ export declare type SubmissionMutationCreateAndroidSubmissionArgs = {
2655
2688
  export declare type SubmissionMutationCreateIosSubmissionArgs = {
2656
2689
  input: CreateIosSubmissionInput;
2657
2690
  };
2658
- export declare type SubmissionMutationCreateSubmissionArgs = {
2659
- input: CreateSubmissionInput;
2691
+ export declare type SubmissionMutationRetrySubmissionArgs = {
2692
+ parentSubmissionId: Scalars['ID'];
2660
2693
  };
2661
2694
  export declare type SubmissionQuery = {
2662
2695
  __typename?: 'SubmissionQuery';
@@ -2678,6 +2711,7 @@ export declare type SubscriptionDetails = {
2678
2711
  __typename?: 'SubscriptionDetails';
2679
2712
  addons: Array<AddonDetails>;
2680
2713
  cancelledAt?: Maybe<Scalars['DateTime']>;
2714
+ concurrencies?: Maybe<Concurrencies>;
2681
2715
  endedAt?: Maybe<Scalars['DateTime']>;
2682
2716
  id: Scalars['ID'];
2683
2717
  isDowngrading?: Maybe<Scalars['Boolean']>;
@@ -2828,8 +2862,19 @@ export declare enum UploadSessionType {
2828
2862
  EasBuildProjectSources = "EAS_BUILD_PROJECT_SOURCES",
2829
2863
  EasSubmitAppArchive = "EAS_SUBMIT_APP_ARCHIVE"
2830
2864
  }
2865
+ export declare type UsageMetricTotal = {
2866
+ __typename?: 'UsageMetricTotal';
2867
+ billingPeriod: BillingPeriod;
2868
+ id: Scalars['ID'];
2869
+ overageMetrics: Array<AccountUsageMetricAndCost>;
2870
+ planMetrics: Array<AccountUsageMetricAndCost>;
2871
+ /** Total cost of overages, in cents */
2872
+ totalCost: Scalars['Float'];
2873
+ };
2831
2874
  export declare enum UsageMetricType {
2832
- Request = "REQUEST"
2875
+ Bandwidth = "BANDWIDTH",
2876
+ Request = "REQUEST",
2877
+ User = "USER"
2833
2878
  }
2834
2879
  export declare enum UsageMetricsGranularity {
2835
2880
  Day = "DAY",
@@ -147,7 +147,10 @@ var EasBuildDeprecationInfoType;
147
147
  })(EasBuildDeprecationInfoType = exports.EasBuildDeprecationInfoType || (exports.EasBuildDeprecationInfoType = {}));
148
148
  var EasServiceMetric;
149
149
  (function (EasServiceMetric) {
150
+ EasServiceMetric["AssetsRequests"] = "ASSETS_REQUESTS";
151
+ EasServiceMetric["BandwidthUsage"] = "BANDWIDTH_USAGE";
150
152
  EasServiceMetric["ManifestRequests"] = "MANIFEST_REQUESTS";
153
+ EasServiceMetric["UniqueUsers"] = "UNIQUE_USERS";
151
154
  })(EasServiceMetric = exports.EasServiceMetric || (exports.EasServiceMetric = {}));
152
155
  var Feature;
153
156
  (function (Feature) {
@@ -287,7 +290,9 @@ var UploadSessionType;
287
290
  })(UploadSessionType = exports.UploadSessionType || (exports.UploadSessionType = {}));
288
291
  var UsageMetricType;
289
292
  (function (UsageMetricType) {
293
+ UsageMetricType["Bandwidth"] = "BANDWIDTH";
290
294
  UsageMetricType["Request"] = "REQUEST";
295
+ UsageMetricType["User"] = "USER";
291
296
  })(UsageMetricType = exports.UsageMetricType || (exports.UsageMetricType = {}));
292
297
  var UsageMetricsGranularity;
293
298
  (function (UsageMetricsGranularity) {
@@ -25,7 +25,7 @@ async function ensureApplicationIdIsDefinedForManagedProjectAsync(projectDir, ex
25
25
  moduleName: gradleUtils.DEFAULT_MODULE_NAME,
26
26
  });
27
27
  }
28
- catch (err) {
28
+ catch {
29
29
  return await configureApplicationIdAsync(projectDir, exp);
30
30
  }
31
31
  }
@@ -21,7 +21,7 @@ async function ensureBundleIdentifierIsDefinedForManagedProjectAsync(projectDir,
21
21
  try {
22
22
  return await getBundleIdentifierAsync(projectDir, exp);
23
23
  }
24
- catch (err) {
24
+ catch {
25
25
  return await configureBundleIdentifierAsync(projectDir, exp);
26
26
  }
27
27
  }
@@ -0,0 +1,8 @@
1
+ import { JSONObject } from '@expo/json-file';
2
+ interface Target {
3
+ buildConfiguration?: string;
4
+ targetName: string;
5
+ }
6
+ export declare function getManagedApplicationTargetEntitlementsAsync(projectDir: string, env: Record<string, string>): Promise<JSONObject>;
7
+ export declare function getNativeTargetEntitlementsAsync(projectDir: string, target: Target): Promise<JSONObject | null>;
8
+ export {};
@@ -1,11 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.resolveEntitlementsJsonAsync = exports.getManagedEntitlementsJsonAsync = void 0;
3
+ exports.getNativeTargetEntitlementsAsync = exports.getManagedApplicationTargetEntitlementsAsync = void 0;
4
4
  const config_plugins_1 = require("@expo/config-plugins");
5
- const eas_build_job_1 = require("@expo/eas-build-job");
6
5
  const prebuild_config_1 = require("@expo/prebuild-config");
7
- const plist_1 = require("../../../utils/plist");
8
- async function getManagedEntitlementsJsonAsync(projectDir, env) {
6
+ const plist_1 = require("../../utils/plist");
7
+ async function getManagedApplicationTargetEntitlementsAsync(projectDir, env) {
9
8
  var _a;
10
9
  const originalProcessEnv = process.env;
11
10
  try {
@@ -25,21 +24,9 @@ async function getManagedEntitlementsJsonAsync(projectDir, env) {
25
24
  process.env = originalProcessEnv;
26
25
  }
27
26
  }
28
- exports.getManagedEntitlementsJsonAsync = getManagedEntitlementsJsonAsync;
29
- async function resolveEntitlementsJsonAsync(projectDir, workflow, env) {
30
- if (workflow === eas_build_job_1.Workflow.GENERIC) {
31
- return (await getEntitlementsJsonAsync(projectDir)) || {};
32
- }
33
- else if (workflow === eas_build_job_1.Workflow.MANAGED) {
34
- return await getManagedEntitlementsJsonAsync(projectDir, env);
35
- }
36
- else {
37
- throw new Error(`Unknown workflow: ${workflow}`);
38
- }
39
- }
40
- exports.resolveEntitlementsJsonAsync = resolveEntitlementsJsonAsync;
41
- async function getEntitlementsJsonAsync(projectDir) {
42
- const entitlementsPath = config_plugins_1.IOSConfig.Paths.getEntitlementsPath(projectDir);
27
+ exports.getManagedApplicationTargetEntitlementsAsync = getManagedApplicationTargetEntitlementsAsync;
28
+ async function getNativeTargetEntitlementsAsync(projectDir, target) {
29
+ const entitlementsPath = config_plugins_1.IOSConfig.Entitlements.getEntitlementsPath(projectDir, target);
43
30
  if (entitlementsPath) {
44
31
  const plist = await (0, plist_1.readPlistAsync)(entitlementsPath);
45
32
  return plist ? plist : null;
@@ -48,3 +35,4 @@ async function getEntitlementsJsonAsync(projectDir) {
48
35
  return null;
49
36
  }
50
37
  }
38
+ exports.getNativeTargetEntitlementsAsync = getNativeTargetEntitlementsAsync;
@@ -1,9 +1,15 @@
1
1
  import { ExpoConfig } from '@expo/config';
2
2
  import { Target } from '../../credentials/ios/types';
3
3
  import { XcodeBuildContext } from './scheme';
4
- export declare function resolveTargetsAsync({ exp, projectDir }: {
5
- exp: ExpoConfig;
4
+ interface ResolveTargetOptions {
6
5
  projectDir: string;
7
- }, { buildConfiguration, buildScheme }: XcodeBuildContext): Promise<Target[]>;
6
+ exp: ExpoConfig;
7
+ env?: Record<string, string>;
8
+ xcodeBuildContext: XcodeBuildContext;
9
+ }
10
+ export declare function resolveMangedProjectTargetsAsync({ exp, projectDir, xcodeBuildContext, env, }: ResolveTargetOptions): Promise<Target[]>;
11
+ export declare function resolveBareProjectTargetsAsync({ exp, projectDir, xcodeBuildContext, }: ResolveTargetOptions): Promise<Target[]>;
12
+ export declare function resolveTargetsAsync(opts: ResolveTargetOptions): Promise<Target[]>;
8
13
  export declare function findApplicationTarget(targets: Target[]): Target;
9
14
  export declare function findTargetByName(targets: Target[], name: string): Target;
15
+ export {};
@@ -1,30 +1,76 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.findTargetByName = exports.findApplicationTarget = exports.resolveTargetsAsync = void 0;
3
+ exports.findTargetByName = exports.findApplicationTarget = exports.resolveTargetsAsync = exports.resolveBareProjectTargetsAsync = exports.resolveMangedProjectTargetsAsync = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const config_plugins_1 = require("@expo/config-plugins");
6
6
  const eas_build_job_1 = require("@expo/eas-build-job");
7
7
  const joi_1 = tslib_1.__importDefault(require("joi"));
8
8
  const workflow_1 = require("../workflow");
9
9
  const bundleIdentifier_1 = require("./bundleIdentifier");
10
+ const entitlements_1 = require("./entitlements");
10
11
  const AppExtensionsConfigSchema = joi_1.default.array().items(joi_1.default.object({
11
12
  targetName: joi_1.default.string().required(),
12
13
  bundleIdentifier: joi_1.default.string().required(),
13
14
  parentBundleIdentifier: joi_1.default.string(),
15
+ entitlements: joi_1.default.object(),
14
16
  }));
15
- async function resolveTargetsAsync({ exp, projectDir }, { buildConfiguration, buildScheme }) {
17
+ async function resolveMangedProjectTargetsAsync({ exp, projectDir, xcodeBuildContext, env, }) {
18
+ var _a, _b, _c, _d, _e, _f;
19
+ const { buildScheme, buildConfiguration } = xcodeBuildContext;
20
+ const applicationTargetName = buildScheme;
21
+ const applicationTargetBundleIdentifier = await (0, bundleIdentifier_1.getBundleIdentifierAsync)(projectDir, exp, {
22
+ targetName: applicationTargetName,
23
+ buildConfiguration,
24
+ });
25
+ const applicationTargetEntitlements = await (0, entitlements_1.getManagedApplicationTargetEntitlementsAsync)(projectDir, env !== null && env !== void 0 ? env : {});
26
+ const appExtensions = (_f = (_e = (_d = (_c = (_b = (_a = exp.extra) === null || _a === void 0 ? void 0 : _a.eas) === null || _b === void 0 ? void 0 : _b.build) === null || _c === void 0 ? void 0 : _c.experimental) === null || _d === void 0 ? void 0 : _d.ios) === null || _e === void 0 ? void 0 : _e.appExtensions) !== null && _f !== void 0 ? _f : [];
27
+ const { error } = AppExtensionsConfigSchema.validate(appExtensions, {
28
+ allowUnknown: false,
29
+ abortEarly: false,
30
+ });
31
+ if (error) {
32
+ throw new Error(`Failed to validate "extra.eas.build.experimental.ios.appExtensions" in you app config.\n${error.message}`);
33
+ }
34
+ const extensionsTargets = appExtensions.map(extension => {
35
+ var _a, _b;
36
+ return ({
37
+ targetName: extension.targetName,
38
+ buildConfiguration,
39
+ bundleIdentifier: extension.bundleIdentifier,
40
+ parentBundleIdentifier: (_a = extension.parentBundleIdentifier) !== null && _a !== void 0 ? _a : applicationTargetBundleIdentifier,
41
+ entitlements: (_b = extension.entitlements) !== null && _b !== void 0 ? _b : {},
42
+ });
43
+ });
44
+ return [
45
+ {
46
+ targetName: applicationTargetName,
47
+ bundleIdentifier: applicationTargetBundleIdentifier,
48
+ buildConfiguration,
49
+ entitlements: applicationTargetEntitlements,
50
+ },
51
+ ...extensionsTargets,
52
+ ];
53
+ }
54
+ exports.resolveMangedProjectTargetsAsync = resolveMangedProjectTargetsAsync;
55
+ async function resolveBareProjectTargetsAsync({ exp, projectDir, xcodeBuildContext, }) {
56
+ const { buildScheme, buildConfiguration } = xcodeBuildContext;
16
57
  const result = [];
17
- const applicationTarget = await readApplicationTargetForSchemeAsync(projectDir, buildScheme);
58
+ const applicationTarget = await config_plugins_1.IOSConfig.Target.findApplicationTargetWithDependenciesAsync(projectDir, buildScheme);
18
59
  const bundleIdentifier = await (0, bundleIdentifier_1.getBundleIdentifierAsync)(projectDir, exp, {
19
60
  targetName: applicationTarget.name,
20
61
  buildConfiguration,
21
62
  });
63
+ const entitlements = await (0, entitlements_1.getNativeTargetEntitlementsAsync)(projectDir, {
64
+ targetName: applicationTarget.name,
65
+ buildConfiguration,
66
+ });
22
67
  result.push({
23
68
  targetName: applicationTarget.name,
24
69
  bundleIdentifier,
25
70
  buildConfiguration,
71
+ entitlements: entitlements !== null && entitlements !== void 0 ? entitlements : {},
26
72
  });
27
- const dependencies = await resolveDependenciesAsync({
73
+ const dependencies = await resolveBareProjectDependenciesAsync({
28
74
  exp,
29
75
  projectDir,
30
76
  buildConfiguration,
@@ -34,40 +80,23 @@ async function resolveTargetsAsync({ exp, projectDir }, { buildConfiguration, bu
34
80
  if (dependencies.length > 0) {
35
81
  result.push(...dependencies);
36
82
  }
37
- result.push(...(await resolveManagedAppExtensionsAsync({
38
- exp,
39
- projectDir,
40
- buildConfiguration,
41
- applicationTargetBundleIdentifier: bundleIdentifier,
42
- })));
43
83
  return result;
44
84
  }
45
- exports.resolveTargetsAsync = resolveTargetsAsync;
46
- async function resolveManagedAppExtensionsAsync({ exp, projectDir, buildConfiguration, applicationTargetBundleIdentifier, }) {
47
- var _a, _b, _c, _d, _e;
48
- const workflow = await (0, workflow_1.resolveWorkflowAsync)(projectDir, eas_build_job_1.Platform.IOS);
49
- const managedAppExtensions = (_e = (_d = (_c = (_b = (_a = exp.extra) === null || _a === void 0 ? void 0 : _a.eas) === null || _b === void 0 ? void 0 : _b.build) === null || _c === void 0 ? void 0 : _c.experimental) === null || _d === void 0 ? void 0 : _d.ios) === null || _e === void 0 ? void 0 : _e.appExtensions;
50
- if (workflow === eas_build_job_1.Workflow.GENERIC || !managedAppExtensions) {
51
- return [];
85
+ exports.resolveBareProjectTargetsAsync = resolveBareProjectTargetsAsync;
86
+ async function resolveTargetsAsync(opts) {
87
+ const workflow = await (0, workflow_1.resolveWorkflowAsync)(opts.projectDir, eas_build_job_1.Platform.IOS);
88
+ if (workflow === eas_build_job_1.Workflow.GENERIC) {
89
+ return await resolveBareProjectTargetsAsync(opts);
52
90
  }
53
- const { error } = AppExtensionsConfigSchema.validate(managedAppExtensions, {
54
- allowUnknown: false,
55
- abortEarly: false,
56
- });
57
- if (error) {
58
- throw new Error(`Failed to validate "extra.eas.build.experimental.ios.appExtensions" in you app config\n${error.message}`);
91
+ else if (workflow === eas_build_job_1.Workflow.MANAGED) {
92
+ return await resolveMangedProjectTargetsAsync(opts);
93
+ }
94
+ else {
95
+ throw new Error(`Unknown workflow: ${workflow}`);
59
96
  }
60
- return managedAppExtensions.map(extension => {
61
- var _a;
62
- return ({
63
- targetName: extension.targetName,
64
- buildConfiguration,
65
- bundleIdentifier: extension.bundleIdentifier,
66
- parentBundleIdentifier: (_a = extension.parentBundleIdentifier) !== null && _a !== void 0 ? _a : applicationTargetBundleIdentifier,
67
- });
68
- });
69
97
  }
70
- async function resolveDependenciesAsync({ exp, projectDir, buildConfiguration, target, bundleIdentifier, }) {
98
+ exports.resolveTargetsAsync = resolveTargetsAsync;
99
+ async function resolveBareProjectDependenciesAsync({ exp, projectDir, buildConfiguration, target, bundleIdentifier, }) {
71
100
  const result = [];
72
101
  if (target.dependencies && target.dependencies.length > 0) {
73
102
  for (const dependency of target.dependencies) {
@@ -75,13 +104,18 @@ async function resolveDependenciesAsync({ exp, projectDir, buildConfiguration, t
75
104
  targetName: dependency.name,
76
105
  buildConfiguration,
77
106
  });
107
+ const entitlements = await (0, entitlements_1.getNativeTargetEntitlementsAsync)(projectDir, {
108
+ targetName: target.name,
109
+ buildConfiguration,
110
+ });
78
111
  result.push({
79
112
  targetName: dependency.name,
80
113
  buildConfiguration,
81
114
  bundleIdentifier: dependencyBundleIdentifier,
82
115
  parentBundleIdentifier: bundleIdentifier,
116
+ entitlements: entitlements !== null && entitlements !== void 0 ? entitlements : {},
83
117
  });
84
- const dependencyDependencies = await resolveDependenciesAsync({
118
+ const dependencyDependencies = await resolveBareProjectDependenciesAsync({
85
119
  exp,
86
120
  projectDir,
87
121
  buildConfiguration,
@@ -95,19 +129,6 @@ async function resolveDependenciesAsync({ exp, projectDir, buildConfiguration, t
95
129
  }
96
130
  return result;
97
131
  }
98
- async function readApplicationTargetForSchemeAsync(projectDir, scheme) {
99
- const workflow = await (0, workflow_1.resolveWorkflowAsync)(projectDir, eas_build_job_1.Platform.IOS);
100
- if (workflow === eas_build_job_1.Workflow.GENERIC) {
101
- return await config_plugins_1.IOSConfig.Target.findApplicationTargetWithDependenciesAsync(projectDir, scheme);
102
- }
103
- else {
104
- return {
105
- name: scheme,
106
- type: config_plugins_1.IOSConfig.Target.TargetType.APPLICATION,
107
- dependencies: [],
108
- };
109
- }
110
- }
111
132
  function findApplicationTarget(targets) {
112
133
  const applicationTarget = targets.find(({ parentBundleIdentifier }) => !parentBundleIdentifier);
113
134
  if (!applicationTarget) {
@@ -11,6 +11,7 @@ const path_1 = 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 = tslib_1.__importDefault(require("../log"));
14
15
  const uploads_1 = require("../uploads");
15
16
  const expoCli_1 = require("../utils/expoCli");
16
17
  const uniqBy_1 = tslib_1.__importDefault(require("../utils/expodash/uniqBy"));
@@ -106,7 +107,7 @@ async function buildBundlesAsync({ projectDir, inputDir, }) {
106
107
  if (!packageJSON) {
107
108
  throw new Error('Could not locate package.json');
108
109
  }
109
- await (0, expoCli_1.expoCommandAsync)(projectDir, ['export', '--output-dir', inputDir, '--experimental-bundle'], { silent: true });
110
+ await (0, expoCli_1.expoCommandAsync)(projectDir, ['export', '--output-dir', inputDir, '--experimental-bundle'], { silent: !log_1.default.isDebug });
110
111
  }
111
112
  exports.buildBundlesAsync = buildBundlesAsync;
112
113
  async function resolveInputDirectoryAsync(customInputDirectory) {
@@ -374,7 +374,7 @@ function validateUrl(url) {
374
374
  : false
375
375
  : true;
376
376
  }
377
- catch (err) {
377
+ catch {
378
378
  return false;
379
379
  }
380
380
  }
@@ -98,7 +98,7 @@ async function handlePromptSourceAsync(_source) {
98
98
  }
99
99
  async function askForServiceAccountPathAsync() {
100
100
  log_1.default.log(`${chalk_1.default.bold('A Google Service Account JSON key is required to upload your app to Google Play Store')}.\n` +
101
- `If you're not sure what this is or how to create one, ${(0, log_1.learnMore)('https://expo.fyi/creating-google-service-account')}`);
101
+ `If you're not sure what this is or how to create one, ${(0, log_1.learnMore)('https://expo.fyi/creating-google-service-account', { learnMoreMessage: 'learn more' })}`);
102
102
  const { filePath } = await (0, prompts_1.promptAsync)({
103
103
  name: 'filePath',
104
104
  message: 'Path to Google Service Account file:',
@@ -20,10 +20,11 @@ var SubmissionErrorCode;
20
20
  SubmissionErrorCode["IOS_INCORRECT_CREDENTIALS"] = "SUBMISSION_SERVICE_IOS_INVALID_CREDENTIALS";
21
21
  SubmissionErrorCode["IOS_IPAD_INVALID_ORIENTATION"] = "SUBMISSION_SERVICE_IOS_IPAD_INVALID_ORIENTATION";
22
22
  SubmissionErrorCode["IOS_APPLE_MAINTENANCE"] = "SUBMISSION_SERVICE_IOS_APPLE_MAINTENANCE";
23
+ SubmissionErrorCode["IOS_INVALID_PROVISIONING_PROFILE_SIGNATURE"] = "SUBMISSION_SERVICE_IOS_INVALID_PROVISIONING_PROFILE_SIGNATURE";
23
24
  })(SubmissionErrorCode || (SubmissionErrorCode = {}));
24
25
  const SubmissionErrorMessages = {
25
26
  [SubmissionErrorCode.ARCHIVE_DOWNLOAD_NOT_FOUND_ERROR]: "Failed to download the archive file (Response code: 404 Not Found). Please make sure the URL you've provided is correct.",
26
- [SubmissionErrorCode.ARCHIVE_DOWNLOAD_FORBIDDEN_ERROR]: 'Failed to download the archive file (Response code: 403 Forbidden). This is most probably caused by trying to upload an expired build artifact. All Expo build artifacts expire after 30 days.',
27
+ [SubmissionErrorCode.ARCHIVE_DOWNLOAD_FORBIDDEN_ERROR]: 'Failed to download the archive file (Response code: 403 Forbidden). This is most probably caused by trying to upload an expired build artifact. All EAS build artifacts expire after 30 days.',
27
28
  [SubmissionErrorCode.ARCHIVE_EXTRACT_CORRUPT_ARCHIVE_ERROR]: 'The compressed archive is corrupt, in an unsupported format, or contains an invalid application format. Supported files include .apk, .aab, and .ipa files and one of these files compressed into a .tar.gz archive.',
28
29
  [SubmissionErrorCode.ARCHIVE_EXTRACT_NO_FILES_FOUND_ERROR]: "EAS Submit couldn't find a valid build artifact within provided compressed archive.\n" +
29
30
  'If you provide a tar.gz archive, it should contain at least one .apk/.aab/.ipa file, depending on the submission platform.',
@@ -32,7 +33,7 @@ const SubmissionErrorMessages = {
32
33
  `${(0, log_1.learnMore)('https://expo.fyi/first-android-submission')}.`,
33
34
  [SubmissionErrorCode.ANDROID_OLD_VERSION_CODE_ERROR]: "You've already submitted this version of the app.\n" +
34
35
  'Versions are identified by Android version code (expo.android.versionCode in app.json).\n' +
35
- "If you're submitting a managed Expo project, increment the version code in app.json and build the project with expo build:android.\n" +
36
+ "If you're submitting a managed Expo project, increment the version code in app.json and build the project with eas build.\n" +
36
37
  `${(0, log_1.learnMore)('https://expo.fyi/bumping-android-version-code')}.`,
37
38
  [SubmissionErrorCode.ANDROID_MISSING_PRIVACY_POLICY]: 'The app has permissions that require a privacy policy set for the app.\n' +
38
39
  `${(0, log_1.learnMore)('https://expo.fyi/missing-privacy-policy')}.`,
@@ -52,6 +53,9 @@ const SubmissionErrorMessages = {
52
53
  "If you're submitting a managed Expo project, set the `expo.ios.requireFullScreen` to true in app.json and build the project again.\n" +
53
54
  `${(0, log_1.learnMore)('https://expo.fyi/ipad-requires-fullscreen')}`,
54
55
  [SubmissionErrorCode.IOS_APPLE_MAINTENANCE]: 'It looks like Apple servers are undergoing an unscheduled maintenance. Please try again later.',
56
+ [SubmissionErrorCode.IOS_INVALID_PROVISIONING_PROFILE_SIGNATURE]: 'Invalid Provisioning Profile Signature (ITMS-90165)\n' +
57
+ "Some of Apple's certificates have expired.\n" +
58
+ 'Please delete your Provisioning Profile from your account. Then rebuild the app interactively to generate a new one, and try submitting it to the App Store again.',
55
59
  };
56
60
  function printSubmissionError(error) {
57
61
  if (error.errorCode &&
@@ -11,7 +11,7 @@ async function isExistingFileAsync(filePath) {
11
11
  const stats = await fs_extra_1.default.stat(filePath);
12
12
  return stats.isFile();
13
13
  }
14
- catch (e) {
14
+ catch {
15
15
  return false;
16
16
  }
17
17
  }
@@ -50,7 +50,7 @@ function parseLogs(logs) {
50
50
  try {
51
51
  parsedLine = JSON.parse(line);
52
52
  }
53
- catch (error) {
53
+ catch {
54
54
  continue;
55
55
  }
56
56
  let level;
@@ -20,7 +20,7 @@ async function readReleaseChannelSafelyAsync(projectDir) {
20
20
  const androidManifest = await getAndroidManifestAsync(projectDir);
21
21
  return config_plugins_1.AndroidConfig.Manifest.getMainApplicationMetaDataValue(androidManifest, config_plugins_1.AndroidConfig.Updates.Config.RELEASE_CHANNEL);
22
22
  }
23
- catch (err) {
23
+ catch {
24
24
  return null;
25
25
  }
26
26
  }
@@ -35,7 +35,7 @@ async function readChannelSafelyAsync(projectDir) {
35
35
  }
36
36
  return (_a = JSON.parse(stringifiedRequestHeaders)['expo-channel-name']) !== null && _a !== void 0 ? _a : null;
37
37
  }
38
- catch (err) {
38
+ catch {
39
39
  return null;
40
40
  }
41
41
  }
@@ -32,7 +32,7 @@ async function readReleaseChannelSafelyAsync(projectDir) {
32
32
  const expoPlist = await readExpoPlistAsync(projectDir);
33
33
  return (_a = expoPlist[config_plugins_1.IOSConfig.Updates.Config.RELEASE_CHANNEL]) !== null && _a !== void 0 ? _a : null;
34
34
  }
35
- catch (err) {
35
+ catch {
36
36
  return null;
37
37
  }
38
38
  }
@@ -44,7 +44,7 @@ async function readChannelSafelyAsync(projectDir) {
44
44
  const updatesRequestHeaders = expoPlist['EXUpdatesRequestHeaders'];
45
45
  return (_a = updatesRequestHeaders['expo-channel-name']) !== null && _a !== void 0 ? _a : null;
46
46
  }
47
- catch (err) {
47
+ catch {
48
48
  return null;
49
49
  }
50
50
  }
@@ -51,7 +51,7 @@ async function ensureLoggedInAsync({ nonInteractive = false } = {}) {
51
51
  try {
52
52
  user = await (0, User_1.getUserAsync)();
53
53
  }
54
- catch (_) { }
54
+ catch { }
55
55
  if (!user) {
56
56
  log_1.default.warn('An Expo user account is required to proceed.');
57
57
  await showLoginPromptAsync({ nonInteractive, printNewLine: true });