eas-cli 24.4.2 → 24.6.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 +133 -133
- package/build/build/build.js +71 -17
- package/build/build/logs.d.ts +10 -0
- package/build/build/logs.js +91 -0
- package/build/commandUtils/logs/format.d.ts +10 -0
- package/build/commandUtils/logs/format.js +21 -0
- package/build/commandUtils/logs/parseLogs.d.ts +7 -0
- package/build/commandUtils/{workflow/logs → logs}/parseLogs.js +1 -21
- package/build/commandUtils/logs/state.d.ts +14 -0
- package/build/commandUtils/logs/state.js +71 -0
- package/build/commandUtils/logs/types.d.ts +19 -0
- package/build/commandUtils/logs/types.js +2 -0
- package/build/commandUtils/logs/watcher.d.ts +23 -0
- package/build/commandUtils/logs/watcher.js +80 -0
- package/build/commandUtils/workflow/{logs/fetchLogs.d.ts → fetchLogs.d.ts} +2 -2
- package/build/commandUtils/workflow/{logs/fetchLogs.js → fetchLogs.js} +1 -1
- package/build/commandUtils/workflow/logs.d.ts +8 -0
- package/build/commandUtils/workflow/logs.js +43 -0
- package/build/commandUtils/workflow/stateMachine.d.ts +4 -3
- package/build/commandUtils/workflow/stateMachine.js +4 -3
- package/build/commandUtils/workflow/types.d.ts +0 -19
- package/build/commandUtils/workflow/utils.d.ts +3 -7
- package/build/commandUtils/workflow/utils.js +12 -29
- package/build/commands/go.js +15 -16
- package/build/credentials/manager/ManageIos.js +2 -2
- package/build/credentials/manager/SetUpIosBuildCredentials.js +2 -2
- package/build/graphql/generated.d.ts +206 -17
- package/build/graphql/generated.js +22 -2
- package/build/graphql/queries/UserQuery.d.ts +2 -1
- package/build/graphql/queries/UserQuery.js +39 -23
- package/build/graphql/types/Actor.d.ts +1 -0
- package/build/graphql/types/Actor.js +34 -0
- package/build/ora.d.ts +1 -0
- package/build/ora.js +5 -1
- package/build/utils/centrifuge.js +2 -0
- package/oclif.manifest.json +1796 -1796
- package/package.json +5 -5
- package/build/commandUtils/workflow/logs/parseLogs.d.ts +0 -14
- package/build/commandUtils/workflow/logs/watcher.d.ts +0 -32
- package/build/commandUtils/workflow/logs/watcher.js +0 -162
- package/build/user/actions.d.ts +0 -3
- package/build/user/actions.js +0 -9
|
@@ -8,7 +8,8 @@ exports.moveToWorkflowStepSelectionState = moveToWorkflowStepSelectionState;
|
|
|
8
8
|
exports.moveToWorkflowSelectionFinishedState = moveToWorkflowSelectionFinishedState;
|
|
9
9
|
exports.moveToWorkflowSelectionErrorState = moveToWorkflowSelectionErrorState;
|
|
10
10
|
const tslib_1 = require("tslib");
|
|
11
|
-
const
|
|
11
|
+
const logs_1 = require("./logs");
|
|
12
|
+
const format_1 = require("../logs/format");
|
|
12
13
|
const utils_1 = require("./utils");
|
|
13
14
|
const AppQuery_1 = require("../../graphql/queries/AppQuery");
|
|
14
15
|
const WorkflowJobQuery_1 = require("../../graphql/queries/WorkflowJobQuery");
|
|
@@ -162,7 +163,7 @@ const workflowStepSelectionAction = async (prevState) => {
|
|
|
162
163
|
if (!job) {
|
|
163
164
|
return moveToWorkflowSelectionErrorState(prevState, 'No job found');
|
|
164
165
|
}
|
|
165
|
-
const logs = await (0,
|
|
166
|
+
const logs = await (0, logs_1.fetchAndProcessLogsFromJobAsync)(prevState, job);
|
|
166
167
|
if (!logs) {
|
|
167
168
|
return moveToWorkflowSelectionErrorState(prevState, 'No logs found');
|
|
168
169
|
}
|
|
@@ -170,7 +171,7 @@ const workflowStepSelectionAction = async (prevState) => {
|
|
|
170
171
|
return moveToWorkflowSelectionFinishedState(prevState, { step: '', logs });
|
|
171
172
|
}
|
|
172
173
|
const choices = [
|
|
173
|
-
...(0,
|
|
174
|
+
...(0, format_1.choicesFromJobLogs)(logs),
|
|
174
175
|
{
|
|
175
176
|
title: 'Go back and select a different workflow job',
|
|
176
177
|
value: 'go-back',
|
|
@@ -30,22 +30,3 @@ export type WorkflowRunWithJobsResult = WorkflowRunResult & {
|
|
|
30
30
|
jobs: WorkflowJobResult[];
|
|
31
31
|
logs?: string;
|
|
32
32
|
};
|
|
33
|
-
export type WorkflowRawLogLine = {
|
|
34
|
-
logId?: string;
|
|
35
|
-
buildStepId?: string;
|
|
36
|
-
buildStepDisplayName?: string;
|
|
37
|
-
phase?: string;
|
|
38
|
-
time?: string;
|
|
39
|
-
msg?: string;
|
|
40
|
-
result?: string;
|
|
41
|
-
marker?: string;
|
|
42
|
-
err?: any;
|
|
43
|
-
};
|
|
44
|
-
export type WorkflowLogLine = Pick<WorkflowRawLogLine, 'time' | 'result' | 'marker' | 'err'> & Required<Pick<WorkflowRawLogLine, 'msg'>>;
|
|
45
|
-
export type StepLogs = {
|
|
46
|
-
key: string;
|
|
47
|
-
label: string;
|
|
48
|
-
result?: string;
|
|
49
|
-
logLines: WorkflowLogLine[];
|
|
50
|
-
};
|
|
51
|
-
export type WorkflowLogs = Map<string, StepLogs>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { WorkflowJobResult,
|
|
1
|
+
import { WorkflowJobResult, WorkflowRunResult, WorkflowTriggerType } from './types';
|
|
2
2
|
import { WorkflowRunByIdQuery, WorkflowRunByIdWithJobsQuery, WorkflowRunFragment } from '../../graphql/generated';
|
|
3
|
+
import { JobLogs } from '../logs/types';
|
|
3
4
|
import { Choice } from '../../prompts';
|
|
4
5
|
import { ExpoGraphqlClient } from '../context/contextUtils/createGraphqlClient';
|
|
5
6
|
export declare function computeTriggerInfoForWorkflowRun(run: WorkflowRunFragment): {
|
|
@@ -8,16 +9,11 @@ export declare function computeTriggerInfoForWorkflowRun(run: WorkflowRunFragmen
|
|
|
8
9
|
};
|
|
9
10
|
export declare function choiceFromWorkflowRun(run: WorkflowRunResult): Choice;
|
|
10
11
|
export declare function choiceFromWorkflowJob(job: WorkflowJobResult, index: number): Choice;
|
|
11
|
-
export declare function choicesFromWorkflowLogs(logs: WorkflowLogs): (Choice & {
|
|
12
|
-
name: string;
|
|
13
|
-
status: string;
|
|
14
|
-
logLines: WorkflowLogLine[] | undefined;
|
|
15
|
-
})[];
|
|
16
12
|
export declare function processWorkflowRuns(runs: WorkflowRunFragment[]): WorkflowRunResult[];
|
|
17
13
|
type WorkflowRunWithJobs = WorkflowRunByIdWithJobsQuery['workflowRuns']['byId'];
|
|
18
14
|
type JobWithLogs = {
|
|
19
15
|
job: WorkflowRunWithJobs['jobs'][number];
|
|
20
|
-
logs:
|
|
16
|
+
logs: JobLogs;
|
|
21
17
|
};
|
|
22
18
|
export declare function logsForFailedWorkflowRunAsync(graphqlClient: ExpoGraphqlClient, workflowRun: WorkflowRunWithJobs): Promise<JobWithLogs[]>;
|
|
23
19
|
export declare function formatActiveWorkflowRun(jobLogs: JobWithLogs[], maxLogLines?: number): string;
|
|
@@ -4,7 +4,6 @@ exports.workflowRunExitCodes = void 0;
|
|
|
4
4
|
exports.computeTriggerInfoForWorkflowRun = computeTriggerInfoForWorkflowRun;
|
|
5
5
|
exports.choiceFromWorkflowRun = choiceFromWorkflowRun;
|
|
6
6
|
exports.choiceFromWorkflowJob = choiceFromWorkflowJob;
|
|
7
|
-
exports.choicesFromWorkflowLogs = choicesFromWorkflowLogs;
|
|
8
7
|
exports.processWorkflowRuns = processWorkflowRuns;
|
|
9
8
|
exports.logsForFailedWorkflowRunAsync = logsForFailedWorkflowRunAsync;
|
|
10
9
|
exports.formatActiveWorkflowRun = formatActiveWorkflowRun;
|
|
@@ -15,10 +14,11 @@ exports.showWorkflowStatusAsync = showWorkflowStatusAsync;
|
|
|
15
14
|
const tslib_1 = require("tslib");
|
|
16
15
|
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
17
16
|
const fs = tslib_1.__importStar(require("node:fs"));
|
|
18
|
-
const
|
|
17
|
+
const logs_1 = require("./logs");
|
|
19
18
|
const types_1 = require("./types");
|
|
20
19
|
const generated_1 = require("../../graphql/generated");
|
|
21
|
-
const
|
|
20
|
+
const format_1 = require("../logs/format");
|
|
21
|
+
const watcher_1 = require("../logs/watcher");
|
|
22
22
|
const WorkflowRunQuery_1 = require("../../graphql/queries/WorkflowRunQuery");
|
|
23
23
|
const log_1 = tslib_1.__importDefault(require("../../log"));
|
|
24
24
|
const ora_1 = require("../../ora");
|
|
@@ -76,17 +76,6 @@ function choiceFromWorkflowJob(job, index) {
|
|
|
76
76
|
description: `ID: ${job.id}`,
|
|
77
77
|
};
|
|
78
78
|
}
|
|
79
|
-
function choicesFromWorkflowLogs(logs) {
|
|
80
|
-
return Array.from(logs.values())
|
|
81
|
-
.map(({ key, label, result, logLines }) => ({
|
|
82
|
-
title: `${label} - ${result ?? ''}`,
|
|
83
|
-
name: label,
|
|
84
|
-
status: result ?? '',
|
|
85
|
-
value: key,
|
|
86
|
-
logLines,
|
|
87
|
-
}))
|
|
88
|
-
.filter(step => step.status !== 'skipped');
|
|
89
|
-
}
|
|
90
79
|
function processWorkflowRuns(runs) {
|
|
91
80
|
return runs.map(run => {
|
|
92
81
|
const finishedAt = run.status === generated_1.WorkflowRunStatus.InProgress ? null : run.updatedAt;
|
|
@@ -140,16 +129,10 @@ function isJobCompleted(status) {
|
|
|
140
129
|
return false;
|
|
141
130
|
}
|
|
142
131
|
}
|
|
143
|
-
function stepLogTail(step, maxLogLines // -1 means no limit
|
|
144
|
-
) {
|
|
145
|
-
const logLines = step.logLines ?? [];
|
|
146
|
-
const tail = maxLogLines === -1 ? logLines : logLines.slice(-maxLogLines);
|
|
147
|
-
return tail.map(line => line.msg);
|
|
148
|
-
}
|
|
149
132
|
async function logsForFailedWorkflowRunAsync(graphqlClient, workflowRun) {
|
|
150
133
|
const jobs = workflowRun.jobs.filter(job => job.status === generated_1.WorkflowJobStatus.Failure);
|
|
151
134
|
return await Promise.all(jobs.map(async (job) => {
|
|
152
|
-
const maybeLogs = await (0,
|
|
135
|
+
const maybeLogs = await (0, logs_1.fetchAndProcessLogsFromJobAsync)({ graphqlClient }, job);
|
|
153
136
|
return { job, logs: maybeLogs ?? new Map() };
|
|
154
137
|
}));
|
|
155
138
|
}
|
|
@@ -163,7 +146,7 @@ function formatActiveWorkflowRun(jobLogs, maxLogLines = 5 // -1 means no limit
|
|
|
163
146
|
if (job.status !== generated_1.WorkflowJobStatus.InProgress) {
|
|
164
147
|
continue;
|
|
165
148
|
}
|
|
166
|
-
const steps =
|
|
149
|
+
const steps = (0, format_1.choicesFromJobLogs)(logs);
|
|
167
150
|
if (steps.length === 0) {
|
|
168
151
|
continue;
|
|
169
152
|
}
|
|
@@ -171,7 +154,7 @@ function formatActiveWorkflowRun(jobLogs, maxLogLines = 5 // -1 means no limit
|
|
|
171
154
|
statusValues.push({ label: ' Current step', value: currentStep.name });
|
|
172
155
|
if (currentStep.logLines?.length) {
|
|
173
156
|
statusValues.push({ label: ' Current logs', value: '' });
|
|
174
|
-
for (const log of stepLogTail(currentStep, maxLogLines)) {
|
|
157
|
+
for (const log of (0, format_1.stepLogTail)(currentStep, maxLogLines)) {
|
|
175
158
|
statusValues.push({ label: '', value: log });
|
|
176
159
|
}
|
|
177
160
|
}
|
|
@@ -185,14 +168,14 @@ function formatFailedWorkflowRun(jobLogs, maxLogLines = -1 // -1 means no limit
|
|
|
185
168
|
for (const { job, logs } of jobLogs) {
|
|
186
169
|
statusValues.push({ label: '', value: '' });
|
|
187
170
|
statusValues.push({ label: ' Failed job', value: job.name });
|
|
188
|
-
const steps =
|
|
171
|
+
const steps = (0, format_1.choicesFromJobLogs)(logs);
|
|
189
172
|
const failedStep = steps.find(step => step.status === 'fail' || step.status === 'failed');
|
|
190
173
|
if (!failedStep) {
|
|
191
174
|
continue;
|
|
192
175
|
}
|
|
193
176
|
statusValues.push({ label: ' Failed step', value: failedStep.name });
|
|
194
177
|
statusValues.push({ label: ' Logs for failed step', value: '' });
|
|
195
|
-
for (const log of stepLogTail(failedStep, maxLogLines)) {
|
|
178
|
+
for (const log of (0, format_1.stepLogTail)(failedStep, maxLogLines)) {
|
|
196
179
|
statusValues.push({ label: '', value: log });
|
|
197
180
|
}
|
|
198
181
|
}
|
|
@@ -237,7 +220,7 @@ async function showWorkflowStatusAsync(graphqlClient, { workflowRunId, spinnerUs
|
|
|
237
220
|
(0, ora_1.updateSpinnerText)(spinner, {
|
|
238
221
|
prefixText: (0, chalk_1.default) `{bold.yellow Workflow run is waiting to start:}`,
|
|
239
222
|
});
|
|
240
|
-
const watcher = new watcher_1.
|
|
223
|
+
const watcher = new watcher_1.LogsWatcher(() => (0, centrifuge_1.createRealtimeLogsClient)(graphqlClient), () => {
|
|
241
224
|
renderActiveWorkflowRun();
|
|
242
225
|
});
|
|
243
226
|
let failedFetchesCount = 0;
|
|
@@ -256,16 +239,16 @@ async function showWorkflowStatusAsync(graphqlClient, { workflowRunId, spinnerUs
|
|
|
256
239
|
(0, ora_1.updateSpinnerText)(spinner, {
|
|
257
240
|
prefixText: (0, chalk_1.default) `{bold.green Workflow run is in progress:}`,
|
|
258
241
|
});
|
|
259
|
-
const logsStates = await watcher.
|
|
242
|
+
const logsStates = await watcher.syncAsync(workflowRun.jobs.map(job => (0, logs_1.logSourceForWorkflowJob)(graphqlClient, job)));
|
|
260
243
|
for (const job of workflowRun.jobs) {
|
|
261
244
|
if (isJobCompleted(job.status)) {
|
|
262
|
-
(0, nullthrows_1.default)(logsStates.get(job.id), '
|
|
245
|
+
(0, nullthrows_1.default)(logsStates.get(job.id), 'syncAsync must have been called before markCompleted').markCompleted();
|
|
263
246
|
}
|
|
264
247
|
}
|
|
265
248
|
renderActiveWorkflowRun = () => {
|
|
266
249
|
const text = formatActiveWorkflowRun(workflowRun.jobs.map(job => ({
|
|
267
250
|
job,
|
|
268
|
-
logs: (0, nullthrows_1.default)(logsStates.get(job.id), '
|
|
251
|
+
logs: (0, nullthrows_1.default)(logsStates.get(job.id), 'syncAsync must have been called before getLogs').getLogs(),
|
|
269
252
|
})));
|
|
270
253
|
(0, ora_1.updateSpinnerText)(spinner, { text });
|
|
271
254
|
};
|
package/build/commands/go.js
CHANGED
|
@@ -29,11 +29,11 @@ const detectProjectSdkVersionAsync_1 = require("../project/detectProjectSdkVersi
|
|
|
29
29
|
const fetchOrCreateProjectIDForWriteToConfigWithConfirmationAsync_1 = require("../project/fetchOrCreateProjectIDForWriteToConfigWithConfirmationAsync");
|
|
30
30
|
const uploadAccountScopedFileAsync_1 = require("../project/uploadAccountScopedFileAsync");
|
|
31
31
|
const uploadAccountScopedProjectSourceAsync_1 = require("../project/uploadAccountScopedProjectSourceAsync");
|
|
32
|
-
const actions_1 = require("../user/actions");
|
|
33
32
|
const User_1 = require("../user/User");
|
|
34
33
|
const promise_1 = require("../utils/promise");
|
|
35
34
|
const noVcs_1 = tslib_1.__importDefault(require("../vcs/clients/noVcs"));
|
|
36
35
|
const bundleIdentifier_1 = require("../project/ios/bundleIdentifier");
|
|
36
|
+
const UserQuery_1 = require("../graphql/queries/UserQuery");
|
|
37
37
|
function deriveBundleIdSlug(bundleId) {
|
|
38
38
|
return bundleId.split('.').filter(Boolean).pop();
|
|
39
39
|
}
|
|
@@ -114,6 +114,7 @@ class Go extends EasCommand_1.default {
|
|
|
114
114
|
nonInteractive: false,
|
|
115
115
|
});
|
|
116
116
|
log_1.default.withTick(`Logged in as ${chalk_1.default.cyan((0, User_1.getActorDisplayName)(actor))}`);
|
|
117
|
+
const userPrimaryAccount = await UserQuery_1.UserQuery.requireCurrentUserPrimaryAccountAsync(graphqlClient);
|
|
117
118
|
const detectedSdkVersion = await (0, detectProjectSdkVersionAsync_1.detectProjectSdkVersionAsync)(process.cwd());
|
|
118
119
|
if (detectedSdkVersion && !flags['sdk-version']) {
|
|
119
120
|
log_1.default.log(`Current project using SDK ${detectedSdkVersion.split('.')[0]}. Auto-selected same version. To use a different version, pass --sdk-version.`);
|
|
@@ -122,7 +123,7 @@ class Go extends EasCommand_1.default {
|
|
|
122
123
|
if (!sdkVersion) {
|
|
123
124
|
({ sdkVersion } = await this.selectSdkVersionAsync(graphqlClient));
|
|
124
125
|
}
|
|
125
|
-
const bundleId = flags['bundle-id'] ?? this.generateBundleId(
|
|
126
|
+
const bundleId = flags['bundle-id'] ?? this.generateBundleId(userPrimaryAccount);
|
|
126
127
|
if (!(0, bundleIdentifier_1.isBundleIdentifierValid)(bundleId)) {
|
|
127
128
|
throw new Error(`"${bundleId}" is not a valid iOS bundle identifier. ${bundleIdentifier_1.INVALID_BUNDLE_IDENTIFIER_MESSAGE} Pass a valid identifier with --bundle-id.`);
|
|
128
129
|
}
|
|
@@ -131,7 +132,7 @@ class Go extends EasCommand_1.default {
|
|
|
131
132
|
const setupSpinner = (0, ora_1.ora)('Setting up project...').start();
|
|
132
133
|
let projectId;
|
|
133
134
|
try {
|
|
134
|
-
projectId = await withSuppressedOutputAsync(() => this.ensureEasProjectAsync(graphqlClient,
|
|
135
|
+
projectId = await withSuppressedOutputAsync(() => this.ensureEasProjectAsync(graphqlClient, userPrimaryAccount, slug));
|
|
135
136
|
}
|
|
136
137
|
catch (error) {
|
|
137
138
|
setupSpinner.fail();
|
|
@@ -145,7 +146,7 @@ class Go extends EasCommand_1.default {
|
|
|
145
146
|
setupSpinner.stop();
|
|
146
147
|
log_1.default.markFreshLine();
|
|
147
148
|
});
|
|
148
|
-
const { workflowUrl, workflowRunId, sdkVersion: resolvedSdkVersion, } = await this.dispatchWorkflowAsync(graphqlClient, projectId,
|
|
149
|
+
const { workflowUrl, workflowRunId, sdkVersion: resolvedSdkVersion, } = await this.dispatchWorkflowAsync(graphqlClient, projectId, userPrimaryAccount, bundleId, appName, ascApp.id, sdkVersion, tmpDir, vcsClient);
|
|
149
150
|
log_1.default.withTick(`Using Expo Go SDK ${chalk_1.default.cyan(resolvedSdkVersion.split('.')[0])}`);
|
|
150
151
|
log_1.default.withTick(`Build started: ${chalk_1.default.cyan(workflowUrl)}`);
|
|
151
152
|
const status = await this.monitorWorkflowJobsAsync(graphqlClient, workflowRunId);
|
|
@@ -194,8 +195,8 @@ class Go extends EasCommand_1.default {
|
|
|
194
195
|
}), { initial: defaultVersion?.sdkVersion }),
|
|
195
196
|
};
|
|
196
197
|
}
|
|
197
|
-
generateBundleId(
|
|
198
|
-
const username =
|
|
198
|
+
generateBundleId(userPrimaryAccount) {
|
|
199
|
+
const username = userPrimaryAccount.name;
|
|
199
200
|
const sanitizedUsername = username
|
|
200
201
|
.toLowerCase()
|
|
201
202
|
.replace(/[^a-z0-9-]/g, '-')
|
|
@@ -203,14 +204,13 @@ class Go extends EasCommand_1.default {
|
|
|
203
204
|
.replace(/^-+|-+$/g, '');
|
|
204
205
|
return `com.${sanitizedUsername}.expogo`;
|
|
205
206
|
}
|
|
206
|
-
async ensureEasProjectAsync(graphqlClient,
|
|
207
|
-
const
|
|
208
|
-
const existingProjectId = await (0, fetchOrCreateProjectIDForWriteToConfigWithConfirmationAsync_1.findProjectIdByAccountNameAndSlugNullableAsync)(graphqlClient, account.name, slug);
|
|
207
|
+
async ensureEasProjectAsync(graphqlClient, userPrimaryAccount, slug) {
|
|
208
|
+
const existingProjectId = await (0, fetchOrCreateProjectIDForWriteToConfigWithConfirmationAsync_1.findProjectIdByAccountNameAndSlugNullableAsync)(graphqlClient, userPrimaryAccount.name, slug);
|
|
209
209
|
if (existingProjectId) {
|
|
210
210
|
return existingProjectId;
|
|
211
211
|
}
|
|
212
212
|
return await AppMutation_1.AppMutation.createAppAsync(graphqlClient, {
|
|
213
|
-
accountId:
|
|
213
|
+
accountId: userPrimaryAccount.id,
|
|
214
214
|
projectName: slug,
|
|
215
215
|
});
|
|
216
216
|
}
|
|
@@ -275,8 +275,7 @@ class Go extends EasCommand_1.default {
|
|
|
275
275
|
}
|
|
276
276
|
return ascApp;
|
|
277
277
|
}
|
|
278
|
-
async dispatchWorkflowAsync(graphqlClient, projectId,
|
|
279
|
-
const account = (0, actions_1.ensureActorHasPrimaryAccount)(actor);
|
|
278
|
+
async dispatchWorkflowAsync(graphqlClient, projectId, userPrimaryAccount, bundleId, appName, ascAppId, sdkVersion, tmpDir, vcsClient) {
|
|
280
279
|
const repackConfig = await WorkflowRunQuery_1.WorkflowRunQuery.expoGoRepackConfigurationAsync(graphqlClient, {
|
|
281
280
|
appId: projectId,
|
|
282
281
|
ascAppId,
|
|
@@ -289,17 +288,17 @@ class Go extends EasCommand_1.default {
|
|
|
289
288
|
const { projectArchiveBucketKey } = await (0, uploadAccountScopedProjectSourceAsync_1.uploadAccountScopedProjectSourceAsync)({
|
|
290
289
|
graphqlClient,
|
|
291
290
|
vcsClient,
|
|
292
|
-
accountId:
|
|
291
|
+
accountId: userPrimaryAccount.id,
|
|
293
292
|
});
|
|
294
293
|
const { fileBucketKey: easJsonBucketKey } = await (0, uploadAccountScopedFileAsync_1.uploadAccountScopedFileAsync)({
|
|
295
294
|
graphqlClient,
|
|
296
|
-
accountId:
|
|
295
|
+
accountId: userPrimaryAccount.id,
|
|
297
296
|
filePath: path.join(tmpDir, 'eas.json'),
|
|
298
297
|
maxSizeBytes: 1024 * 1024,
|
|
299
298
|
});
|
|
300
299
|
const { fileBucketKey: packageJsonBucketKey } = await (0, uploadAccountScopedFileAsync_1.uploadAccountScopedFileAsync)({
|
|
301
300
|
graphqlClient,
|
|
302
|
-
accountId:
|
|
301
|
+
accountId: userPrimaryAccount.id,
|
|
303
302
|
filePath: path.join(tmpDir, 'package.json'),
|
|
304
303
|
maxSizeBytes: 1024 * 1024,
|
|
305
304
|
});
|
|
@@ -315,7 +314,7 @@ class Go extends EasCommand_1.default {
|
|
|
315
314
|
packageJsonBucketKey,
|
|
316
315
|
},
|
|
317
316
|
});
|
|
318
|
-
const workflowUrl = (0, url_1.getWorkflowRunUrl)(
|
|
317
|
+
const workflowUrl = (0, url_1.getWorkflowRunUrl)(userPrimaryAccount.name, deriveBundleIdSlug(bundleId), result.id);
|
|
319
318
|
return { workflowUrl, workflowRunId: result.id, sdkVersion: repackConfig.sdkVersion };
|
|
320
319
|
}
|
|
321
320
|
async monitorWorkflowJobsAsync(graphqlClient, workflowRunId) {
|
|
@@ -16,7 +16,6 @@ const scheme_1 = require("../../project/ios/scheme");
|
|
|
16
16
|
const target_1 = require("../../project/ios/target");
|
|
17
17
|
const projectUtils_1 = require("../../project/projectUtils");
|
|
18
18
|
const prompts_1 = require("../../prompts");
|
|
19
|
-
const actions_1 = require("../../user/actions");
|
|
20
19
|
const context_1 = require("../context");
|
|
21
20
|
const AscApiKeyUtils_1 = require("../ios/actions/AscApiKeyUtils");
|
|
22
21
|
const AssignAscApiKey_1 = require("../ios/actions/AssignAscApiKey");
|
|
@@ -39,6 +38,7 @@ const SetUpProvisioningProfile_1 = require("../ios/actions/SetUpProvisioningProf
|
|
|
39
38
|
const SetUpPushKey_1 = require("../ios/actions/SetUpPushKey");
|
|
40
39
|
const UpdateCredentialsJson_1 = require("../ios/actions/UpdateCredentialsJson");
|
|
41
40
|
const printCredentials_1 = require("../ios/utils/printCredentials");
|
|
41
|
+
const UserQuery_1 = require("../../graphql/queries/UserQuery");
|
|
42
42
|
class ManageIos {
|
|
43
43
|
callingAction;
|
|
44
44
|
projectDir;
|
|
@@ -76,7 +76,7 @@ class ManageIos {
|
|
|
76
76
|
};
|
|
77
77
|
const account = ctx.hasProjectContext
|
|
78
78
|
? await getAccountForProjectAsync(await ctx.getProjectIdAsync())
|
|
79
|
-
:
|
|
79
|
+
: await UserQuery_1.UserQuery.requireCurrentUserPrimaryAccountAsync(ctx.graphqlClient);
|
|
80
80
|
let app = null;
|
|
81
81
|
let targets = null;
|
|
82
82
|
if (ctx.hasProjectContext) {
|
|
@@ -9,8 +9,8 @@ const Actions_1 = require("./Actions");
|
|
|
9
9
|
const CheckBuildProfileFlagAgainstEasJson_1 = require("./CheckBuildProfileFlagAgainstEasJson");
|
|
10
10
|
const ManageIos_1 = require("./ManageIos");
|
|
11
11
|
const projectUtils_1 = require("../../project/projectUtils");
|
|
12
|
-
const actions_1 = require("../../user/actions");
|
|
13
12
|
const context_1 = require("../context");
|
|
13
|
+
const UserQuery_1 = require("../../graphql/queries/UserQuery");
|
|
14
14
|
class SetUpIosBuildCredentials extends ManageIos_1.ManageIos {
|
|
15
15
|
setUpBuildCredentialsWithProfileNameFromFlag;
|
|
16
16
|
constructor(callingAction, projectDir, setUpBuildCredentialsWithProfileNameFromFlag) {
|
|
@@ -44,7 +44,7 @@ class SetUpIosBuildCredentials extends ManageIos_1.ManageIos {
|
|
|
44
44
|
};
|
|
45
45
|
const account = ctx.hasProjectContext
|
|
46
46
|
? await getAccountForProjectAsync(await ctx.getProjectIdAsync())
|
|
47
|
-
:
|
|
47
|
+
: await UserQuery_1.UserQuery.requireCurrentUserPrimaryAccountAsync(ctx.graphqlClient);
|
|
48
48
|
let app = null;
|
|
49
49
|
let targets = null;
|
|
50
50
|
if (ctx.hasProjectContext) {
|