eas-cli 0.48.1 → 0.50.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 (51) hide show
  1. package/README.md +144 -50
  2. package/build/build/build.d.ts +6 -2
  3. package/build/build/build.js +191 -104
  4. package/build/build/local.js +1 -1
  5. package/build/build/runBuildAndSubmit.js +5 -1
  6. package/build/build/utils/printBuildInfo.js +1 -2
  7. package/build/build/utils/url.js +6 -8
  8. package/build/credentials/context.js +5 -0
  9. package/build/credentials/ios/actions/AscApiKeyUtils.js +0 -1
  10. package/build/credentials/ios/actions/ConfigureProvisioningProfile.js +1 -1
  11. package/build/credentials/ios/actions/CreateProvisioningProfile.js +1 -1
  12. package/build/credentials/ios/appstore/AppStoreApi.d.ts +5 -1
  13. package/build/credentials/ios/appstore/AppStoreApi.js +38 -15
  14. package/build/credentials/ios/appstore/ascApiKey.d.ts +21 -5
  15. package/build/credentials/ios/appstore/ascApiKey.js +28 -12
  16. package/build/credentials/ios/appstore/authenticate.d.ts +9 -18
  17. package/build/credentials/ios/appstore/authenticate.js +43 -3
  18. package/build/credentials/ios/appstore/authenticateTypes.d.ts +42 -0
  19. package/build/credentials/ios/appstore/authenticateTypes.js +16 -0
  20. package/build/credentials/ios/appstore/capabilityIdentifiers.d.ts +2 -0
  21. package/build/credentials/ios/appstore/capabilityIdentifiers.js +9 -0
  22. package/build/credentials/ios/appstore/contractMessages.d.ts +3 -0
  23. package/build/credentials/ios/appstore/contractMessages.js +12 -0
  24. package/build/credentials/ios/appstore/distributionCertificate.d.ts +1 -1
  25. package/build/credentials/ios/appstore/ensureAppExists.d.ts +2 -2
  26. package/build/credentials/ios/appstore/ensureAppExists.js +12 -5
  27. package/build/credentials/ios/appstore/provisioningProfile.d.ts +1 -1
  28. package/build/credentials/ios/appstore/provisioningProfile.js +6 -0
  29. package/build/credentials/ios/appstore/provisioningProfileAdhoc.d.ts +1 -1
  30. package/build/credentials/ios/appstore/provisioningProfileAdhoc.js +17 -2
  31. package/build/credentials/ios/appstore/pushKey.d.ts +16 -4
  32. package/build/credentials/ios/appstore/pushKey.js +20 -8
  33. package/build/credentials/ios/appstore/resolveCredentials.d.ts +10 -1
  34. package/build/credentials/ios/appstore/resolveCredentials.js +125 -3
  35. package/build/credentials/ios/utils/authType.d.ts +4 -0
  36. package/build/credentials/ios/utils/authType.js +8 -0
  37. package/build/fetch.d.ts +3 -0
  38. package/build/fetch.js +14 -2
  39. package/build/graphql/client.js +15 -14
  40. package/build/graphql/generated.d.ts +83 -0
  41. package/build/graphql/generated.js +16 -1
  42. package/build/graphql/mutations/BuildMutation.js +2 -2
  43. package/build/graphql/types/Build.js +5 -0
  44. package/build/project/ios/target.js +37 -0
  45. package/build/submit/ios/AppProduce.d.ts +0 -1
  46. package/build/submit/ios/AppProduce.js +5 -6
  47. package/build/submit/ios/AppSpecificPasswordSource.js +2 -2
  48. package/build/utils/code-signing.d.ts +0 -5
  49. package/build/utils/code-signing.js +5 -51
  50. package/oclif.manifest.json +1 -1
  51. package/package.json +15 -14
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deletePasswordAsync = exports.promptPasswordAsync = exports.resolveCredentialsAsync = void 0;
3
+ exports.deletePasswordAsync = exports.promptPasswordAsync = exports.resolveAppleTeamAsync = exports.resolveAscApiKeyAsync = exports.hasAscEnvVars = exports.resolveUserCredentialsAsync = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const apple_utils_1 = require("@expo/apple-utils");
6
6
  const chalk_1 = tslib_1.__importDefault(require("chalk"));
@@ -8,6 +8,7 @@ const fs = tslib_1.__importStar(require("fs-extra"));
8
8
  const wrap_ansi_1 = tslib_1.__importDefault(require("wrap-ansi"));
9
9
  const log_1 = tslib_1.__importStar(require("../../../log"));
10
10
  const prompts_1 = require("../../../prompts");
11
+ const authenticateTypes_1 = require("./authenticateTypes");
11
12
  const Keychain = tslib_1.__importStar(require("./keychain"));
12
13
  /**
13
14
  * Get the username and possibly the password from the environment variables or the supplied options.
@@ -15,14 +16,135 @@ const Keychain = tslib_1.__importStar(require("./keychain"));
15
16
  *
16
17
  * @param options
17
18
  */
18
- async function resolveCredentialsAsync(options) {
19
+ async function resolveUserCredentialsAsync(options) {
19
20
  const credentials = getAppleIdFromEnvironmentOrOptions(options);
20
21
  if (!credentials.username) {
21
22
  credentials.username = await promptUsernameAsync();
22
23
  }
23
24
  return credentials;
24
25
  }
25
- exports.resolveCredentialsAsync = resolveCredentialsAsync;
26
+ exports.resolveUserCredentialsAsync = resolveUserCredentialsAsync;
27
+ function hasAscEnvVars() {
28
+ return (!!process.env.EXPO_ASC_API_KEY_PATH ||
29
+ !!process.env.EXPO_ASC_KEY_ID ||
30
+ !!process.env.EXPO_ASC_ISSUER_ID);
31
+ }
32
+ exports.hasAscEnvVars = hasAscEnvVars;
33
+ async function resolveAscApiKeyAsync(ascApiKey) {
34
+ const passedKeyP8 = await getAscKeyP8FromEnvironmentOrOptionsAsync(ascApiKey);
35
+ const passedKeyId = await getAscKeyIdFromEnvironmentOrOptionsAsync(ascApiKey);
36
+ const passedIssuerId = await getAscIssuerIdFromEnvironmentOrOptionsAsync(ascApiKey);
37
+ return {
38
+ keyP8: passedKeyP8,
39
+ keyId: passedKeyId,
40
+ issuerId: passedIssuerId,
41
+ };
42
+ }
43
+ exports.resolveAscApiKeyAsync = resolveAscApiKeyAsync;
44
+ async function getAscKeyP8FromEnvironmentOrOptionsAsync(ascApiKey) {
45
+ if (ascApiKey === null || ascApiKey === void 0 ? void 0 : ascApiKey.keyP8) {
46
+ return ascApiKey === null || ascApiKey === void 0 ? void 0 : ascApiKey.keyP8;
47
+ }
48
+ else if (process.env.EXPO_ASC_API_KEY_PATH) {
49
+ return await fs.readFile(process.env.EXPO_ASC_API_KEY_PATH, 'utf-8');
50
+ }
51
+ const { ascApiKeyPath } = await (0, prompts_1.promptAsync)({
52
+ type: 'text',
53
+ name: 'ascApiKeyPath',
54
+ message: `Path to ASC Api Key Path (.p8):`,
55
+ validate: (val) => val !== '',
56
+ });
57
+ return await fs.readFile(ascApiKeyPath, 'utf-8');
58
+ }
59
+ async function getAscKeyIdFromEnvironmentOrOptionsAsync(ascApiKey) {
60
+ if (ascApiKey === null || ascApiKey === void 0 ? void 0 : ascApiKey.keyId) {
61
+ return ascApiKey === null || ascApiKey === void 0 ? void 0 : ascApiKey.keyId;
62
+ }
63
+ else if (process.env.EXPO_ASC_KEY_ID) {
64
+ return process.env.EXPO_ASC_KEY_ID;
65
+ }
66
+ const { ascApiKeyId } = await (0, prompts_1.promptAsync)({
67
+ type: 'text',
68
+ name: 'ascApiKeyId',
69
+ message: `ASC Api Key ID:`,
70
+ validate: (val) => val !== '',
71
+ });
72
+ return ascApiKeyId;
73
+ }
74
+ async function getAscIssuerIdFromEnvironmentOrOptionsAsync(ascApiKey) {
75
+ if (ascApiKey === null || ascApiKey === void 0 ? void 0 : ascApiKey.issuerId) {
76
+ return ascApiKey === null || ascApiKey === void 0 ? void 0 : ascApiKey.issuerId;
77
+ }
78
+ else if (process.env.EXPO_ASC_ISSUER_ID) {
79
+ return process.env.EXPO_ASC_ISSUER_ID;
80
+ }
81
+ const { ascIssuerId } = await (0, prompts_1.promptAsync)({
82
+ type: 'text',
83
+ name: 'ascIssuerId',
84
+ message: `ASC Issuer ID:`,
85
+ validate: (val) => val !== '',
86
+ });
87
+ return ascIssuerId;
88
+ }
89
+ function isAppleTeamType(maybeTeamType) {
90
+ return maybeTeamType in authenticateTypes_1.AppleTeamType;
91
+ }
92
+ function assertAppleTeamType(maybeTeamType) {
93
+ if (!isAppleTeamType(maybeTeamType)) {
94
+ throw new Error(`Invalid Apple Team Type: ${maybeTeamType}. Must be one of ${Object.keys(authenticateTypes_1.AppleTeamType).join(', ')}`);
95
+ }
96
+ return maybeTeamType;
97
+ }
98
+ function resolveAppleTeamTypeFromEnvironment() {
99
+ if (!process.env.EXPO_APPLE_TEAM_TYPE) {
100
+ return undefined;
101
+ }
102
+ return assertAppleTeamType(process.env.EXPO_APPLE_TEAM_TYPE);
103
+ }
104
+ async function getAppleTeamIdFromEnvironmentOrOptionsAsync(options) {
105
+ if (options.teamId) {
106
+ return options.teamId;
107
+ }
108
+ else if (process.env.EXPO_APPLE_TEAM_ID) {
109
+ return process.env.EXPO_APPLE_TEAM_ID;
110
+ }
111
+ const { appleTeamId } = await (0, prompts_1.promptAsync)({
112
+ type: 'text',
113
+ name: 'appleTeamId',
114
+ message: `Apple Team ID:`,
115
+ validate: (val) => val !== '',
116
+ });
117
+ return appleTeamId;
118
+ }
119
+ async function getAppleTeamTypeFromEnvironmentOrOptionsAsync(options) {
120
+ if (options.teamType) {
121
+ return options.teamType;
122
+ }
123
+ const appleTeamTypeFromEnvironment = resolveAppleTeamTypeFromEnvironment();
124
+ if (appleTeamTypeFromEnvironment) {
125
+ return appleTeamTypeFromEnvironment;
126
+ }
127
+ const { appleTeamType } = await (0, prompts_1.promptAsync)({
128
+ type: 'select',
129
+ message: 'Select your Apple Team Type:',
130
+ name: 'appleTeamType',
131
+ choices: [
132
+ { title: 'Enterprise', value: authenticateTypes_1.AppleTeamType.IN_HOUSE },
133
+ { title: 'Company/Organization', value: authenticateTypes_1.AppleTeamType.COMPANY_OR_ORGANIZATION },
134
+ { title: 'Individual', value: authenticateTypes_1.AppleTeamType.INDIVIDUAL },
135
+ ],
136
+ });
137
+ return appleTeamType;
138
+ }
139
+ async function resolveAppleTeamAsync(options = {}) {
140
+ const passedTeamType = await getAppleTeamTypeFromEnvironmentOrOptionsAsync(options);
141
+ return {
142
+ id: await getAppleTeamIdFromEnvironmentOrOptionsAsync(options),
143
+ name: options.teamName,
144
+ inHouse: passedTeamType === authenticateTypes_1.AppleTeamType.IN_HOUSE,
145
+ };
146
+ }
147
+ exports.resolveAppleTeamAsync = resolveAppleTeamAsync;
26
148
  function getAppleIdFromEnvironmentOrOptions({ username, password, ...userCredentials }) {
27
149
  const passedAppleId = username || process.env.EXPO_APPLE_ID;
28
150
  // Only resolve the password if the username was provided.
@@ -0,0 +1,4 @@
1
+ /// <reference types="@expo/apple-utils/ts-declarations/expo__app-store" />
2
+ import { RequestContext } from '@expo/apple-utils';
3
+ /** Is the request context App Store Connect only with no access to cookies authentication. */
4
+ export declare function isAppStoreConnectTokenOnlyContext(authContext: RequestContext): boolean;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isAppStoreConnectTokenOnlyContext = void 0;
4
+ /** Is the request context App Store Connect only with no access to cookies authentication. */
5
+ function isAppStoreConnectTokenOnlyContext(authContext) {
6
+ return !authContext.teamId && !!authContext.token;
7
+ }
8
+ exports.isAppStoreConnectTokenOnlyContext = isAppStoreConnectTokenOnlyContext;
package/build/fetch.d.ts CHANGED
@@ -1,7 +1,10 @@
1
+ /// <reference types="node" />
2
+ import { Agent } from 'https';
1
3
  import { RequestInfo, RequestInit, Response } from 'node-fetch';
2
4
  export * from 'node-fetch';
3
5
  export declare class RequestError extends Error {
4
6
  readonly response: Response;
5
7
  constructor(message: string, response: Response);
6
8
  }
9
+ export declare const httpsProxyAgent: Agent | null;
7
10
  export default function (url: RequestInfo, init?: RequestInit): Promise<Response>;
package/build/fetch.js CHANGED
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RequestError = void 0;
3
+ exports.httpsProxyAgent = exports.RequestError = void 0;
4
4
  const tslib_1 = require("tslib");
5
+ const https_proxy_agent_1 = tslib_1.__importDefault(require("https-proxy-agent"));
5
6
  const node_fetch_1 = tslib_1.__importDefault(require("node-fetch"));
6
7
  tslib_1.__exportStar(require("node-fetch"), exports);
7
8
  class RequestError extends Error {
@@ -11,8 +12,19 @@ class RequestError extends Error {
11
12
  }
12
13
  }
13
14
  exports.RequestError = RequestError;
15
+ function createHttpsAgent() {
16
+ const httpsProxyUrl = process.env.https_proxy;
17
+ if (!httpsProxyUrl) {
18
+ return null;
19
+ }
20
+ return (0, https_proxy_agent_1.default)(httpsProxyUrl);
21
+ }
22
+ exports.httpsProxyAgent = createHttpsAgent();
14
23
  async function default_1(url, init) {
15
- const response = await (0, node_fetch_1.default)(url, init);
24
+ const response = await (0, node_fetch_1.default)(url, {
25
+ ...init,
26
+ ...(exports.httpsProxyAgent ? { agent: exports.httpsProxyAgent } : {}),
27
+ });
16
28
  if (response.status >= 400) {
17
29
  throw new RequestError(`Request failed: ${response.status} (${response.statusText})`, response);
18
30
  }
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "GraphqlError", { enumerable: true, get: function
7
7
  const exchange_retry_1 = require("@urql/exchange-retry");
8
8
  const node_fetch_1 = tslib_1.__importDefault(require("node-fetch"));
9
9
  const api_1 = require("../api");
10
+ const fetch_1 = require("../fetch");
10
11
  const log_1 = tslib_1.__importDefault(require("../log"));
11
12
  const sessionStorage_1 = require("../user/sessionStorage");
12
13
  exports.graphqlClient = (0, core_1.createClient)({
@@ -16,30 +17,30 @@ exports.graphqlClient = (0, core_1.createClient)({
16
17
  core_1.cacheExchange,
17
18
  (0, exchange_retry_1.retryExchange)({
18
19
  maxDelayMs: 4000,
19
- retryIf: err => !!(err && (err.networkError || err.graphQLErrors.some(e => { var _a; return (_a = e === null || e === void 0 ? void 0 : e.extensions) === null || _a === void 0 ? void 0 : _a.isTransient; }))),
20
+ retryIf: (err, operation) => {
21
+ return !!(err &&
22
+ !operation.context.noRetry &&
23
+ (err.networkError || err.graphQLErrors.some(e => { var _a; return (_a = e === null || e === void 0 ? void 0 : e.extensions) === null || _a === void 0 ? void 0 : _a.isTransient; })));
24
+ },
20
25
  }),
21
26
  core_1.fetchExchange,
22
27
  ],
23
28
  // @ts-expect-error Type 'typeof fetch' is not assignable to type '(input: RequestInfo, init?: RequestInit | undefined) => Promise<Response>'.
24
29
  fetch: node_fetch_1.default,
25
30
  fetchOptions: () => {
31
+ const headers = {};
26
32
  const token = (0, sessionStorage_1.getAccessToken)();
27
33
  if (token) {
28
- return {
29
- headers: {
30
- authorization: `Bearer ${token}`,
31
- },
32
- };
34
+ headers.authorization = `Bearer ${token}`;
33
35
  }
34
36
  const sessionSecret = (0, sessionStorage_1.getSessionSecret)();
35
- if (sessionSecret) {
36
- return {
37
- headers: {
38
- 'expo-session': sessionSecret,
39
- },
40
- };
37
+ if (!token && sessionSecret) {
38
+ headers['expo-session'] = sessionSecret;
41
39
  }
42
- return {};
40
+ return {
41
+ ...(fetch_1.httpsProxyAgent ? { agent: fetch_1.httpsProxyAgent } : {}),
42
+ headers,
43
+ };
43
44
  },
44
45
  });
45
46
  async function withErrorHandlingAsync(promise) {
@@ -50,7 +51,7 @@ async function withErrorHandlingAsync(promise) {
50
51
  }
51
52
  throw error;
52
53
  }
53
- // Check for malfolmed response. This only checks the root query existence,
54
+ // Check for malformed response. This only checks the root query existence,
54
55
  // It doesn't affect returning responses with empty resultset.
55
56
  if (!data) {
56
57
  throw new Error('Returned query result data is null!');
@@ -93,6 +93,7 @@ export declare type Account = {
93
93
  availableBuilds?: Maybe<Scalars['Int']>;
94
94
  /** Billing information */
95
95
  billing?: Maybe<Billing>;
96
+ billingPeriod: BillingPeriod;
96
97
  /** Build Jobs associated with this account */
97
98
  buildJobs: Array<BuildJob>;
98
99
  /**
@@ -126,6 +127,8 @@ export declare type Account = {
126
127
  /** @deprecated See isCurrent */
127
128
  unlimitedBuilds: Scalars['Boolean'];
128
129
  updatedAt: Scalars['DateTime'];
130
+ /** Account query object for querying EAS usage metrics */
131
+ usageMetrics: AccountUsageMetrics;
129
132
  /** Pending user invitations for this account */
130
133
  userInvitations: Array<UserInvitation>;
131
134
  /** Actors associated with this account and permissions they hold */
@@ -179,6 +182,13 @@ export declare type AccountAppsArgs = {
179
182
  limit: Scalars['Int'];
180
183
  offset: Scalars['Int'];
181
184
  };
185
+ /**
186
+ * An account is a container owning projects, credentials, billing and other organization
187
+ * data and settings. Actors may own and be members of accounts.
188
+ */
189
+ export declare type AccountBillingPeriodArgs = {
190
+ date: Scalars['DateTime'];
191
+ };
182
192
  /**
183
193
  * An account is a container owning projects, credentials, billing and other organization
184
194
  * data and settings. Actors may own and be members of accounts.
@@ -322,6 +332,22 @@ export declare type AccountQueryByIdArgs = {
322
332
  export declare type AccountQueryByNameArgs = {
323
333
  accountName: Scalars['String'];
324
334
  };
335
+ export declare type AccountUsageMetric = {
336
+ __typename?: 'AccountUsageMetric';
337
+ metric: EasServiceMetric;
338
+ metricType: UsageMetricType;
339
+ timestamp: Scalars['DateTime'];
340
+ value: Scalars['Float'];
341
+ };
342
+ export declare type AccountUsageMetrics = {
343
+ __typename?: 'AccountUsageMetrics';
344
+ metricsForServiceMetric: Array<AccountUsageMetric>;
345
+ };
346
+ export declare type AccountUsageMetricsMetricsForServiceMetricArgs = {
347
+ granularity: UsageMetricsGranularity;
348
+ metric: EasServiceMetric;
349
+ timespan: UsageMetricsTimespan;
350
+ };
325
351
  export declare type ActivityTimelineProjectActivity = {
326
352
  activityTimestamp: Scalars['DateTime'];
327
353
  actor?: Maybe<Actor>;
@@ -1232,6 +1258,12 @@ export declare type Billing = {
1232
1258
  payment?: Maybe<PaymentDetails>;
1233
1259
  subscription?: Maybe<SubscriptionDetails>;
1234
1260
  };
1261
+ export declare type BillingPeriod = {
1262
+ __typename?: 'BillingPeriod';
1263
+ anchor: Scalars['DateTime'];
1264
+ end: Scalars['DateTime'];
1265
+ start: Scalars['DateTime'];
1266
+ };
1235
1267
  /** Represents an EAS Build */
1236
1268
  export declare type Build = ActivityTimelineProjectActivity & BuildOrBuildJob & {
1237
1269
  __typename?: 'Build';
@@ -1246,9 +1278,12 @@ export declare type Build = ActivityTimelineProjectActivity & BuildOrBuildJob &
1246
1278
  createdAt?: Maybe<Scalars['DateTime']>;
1247
1279
  distribution?: Maybe<DistributionType>;
1248
1280
  error?: Maybe<BuildError>;
1281
+ estimatedWaitTimeLeftSeconds?: Maybe<Scalars['Int']>;
1249
1282
  expirationDate?: Maybe<Scalars['DateTime']>;
1250
1283
  gitCommitHash?: Maybe<Scalars['String']>;
1251
1284
  id: Scalars['ID'];
1285
+ /** Queue position is 1-indexed */
1286
+ initialQueuePosition?: Maybe<Scalars['Int']>;
1252
1287
  initiatingActor?: Maybe<Actor>;
1253
1288
  /** @deprecated User type is deprecated */
1254
1289
  initiatingUser?: Maybe<User>;
@@ -1684,6 +1719,9 @@ export declare enum EasBuildDeprecationInfoType {
1684
1719
  Internal = "INTERNAL",
1685
1720
  UserFacing = "USER_FACING"
1686
1721
  }
1722
+ export declare enum EasServiceMetric {
1723
+ ManifestRequests = "MANIFEST_REQUESTS"
1724
+ }
1687
1725
  export declare type EditUpdateBranchInput = {
1688
1726
  appId?: InputMaybe<Scalars['ID']>;
1689
1727
  id?: InputMaybe<Scalars['ID']>;
@@ -2790,6 +2828,19 @@ export declare enum UploadSessionType {
2790
2828
  EasBuildProjectSources = "EAS_BUILD_PROJECT_SOURCES",
2791
2829
  EasSubmitAppArchive = "EAS_SUBMIT_APP_ARCHIVE"
2792
2830
  }
2831
+ export declare enum UsageMetricType {
2832
+ Request = "REQUEST"
2833
+ }
2834
+ export declare enum UsageMetricsGranularity {
2835
+ Day = "DAY",
2836
+ Hour = "HOUR",
2837
+ Minute = "MINUTE",
2838
+ Total = "TOTAL"
2839
+ }
2840
+ export declare type UsageMetricsTimespan = {
2841
+ end: Scalars['DateTime'];
2842
+ start: Scalars['DateTime'];
2843
+ };
2793
2844
  /** Represents a human (not robot) actor. */
2794
2845
  export declare type User = Actor & {
2795
2846
  __typename?: 'User';
@@ -2899,6 +2950,7 @@ export declare type UserInvitation = {
2899
2950
  created: Scalars['DateTime'];
2900
2951
  /** Email to which this invitation was sent */
2901
2952
  email: Scalars['String'];
2953
+ expires: Scalars['DateTime'];
2902
2954
  id: Scalars['ID'];
2903
2955
  /** Account permissions to be granted upon acceptance of this invitation */
2904
2956
  permissions: Array<Permission>;
@@ -2956,6 +3008,7 @@ export declare type UserInvitationPublicData = {
2956
3008
  accountName: Scalars['String'];
2957
3009
  created: Scalars['DateTime'];
2958
3010
  email: Scalars['String'];
3011
+ expires: Scalars['DateTime'];
2959
3012
  /** Email to which this invitation was sent */
2960
3013
  id: Scalars['ID'];
2961
3014
  };
@@ -5663,6 +5716,10 @@ export declare type CreateAndroidBuildMutation = {
5663
5716
  appBuildVersion?: string | null;
5664
5717
  runtimeVersion?: string | null;
5665
5718
  gitCommitHash?: string | null;
5719
+ initialQueuePosition?: number | null;
5720
+ queuePosition?: number | null;
5721
+ estimatedWaitTimeLeftSeconds?: number | null;
5722
+ priority: BuildPriority;
5666
5723
  createdAt?: any | null;
5667
5724
  updatedAt?: any | null;
5668
5725
  error?: {
@@ -5689,6 +5746,7 @@ export declare type CreateAndroidBuildMutation = {
5689
5746
  __typename: 'App';
5690
5747
  id: string;
5691
5748
  name: string;
5749
+ slug: string;
5692
5750
  ownerAccount: {
5693
5751
  __typename?: 'Account';
5694
5752
  id: string;
@@ -5698,6 +5756,7 @@ export declare type CreateAndroidBuildMutation = {
5698
5756
  __typename: 'Snack';
5699
5757
  id: string;
5700
5758
  name: string;
5759
+ slug: string;
5701
5760
  };
5702
5761
  };
5703
5762
  deprecationInfo?: {
@@ -5734,6 +5793,10 @@ export declare type CreateIosBuildMutation = {
5734
5793
  appBuildVersion?: string | null;
5735
5794
  runtimeVersion?: string | null;
5736
5795
  gitCommitHash?: string | null;
5796
+ initialQueuePosition?: number | null;
5797
+ queuePosition?: number | null;
5798
+ estimatedWaitTimeLeftSeconds?: number | null;
5799
+ priority: BuildPriority;
5737
5800
  createdAt?: any | null;
5738
5801
  updatedAt?: any | null;
5739
5802
  error?: {
@@ -5760,6 +5823,7 @@ export declare type CreateIosBuildMutation = {
5760
5823
  __typename: 'App';
5761
5824
  id: string;
5762
5825
  name: string;
5826
+ slug: string;
5763
5827
  ownerAccount: {
5764
5828
  __typename?: 'Account';
5765
5829
  id: string;
@@ -5769,6 +5833,7 @@ export declare type CreateIosBuildMutation = {
5769
5833
  __typename: 'Snack';
5770
5834
  id: string;
5771
5835
  name: string;
5836
+ slug: string;
5772
5837
  };
5773
5838
  };
5774
5839
  deprecationInfo?: {
@@ -6086,6 +6151,10 @@ export declare type BuildsByIdQuery = {
6086
6151
  appBuildVersion?: string | null;
6087
6152
  runtimeVersion?: string | null;
6088
6153
  gitCommitHash?: string | null;
6154
+ initialQueuePosition?: number | null;
6155
+ queuePosition?: number | null;
6156
+ estimatedWaitTimeLeftSeconds?: number | null;
6157
+ priority: BuildPriority;
6089
6158
  createdAt?: any | null;
6090
6159
  updatedAt?: any | null;
6091
6160
  error?: {
@@ -6112,6 +6181,7 @@ export declare type BuildsByIdQuery = {
6112
6181
  __typename: 'App';
6113
6182
  id: string;
6114
6183
  name: string;
6184
+ slug: string;
6115
6185
  ownerAccount: {
6116
6186
  __typename?: 'Account';
6117
6187
  id: string;
@@ -6121,6 +6191,7 @@ export declare type BuildsByIdQuery = {
6121
6191
  __typename: 'Snack';
6122
6192
  id: string;
6123
6193
  name: string;
6194
+ slug: string;
6124
6195
  };
6125
6196
  };
6126
6197
  };
@@ -6153,6 +6224,10 @@ export declare type GetAllBuildsForAppQuery = {
6153
6224
  appBuildVersion?: string | null;
6154
6225
  runtimeVersion?: string | null;
6155
6226
  gitCommitHash?: string | null;
6227
+ initialQueuePosition?: number | null;
6228
+ queuePosition?: number | null;
6229
+ estimatedWaitTimeLeftSeconds?: number | null;
6230
+ priority: BuildPriority;
6156
6231
  createdAt?: any | null;
6157
6232
  updatedAt?: any | null;
6158
6233
  error?: {
@@ -6179,6 +6254,7 @@ export declare type GetAllBuildsForAppQuery = {
6179
6254
  __typename: 'App';
6180
6255
  id: string;
6181
6256
  name: string;
6257
+ slug: string;
6182
6258
  ownerAccount: {
6183
6259
  __typename?: 'Account';
6184
6260
  id: string;
@@ -6188,6 +6264,7 @@ export declare type GetAllBuildsForAppQuery = {
6188
6264
  __typename: 'Snack';
6189
6265
  id: string;
6190
6266
  name: string;
6267
+ slug: string;
6191
6268
  };
6192
6269
  }>;
6193
6270
  };
@@ -6563,6 +6640,10 @@ export declare type BuildFragment = {
6563
6640
  appBuildVersion?: string | null;
6564
6641
  runtimeVersion?: string | null;
6565
6642
  gitCommitHash?: string | null;
6643
+ initialQueuePosition?: number | null;
6644
+ queuePosition?: number | null;
6645
+ estimatedWaitTimeLeftSeconds?: number | null;
6646
+ priority: BuildPriority;
6566
6647
  createdAt?: any | null;
6567
6648
  updatedAt?: any | null;
6568
6649
  error?: {
@@ -6589,6 +6670,7 @@ export declare type BuildFragment = {
6589
6670
  __typename: 'App';
6590
6671
  id: string;
6591
6672
  name: string;
6673
+ slug: string;
6592
6674
  ownerAccount: {
6593
6675
  __typename?: 'Account';
6594
6676
  id: string;
@@ -6598,6 +6680,7 @@ export declare type BuildFragment = {
6598
6680
  __typename: 'Snack';
6599
6681
  id: string;
6600
6682
  name: string;
6683
+ slug: string;
6601
6684
  };
6602
6685
  };
6603
6686
  export declare type EnvironmentSecretFragment = {
@@ -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.WebhookType = exports.UploadSessionType = exports.SubmissionStatus = exports.SubmissionAndroidTrack = exports.SubmissionAndroidReleaseStatus = exports.SubmissionAndroidArchiveType = exports.StandardOffer = exports.SecondFactorMethod = exports.Role = exports.ProjectArchiveSourceType = exports.Permission = exports.Order = exports.OfferType = exports.MailchimpTag = exports.MailchimpAudience = exports.IosSchemeBuildConfiguration = exports.IosManagedBuildType = exports.IosDistributionType = exports.IosBuildType = exports.InvoiceDiscountType = exports.Feature = exports.EasBuildDeprecationInfoType = exports.DistributionType = exports.CacheControlScope = exports.BuildWorkflow = exports.BuildStatus = exports.BuildPriority = exports.BuildJobStatus = exports.BuildJobLogsFormat = exports.BuildIosEnterpriseProvisioning = exports.BuildCredentialsSource = exports.AssetMetadataStatus = exports.AppsFilter = exports.AppleDeviceClass = exports.AppStoreConnectUserRole = exports.AppSort = exports.AppPrivacy = exports.AppPlatform = exports.AndroidKeystoreType = exports.AndroidFcmVersion = exports.AndroidBuildType = exports.ActivityTimelineProjectActivityType = void 0;
9
+ exports.WebhookType = exports.UsageMetricsGranularity = exports.UsageMetricType = exports.UploadSessionType = exports.SubmissionStatus = exports.SubmissionAndroidTrack = exports.SubmissionAndroidReleaseStatus = exports.SubmissionAndroidArchiveType = exports.StandardOffer = exports.SecondFactorMethod = exports.Role = exports.ProjectArchiveSourceType = exports.Permission = exports.Order = exports.OfferType = exports.MailchimpTag = exports.MailchimpAudience = exports.IosSchemeBuildConfiguration = exports.IosManagedBuildType = exports.IosDistributionType = exports.IosBuildType = exports.InvoiceDiscountType = exports.Feature = exports.EasServiceMetric = exports.EasBuildDeprecationInfoType = exports.DistributionType = exports.CacheControlScope = exports.BuildWorkflow = exports.BuildStatus = exports.BuildPriority = exports.BuildJobStatus = exports.BuildJobLogsFormat = exports.BuildIosEnterpriseProvisioning = exports.BuildCredentialsSource = exports.AssetMetadataStatus = exports.AppsFilter = exports.AppleDeviceClass = exports.AppStoreConnectUserRole = exports.AppSort = exports.AppPrivacy = exports.AppPlatform = exports.AndroidKeystoreType = exports.AndroidFcmVersion = exports.AndroidBuildType = exports.ActivityTimelineProjectActivityType = void 0;
10
10
  var ActivityTimelineProjectActivityType;
11
11
  (function (ActivityTimelineProjectActivityType) {
12
12
  ActivityTimelineProjectActivityType["Build"] = "BUILD";
@@ -145,6 +145,10 @@ var EasBuildDeprecationInfoType;
145
145
  EasBuildDeprecationInfoType["Internal"] = "INTERNAL";
146
146
  EasBuildDeprecationInfoType["UserFacing"] = "USER_FACING";
147
147
  })(EasBuildDeprecationInfoType = exports.EasBuildDeprecationInfoType || (exports.EasBuildDeprecationInfoType = {}));
148
+ var EasServiceMetric;
149
+ (function (EasServiceMetric) {
150
+ EasServiceMetric["ManifestRequests"] = "MANIFEST_REQUESTS";
151
+ })(EasServiceMetric = exports.EasServiceMetric || (exports.EasServiceMetric = {}));
148
152
  var Feature;
149
153
  (function (Feature) {
150
154
  /** Priority Builds */
@@ -281,6 +285,17 @@ var UploadSessionType;
281
285
  UploadSessionType["EasBuildProjectSources"] = "EAS_BUILD_PROJECT_SOURCES";
282
286
  UploadSessionType["EasSubmitAppArchive"] = "EAS_SUBMIT_APP_ARCHIVE";
283
287
  })(UploadSessionType = exports.UploadSessionType || (exports.UploadSessionType = {}));
288
+ var UsageMetricType;
289
+ (function (UsageMetricType) {
290
+ UsageMetricType["Request"] = "REQUEST";
291
+ })(UsageMetricType = exports.UsageMetricType || (exports.UsageMetricType = {}));
292
+ var UsageMetricsGranularity;
293
+ (function (UsageMetricsGranularity) {
294
+ UsageMetricsGranularity["Day"] = "DAY";
295
+ UsageMetricsGranularity["Hour"] = "HOUR";
296
+ UsageMetricsGranularity["Minute"] = "MINUTE";
297
+ UsageMetricsGranularity["Total"] = "TOTAL";
298
+ })(UsageMetricsGranularity = exports.UsageMetricsGranularity || (exports.UsageMetricsGranularity = {}));
284
299
  var WebhookType;
285
300
  (function (WebhookType) {
286
301
  WebhookType["Build"] = "BUILD";
@@ -31,7 +31,7 @@ exports.BuildMutation = {
31
31
  }
32
32
  }
33
33
  ${(0, graphql_1.print)(Build_1.BuildFragmentNode)}
34
- `, input)
34
+ `, input, { noRetry: true })
35
35
  .toPromise());
36
36
  return (0, nullthrows_1.default)((_a = data.build) === null || _a === void 0 ? void 0 : _a.createAndroidBuild);
37
37
  },
@@ -58,7 +58,7 @@ exports.BuildMutation = {
58
58
  }
59
59
  }
60
60
  ${(0, graphql_1.print)(Build_1.BuildFragmentNode)}
61
- `, input)
61
+ `, input, { noRetry: true })
62
62
  .toPromise());
63
63
  return (0, nullthrows_1.default)((_a = data.build) === null || _a === void 0 ? void 0 : _a.createIosBuild);
64
64
  },
@@ -26,6 +26,7 @@ exports.BuildFragmentNode = (0, graphql_tag_1.default) `
26
26
  __typename
27
27
  id
28
28
  name
29
+ slug
29
30
  ... on App {
30
31
  ownerAccount {
31
32
  id
@@ -43,6 +44,10 @@ exports.BuildFragmentNode = (0, graphql_tag_1.default) `
43
44
  appBuildVersion
44
45
  runtimeVersion
45
46
  gitCommitHash
47
+ initialQueuePosition
48
+ queuePosition
49
+ estimatedWaitTimeLeftSeconds
50
+ priority
46
51
  createdAt
47
52
  updatedAt
48
53
  }
@@ -1,10 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.findTargetByName = exports.findApplicationTarget = exports.resolveTargetsAsync = void 0;
4
+ const tslib_1 = require("tslib");
4
5
  const config_plugins_1 = require("@expo/config-plugins");
5
6
  const eas_build_job_1 = require("@expo/eas-build-job");
7
+ const joi_1 = tslib_1.__importDefault(require("joi"));
6
8
  const workflow_1 = require("../workflow");
7
9
  const bundleIdentifier_1 = require("./bundleIdentifier");
10
+ const AppExtensionsConfigSchema = joi_1.default.array().items(joi_1.default.object({
11
+ targetName: joi_1.default.string().required(),
12
+ bundleIdentifier: joi_1.default.string().required(),
13
+ parentBundleIdentifier: joi_1.default.string(),
14
+ }));
8
15
  async function resolveTargetsAsync({ exp, projectDir }, { buildConfiguration, buildScheme }) {
9
16
  const result = [];
10
17
  const applicationTarget = await readApplicationTargetForSchemeAsync(projectDir, buildScheme);
@@ -27,9 +34,39 @@ async function resolveTargetsAsync({ exp, projectDir }, { buildConfiguration, bu
27
34
  if (dependencies.length > 0) {
28
35
  result.push(...dependencies);
29
36
  }
37
+ result.push(...(await resolveManagedAppExtensionsAsync({
38
+ exp,
39
+ projectDir,
40
+ buildConfiguration,
41
+ applicationTargetBundleIdentifier: bundleIdentifier,
42
+ })));
30
43
  return result;
31
44
  }
32
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 [];
52
+ }
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}`);
59
+ }
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
+ }
33
70
  async function resolveDependenciesAsync({ exp, projectDir, buildConfiguration, target, bundleIdentifier, }) {
34
71
  const result = [];
35
72
  if (target.dependencies && target.dependencies.length > 0) {
@@ -1,7 +1,6 @@
1
1
  import { Platform } from '@expo/eas-build-job';
2
2
  import { SubmissionContext } from '../context';
3
3
  declare type AppStoreResult = {
4
- appleIdUsername: string;
5
4
  ascAppIdentifier: string;
6
5
  };
7
6
  export declare function ensureAppStoreConnectAppExistsAsync(ctx: SubmissionContext<Platform.IOS>): Promise<AppStoreResult>;