eas-cli 27.7.1 → 27.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/README.md +252 -226
  2. package/build/build/build.js +1 -2
  3. package/build/build/utils/repository.js +4 -4
  4. package/build/commands/build/download.js +1 -2
  5. package/build/commands/simulator/availability.js +4 -3
  6. package/build/commands/simulator/control.js +12 -3
  7. package/build/commands/simulator/events.js +1 -1
  8. package/build/commands/simulator/exec.js +1 -1
  9. package/build/commands/simulator/get.js +3 -3
  10. package/build/commands/simulator/index.d.ts +1 -0
  11. package/build/commands/simulator/index.js +25 -19
  12. package/build/commands/simulator/list.js +1 -1
  13. package/build/commands/simulator/logs.js +1 -1
  14. package/build/commands/simulator/stop.js +1 -1
  15. package/build/commands/update/embedded/view.js +2 -2
  16. package/build/commands/workflow/ssh.d.ts +2 -0
  17. package/build/commands/workflow/ssh.js +5 -0
  18. package/build/graphql/generated.d.ts +7 -0
  19. package/build/graphql/queries/WorkflowJobSshQuery.js +3 -2
  20. package/build/project/maybeUploadAssetMapAsync.js +2 -2
  21. package/build/project/maybeUploadSourceMapsAsync.js +3 -3
  22. package/build/project/uploadAccountScopedFileAsync.js +3 -3
  23. package/build/project/uploadAccountScopedProjectSourceAsync.js +2 -2
  24. package/build/simulator/appArchive.d.ts +6 -0
  25. package/build/simulator/appArchive.js +61 -0
  26. package/build/simulator/artifacts.js +2 -2
  27. package/build/simulator/controlActions.d.ts +8 -2
  28. package/build/simulator/controlActions.js +40 -10
  29. package/build/simulator/controlConfig.d.ts +2 -1
  30. package/build/simulator/controlConfig.js +8 -3
  31. package/build/simulator/hostActions.d.ts +2 -0
  32. package/build/simulator/hostActions.js +1 -0
  33. package/build/simulator/startSetup.js +5 -1
  34. package/build/simulator/utils.d.ts +3 -3
  35. package/build/simulator/utils.js +8 -6
  36. package/build/utils/download.js +3 -3
  37. package/build/utils/files.d.ts +0 -1
  38. package/build/utils/files.js +0 -29
  39. package/oclif.manifest.json +57 -41
  40. package/package.json +6 -6
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.hasSimulatorArtifacts = hasSimulatorArtifacts;
4
4
  exports.downloadSimulatorArtifactAsync = downloadSimulatorArtifactAsync;
5
5
  const tslib_1 = require("tslib");
6
+ const eas_build_job_1 = require("@expo/eas-build-job");
6
7
  const node_path_1 = tslib_1.__importDefault(require("node:path"));
7
8
  const download_1 = require("./download");
8
9
  const utils_1 = require("./utils");
@@ -10,7 +11,6 @@ const fetch_1 = tslib_1.__importDefault(require("../fetch"));
10
11
  const generated_1 = require("../graphql/generated");
11
12
  const log_1 = tslib_1.__importDefault(require("../log"));
12
13
  const ora_1 = require("../ora");
13
- const files_1 = require("../utils/files");
14
14
  const prompts_1 = require("../prompts");
15
15
  const json_1 = require("../utils/json");
16
16
  function hasSimulatorArtifacts(session) {
@@ -30,7 +30,7 @@ async function downloadSimulatorArtifactAsync(session, type, { artifact: index,
30
30
  const metadata = artifact.metadata;
31
31
  const device = metadata?.deviceName ?? metadata?.udid;
32
32
  const part = metadata?.part;
33
- return (0, utils_1.stripTerminalControlCharacters)(`${i + 1}. ${artifact.name} — ${artifact.filename} (${(0, files_1.formatBytes)(artifact.fileSizeBytes ?? 0)})${device ? ` (${device})` : ''}${part !== undefined ? ` (part ${part})` : ''}`);
33
+ return (0, utils_1.stripTerminalControlCharacters)(`${i + 1}. ${artifact.name} — ${artifact.filename} (${(0, eas_build_job_1.formatBytes)(artifact.fileSizeBytes ?? 0)})${device ? ` (${device})` : ''}${part !== undefined ? ` (part ${part})` : ''}`);
34
34
  });
35
35
  const selectionMessage = `Choose an artifact with --artifact <index>:\n${titles.join('\n')}`;
36
36
  let selectedIndex = index;
@@ -18,6 +18,7 @@ export type PreparedControlAction = Readonly<{
18
18
  localFile?: Readonly<{
19
19
  param: string;
20
20
  path: string;
21
+ appBundle?: true;
21
22
  }>;
22
23
  }>;
23
24
  export declare function resolveControlActionPath(value: string, baseDir?: string): string;
@@ -25,8 +26,13 @@ export declare function prepareControlActionAsync(catalog: HostActionCatalog, ac
25
26
  localFileMode?: 'auto' | 'explicit';
26
27
  baseDir?: string;
27
28
  }): Promise<PreparedControlAction>;
28
- export declare function assertLocalFileAsync(localPath: string, stats?: fs.Stats): Promise<void>;
29
- export declare function executeControlActionAsync(connection: HostActionConnection, plan: PreparedControlAction, { validateParams }?: {
29
+ export declare function assertLocalFileAsync(localPath: string, { action, stats }?: {
30
+ action?: string;
31
+ stats?: fs.Stats;
32
+ }): Promise<fs.Stats>;
33
+ export declare function executeControlActionAsync(connection: HostActionConnection, plan: PreparedControlAction, { validateParams, onProgress, handleInterrupt, }?: {
30
34
  validateParams?: (params: Record<string, unknown>) => void;
35
+ onProgress?: (phase: 'packaging' | 'uploading' | 'running') => void;
36
+ handleInterrupt?: boolean;
31
37
  }): Promise<ControlActionResult>;
32
38
  export declare function parseControlActionOutput(output: string): unknown;
@@ -8,6 +8,7 @@ exports.parseControlActionOutput = parseControlActionOutput;
8
8
  const tslib_1 = require("tslib");
9
9
  const fs = tslib_1.__importStar(require("fs-extra"));
10
10
  const path_1 = tslib_1.__importDefault(require("path"));
11
+ const appArchive_1 = require("./appArchive");
11
12
  const hostActions_1 = require("./hostActions");
12
13
  function resolveControlActionPath(value, baseDir) {
13
14
  if (!baseDir) {
@@ -36,8 +37,7 @@ async function prepareControlActionAsync(catalog, action, { localFileMode = 'aut
36
37
  if (Object.hasOwn(params, param)) {
37
38
  throw new Error(`${param} and file cannot both be supplied for ${action.action}.`);
38
39
  }
39
- localFile = { param, path: resolveControlActionPath(action.file, baseDir) };
40
- await assertLocalFileAsync(localFile.path);
40
+ localFile = await prepareLocalFileAsync(action.action, entry, resolveControlActionPath(action.file, baseDir));
41
41
  }
42
42
  else if (localFileMode === 'auto' && param && applies && typeof params[param] === 'string') {
43
43
  const value = params[param];
@@ -62,8 +62,7 @@ async function prepareControlActionAsync(catalog, action, { localFileMode = 'aut
62
62
  if (!stat) {
63
63
  throw new Error(`${value} does not exist on this computer. Pass a local file, or prefix an absolute simulator-host path with host:.`);
64
64
  }
65
- await assertLocalFileAsync(localPath, stat);
66
- localFile = { param, path: localPath };
65
+ localFile = await prepareLocalFileAsync(action.action, entry, localPath, stat);
67
66
  }
68
67
  }
69
68
  return {
@@ -74,35 +73,65 @@ async function prepareControlActionAsync(catalog, action, { localFileMode = 'aut
74
73
  ...(localFile ? { localFile } : {}),
75
74
  };
76
75
  }
77
- async function assertLocalFileAsync(localPath, stats) {
76
+ async function prepareLocalFileAsync(action, entry, localPath, stats) {
77
+ const stat = await assertLocalFileAsync(localPath, { action, stats });
78
+ if (action === 'app.install' &&
79
+ (stat.isDirectory() || /\.(?:tar\.gz|tgz)$/i.test(localPath)) &&
80
+ entry.uploadArchive !== 'tar.gz') {
81
+ throw new Error('This simulator host does not support app archives. Start a session with an updated serve-sim package.');
82
+ }
83
+ return {
84
+ param: entry.upload,
85
+ path: localPath,
86
+ ...(stat.isDirectory() ? { appBundle: true } : {}),
87
+ };
88
+ }
89
+ async function assertLocalFileAsync(localPath, { action, stats } = {}) {
78
90
  const stat = stats ?? (await fs.stat(localPath).catch(() => null));
79
91
  if (!stat) {
80
92
  throw new Error(`${localPath} does not exist on this computer.`);
81
93
  }
82
94
  if (stat.isDirectory()) {
83
- throw new Error(`${localPath} is a folder. Pass the path of a file.`);
95
+ if (action !== 'app.install') {
96
+ throw new Error(`${localPath} is a folder. Pass the path of a file.`);
97
+ }
98
+ if (path_1.default.extname(path_1.default.resolve(localPath)) !== '.app') {
99
+ throw new Error(`${localPath} is a folder. Pass a Simulator .app bundle or .tar.gz/.tgz archive.`);
100
+ }
84
101
  }
85
- if (!stat.isFile()) {
102
+ else if (!stat.isFile()) {
86
103
  throw new Error(`${localPath} is not a regular file.`);
87
104
  }
88
- if (stat.size === 0) {
105
+ else if (action === 'app.install' && /\.(?:ipa|zip)$/i.test(localPath)) {
106
+ throw new Error('Simulator installs require a Simulator .app bundle or .tar.gz/.tgz archive. Device .ipa builds and .zip archives are not supported.');
107
+ }
108
+ else if (stat.size === 0) {
89
109
  throw new Error(`${localPath} is empty. Pass a file with content.`);
90
110
  }
91
111
  await fs.access(localPath, fs.constants.R_OK);
112
+ return stat;
92
113
  }
93
- async function executeControlActionAsync(connection, plan, { validateParams } = {}) {
114
+ async function executeControlActionAsync(connection, plan, { validateParams, onProgress, handleInterrupt, } = {}) {
94
115
  connection.signal.throwIfAborted();
95
116
  const params = { ...plan.params };
96
117
  let uploadId;
118
+ let archive;
97
119
  let succeeded = false;
98
120
  try {
99
121
  if (plan.localFile) {
100
- const upload = await (0, hostActions_1.uploadFileAsync)(connection, plan.localFile.path);
122
+ if (plan.localFile.appBundle) {
123
+ onProgress?.('packaging');
124
+ archive = await (0, appArchive_1.createAppArchiveAsync)(plan.localFile.path, { handleInterrupt });
125
+ }
126
+ connection.signal.throwIfAborted();
127
+ onProgress?.('uploading');
128
+ const upload = await (0, hostActions_1.uploadFileAsync)(connection, archive?.path ?? plan.localFile.path);
101
129
  uploadId = upload.uploadId;
102
130
  params[plan.localFile.param] = plan.entry.uploadAs === 'id' ? upload.uploadId : upload.path;
103
131
  }
104
132
  connection.signal.throwIfAborted();
105
133
  validateParams?.(params);
134
+ onProgress?.('running');
106
135
  const result = await connection.requestAsync(plan.action, params);
107
136
  if (result.exitCode !== 0) {
108
137
  const detail = (result.stderr || result.stdout).trim() || `exit code ${result.exitCode}`;
@@ -116,6 +145,7 @@ async function executeControlActionAsync(connection, plan, { validateParams } =
116
145
  if (uploadId && (!plan.entry.keepUpload || !succeeded)) {
117
146
  await connection.requestAsync('upload.remove', { uploadId }).catch(() => { });
118
147
  }
148
+ await archive?.cleanupAsync();
119
149
  }
120
150
  }
121
151
  function parseControlActionOutput(output) {
@@ -32,8 +32,9 @@ export declare class ControlConfigExecutionError extends Error {
32
32
  export declare function prepareControlConfigAsync(catalog: HostActionCatalog, filePath: string, udid: string, input?: SimulatorSessionConfig): Promise<PreparedControlConfig>;
33
33
  /** Check local inputs before requesting a paid session; runtime validation still uses the live catalog. */
34
34
  export declare function preflightControlConfigFilesAsync(config: SimulatorSessionConfig): Promise<void>;
35
- export declare function executeControlConfigAsync(connection: HostActionConnection, config: PreparedControlConfig, { onProgress }?: {
35
+ export declare function executeControlConfigAsync(connection: HostActionConnection, config: PreparedControlConfig, { onProgress, handleInterrupt, }?: {
36
36
  onProgress?: (progress: ControlConfigProgress) => void;
37
+ handleInterrupt?: boolean;
37
38
  }): Promise<ControlConfigResult[]>;
38
39
  export declare function serializeControlConfigResults(results: readonly ControlConfigResult[]): {
39
40
  action: string;
@@ -78,7 +78,9 @@ async function preflightControlConfigFilesAsync(config) {
78
78
  throw new Error('The simulator is selected by the session; remove params.udid.');
79
79
  }
80
80
  if (action.file) {
81
- await (0, controlActions_1.assertLocalFileAsync)(path_1.default.resolve(path_1.default.dirname(config.path), action.file));
81
+ await (0, controlActions_1.assertLocalFileAsync)(path_1.default.resolve(path_1.default.dirname(config.path), action.file), {
82
+ action: action.action,
83
+ });
82
84
  }
83
85
  if (action.output) {
84
86
  await assertWritableOutputAsync((0, controlActions_1.resolveControlActionPath)(action.output, path_1.default.dirname(config.path)));
@@ -127,7 +129,7 @@ function assertUnambiguousFileSource(ajv, plan, udid) {
127
129
  }
128
130
  }
129
131
  }
130
- async function executeControlConfigAsync(connection, config, { onProgress } = {}) {
132
+ async function executeControlConfigAsync(connection, config, { onProgress, handleInterrupt, } = {}) {
131
133
  if (config.udid !== connection.udid) {
132
134
  throw new Error('The simulator changed after this configuration was checked. Import it again.');
133
135
  }
@@ -137,7 +139,10 @@ async function executeControlConfigAsync(connection, config, { onProgress } = {}
137
139
  onProgress?.({ ...progress, status: 'running' });
138
140
  let result;
139
141
  try {
140
- result = await (0, controlActions_1.executeControlActionAsync)(connection, plan, { validateParams });
142
+ result = await (0, controlActions_1.executeControlActionAsync)(connection, plan, {
143
+ validateParams,
144
+ handleInterrupt,
145
+ });
141
146
  }
142
147
  catch (error) {
143
148
  throw new ControlConfigExecutionError(index + 1, plan.action, completed, error);
@@ -21,6 +21,7 @@ declare const CatalogEntry: z.ZodObject<{
21
21
  description: z.ZodOptional<z.ZodString>;
22
22
  args: z.ZodOptional<z.ZodArray<z.ZodString>>;
23
23
  upload: z.ZodOptional<z.ZodString>;
24
+ uploadArchive: z.ZodOptional<z.ZodUnknown>;
24
25
  uploadAs: z.ZodOptional<z.ZodEnum<{
25
26
  path: "path";
26
27
  id: "id";
@@ -42,6 +43,7 @@ export declare const HostActionCatalogSchema: z.ZodRecord<z.ZodString, z.ZodObje
42
43
  description: z.ZodOptional<z.ZodString>;
43
44
  args: z.ZodOptional<z.ZodArray<z.ZodString>>;
44
45
  upload: z.ZodOptional<z.ZodString>;
46
+ uploadArchive: z.ZodOptional<z.ZodUnknown>;
45
47
  uploadAs: z.ZodOptional<z.ZodEnum<{
46
48
  path: "path";
47
49
  id: "id";
@@ -29,6 +29,7 @@ const CatalogEntry = SchemaNode.extend({
29
29
  description: zod_1.z.string().optional(),
30
30
  args: zod_1.z.array(zod_1.z.string()).optional(),
31
31
  upload: zod_1.z.string().optional(),
32
+ uploadArchive: zod_1.z.unknown().optional(),
32
33
  uploadAs: zod_1.z.enum(['path', 'id']).optional(),
33
34
  uploadWhen: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()).optional(),
34
35
  keepUpload: zod_1.z.boolean().optional(),
@@ -9,7 +9,11 @@ async function applyStartConfigAsync(access, config, { signal, onProgress, }) {
9
9
  const catalog = await (0, hostActions_1.fetchHostActionCatalogAsync)(connection);
10
10
  const prepared = await (0, controlConfig_1.prepareControlConfigAsync)(catalog, config.path, connection.udid, config);
11
11
  signal.throwIfAborted();
12
- return await (0, controlConfig_1.executeControlConfigAsync)(connection, prepared, { onProgress });
12
+ // Startup must stop its newly created session before exiting on Ctrl+C.
13
+ return await (0, controlConfig_1.executeControlConfigAsync)(connection, prepared, {
14
+ onProgress,
15
+ handleInterrupt: false,
16
+ });
13
17
  }
14
18
  finally {
15
19
  connection.close();
@@ -1,11 +1,11 @@
1
1
  import { AppPlatform, DeviceRunSessionByIdQuery, DeviceRunSessionResourceClass, DeviceRunSessionType } from '../graphql/generated';
2
2
  type DeviceRunSessionByIdResult = DeviceRunSessionByIdQuery['deviceRunSessions']['byId'];
3
3
  export type DeviceRunSessionRemoteConfig = NonNullable<DeviceRunSessionByIdResult['remoteConfig']>;
4
- /** Landing page where accounts without access can request it. */
5
- export declare const EAS_SIMULATOR_WAITLIST_URL = "https://expo.dev/services/simulators";
6
4
  /**
7
5
  * Message shown when EAS Simulator is not enabled for the account. Shared by every
8
- * command that can hit the gate so users always get the same waitlist pointer.
6
+ * command that can hit the gate so users always get the same upgrade pointer. The gate
7
+ * result does not say whether the account is on the Free plan or is past due, so the
8
+ * message covers both.
9
9
  */
10
10
  export declare function formatSimulatorUnavailableMessage(accountName: string): string;
11
11
  export declare const DEVICE_RUN_SESSION_TYPE_FLAG_VALUES: Record<DeviceRunSessionType, string>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ANDROID_EMULATOR_EGRESS_RELAY_PORT = exports.DEVICE_RUN_SESSION_RESOURCE_CLASS_BY_FLAG_VALUE = exports.DEVICE_RUN_SESSION_RESOURCE_CLASS_FLAG_VALUES = exports.DEVICE_RUN_SESSION_TYPE_FLAG_OPTIONS = exports.DEVICE_RUN_SESSION_TYPE_BY_FLAG_VALUE = exports.DEVICE_RUN_SESSION_TYPE_FLAG_VALUES = exports.EAS_SIMULATOR_WAITLIST_URL = void 0;
3
+ exports.ANDROID_EMULATOR_EGRESS_RELAY_PORT = exports.DEVICE_RUN_SESSION_RESOURCE_CLASS_BY_FLAG_VALUE = exports.DEVICE_RUN_SESSION_RESOURCE_CLASS_FLAG_VALUES = exports.DEVICE_RUN_SESSION_TYPE_FLAG_OPTIONS = exports.DEVICE_RUN_SESSION_TYPE_BY_FLAG_VALUE = exports.DEVICE_RUN_SESSION_TYPE_FLAG_VALUES = void 0;
4
4
  exports.formatSimulatorUnavailableMessage = formatSimulatorUnavailableMessage;
5
5
  exports.deviceRunSessionTypesForFlagValue = deviceRunSessionTypesForFlagValue;
6
6
  exports.deviceRunSessionTypeToFlagValue = deviceRunSessionTypeToFlagValue;
@@ -20,19 +20,21 @@ exports.formatLogLine = formatLogLine;
20
20
  const tslib_1 = require("tslib");
21
21
  const chalk_1 = tslib_1.__importDefault(require("chalk"));
22
22
  const util_1 = require("util");
23
+ const url_1 = require("../build/utils/url");
23
24
  const generated_1 = require("../graphql/generated");
24
25
  const log_1 = require("../log");
25
26
  const env_1 = require("./env");
26
- /** Landing page where accounts without access can request it. */
27
- exports.EAS_SIMULATOR_WAITLIST_URL = 'https://expo.dev/services/simulators';
28
27
  /**
29
28
  * Message shown when EAS Simulator is not enabled for the account. Shared by every
30
- * command that can hit the gate so users always get the same waitlist pointer.
29
+ * command that can hit the gate so users always get the same upgrade pointer. The gate
30
+ * result does not say whether the account is on the Free plan or is past due, so the
31
+ * message covers both.
31
32
  */
32
33
  function formatSimulatorUnavailableMessage(accountName) {
33
34
  return [
34
- `EAS Simulator isn't available on ${accountName} yet — it's coming soon.`,
35
- `Join the waitlist to get access: ${(0, log_1.link)(exports.EAS_SIMULATOR_WAITLIST_URL)}`,
35
+ `EAS Simulator isn't enabled for ${accountName}. It's available on the Starter, Production, and Enterprise plans.`,
36
+ `Upgrade, or update billing if a payment is past due: ${(0, log_1.link)((0, url_1.getAccountBillingUrl)(accountName))}`,
37
+ 'If your account is on an annual Enterprise plan, contact your Expo account executive.',
36
38
  ].join('\n');
37
39
  }
38
40
  // Mapping enum -> CLI flag value. Declared as Record<DeviceRunSessionType, string>
@@ -4,6 +4,7 @@ exports.downloadFileWithProgressTrackerAsync = downloadFileWithProgressTrackerAs
4
4
  exports.downloadAndMaybeExtractAppAsync = downloadAndMaybeExtractAppAsync;
5
5
  exports.extractAppFromLocalArchiveAsync = extractAppFromLocalArchiveAsync;
6
6
  const tslib_1 = require("tslib");
7
+ const eas_build_job_1 = require("@expo/eas-build-job");
7
8
  const spawn_async_1 = tslib_1.__importDefault(require("@expo/spawn-async"));
8
9
  const fast_glob_1 = tslib_1.__importDefault(require("fast-glob"));
9
10
  const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
@@ -12,7 +13,6 @@ const stream_1 = require("stream");
12
13
  const tar_1 = require("tar");
13
14
  const util_1 = require("util");
14
15
  const uuid_1 = require("uuid");
15
- const files_1 = require("./files");
16
16
  const paths_1 = require("./paths");
17
17
  const progress_1 = require("./progress");
18
18
  const fetch_1 = tslib_1.__importDefault(require("../fetch"));
@@ -91,14 +91,14 @@ async function downloadAndMaybeExtractAppAsync(url, platform, cachedAppPath) {
91
91
  await fs_extra_1.default.promises.mkdir(outputDir, { recursive: true });
92
92
  if (url.endsWith('apk')) {
93
93
  const apkFilePath = path_1.default.join(outputDir, `${(0, uuid_1.v4)()}.apk`);
94
- await downloadFileWithProgressTrackerAsync(url, apkFilePath, (ratio, total) => `Downloading app (${(0, files_1.formatBytes)(total * ratio)} / ${(0, files_1.formatBytes)(total)})`, 'Successfully downloaded app');
94
+ await downloadFileWithProgressTrackerAsync(url, apkFilePath, (ratio, total) => `Downloading app (${(0, eas_build_job_1.formatBytes)(total * ratio)} / ${(0, eas_build_job_1.formatBytes)(total)})`, 'Successfully downloaded app');
95
95
  return await maybeCacheAppAsync(apkFilePath, cachedAppPath);
96
96
  }
97
97
  else {
98
98
  const tmpArchivePathDir = path_1.default.join((0, paths_1.getTmpDirectory)(), (0, uuid_1.v4)());
99
99
  await fs_extra_1.default.mkdir(tmpArchivePathDir, { recursive: true });
100
100
  const tmpArchivePath = path_1.default.join(tmpArchivePathDir, `${(0, uuid_1.v4)()}.tar.gz`);
101
- await downloadFileWithProgressTrackerAsync(url, tmpArchivePath, (ratio, total) => `Downloading app archive (${(0, files_1.formatBytes)(total * ratio)} / ${(0, files_1.formatBytes)(total)})`, 'Successfully downloaded app archive');
101
+ await downloadFileWithProgressTrackerAsync(url, tmpArchivePath, (ratio, total) => `Downloading app archive (${(0, eas_build_job_1.formatBytes)(total * ratio)} / ${(0, eas_build_job_1.formatBytes)(total)})`, 'Successfully downloaded app archive');
102
102
  await tarExtractAsync(tmpArchivePath, outputDir);
103
103
  const appPath = await getAppPathAsync(outputDir, platform === generated_1.AppPlatform.Ios ? 'app' : 'apk');
104
104
  return await maybeCacheAppAsync(appPath, cachedAppPath);
@@ -1,2 +1 @@
1
1
  export declare function maybeRenameExistingFileAsync(projectDir: string, filename: string): Promise<void>;
2
- export declare function formatBytes(bytes: number): string;
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.maybeRenameExistingFileAsync = maybeRenameExistingFileAsync;
4
- exports.formatBytes = formatBytes;
5
4
  const tslib_1 = require("tslib");
6
5
  const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
7
6
  const path_1 = tslib_1.__importDefault(require("path"));
@@ -22,31 +21,3 @@ async function maybeRenameExistingFileAsync(projectDir, filename) {
22
21
  await fs_extra_1.default.rename(desiredFilePath, path_1.default.resolve(projectDir, getRenamedFilename(filename, num)));
23
22
  }
24
23
  }
25
- function formatBytes(bytes) {
26
- if (bytes === 0) {
27
- return `0`;
28
- }
29
- let multiplier = 1;
30
- if (bytes < 1024 * multiplier) {
31
- return `${Math.floor(bytes)} B`;
32
- }
33
- multiplier *= 1024;
34
- if (bytes < 102.4 * multiplier) {
35
- return `${(bytes / multiplier).toFixed(1)} KB`;
36
- }
37
- if (bytes < 1024 * multiplier) {
38
- return `${Math.floor(bytes / 1024)} KB`;
39
- }
40
- multiplier *= 1024;
41
- if (bytes < 102.4 * multiplier) {
42
- return `${(bytes / multiplier).toFixed(1)} MB`;
43
- }
44
- if (bytes < 1024 * multiplier) {
45
- return `${Math.floor(bytes / multiplier)} MB`;
46
- }
47
- multiplier *= 1024;
48
- if (bytes < 102.4 * multiplier) {
49
- return `${(bytes / multiplier).toFixed(1)} GB`;
50
- }
51
- return `${Math.floor(bytes / 1024)} GB`;
52
- }
@@ -9985,7 +9985,7 @@
9985
9985
  "sim:availability"
9986
9986
  ],
9987
9987
  "args": {},
9988
- "description": "[EXPERIMENTAL] check whether EAS Simulator is enabled for the current project account",
9988
+ "description": "check whether EAS Simulator is enabled for the current project account",
9989
9989
  "flags": {
9990
9990
  "json": {
9991
9991
  "description": "Enable JSON output, non-JSON messages will be printed to stderr. Implies --non-interactive.",
@@ -10080,7 +10080,7 @@
10080
10080
  "name": "action"
10081
10081
  }
10082
10082
  },
10083
- "description": "[EXPERIMENTAL] control a remote iOS simulator session on EAS\n\nRun without an action to list available actions. Use <action> --help for usage.\n\nUse --keep-alive to reuse the connection across commands, or prepare it with simulator:control:connection open. Connections close after 120 seconds idle by default; use --idle-timeout to change the timeout in seconds.\n\nTo save a screenshot locally, run `eas simulator:control screenshot.capture --output ./screenshot.png`.\n\nUse --import to run the actions from a JSON file. The start section is used only by simulator:start:\n\n{\n \"version\": 1,\n \"start\": {\"device\": \"iPhone 17 Pro\", \"type\": \"web-preview-only\"},\n \"actions\": [{\"action\": \"appearance.set\", \"params\": {\"value\": \"dark\"}}]\n}\n\nThe file is checked before any actions run. Actions run in order and stop on the first failure. Local paths are relative to the JSON file; paths in params refer to the simulator host.\n\nExisting output files are overwritten. When saving to a directory, an existing file with the generated name causes the action to fail.",
10083
+ "description": "control a remote iOS simulator session on EAS\n\nRun without an action to list available actions. Use <action> --help for usage.\n\nUse --keep-alive to reuse the connection across commands, or prepare it with simulator:control:connection open. Connections close after 120 seconds idle by default; use --idle-timeout to change the timeout in seconds.\n\nTo save a screenshot locally, run `eas simulator:control screenshot.capture --output ./screenshot.png`.\n\nUse --import to run the actions from a JSON file. The start section is used only by simulator:start:\n\n{\n \"version\": 1,\n \"start\": {\"device\": \"iPhone 17 Pro\", \"type\": \"web-preview-only\"},\n \"actions\": [{\"action\": \"appearance.set\", \"params\": {\"value\": \"dark\"}}]\n}\n\nThe file is checked before any actions run. Actions run in order and stop on the first failure. Local paths are relative to the JSON file; paths in params refer to the simulator host.\n\nExisting output files are overwritten. When saving to a directory, an existing file with the generated name causes the action to fail.",
10084
10084
  "examples": [
10085
10085
  "$ eas simulator:control",
10086
10086
  "$ eas simulator:control --id <session-id>",
@@ -10089,7 +10089,7 @@
10089
10089
  "$ eas simulator:control --import ./simulator-control.json",
10090
10090
  "$ eas simulator:control hardwareKeyboard.set off",
10091
10091
  "$ eas simulator:control permissions.set grant camera com.example.app",
10092
- "$ eas simulator:control app.install ./MyApp.ipa",
10092
+ "$ eas simulator:control app.install ./MyApp.app",
10093
10093
  "$ eas simulator:control screenshot.capture --output ./screenshot.png",
10094
10094
  "$ eas simulator:control screenshot.capture --output ./screenshot.png --id <session-id>"
10095
10095
  ],
@@ -10320,7 +10320,7 @@
10320
10320
  "sim:events"
10321
10321
  ],
10322
10322
  "args": {},
10323
- "description": "[EXPERIMENTAL] show activity events from a remote simulator session",
10323
+ "description": "show activity events from a remote simulator session",
10324
10324
  "flags": {
10325
10325
  "id": {
10326
10326
  "description": "Simulator session ID. Defaults to .env.eas-simulator.",
@@ -10424,7 +10424,7 @@
10424
10424
  "sim:exec"
10425
10425
  ],
10426
10426
  "args": {},
10427
- "description": "[EXPERIMENTAL] execute a simulator command with .env.eas-simulator environment loaded",
10427
+ "description": "execute a simulator command with .env.eas-simulator environment loaded",
10428
10428
  "flags": {},
10429
10429
  "hasDynamicHelp": false,
10430
10430
  "hiddenAliases": [
@@ -10499,7 +10499,7 @@
10499
10499
  "sim:get"
10500
10500
  ],
10501
10501
  "args": {},
10502
- "description": "[EXPERIMENTAL] get info about a remote simulator session on EAS by its simulator session ID. Preview links follow the session's saved sharing preference",
10502
+ "description": "get info about a remote simulator session on EAS by its simulator session ID. Preview links follow the session's saved sharing preference",
10503
10503
  "flags": {
10504
10504
  "id": {
10505
10505
  "description": "Simulator session ID. Defaults to .env.eas-simulator.",
@@ -10597,7 +10597,7 @@
10597
10597
  "sim:start"
10598
10598
  ],
10599
10599
  "args": {},
10600
- "description": "[EXPERIMENTAL] start a remote simulator session on EAS\n\nPreview links require sign-in by default.\n\nUse --import to load saved start options and actions. CLI flags override saved options, including lists:\n\n{\n \"version\": 1,\n \"start\": {\"device\": \"iPhone 17 Pro\", \"type\": \"web-preview-only\"},\n \"actions\": [{\"action\": \"appearance.set\", \"params\": {\"value\": \"dark\"}}]\n}\n\nThe start object uses CLI flag names. Saved actions run after the session is ready. Local action paths are relative to the JSON file. If an action fails, the CLI tries to stop the new session. Android supports saved start options, but not actions yet.\n\nWith local egress, actions wait for the connection and require interactive mode. In scripts, connect with simulator:egress, then run simulator:control --import separately.",
10600
+ "description": "start a remote simulator session on EAS\n\nPreview links require sign-in by default.\n\nUse --import to load saved start options and actions. CLI flags override saved options, including lists:\n\n{\n \"version\": 1,\n \"start\": {\"device\": \"iPhone 17 Pro\", \"type\": \"web-preview-only\"},\n \"actions\": [{\"action\": \"appearance.set\", \"params\": {\"value\": \"dark\"}}]\n}\n\nThe start object uses CLI flag names. Saved actions run after the session is ready. Local action paths are relative to the JSON file. If an action fails, the CLI tries to stop the new session. Android supports saved start options, but not actions yet.\n\nWith local egress, actions wait for the connection and require interactive mode. In scripts, connect with simulator:egress, then run simulator:control --import separately.",
10601
10601
  "examples": [
10602
10602
  "$ eas simulator:start --import ./simulator.json",
10603
10603
  "$ eas simulator:start --import ./simulator.json --platform ios --device \"iPhone 17 Pro\" --json"
@@ -10739,6 +10739,17 @@
10739
10739
  "multiple": false,
10740
10740
  "type": "option"
10741
10741
  },
10742
+ "log-source": {
10743
+ "description": "Android logs to record during the session and upload afterward. Repeat to select both sources; replaces the default emulator-output selection. Device-wide device-logcat may contain credentials and personal data. Logs are not redacted.",
10744
+ "name": "log-source",
10745
+ "hasDynamicHelp": false,
10746
+ "multiple": true,
10747
+ "options": [
10748
+ "emulator-output",
10749
+ "device-logcat"
10750
+ ],
10751
+ "type": "option"
10752
+ },
10742
10753
  "network-capture": {
10743
10754
  "description": "Record HTTP(S) traffic from apps on the device (iOS only). HTTPS is decrypted, so recordings contain credentials in cleartext and certificate-pinned apps fail to connect.",
10744
10755
  "name": "network-capture",
@@ -10782,7 +10793,7 @@
10782
10793
  "type": "option"
10783
10794
  },
10784
10795
  "egress": {
10785
- "description": "With \"local\", the simulator's network traffic exits from this machine and fails while the egress client is disconnected. On iOS, the simulator system proxy points at this machine: HTTP(S) and WebSocket requests that honor it (WebKit, URLSession) and clients that read proxy environment variables (gRPC, libcurl) use it, and connections that ignore both are refused inside the simulator and listed, with the library that tried, in the Logs section of the session page on expo.dev. On Android, all TCP traffic from the emulator goes through its proxy to this machine; traffic that cannot (UDP, such as QUIC) is refused and listed in the same Logs section, and DNS for apps that ignore the system proxy resolves on the device host. The egress client must keep running for the life of the session.",
10796
+ "description": "[EXPERIMENTAL] With \"local\", the simulator's network traffic exits from this machine and fails while the egress client is disconnected. On iOS, the simulator system proxy points at this machine: HTTP(S) and WebSocket requests that honor it (WebKit, URLSession) and clients that read proxy environment variables (gRPC, libcurl) use it, and connections that ignore both are refused inside the simulator and listed, with the library that tried, in the Logs section of the session page on expo.dev. On Android, all TCP traffic from the emulator goes through its proxy to this machine; traffic that cannot (UDP, such as QUIC) is refused and listed in the same Logs section, and DNS for apps that ignore the system proxy resolves on the device host. The egress client must keep running for the life of the session.",
10786
10797
  "name": "egress",
10787
10798
  "hasDynamicHelp": false,
10788
10799
  "multiple": false,
@@ -10933,7 +10944,7 @@
10933
10944
  "sim:list"
10934
10945
  ],
10935
10946
  "args": {},
10936
- "description": "[EXPERIMENTAL] list remote simulator sessions for the current project",
10947
+ "description": "list remote simulator sessions for the current project",
10937
10948
  "flags": {
10938
10949
  "status": {
10939
10950
  "description": "Filter by session status (repeatable)",
@@ -11090,7 +11101,7 @@
11090
11101
  "sim:logs"
11091
11102
  ],
11092
11103
  "args": {},
11093
- "description": "[EXPERIMENTAL] show buffered logs from a remote iOS simulator session",
11104
+ "description": "show buffered logs from a remote iOS simulator session",
11094
11105
  "examples": [
11095
11106
  "<%= config.bin %> simulator:logs --follow",
11096
11107
  "<%= config.bin %> simulator:logs --json"
@@ -11242,7 +11253,7 @@
11242
11253
  "sim:stop"
11243
11254
  ],
11244
11255
  "args": {},
11245
- "description": "[EXPERIMENTAL] stop a remote simulator session on EAS by its simulator session ID",
11256
+ "description": "stop a remote simulator session on EAS by its simulator session ID",
11246
11257
  "flags": {
11247
11258
  "id": {
11248
11259
  "description": "Simulator session ID. Defaults to .env.eas-simulator.",
@@ -14817,6 +14828,10 @@
14817
14828
  "aliases": [],
14818
14829
  "args": {},
14819
14830
  "description": "[EXPERIMENTAL] open an ssh session on the worker running a workflow job",
14831
+ "examples": [
14832
+ "$ eas workflow:ssh <ID> \t # Open an SSH session on the worker. Use the ID in the job logs (\"Start SSH session\" step)",
14833
+ "$ eas workflow:ssh --show-connect <ID> \t # Print the ssh command to connect, without opening the SSH session"
14834
+ ],
14820
14835
  "flags": {
14821
14836
  "show-connect": {
14822
14837
  "description": "Print the ssh connection command (host and token) instead of opening a session",
@@ -14832,6 +14847,7 @@
14832
14847
  "pluginName": "eas-cli",
14833
14848
  "pluginType": "core",
14834
14849
  "strict": false,
14850
+ "usage": "workflow:ssh [--show-connect] ID",
14835
14851
  "enableJsonFlag": false,
14836
14852
  "ContextOptions": {
14837
14853
  "LoggedIn": {
@@ -18064,10 +18080,16 @@
18064
18080
  "maestro.js"
18065
18081
  ]
18066
18082
  },
18067
- "integrations:convex:project:delete": {
18083
+ "integrations:convex:team:delete": {
18068
18084
  "aliases": [],
18069
- "args": {},
18070
- "description": "remove the Convex project link for the current Expo app from EAS servers",
18085
+ "args": {
18086
+ "CONVEX_TEAM": {
18087
+ "description": "Slug of the Convex team to remove",
18088
+ "name": "CONVEX_TEAM",
18089
+ "required": false
18090
+ }
18091
+ },
18092
+ "description": "remove a Convex team link from the current Expo app owner account's EAS servers",
18071
18093
  "flags": {
18072
18094
  "non-interactive": {
18073
18095
  "description": "Run the command in non-interactive mode.",
@@ -18086,7 +18108,7 @@
18086
18108
  },
18087
18109
  "hasDynamicHelp": false,
18088
18110
  "hiddenAliases": [],
18089
- "id": "integrations:convex:project:delete",
18111
+ "id": "integrations:convex:team:delete",
18090
18112
  "pluginAlias": "eas-cli",
18091
18113
  "pluginName": "eas-cli",
18092
18114
  "pluginType": "core",
@@ -18147,20 +18169,20 @@
18147
18169
  "commands",
18148
18170
  "integrations",
18149
18171
  "convex",
18150
- "project",
18172
+ "team",
18151
18173
  "delete.js"
18152
18174
  ]
18153
18175
  },
18154
- "integrations:convex:team:delete": {
18176
+ "integrations:convex:team:invite": {
18155
18177
  "aliases": [],
18156
18178
  "args": {
18157
18179
  "CONVEX_TEAM": {
18158
- "description": "Slug of the Convex team to remove",
18180
+ "description": "Slug of the Convex team to invite yourself to",
18159
18181
  "name": "CONVEX_TEAM",
18160
18182
  "required": false
18161
18183
  }
18162
18184
  },
18163
- "description": "remove a Convex team link from the current Expo app owner account's EAS servers",
18185
+ "description": "send a Convex team invitation to your verified email address",
18164
18186
  "flags": {
18165
18187
  "non-interactive": {
18166
18188
  "description": "Run the command in non-interactive mode.",
@@ -18168,18 +18190,11 @@
18168
18190
  "noCacheDefault": true,
18169
18191
  "allowNo": false,
18170
18192
  "type": "boolean"
18171
- },
18172
- "yes": {
18173
- "char": "y",
18174
- "description": "Skip confirmation prompt",
18175
- "name": "yes",
18176
- "allowNo": false,
18177
- "type": "boolean"
18178
18193
  }
18179
18194
  },
18180
18195
  "hasDynamicHelp": false,
18181
18196
  "hiddenAliases": [],
18182
- "id": "integrations:convex:team:delete",
18197
+ "id": "integrations:convex:team:invite",
18183
18198
  "pluginAlias": "eas-cli",
18184
18199
  "pluginName": "eas-cli",
18185
18200
  "pluginType": "core",
@@ -18241,19 +18256,13 @@
18241
18256
  "integrations",
18242
18257
  "convex",
18243
18258
  "team",
18244
- "delete.js"
18259
+ "invite.js"
18245
18260
  ]
18246
18261
  },
18247
- "integrations:convex:team:invite": {
18262
+ "integrations:convex:project:delete": {
18248
18263
  "aliases": [],
18249
- "args": {
18250
- "CONVEX_TEAM": {
18251
- "description": "Slug of the Convex team to invite yourself to",
18252
- "name": "CONVEX_TEAM",
18253
- "required": false
18254
- }
18255
- },
18256
- "description": "send a Convex team invitation to your verified email address",
18264
+ "args": {},
18265
+ "description": "remove the Convex project link for the current Expo app from EAS servers",
18257
18266
  "flags": {
18258
18267
  "non-interactive": {
18259
18268
  "description": "Run the command in non-interactive mode.",
@@ -18261,11 +18270,18 @@
18261
18270
  "noCacheDefault": true,
18262
18271
  "allowNo": false,
18263
18272
  "type": "boolean"
18273
+ },
18274
+ "yes": {
18275
+ "char": "y",
18276
+ "description": "Skip confirmation prompt",
18277
+ "name": "yes",
18278
+ "allowNo": false,
18279
+ "type": "boolean"
18264
18280
  }
18265
18281
  },
18266
18282
  "hasDynamicHelp": false,
18267
18283
  "hiddenAliases": [],
18268
- "id": "integrations:convex:team:invite",
18284
+ "id": "integrations:convex:project:delete",
18269
18285
  "pluginAlias": "eas-cli",
18270
18286
  "pluginName": "eas-cli",
18271
18287
  "pluginType": "core",
@@ -18326,10 +18342,10 @@
18326
18342
  "commands",
18327
18343
  "integrations",
18328
18344
  "convex",
18329
- "team",
18330
- "invite.js"
18345
+ "project",
18346
+ "delete.js"
18331
18347
  ]
18332
18348
  }
18333
18349
  },
18334
- "version": "27.7.1"
18350
+ "version": "27.8.0"
18335
18351
  }