eas-cli 25.3.0 → 27.1.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 +268 -198
- package/build/build/build.js +6 -0
- package/build/build/createContext.d.ts +4 -3
- package/build/build/createContext.js +1 -4
- package/build/build/errors.d.ts +2 -0
- package/build/build/errors.js +4 -1
- package/build/build/evaluateConfigWithEnvVarsAsync.js +1 -3
- package/build/build/runBuildAndSubmit.d.ts +7 -2
- package/build/build/runBuildAndSubmit.js +9 -8
- package/build/build/utils/expoTokenRole.d.ts +4 -0
- package/build/build/utils/expoTokenRole.js +14 -0
- package/build/commandUtils/EasCommand.js +3 -3
- package/build/commandUtils/context/DynamicProjectConfigContextField.d.ts +2 -2
- package/build/commandUtils/context/DynamicProjectConfigContextField.js +40 -61
- package/build/commandUtils/context/LoggedInContextField.js +1 -2
- package/build/commandUtils/context/MaybeLoggedInContextField.js +1 -2
- package/build/commandUtils/context/OptionalPrivateProjectConfigContextField.js +3 -1
- package/build/commandUtils/context/PrivateProjectConfigContextField.js +3 -1
- package/build/commandUtils/context/contextUtils/findProjectDirAndVerifyProjectSetupAsync.js +2 -1
- package/build/commandUtils/context/contextUtils/getProjectIdAsync.d.ts +1 -0
- package/build/commandUtils/context/contextUtils/getProjectIdAsync.js +5 -2
- package/build/commandUtils/workflow/referencedFiles.d.ts +6 -0
- package/build/commandUtils/workflow/referencedFiles.js +63 -0
- package/build/commandUtils/workflow/types.d.ts +1 -1
- package/build/commandUtils/workflow/utils.js +34 -5
- package/build/commands/account/login.js +6 -0
- package/build/commands/account/view.d.ts +0 -7
- package/build/commands/account/view.js +4 -74
- package/build/commands/browse.js +1 -1
- package/build/commands/build/dev.js +3 -3
- package/build/commands/channel/delete.js +1 -1
- package/build/commands/channel/rollout.js +1 -1
- package/build/commands/credentials/configure-build.js +1 -1
- package/build/commands/deploy/alias/delete.js +1 -1
- package/build/commands/deploy/alias/index.js +1 -1
- package/build/commands/deploy/delete.js +1 -1
- package/build/commands/go.js +1 -1
- package/build/commands/observe/event.js +1 -1
- package/build/commands/observe/events.js +1 -1
- package/build/commands/project/new.js +1 -1
- package/build/commands/simulator/control.js +42 -7
- package/build/commands/simulator/get.js +14 -1
- package/build/commands/simulator/index.js +12 -4
- package/build/commands/simulator/logs.d.ts +22 -0
- package/build/commands/simulator/logs.js +188 -0
- package/build/commands/workflow/cancel.js +9 -20
- package/build/commands/workflow/list.js +1 -1
- package/build/commands/workflow/logs.js +1 -1
- package/build/commands/workflow/run.js +10 -1
- package/build/commands/workflow/runs.js +1 -1
- package/build/commands/workflow/status.js +1 -1
- package/build/commands/workflow/view.js +1 -1
- package/build/graphql/generated.d.ts +438 -115
- package/build/graphql/generated.js +40 -9
- package/build/graphql/mutations/WorkflowRevisionMutation.d.ts +3 -2
- package/build/graphql/mutations/WorkflowRevisionMutation.js +12 -3
- package/build/graphql/queries/DeviceRunSessionQuery.d.ts +8 -1
- package/build/graphql/queries/DeviceRunSessionQuery.js +67 -0
- package/build/graphql/queries/WorkflowRunQuery.js +6 -0
- package/build/graphql/types/WorkflowRun.js +1 -0
- package/build/help.js +13 -6
- package/build/log.d.ts +2 -0
- package/build/log.js +10 -0
- package/build/project/projectStatus.js +1 -0
- package/build/simulator/artifacts.d.ts +9 -0
- package/build/simulator/artifacts.js +97 -0
- package/build/simulator/download.d.ts +2 -0
- package/build/simulator/download.js +57 -0
- package/build/simulator/events.js +2 -10
- package/build/simulator/jobRunErrors.d.ts +22 -0
- package/build/simulator/jobRunErrors.js +134 -0
- package/build/simulator/preview.d.ts +26 -0
- package/build/simulator/preview.js +156 -0
- package/build/simulator/utils.d.ts +5 -0
- package/build/simulator/utils.js +42 -0
- package/build/user/SessionManager.d.ts +10 -0
- package/build/user/SessionManager.js +12 -0
- package/build/user/accountPermissions.d.ts +11 -0
- package/build/user/accountPermissions.js +89 -0
- package/oclif.manifest.json +169 -21
- package/package.json +7 -7
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const core_1 = require("@oclif/core");
|
|
5
|
+
const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
|
|
6
|
+
const flags_1 = require("../../commandUtils/flags");
|
|
7
|
+
const generated_1 = require("../../graphql/generated");
|
|
8
|
+
const DeviceRunSessionQuery_1 = require("../../graphql/queries/DeviceRunSessionQuery");
|
|
9
|
+
const log_1 = tslib_1.__importDefault(require("../../log"));
|
|
10
|
+
const artifacts_1 = require("../../simulator/artifacts");
|
|
11
|
+
const env_1 = require("../../simulator/env");
|
|
12
|
+
const preview_1 = require("../../simulator/preview");
|
|
13
|
+
const utils_1 = require("../../simulator/utils");
|
|
14
|
+
const json_1 = require("../../utils/json");
|
|
15
|
+
// serve-sim keeps sending heartbeats while its log source restarts, so the stream alone cannot show a failure.
|
|
16
|
+
const LOG_SOURCE_HEALTH_CHECK_INTERVAL_MS = 10_000;
|
|
17
|
+
class SimulatorLogs extends EasCommand_1.default {
|
|
18
|
+
static aliases = ['sim:logs'];
|
|
19
|
+
static description = '[EXPERIMENTAL] show buffered logs from a remote iOS simulator session';
|
|
20
|
+
static examples = [
|
|
21
|
+
'<%= config.bin %> simulator:logs --follow',
|
|
22
|
+
'<%= config.bin %> simulator:logs --json',
|
|
23
|
+
];
|
|
24
|
+
static flags = {
|
|
25
|
+
id: core_1.Flags.string({
|
|
26
|
+
description: `Simulator session ID. Defaults to ${env_1.SIMULATOR_DOTENV_FILE_NAME}.`,
|
|
27
|
+
}),
|
|
28
|
+
artifact: core_1.Flags.integer({
|
|
29
|
+
min: 1,
|
|
30
|
+
description: 'Artifact index to download from a stopped session (1-based).',
|
|
31
|
+
}),
|
|
32
|
+
output: core_1.Flags.string({
|
|
33
|
+
char: 'o',
|
|
34
|
+
description: 'Save a stopped session artifact to this path.',
|
|
35
|
+
}),
|
|
36
|
+
follow: core_1.Flags.boolean({
|
|
37
|
+
char: 'f',
|
|
38
|
+
description: 'Stream new logs. Start following before performing actions to collect them.',
|
|
39
|
+
exclusive: ['json'],
|
|
40
|
+
}),
|
|
41
|
+
scope: core_1.Flags.option({
|
|
42
|
+
description: 'Show user app logs or all device logs while the session runs.',
|
|
43
|
+
options: ['user-apps', 'all'],
|
|
44
|
+
default: 'user-apps',
|
|
45
|
+
})(),
|
|
46
|
+
limit: core_1.Flags.integer({
|
|
47
|
+
description: 'Maximum number of buffered log lines to show while the session runs.',
|
|
48
|
+
default: 100,
|
|
49
|
+
min: 1,
|
|
50
|
+
}),
|
|
51
|
+
timestamp: core_1.Flags.boolean({
|
|
52
|
+
description: 'Show timestamps in live human-readable log output.',
|
|
53
|
+
}),
|
|
54
|
+
...flags_1.EasNonInteractiveAndJsonFlags,
|
|
55
|
+
};
|
|
56
|
+
static contextDefinition = {
|
|
57
|
+
...this.ContextOptions.LoggedIn,
|
|
58
|
+
...this.ContextOptions.ProjectDir,
|
|
59
|
+
};
|
|
60
|
+
async runAsync() {
|
|
61
|
+
// Before parsing, so only the JSON result reaches stdout.
|
|
62
|
+
if (this.argv.includes('--json')) {
|
|
63
|
+
(0, json_1.enableJsonOutput)();
|
|
64
|
+
}
|
|
65
|
+
const { flags } = await this.parse(SimulatorLogs);
|
|
66
|
+
const { json: jsonFlag, nonInteractive } = (0, flags_1.resolveNonInteractiveAndJsonFlags)(flags);
|
|
67
|
+
const { projectDir, loggedIn: { graphqlClient }, } = await this.getContextAsync(SimulatorLogs, { nonInteractive });
|
|
68
|
+
await (0, env_1.loadSimulatorEnvAsync)(projectDir);
|
|
69
|
+
const deviceRunSessionId = flags.id ?? process.env[env_1.EAS_SIMULATOR_SESSION_ID];
|
|
70
|
+
if (!deviceRunSessionId) {
|
|
71
|
+
throw new Error(`No simulator session ID provided. Pass --id, or run \`eas simulator:start\` first to write ${env_1.SIMULATOR_DOTENV_FILE_NAME}.`);
|
|
72
|
+
}
|
|
73
|
+
const session = await DeviceRunSessionQuery_1.DeviceRunSessionQuery.byIdAsync(graphqlClient, deviceRunSessionId);
|
|
74
|
+
if ((0, artifacts_1.hasSimulatorArtifacts)(session)) {
|
|
75
|
+
if (flags.follow) {
|
|
76
|
+
throw new Error('The session has stopped. --follow is only available while it runs. Use --output <path> to download its logs artifact.');
|
|
77
|
+
}
|
|
78
|
+
await (0, artifacts_1.downloadSimulatorArtifactAsync)(session, 'simulator-log', {
|
|
79
|
+
artifact: flags.artifact,
|
|
80
|
+
output: flags.output,
|
|
81
|
+
nonInteractive,
|
|
82
|
+
json: jsonFlag,
|
|
83
|
+
});
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
if (session.platform === generated_1.AppPlatform.Android) {
|
|
87
|
+
throw new Error('Live logs are only available for iOS simulator sessions. This session runs an Android emulator, whose preview server does not stream logs. Start an iOS session with `eas simulator:start --platform ios` to read logs.');
|
|
88
|
+
}
|
|
89
|
+
const preview = await (0, preview_1.resolveSimulatorPreviewAsync)(session);
|
|
90
|
+
if (flags.artifact !== undefined || flags.output !== undefined) {
|
|
91
|
+
throw new Error('--artifact and --output are only available for stopped sessions. To save live logs, follow them into a file: `eas simulator:logs --follow > logs.txt`.');
|
|
92
|
+
}
|
|
93
|
+
const query = { scope: flags.scope, limit: String(flags.limit) };
|
|
94
|
+
if (flags.follow) {
|
|
95
|
+
const abortController = new AbortController();
|
|
96
|
+
const interruptHandler = () => {
|
|
97
|
+
if (abortController.signal.aborted) {
|
|
98
|
+
process.exit(130);
|
|
99
|
+
}
|
|
100
|
+
abortController.abort();
|
|
101
|
+
};
|
|
102
|
+
process.on('SIGINT', interruptHandler);
|
|
103
|
+
const stopHealthChecks = watchLogSourceHealth(preview, flags.scope, abortController.signal);
|
|
104
|
+
try {
|
|
105
|
+
await (0, preview_1.streamSimulatorPreviewAsync)(preview, '/logs', data => {
|
|
106
|
+
log_1.default.log(flags.timestamp ? formatLogEnvelope(data) : (0, utils_1.formatLogLine)(data));
|
|
107
|
+
}, {
|
|
108
|
+
query: { ...query, ...(flags.timestamp ? { envelope: '1' } : {}) },
|
|
109
|
+
signal: abortController.signal,
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
finally {
|
|
113
|
+
stopHealthChecks();
|
|
114
|
+
process.removeListener('SIGINT', interruptHandler);
|
|
115
|
+
}
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
const snapshot = await (0, preview_1.fetchSimulatorPreviewJsonAsync)(preview, '/logs', {
|
|
119
|
+
query: { ...query, snapshot: '1' },
|
|
120
|
+
});
|
|
121
|
+
if (!jsonFlag && snapshot.streamError) {
|
|
122
|
+
log_1.default.warn((0, utils_1.stripTerminalControlCharacters)(snapshot.streamError));
|
|
123
|
+
}
|
|
124
|
+
if (jsonFlag) {
|
|
125
|
+
(0, json_1.printJsonOnlyOutput)({ deviceRunSessionId: preview.deviceRunSessionId, ...snapshot });
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
if (snapshot.lines.length === 0) {
|
|
129
|
+
// The warning above already explains why the buffer can be empty.
|
|
130
|
+
if (!snapshot.streamError) {
|
|
131
|
+
log_1.default.log('No buffered logs. Use --follow to collect logs before performing actions.');
|
|
132
|
+
}
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
for (const line of snapshot.lines) {
|
|
136
|
+
log_1.default.log((0, utils_1.formatLogLine)(line.raw, flags.timestamp, line.at));
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
exports.default = SimulatorLogs;
|
|
141
|
+
function formatLogEnvelope(data) {
|
|
142
|
+
let line;
|
|
143
|
+
try {
|
|
144
|
+
line = JSON.parse(data);
|
|
145
|
+
}
|
|
146
|
+
catch { }
|
|
147
|
+
return typeof line?.raw === 'string' && (0, utils_1.isValidLogTime)(line.at)
|
|
148
|
+
? (0, utils_1.formatLogLine)(line.raw, true, line.at)
|
|
149
|
+
: (0, utils_1.formatLogLine)(data);
|
|
150
|
+
}
|
|
151
|
+
/** Polls the log source while following and reports when it stops or recovers. Returns a stop function. */
|
|
152
|
+
function watchLogSourceHealth(preview, scope, signal) {
|
|
153
|
+
let failing = false;
|
|
154
|
+
let checking = false;
|
|
155
|
+
const checkAsync = async () => {
|
|
156
|
+
checking = true;
|
|
157
|
+
try {
|
|
158
|
+
const { status, streamError } = await (0, preview_1.fetchSimulatorPreviewJsonAsync)(preview, '/logs', { query: { scope, limit: '1', snapshot: '1' } });
|
|
159
|
+
if (signal.aborted) {
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
if (!failing && status !== 'streaming') {
|
|
163
|
+
failing = true;
|
|
164
|
+
const reason = streamError ? `: ${(0, utils_1.stripTerminalControlCharacters)(streamError)}` : '';
|
|
165
|
+
// stderr, so the notice stays out of `--follow > logs.txt`.
|
|
166
|
+
log_1.default.warnToStderr(`Simulator logs are not being collected. The session's log source stopped${reason}. It restarts automatically, and logs from this gap are missing.`);
|
|
167
|
+
}
|
|
168
|
+
else if (failing && status === 'streaming' && !streamError) {
|
|
169
|
+
failing = false;
|
|
170
|
+
log_1.default.warnToStderr('Simulator log collection resumed.');
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
catch {
|
|
174
|
+
// The stream itself reports connection failures.
|
|
175
|
+
}
|
|
176
|
+
finally {
|
|
177
|
+
checking = false;
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
const timer = setInterval(() => {
|
|
181
|
+
if (!checking) {
|
|
182
|
+
void checkAsync();
|
|
183
|
+
}
|
|
184
|
+
}, LOG_SOURCE_HEALTH_CHECK_INTERVAL_MS);
|
|
185
|
+
return () => {
|
|
186
|
+
clearInterval(timer);
|
|
187
|
+
};
|
|
188
|
+
}
|
|
@@ -10,7 +10,7 @@ const AppQuery_1 = require("../../graphql/queries/AppQuery");
|
|
|
10
10
|
const log_1 = tslib_1.__importDefault(require("../../log"));
|
|
11
11
|
const prompts_1 = require("../../prompts");
|
|
12
12
|
class WorkflowRunCancel extends EasCommand_1.default {
|
|
13
|
-
static description = '
|
|
13
|
+
static description = 'cancel one or more workflow runs. If no workflow run IDs are provided, you will be prompted to select in-progress or queued runs to cancel';
|
|
14
14
|
static strict = false;
|
|
15
15
|
static contextDefinition = {
|
|
16
16
|
...this.ContextOptions.ProjectId,
|
|
@@ -20,21 +20,10 @@ class WorkflowRunCancel extends EasCommand_1.default {
|
|
|
20
20
|
...flags_1.EASNonInteractiveFlag,
|
|
21
21
|
};
|
|
22
22
|
async runAsync() {
|
|
23
|
-
const { argv } = await this.parse(WorkflowRunCancel);
|
|
24
|
-
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
const tokens = [...argv];
|
|
28
|
-
while (tokens.length > 0) {
|
|
29
|
-
const token = tokens.shift();
|
|
30
|
-
if (token === '--non-interactive') {
|
|
31
|
-
nonInteractive = true;
|
|
32
|
-
continue;
|
|
33
|
-
}
|
|
34
|
-
else if (token) {
|
|
35
|
-
workflowRunIds.add(token);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
23
|
+
const { argv, flags } = await this.parse(WorkflowRunCancel);
|
|
24
|
+
// oclif removes declared flags such as --non-interactive from argv.
|
|
25
|
+
const nonInteractive = flags['non-interactive'];
|
|
26
|
+
const workflowRunIds = new Set(argv);
|
|
38
27
|
const { projectId, loggedIn: { graphqlClient }, } = await this.getContextAsync(WorkflowRunCancel, {
|
|
39
28
|
nonInteractive,
|
|
40
29
|
});
|
|
@@ -42,9 +31,9 @@ class WorkflowRunCancel extends EasCommand_1.default {
|
|
|
42
31
|
if (nonInteractive) {
|
|
43
32
|
throw new Error('Must supply workflow run IDs as arguments when in non-interactive mode');
|
|
44
33
|
}
|
|
45
|
-
|
|
46
|
-
const
|
|
47
|
-
const runs = (0, utils_1.processWorkflowRuns)(
|
|
34
|
+
const pickerStatuses = [generated_1.WorkflowRunStatus.InProgress, generated_1.WorkflowRunStatus.Waiting];
|
|
35
|
+
const runsByStatus = await Promise.all(pickerStatuses.map(status => AppQuery_1.AppQuery.byIdWorkflowRunsFilteredByStatusAsync(graphqlClient, projectId, status, 50)));
|
|
36
|
+
const runs = (0, utils_1.processWorkflowRuns)(runsByStatus.flat());
|
|
48
37
|
if (runs.length === 0) {
|
|
49
38
|
log_1.default.warn('No workflow runs to cancel');
|
|
50
39
|
return;
|
|
@@ -52,7 +41,7 @@ class WorkflowRunCancel extends EasCommand_1.default {
|
|
|
52
41
|
const answers = await (0, prompts_1.promptAsync)({
|
|
53
42
|
type: 'multiselect',
|
|
54
43
|
name: 'selectedRuns',
|
|
55
|
-
message: 'Select
|
|
44
|
+
message: 'Select workflow runs to cancel',
|
|
56
45
|
choices: runs.map(run => (0, utils_1.choiceFromWorkflowRun)(run)),
|
|
57
46
|
});
|
|
58
47
|
answers.selectedRuns.forEach((id) => {
|
|
@@ -9,7 +9,7 @@ const formatFields_1 = tslib_1.__importDefault(require("../../utils/formatFields
|
|
|
9
9
|
const json_1 = require("../../utils/json");
|
|
10
10
|
class WorkflowList extends EasCommand_1.default {
|
|
11
11
|
static hidden = true;
|
|
12
|
-
static description = '
|
|
12
|
+
static description = 'list workflows for the current project';
|
|
13
13
|
static flags = {
|
|
14
14
|
...flags_1.EasJsonOnlyFlag,
|
|
15
15
|
};
|
|
@@ -20,7 +20,7 @@ function printLogsForAllSteps(logs) {
|
|
|
20
20
|
});
|
|
21
21
|
}
|
|
22
22
|
class WorkflowLogView extends EasCommand_1.default {
|
|
23
|
-
static description = 'view logs for a workflow run, selecting a job and step to view. You can pass in either a workflow run ID or a job ID. If no ID is passed in, you will be prompted to select from recent workflow runs for the current project
|
|
23
|
+
static description = 'view logs for a workflow run, selecting a job and step to view. You can pass in either a workflow run ID or a job ID. If no ID is passed in, you will be prompted to select from recent workflow runs for the current project';
|
|
24
24
|
static flags = {
|
|
25
25
|
...flags_1.EasJsonOnlyFlag,
|
|
26
26
|
...flags_1.EASNonInteractiveFlag,
|
|
@@ -54,6 +54,7 @@ const url_1 = require("../../build/utils/url");
|
|
|
54
54
|
const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
|
|
55
55
|
const flags_1 = require("../../commandUtils/flags");
|
|
56
56
|
const inputs_1 = require("../../commandUtils/workflow/inputs");
|
|
57
|
+
const referencedFiles_1 = require("../../commandUtils/workflow/referencedFiles");
|
|
57
58
|
const utils_1 = require("../../commandUtils/workflow/utils");
|
|
58
59
|
const generated_1 = require("../../graphql/generated");
|
|
59
60
|
const WorkflowRevisionMutation_1 = require("../../graphql/mutations/WorkflowRevisionMutation");
|
|
@@ -72,7 +73,7 @@ function resolveWorkflowRunSshInput({ ssh, idleTimeoutSeconds, }) {
|
|
|
72
73
|
return ssh ? { idleTimeoutSeconds } : null;
|
|
73
74
|
}
|
|
74
75
|
class WorkflowRun extends EasCommand_1.default {
|
|
75
|
-
static description = 'run an EAS workflow. The entire local project directory will be packaged and uploaded to EAS servers for the workflow run, unless the --ref flag is used
|
|
76
|
+
static description = 'run an EAS workflow. The entire local project directory will be packaged and uploaded to EAS servers for the workflow run, unless the --ref flag is used';
|
|
76
77
|
static args = {
|
|
77
78
|
file: core_1.Args.string({
|
|
78
79
|
description: 'Path to the workflow file to run',
|
|
@@ -138,6 +139,7 @@ class WorkflowRun extends EasCommand_1.default {
|
|
|
138
139
|
let workflowRunId;
|
|
139
140
|
let workflowRevisionId;
|
|
140
141
|
let gitRef;
|
|
142
|
+
let referencedFiles;
|
|
141
143
|
if (flags.ref) {
|
|
142
144
|
// Run from git ref
|
|
143
145
|
const fileName = path.basename(args.file);
|
|
@@ -181,12 +183,18 @@ class WorkflowRun extends EasCommand_1.default {
|
|
|
181
183
|
log_1.default.error('Failed to read workflow file.');
|
|
182
184
|
throw err;
|
|
183
185
|
}
|
|
186
|
+
referencedFiles = await (0, referencedFiles_1.collectReferencedWorkflowFilesAsync)({
|
|
187
|
+
projectDir,
|
|
188
|
+
rootFileName: path.basename(args.file),
|
|
189
|
+
rootYamlConfig: yamlConfig,
|
|
190
|
+
});
|
|
184
191
|
}
|
|
185
192
|
// Validate workflow YAML
|
|
186
193
|
try {
|
|
187
194
|
await WorkflowRevisionMutation_1.WorkflowRevisionMutation.validateWorkflowYamlConfigAsync(graphqlClient, {
|
|
188
195
|
appId: projectId,
|
|
189
196
|
yamlConfig,
|
|
197
|
+
referencedFiles,
|
|
190
198
|
});
|
|
191
199
|
}
|
|
192
200
|
catch (error) {
|
|
@@ -287,6 +295,7 @@ class WorkflowRun extends EasCommand_1.default {
|
|
|
287
295
|
workflowRevisionInput: {
|
|
288
296
|
fileName: path.basename(args.file),
|
|
289
297
|
yamlConfig,
|
|
298
|
+
referencedFiles,
|
|
290
299
|
},
|
|
291
300
|
workflowRunInput: {
|
|
292
301
|
inputs,
|
|
@@ -61,7 +61,7 @@ class WorkflowRunList extends EasCommand_1.default {
|
|
|
61
61
|
{ label: 'Workflow', value: run.workflowFileName },
|
|
62
62
|
{ label: 'Status', value: run.status },
|
|
63
63
|
{ label: 'Started At', value: run.startedAt },
|
|
64
|
-
{ label: 'Finished At', value: run.finishedAt },
|
|
64
|
+
{ label: 'Finished At', value: run.finishedAt ?? 'null' },
|
|
65
65
|
{ label: 'Trigger Type', value: run.triggerType },
|
|
66
66
|
{ label: 'Trigger', value: run.trigger ?? 'null' },
|
|
67
67
|
{ label: 'Git Commit Message', value: run.gitCommitMessage ?? 'null' },
|
|
@@ -26,7 +26,7 @@ const projectUtils_1 = require("../../project/projectUtils");
|
|
|
26
26
|
const prompts_1 = require("../../prompts");
|
|
27
27
|
const json_1 = require("../../utils/json");
|
|
28
28
|
class WorkflowStatus extends EasCommand_1.default {
|
|
29
|
-
static description = 'show the status of an existing workflow run. If no run ID is provided, you will be prompted to select from recent workflow runs for the current project
|
|
29
|
+
static description = 'show the status of an existing workflow run. If no run ID is provided, you will be prompted to select from recent workflow runs for the current project';
|
|
30
30
|
static args = {
|
|
31
31
|
WORKFLOW_RUN_ID: core_1.Args.string({
|
|
32
32
|
description: 'A workflow run ID.',
|
|
@@ -29,7 +29,7 @@ const processedOutputs = job => {
|
|
|
29
29
|
return result;
|
|
30
30
|
};
|
|
31
31
|
class WorkflowView extends EasCommand_1.default {
|
|
32
|
-
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
|
|
32
|
+
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';
|
|
33
33
|
static flags = {
|
|
34
34
|
...flags_1.EasJsonOnlyFlag,
|
|
35
35
|
...flags_1.EASNonInteractiveFlag,
|