eas-cli 16.14.1 → 16.16.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.
- package/README.md +137 -84
- package/build/commandUtils/workflow/fetchLogs.d.ts +2 -0
- package/build/commandUtils/workflow/fetchLogs.js +16 -0
- package/build/commandUtils/workflow/stateMachine.d.ts +44 -0
- package/build/commandUtils/workflow/stateMachine.js +212 -0
- package/build/commandUtils/workflow/types.d.ts +39 -0
- package/build/commandUtils/workflow/types.js +13 -0
- package/build/commandUtils/workflow/utils.d.ts +12 -0
- package/build/commandUtils/workflow/utils.js +116 -0
- package/build/commands/deploy/index.js +47 -49
- package/build/commands/workflow/cancel.js +3 -6
- package/build/commands/workflow/logs.d.ts +18 -0
- package/build/commands/workflow/logs.js +94 -0
- package/build/commands/workflow/run.d.ts +105 -0
- package/build/commands/workflow/run.js +280 -0
- package/build/commands/workflow/runs.js +4 -3
- package/build/commands/workflow/view.d.ts +17 -0
- package/build/commands/workflow/view.js +95 -0
- package/build/credentials/ios/appstore/bundleIdCapabilities.d.ts +4 -17
- package/build/credentials/ios/appstore/bundleIdCapabilities.js +45 -625
- package/build/credentials/ios/appstore/capabilityIdentifiers.js +33 -34
- package/build/credentials/ios/appstore/capabilityList.d.ts +33 -0
- package/build/credentials/ios/appstore/capabilityList.js +646 -0
- package/build/graphql/generated.d.ts +236 -19
- package/build/graphql/queries/WorkflowJobQuery.d.ts +7 -0
- package/build/graphql/queries/WorkflowJobQuery.js +29 -0
- package/build/graphql/queries/WorkflowRunQuery.js +13 -13
- package/build/graphql/types/WorkflowJob.d.ts +1 -0
- package/build/graphql/types/WorkflowJob.js +32 -0
- package/build/graphql/types/WorkflowRun.js +18 -0
- package/build/worker/assets.d.ts +19 -16
- package/build/worker/assets.js +51 -22
- package/build/worker/upload.d.ts +21 -9
- package/build/worker/upload.js +98 -80
- package/build/worker/utils/multipart.d.ts +11 -0
- package/build/worker/utils/multipart.js +98 -0
- package/oclif.manifest.json +85 -1
- package/package.json +2 -2
- package/build/commandUtils/workflows.d.ts +0 -20
- package/build/commandUtils/workflows.js +0 -21
|
@@ -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;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
/// <reference types="@expo/apple-utils/ts-declarations/expo__app-store" />
|
|
2
|
-
import { BundleId
|
|
3
|
-
import { JSONObject
|
|
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 {};
|