eas-cli 16.7.2 → 16.9.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 (31) hide show
  1. package/README.md +128 -78
  2. package/build/build/runBuildAndSubmit.js +7 -6
  3. package/build/commandUtils/context/contextUtils/findProjectDirAndVerifyProjectSetupAsync.d.ts +3 -1
  4. package/build/commandUtils/context/contextUtils/findProjectDirAndVerifyProjectSetupAsync.js +7 -3
  5. package/build/commands/build/configure.js +2 -2
  6. package/build/commands/submit/internal.js +1 -0
  7. package/build/commands/submit.d.ts +1 -0
  8. package/build/commands/submit.js +8 -1
  9. package/build/commands/update/configure.js +2 -2
  10. package/build/commands/update/index.js +4 -4
  11. package/build/commands/update/roll-back-to-embedded.js +2 -2
  12. package/build/commands/workflow/list.d.ts +12 -0
  13. package/build/commands/workflow/list.js +52 -0
  14. package/build/commands/workflow/run.js +0 -1
  15. package/build/commands/workflow/runs.d.ts +16 -0
  16. package/build/commands/workflow/runs.js +87 -0
  17. package/build/graphql/generated.d.ts +135 -4
  18. package/build/graphql/generated.js +2 -1
  19. package/build/graphql/queries/AppQuery.d.ts +3 -1
  20. package/build/graphql/queries/AppQuery.js +57 -0
  21. package/build/graphql/queries/WorkflowRunQuery.d.ts +2 -1
  22. package/build/graphql/queries/WorkflowRunQuery.js +38 -0
  23. package/build/graphql/types/Workflow.d.ts +1 -0
  24. package/build/graphql/types/Workflow.js +14 -0
  25. package/build/graphql/types/WorkflowRun.d.ts +1 -0
  26. package/build/graphql/types/WorkflowRun.js +20 -0
  27. package/build/submit/context.d.ts +2 -0
  28. package/build/submit/context.js +12 -1
  29. package/build/submit/ios/IosSubmitter.js +2 -1
  30. package/oclif.manifest.json +81 -1
  31. package/package.json +3 -3
@@ -136,6 +136,7 @@ var AuthProtocolType;
136
136
  })(AuthProtocolType || (exports.AuthProtocolType = AuthProtocolType = {}));
137
137
  var AuthProviderIdentifier;
138
138
  (function (AuthProviderIdentifier) {
139
+ AuthProviderIdentifier["Generic"] = "GENERIC";
139
140
  AuthProviderIdentifier["GoogleWs"] = "GOOGLE_WS";
140
141
  AuthProviderIdentifier["MsEntraId"] = "MS_ENTRA_ID";
141
142
  AuthProviderIdentifier["Okta"] = "OKTA";
@@ -878,6 +879,7 @@ var WorkflowJobType;
878
879
  WorkflowJobType["Build"] = "BUILD";
879
880
  WorkflowJobType["Custom"] = "CUSTOM";
880
881
  WorkflowJobType["Deploy"] = "DEPLOY";
882
+ WorkflowJobType["Doc"] = "DOC";
881
883
  WorkflowJobType["Fingerprint"] = "FINGERPRINT";
882
884
  WorkflowJobType["GetBuild"] = "GET_BUILD";
883
885
  WorkflowJobType["MaestroCloud"] = "MAESTRO_CLOUD";
@@ -898,7 +900,6 @@ var WorkflowRunStatus;
898
900
  WorkflowRunStatus["Failure"] = "FAILURE";
899
901
  WorkflowRunStatus["InProgress"] = "IN_PROGRESS";
900
902
  WorkflowRunStatus["New"] = "NEW";
901
- WorkflowRunStatus["PendingCancel"] = "PENDING_CANCEL";
902
903
  WorkflowRunStatus["Success"] = "SUCCESS";
903
904
  })(WorkflowRunStatus || (exports.WorkflowRunStatus = WorkflowRunStatus = {}));
904
905
  var WorkflowRunTriggerEventType;
@@ -1,6 +1,8 @@
1
1
  import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
2
- import { AppFragment } from '../generated';
2
+ import { AppFragment, WorkflowFragment, WorkflowRunFragment, WorkflowRunStatus } from '../generated';
3
3
  export declare const AppQuery: {
4
4
  byIdAsync(graphqlClient: ExpoGraphqlClient, projectId: string): Promise<AppFragment>;
5
5
  byFullNameAsync(graphqlClient: ExpoGraphqlClient, fullName: string): Promise<AppFragment>;
6
+ byIdWorkflowsAsync(graphqlClient: ExpoGraphqlClient, appId: string): Promise<WorkflowFragment[]>;
7
+ byIdWorkflowRunsFilteredByStatusAsync(graphqlClient: ExpoGraphqlClient, appId: string, status?: WorkflowRunStatus, limit?: number): Promise<WorkflowRunFragment[]>;
6
8
  };
@@ -2,11 +2,14 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AppQuery = void 0;
4
4
  const tslib_1 = require("tslib");
5
+ /* eslint-disable graphql/template-strings */
5
6
  const assert_1 = tslib_1.__importDefault(require("assert"));
6
7
  const graphql_1 = require("graphql");
7
8
  const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
8
9
  const client_1 = require("../client");
9
10
  const App_1 = require("../types/App");
11
+ const Workflow_1 = require("../types/Workflow");
12
+ const WorkflowRun_1 = require("../types/WorkflowRun");
10
13
  exports.AppQuery = {
11
14
  async byIdAsync(graphqlClient, projectId) {
12
15
  const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
@@ -46,4 +49,58 @@ exports.AppQuery = {
46
49
  (0, assert_1.default)(data.app, 'GraphQL: `app` not defined in server response');
47
50
  return data.app.byFullName;
48
51
  },
52
+ async byIdWorkflowsAsync(graphqlClient, appId) {
53
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
54
+ .query((0, graphql_tag_1.default) `
55
+ query AppByIdWorkflowsQuery($appId: String!) {
56
+ app {
57
+ byId(appId: $appId) {
58
+ id
59
+ workflows {
60
+ id
61
+ ...WorkflowFragment
62
+ }
63
+ }
64
+ }
65
+ }
66
+ ${(0, graphql_1.print)(Workflow_1.WorkflowFragmentNode)}
67
+ `, { appId }, { additionalTypenames: ['App'] })
68
+ .toPromise());
69
+ (0, assert_1.default)(data.app, 'GraphQL: `app` not defined in server response');
70
+ return data.app.byId.workflows;
71
+ },
72
+ async byIdWorkflowRunsFilteredByStatusAsync(graphqlClient, appId, status, limit) {
73
+ validateLimit(limit);
74
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
75
+ .query((0, graphql_tag_1.default) `
76
+ query AppByIdWorkflowRunsFilteredByStatusQuery(
77
+ $appId: String!
78
+ $status: WorkflowRunStatus
79
+ $limit: Int!
80
+ ) {
81
+ app {
82
+ byId(appId: $appId) {
83
+ id
84
+ runs: workflowRunsPaginated(first: $limit, filter: { status: $status }) {
85
+ edges {
86
+ node {
87
+ id
88
+ ...WorkflowRunFragment
89
+ }
90
+ }
91
+ }
92
+ }
93
+ }
94
+ }
95
+ ${(0, graphql_1.print)(WorkflowRun_1.WorkflowRunFragmentNode)}
96
+ `, { appId, status, limit }, { additionalTypenames: ['App'] })
97
+ .toPromise());
98
+ (0, assert_1.default)(data.app, 'GraphQL: `app` not defined in server response');
99
+ return data.app.byId.runs.edges.map(edge => edge.node);
100
+ },
49
101
  };
102
+ function validateLimit(limit) {
103
+ (0, assert_1.default)(limit, 'limit is required');
104
+ (0, assert_1.default)(limit > 0, 'limit must be greater than 0');
105
+ (0, assert_1.default)(limit <= 100, 'limit must be less than or equal to 100');
106
+ }
@@ -1,5 +1,5 @@
1
1
  import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
2
- import { WorkflowRunByIdQuery, WorkflowRunByIdWithJobsQuery } from '../generated';
2
+ import { WorkflowRunByIdQuery, WorkflowRunByIdWithJobsQuery, WorkflowRunFragment, WorkflowRunStatus } from '../generated';
3
3
  export declare const WorkflowRunQuery: {
4
4
  byIdAsync(graphqlClient: ExpoGraphqlClient, workflowRunId: string, { useCache }?: {
5
5
  useCache?: boolean | undefined;
@@ -7,4 +7,5 @@ export declare const WorkflowRunQuery: {
7
7
  withJobsByIdAsync(graphqlClient: ExpoGraphqlClient, workflowRunId: string, { useCache }?: {
8
8
  useCache?: boolean | undefined;
9
9
  }): Promise<WorkflowRunByIdWithJobsQuery['workflowRuns']['byId']>;
10
+ byAppIdFileNameAndStatusAsync(graphqlClient: ExpoGraphqlClient, appId: string, fileName: string, status?: WorkflowRunStatus, limit?: number): Promise<WorkflowRunFragment[]>;
10
11
  };
@@ -2,8 +2,11 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.WorkflowRunQuery = void 0;
4
4
  const tslib_1 = require("tslib");
5
+ const assert_1 = tslib_1.__importDefault(require("assert"));
6
+ const graphql_1 = require("graphql");
5
7
  const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
6
8
  const client_1 = require("../client");
9
+ const WorkflowRun_1 = require("../types/WorkflowRun");
7
10
  exports.WorkflowRunQuery = {
8
11
  async byIdAsync(graphqlClient, workflowRunId, { useCache = true } = {}) {
9
12
  const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
@@ -59,4 +62,39 @@ exports.WorkflowRunQuery = {
59
62
  .toPromise());
60
63
  return data.workflowRuns.byId;
61
64
  },
65
+ async byAppIdFileNameAndStatusAsync(graphqlClient, appId, fileName, status, limit) {
66
+ validateLimit(limit);
67
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
68
+ .query((0, graphql_tag_1.default) `
69
+ query WorkflowRunsForAppIdFileNameAndStatusQuery(
70
+ $appId: ID!
71
+ $fileName: String!
72
+ $status: WorkflowRunStatus
73
+ $limit: Int!
74
+ ) {
75
+ workflows {
76
+ byAppIdAndFileName(appId: $appId, fileName: $fileName) {
77
+ id
78
+ runs: runsPaginated(first: $limit, filter: { status: $status }) {
79
+ edges {
80
+ node {
81
+ id
82
+ ...WorkflowRunFragment
83
+ }
84
+ }
85
+ }
86
+ }
87
+ }
88
+ }
89
+ ${(0, graphql_1.print)(WorkflowRun_1.WorkflowRunFragmentNode)}
90
+ `, { appId, fileName, status, limit }, { additionalTypenames: ['Workflow'] })
91
+ .toPromise());
92
+ (0, assert_1.default)(data.workflows, 'GraphQL: `workflows` not defined in server response');
93
+ return data.workflows.byAppIdAndFileName.runs.edges.map(edge => edge.node);
94
+ },
62
95
  };
96
+ function validateLimit(limit) {
97
+ (0, assert_1.default)(limit, 'limit is required');
98
+ (0, assert_1.default)(limit > 0, 'limit must be greater than 0');
99
+ (0, assert_1.default)(limit <= 100, 'limit must be less than or equal to 100');
100
+ }
@@ -0,0 +1 @@
1
+ export declare const WorkflowFragmentNode: import("graphql").DocumentNode;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WorkflowFragmentNode = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
6
+ exports.WorkflowFragmentNode = (0, graphql_tag_1.default) `
7
+ fragment WorkflowFragment on Workflow {
8
+ id
9
+ name
10
+ fileName
11
+ createdAt
12
+ updatedAt
13
+ }
14
+ `;
@@ -0,0 +1 @@
1
+ export declare const WorkflowRunFragmentNode: import("graphql").DocumentNode;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WorkflowRunFragmentNode = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
6
+ exports.WorkflowRunFragmentNode = (0, graphql_tag_1.default) `
7
+ fragment WorkflowRunFragment on WorkflowRun {
8
+ id
9
+ status
10
+ gitCommitMessage
11
+ gitCommitHash
12
+ createdAt
13
+ updatedAt
14
+ workflow {
15
+ id
16
+ name
17
+ fileName
18
+ }
19
+ }
20
+ `;
@@ -14,6 +14,7 @@ export interface SubmissionContext<T extends Platform> {
14
14
  exp: ExpoConfig;
15
15
  nonInteractive: boolean;
16
16
  isVerboseFastlaneEnabled: boolean;
17
+ groups: T extends Platform.IOS ? string[] : undefined;
17
18
  platform: T;
18
19
  profile: SubmitProfile<T>;
19
20
  projectDir: string;
@@ -38,6 +39,7 @@ export declare function createSubmissionContextAsync<T extends Platform>(params:
38
39
  env?: Record<string, string>;
39
40
  nonInteractive: boolean;
40
41
  isVerboseFastlaneEnabled: boolean;
42
+ groups: string[] | undefined;
41
43
  platform: T;
42
44
  profile: SubmitProfile<T>;
43
45
  projectDir: string;
@@ -1,12 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createSubmissionContextAsync = void 0;
4
+ const eas_build_job_1 = require("@expo/eas-build-job");
4
5
  const uuid_1 = require("uuid");
5
6
  const AnalyticsManager_1 = require("../analytics/AnalyticsManager");
6
7
  const context_1 = require("../credentials/context");
7
8
  const projectUtils_1 = require("../project/projectUtils");
8
9
  async function createSubmissionContextAsync(params) {
9
- const { applicationIdentifier, projectDir, nonInteractive, actor, exp, projectId, graphqlClient, analytics, vcsClient, } = params;
10
+ const { applicationIdentifier, projectDir, nonInteractive, actor, exp, projectId, graphqlClient, analytics, vcsClient, profile, groups: groupsFromParams, platform, } = params;
10
11
  const { env, ...rest } = params;
11
12
  const projectName = exp.slug;
12
13
  const account = await (0, projectUtils_1.getOwnerAccountForProjectIdAsync)(graphqlClient, projectId);
@@ -23,6 +24,15 @@ async function createSubmissionContextAsync(params) {
23
24
  vcsClient,
24
25
  });
25
26
  }
27
+ let groups;
28
+ if (platform === eas_build_job_1.Platform.IOS) {
29
+ groups = (groupsFromParams ??
30
+ profile.groups ??
31
+ []);
32
+ }
33
+ else {
34
+ groups = undefined;
35
+ }
26
36
  const analyticsEventProperties = {
27
37
  tracking_id: (0, uuid_1.v4)(),
28
38
  platform: params.platform,
@@ -34,6 +44,7 @@ async function createSubmissionContextAsync(params) {
34
44
  ...rest,
35
45
  accountName: account.name,
36
46
  credentialsCtx,
47
+ groups,
37
48
  projectName,
38
49
  user: actor,
39
50
  analyticsEventProperties,
@@ -62,11 +62,12 @@ class IosSubmitter extends BaseSubmitter_1.default {
62
62
  formatSubmissionConfig(options, { credentials }) {
63
63
  const { appSpecificPassword, ascApiKeyResult } = credentials;
64
64
  const { appleIdUsername, ascAppIdentifier } = options;
65
- const { isVerboseFastlaneEnabled } = this.ctx;
65
+ const { isVerboseFastlaneEnabled, groups } = this.ctx;
66
66
  return {
67
67
  ascAppIdentifier,
68
68
  appleIdUsername,
69
69
  isVerboseFastlaneEnabled,
70
+ groups,
70
71
  ...(appSpecificPassword ? this.formatAppSpecificPassword(appSpecificPassword) : null),
71
72
  ...(ascApiKeyResult?.result ? this.formatAscApiKeyResult(ascApiKeyResult.result) : null),
72
73
  };
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "16.7.2",
2
+ "version": "16.9.0",
3
3
  "commands": {
4
4
  "analytics": {
5
5
  "id": "analytics",
@@ -198,6 +198,13 @@
198
198
  "description": "Enable verbose logging for the submission process",
199
199
  "allowNo": false
200
200
  },
201
+ "groups": {
202
+ "name": "groups",
203
+ "type": "option",
204
+ "char": "g",
205
+ "description": "Internal TestFlight testing groups to add the build to (iOS only). Learn more: https://developer.apple.com/help/app-store-connect/test-a-beta-version/add-internal-testers",
206
+ "multiple": true
207
+ },
201
208
  "non-interactive": {
202
209
  "name": "non-interactive",
203
210
  "type": "boolean",
@@ -4176,6 +4183,28 @@
4176
4183
  "projectDir": {}
4177
4184
  }
4178
4185
  },
4186
+ "workflow:list": {
4187
+ "id": "workflow:list",
4188
+ "description": "List workflows for the current project",
4189
+ "strict": true,
4190
+ "pluginName": "eas-cli",
4191
+ "pluginAlias": "eas-cli",
4192
+ "pluginType": "core",
4193
+ "aliases": [],
4194
+ "flags": {
4195
+ "json": {
4196
+ "name": "json",
4197
+ "type": "boolean",
4198
+ "description": "Enable JSON output, non-JSON messages will be printed to stderr.",
4199
+ "allowNo": false
4200
+ }
4201
+ },
4202
+ "args": {},
4203
+ "contextDefinition": {
4204
+ "projectId": {},
4205
+ "loggedIn": {}
4206
+ }
4207
+ },
4179
4208
  "workflow:run": {
4180
4209
  "id": "workflow:run",
4181
4210
  "description": "run an EAS workflow",
@@ -4219,6 +4248,57 @@
4219
4248
  "loggedIn": {}
4220
4249
  }
4221
4250
  },
4251
+ "workflow:runs": {
4252
+ "id": "workflow:runs",
4253
+ "description": "list recent workflow runs for this project, with their IDs, statuses, and timestamps",
4254
+ "strict": true,
4255
+ "pluginName": "eas-cli",
4256
+ "pluginAlias": "eas-cli",
4257
+ "pluginType": "core",
4258
+ "aliases": [],
4259
+ "flags": {
4260
+ "workflow": {
4261
+ "name": "workflow",
4262
+ "type": "option",
4263
+ "description": "If present, the query will only return runs for the specified workflow file name",
4264
+ "required": false,
4265
+ "multiple": false
4266
+ },
4267
+ "status": {
4268
+ "name": "status",
4269
+ "type": "option",
4270
+ "description": "If present, filter the returned runs to select those with the specified status",
4271
+ "required": false,
4272
+ "helpValue": "(ACTION_REQUIRED|CANCELED|FAILURE|IN_PROGRESS|NEW|SUCCESS)",
4273
+ "multiple": false,
4274
+ "options": [
4275
+ "ACTION_REQUIRED",
4276
+ "CANCELED",
4277
+ "FAILURE",
4278
+ "IN_PROGRESS",
4279
+ "NEW",
4280
+ "SUCCESS"
4281
+ ]
4282
+ },
4283
+ "json": {
4284
+ "name": "json",
4285
+ "type": "boolean",
4286
+ "description": "Enable JSON output, non-JSON messages will be printed to stderr.",
4287
+ "allowNo": false
4288
+ },
4289
+ "limit": {
4290
+ "name": "limit",
4291
+ "type": "option",
4292
+ "description": "The number of items to fetch each query. Defaults to 10 and is capped at 100.",
4293
+ "multiple": false
4294
+ }
4295
+ },
4296
+ "args": {},
4297
+ "contextDefinition": {
4298
+ "projectId": {},
4299
+ "loggedIn": {}
4300
+ }
4301
+ },
4222
4302
  "workflow:validate": {
4223
4303
  "id": "workflow:validate",
4224
4304
  "description": "validate a workflow configuration yaml file",
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.7.2",
4
+ "version": "16.9.0",
5
5
  "author": "Expo <support@expo.dev>",
6
6
  "bin": {
7
7
  "eas": "./bin/run"
@@ -13,7 +13,7 @@
13
13
  "@expo/config": "10.0.6",
14
14
  "@expo/config-plugins": "9.0.12",
15
15
  "@expo/eas-build-job": "1.0.173",
16
- "@expo/eas-json": "16.7.0",
16
+ "@expo/eas-json": "16.9.0",
17
17
  "@expo/env": "^1.0.0",
18
18
  "@expo/json-file": "8.3.3",
19
19
  "@expo/logger": "1.0.117",
@@ -240,5 +240,5 @@
240
240
  "node": "20.11.0",
241
241
  "yarn": "1.22.21"
242
242
  },
243
- "gitHead": "e63de217021679acff0ecb2e3e0ce7460c8fe24a"
243
+ "gitHead": "67d85c202584bc701236a02f805a1abda0816311"
244
244
  }