eas-cli 22.0.0 → 22.2.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 +167 -154
- package/build/commands/fingerprint/compare.js +100 -48
- package/build/commands/go.d.ts +1 -0
- package/build/commands/go.js +8 -2
- package/build/commands/simulator/availability.js +2 -1
- package/build/commands/simulator/index.d.ts +1 -0
- package/build/commands/simulator/index.js +10 -5
- package/build/commands/simulator/stop.js +1 -0
- package/build/graphql/generated.d.ts +109 -12
- package/build/graphql/generated.js +4 -0
- package/build/graphql/queries/DeviceRunSessionQuery.js +5 -0
- package/build/simulator/env.d.ts +1 -1
- package/build/simulator/env.js +12 -2
- package/build/simulator/utils.js +26 -0
- package/build/uploads.d.ts +5 -0
- package/build/uploads.js +22 -0
- package/oclif.manifest.json +2434 -2410
- package/package.json +4 -4
|
@@ -112,7 +112,14 @@ class FingerprintCompare extends EasCommand_1.default {
|
|
|
112
112
|
environmentForProjectFingerprint: environment,
|
|
113
113
|
}, firstFingerprintInfo);
|
|
114
114
|
const { fingerprint: secondFingerprint, origin: secondFingerprintOrigin } = secondFingerprintInfo;
|
|
115
|
+
const unavailableSourceHashes = [
|
|
116
|
+
firstFingerprintInfo.isFingerprintSourceUnavailable ? firstFingerprint.hash : null,
|
|
117
|
+
secondFingerprintInfo.isFingerprintSourceUnavailable ? secondFingerprint.hash : null,
|
|
118
|
+
].filter((hash) => hash !== null);
|
|
115
119
|
if (json) {
|
|
120
|
+
if (unavailableSourceHashes.length > 0) {
|
|
121
|
+
throw new Error(getUnavailableSourceMessage(unavailableSourceHashes));
|
|
122
|
+
}
|
|
116
123
|
(0, json_1.printJsonOnlyOutput)({ fingerprint1: firstFingerprint, fingerprint2: secondFingerprint });
|
|
117
124
|
return;
|
|
118
125
|
}
|
|
@@ -123,54 +130,60 @@ class FingerprintCompare extends EasCommand_1.default {
|
|
|
123
130
|
else {
|
|
124
131
|
log_1.default.log(`🔄 ${capitalizeFirstLetter(prettyPrintFingerprint(firstFingerprint, firstFingerprintOrigin))} differs from ${prettyPrintFingerprint(secondFingerprint, secondFingerprintOrigin)}`);
|
|
125
132
|
}
|
|
126
|
-
|
|
127
|
-
if (!fingerprintDiffs) {
|
|
128
|
-
log_1.default.error('Fingerprint diffs can only be computed for projects with SDK 52 or higher');
|
|
129
|
-
return;
|
|
130
|
-
}
|
|
131
|
-
const filePathDiffs = fingerprintDiffs.filter(diff => {
|
|
132
|
-
let sourceType;
|
|
133
|
-
if (diff.op === 'added') {
|
|
134
|
-
sourceType = diff.addedSource.type;
|
|
135
|
-
}
|
|
136
|
-
else if (diff.op === 'removed') {
|
|
137
|
-
sourceType = diff.removedSource.type;
|
|
138
|
-
}
|
|
139
|
-
else if (diff.op === 'changed') {
|
|
140
|
-
sourceType = diff.beforeSource.type;
|
|
141
|
-
}
|
|
142
|
-
return sourceType === 'dir' || sourceType === 'file';
|
|
143
|
-
});
|
|
144
|
-
if (filePathDiffs.length > 0) {
|
|
133
|
+
if (unavailableSourceHashes.length > 0) {
|
|
145
134
|
log_1.default.newLine();
|
|
146
|
-
log_1.default.
|
|
135
|
+
log_1.default.warn(`A detailed diff cannot be shown. ${getUnavailableSourceMessage(unavailableSourceHashes)}`);
|
|
147
136
|
}
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
137
|
+
else {
|
|
138
|
+
const fingerprintDiffs = (0, cli_1.diffFingerprint)(projectDir, firstFingerprint, secondFingerprint);
|
|
139
|
+
if (!fingerprintDiffs) {
|
|
140
|
+
log_1.default.error('Fingerprint diffs can only be computed for projects with SDK 52 or higher');
|
|
141
|
+
return;
|
|
153
142
|
}
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
143
|
+
const filePathDiffs = fingerprintDiffs.filter(diff => {
|
|
144
|
+
let sourceType;
|
|
145
|
+
if (diff.op === 'added') {
|
|
146
|
+
sourceType = diff.addedSource.type;
|
|
147
|
+
}
|
|
148
|
+
else if (diff.op === 'removed') {
|
|
149
|
+
sourceType = diff.removedSource.type;
|
|
150
|
+
}
|
|
151
|
+
else if (diff.op === 'changed') {
|
|
152
|
+
sourceType = diff.beforeSource.type;
|
|
153
|
+
}
|
|
154
|
+
return sourceType === 'dir' || sourceType === 'file';
|
|
155
|
+
});
|
|
156
|
+
if (filePathDiffs.length > 0) {
|
|
157
|
+
log_1.default.newLine();
|
|
158
|
+
log_1.default.log('📁 Paths with native dependencies:');
|
|
163
159
|
}
|
|
164
|
-
|
|
165
|
-
|
|
160
|
+
const fields = [];
|
|
161
|
+
for (const diff of filePathDiffs) {
|
|
162
|
+
const field = getDiffFilePathFields(diff);
|
|
163
|
+
if (!field) {
|
|
164
|
+
throw new Error(`Unsupported diff: ${JSON.stringify(diff)}`);
|
|
165
|
+
}
|
|
166
|
+
fields.push(field);
|
|
166
167
|
}
|
|
167
|
-
|
|
168
|
-
|
|
168
|
+
log_1.default.log((0, formatFields_1.default)(fields, {
|
|
169
|
+
labelFormat: label => ` ${chalk_1.default.dim(label)}:`,
|
|
170
|
+
}));
|
|
171
|
+
const contentDiffs = fingerprintDiffs.filter(diff => {
|
|
172
|
+
let sourceType;
|
|
173
|
+
if (diff.op === 'added') {
|
|
174
|
+
sourceType = diff.addedSource.type;
|
|
175
|
+
}
|
|
176
|
+
else if (diff.op === 'removed') {
|
|
177
|
+
sourceType = diff.removedSource.type;
|
|
178
|
+
}
|
|
179
|
+
else if (diff.op === 'changed') {
|
|
180
|
+
sourceType = diff.beforeSource.type;
|
|
181
|
+
}
|
|
182
|
+
return sourceType === 'contents';
|
|
183
|
+
});
|
|
184
|
+
for (const diff of contentDiffs) {
|
|
185
|
+
printContentDiff(diff);
|
|
169
186
|
}
|
|
170
|
-
return sourceType === 'contents';
|
|
171
|
-
});
|
|
172
|
-
for (const diff of contentDiffs) {
|
|
173
|
-
printContentDiff(diff);
|
|
174
187
|
}
|
|
175
188
|
if (nonInteractive) {
|
|
176
189
|
return;
|
|
@@ -310,7 +323,11 @@ async function getFingerprintInfoFromLocalProjectAsync({ graphqlClient, projectD
|
|
|
310
323
|
? { ...(await getServerSideEnvironmentVariablesAsync()), EXPO_NO_DOTENV: '1' }
|
|
311
324
|
: undefined;
|
|
312
325
|
const fingerprint = await (0, utils_1.getFingerprintInfoFromLocalProjectForPlatformsAsync)(graphqlClient, projectDir, projectId, vcsClient, firstFingerprintPlatforms, { env });
|
|
313
|
-
return {
|
|
326
|
+
return {
|
|
327
|
+
fingerprint,
|
|
328
|
+
origin: { type: FingerprintOriginType.Project },
|
|
329
|
+
isFingerprintSourceUnavailable: false,
|
|
330
|
+
};
|
|
314
331
|
}
|
|
315
332
|
async function getFingerprintFromUpdateFragmentAsync(updateWithFingerprint) {
|
|
316
333
|
if (!updateWithFingerprint.fingerprint) {
|
|
@@ -319,8 +336,10 @@ async function getFingerprintFromUpdateFragmentAsync(updateWithFingerprint) {
|
|
|
319
336
|
else if (!updateWithFingerprint.fingerprint.debugInfoUrl) {
|
|
320
337
|
throw new Error(`Fingerprint source for update ${updateWithFingerprint.id} was not computed.`);
|
|
321
338
|
}
|
|
339
|
+
const { fingerprint, isFingerprintSourceUnavailable } = await getFingerprintFromFingerprintFragmentAsync(updateWithFingerprint.fingerprint);
|
|
322
340
|
return {
|
|
323
|
-
fingerprint
|
|
341
|
+
fingerprint,
|
|
342
|
+
isFingerprintSourceUnavailable,
|
|
324
343
|
platforms: [(0, utils_1.stringToAppPlatform)(updateWithFingerprint.platform)],
|
|
325
344
|
origin: {
|
|
326
345
|
type: FingerprintOriginType.Update,
|
|
@@ -330,7 +349,7 @@ async function getFingerprintFromUpdateFragmentAsync(updateWithFingerprint) {
|
|
|
330
349
|
}
|
|
331
350
|
async function getFingerprintInfoFromHashAsync(graphqlClient, projectId, hash) {
|
|
332
351
|
const fingerprintFragment = await getFingerprintFragmentFromHashAsync(graphqlClient, projectId, hash);
|
|
333
|
-
const fingerprint = await getFingerprintFromFingerprintFragmentAsync(fingerprintFragment);
|
|
352
|
+
const { fingerprint, isFingerprintSourceUnavailable } = await getFingerprintFromFingerprintFragmentAsync(fingerprintFragment);
|
|
334
353
|
let platforms;
|
|
335
354
|
const fingerprintBuilds = fingerprintFragment.builds?.edges.map(edge => edge.node) ?? [];
|
|
336
355
|
const fingerprintUpdates = fingerprintFragment.updates?.edges.map(edge => edge.node) ?? [];
|
|
@@ -342,6 +361,7 @@ async function getFingerprintInfoFromHashAsync(graphqlClient, projectId, hash) {
|
|
|
342
361
|
}
|
|
343
362
|
return {
|
|
344
363
|
fingerprint,
|
|
364
|
+
isFingerprintSourceUnavailable,
|
|
345
365
|
platforms,
|
|
346
366
|
origin: {
|
|
347
367
|
type: FingerprintOriginType.Hash,
|
|
@@ -390,8 +410,10 @@ async function getFingerprintInfoFromBuildIdAsync(graphqlClient, buildId) {
|
|
|
390
410
|
else if (!buildWithFingerprint.fingerprint.debugInfoUrl) {
|
|
391
411
|
throw new Error(`Fingerprint source for build ${buildId} was not computed.`);
|
|
392
412
|
}
|
|
413
|
+
const { fingerprint, isFingerprintSourceUnavailable } = await getFingerprintFromFingerprintFragmentAsync(buildWithFingerprint.fingerprint);
|
|
393
414
|
return {
|
|
394
|
-
fingerprint
|
|
415
|
+
fingerprint,
|
|
416
|
+
isFingerprintSourceUnavailable,
|
|
395
417
|
platforms: [buildWithFingerprint.platform],
|
|
396
418
|
origin: {
|
|
397
419
|
type: FingerprintOriginType.Build,
|
|
@@ -410,13 +432,43 @@ async function getFingerprintFragmentFromHashAsync(graphqlClient, projectId, has
|
|
|
410
432
|
}
|
|
411
433
|
return fingerprint;
|
|
412
434
|
}
|
|
435
|
+
async function fetchFingerprintSourceAsync(fingerprintDebugUrl) {
|
|
436
|
+
const fingerprintResponse = await fetch(fingerprintDebugUrl);
|
|
437
|
+
if (!fingerprintResponse.ok) {
|
|
438
|
+
throw new Error(`Fingerprint source request failed: ${fingerprintResponse.status}`);
|
|
439
|
+
}
|
|
440
|
+
const fingerprintSource = (await fingerprintResponse.json());
|
|
441
|
+
if (!Array.isArray(fingerprintSource?.sources)) {
|
|
442
|
+
throw new Error('Fingerprint source file does not contain a list of sources');
|
|
443
|
+
}
|
|
444
|
+
return fingerprintSource;
|
|
445
|
+
}
|
|
413
446
|
async function getFingerprintFromFingerprintFragmentAsync(fingerprintFragment) {
|
|
414
447
|
const fingerprintDebugUrl = fingerprintFragment.debugInfoUrl;
|
|
415
448
|
if (!fingerprintDebugUrl) {
|
|
416
449
|
throw new Error(`The source for fingerprint hash ${fingerprintFragment.hash} was not computed.`);
|
|
417
450
|
}
|
|
418
|
-
|
|
419
|
-
|
|
451
|
+
try {
|
|
452
|
+
return {
|
|
453
|
+
fingerprint: await fetchFingerprintSourceAsync(fingerprintDebugUrl),
|
|
454
|
+
isFingerprintSourceUnavailable: false,
|
|
455
|
+
};
|
|
456
|
+
}
|
|
457
|
+
catch (error) {
|
|
458
|
+
// Uploaded source files expire after a period of time or may be malformed
|
|
459
|
+
// (e.g. zero-length). The hash from the API is still valid, so fall back to a
|
|
460
|
+
// sourceless fingerprint instead of failing the whole comparison.
|
|
461
|
+
log_1.default.debug(`Failed to fetch source for fingerprint hash ${fingerprintFragment.hash}`, error);
|
|
462
|
+
return {
|
|
463
|
+
fingerprint: { hash: fingerprintFragment.hash, sources: [] },
|
|
464
|
+
isFingerprintSourceUnavailable: true,
|
|
465
|
+
};
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
function getUnavailableSourceMessage(hashes) {
|
|
469
|
+
return hashes.length === 1
|
|
470
|
+
? `The uploaded source file for fingerprint ${hashes[0]} has expired or is invalid.`
|
|
471
|
+
: `The uploaded source files for fingerprints ${hashes.join(' and ')} have expired or are invalid.`;
|
|
420
472
|
}
|
|
421
473
|
function printContentDiff(diff) {
|
|
422
474
|
if (diff.op === 'added') {
|
package/build/commands/go.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import EasCommand from '../commandUtils/EasCommand';
|
|
2
2
|
export declare function detectProjectSdkVersionAsync(projectDir: string): Promise<string | undefined>;
|
|
3
|
+
export declare function toRepackTargetSdkVersion(sdkVersion: string | undefined): string | undefined;
|
|
3
4
|
export default class Go extends EasCommand {
|
|
4
5
|
static description: string;
|
|
5
6
|
static hidden: boolean;
|
package/build/commands/go.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.detectProjectSdkVersionAsync = detectProjectSdkVersionAsync;
|
|
4
|
+
exports.toRepackTargetSdkVersion = toRepackTargetSdkVersion;
|
|
4
5
|
const tslib_1 = require("tslib");
|
|
5
6
|
const config_1 = require("@expo/config");
|
|
6
7
|
const core_1 = require("@oclif/core");
|
|
@@ -8,6 +9,7 @@ const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
|
8
9
|
const fs = tslib_1.__importStar(require("fs-extra"));
|
|
9
10
|
const os = tslib_1.__importStar(require("os"));
|
|
10
11
|
const path = tslib_1.__importStar(require("path"));
|
|
12
|
+
const semver_1 = tslib_1.__importDefault(require("semver"));
|
|
11
13
|
const EasCommand_1 = tslib_1.__importDefault(require("../commandUtils/EasCommand"));
|
|
12
14
|
const context_1 = require("../credentials/context");
|
|
13
15
|
const AscApiKeyUtils_1 = require("../credentials/ios/actions/AscApiKeyUtils");
|
|
@@ -49,6 +51,10 @@ async function detectProjectSdkVersionAsync(projectDir) {
|
|
|
49
51
|
return;
|
|
50
52
|
}
|
|
51
53
|
}
|
|
54
|
+
function toRepackTargetSdkVersion(sdkVersion) {
|
|
55
|
+
const coerced = semver_1.default.coerce(sdkVersion);
|
|
56
|
+
return coerced ? `${coerced.major}.0.0` : sdkVersion;
|
|
57
|
+
}
|
|
52
58
|
async function setupTestFlightAsync(ascApp) {
|
|
53
59
|
await (0, ensureTestFlightGroup_1.ensureTestFlightGroupExistsAsync)(ascApp);
|
|
54
60
|
}
|
|
@@ -103,7 +109,7 @@ class Go extends EasCommand_1.default {
|
|
|
103
109
|
default: 'My Expo Go',
|
|
104
110
|
}),
|
|
105
111
|
'sdk-version': core_1.Flags.string({
|
|
106
|
-
description: 'Expo Go SDK version to prepare (default:
|
|
112
|
+
description: 'Expo Go SDK version to prepare, for example 57 (default: the SDK version of the current project)',
|
|
107
113
|
required: false,
|
|
108
114
|
}),
|
|
109
115
|
credentials: core_1.Flags.boolean({
|
|
@@ -126,7 +132,7 @@ class Go extends EasCommand_1.default {
|
|
|
126
132
|
if (detectedSdkVersion && !flags['sdk-version']) {
|
|
127
133
|
log_1.default.log(`Current project using SDK ${detectedSdkVersion.split('.')[0]}. Auto-selected same version. To use a different version, pass --sdk-version.`);
|
|
128
134
|
}
|
|
129
|
-
let sdkVersion = flags['sdk-version'] ?? detectedSdkVersion;
|
|
135
|
+
let sdkVersion = toRepackTargetSdkVersion(flags['sdk-version'] ?? detectedSdkVersion);
|
|
130
136
|
if (!sdkVersion) {
|
|
131
137
|
({ sdkVersion } = await this.selectSdkVersionAsync(graphqlClient));
|
|
132
138
|
}
|
|
@@ -25,7 +25,7 @@ class SimulatorAvailability extends EasCommand_1.default {
|
|
|
25
25
|
if (jsonFlag) {
|
|
26
26
|
(0, json_1.enableJsonOutput)();
|
|
27
27
|
}
|
|
28
|
-
const { projectId, loggedIn: { graphqlClient }, } = await this.getContextAsync(SimulatorAvailability, {
|
|
28
|
+
const { projectId, loggedIn: { actor, graphqlClient }, } = await this.getContextAsync(SimulatorAvailability, {
|
|
29
29
|
nonInteractive,
|
|
30
30
|
});
|
|
31
31
|
const fetchSpinner = jsonFlag ? null : (0, ora_1.ora)('Checking EAS Simulator availability').start();
|
|
@@ -33,6 +33,7 @@ class SimulatorAvailability extends EasCommand_1.default {
|
|
|
33
33
|
let available;
|
|
34
34
|
try {
|
|
35
35
|
({ accountName, available } = await DeviceRunSessionAvailabilityQuery_1.DeviceRunSessionAvailabilityQuery.byAppIdAsync(graphqlClient, projectId));
|
|
36
|
+
available ||= actor.isExpoAdmin;
|
|
36
37
|
fetchSpinner?.stop();
|
|
37
38
|
}
|
|
38
39
|
catch (err) {
|
|
@@ -8,6 +8,7 @@ export default class Simulator extends EasCommand {
|
|
|
8
8
|
'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
9
9
|
platform: import("@oclif/core/lib/interfaces").OptionFlag<"android" | "ios" | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
10
10
|
name: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
|
+
device: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
12
|
type: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
12
13
|
'package-version': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
13
14
|
'max-duration-minutes': import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
@@ -42,6 +42,9 @@ class Simulator extends EasCommand_1.default {
|
|
|
42
42
|
name: core_1.Flags.string({
|
|
43
43
|
description: 'Human-readable name for the simulator session, shown in eas simulator:list and on expo.dev. Defaults to unnamed.',
|
|
44
44
|
}),
|
|
45
|
+
device: core_1.Flags.string({
|
|
46
|
+
description: 'Virtual device to start for the session. On iOS, a Simulator device name or UDID (e.g. "iPhone 16 Pro"). On Android, an AVD hardware profile id (e.g. "pixel_7"). Defaults to a device chosen by the runner.',
|
|
47
|
+
}),
|
|
45
48
|
type: core_1.Flags.option({
|
|
46
49
|
description: 'Type of simulator session to create',
|
|
47
50
|
options: Object.values(utils_1.DEVICE_RUN_SESSION_TYPE_FLAG_VALUES),
|
|
@@ -92,6 +95,7 @@ class Simulator extends EasCommand_1.default {
|
|
|
92
95
|
// The server rejects blank names, so trim here and treat a whitespace-only
|
|
93
96
|
// --name as if it had been omitted rather than surfacing a validation error.
|
|
94
97
|
const name = flags.name?.trim() || undefined;
|
|
98
|
+
const deviceIdentifier = flags.device?.trim() || undefined;
|
|
95
99
|
await (0, env_1.loadSimulatorEnvAsync)(projectDir);
|
|
96
100
|
const existingDeviceRunSessionId = process.env[env_1.EAS_SIMULATOR_SESSION_ID];
|
|
97
101
|
if (existingDeviceRunSessionId && !flags.force) {
|
|
@@ -115,6 +119,7 @@ class Simulator extends EasCommand_1.default {
|
|
|
115
119
|
platform,
|
|
116
120
|
type: utils_1.DEVICE_RUN_SESSION_TYPE_BY_FLAG_VALUE[flags.type],
|
|
117
121
|
packageVersion: flags['package-version'],
|
|
122
|
+
deviceIdentifier,
|
|
118
123
|
maxRunTimeMinutes: flags['max-duration-minutes'],
|
|
119
124
|
});
|
|
120
125
|
deviceRunSessionId = session.id;
|
|
@@ -282,7 +287,7 @@ async function waitForSessionEndOrInterruptAsync({ graphqlClient, deviceRunSessi
|
|
|
282
287
|
jobRunStatus === generated_1.JobRunStatus.Canceled ||
|
|
283
288
|
jobRunStatus === generated_1.JobRunStatus.Finished) {
|
|
284
289
|
spinner.succeed(`Simulator session ended. ${(0, log_1.link)(deviceRunSessionUrl)}`);
|
|
285
|
-
await resetSimulatorEnvVerboseAsync(projectDir);
|
|
290
|
+
await resetSimulatorEnvVerboseAsync(projectDir, deviceRunSessionId);
|
|
286
291
|
return;
|
|
287
292
|
}
|
|
288
293
|
await (0, promise_1.sleepAsync)(POLL_INTERVAL_MS, signal);
|
|
@@ -291,7 +296,7 @@ async function waitForSessionEndOrInterruptAsync({ graphqlClient, deviceRunSessi
|
|
|
291
296
|
const stopped = await ensureDeviceRunSessionStoppedSafelyAsync(graphqlClient, deviceRunSessionId);
|
|
292
297
|
if (stopped) {
|
|
293
298
|
spinner.succeed('Simulator session stopped');
|
|
294
|
-
await resetSimulatorEnvVerboseAsync(projectDir);
|
|
299
|
+
await resetSimulatorEnvVerboseAsync(projectDir, deviceRunSessionId);
|
|
295
300
|
}
|
|
296
301
|
else {
|
|
297
302
|
spinner.fail(`Could not confirm the simulator session was stopped. Run \`eas simulator:stop --id ${deviceRunSessionId}\` to terminate it and avoid unexpected charges.`);
|
|
@@ -331,7 +336,7 @@ async function stopDeviceRunSessionAfterInterruptAsync({ graphqlClient, deviceRu
|
|
|
331
336
|
const stopped = await ensureDeviceRunSessionStoppedSafelyAsync(graphqlClient, deviceRunSessionId);
|
|
332
337
|
if (stopped) {
|
|
333
338
|
spinner.succeed('Simulator session stopped');
|
|
334
|
-
await resetSimulatorEnvVerboseAsync(projectDir);
|
|
339
|
+
await resetSimulatorEnvVerboseAsync(projectDir, deviceRunSessionId);
|
|
335
340
|
}
|
|
336
341
|
else {
|
|
337
342
|
spinner.fail(`Could not confirm the simulator session was stopped. Run \`eas simulator:stop --id ${deviceRunSessionId}\` to terminate it and avoid unexpected charges.`);
|
|
@@ -342,9 +347,9 @@ async function stopDeviceRunSessionAfterInterruptAsync({ graphqlClient, deviceRu
|
|
|
342
347
|
}
|
|
343
348
|
process.exit(130);
|
|
344
349
|
}
|
|
345
|
-
async function resetSimulatorEnvVerboseAsync(projectDir) {
|
|
350
|
+
async function resetSimulatorEnvVerboseAsync(projectDir, deviceRunSessionId) {
|
|
346
351
|
try {
|
|
347
|
-
await (0, env_1.resetSimulatorEnvAsync)(projectDir);
|
|
352
|
+
await (0, env_1.resetSimulatorEnvAsync)(projectDir, deviceRunSessionId);
|
|
348
353
|
}
|
|
349
354
|
catch (err) {
|
|
350
355
|
log_1.default.error(`Failed to clean up ${env_1.SIMULATOR_DOTENV_FILE_NAME}`);
|
|
@@ -46,6 +46,7 @@ class SimulatorStop extends EasCommand_1.default {
|
|
|
46
46
|
stopSpinner.fail(`Failed to stop simulator session ${flagId}`);
|
|
47
47
|
throw err;
|
|
48
48
|
}
|
|
49
|
+
await (0, env_1.resetSimulatorEnvAsync)(projectDir, flagId);
|
|
49
50
|
if (jsonFlag) {
|
|
50
51
|
(0, json_1.printJsonOnlyOutput)({ id: session.id, status: session.status });
|
|
51
52
|
}
|
|
@@ -1304,6 +1304,12 @@ export type App = Project & {
|
|
|
1304
1304
|
internalDistributionBuildPrivacy: AppInternalDistributionBuildPrivacy;
|
|
1305
1305
|
/** iOS app credentials for the project */
|
|
1306
1306
|
iosAppCredentials: Array<IosAppCredentials>;
|
|
1307
|
+
/**
|
|
1308
|
+
* Tells you if the project can show the Observe promotional notification. This field is part of
|
|
1309
|
+
* the observe-notification experiment.
|
|
1310
|
+
* @deprecated This field is deprecated from its first release. It supplies data for the observe-notification promotion on the project page. It will be removed when the promotion ends. Do not rely on it.
|
|
1311
|
+
*/
|
|
1312
|
+
isEligibleForObserveNotice: Scalars['Boolean']['output'];
|
|
1307
1313
|
lastDeletionAttemptTime?: Maybe<Scalars['DateTime']['output']>;
|
|
1308
1314
|
/** Time of the last user activity (update, branch, submission). */
|
|
1309
1315
|
latestActivity: Scalars['DateTime']['output'];
|
|
@@ -1877,6 +1883,8 @@ export type AppObserve = {
|
|
|
1877
1883
|
navigationRoutes: AppObserveNavigationRoutesConnection;
|
|
1878
1884
|
/** Active users and sessions for the Overview engagement band, across all versions. */
|
|
1879
1885
|
overviewEngagement: AppObserveOverviewEngagement;
|
|
1886
|
+
/** Crash-free rates with previous-period comparison for the Overview stability tiles. */
|
|
1887
|
+
overviewStability: AppObserveOverviewStability;
|
|
1880
1888
|
/** Per-update comparison within one app version: the embedded bundle plus each OTA update. */
|
|
1881
1889
|
overviewUpdateComparison: AppObserveOverviewUpdateComparison;
|
|
1882
1890
|
/** Per-version, per-platform metric summaries for the Overview version-comparison matrix. */
|
|
@@ -1956,6 +1964,9 @@ export type AppObserveNavigationRoutesArgs = {
|
|
|
1956
1964
|
export type AppObserveOverviewEngagementArgs = {
|
|
1957
1965
|
input: AppObserveOverviewEngagementInput;
|
|
1958
1966
|
};
|
|
1967
|
+
export type AppObserveOverviewStabilityArgs = {
|
|
1968
|
+
input: AppObserveOverviewStabilityInput;
|
|
1969
|
+
};
|
|
1959
1970
|
export type AppObserveOverviewUpdateComparisonArgs = {
|
|
1960
1971
|
input: AppObserveOverviewUpdateComparisonInput;
|
|
1961
1972
|
};
|
|
@@ -2090,6 +2101,8 @@ export type AppObserveCustomEvent = {
|
|
|
2090
2101
|
sessionId?: Maybe<Scalars['String']['output']>;
|
|
2091
2102
|
severityNumber?: Maybe<Scalars['Int']['output']>;
|
|
2092
2103
|
severityText?: Maybe<Scalars['String']['output']>;
|
|
2104
|
+
/** Build whose uploaded source map symbolicated exceptionStacktrace; null when the stack trace is shown as reported. */
|
|
2105
|
+
symbolicationBuild?: Maybe<Build>;
|
|
2093
2106
|
timestamp: Scalars['DateTime']['output'];
|
|
2094
2107
|
};
|
|
2095
2108
|
export type AppObserveCustomEventCountBucket = {
|
|
@@ -2273,6 +2286,23 @@ export declare enum AppObserveErrorGroupsOrderBy {
|
|
|
2273
2286
|
MostFrequent = "MOST_FREQUENT",
|
|
2274
2287
|
MostUsers = "MOST_USERS"
|
|
2275
2288
|
}
|
|
2289
|
+
/** AppObserveErrorStats for one platform; iOS includes iPadOS and tvOS. */
|
|
2290
|
+
export type AppObserveErrorPlatformStats = {
|
|
2291
|
+
__typename?: 'AppObserveErrorPlatformStats';
|
|
2292
|
+
/** Distinct sessions on this platform that hit any exception. */
|
|
2293
|
+
affectedSessions: Scalars['Int']['output'];
|
|
2294
|
+
/** Distinct users on this platform that hit any exception. */
|
|
2295
|
+
affectedUsers: Scalars['Int']['output'];
|
|
2296
|
+
/** Fraction (0..1) of this platform's active sessions without a fatal error. */
|
|
2297
|
+
crashFreeSessions: Scalars['Float']['output'];
|
|
2298
|
+
/** Fraction (0..1) of this platform's active users without a fatal error. */
|
|
2299
|
+
crashFreeUsers: Scalars['Float']['output'];
|
|
2300
|
+
fatalCount: Scalars['Int']['output'];
|
|
2301
|
+
nonFatalCount: Scalars['Int']['output'];
|
|
2302
|
+
platform: AppObservePlatform;
|
|
2303
|
+
/** Total exception events in range on this platform. */
|
|
2304
|
+
totalErrors: Scalars['Int']['output'];
|
|
2305
|
+
};
|
|
2276
2306
|
export declare enum AppObserveErrorSeverity {
|
|
2277
2307
|
Error = "ERROR",
|
|
2278
2308
|
Fatal = "FATAL"
|
|
@@ -2473,7 +2503,7 @@ export type AppObserveNavigationStat = {
|
|
|
2473
2503
|
};
|
|
2474
2504
|
export type AppObserveOverviewAllReleases = {
|
|
2475
2505
|
__typename?: 'AppObserveOverviewAllReleases';
|
|
2476
|
-
/** One entry per (metric, platform) with data in range;
|
|
2506
|
+
/** One entry per (metric, platform) with data in range; one entry per exact device platform. */
|
|
2477
2507
|
metrics: Array<AppObserveOverviewVersionMetric>;
|
|
2478
2508
|
uniqueUserCount: Scalars['Int']['output'];
|
|
2479
2509
|
};
|
|
@@ -2505,13 +2535,40 @@ export type AppObserveOverviewEngagementStat = {
|
|
|
2505
2535
|
};
|
|
2506
2536
|
export type AppObserveOverviewStability = {
|
|
2507
2537
|
__typename?: 'AppObserveOverviewStability';
|
|
2508
|
-
|
|
2538
|
+
/** Fatal exception events in range. */
|
|
2539
|
+
crashCount: Scalars['Int']['output'];
|
|
2509
2540
|
/** Fraction (0..1) of active sessions without a fatal error. */
|
|
2510
2541
|
crashFreeSessions: Scalars['Float']['output'];
|
|
2511
2542
|
/** Fraction (0..1) of active users without a fatal error. */
|
|
2512
2543
|
crashFreeUsers: Scalars['Float']['output'];
|
|
2544
|
+
/** Distinct users that hit a fatal error in range. */
|
|
2545
|
+
crashedUsers: Scalars['Int']['output'];
|
|
2546
|
+
/** Fatal exception events in the equal-length window before startTime. */
|
|
2547
|
+
previousPeriodCrashCount: Scalars['Int']['output'];
|
|
2548
|
+
/** Same fractions for the equal-length window before startTime; null when it had no activity. */
|
|
2549
|
+
previousPeriodCrashFreeSessions?: Maybe<Scalars['Float']['output']>;
|
|
2550
|
+
previousPeriodCrashFreeUsers?: Maybe<Scalars['Float']['output']>;
|
|
2551
|
+
previousPeriodCrashedUsers: Scalars['Int']['output'];
|
|
2552
|
+
series: Array<AppObserveOverviewStabilityBucket>;
|
|
2553
|
+
/** All exception events in range, for distinguishing quiet apps from crash-free ones. */
|
|
2513
2554
|
totalErrors: Scalars['Int']['output'];
|
|
2514
2555
|
};
|
|
2556
|
+
export type AppObserveOverviewStabilityBucket = {
|
|
2557
|
+
__typename?: 'AppObserveOverviewStabilityBucket';
|
|
2558
|
+
/** Approximate unique users that hit any exception in this bucket. Not summable across buckets. */
|
|
2559
|
+
affectedUsers: Scalars['Int']['output'];
|
|
2560
|
+
bucketStart: Scalars['DateTime']['output'];
|
|
2561
|
+
crashCount: Scalars['Int']['output'];
|
|
2562
|
+
};
|
|
2563
|
+
/** Stability-tile filters. No release filters: the tiles always span all versions. */
|
|
2564
|
+
export type AppObserveOverviewStabilityInput = {
|
|
2565
|
+
/** Series bucket size. Defaults to one day. */
|
|
2566
|
+
bucketIntervalMinutes?: InputMaybe<Scalars['Int']['input']>;
|
|
2567
|
+
endTime: Scalars['DateTime']['input'];
|
|
2568
|
+
environment?: InputMaybe<Scalars['String']['input']>;
|
|
2569
|
+
platform?: InputMaybe<AppObservePlatform>;
|
|
2570
|
+
startTime: Scalars['DateTime']['input'];
|
|
2571
|
+
};
|
|
2515
2572
|
export type AppObserveOverviewUpdate = {
|
|
2516
2573
|
__typename?: 'AppObserveOverviewUpdate';
|
|
2517
2574
|
/** Null for the embedded bundle. */
|
|
@@ -2529,7 +2586,8 @@ export type AppObserveOverviewUpdate = {
|
|
|
2529
2586
|
metrics: Array<AppObserveOverviewUpdateMetric>;
|
|
2530
2587
|
/** When the update was published; null for the embedded bundle. */
|
|
2531
2588
|
publishedAt?: Maybe<Scalars['DateTime']['output']>;
|
|
2532
|
-
|
|
2589
|
+
/** Error stats for this update, one entry per platform with activity; iOS includes iPadOS and tvOS. */
|
|
2590
|
+
stability: Array<AppObserveErrorPlatformStats>;
|
|
2533
2591
|
uniqueUserCount: Scalars['Int']['output'];
|
|
2534
2592
|
};
|
|
2535
2593
|
export type AppObserveOverviewUpdateComparison = {
|
|
@@ -2562,10 +2620,10 @@ export type AppObserveOverviewVersion = {
|
|
|
2562
2620
|
__typename?: 'AppObserveOverviewVersion';
|
|
2563
2621
|
appVersion: Scalars['String']['output'];
|
|
2564
2622
|
firstSeenAt: Scalars['DateTime']['output'];
|
|
2565
|
-
/** One entry per (metric, platform) with data in range; iOS
|
|
2623
|
+
/** One entry per (metric, platform) with data in range; each device OS (iOS, iPadOS, tvOS, macOS, Android) is a separate platform. */
|
|
2566
2624
|
metrics: Array<AppObserveOverviewVersionMetric>;
|
|
2567
|
-
/** Error stats for this version,
|
|
2568
|
-
stability:
|
|
2625
|
+
/** Error stats for this version, one entry per platform with activity; iOS includes iPadOS and tvOS. */
|
|
2626
|
+
stability: Array<AppObserveErrorPlatformStats>;
|
|
2569
2627
|
uniqueUserCount: Scalars['Int']['output'];
|
|
2570
2628
|
};
|
|
2571
2629
|
export type AppObserveOverviewVersionComparison = {
|
|
@@ -2601,7 +2659,10 @@ export type AppObserveOverviewVersionSummary = {
|
|
|
2601
2659
|
};
|
|
2602
2660
|
export declare enum AppObservePlatform {
|
|
2603
2661
|
Android = "ANDROID",
|
|
2604
|
-
Ios = "IOS"
|
|
2662
|
+
Ios = "IOS",
|
|
2663
|
+
Ipados = "IPADOS",
|
|
2664
|
+
Macos = "MACOS",
|
|
2665
|
+
Tvos = "TVOS"
|
|
2605
2666
|
}
|
|
2606
2667
|
export declare enum AppObservePropertyType {
|
|
2607
2668
|
Boolean = "BOOLEAN",
|
|
@@ -2960,6 +3021,8 @@ export type AppUsageMetricTotal = {
|
|
|
2960
3021
|
planMetrics: Array<EstimatedUsage>;
|
|
2961
3022
|
/** Total cost of overages, in cents */
|
|
2962
3023
|
totalCost: Scalars['Float']['output'];
|
|
3024
|
+
/** Services whose estimates could not be computed and are omitted from the other fields. */
|
|
3025
|
+
unavailableServiceUsageMetrics: Array<UnavailableServiceUsageMetric>;
|
|
2963
3026
|
};
|
|
2964
3027
|
export type AppUsageMetrics = {
|
|
2965
3028
|
__typename?: 'AppUsageMetrics';
|
|
@@ -3093,6 +3156,18 @@ export type AppWorkflowsInsightsWorkflowsArgs = {
|
|
|
3093
3156
|
first: Scalars['Int']['input'];
|
|
3094
3157
|
timespan: WorkflowsInsightsTimespanInput;
|
|
3095
3158
|
};
|
|
3159
|
+
export type AppiumRunSessionRemoteConfig = {
|
|
3160
|
+
__typename?: 'AppiumRunSessionRemoteConfig';
|
|
3161
|
+
/** Appium server URL for the remote device. */
|
|
3162
|
+
appiumUrl: Scalars['String']['output'];
|
|
3163
|
+
/** W3C capabilities for the device that backs this session. */
|
|
3164
|
+
capabilities: Scalars['JSONObject']['output'];
|
|
3165
|
+
/**
|
|
3166
|
+
* URL of the web preview surface for the session. Null when web previews are
|
|
3167
|
+
* not available for the platform (e.g. Android).
|
|
3168
|
+
*/
|
|
3169
|
+
webPreviewUrl?: Maybe<Scalars['String']['output']>;
|
|
3170
|
+
};
|
|
3096
3171
|
export type AppleAppIdentifier = {
|
|
3097
3172
|
__typename?: 'AppleAppIdentifier';
|
|
3098
3173
|
account: Account;
|
|
@@ -4395,18 +4470,26 @@ export type CreateDeviceRunSessionEventLogUploadSessionResult = {
|
|
|
4395
4470
|
};
|
|
4396
4471
|
export type CreateDeviceRunSessionInput = {
|
|
4397
4472
|
appId: Scalars['ID']['input'];
|
|
4473
|
+
/**
|
|
4474
|
+
* Identifier of the virtual device to start for the session. On iOS this is a
|
|
4475
|
+
* Simulator device name or UDID (e.g. "iPhone 16 Pro"). On Android this is an
|
|
4476
|
+
* AVD hardware profile id (e.g. "pixel_7"). If omitted, the runner picks a
|
|
4477
|
+
* default device.
|
|
4478
|
+
*/
|
|
4479
|
+
deviceIdentifier?: InputMaybe<Scalars['String']['input']>;
|
|
4398
4480
|
/**
|
|
4399
4481
|
* Stop the session automatically after this many minutes without observed
|
|
4400
4482
|
* session activity. Must be positive and smaller than the session's maximum
|
|
4401
4483
|
* duration (2 hours, or maxRunTimeMinutes when set). Only supported for
|
|
4402
|
-
* agent-device and
|
|
4484
|
+
* agent-device, argent, and Appium sessions. If omitted, the session has no idle
|
|
4403
4485
|
* timeout.
|
|
4404
4486
|
*/
|
|
4405
4487
|
maxIdleTimeMinutes?: InputMaybe<Scalars['Int']['input']>;
|
|
4406
4488
|
/**
|
|
4407
|
-
*
|
|
4408
|
-
* be non-negative and
|
|
4409
|
-
*
|
|
4489
|
+
* Maximum usable session duration, in minutes, starting when the remote session
|
|
4490
|
+
* is ready. Must be non-negative and no greater than 40 for normal-priority
|
|
4491
|
+
* accounts or 115 for high-priority accounts. The backing job receives an
|
|
4492
|
+
* additional five minutes for cleanup.
|
|
4410
4493
|
*/
|
|
4411
4494
|
maxRunTimeMinutes?: InputMaybe<Scalars['Int']['input']>;
|
|
4412
4495
|
/**
|
|
@@ -5146,7 +5229,7 @@ export type DeviceRunSessionQuery = {
|
|
|
5146
5229
|
export type DeviceRunSessionQueryByIdArgs = {
|
|
5147
5230
|
deviceRunSessionId: Scalars['ID']['input'];
|
|
5148
5231
|
};
|
|
5149
|
-
export type DeviceRunSessionRemoteConfig = AgentDeviceRunSessionRemoteConfig | ArgentRunSessionRemoteConfig | ServeSimRunSessionRemoteConfig;
|
|
5232
|
+
export type DeviceRunSessionRemoteConfig = AgentDeviceRunSessionRemoteConfig | AppiumRunSessionRemoteConfig | ArgentRunSessionRemoteConfig | ServeSimRunSessionRemoteConfig;
|
|
5150
5233
|
export declare enum DeviceRunSessionStatus {
|
|
5151
5234
|
Errored = "ERRORED",
|
|
5152
5235
|
InProgress = "IN_PROGRESS",
|
|
@@ -5155,6 +5238,7 @@ export declare enum DeviceRunSessionStatus {
|
|
|
5155
5238
|
}
|
|
5156
5239
|
export declare enum DeviceRunSessionType {
|
|
5157
5240
|
AgentDevice = "AGENT_DEVICE",
|
|
5241
|
+
Appium = "APPIUM",
|
|
5158
5242
|
Argent = "ARGENT",
|
|
5159
5243
|
ServeSim = "SERVE_SIM"
|
|
5160
5244
|
}
|
|
@@ -8912,6 +8996,12 @@ export type TurtleSshSessionSettingsInput = {
|
|
|
8912
8996
|
export declare enum TurtleSshTransportType {
|
|
8913
8997
|
UptermV1 = "UPTERM_V1"
|
|
8914
8998
|
}
|
|
8999
|
+
export type UnavailableServiceUsageMetric = {
|
|
9000
|
+
__typename?: 'UnavailableServiceUsageMetric';
|
|
9001
|
+
/** User-displayable explanation of why the service's estimate is missing. */
|
|
9002
|
+
message: Scalars['String']['output'];
|
|
9003
|
+
service: EasService;
|
|
9004
|
+
};
|
|
8915
9005
|
export type UniqueUsersOverTimeData = {
|
|
8916
9006
|
__typename?: 'UniqueUsersOverTimeData';
|
|
8917
9007
|
data: LineChartData;
|
|
@@ -9470,6 +9560,8 @@ export type UsageMetricTotal = {
|
|
|
9470
9560
|
planMetrics: Array<EstimatedUsage>;
|
|
9471
9561
|
/** Total cost of overages, in cents */
|
|
9472
9562
|
totalCost: Scalars['Float']['output'];
|
|
9563
|
+
/** Services whose estimates could not be computed and are omitted from the other fields. */
|
|
9564
|
+
unavailableServiceUsageMetrics: Array<UnavailableServiceUsageMetric>;
|
|
9473
9565
|
};
|
|
9474
9566
|
export declare enum UsageMetricType {
|
|
9475
9567
|
Bandwidth = "BANDWIDTH",
|
|
@@ -18434,6 +18526,11 @@ export type DeviceRunSessionByIdQuery = {
|
|
|
18434
18526
|
agentDeviceRemoteSessionUrl: string;
|
|
18435
18527
|
agentDeviceRemoteSessionToken: string;
|
|
18436
18528
|
webPreviewUrl?: string | null;
|
|
18529
|
+
} | {
|
|
18530
|
+
__typename: 'AppiumRunSessionRemoteConfig';
|
|
18531
|
+
appiumUrl: string;
|
|
18532
|
+
capabilities: any;
|
|
18533
|
+
webPreviewUrl?: string | null;
|
|
18437
18534
|
} | {
|
|
18438
18535
|
__typename: 'ArgentRunSessionRemoteConfig';
|
|
18439
18536
|
toolsUrl: string;
|
|
@@ -125,6 +125,9 @@ var AppObservePlatform;
|
|
|
125
125
|
(function (AppObservePlatform) {
|
|
126
126
|
AppObservePlatform["Android"] = "ANDROID";
|
|
127
127
|
AppObservePlatform["Ios"] = "IOS";
|
|
128
|
+
AppObservePlatform["Ipados"] = "IPADOS";
|
|
129
|
+
AppObservePlatform["Macos"] = "MACOS";
|
|
130
|
+
AppObservePlatform["Tvos"] = "TVOS";
|
|
128
131
|
})(AppObservePlatform || (exports.AppObservePlatform = AppObservePlatform = {}));
|
|
129
132
|
var AppObservePropertyType;
|
|
130
133
|
(function (AppObservePropertyType) {
|
|
@@ -463,6 +466,7 @@ var DeviceRunSessionStatus;
|
|
|
463
466
|
var DeviceRunSessionType;
|
|
464
467
|
(function (DeviceRunSessionType) {
|
|
465
468
|
DeviceRunSessionType["AgentDevice"] = "AGENT_DEVICE";
|
|
469
|
+
DeviceRunSessionType["Appium"] = "APPIUM";
|
|
466
470
|
DeviceRunSessionType["Argent"] = "ARGENT";
|
|
467
471
|
DeviceRunSessionType["ServeSim"] = "SERVE_SIM";
|
|
468
472
|
})(DeviceRunSessionType || (exports.DeviceRunSessionType = DeviceRunSessionType = {}));
|