eas-cli 16.15.0 → 16.17.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 +221 -84
  2. package/build/commandUtils/workflow/fetchLogs.d.ts +2 -0
  3. package/build/commandUtils/workflow/fetchLogs.js +16 -0
  4. package/build/commandUtils/workflow/stateMachine.d.ts +44 -0
  5. package/build/commandUtils/workflow/stateMachine.js +212 -0
  6. package/build/commandUtils/workflow/types.d.ts +39 -0
  7. package/build/commandUtils/workflow/types.js +13 -0
  8. package/build/commandUtils/workflow/utils.d.ts +12 -0
  9. package/build/commandUtils/workflow/utils.js +116 -0
  10. package/build/commands/deploy/alias/delete.d.ts +21 -0
  11. package/build/commands/deploy/alias/delete.js +98 -0
  12. package/build/commands/deploy/alias/index.d.ts +21 -0
  13. package/build/commands/deploy/{alias.js → alias/index.js} +8 -8
  14. package/build/commands/deploy/{alias.d.ts → delete.d.ts} +4 -4
  15. package/build/commands/deploy/delete.js +84 -0
  16. package/build/commands/workflow/cancel.js +3 -6
  17. package/build/commands/workflow/logs.d.ts +18 -0
  18. package/build/commands/workflow/logs.js +94 -0
  19. package/build/commands/workflow/run.d.ts +105 -0
  20. package/build/commands/workflow/run.js +280 -0
  21. package/build/commands/workflow/runs.js +4 -3
  22. package/build/commands/workflow/view.d.ts +17 -0
  23. package/build/commands/workflow/view.js +95 -0
  24. package/build/credentials/ios/IosCredentialsProvider.js +1 -1
  25. package/build/credentials/ios/appstore/bundleIdCapabilities.d.ts +4 -17
  26. package/build/credentials/ios/appstore/bundleIdCapabilities.js +45 -625
  27. package/build/credentials/ios/appstore/capabilityIdentifiers.js +33 -34
  28. package/build/credentials/ios/appstore/capabilityList.d.ts +33 -0
  29. package/build/credentials/ios/appstore/capabilityList.js +646 -0
  30. package/build/graphql/generated.d.ts +308 -19
  31. package/build/graphql/queries/WorkflowJobQuery.d.ts +7 -0
  32. package/build/graphql/queries/WorkflowJobQuery.js +29 -0
  33. package/build/graphql/queries/WorkflowRunQuery.js +13 -13
  34. package/build/graphql/types/WorkflowJob.d.ts +1 -0
  35. package/build/graphql/types/WorkflowJob.js +32 -0
  36. package/build/graphql/types/WorkflowRun.js +18 -0
  37. package/build/worker/assets.d.ts +0 -3
  38. package/build/worker/assets.js +3 -3
  39. package/build/worker/deployment.d.ts +23 -1
  40. package/build/worker/deployment.js +27 -1
  41. package/build/worker/mutations.d.ts +12 -1
  42. package/build/worker/mutations.js +33 -0
  43. package/build/worker/queries.d.ts +8 -1
  44. package/build/worker/queries.js +42 -0
  45. package/build/worker/upload.js +4 -8
  46. package/build/worker/utils/multipart.d.ts +5 -4
  47. package/build/worker/utils/multipart.js +44 -9
  48. package/oclif.manifest.json +196 -32
  49. package/package.json +2 -2
  50. package/build/commandUtils/workflows.d.ts +0 -20
  51. package/build/commandUtils/workflows.js +0 -21
@@ -5,7 +5,7 @@ const core_1 = require("@oclif/core");
5
5
  const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
6
6
  const flags_1 = require("../../commandUtils/flags");
7
7
  const pagination_1 = require("../../commandUtils/pagination");
8
- const workflows_1 = require("../../commandUtils/workflows");
8
+ const utils_1 = require("../../commandUtils/workflow/utils");
9
9
  const generated_1 = require("../../graphql/generated");
10
10
  const AppQuery_1 = require("../../graphql/queries/AppQuery");
11
11
  const WorkflowRunQuery_1 = require("../../graphql/queries/WorkflowRunQuery");
@@ -49,7 +49,7 @@ class WorkflowRunList extends EasCommand_1.default {
49
49
  else {
50
50
  runs = await AppQuery_1.AppQuery.byIdWorkflowRunsFilteredByStatusAsync(graphqlClient, projectId, status, limit);
51
51
  }
52
- const result = (0, workflows_1.processWorkflowRuns)(runs);
52
+ const result = (0, utils_1.processWorkflowRuns)(runs);
53
53
  if (flags.json) {
54
54
  (0, json_1.printJsonOnlyOutput)(result);
55
55
  return;
@@ -62,8 +62,9 @@ class WorkflowRunList extends EasCommand_1.default {
62
62
  { label: 'Status', value: run.status },
63
63
  { label: 'Started At', value: run.startedAt },
64
64
  { label: 'Finished At', value: run.finishedAt },
65
+ { label: 'Trigger Type', value: run.triggerType },
66
+ { label: 'Trigger', value: run.trigger ?? 'null' },
65
67
  { label: 'Git Commit Message', value: run.gitCommitMessage ?? 'null' },
66
- { label: 'Git Commit Hash', value: run.gitCommitHash ?? 'null' },
67
68
  ]));
68
69
  log_1.default.addNewLineIfNone();
69
70
  });
@@ -0,0 +1,17 @@
1
+ import EasCommand from '../../commandUtils/EasCommand';
2
+ export default class WorkflowView extends EasCommand {
3
+ static description: string;
4
+ static flags: {
5
+ 'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
6
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
7
+ };
8
+ static args: {
9
+ name: string;
10
+ description: string;
11
+ }[];
12
+ static contextDefinition: {
13
+ loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
14
+ projectId: import("../../commandUtils/context/ProjectIdContextField").ProjectIdContextField;
15
+ };
16
+ runAsync(): Promise<void>;
17
+ }
@@ -0,0 +1,95 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const url_1 = require("../../build/utils/url");
5
+ const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
6
+ const flags_1 = require("../../commandUtils/flags");
7
+ const stateMachine_1 = require("../../commandUtils/workflow/stateMachine");
8
+ const utils_1 = require("../../commandUtils/workflow/utils");
9
+ const WorkflowRunQuery_1 = require("../../graphql/queries/WorkflowRunQuery");
10
+ const log_1 = tslib_1.__importStar(require("../../log"));
11
+ const formatFields_1 = tslib_1.__importDefault(require("../../utils/formatFields"));
12
+ const json_1 = require("../../utils/json");
13
+ class WorkflowView extends EasCommand_1.default {
14
+ static description = 'view details for a workflow run, including jobs. If no run ID is provided, you will be prompted to select from recent workflow runs for the current project.';
15
+ static flags = {
16
+ ...flags_1.EasJsonOnlyFlag,
17
+ ...flags_1.EASNonInteractiveFlag,
18
+ };
19
+ static args = [{ name: 'id', description: 'ID of the workflow run to view' }];
20
+ static contextDefinition = {
21
+ ...this.ContextOptions.ProjectId,
22
+ ...this.ContextOptions.LoggedIn,
23
+ };
24
+ async runAsync() {
25
+ const { args, flags } = await this.parse(WorkflowView);
26
+ const nonInteractive = flags['non-interactive'];
27
+ const { loggedIn: { graphqlClient }, projectId, } = await this.getContextAsync(WorkflowView, {
28
+ nonInteractive,
29
+ });
30
+ if (flags.json) {
31
+ (0, json_1.enableJsonOutput)();
32
+ }
33
+ if (nonInteractive && !args.id) {
34
+ throw new Error('If non-interactive, this command requires a workflow run ID as argument');
35
+ }
36
+ const actionResult = await (0, stateMachine_1.workflowRunSelectionAction)({
37
+ graphqlClient,
38
+ projectId,
39
+ nonInteractive,
40
+ allSteps: false,
41
+ state: stateMachine_1.WorkflowCommandSelectionStateValue.WORKFLOW_RUN_SELECTION,
42
+ runId: args.id,
43
+ });
44
+ if (actionResult.state === stateMachine_1.WorkflowCommandSelectionStateValue.ERROR) {
45
+ log_1.default.error(actionResult.message);
46
+ return;
47
+ }
48
+ const idToQuery = actionResult.runId ?? '';
49
+ const result = await WorkflowRunQuery_1.WorkflowRunQuery.withJobsByIdAsync(graphqlClient, idToQuery, {
50
+ useCache: false,
51
+ });
52
+ const { triggerType, trigger } = (0, utils_1.computeTriggerInfoForWorkflowRun)(result);
53
+ result.triggerType = triggerType;
54
+ result.trigger = trigger;
55
+ result.jobs.forEach(job => {
56
+ delete job.turtleJobRun;
57
+ });
58
+ result.logURL = (0, url_1.getWorkflowRunUrl)(result.workflow.app.ownerAccount.name, result.workflow.app.name, result.id);
59
+ if (flags.json) {
60
+ (0, json_1.printJsonOnlyOutput)(result);
61
+ return;
62
+ }
63
+ log_1.default.log((0, formatFields_1.default)([
64
+ { label: 'Run ID', value: result.id },
65
+ { label: 'Workflow', value: result.workflow.fileName },
66
+ { label: 'Trigger Type', value: result.triggerType },
67
+ { label: 'Trigger', value: result.trigger ?? 'null' },
68
+ {
69
+ label: 'Git Commit Message',
70
+ value: result.gitCommitMessage?.split('\n')[0] ?? null ?? 'null',
71
+ },
72
+ { label: 'Status', value: result.status },
73
+ { label: 'Errors', value: result.errors.map(error => error.title).join('\n') },
74
+ { label: 'Created At', value: result.createdAt },
75
+ { label: 'Updated At', value: result.updatedAt },
76
+ { label: 'Log URL', value: (0, log_1.link)(result.logURL) },
77
+ ]));
78
+ log_1.default.addNewLineIfNone();
79
+ result.jobs.forEach(job => {
80
+ log_1.default.log((0, formatFields_1.default)([
81
+ { label: 'Job ID', value: job.id },
82
+ { label: ' Key', value: job.key },
83
+ { label: ' Name', value: job.name },
84
+ { label: ' Status', value: job.status },
85
+ { label: ' Type', value: job.type },
86
+ { label: ' Created At', value: job.createdAt },
87
+ { label: ' Updated At', value: job.updatedAt },
88
+ { label: ' Outputs', value: JSON.stringify(job.outputs, null, 2) },
89
+ { label: ' Errors', value: job.errors.map(error => error.title).join('\n') },
90
+ ]));
91
+ log_1.default.addNewLineIfNone();
92
+ });
93
+ }
94
+ }
95
+ exports.default = WorkflowView;
@@ -69,7 +69,7 @@ class IosCredentialsProvider {
69
69
  const setupPushKeyAction = new SetUpPushKey_1.SetUpPushKey(appLookupParams);
70
70
  const isPushKeySetup = await setupPushKeyAction.isPushKeySetupAsync(ctx);
71
71
  if (isPushKeySetup) {
72
- log_1.default.succeed(`Push Notifications setup for ${app.projectName}: ${applicationTarget.bundleIdentifier}`);
72
+ log_1.default.succeed(`Push Notifications are set up`);
73
73
  return null;
74
74
  }
75
75
  if (ctx.easJsonCliConfig?.promptToConfigurePushNotifications === false) {
@@ -1,10 +1,8 @@
1
1
  /// <reference types="@expo/apple-utils/ts-declarations/expo__app-store" />
2
- import { BundleId, CapabilityOptionMap, CapabilityType, MerchantId } from '@expo/apple-utils';
3
- import { JSONObject, JSONValue } from '@expo/json-file';
2
+ import { BundleId } from '@expo/apple-utils';
3
+ import { JSONObject } from '@expo/json-file';
4
+ import { CapabilityClassifier } from './capabilityList';
4
5
  export declare const EXPO_NO_CAPABILITY_SYNC: boolean;
5
- type GetOptionsMethod<T extends CapabilityType = any> = (entitlement: JSONValue, entitlementsJson: JSONObject, additionalOptions: {
6
- usesBroadcastPushNotifications?: boolean;
7
- }) => CapabilityOptionMap[T];
8
6
  /**
9
7
  * Given an entitlements JSON object, synchronizes the remote capabilities for a bundle identifier.
10
8
  *
@@ -18,6 +16,7 @@ type GetOptionsMethod<T extends CapabilityType = any> = (entitlement: JSONValue,
18
16
  *
19
17
  * @param bundleId bundle identifier object
20
18
  * @param entitlements JSON representation of the entitlements plist
19
+ * @param additionalOptions Additional options to consider when syncing capabilities.
21
20
  * @returns
22
21
  */
23
22
  export declare function syncCapabilitiesForEntitlementsAsync(bundleId: BundleId, entitlements: JSONObject | undefined, additionalOptions: {
@@ -27,15 +26,3 @@ export declare function syncCapabilitiesForEntitlementsAsync(bundleId: BundleId,
27
26
  disabled: string[];
28
27
  }>;
29
28
  export declare function assertValidOptions(classifier: CapabilityClassifier, value: any): asserts value;
30
- type CapabilityClassifier = {
31
- name: string;
32
- entitlement: string;
33
- capability: CapabilityType;
34
- validateOptions: (options: any) => boolean;
35
- getOptions: GetOptionsMethod;
36
- capabilityIdModel?: typeof MerchantId;
37
- capabilityIdPrefix?: string;
38
- options?: undefined;
39
- };
40
- export declare const CapabilityMapping: CapabilityClassifier[];
41
- export {};