eas-cli 0.35.0 → 0.36.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 (54) hide show
  1. package/README.md +26 -26
  2. package/build/analytics/common.d.ts +8 -0
  3. package/build/analytics/common.js +19 -0
  4. package/build/analytics/events.d.ts +43 -0
  5. package/build/analytics/events.js +51 -0
  6. package/build/{analytics.d.ts → analytics/rudderstackClient.d.ts} +0 -0
  7. package/build/{analytics.js → analytics/rudderstackClient.js} +2 -2
  8. package/build/build/build.js +18 -27
  9. package/build/build/context.d.ts +1 -1
  10. package/build/build/context.js +2 -2
  11. package/build/build/ios/credentials.js +3 -3
  12. package/build/build/local.js +18 -27
  13. package/build/build/types.d.ts +0 -1
  14. package/build/commandUtils/EasCommand.js +4 -4
  15. package/build/commands/build/index.js +1 -1
  16. package/build/credentials/android/actions/RemoveFcm.js +4 -4
  17. package/build/credentials/android/utils/keystore.js +67 -32
  18. package/build/credentials/ios/actions/AscApiKeyUtils.js +8 -7
  19. package/build/credentials/ios/actions/AssignAscApiKey.js +1 -1
  20. package/build/credentials/ios/actions/CreateAscApiKey.js +2 -2
  21. package/build/credentials/ios/actions/RemoveAscApiKey.js +6 -6
  22. package/build/credentials/ios/actions/SetUpAscApiKey.js +8 -8
  23. package/build/credentials/ios/actions/SetUpSubmissionCredentials.js +3 -3
  24. package/build/credentials/ios/appstore/ascApiKey.js +12 -12
  25. package/build/credentials/ios/appstore/entitlements.d.ts +2 -2
  26. package/build/credentials/ios/appstore/entitlements.js +20 -10
  27. package/build/credentials/ios/credentials.js +2 -2
  28. package/build/credentials/ios/utils/printCredentials.js +1 -1
  29. package/build/credentials/manager/AndroidActions.js +3 -3
  30. package/build/credentials/manager/IosActions.js +5 -5
  31. package/build/credentials/manager/ManageIos.js +4 -4
  32. package/build/graphql/generated.d.ts +144 -53
  33. package/build/graphql/mutations/KeystoreGenerationUrlMutation.d.ts +3 -0
  34. package/build/graphql/mutations/KeystoreGenerationUrlMutation.js +23 -0
  35. package/build/submit/BaseSubmitter.d.ts +20 -4
  36. package/build/submit/BaseSubmitter.js +34 -1
  37. package/build/submit/android/AndroidSubmitter.d.ts +12 -6
  38. package/build/submit/android/AndroidSubmitter.js +31 -20
  39. package/build/submit/context.d.ts +2 -0
  40. package/build/submit/context.js +14 -0
  41. package/build/submit/ios/AppSpecificPasswordSource.d.ts +8 -1
  42. package/build/submit/ios/AppSpecificPasswordSource.js +44 -4
  43. package/build/submit/ios/CredentialsServiceSource.d.ts +3 -2
  44. package/build/submit/ios/CredentialsServiceSource.js +9 -3
  45. package/build/submit/ios/IosSubmitCommand.d.ts +1 -2
  46. package/build/submit/ios/IosSubmitCommand.js +2 -39
  47. package/build/submit/ios/IosSubmitter.d.ts +17 -7
  48. package/build/submit/ios/IosSubmitter.js +55 -29
  49. package/build/submit/submit.js +13 -4
  50. package/build/user/User.js +1 -1
  51. package/oclif.manifest.json +1 -1
  52. package/package.json +3 -3
  53. package/build/build/utils/analytics.d.ts +0 -22
  54. package/build/build/utils/analytics.js +0 -28
@@ -175,7 +175,7 @@ class ManageIos {
175
175
  }
176
176
  }
177
177
  async runProjectSpecificActionAsync(ctx, app, targets, buildProfile, action) {
178
- var _a;
178
+ var _a, _b;
179
179
  if (action === Actions_1.IosActionType.SetUpBuildCredentials) {
180
180
  await new SetUpBuildCredentials_1.SetUpBuildCredentials({
181
181
  app,
@@ -183,7 +183,7 @@ class ManageIos {
183
183
  distribution: buildProfile.distribution,
184
184
  enterpriseProvisioning: buildProfile.enterpriseProvisioning,
185
185
  iosCapabilitiesOptions: {
186
- entitlements: await (0, entitlements_1.getManagedEntitlementsJsonAsync)(ctx.projectDir),
186
+ entitlements: await (0, entitlements_1.getManagedEntitlementsJsonAsync)(ctx.projectDir, (_a = buildProfile.env) !== null && _a !== void 0 ? _a : {}),
187
187
  },
188
188
  }).runAsync(ctx);
189
189
  return;
@@ -220,7 +220,7 @@ class ManageIos {
220
220
  }
221
221
  case Actions_1.IosActionType.RemoveProvisioningProfile: {
222
222
  const iosAppCredentials = await ctx.ios.getIosAppCredentialsWithCommonFieldsAsync(appLookupParams);
223
- const provisioningProfile = (_a = iosAppCredentials === null || iosAppCredentials === void 0 ? void 0 : iosAppCredentials.iosAppBuildCredentialsList.find(buildCredentials => buildCredentials.iosDistributionType === distributionType)) === null || _a === void 0 ? void 0 : _a.provisioningProfile;
223
+ const provisioningProfile = (_b = iosAppCredentials === null || iosAppCredentials === void 0 ? void 0 : iosAppCredentials.iosAppBuildCredentialsList.find(buildCredentials => buildCredentials.iosDistributionType === distributionType)) === null || _b === void 0 ? void 0 : _b.provisioningProfile;
224
224
  if (!provisioningProfile) {
225
225
  log_1.default.log(`No provisioning profile associated with the ${distributionType} configuration of ${appLookupParams.projectName}`);
226
226
  return;
@@ -277,7 +277,7 @@ class ManageIos {
277
277
  case Actions_1.IosActionType.CreateAscApiKeyForSubmissions: {
278
278
  const ascApiKey = await new CreateAscApiKey_1.CreateAscApiKey(appLookupParams.account).runAsync(ctx, AscApiKeyUtils_1.AppStoreApiKeyPurpose.SUBMISSION_SERVICE);
279
279
  const confirm = await (0, prompts_1.confirmAsync)({
280
- message: `Do you want ${appLookupParams.projectName} to use the new Api Key?`,
280
+ message: `Do you want ${appLookupParams.projectName} to use the new API Key?`,
281
281
  });
282
282
  if (confirm) {
283
283
  await new AssignAscApiKey_1.AssignAscApiKey(appLookupParams).runAsync(ctx, ascApiKey, AscApiKeyUtils_1.AppStoreApiKeyPurpose.SUBMISSION_SERVICE);
@@ -43,7 +43,7 @@ export declare type RootQuery = {
43
43
  appleDeviceRegistrationRequest: AppleDeviceRegistrationRequestQuery;
44
44
  /** Top-level query object for querying Apple Teams. */
45
45
  appleTeam: AppleTeamQuery;
46
- app?: Maybe<AppQuery>;
46
+ app: AppQuery;
47
47
  /**
48
48
  * Look up app by app id
49
49
  * @deprecated Use 'byId' field under 'app'.
@@ -62,6 +62,8 @@ export declare type RootQuery = {
62
62
  clientBuilds: ClientBuildQuery;
63
63
  /** Top-level query object for querying Experimentation configuration. */
64
64
  experimentation: ExperimentationQuery;
65
+ /** Top-level query object for querying Stripe Invoices. */
66
+ invoice: InvoiceQuery;
65
67
  project: ProjectQuery;
66
68
  snack: SnackQuery;
67
69
  submissions: SubmissionQuery;
@@ -384,19 +386,31 @@ export declare type App = Project & {
384
386
  fullName: Scalars['String'];
385
387
  description: Scalars['String'];
386
388
  slug: Scalars['String'];
387
- updated: Scalars['DateTime'];
388
- published: Scalars['Boolean'];
389
389
  ownerAccount: Account;
390
+ privacySetting: AppPrivacy;
391
+ pushSecurityEnabled: Scalars['Boolean'];
392
+ /** Whether there have been any classic update publishes */
393
+ published: Scalars['Boolean'];
394
+ /** Time of last classic update publish */
395
+ updated: Scalars['DateTime'];
396
+ /** ID of latest classic update release */
397
+ latestReleaseId: Scalars['ID'];
398
+ /** Whether the latest classic update publish is using a deprecated SDK version */
399
+ isDeprecated: Scalars['Boolean'];
400
+ /** SDK version of the latest classic update publish, 0.0.0 otherwise */
401
+ sdkVersion: Scalars['String'];
402
+ /** Classic update release channel names (to be removed) */
403
+ releaseChannels: Array<Scalars['String']>;
404
+ /** Classic update release channel names that have at least one build */
405
+ buildsReleaseChannels: Array<Scalars['String']>;
406
+ /** githubUrl field from most recent classic update manifest */
390
407
  githubUrl?: Maybe<Scalars['String']>;
408
+ /** android.playStoreUrl field from most recent classic update manifest */
391
409
  playStoreUrl?: Maybe<Scalars['String']>;
410
+ /** ios.appStoreUrl field from most recent classic update manifest */
392
411
  appStoreUrl?: Maybe<Scalars['String']>;
412
+ /** Info about the icon specified in the most recent classic update manifest */
393
413
  icon?: Maybe<AppIcon>;
394
- sdkVersion: Scalars['String'];
395
- isDeprecated: Scalars['Boolean'];
396
- privacySetting: AppPrivacy;
397
- latestReleaseId: Scalars['ID'];
398
- pushSecurityEnabled: Scalars['Boolean'];
399
- releaseChannels: Array<Scalars['String']>;
400
414
  /** (EAS Build) Builds associated with this app */
401
415
  builds: Array<Build>;
402
416
  buildJobs: Array<BuildJob>;
@@ -553,6 +567,11 @@ export declare type AppLatestReleaseForReleaseChannelArgs = {
553
567
  platform: AppPlatform;
554
568
  releaseChannel: Scalars['String'];
555
569
  };
570
+ export declare enum AppPrivacy {
571
+ Public = "PUBLIC",
572
+ Unlisted = "UNLISTED",
573
+ Hidden = "HIDDEN"
574
+ }
556
575
  export declare type AppIcon = {
557
576
  __typename?: 'AppIcon';
558
577
  url: Scalars['String'];
@@ -561,11 +580,6 @@ export declare type AppIcon = {
561
580
  /** Nullable color palette of the app icon. If null, color palette couldn't be retrieved from external service (imgix) */
562
581
  colorPalette?: Maybe<Scalars['JSON']>;
563
582
  };
564
- export declare enum AppPrivacy {
565
- Public = "PUBLIC",
566
- Unlisted = "UNLISTED",
567
- Hidden = "HIDDEN"
568
- }
569
583
  export declare type BuildFilter = {
570
584
  platform?: Maybe<AppPlatform>;
571
585
  status?: Maybe<BuildStatus>;
@@ -830,7 +844,8 @@ export declare enum SubmissionStatus {
830
844
  }
831
845
  export declare type AndroidSubmissionConfig = {
832
846
  __typename?: 'AndroidSubmissionConfig';
833
- applicationIdentifier: Scalars['String'];
847
+ /** @deprecated applicationIdentifier is deprecated and will be auto-detected on submit */
848
+ applicationIdentifier?: Maybe<Scalars['String']>;
834
849
  /** @deprecated archiveType is deprecated and will be null */
835
850
  archiveType?: Maybe<SubmissionAndroidArchiveType>;
836
851
  track: SubmissionAndroidTrack;
@@ -855,7 +870,7 @@ export declare enum SubmissionAndroidReleaseStatus {
855
870
  export declare type IosSubmissionConfig = {
856
871
  __typename?: 'IosSubmissionConfig';
857
872
  ascAppIdentifier: Scalars['String'];
858
- appleIdUsername: Scalars['String'];
873
+ appleIdUsername?: Maybe<Scalars['String']>;
859
874
  ascApiKeyId?: Maybe<Scalars['String']>;
860
875
  };
861
876
  export declare type SubmissionError = {
@@ -1286,6 +1301,7 @@ export declare type SubscriptionDetails = {
1286
1301
  endedAt?: Maybe<Scalars['DateTime']>;
1287
1302
  trialEnd?: Maybe<Scalars['DateTime']>;
1288
1303
  status?: Maybe<Scalars['String']>;
1304
+ isDowngrading?: Maybe<Scalars['Boolean']>;
1289
1305
  };
1290
1306
  export declare type AddonDetails = {
1291
1307
  __typename?: 'AddonDetails';
@@ -1510,6 +1526,45 @@ export declare type ExperimentationQuery = {
1510
1526
  /** Get experimentation unit to use for device experiments. In this case, it is the IP address. */
1511
1527
  deviceExperimentationUnit: Scalars['ID'];
1512
1528
  };
1529
+ export declare type InvoiceQuery = {
1530
+ __typename?: 'InvoiceQuery';
1531
+ /** Preview an upgrade subscription invoice, with proration */
1532
+ previewInvoiceForSubscriptionUpdate: Invoice;
1533
+ };
1534
+ export declare type InvoiceQueryPreviewInvoiceForSubscriptionUpdateArgs = {
1535
+ accountId: Scalars['String'];
1536
+ newPlanIdentifier: Scalars['String'];
1537
+ };
1538
+ export declare type Invoice = {
1539
+ __typename?: 'Invoice';
1540
+ id: Scalars['ID'];
1541
+ /** The total amount due for the invoice, in cents */
1542
+ amountDue: Scalars['Int'];
1543
+ /** The total amount that has been paid, considering any discounts or account credit. Value is in cents. */
1544
+ amountPaid: Scalars['Int'];
1545
+ /** The total amount that needs to be paid, considering any discounts or account credit. Value is in cents. */
1546
+ amountRemaining: Scalars['Int'];
1547
+ lineItems: Array<InvoiceLineItem>;
1548
+ period: InvoicePeriod;
1549
+ startingBalance: Scalars['Int'];
1550
+ subtotal: Scalars['Int'];
1551
+ total: Scalars['Int'];
1552
+ };
1553
+ export declare type InvoiceLineItem = {
1554
+ __typename?: 'InvoiceLineItem';
1555
+ id: Scalars['ID'];
1556
+ description: Scalars['String'];
1557
+ /** Line-item amount in cents */
1558
+ amount: Scalars['Int'];
1559
+ period: InvoicePeriod;
1560
+ proration: Scalars['Boolean'];
1561
+ quantity: Scalars['Int'];
1562
+ };
1563
+ export declare type InvoicePeriod = {
1564
+ __typename?: 'InvoicePeriod';
1565
+ start: Scalars['DateTime'];
1566
+ end: Scalars['DateTime'];
1567
+ };
1513
1568
  export declare type ProjectQuery = {
1514
1569
  __typename?: 'ProjectQuery';
1515
1570
  byAccountNameAndSlug: Project;
@@ -1642,6 +1697,7 @@ export declare type RootMutation = {
1642
1697
  iosAppBuildCredentials: IosAppBuildCredentialsMutation;
1643
1698
  /** Mutations that modify the credentials for an iOS app */
1644
1699
  iosAppCredentials: IosAppCredentialsMutation;
1700
+ keystoreGenerationUrl: KeystoreGenerationUrlMutation;
1645
1701
  /** Mutations that create, update, and delete Robots */
1646
1702
  robot: RobotMutation;
1647
1703
  /** Mutations that modify an EAS Submit submission */
@@ -1717,6 +1773,10 @@ export declare type AccountMutation = {
1717
1773
  subscribeToProduct?: Maybe<Account>;
1718
1774
  /** Cancels the active subscription */
1719
1775
  cancelSubscription?: Maybe<Account>;
1776
+ /** Upgrades or downgrades the active subscription to the newPlanIdentifier, which must be one of the EAS plans (i.e., Production or Enterprise). */
1777
+ changePlan: Account;
1778
+ /** Cancel scheduled subscription change */
1779
+ cancelScheduledSubscriptionChange: Account;
1720
1780
  /** Requests a refund for the specified charge. Returns true if auto-refund was possible, otherwise requests a manual refund from support and returns false. */
1721
1781
  requestRefund?: Maybe<Scalars['Boolean']>;
1722
1782
  /**
@@ -1754,6 +1814,13 @@ export declare type AccountMutationSubscribeToProductArgs = {
1754
1814
  export declare type AccountMutationCancelSubscriptionArgs = {
1755
1815
  accountName: Scalars['ID'];
1756
1816
  };
1817
+ export declare type AccountMutationChangePlanArgs = {
1818
+ accountID: Scalars['ID'];
1819
+ newPlanIdentifier: Scalars['String'];
1820
+ };
1821
+ export declare type AccountMutationCancelScheduledSubscriptionChangeArgs = {
1822
+ accountID: Scalars['ID'];
1823
+ };
1757
1824
  export declare type AccountMutationRequestRefundArgs = {
1758
1825
  accountID: Scalars['ID'];
1759
1826
  chargeIdentifier: Scalars['ID'];
@@ -2369,6 +2436,16 @@ export declare type IosAppCredentialsInput = {
2369
2436
  pushKeyId?: Maybe<Scalars['ID']>;
2370
2437
  appStoreConnectApiKeyForSubmissionsId?: Maybe<Scalars['ID']>;
2371
2438
  };
2439
+ export declare type KeystoreGenerationUrlMutation = {
2440
+ __typename?: 'KeystoreGenerationUrlMutation';
2441
+ /** Create a Keystore Generation URL */
2442
+ createKeystoreGenerationUrl: KeystoreGenerationUrl;
2443
+ };
2444
+ export declare type KeystoreGenerationUrl = {
2445
+ __typename?: 'KeystoreGenerationUrl';
2446
+ id: Scalars['ID'];
2447
+ url: Scalars['String'];
2448
+ };
2372
2449
  export declare type RobotMutation = {
2373
2450
  __typename?: 'RobotMutation';
2374
2451
  /** Create a Robot and grant it Permissions on an Account */
@@ -2478,7 +2555,7 @@ export declare type AndroidSubmissionConfigInput = {
2478
2555
  googleServiceAccountKeyId?: Maybe<Scalars['String']>;
2479
2556
  googleServiceAccountKeyJson?: Maybe<Scalars['String']>;
2480
2557
  archiveUrl?: Maybe<Scalars['String']>;
2481
- applicationIdentifier: Scalars['String'];
2558
+ applicationIdentifier?: Maybe<Scalars['String']>;
2482
2559
  track: SubmissionAndroidTrack;
2483
2560
  releaseStatus?: Maybe<SubmissionAndroidReleaseStatus>;
2484
2561
  changesNotSentForReview?: Maybe<Scalars['Boolean']>;
@@ -2937,7 +3014,7 @@ export declare type GetBranchInfoQueryVariables = Exact<{
2937
3014
  export declare type GetBranchInfoQuery = ({
2938
3015
  __typename?: 'RootQuery';
2939
3016
  } & {
2940
- app?: Maybe<({
3017
+ app: ({
2941
3018
  __typename?: 'AppQuery';
2942
3019
  } & {
2943
3020
  byId: ({
@@ -2947,7 +3024,7 @@ export declare type GetBranchInfoQuery = ({
2947
3024
  __typename?: 'UpdateBranch';
2948
3025
  } & Pick<UpdateBranch, 'id' | 'name'>)>;
2949
3026
  });
2950
- })>;
3027
+ });
2951
3028
  });
2952
3029
  export declare type DeleteUpdateBranchMutationVariables = Exact<{
2953
3030
  branchId: Scalars['ID'];
@@ -2970,7 +3047,7 @@ export declare type BranchesByAppQueryVariables = Exact<{
2970
3047
  export declare type BranchesByAppQuery = ({
2971
3048
  __typename?: 'RootQuery';
2972
3049
  } & {
2973
- app?: Maybe<({
3050
+ app: ({
2974
3051
  __typename?: 'AppQuery';
2975
3052
  } & {
2976
3053
  byId: ({
@@ -2980,7 +3057,7 @@ export declare type BranchesByAppQuery = ({
2980
3057
  __typename?: 'UpdateBranch';
2981
3058
  } & Pick<UpdateBranch, 'id'> & UpdateBranchFragment)>;
2982
3059
  });
2983
- })>;
3060
+ });
2984
3061
  });
2985
3062
  export declare type GetUpdateGroupAsyncQueryVariables = Exact<{
2986
3063
  group: Scalars['ID'];
@@ -3014,7 +3091,7 @@ export declare type ViewBranchQueryVariables = Exact<{
3014
3091
  export declare type ViewBranchQuery = ({
3015
3092
  __typename?: 'RootQuery';
3016
3093
  } & {
3017
- app?: Maybe<({
3094
+ app: ({
3018
3095
  __typename?: 'AppQuery';
3019
3096
  } & {
3020
3097
  byId: ({
@@ -3034,7 +3111,7 @@ export declare type ViewBranchQuery = ({
3034
3111
  })>;
3035
3112
  })>;
3036
3113
  });
3037
- })>;
3114
+ });
3038
3115
  });
3039
3116
  export declare type CancelBuildMutationVariables = Exact<{
3040
3117
  buildId: Scalars['ID'];
@@ -3073,7 +3150,7 @@ export declare type GetChannelByNameToEditQueryVariables = Exact<{
3073
3150
  export declare type GetChannelByNameToEditQuery = ({
3074
3151
  __typename?: 'RootQuery';
3075
3152
  } & {
3076
- app?: Maybe<({
3153
+ app: ({
3077
3154
  __typename?: 'AppQuery';
3078
3155
  } & {
3079
3156
  byId: ({
@@ -3087,7 +3164,7 @@ export declare type GetChannelByNameToEditQuery = ({
3087
3164
  } & Pick<UpdateBranch, 'id' | 'name'>)>;
3088
3165
  })>;
3089
3166
  });
3090
- })>;
3167
+ });
3091
3168
  });
3092
3169
  export declare type UpdateChannelBranchMappingMutationVariables = Exact<{
3093
3170
  channelId: Scalars['ID'];
@@ -3112,7 +3189,7 @@ export declare type GetAllChannelsForAppQueryVariables = Exact<{
3112
3189
  export declare type GetAllChannelsForAppQuery = ({
3113
3190
  __typename?: 'RootQuery';
3114
3191
  } & {
3115
- app?: Maybe<({
3192
+ app: ({
3116
3193
  __typename?: 'AppQuery';
3117
3194
  } & {
3118
3195
  byId: ({
@@ -3136,7 +3213,7 @@ export declare type GetAllChannelsForAppQuery = ({
3136
3213
  })>;
3137
3214
  })>;
3138
3215
  });
3139
- })>;
3216
+ });
3140
3217
  });
3141
3218
  export declare type GetChannelByNameForAppQueryVariables = Exact<{
3142
3219
  appId: Scalars['String'];
@@ -3145,7 +3222,7 @@ export declare type GetChannelByNameForAppQueryVariables = Exact<{
3145
3222
  export declare type GetChannelByNameForAppQuery = ({
3146
3223
  __typename?: 'RootQuery';
3147
3224
  } & {
3148
- app?: Maybe<({
3225
+ app: ({
3149
3226
  __typename?: 'AppQuery';
3150
3227
  } & {
3151
3228
  byId: ({
@@ -3169,7 +3246,7 @@ export declare type GetChannelByNameForAppQuery = ({
3169
3246
  })>;
3170
3247
  })>;
3171
3248
  });
3172
- })>;
3249
+ });
3173
3250
  });
3174
3251
  export declare type AppInfoQueryVariables = Exact<{
3175
3252
  appId: Scalars['String'];
@@ -3177,13 +3254,13 @@ export declare type AppInfoQueryVariables = Exact<{
3177
3254
  export declare type AppInfoQuery = ({
3178
3255
  __typename?: 'RootQuery';
3179
3256
  } & {
3180
- app?: Maybe<({
3257
+ app: ({
3181
3258
  __typename?: 'AppQuery';
3182
3259
  } & {
3183
3260
  byId: ({
3184
3261
  __typename?: 'App';
3185
3262
  } & Pick<App, 'id' | 'fullName'>);
3186
- })>;
3263
+ });
3187
3264
  });
3188
3265
  export declare type DeleteUpdateGroupMutationVariables = Exact<{
3189
3266
  group: Scalars['ID'];
@@ -3386,7 +3463,7 @@ export declare type CommonAndroidAppCredentialsWithBuildCredentialsByApplication
3386
3463
  export declare type CommonAndroidAppCredentialsWithBuildCredentialsByApplicationIdentifierQuery = ({
3387
3464
  __typename?: 'RootQuery';
3388
3465
  } & {
3389
- app?: Maybe<({
3466
+ app: ({
3390
3467
  __typename?: 'AppQuery';
3391
3468
  } & {
3392
3469
  byFullName: ({
@@ -3396,7 +3473,7 @@ export declare type CommonAndroidAppCredentialsWithBuildCredentialsByApplication
3396
3473
  __typename?: 'AndroidAppCredentials';
3397
3474
  } & Pick<AndroidAppCredentials, 'id'> & CommonAndroidAppCredentialsFragment)>;
3398
3475
  });
3399
- })>;
3476
+ });
3400
3477
  });
3401
3478
  export declare type GoogleServiceAccountKeyByAccountQueryVariables = Exact<{
3402
3479
  accountName: Scalars['String'];
@@ -3721,13 +3798,13 @@ export declare type AppByFullNameQueryVariables = Exact<{
3721
3798
  export declare type AppByFullNameQuery = ({
3722
3799
  __typename?: 'RootQuery';
3723
3800
  } & {
3724
- app?: Maybe<({
3801
+ app: ({
3725
3802
  __typename?: 'AppQuery';
3726
3803
  } & {
3727
3804
  byFullName: ({
3728
3805
  __typename?: 'App';
3729
3806
  } & Pick<App, 'id'> & AppFragment);
3730
- })>;
3807
+ });
3731
3808
  });
3732
3809
  export declare type AppStoreConnectApiKeyByAccountQueryVariables = Exact<{
3733
3810
  accountName: Scalars['String'];
@@ -3843,7 +3920,7 @@ export declare type AppleDistributionCertificateByAppQueryVariables = Exact<{
3843
3920
  export declare type AppleDistributionCertificateByAppQuery = ({
3844
3921
  __typename?: 'RootQuery';
3845
3922
  } & {
3846
- app?: Maybe<({
3923
+ app: ({
3847
3924
  __typename?: 'AppQuery';
3848
3925
  } & {
3849
3926
  byFullName: ({
@@ -3865,7 +3942,7 @@ export declare type AppleDistributionCertificateByAppQuery = ({
3865
3942
  })>;
3866
3943
  })>;
3867
3944
  });
3868
- })>;
3945
+ });
3869
3946
  });
3870
3947
  export declare type AppleDistributionCertificateByAccountQueryVariables = Exact<{
3871
3948
  accountName: Scalars['String'];
@@ -3893,7 +3970,7 @@ export declare type AppleProvisioningProfilesByAppQueryVariables = Exact<{
3893
3970
  export declare type AppleProvisioningProfilesByAppQuery = ({
3894
3971
  __typename?: 'RootQuery';
3895
3972
  } & {
3896
- app?: Maybe<({
3973
+ app: ({
3897
3974
  __typename?: 'AppQuery';
3898
3975
  } & {
3899
3976
  byFullName: ({
@@ -3921,7 +3998,7 @@ export declare type AppleProvisioningProfilesByAppQuery = ({
3921
3998
  })>;
3922
3999
  })>;
3923
4000
  });
3924
- })>;
4001
+ });
3925
4002
  });
3926
4003
  export declare type ApplePushKeyByAccountQueryVariables = Exact<{
3927
4004
  accountName: Scalars['String'];
@@ -3982,7 +4059,7 @@ export declare type IosAppBuildCredentialsByAppleAppIdentiferAndDistributionQuer
3982
4059
  export declare type IosAppBuildCredentialsByAppleAppIdentiferAndDistributionQuery = ({
3983
4060
  __typename?: 'RootQuery';
3984
4061
  } & {
3985
- app?: Maybe<({
4062
+ app: ({
3986
4063
  __typename?: 'AppQuery';
3987
4064
  } & {
3988
4065
  byFullName: ({
@@ -3996,7 +4073,7 @@ export declare type IosAppBuildCredentialsByAppleAppIdentiferAndDistributionQuer
3996
4073
  } & Pick<IosAppBuildCredentials, 'id'> & IosAppBuildCredentialsFragment)>;
3997
4074
  })>;
3998
4075
  });
3999
- })>;
4076
+ });
4000
4077
  });
4001
4078
  export declare type IosAppCredentialsWithBuildCredentialsByAppIdentifierIdQueryVariables = Exact<{
4002
4079
  projectFullName: Scalars['String'];
@@ -4006,7 +4083,7 @@ export declare type IosAppCredentialsWithBuildCredentialsByAppIdentifierIdQueryV
4006
4083
  export declare type IosAppCredentialsWithBuildCredentialsByAppIdentifierIdQuery = ({
4007
4084
  __typename?: 'RootQuery';
4008
4085
  } & {
4009
- app?: Maybe<({
4086
+ app: ({
4010
4087
  __typename?: 'AppQuery';
4011
4088
  } & {
4012
4089
  byFullName: ({
@@ -4020,7 +4097,7 @@ export declare type IosAppCredentialsWithBuildCredentialsByAppIdentifierIdQuery
4020
4097
  } & Pick<IosAppBuildCredentials, 'id'> & IosAppBuildCredentialsFragment)>;
4021
4098
  } & CommonIosAppCredentialsWithoutBuildCredentialsFragment)>;
4022
4099
  });
4023
- })>;
4100
+ });
4024
4101
  });
4025
4102
  export declare type CommonIosAppCredentialsWithBuildCredentialsByAppIdentifierIdQueryVariables = Exact<{
4026
4103
  projectFullName: Scalars['String'];
@@ -4029,7 +4106,7 @@ export declare type CommonIosAppCredentialsWithBuildCredentialsByAppIdentifierId
4029
4106
  export declare type CommonIosAppCredentialsWithBuildCredentialsByAppIdentifierIdQuery = ({
4030
4107
  __typename?: 'RootQuery';
4031
4108
  } & {
4032
- app?: Maybe<({
4109
+ app: ({
4033
4110
  __typename?: 'AppQuery';
4034
4111
  } & {
4035
4112
  byFullName: ({
@@ -4039,7 +4116,7 @@ export declare type CommonIosAppCredentialsWithBuildCredentialsByAppIdentifierId
4039
4116
  __typename?: 'IosAppCredentials';
4040
4117
  } & Pick<IosAppCredentials, 'id'> & CommonIosAppCredentialsFragment)>;
4041
4118
  });
4042
- })>;
4119
+ });
4043
4120
  });
4044
4121
  export declare type CreateAppMutationVariables = Exact<{
4045
4122
  appInput: AppInput;
@@ -4145,6 +4222,20 @@ export declare type DeleteEnvironmentSecretMutation = ({
4145
4222
  } & Pick<DeleteEnvironmentSecretResult, 'id'>);
4146
4223
  });
4147
4224
  });
4225
+ export declare type CreateKeystoreGenerationUrlMutationVariables = Exact<{
4226
+ [key: string]: never;
4227
+ }>;
4228
+ export declare type CreateKeystoreGenerationUrlMutation = ({
4229
+ __typename?: 'RootMutation';
4230
+ } & {
4231
+ keystoreGenerationUrl: ({
4232
+ __typename?: 'KeystoreGenerationUrlMutation';
4233
+ } & {
4234
+ createKeystoreGenerationUrl: ({
4235
+ __typename?: 'KeystoreGenerationUrl';
4236
+ } & Pick<KeystoreGenerationUrl, 'id' | 'url'>);
4237
+ });
4238
+ });
4148
4239
  export declare type GetSignedUploadMutationVariables = Exact<{
4149
4240
  contentTypes: Array<Scalars['String']>;
4150
4241
  }>;
@@ -4290,7 +4381,7 @@ export declare type GetAllBuildsForAppQueryVariables = Exact<{
4290
4381
  export declare type GetAllBuildsForAppQuery = ({
4291
4382
  __typename?: 'RootQuery';
4292
4383
  } & {
4293
- app?: Maybe<({
4384
+ app: ({
4294
4385
  __typename?: 'AppQuery';
4295
4386
  } & {
4296
4387
  byId: ({
@@ -4300,7 +4391,7 @@ export declare type GetAllBuildsForAppQuery = ({
4300
4391
  __typename?: 'Build';
4301
4392
  } & Pick<Build, 'id'> & BuildFragment)>;
4302
4393
  });
4303
- })>;
4394
+ });
4304
4395
  });
4305
4396
  export declare type EnvironmentSecretsByAccountNameQueryVariables = Exact<{
4306
4397
  accountName: Scalars['String'];
@@ -4326,7 +4417,7 @@ export declare type EnvironmentSecretsByAppIdQueryVariables = Exact<{
4326
4417
  export declare type EnvironmentSecretsByAppIdQuery = ({
4327
4418
  __typename?: 'RootQuery';
4328
4419
  } & {
4329
- app?: Maybe<({
4420
+ app: ({
4330
4421
  __typename?: 'AppQuery';
4331
4422
  } & {
4332
4423
  byId: ({
@@ -4336,7 +4427,7 @@ export declare type EnvironmentSecretsByAppIdQuery = ({
4336
4427
  __typename?: 'EnvironmentSecret';
4337
4428
  } & Pick<EnvironmentSecret, 'id'> & EnvironmentSecretFragment)>;
4338
4429
  });
4339
- })>;
4430
+ });
4340
4431
  });
4341
4432
  export declare type ProjectByUsernameAndSlugQueryVariables = Exact<{
4342
4433
  username: Scalars['String'];
@@ -4393,7 +4484,7 @@ export declare type GetAllSubmissionsForAppQueryVariables = Exact<{
4393
4484
  export declare type GetAllSubmissionsForAppQuery = ({
4394
4485
  __typename?: 'RootQuery';
4395
4486
  } & {
4396
- app?: Maybe<({
4487
+ app: ({
4397
4488
  __typename?: 'AppQuery';
4398
4489
  } & {
4399
4490
  byId: ({
@@ -4403,7 +4494,7 @@ export declare type GetAllSubmissionsForAppQuery = ({
4403
4494
  __typename?: 'Submission';
4404
4495
  } & Pick<Submission, 'id'> & SubmissionFragment)>;
4405
4496
  });
4406
- })>;
4497
+ });
4407
4498
  });
4408
4499
  export declare type CurrentUserQueryVariables = Exact<{
4409
4500
  [key: string]: never;
@@ -4432,7 +4523,7 @@ export declare type WebhooksByAppIdQueryVariables = Exact<{
4432
4523
  export declare type WebhooksByAppIdQuery = ({
4433
4524
  __typename?: 'RootQuery';
4434
4525
  } & {
4435
- app?: Maybe<({
4526
+ app: ({
4436
4527
  __typename?: 'AppQuery';
4437
4528
  } & {
4438
4529
  byId: ({
@@ -4442,7 +4533,7 @@ export declare type WebhooksByAppIdQuery = ({
4442
4533
  __typename?: 'Webhook';
4443
4534
  } & Pick<Webhook, 'id'> & WebhookFragment)>;
4444
4535
  });
4445
- })>;
4536
+ });
4446
4537
  });
4447
4538
  export declare type WebhookByIdQueryVariables = Exact<{
4448
4539
  webhookId: Scalars['ID'];
@@ -0,0 +1,3 @@
1
+ export declare const KeystoreGenerationUrlMutation: {
2
+ createKeystoreGenerationUrlAsync(): Promise<string>;
3
+ };
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.KeystoreGenerationUrlMutation = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const graphql_tag_1 = (0, tslib_1.__importDefault)(require("graphql-tag"));
6
+ const client_1 = require("../client");
7
+ exports.KeystoreGenerationUrlMutation = {
8
+ async createKeystoreGenerationUrlAsync() {
9
+ const data = await (0, client_1.withErrorHandlingAsync)(client_1.graphqlClient
10
+ .mutation((0, graphql_tag_1.default) `
11
+ mutation CreateKeystoreGenerationUrlMutation {
12
+ keystoreGenerationUrl {
13
+ createKeystoreGenerationUrl {
14
+ id
15
+ url
16
+ }
17
+ }
18
+ }
19
+ `)
20
+ .toPromise());
21
+ return data.keystoreGenerationUrl.createKeystoreGenerationUrl.url;
22
+ },
23
+ };
@@ -1,4 +1,5 @@
1
1
  import { Platform } from '@expo/eas-build-job';
2
+ import { Event } from '../analytics/events';
2
3
  import { AndroidSubmissionConfigInput, IosSubmissionConfigInput, SubmissionFragment } from '../graphql/generated';
3
4
  import { SubmissionContext } from './context';
4
5
  export interface SubmissionInput<P extends Platform> {
@@ -6,11 +7,26 @@ export interface SubmissionInput<P extends Platform> {
6
7
  submissionConfig: P extends Platform.ANDROID ? AndroidSubmissionConfigInput : IosSubmissionConfigInput;
7
8
  buildId?: string;
8
9
  }
9
- export default abstract class BaseSubmitter<P extends Platform, SubmissionOptions> {
10
+ interface AnalyticEvents {
11
+ attemptEvent: Event;
12
+ successEvent: Event;
13
+ failureEvent: Event;
14
+ }
15
+ export default abstract class BaseSubmitter<P extends Platform, ResolvedSourceOptions, SubmissionOptions> {
10
16
  protected ctx: SubmissionContext<P>;
11
17
  protected options: SubmissionOptions;
12
- constructor(ctx: SubmissionContext<P>, options: SubmissionOptions);
13
- abstract submitAsync(): Promise<SubmissionFragment>;
14
- protected createSubmissionAsync(submissionInput: SubmissionInput<P>): Promise<SubmissionFragment>;
18
+ protected sourceOptionResolver: {
19
+ [K in keyof ResolvedSourceOptions]: () => Promise<ResolvedSourceOptions[K]>;
20
+ };
21
+ protected sourceOptionAnalytics: Record<keyof ResolvedSourceOptions, AnalyticEvents>;
22
+ constructor(ctx: SubmissionContext<P>, options: SubmissionOptions, sourceOptionResolver: {
23
+ [K in keyof ResolvedSourceOptions]: () => Promise<ResolvedSourceOptions[K]>;
24
+ }, sourceOptionAnalytics: Record<keyof ResolvedSourceOptions, AnalyticEvents>);
25
+ private getSourceOptionsAsync;
26
+ submitAsync(): Promise<SubmissionFragment>;
27
+ abstract createSubmissionInputAsync(resolvedOptions: ResolvedSourceOptions): Promise<SubmissionInput<P>>;
28
+ private createSubmissionAsync;
29
+ private createSubmissionWithAnalyticsAsync;
15
30
  protected abstract createPlatformSubmissionAsync(input: SubmissionInput<P>): Promise<SubmissionFragment>;
16
31
  }
32
+ export {};