eas-cli 16.4.0 → 16.5.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.
@@ -3,3 +3,7 @@ import { BuildRequestSender } from '../build';
3
3
  import { AndroidBuildContext, BuildContext, CommonContext } from '../context';
4
4
  export declare function createAndroidContextAsync(ctx: CommonContext<Platform.ANDROID>): Promise<AndroidBuildContext>;
5
5
  export declare function prepareAndroidBuildAsync(ctx: BuildContext<Platform.ANDROID>): Promise<BuildRequestSender>;
6
+ export declare function maybeWarnAboutNonStandardBuildType({ buildProfile, buildType, }: {
7
+ buildProfile: Pick<CommonContext<Platform.ANDROID>['buildProfile'], 'gradleCommand'>;
8
+ buildType: string;
9
+ }): void;
@@ -1,10 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.prepareAndroidBuildAsync = exports.createAndroidContextAsync = void 0;
3
+ exports.maybeWarnAboutNonStandardBuildType = exports.prepareAndroidBuildAsync = exports.createAndroidContextAsync = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const eas_build_job_1 = require("@expo/eas-build-job");
6
6
  const eas_json_1 = require("@expo/eas-json");
7
7
  const chalk_1 = tslib_1.__importDefault(require("chalk"));
8
+ const getenv_1 = tslib_1.__importDefault(require("getenv"));
8
9
  const nullthrows_1 = tslib_1.__importDefault(require("nullthrows"));
9
10
  const graphql_1 = require("./graphql");
10
11
  const prepareJob_1 = require("./prepareJob");
@@ -12,7 +13,7 @@ const syncProjectConfiguration_1 = require("./syncProjectConfiguration");
12
13
  const version_1 = require("./version");
13
14
  const AndroidCredentialsProvider_1 = tslib_1.__importDefault(require("../../credentials/android/AndroidCredentialsProvider"));
14
15
  const BuildMutation_1 = require("../../graphql/mutations/BuildMutation");
15
- const log_1 = tslib_1.__importDefault(require("../../log"));
16
+ const log_1 = tslib_1.__importStar(require("../../log"));
16
17
  const applicationId_1 = require("../../project/android/applicationId");
17
18
  const gradle_1 = require("../../project/android/gradle");
18
19
  const prompts_1 = require("../../prompts");
@@ -37,6 +38,9 @@ This means that it will most likely produce an AAB and you will not be able to i
37
38
  await (0, validate_1.checkGoogleServicesFileAsync)(ctx);
38
39
  await (0, validate_1.validatePNGsForManagedProjectAsync)(ctx);
39
40
  const gradleContext = await (0, gradle_1.resolveGradleBuildContextAsync)(ctx.projectDir, buildProfile, ctx.vcsClient);
41
+ if (gradleContext?.buildType) {
42
+ maybeWarnAboutNonStandardBuildType({ buildProfile, buildType: gradleContext.buildType });
43
+ }
40
44
  if (ctx.workflow === eas_build_job_1.Workflow.MANAGED) {
41
45
  await (0, applicationId_1.ensureApplicationIdIsDefinedForManagedProjectAsync)(ctx);
42
46
  }
@@ -110,3 +114,16 @@ async function ensureAndroidCredentialsAsync(ctx) {
110
114
  source: credentialsSource,
111
115
  };
112
116
  }
117
+ function maybeWarnAboutNonStandardBuildType({ buildProfile, buildType, }) {
118
+ const shouldSuppressWarning = getenv_1.default.boolish('EAS_BUILD_NO_GRADLE_BUILD_TYPE_WARNING', false);
119
+ if (shouldSuppressWarning) {
120
+ return;
121
+ }
122
+ const knownValidBuildTypes = ['debug', 'release'];
123
+ if (!knownValidBuildTypes.includes(buildType)) {
124
+ log_1.default.warn(`Custom gradle command "${chalk_1.default.bold(buildProfile.gradleCommand)}" has non-standard build type: "${chalk_1.default.bold(buildType)}". Expected the command to end with "${chalk_1.default.bold('...Debug')}" or "${chalk_1.default.bold('...Release')}"`);
125
+ log_1.default.warn(`Ensure the command is spelled correctly and ${chalk_1.default.bold('build.gradle')} is configured correctly. To suppress this warning, set ${chalk_1.default.bold('EAS_BUILD_NO_GRADLE_BUILD_TYPE_WARNING=true')}.`);
126
+ log_1.default.warn((0, log_1.learnMore)('https://developer.android.com/build/build-variants#build-types'));
127
+ }
128
+ }
129
+ exports.maybeWarnAboutNonStandardBuildType = maybeWarnAboutNonStandardBuildType;
@@ -6,6 +6,8 @@ export default class WorkflowRun extends EasCommand {
6
6
  description: string;
7
7
  }[];
8
8
  static flags: {
9
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
10
+ wait: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
9
11
  'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
10
12
  };
11
13
  static contextDefinition: {
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
- const core_1 = require("@urql/core");
4
+ const core_1 = require("@oclif/core");
5
+ const core_2 = require("@urql/core");
5
6
  const path = tslib_1.__importStar(require("node:path"));
6
7
  const url_1 = require("../../build/utils/url");
7
8
  const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
@@ -9,16 +10,32 @@ const flags_1 = require("../../commandUtils/flags");
9
10
  const generated_1 = require("../../graphql/generated");
10
11
  const WorkflowRevisionMutation_1 = require("../../graphql/mutations/WorkflowRevisionMutation");
11
12
  const WorkflowRunMutation_1 = require("../../graphql/mutations/WorkflowRunMutation");
13
+ const WorkflowRunQuery_1 = require("../../graphql/queries/WorkflowRunQuery");
12
14
  const log_1 = tslib_1.__importStar(require("../../log"));
15
+ const ora_1 = require("../../ora");
13
16
  const projectUtils_1 = require("../../project/projectUtils");
14
17
  const uploadAccountScopedFileAsync_1 = require("../../project/uploadAccountScopedFileAsync");
15
18
  const uploadAccountScopedProjectSourceAsync_1 = require("../../project/uploadAccountScopedProjectSourceAsync");
19
+ const json_1 = require("../../utils/json");
20
+ const promise_1 = require("../../utils/promise");
16
21
  const workflowFile_1 = require("../../utils/workflowFile");
22
+ const EXIT_CODES = {
23
+ WORKFLOW_FAILED: 11,
24
+ WORKFLOW_CANCELED: 12,
25
+ WAIT_ABORTED: 13,
26
+ };
17
27
  class WorkflowRun extends EasCommand_1.default {
18
- static description = 'Run an EAS workflow';
28
+ static description = 'run an EAS workflow';
19
29
  static args = [{ name: 'file', description: 'Path to the workflow file to run' }];
20
30
  static flags = {
21
31
  ...flags_1.EASNonInteractiveFlag,
32
+ wait: core_1.Flags.boolean({
33
+ default: false,
34
+ allowNo: true,
35
+ description: 'Exit codes: 0 = success, 11 = failure, 12 = canceled, 13 = wait aborted.',
36
+ summary: 'Wait for workflow run to complete',
37
+ }),
38
+ ...flags_1.EasJsonOnlyFlag,
22
39
  };
23
40
  static contextDefinition = {
24
41
  ...this.ContextOptions.DynamicProjectConfig,
@@ -28,6 +45,9 @@ class WorkflowRun extends EasCommand_1.default {
28
45
  };
29
46
  async runAsync() {
30
47
  const { flags, args } = await this.parse(WorkflowRun);
48
+ if (flags.json) {
49
+ (0, json_1.enableJsonOutput)();
50
+ }
31
51
  const { getDynamicPrivateProjectConfigAsync, loggedIn: { graphqlClient }, vcsClient, projectDir, } = await this.getContextAsync(WorkflowRun, {
32
52
  nonInteractive: flags['non-interactive'],
33
53
  withServerSideEnvironment: null,
@@ -54,7 +74,7 @@ class WorkflowRun extends EasCommand_1.default {
54
74
  });
55
75
  }
56
76
  catch (error) {
57
- if (error instanceof core_1.CombinedError) {
77
+ if (error instanceof core_2.CombinedError) {
58
78
  workflowFile_1.WorkflowFile.maybePrintWorkflowFileValidationErrors({
59
79
  error,
60
80
  accountName: account.name,
@@ -89,8 +109,9 @@ class WorkflowRun extends EasCommand_1.default {
89
109
  log_1.default.error('Failed to upload project sources.');
90
110
  throw err;
91
111
  }
112
+ let workflowRunId;
92
113
  try {
93
- const { id: workflowRunId } = await WorkflowRunMutation_1.WorkflowRunMutation.createWorkflowRunAsync(graphqlClient, {
114
+ ({ id: workflowRunId } = await WorkflowRunMutation_1.WorkflowRunMutation.createWorkflowRunAsync(graphqlClient, {
94
115
  appId: projectId,
95
116
  workflowRevisionInput: {
96
117
  fileName: path.basename(args.file),
@@ -104,14 +125,83 @@ class WorkflowRun extends EasCommand_1.default {
104
125
  packageJsonBucketKey,
105
126
  },
106
127
  },
107
- });
128
+ }));
108
129
  log_1.default.newLine();
109
- log_1.default.succeed(`Workflow run started successfully. See logs: ${(0, log_1.link)((0, url_1.getWorkflowRunUrl)(account.name, projectName, workflowRunId))}`);
130
+ log_1.default.log(`See logs: ${(0, log_1.link)((0, url_1.getWorkflowRunUrl)(account.name, projectName, workflowRunId))}`);
110
131
  }
111
132
  catch (err) {
112
133
  log_1.default.error('Failed to start the workflow with the API.');
113
134
  throw err;
114
135
  }
136
+ if (!flags.wait) {
137
+ log_1.default.succeed('Workflow run started successfully.');
138
+ if (flags.json) {
139
+ (0, json_1.printJsonOnlyOutput)({
140
+ id: workflowRunId,
141
+ url: (0, url_1.getWorkflowRunUrl)(account.name, projectName, workflowRunId),
142
+ });
143
+ }
144
+ process.exit(0);
145
+ }
146
+ log_1.default.newLine();
147
+ const { status } = await waitForWorkflowRunToEndAsync(graphqlClient, {
148
+ workflowRunId,
149
+ });
150
+ if (flags.json) {
151
+ const workflowRun = await WorkflowRunQuery_1.WorkflowRunQuery.withJobsByIdAsync(graphqlClient, workflowRunId, {
152
+ useCache: false,
153
+ });
154
+ (0, json_1.printJsonOnlyOutput)({
155
+ ...workflowRun,
156
+ url: (0, url_1.getWorkflowRunUrl)(account.name, projectName, workflowRunId),
157
+ });
158
+ }
159
+ if (status === generated_1.WorkflowRunStatus.Failure) {
160
+ process.exit(EXIT_CODES.WORKFLOW_FAILED);
161
+ }
162
+ else if (status === generated_1.WorkflowRunStatus.Canceled) {
163
+ process.exit(EXIT_CODES.WORKFLOW_CANCELED);
164
+ }
115
165
  }
116
166
  }
117
167
  exports.default = WorkflowRun;
168
+ async function waitForWorkflowRunToEndAsync(graphqlClient, { workflowRunId }) {
169
+ log_1.default.log('Waiting for workflow run to complete. You can press Ctrl+C to exit.');
170
+ const spinner = (0, ora_1.ora)('Currently waiting for workflow run to start.').start();
171
+ let failedFetchesCount = 0;
172
+ while (true) {
173
+ try {
174
+ const workflowRun = await WorkflowRunQuery_1.WorkflowRunQuery.byIdAsync(graphqlClient, workflowRunId, {
175
+ useCache: false,
176
+ });
177
+ failedFetchesCount = 0;
178
+ switch (workflowRun.status) {
179
+ case generated_1.WorkflowRunStatus.InProgress:
180
+ spinner.start('Workflow run is in progress.');
181
+ break;
182
+ case generated_1.WorkflowRunStatus.ActionRequired:
183
+ spinner.warn('Workflow run is waiting for action.');
184
+ break;
185
+ case generated_1.WorkflowRunStatus.PendingCancel:
186
+ case generated_1.WorkflowRunStatus.Canceled:
187
+ spinner.warn('Workflow run has been canceled.');
188
+ return workflowRun;
189
+ case generated_1.WorkflowRunStatus.Failure:
190
+ spinner.fail('Workflow run has failed.');
191
+ return workflowRun;
192
+ case generated_1.WorkflowRunStatus.Success:
193
+ spinner.succeed('Workflow run completed successfully.');
194
+ return workflowRun;
195
+ }
196
+ }
197
+ catch {
198
+ spinner.text = '⚠ Failed to fetch the workflow run status. Check your network connection.';
199
+ failedFetchesCount += 1;
200
+ if (failedFetchesCount > 6) {
201
+ spinner.fail('Failed to fetch the workflow run status 6 times in a row. Aborting wait.');
202
+ process.exit(EXIT_CODES.WAIT_ABORTED);
203
+ }
204
+ }
205
+ await (0, promise_1.sleepAsync)(10 /* seconds */ * 1000 /* milliseconds */);
206
+ }
207
+ }
@@ -529,6 +529,8 @@ export type AccountMutation = {
529
529
  changePlan: Account;
530
530
  /** Add specified account Permissions for Actor. Actor must already have at least one permission on the account. */
531
531
  grantActorPermissions: Account;
532
+ /** Remove profile image for the account. Do nothing if there's no profile image associated. */
533
+ removeProfileImage: Account;
532
534
  /** Rename this account and the primary user's username if this account is a personal account */
533
535
  rename: Account;
534
536
  /** Requests a refund for the specified charge by requesting a manual refund from support */
@@ -558,6 +560,9 @@ export type AccountMutationGrantActorPermissionsArgs = {
558
560
  actorID: Scalars['ID']['input'];
559
561
  permissions?: InputMaybe<Array<InputMaybe<Permission>>>;
560
562
  };
563
+ export type AccountMutationRemoveProfileImageArgs = {
564
+ accountID: Scalars['ID']['input'];
565
+ };
561
566
  export type AccountMutationRenameArgs = {
562
567
  accountID: Scalars['ID']['input'];
563
568
  newName: Scalars['String']['input'];
@@ -1574,10 +1579,10 @@ export type AppMutation = {
1574
1579
  __typename?: 'AppMutation';
1575
1580
  /** Create an app */
1576
1581
  createApp: App;
1577
- /** Create an app and GitHub repository if user desire to */
1578
- createAppAndGithubRepository: CreateAppAndGithubRepositoryResponse;
1579
1582
  /** @deprecated No longer supported */
1580
1583
  grantAccess?: Maybe<App>;
1584
+ /** Remove profile image (icon) for the app. Do nothing if there's no profile image associated. */
1585
+ removeProfileImage: App;
1581
1586
  /** Delete an App. Returns the ID of the background job receipt. Use BackgroundJobReceiptQuery to get the status of the job. */
1582
1587
  scheduleAppDeletion: BackgroundJobReceipt;
1583
1588
  /** Set display info for app */
@@ -1590,13 +1595,13 @@ export type AppMutation = {
1590
1595
  export type AppMutationCreateAppArgs = {
1591
1596
  appInput: AppInput;
1592
1597
  };
1593
- export type AppMutationCreateAppAndGithubRepositoryArgs = {
1594
- appInput: AppWithGithubRepositoryInput;
1595
- };
1596
1598
  export type AppMutationGrantAccessArgs = {
1597
1599
  accessLevel?: InputMaybe<Scalars['String']['input']>;
1598
1600
  toUser: Scalars['ID']['input'];
1599
1601
  };
1602
+ export type AppMutationRemoveProfileImageArgs = {
1603
+ appId: Scalars['ID']['input'];
1604
+ };
1600
1605
  export type AppMutationScheduleAppDeletionArgs = {
1601
1606
  appId: Scalars['ID']['input'];
1602
1607
  };
@@ -2162,6 +2167,15 @@ export type AscApiKeyInput = {
2162
2167
  keyIdentifier: Scalars['String']['input'];
2163
2168
  keyP8: Scalars['String']['input'];
2164
2169
  };
2170
+ export type Asset = {
2171
+ __typename?: 'Asset';
2172
+ contentType: Scalars['String']['output'];
2173
+ fileSHA256: Scalars['String']['output'];
2174
+ fileSize: Scalars['Int']['output'];
2175
+ finalFileSize?: Maybe<Scalars['Int']['output']>;
2176
+ id: Scalars['ID']['output'];
2177
+ storageKey: Scalars['String']['output'];
2178
+ };
2165
2179
  export type AssetMapGroup = {
2166
2180
  android?: InputMaybe<AssetMapSourceInput>;
2167
2181
  ios?: InputMaybe<AssetMapSourceInput>;
@@ -2197,12 +2211,29 @@ export type AssetMutationGetSignedAssetUploadSpecificationsArgs = {
2197
2211
  /** Check to see if assets with given storageKeys exist */
2198
2212
  export type AssetQuery = {
2199
2213
  __typename?: 'AssetQuery';
2214
+ byStorageKeys: Array<Asset>;
2200
2215
  metadata: Array<AssetMetadataResult>;
2216
+ signedUrls: Array<AssetSignedUrlResult>;
2217
+ };
2218
+ /** Check to see if assets with given storageKeys exist */
2219
+ export type AssetQueryByStorageKeysArgs = {
2220
+ storageKeys: Array<Scalars['String']['input']>;
2201
2221
  };
2202
2222
  /** Check to see if assets with given storageKeys exist */
2203
2223
  export type AssetQueryMetadataArgs = {
2204
2224
  storageKeys: Array<Scalars['String']['input']>;
2205
2225
  };
2226
+ /** Check to see if assets with given storageKeys exist */
2227
+ export type AssetQuerySignedUrlsArgs = {
2228
+ storageKeys: Array<Scalars['String']['input']>;
2229
+ updateId: Scalars['ID']['input'];
2230
+ };
2231
+ export type AssetSignedUrlResult = {
2232
+ __typename?: 'AssetSignedUrlResult';
2233
+ headers?: Maybe<Scalars['JSON']['output']>;
2234
+ storageKey: Scalars['String']['output'];
2235
+ url: Scalars['String']['output'];
2236
+ };
2206
2237
  export type AuditLog = {
2207
2238
  __typename?: 'AuditLog';
2208
2239
  account?: Maybe<Account>;
@@ -2270,9 +2301,11 @@ export declare enum AuthProviderIdentifier {
2270
2301
  OneLogin = "ONE_LOGIN",
2271
2302
  StubIdp = "STUB_IDP"
2272
2303
  }
2273
- export type AverageMetrics = {
2274
- __typename?: 'AverageMetrics';
2275
- averageDownloadSize: Scalars['Int']['output'];
2304
+ export type AverageAssetMetrics = {
2305
+ __typename?: 'AverageAssetMetrics';
2306
+ averageDownloadSizeBytes: Scalars['Int']['output'];
2307
+ count: Scalars['Int']['output'];
2308
+ storageKey: Scalars['String']['output'];
2276
2309
  };
2277
2310
  export type BackgroundJobReceipt = {
2278
2311
  __typename?: 'BackgroundJobReceipt';
@@ -2921,11 +2954,6 @@ export type CreateAndroidSubmissionInput = {
2921
2954
  config: AndroidSubmissionConfigInput;
2922
2955
  submittedBuildId?: InputMaybe<Scalars['ID']['input']>;
2923
2956
  };
2924
- export type CreateAppAndGithubRepositoryResponse = {
2925
- __typename?: 'CreateAppAndGithubRepositoryResponse';
2926
- app: App;
2927
- cloneUrl?: Maybe<Scalars['String']['output']>;
2928
- };
2929
2957
  export type CreateBuildResult = {
2930
2958
  __typename?: 'CreateBuildResult';
2931
2959
  build: Build;
@@ -3014,6 +3042,11 @@ export type CreateSubmissionResult = {
3014
3042
  /** Created submission */
3015
3043
  submission: Submission;
3016
3044
  };
3045
+ export type CumulativeAverageMetrics = {
3046
+ __typename?: 'CumulativeAverageMetrics';
3047
+ averageUpdatePayloadBytes: Scalars['Int']['output'];
3048
+ launchAssetCount: Scalars['Int']['output'];
3049
+ };
3017
3050
  export type CumulativeMetrics = {
3018
3051
  __typename?: 'CumulativeMetrics';
3019
3052
  data: UpdatesMetricsData;
@@ -3383,6 +3416,7 @@ export declare enum EasServiceMetric {
3383
3416
  AssetsRequests = "ASSETS_REQUESTS",
3384
3417
  BandwidthUsage = "BANDWIDTH_USAGE",
3385
3418
  Builds = "BUILDS",
3419
+ LocalBuilds = "LOCAL_BUILDS",
3386
3420
  ManifestRequests = "MANIFEST_REQUESTS",
3387
3421
  RunTime = "RUN_TIME",
3388
3422
  UniqueUpdaters = "UNIQUE_UPDATERS",
@@ -4938,6 +4972,7 @@ export declare enum RequestMethod {
4938
4972
  export type RequestsFilters = {
4939
4973
  cacheStatus?: InputMaybe<Array<ResponseCacheStatus>>;
4940
4974
  continent?: InputMaybe<Array<ContinentCode>>;
4975
+ country?: InputMaybe<Array<Scalars['String']['input']>>;
4941
4976
  hasCustomDomainOrigin?: InputMaybe<Scalars['Boolean']['input']>;
4942
4977
  isAsset?: InputMaybe<Scalars['Boolean']['input']>;
4943
4978
  isCrash?: InputMaybe<Scalars['Boolean']['input']>;
@@ -5310,6 +5345,7 @@ export type RootQueryAppByAppIdArgs = {
5310
5345
  };
5311
5346
  export type RootQueryUpdatesByGroupArgs = {
5312
5347
  group: Scalars['ID']['input'];
5348
+ platform?: InputMaybe<Scalars['String']['input']>;
5313
5349
  };
5314
5350
  export type RootQueryUserByUserIdArgs = {
5315
5351
  userId: Scalars['String']['input'];
@@ -6087,7 +6123,8 @@ export type UpdateInfoGroup = {
6087
6123
  };
6088
6124
  export type UpdateInsights = {
6089
6125
  __typename?: 'UpdateInsights';
6090
- averageMetrics: AverageMetrics;
6126
+ averageAssetMetrics: Array<AverageAssetMetrics>;
6127
+ cumulativeAverageMetrics: CumulativeAverageMetrics;
6091
6128
  cumulativeMetrics: CumulativeMetrics;
6092
6129
  id: Scalars['ID']['output'];
6093
6130
  totalUniqueUsers: Scalars['Int']['output'];
@@ -6580,7 +6617,12 @@ export declare enum UserEntityTypeName {
6580
6617
  export type UserInvitation = {
6581
6618
  __typename?: 'UserInvitation';
6582
6619
  accountName: Scalars['String']['output'];
6583
- /** If the invite is for a personal team, the profile photo of account owner */
6620
+ /** The profile image URL of the account owner */
6621
+ accountProfileImageUrl: Scalars['String']['output'];
6622
+ /**
6623
+ * If the invite is for a personal team, the profile photo of account owner
6624
+ * @deprecated Use accountProfileImageUrl
6625
+ */
6584
6626
  accountProfilePhoto?: Maybe<Scalars['String']['output']>;
6585
6627
  created: Scalars['DateTime']['output'];
6586
6628
  /** Email to which this invitation was sent */
@@ -6643,6 +6685,7 @@ export type UserInvitationMutationResendUserInvitationArgs = {
6643
6685
  export type UserInvitationPublicData = {
6644
6686
  __typename?: 'UserInvitationPublicData';
6645
6687
  accountName: Scalars['String']['output'];
6688
+ accountProfileImageUrl: Scalars['String']['output'];
6646
6689
  accountProfilePhoto?: Maybe<Scalars['String']['output']>;
6647
6690
  created: Scalars['DateTime']['output'];
6648
6691
  email: Scalars['String']['output'];
@@ -6841,6 +6884,8 @@ export type WorkerDeployment = ActivityTimelineProjectActivity & {
6841
6884
  initiatingActor?: Maybe<Actor>;
6842
6885
  logs?: Maybe<WorkerDeploymentLogs>;
6843
6886
  requests?: Maybe<WorkerDeploymentRequests>;
6887
+ signedAssetsURL: Scalars['String']['output'];
6888
+ signedDeploymentURL: Scalars['String']['output'];
6844
6889
  subdomain: Scalars['String']['output'];
6845
6890
  url: Scalars['String']['output'];
6846
6891
  };
@@ -14277,6 +14322,52 @@ export type WebhookByIdQuery = {
14277
14322
  };
14278
14323
  };
14279
14324
  };
14325
+ export type WorkflowRunByIdQueryVariables = Exact<{
14326
+ workflowRunId: Scalars['ID']['input'];
14327
+ }>;
14328
+ export type WorkflowRunByIdQuery = {
14329
+ __typename?: 'RootQuery';
14330
+ workflowRuns: {
14331
+ __typename?: 'WorkflowRunQuery';
14332
+ byId: {
14333
+ __typename?: 'WorkflowRun';
14334
+ id: string;
14335
+ status: WorkflowRunStatus;
14336
+ };
14337
+ };
14338
+ };
14339
+ export type WorkflowRunByIdWithJobsQueryVariables = Exact<{
14340
+ workflowRunId: Scalars['ID']['input'];
14341
+ }>;
14342
+ export type WorkflowRunByIdWithJobsQuery = {
14343
+ __typename?: 'RootQuery';
14344
+ workflowRuns: {
14345
+ __typename?: 'WorkflowRunQuery';
14346
+ byId: {
14347
+ __typename?: 'WorkflowRun';
14348
+ id: string;
14349
+ name: string;
14350
+ status: WorkflowRunStatus;
14351
+ createdAt: any;
14352
+ workflow: {
14353
+ __typename?: 'Workflow';
14354
+ id: string;
14355
+ name?: string | null;
14356
+ fileName: string;
14357
+ };
14358
+ jobs: Array<{
14359
+ __typename?: 'WorkflowJob';
14360
+ id: string;
14361
+ key: string;
14362
+ name: string;
14363
+ type: WorkflowJobType;
14364
+ status: WorkflowJobStatus;
14365
+ outputs: any;
14366
+ createdAt: any;
14367
+ }>;
14368
+ };
14369
+ };
14370
+ };
14280
14371
  export type AccountFragment = {
14281
14372
  __typename?: 'Account';
14282
14373
  id: string;
@@ -341,6 +341,7 @@ var EasServiceMetric;
341
341
  EasServiceMetric["AssetsRequests"] = "ASSETS_REQUESTS";
342
342
  EasServiceMetric["BandwidthUsage"] = "BANDWIDTH_USAGE";
343
343
  EasServiceMetric["Builds"] = "BUILDS";
344
+ EasServiceMetric["LocalBuilds"] = "LOCAL_BUILDS";
344
345
  EasServiceMetric["ManifestRequests"] = "MANIFEST_REQUESTS";
345
346
  EasServiceMetric["RunTime"] = "RUN_TIME";
346
347
  EasServiceMetric["UniqueUpdaters"] = "UNIQUE_UPDATERS";
@@ -0,0 +1,10 @@
1
+ import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
2
+ import { WorkflowRunByIdQuery, WorkflowRunByIdWithJobsQuery } from '../generated';
3
+ export declare const WorkflowRunQuery: {
4
+ byIdAsync(graphqlClient: ExpoGraphqlClient, workflowRunId: string, { useCache }?: {
5
+ useCache?: boolean | undefined;
6
+ }): Promise<WorkflowRunByIdQuery['workflowRuns']['byId']>;
7
+ withJobsByIdAsync(graphqlClient: ExpoGraphqlClient, workflowRunId: string, { useCache }?: {
8
+ useCache?: boolean | undefined;
9
+ }): Promise<WorkflowRunByIdWithJobsQuery['workflowRuns']['byId']>;
10
+ };
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WorkflowRunQuery = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
6
+ const client_1 = require("../client");
7
+ exports.WorkflowRunQuery = {
8
+ async byIdAsync(graphqlClient, workflowRunId, { useCache = true } = {}) {
9
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
10
+ .query((0, graphql_tag_1.default) `
11
+ query WorkflowRunById($workflowRunId: ID!) {
12
+ workflowRuns {
13
+ byId(workflowRunId: $workflowRunId) {
14
+ id
15
+ status
16
+ }
17
+ }
18
+ }
19
+ `, { workflowRunId }, {
20
+ requestPolicy: useCache ? 'cache-first' : 'network-only',
21
+ additionalTypenames: ['WorkflowRun'],
22
+ })
23
+ .toPromise());
24
+ return data.workflowRuns.byId;
25
+ },
26
+ async withJobsByIdAsync(graphqlClient, workflowRunId, { useCache = true } = {}) {
27
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
28
+ .query((0, graphql_tag_1.default) `
29
+ query WorkflowRunByIdWithJobs($workflowRunId: ID!) {
30
+ workflowRuns {
31
+ byId(workflowRunId: $workflowRunId) {
32
+ id
33
+ name
34
+ status
35
+ createdAt
36
+
37
+ workflow {
38
+ id
39
+ name
40
+ fileName
41
+ }
42
+
43
+ jobs {
44
+ id
45
+ key
46
+ name
47
+ type
48
+ status
49
+ outputs
50
+ createdAt
51
+ }
52
+ }
53
+ }
54
+ }
55
+ `, { workflowRunId }, {
56
+ requestPolicy: useCache ? 'cache-first' : 'network-only',
57
+ additionalTypenames: ['WorkflowRun'],
58
+ })
59
+ .toPromise());
60
+ return data.workflowRuns.byId;
61
+ },
62
+ };
@@ -4,5 +4,6 @@ import { Client } from '../../vcs/vcs';
4
4
  export interface GradleBuildContext {
5
5
  moduleName?: string;
6
6
  flavor?: string;
7
+ buildType?: string;
7
8
  }
8
9
  export declare function resolveGradleBuildContextAsync(projectDir: string, buildProfile: BuildProfile<Platform.ANDROID>, vcsClient: Client): Promise<GradleBuildContext | undefined>;
@@ -22,6 +22,7 @@ async function resolveGradleBuildContextAsync(projectDir, buildProfile, vcsClien
22
22
  return {
23
23
  moduleName: parsedGradleCommand?.moduleName ?? gradleUtils.DEFAULT_MODULE_NAME,
24
24
  flavor: parsedGradleCommand?.flavor,
25
+ buildType: parsedGradleCommand?.buildType,
25
26
  };
26
27
  }
27
28
  else {
@@ -48,7 +48,7 @@ function parseGradleCommand(cmd, buildGradle) {
48
48
  // separate moduleName and rest of the definition
49
49
  const splitCmd = rawCmd.split(':');
50
50
  const [moduleName, taskName] = splitCmd.length > 1 ? [splitCmd[0], splitCmd[1]] : [undefined, splitCmd[0]];
51
- const matchResult = taskName.match(/(build|bundle|assemble|package)(.*)(Release|Debug)/);
51
+ const matchResult = taskName.match(/(build|bundle|assemble|package)(.*)([A-Z][a-z]+)/);
52
52
  if (!matchResult) {
53
53
  throw new Error(`Failed to parse gradle command: ${cmd}`);
54
54
  }
@@ -70,10 +70,13 @@ function parseGradleCommand(cmd, buildGradle) {
70
70
  throw new Error(`flavor ${firstLetter.toLowerCase().concat(rest)} is not defined`);
71
71
  }
72
72
  }
73
+ const buildType = matchResult[3]
74
+ ? matchResult[3].charAt(0).toLowerCase() + matchResult[3].slice(1)
75
+ : undefined;
73
76
  return {
74
77
  moduleName,
75
78
  flavor,
76
- buildType: matchResult[3] ? matchResult[3].toLowerCase() : undefined,
79
+ buildType,
77
80
  };
78
81
  }
79
82
  exports.parseGradleCommand = parseGradleCommand;
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "16.4.0",
2
+ "version": "16.5.0",
3
3
  "commands": {
4
4
  "analytics": {
5
5
  "id": "analytics",
@@ -4171,7 +4171,7 @@
4171
4171
  },
4172
4172
  "workflow:run": {
4173
4173
  "id": "workflow:run",
4174
- "description": "Run an EAS workflow",
4174
+ "description": "run an EAS workflow",
4175
4175
  "strict": true,
4176
4176
  "pluginName": "eas-cli",
4177
4177
  "pluginAlias": "eas-cli",
@@ -4183,6 +4183,19 @@
4183
4183
  "type": "boolean",
4184
4184
  "description": "Run the command in non-interactive mode.",
4185
4185
  "allowNo": false
4186
+ },
4187
+ "wait": {
4188
+ "name": "wait",
4189
+ "type": "boolean",
4190
+ "summary": "Wait for workflow run to complete",
4191
+ "description": "Exit codes: 0 = success, 11 = failure, 12 = canceled, 13 = wait aborted.",
4192
+ "allowNo": true
4193
+ },
4194
+ "json": {
4195
+ "name": "json",
4196
+ "type": "boolean",
4197
+ "description": "Enable JSON output, non-JSON messages will be printed to stderr.",
4198
+ "allowNo": false
4186
4199
  }
4187
4200
  },
4188
4201
  "args": {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "eas-cli",
3
3
  "description": "EAS command line tool",
4
- "version": "16.4.0",
4
+ "version": "16.5.0",
5
5
  "author": "Expo <support@expo.dev>",
6
6
  "bin": {
7
7
  "eas": "./bin/run"
@@ -239,5 +239,5 @@
239
239
  "node": "20.11.0",
240
240
  "yarn": "1.22.21"
241
241
  },
242
- "gitHead": "da4c41b9b715ff89d241deea1e24b3e179798620"
242
+ "gitHead": "a4a7b1c57f74c2d0f04d842d505218be5a3d0c2e"
243
243
  }