mirror of
https://github.com/expo/eas-cli.git
synced 2026-11-15 17:31:46 -10:00
Compare commits
21
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
930890cfda | ||
|
|
8f382124bb | ||
|
|
cbdd756bca | ||
|
|
f5e272953c | ||
|
|
3534870e52 | ||
|
|
0bb50b9ff3 | ||
|
|
04126d642d | ||
|
|
5c7d375aa3 | ||
|
|
77315174e2 | ||
|
|
e914819052 | ||
|
|
ab32f0c241 | ||
|
|
951ccba62c | ||
|
|
8c0e01d64c | ||
|
|
539acb8c23 | ||
|
|
18d85d571a | ||
|
|
f2cf409b21 | ||
|
|
0cf8cd014f | ||
|
|
8df11a04ee | ||
|
|
c9d198a894 | ||
|
|
4b70eb14fb | ||
|
|
c224ba58ff |
No files matched your search
@@ -0,0 +1,7 @@
|
||||
---
|
||||
'@expo/build-tools': patch
|
||||
---
|
||||
|
||||
Fix black iOS session preview artifacts on multi-display Simulators by capturing the active display through serve-sim.
|
||||
|
||||
Skip automatic previews on older serve-sim versions that cannot exclude them from idle activity.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'eas-cli': minor
|
||||
---
|
||||
|
||||
Add `simulator:network-requests` to list, follow, and inspect captured requests and download HAR files.
|
||||
@@ -2,6 +2,22 @@
|
||||
|
||||
This is the log of notable changes to EAS CLI and related packages.
|
||||
|
||||
## [27.7.2](https://github.com/expo/eas-cli/releases/tag/v27.7.2) - 2026-11-10
|
||||
|
||||
### 🐛 Bug fixes
|
||||
|
||||
- [eas-cli] Add `--log-source` to `eas simulator` to select which Android logs a session records. ([#4823](https://github.com/expo/eas-cli/pull/4823) by [@vonovak](https://github.com/vonovak))
|
||||
- [build-tools] Start SSH session shells in the job's build directory instead of the worker's directory. ([#4843](https://github.com/expo/eas-cli/pull/4843) by [@AHGIJMKLKKZNPJKQR](https://github.com/AHGIJMKLKKZNPJKQR))
|
||||
- [eas-cli] Show that the ssh session has ended, instead of saying SSH was not enabled, when `eas workflow:ssh` is given the ID of a finished build. ([#4842](https://github.com/expo/eas-cli/pull/4842) by [@AHGIJMKLKKZNPJKQR](https://github.com/AHGIJMKLKKZNPJKQR))
|
||||
- [eas-cli] Show the ID argument and examples in `eas workflow:ssh --help`. ([#4829](https://github.com/expo/eas-cli/pull/4829) by [@AHGIJMKLKKZNPJKQR](https://github.com/AHGIJMKLKKZNPJKQR))
|
||||
|
||||
## [27.7.1](https://github.com/expo/eas-cli/releases/tag/v27.7.1) - 2026-11-10
|
||||
|
||||
### 🐛 Bug fixes
|
||||
|
||||
- [eas-cli][eas-json][build-tools][eas-build-job][steps][local-build-plugin][worker][simulator-launcher] Update `node-forge`, `tar`, `nanoid`, `minimatch`, `joi`, `ajv`, `yaml`, and `zod` to versions with fixes for published security advisories. ([#4847](https://github.com/expo/eas-cli/pull/4847) by [@tchayen](https://github.com/tchayen))
|
||||
- [build-tools] Strip the GitHub repository access token from the git remote before a sandbox agent starts. ([#4826](https://github.com/expo/eas-cli/pull/4826) by [@sswrk](https://github.com/sswrk))
|
||||
|
||||
## [27.7.0](https://github.com/expo/eas-cli/releases/tag/v27.7.0) - 2026-11-10
|
||||
|
||||
### 🎉 New features
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"STAGING": "27.6.0",
|
||||
"PRODUCTION": "27.6.0"
|
||||
"STAGING": "27.7.2",
|
||||
"PRODUCTION": "27.7.2"
|
||||
}
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"npmClient": "yarn",
|
||||
"version": "27.7.0",
|
||||
"version": "27.7.2",
|
||||
"$schema": "node_modules/lerna/schemas/lerna-schema.json"
|
||||
}
|
||||
@@ -1,5 +1,18 @@
|
||||
# @expo/build-tools
|
||||
|
||||
## 27.7.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Start SSH session shells in the job's build directory instead of the worker's directory. ([#4843](https://github.com/expo/eas-cli/pull/4843) by [@AHGIJMKLKKZNPJKQR](https://github.com/AHGIJMKLKKZNPJKQR))
|
||||
|
||||
## 27.7.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Update `node-forge`, `tar`, `nanoid`, `minimatch`, `joi`, `ajv`, `yaml`, and `zod` to versions with fixes for published security advisories. ([#4847](https://github.com/expo/eas-cli/pull/4847) by [@tchayen](https://github.com/tchayen))
|
||||
- Strip the GitHub repository access token from the git remote before a sandbox agent starts. ([#4826](https://github.com/expo/eas-cli/pull/4826) by [@sswrk](https://github.com/sswrk))
|
||||
|
||||
## 27.7.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@expo/build-tools",
|
||||
"version": "27.7.0",
|
||||
"version": "27.7.2",
|
||||
"bugs": "https://github.com/expo/eas-cli/issues",
|
||||
"license": "BUSL-1.1",
|
||||
"author": "Expo <[email protected]>",
|
||||
@@ -42,17 +42,17 @@
|
||||
"dependencies": {
|
||||
"@expo/config": "55.0.10",
|
||||
"@expo/config-plugins": "55.0.7",
|
||||
"@expo/downloader": "27.7.0",
|
||||
"@expo/eas-build-job": "27.7.0",
|
||||
"@expo/downloader": "27.7.2",
|
||||
"@expo/eas-build-job": "27.7.2",
|
||||
"@expo/env": "^0.4.0",
|
||||
"@expo/logger": "27.7.0",
|
||||
"@expo/logger": "27.7.2",
|
||||
"@expo/package-manager": "1.9.10",
|
||||
"@expo/plist": "^0.3.5",
|
||||
"@expo/results": "^1.0.0",
|
||||
"@expo/spawn-async": "1.7.2",
|
||||
"@expo/steps": "27.7.0",
|
||||
"@expo/template-file": "27.7.0",
|
||||
"@expo/turtle-spawn": "27.7.0",
|
||||
"@expo/steps": "27.7.2",
|
||||
"@expo/template-file": "27.7.2",
|
||||
"@expo/turtle-spawn": "27.7.2",
|
||||
"@expo/xcpretty": "^4.4.7",
|
||||
"@ngrok/ngrok": "1.7.0",
|
||||
"@sentry/node": "7.77.0",
|
||||
@@ -63,11 +63,11 @@
|
||||
"fast-xml-parser": "^4.4.1",
|
||||
"fs-extra": "^11.2.0",
|
||||
"gql.tada": "^1.11.3",
|
||||
"joi": "^17.13.1",
|
||||
"joi": "^17.13.9",
|
||||
"jose": "5.10.0",
|
||||
"lodash": "^4.18.1",
|
||||
"node-fetch": "^2.7.0",
|
||||
"node-forge": "^1.3.1",
|
||||
"node-forge": "^1.4.3",
|
||||
"node-pty": "1.2.0-beta.15",
|
||||
"node-stream-zip": "1.15.0",
|
||||
"nullthrows": "^1.1.1",
|
||||
@@ -77,11 +77,11 @@
|
||||
"resolve-from": "^5.0.0",
|
||||
"retry": "^0.13.1",
|
||||
"semver": "^7.6.2",
|
||||
"tar": "7.5.19",
|
||||
"tar": "7.5.22",
|
||||
"uuid": "9.0.1",
|
||||
"ws": "8.21.1",
|
||||
"yaml": "^2.8.1",
|
||||
"zod": "^4.3.5"
|
||||
"yaml": "^2.9.1",
|
||||
"zod": "^4.6.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@expo/repack-app": "~0.9.0",
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { UserError } from '@expo/eas-build-job';
|
||||
import { SystemError, UserError } from '@expo/eas-build-job';
|
||||
import spawn from '@expo/turtle-spawn';
|
||||
import { vol } from 'memfs';
|
||||
|
||||
import { fetchAndCheckoutRefAsync } from '../git';
|
||||
import { fetchAndCheckoutRefAsync, stripRepositoryCredentialsAsync } from '../git';
|
||||
|
||||
jest.mock('@expo/turtle-spawn');
|
||||
|
||||
@@ -147,3 +147,64 @@ describe(fetchAndCheckoutRefAsync, () => {
|
||||
expect(error.message).not.toContain('ghs_secret123');
|
||||
});
|
||||
});
|
||||
|
||||
describe(stripRepositoryCredentialsAsync, () => {
|
||||
const token = 'ghs_secret123';
|
||||
|
||||
function mockRemoteUrl(url: string): void {
|
||||
jest.mocked(spawn).mockResolvedValueOnce({ stdout: `${url}\n` } as never);
|
||||
}
|
||||
|
||||
it('strips the token from the origin remote', async () => {
|
||||
mockRemoteUrl(`https://x-access-token:${token}@github.com/expo/app.git`);
|
||||
|
||||
await stripRepositoryCredentialsAsync({ repositoryDirectory });
|
||||
|
||||
expect(spawn).toHaveBeenNthCalledWith(1, 'git', ['remote', 'get-url', 'origin'], {
|
||||
cwd: repositoryDirectory,
|
||||
});
|
||||
expect(spawn).toHaveBeenNthCalledWith(
|
||||
2,
|
||||
'git',
|
||||
['remote', 'set-url', 'origin', 'https://github.com/expo/app.git'],
|
||||
{ cwd: repositoryDirectory }
|
||||
);
|
||||
expect(spawn).toHaveBeenCalledTimes(2);
|
||||
});
|
||||
|
||||
it('keeps the host and port of a GitHub Enterprise remote', async () => {
|
||||
mockRemoteUrl(`https://x-access-token:${token}@ghe.example.com:8443/org/app.git`);
|
||||
|
||||
await stripRepositoryCredentialsAsync({ repositoryDirectory });
|
||||
|
||||
expect(spawn).toHaveBeenNthCalledWith(
|
||||
2,
|
||||
'git',
|
||||
['remote', 'set-url', 'origin', 'https://ghe.example.com:8443/org/app.git'],
|
||||
{ cwd: repositoryDirectory }
|
||||
);
|
||||
});
|
||||
|
||||
it('does nothing when the origin remote carries no credentials', async () => {
|
||||
mockRemoteUrl('https://github.com/expo/app.git');
|
||||
|
||||
await stripRepositoryCredentialsAsync({ repositoryDirectory });
|
||||
|
||||
expect(spawn).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
it('throws when the remote URL cannot be rewritten', async () => {
|
||||
mockRemoteUrl(`https://x-access-token:${token}@github.com/expo/app.git`);
|
||||
const gitError = Object.assign(new Error('git exited with non-zero code: 128'), {
|
||||
stderr: "fatal: No such remote 'origin'",
|
||||
});
|
||||
jest.mocked(spawn).mockRejectedValueOnce(gitError);
|
||||
|
||||
const promise = stripRepositoryCredentialsAsync({ repositoryDirectory });
|
||||
|
||||
await expect(promise).rejects.toBeInstanceOf(SystemError);
|
||||
await expect(promise).rejects.toMatchObject({ cause: gitError });
|
||||
const error = await promise.catch(err => err);
|
||||
expect(error.message).not.toContain(token);
|
||||
});
|
||||
});
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ArchiveSource, ArchiveSourceType, UserError } from '@expo/eas-build-job';
|
||||
import { ArchiveSource, ArchiveSourceType, SystemError, UserError } from '@expo/eas-build-job';
|
||||
import { bunyan } from '@expo/logger';
|
||||
import spawn from '@expo/turtle-spawn';
|
||||
import fs from 'fs-extra';
|
||||
@@ -99,6 +99,45 @@ export async function fetchAndCheckoutRefAsync({
|
||||
}
|
||||
}
|
||||
|
||||
export async function stripRepositoryCredentialsAsync({
|
||||
repositoryDirectory,
|
||||
}: {
|
||||
repositoryDirectory: string;
|
||||
}): Promise<void> {
|
||||
let remoteUrl: URL;
|
||||
try {
|
||||
const { stdout } = await spawn('git', ['remote', 'get-url', 'origin'], {
|
||||
cwd: repositoryDirectory,
|
||||
});
|
||||
remoteUrl = new URL(stdout.trim());
|
||||
} catch (err) {
|
||||
throw new SystemError('Failed to read the origin remote URL of the project repository.', {
|
||||
cause: err,
|
||||
});
|
||||
}
|
||||
|
||||
if (!remoteUrl.username && !remoteUrl.password) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
await spawn('git', ['remote', 'set-url', 'origin', stripCredentialsFromGitUrl(remoteUrl)], {
|
||||
cwd: repositoryDirectory,
|
||||
});
|
||||
} catch (err) {
|
||||
throw new SystemError('Failed to strip credentials from the origin remote URL.', {
|
||||
cause: err,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function stripCredentialsFromGitUrl(url: URL): string {
|
||||
const strippedUrl = new URL(url.toString());
|
||||
strippedUrl.username = '';
|
||||
strippedUrl.password = '';
|
||||
return strippedUrl.toString();
|
||||
}
|
||||
|
||||
function getSanitizedGitUrl(maybeGitUrl: string): string | null {
|
||||
try {
|
||||
const url = new URL(maybeGitUrl);
|
||||
|
||||
@@ -1,14 +1,30 @@
|
||||
import { EnvironmentSecretType, SystemError, UserError } from '@expo/eas-build-job';
|
||||
import {
|
||||
ArchiveSourceType,
|
||||
EnvironmentSecretType,
|
||||
SystemError,
|
||||
UserError,
|
||||
} from '@expo/eas-build-job';
|
||||
import fetch from 'node-fetch';
|
||||
|
||||
import { stripRepositoryCredentialsAsync } from '../../../common/git';
|
||||
import * as sandboxDaemon from '../../utils/sandboxDaemon';
|
||||
import { SandboxWorkerApi } from '../../utils/sandboxWorkerApi';
|
||||
import { createStartSandboxBuildFunction } from '../startSandbox';
|
||||
|
||||
const { AbortError, Response } = jest.requireActual('node-fetch') as typeof import('node-fetch');
|
||||
|
||||
jest.mock('../../../common/git');
|
||||
|
||||
const checkedOutStepCtx = { logger: {}, global: { wasCheckedOut: () => true } } as any;
|
||||
const notCheckedOutStepCtx = { logger: {}, global: { wasCheckedOut: () => false } } as any;
|
||||
|
||||
const URL_JOB = {
|
||||
projectArchive: { type: ArchiveSourceType.URL, url: 'https://example.com/project.tar.gz' },
|
||||
};
|
||||
|
||||
const context = {
|
||||
job: {
|
||||
...URL_JOB,
|
||||
secrets: {
|
||||
environmentSecrets: [
|
||||
{
|
||||
@@ -183,6 +199,97 @@ describe('sandbox build functions', () => {
|
||||
expect(stopAsync).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
it('strips the repository credentials before starting the daemon for git sources', async () => {
|
||||
const startupError = new Error('stop after checking options');
|
||||
const start = jest
|
||||
.spyOn(sandboxDaemon, 'startSandboxDaemonAsync')
|
||||
.mockRejectedValue(startupError);
|
||||
const fn = createStartSandboxBuildFunction({
|
||||
...context,
|
||||
job: {
|
||||
...context.job,
|
||||
projectArchive: {
|
||||
type: ArchiveSourceType.GIT,
|
||||
gitRef: 'refs/heads/main',
|
||||
gitCommitHash: '0123456789abcdef0123456789abcdef01234567',
|
||||
},
|
||||
},
|
||||
projectTargetDirectory: '/workingdir/build',
|
||||
} as any);
|
||||
|
||||
await expect(fn.fn!(checkedOutStepCtx, { inputs, outputs: {}, env: {} })).rejects.toBe(
|
||||
startupError
|
||||
);
|
||||
expect(stripRepositoryCredentialsAsync).toHaveBeenCalledWith({
|
||||
repositoryDirectory: '/workingdir/build',
|
||||
});
|
||||
expect(jest.mocked(stripRepositoryCredentialsAsync).mock.invocationCallOrder[0]).toBeLessThan(
|
||||
start.mock.invocationCallOrder[0]
|
||||
);
|
||||
});
|
||||
|
||||
it('strips the repository credentials from the source directory before eas/checkout', async () => {
|
||||
const startupError = new Error('stop after checking options');
|
||||
jest.spyOn(sandboxDaemon, 'startSandboxDaemonAsync').mockRejectedValue(startupError);
|
||||
const fn = createStartSandboxBuildFunction({
|
||||
...context,
|
||||
job: {
|
||||
...context.job,
|
||||
projectArchive: {
|
||||
type: ArchiveSourceType.GIT,
|
||||
gitRef: null,
|
||||
gitCommitHash: '0123456789abcdef0123456789abcdef01234567',
|
||||
},
|
||||
},
|
||||
projectSourceDirectory: '/workingdir/temporary-custom-build',
|
||||
projectTargetDirectory: '/workingdir/build',
|
||||
} as any);
|
||||
|
||||
await expect(fn.fn!(notCheckedOutStepCtx, { inputs, outputs: {}, env: {} })).rejects.toBe(
|
||||
startupError
|
||||
);
|
||||
expect(stripRepositoryCredentialsAsync).toHaveBeenCalledWith({
|
||||
repositoryDirectory: '/workingdir/temporary-custom-build',
|
||||
});
|
||||
});
|
||||
|
||||
it('does not start the daemon when stripping the repository credentials fails', async () => {
|
||||
const stripError = new SystemError('Failed to strip credentials from the origin remote URL.');
|
||||
jest.mocked(stripRepositoryCredentialsAsync).mockRejectedValueOnce(stripError);
|
||||
const start = jest.spyOn(sandboxDaemon, 'startSandboxDaemonAsync');
|
||||
const fn = createStartSandboxBuildFunction({
|
||||
...context,
|
||||
job: {
|
||||
...context.job,
|
||||
projectArchive: {
|
||||
type: ArchiveSourceType.GIT,
|
||||
gitRef: null,
|
||||
gitCommitHash: '0123456789abcdef0123456789abcdef01234567',
|
||||
},
|
||||
},
|
||||
projectTargetDirectory: '/workingdir/build',
|
||||
} as any);
|
||||
|
||||
await expect(fn.fn!(checkedOutStepCtx, { inputs, outputs: {}, env: {} })).rejects.toBe(
|
||||
stripError
|
||||
);
|
||||
expect(start).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('leaves the remote alone for non-git sources', async () => {
|
||||
const startupError = new Error('stop after checking options');
|
||||
jest.spyOn(sandboxDaemon, 'startSandboxDaemonAsync').mockRejectedValue(startupError);
|
||||
const fn = createStartSandboxBuildFunction({
|
||||
...context,
|
||||
projectTargetDirectory: '/workingdir/build',
|
||||
} as any);
|
||||
|
||||
await expect(fn.fn!({ logger: {} } as any, { inputs, outputs: {}, env: {} })).rejects.toBe(
|
||||
startupError
|
||||
);
|
||||
expect(stripRepositoryCredentialsAsync).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it.each([
|
||||
{
|
||||
missing: 'the sandbox worker token',
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { SystemError, UserError } from '@expo/eas-build-job';
|
||||
import { ArchiveSourceType, SystemError, UserError } from '@expo/eas-build-job';
|
||||
import { BuildFunction, BuildStepInput, BuildStepInputValueTypeName } from '@expo/steps';
|
||||
|
||||
import { stripRepositoryCredentialsAsync } from '../../common/git';
|
||||
import { CustomBuildContext } from '../../customBuildContext';
|
||||
import { withLogPhaseAsync } from '../../utils/logPhase';
|
||||
import { startSandboxDaemonAsync } from '../utils/sandboxDaemon';
|
||||
@@ -45,6 +46,15 @@ export function createStartSandboxBuildFunction(ctx: CustomBuildContext): BuildF
|
||||
`Invalid sandbox maximum duration: ${String(maxDurationSeconds)}. Provide a finite number greater than zero, or omit max_duration_seconds.`
|
||||
);
|
||||
}
|
||||
if (ctx.job.projectArchive.type === ArchiveSourceType.GIT) {
|
||||
// Scripts and commands inside the sandbox could read the token from .git/config.
|
||||
await stripRepositoryCredentialsAsync({
|
||||
repositoryDirectory: stepCtx.global.wasCheckedOut()
|
||||
? ctx.projectTargetDirectory
|
||||
: ctx.projectSourceDirectory,
|
||||
});
|
||||
}
|
||||
|
||||
const daemon = await startSandboxDaemonAsync({
|
||||
credential: workerApi.token,
|
||||
serverUrl: mcpServerUrl,
|
||||
|
||||
@@ -315,10 +315,8 @@ describe(captureDeviceRunSessionPreviewAsync, () => {
|
||||
}) as ReturnType<typeof spawn>;
|
||||
}
|
||||
return (async () => {
|
||||
if (command === 'xcrun') {
|
||||
expect(args.slice(0, 4)).toEqual(['simctl', 'io', 'selected-device', 'screenshot']);
|
||||
await writeFile(args[4], Uint8Array.from(png));
|
||||
} else if (command === 'sips') {
|
||||
expect(command).not.toBe('xcrun');
|
||||
if (command === 'sips') {
|
||||
expect(args.slice(0, 2)).toEqual(['-Z', '320']);
|
||||
expect(await readFile(args[2])).toEqual(png);
|
||||
await writeFile(args[args.indexOf('--out') + 1], Uint8Array.from(resized));
|
||||
@@ -340,6 +338,10 @@ describe(captureDeviceRunSessionPreviewAsync, () => {
|
||||
await captureDeviceRunSessionPreviewAsync({
|
||||
runtimePlatform,
|
||||
device,
|
||||
captureIosScreenshotAsync: async (file, signal) => {
|
||||
signal.throwIfAborted();
|
||||
await writeFile(file, Uint8Array.from(png));
|
||||
},
|
||||
env: {},
|
||||
signal: new AbortController().signal,
|
||||
})
|
||||
@@ -372,6 +374,9 @@ describe(captureDeviceRunSessionPreviewAsync, () => {
|
||||
captureDeviceRunSessionPreviewAsync({
|
||||
runtimePlatform: BuildRuntimePlatform.DARWIN,
|
||||
device: 'device',
|
||||
captureIosScreenshotAsync: async () => {
|
||||
throw new Error('capture failed');
|
||||
},
|
||||
env: {},
|
||||
signal: new AbortController().signal,
|
||||
})
|
||||
|
||||
@@ -40,9 +40,14 @@ import {
|
||||
spawnDetached,
|
||||
startNgrokTunnelAsync,
|
||||
} from '../remoteDeviceRunSession';
|
||||
import { runServeSimActionAsync, stageServeSimAppAsync } from '../serveSimActions';
|
||||
import {
|
||||
runServeSimActionAsync,
|
||||
runServeSimActionWithResultAsync,
|
||||
stageServeSimAppAsync,
|
||||
} from '../serveSimActions';
|
||||
import { startServeSimActivityPolling } from '../serveSimActivity';
|
||||
import { readServeSimServersAsync } from '../serveSimMetricsRecorder';
|
||||
import * as previewCapture from '../serveSimPreviewCapture';
|
||||
|
||||
jest.mock('@ngrok/ngrok');
|
||||
jest.mock('@expo/turtle-spawn');
|
||||
@@ -165,6 +170,12 @@ beforeEach(() => {
|
||||
.mockImplementation(async ({ artifactPath }) => installedBundleIds[artifactPath]);
|
||||
jest.mocked(verifyLocalEgressGuardAsync).mockReset().mockResolvedValue(undefined);
|
||||
jest.mocked(readLocalEgressHandoffAsync).mockReset().mockResolvedValue(null);
|
||||
jest
|
||||
.mocked(runServeSimActionWithResultAsync)
|
||||
.mockReset()
|
||||
.mockResolvedValue(
|
||||
JSON.stringify({ 'screenshot.capture': { properties: { automation: { type: 'boolean' } } } })
|
||||
);
|
||||
stopSessionPreview.mockResolvedValue(undefined);
|
||||
jest.mocked(startDeviceRunSessionPreview).mockReturnValue({ stopAsync: stopSessionPreview });
|
||||
jest.mocked(ensureFfmpegInstalledOnceAsync).mockResolvedValue(undefined);
|
||||
@@ -1479,6 +1490,119 @@ it.each([BuildRuntimePlatform.LINUX, BuildRuntimePlatform.DARWIN])(
|
||||
}
|
||||
);
|
||||
|
||||
it.each(['missing automation', 'invalid catalog', 'unavailable catalog'])(
|
||||
'skips automated thumbnails with %s without stopping the iOS session',
|
||||
async failure => {
|
||||
if (failure === 'unavailable catalog') {
|
||||
jest
|
||||
.mocked(runServeSimActionWithResultAsync)
|
||||
.mockRejectedValueOnce(new Error('unknown action'));
|
||||
} else {
|
||||
jest
|
||||
.mocked(runServeSimActionWithResultAsync)
|
||||
.mockResolvedValueOnce(
|
||||
failure === 'invalid catalog'
|
||||
? 'invalid JSON'
|
||||
: JSON.stringify({ 'screenshot.capture': { properties: {} } })
|
||||
);
|
||||
}
|
||||
const host = await startDeviceSessionHostAsync(ctx, {
|
||||
runtimePlatform: BuildRuntimePlatform.DARWIN,
|
||||
env,
|
||||
logger,
|
||||
timeoutMs: 10_000,
|
||||
preview: { baseDomain, authtoken },
|
||||
});
|
||||
await new Promise(resolve => setImmediate(resolve));
|
||||
expect(runServeSimActionWithResultAsync).toHaveBeenCalledTimes(1);
|
||||
expect(startDeviceRunSessionPreview).not.toHaveBeenCalled();
|
||||
expect(ensureMacosPreviewEncoderInstalledAsync).not.toHaveBeenCalled();
|
||||
expect(stopServer).not.toHaveBeenCalled();
|
||||
await host.finishAsync();
|
||||
}
|
||||
);
|
||||
|
||||
it('cancels catalog inspection during shutdown without sending a thumbnail capture', async () => {
|
||||
let inspectionSignal: AbortSignal | undefined;
|
||||
jest.mocked(runServeSimActionWithResultAsync).mockImplementationOnce(async ({ signal }) => {
|
||||
inspectionSignal = signal;
|
||||
return await new Promise<string>((_resolve, reject) => {
|
||||
signal?.addEventListener('abort', () => reject(signal.reason), { once: true });
|
||||
});
|
||||
});
|
||||
const host = await startDeviceSessionHostAsync(ctx, {
|
||||
runtimePlatform: BuildRuntimePlatform.DARWIN,
|
||||
env,
|
||||
logger,
|
||||
timeoutMs: 10_000,
|
||||
preview: { baseDomain, authtoken },
|
||||
});
|
||||
expect(inspectionSignal?.aborted).toBe(false);
|
||||
await host.finishAsync();
|
||||
expect(inspectionSignal?.aborted).toBe(true);
|
||||
expect(startDeviceRunSessionPreview).not.toHaveBeenCalled();
|
||||
expect(ensureMacosPreviewEncoderInstalledAsync).not.toHaveBeenCalled();
|
||||
expect(stopServer).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
it('finishes manual screenshots even when thumbnail cleanup fails', async () => {
|
||||
const finishScreenshots = jest.fn().mockResolvedValue(undefined);
|
||||
const collector = jest
|
||||
.spyOn(screenshotCollector, 'startDeviceRunSessionScreenshotsAsync')
|
||||
.mockResolvedValueOnce({
|
||||
directory: '/tmp/manual-screenshots',
|
||||
finishAsync: finishScreenshots,
|
||||
});
|
||||
const cleanup = jest.fn().mockRejectedValue(new Error('unlink refused'));
|
||||
const factory = jest.spyOn(previewCapture, 'createServeSimPreviewCapture').mockReturnValueOnce({
|
||||
isSupportedAsync: jest.fn().mockResolvedValue(true),
|
||||
captureAsync: jest.fn(),
|
||||
cleanupAfterHostStoppedAsync: cleanup,
|
||||
});
|
||||
try {
|
||||
const host = await startDeviceSessionHostAsync(ctx, {
|
||||
runtimePlatform: BuildRuntimePlatform.DARWIN,
|
||||
env,
|
||||
logger,
|
||||
timeoutMs: 10_000,
|
||||
preview: { baseDomain, authtoken },
|
||||
});
|
||||
await new Promise(resolve => setImmediate(resolve));
|
||||
await host.finishAsync();
|
||||
expect(cleanup).toHaveBeenCalledTimes(1);
|
||||
expect(finishScreenshots).toHaveBeenCalledWith(true);
|
||||
expect(logger.warn).toHaveBeenCalledWith(
|
||||
expect.objectContaining({ err: expect.any(Error) }),
|
||||
'Could not remove session preview capture files.'
|
||||
);
|
||||
} finally {
|
||||
factory.mockRestore();
|
||||
collector.mockRestore();
|
||||
}
|
||||
});
|
||||
|
||||
it('drains thumbnail capture before stopping the iOS host', async () => {
|
||||
const stopped = deferred<void>();
|
||||
stopSessionPreview.mockReturnValueOnce(stopped.promise);
|
||||
const host = await startDeviceSessionHostAsync(ctx, {
|
||||
runtimePlatform: BuildRuntimePlatform.DARWIN,
|
||||
env,
|
||||
logger,
|
||||
timeoutMs: 10_000,
|
||||
preview: { baseDomain, authtoken },
|
||||
});
|
||||
await new Promise(resolve => setImmediate(resolve));
|
||||
const finishing = host.finishAsync();
|
||||
try {
|
||||
await new Promise(resolve => setImmediate(resolve));
|
||||
expect(stopServer).not.toHaveBeenCalled();
|
||||
} finally {
|
||||
stopped.resolve();
|
||||
await finishing;
|
||||
}
|
||||
expect(stopServer).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
it.each(['success', 'failure'])(
|
||||
'keeps macOS readiness nonblocking and drains encoder setup %s before ending the phase',
|
||||
async result => {
|
||||
|
||||
@@ -16,7 +16,11 @@ import os from 'node:os';
|
||||
import path from 'node:path';
|
||||
import { WebSocketServer } from 'ws';
|
||||
|
||||
import { runServeSimActionAsync, stageServeSimAppAsync } from '../serveSimActions';
|
||||
import {
|
||||
runServeSimActionAsync,
|
||||
runServeSimActionWithResultAsync,
|
||||
stageServeSimAppAsync,
|
||||
} from '../serveSimActions';
|
||||
|
||||
jest.unmock('fs');
|
||||
jest.unmock('node:fs');
|
||||
@@ -67,6 +71,18 @@ it('authenticates the upgrade, waits for ready, and sends the action once', asyn
|
||||
expect(actions).toEqual([{ id: 1, action: 'app.install', params: request().params }]);
|
||||
});
|
||||
|
||||
it('returns stdout from an authenticated action for catalog inspection', async () => {
|
||||
server.on('connection', socket => {
|
||||
socket.on('message', () =>
|
||||
socket.send(JSON.stringify({ id: 1, stdout: '{"actions":[]}', exitCode: 0 }))
|
||||
);
|
||||
socket.send(JSON.stringify({ ready: true }));
|
||||
});
|
||||
await expect(
|
||||
runServeSimActionWithResultAsync({ ...request(), action: 'actions.describe', params: {} })
|
||||
).resolves.toBe('{"actions":[]}');
|
||||
});
|
||||
|
||||
it.each([
|
||||
[{ id: 1, exitCode: 1, stderr: 'install refused' }, 'install refused'],
|
||||
[{ id: 1, error: 'unknown action app.install' }, 'unknown action'],
|
||||
@@ -137,6 +153,55 @@ it('aborts an in-flight action without resending it', async () => {
|
||||
expect(attempts).toBe(1);
|
||||
});
|
||||
|
||||
it('cancels before dispatch while waiting for ready in drain mode', async () => {
|
||||
const controller = new AbortController();
|
||||
const actions = jest.fn();
|
||||
server.on('connection', socket => {
|
||||
socket.on('message', actions);
|
||||
controller.abort(new Error('stopped before ready'));
|
||||
socket.send(JSON.stringify({ ready: true }));
|
||||
});
|
||||
await expect(
|
||||
runServeSimActionAsync({
|
||||
...request(),
|
||||
signal: controller.signal,
|
||||
drainAfterDispatch: true,
|
||||
})
|
||||
).rejects.toThrow('stopped before ready');
|
||||
expect(actions).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('drains dispatched actions after cancellation in drain mode', async () => {
|
||||
const controller = new AbortController();
|
||||
let reply!: () => void;
|
||||
let dispatched!: () => void;
|
||||
const ready = new Promise<void>(resolve => {
|
||||
dispatched = resolve;
|
||||
});
|
||||
server.on('connection', socket => {
|
||||
socket.send(JSON.stringify({ ready: true }));
|
||||
socket.on('message', () => {
|
||||
reply = () => socket.send(JSON.stringify({ id: 1, stdout: 'completed', exitCode: 0 }));
|
||||
dispatched();
|
||||
});
|
||||
});
|
||||
let settled = false;
|
||||
const action = runServeSimActionAsync({
|
||||
...request(),
|
||||
signal: controller.signal,
|
||||
drainAfterDispatch: true,
|
||||
});
|
||||
void action.finally(() => {
|
||||
settled = true;
|
||||
});
|
||||
await ready;
|
||||
controller.abort(new Error('stopped after dispatch'));
|
||||
await new Promise(resolve => setImmediate(resolve));
|
||||
expect(settled).toBe(false);
|
||||
reply();
|
||||
await expect(action).resolves.toBeUndefined();
|
||||
});
|
||||
|
||||
it('does not connect when already aborted', async () => {
|
||||
const connected = jest.fn();
|
||||
server.on('connection', connected);
|
||||
|
||||
@@ -0,0 +1,153 @@
|
||||
import { mkdir, readFile, readdir, writeFile } from 'node:fs/promises';
|
||||
import os from 'node:os';
|
||||
import path from 'node:path';
|
||||
|
||||
import { runServeSimActionAsync, runServeSimActionWithResultAsync } from '../serveSimActions';
|
||||
import { createServeSimPreviewCapture } from '../serveSimPreviewCapture';
|
||||
|
||||
jest.mock('../serveSimActions');
|
||||
|
||||
const signal = new AbortController().signal;
|
||||
const tmpdir = path.join(os.tmpdir(), 'host-tmp');
|
||||
const staging = path.join(tmpdir, 'serve-sim-screenshots');
|
||||
const destination = path.join(os.tmpdir(), 'screen.png');
|
||||
const png = Buffer.from([0x89, 0x50, 0x4e, 0x47, 0xff, 0x00]);
|
||||
const options = { port: 1234, token: 'host-token', device: 'selected-udid', tmpdir };
|
||||
|
||||
beforeEach(async () => {
|
||||
await mkdir(staging, { recursive: true });
|
||||
jest.mocked(runServeSimActionAsync).mockReset();
|
||||
});
|
||||
|
||||
it('captures the selected active display and removes only its own staging', async () => {
|
||||
await writeFile(path.join(staging, 'unrelated.png'), 'keep');
|
||||
jest.mocked(runServeSimActionAsync).mockImplementation(async request => {
|
||||
expect(request).toEqual({
|
||||
port: 1234,
|
||||
token: 'host-token',
|
||||
action: 'screenshot.capture',
|
||||
params: {
|
||||
udid: 'selected-udid',
|
||||
fileName: expect.stringMatching(/^serve-sim-screenshot-preview-.*\.png$/),
|
||||
automation: true,
|
||||
},
|
||||
timeoutMs: 30_000,
|
||||
signal,
|
||||
drainAfterDispatch: true,
|
||||
});
|
||||
await writeFile(path.join(staging, request.params.fileName as string), png);
|
||||
return;
|
||||
});
|
||||
const capture = createServeSimPreviewCapture(options);
|
||||
await capture.captureAsync(destination, signal);
|
||||
expect(await readFile(destination)).toEqual(png);
|
||||
expect(await readdir(staging)).toEqual(['unrelated.png']);
|
||||
});
|
||||
|
||||
it('drains an already sent action before honoring abort and deleting its output', async () => {
|
||||
const controller = new AbortController();
|
||||
let complete!: () => void;
|
||||
const pending = new Promise<void>(resolve => {
|
||||
complete = resolve;
|
||||
});
|
||||
let staged!: string;
|
||||
jest.mocked(runServeSimActionAsync).mockImplementation(async request => {
|
||||
staged = path.join(staging, request.params.fileName as string);
|
||||
await pending;
|
||||
await writeFile(staged, png);
|
||||
return;
|
||||
});
|
||||
const capture = createServeSimPreviewCapture(options);
|
||||
let settled = false;
|
||||
const capturing = capture.captureAsync(destination, controller.signal);
|
||||
void capturing.then(
|
||||
() => {
|
||||
settled = true;
|
||||
},
|
||||
() => {
|
||||
settled = true;
|
||||
}
|
||||
);
|
||||
controller.abort(new Error('session stopped'));
|
||||
await Promise.resolve();
|
||||
expect(settled).toBe(false);
|
||||
complete();
|
||||
await expect(capturing).rejects.toThrow('session stopped');
|
||||
expect(await readdir(staging)).toEqual([]);
|
||||
});
|
||||
|
||||
it.each(['timed out', 'connection closed'])(
|
||||
'keeps a possibly writable file after %s until the host stops',
|
||||
async message => {
|
||||
let staged!: string;
|
||||
jest.mocked(runServeSimActionAsync).mockImplementation(async request => {
|
||||
staged = path.join(staging, request.params.fileName as string);
|
||||
await writeFile(staged, 'reservation');
|
||||
throw new Error(message);
|
||||
});
|
||||
const capture = createServeSimPreviewCapture(options);
|
||||
await expect(capture.captureAsync(destination, signal)).rejects.toThrow(message);
|
||||
expect(await readFile(staged, 'utf8')).toBe('reservation');
|
||||
// The server may still write after the client's deadline or disconnect.
|
||||
await writeFile(staged, png);
|
||||
await capture.cleanupAfterHostStoppedAsync();
|
||||
expect(await readdir(staging)).toEqual([]);
|
||||
}
|
||||
);
|
||||
|
||||
it('attempts every owned cleanup when one file cannot be removed', async () => {
|
||||
let blocked!: string;
|
||||
let count = 0;
|
||||
jest.mocked(runServeSimActionAsync).mockImplementation(async request => {
|
||||
const staged = path.join(staging, request.params.fileName as string);
|
||||
if (count++ === 0) {
|
||||
blocked = staged;
|
||||
await mkdir(staged);
|
||||
} else {
|
||||
await writeFile(staged, png);
|
||||
}
|
||||
throw new Error('capture disconnected');
|
||||
});
|
||||
const capture = createServeSimPreviewCapture(options);
|
||||
await expect(capture.captureAsync(destination, signal)).rejects.toThrow('disconnected');
|
||||
await expect(capture.captureAsync(destination, signal)).rejects.toThrow('disconnected');
|
||||
await expect(capture.cleanupAfterHostStoppedAsync()).rejects.toThrow(
|
||||
'Could not remove preview captures'
|
||||
);
|
||||
expect(await readdir(staging)).toEqual([path.basename(blocked)]);
|
||||
});
|
||||
|
||||
it('does not send a capture when already aborted', async () => {
|
||||
const capture = createServeSimPreviewCapture(options);
|
||||
await expect(
|
||||
capture.captureAsync(destination, AbortSignal.abort(new Error('stopped')))
|
||||
).rejects.toThrow('stopped');
|
||||
expect(runServeSimActionAsync).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it.each([
|
||||
[
|
||||
{ 'screenshot.capture': { properties: { automation: { type: 'boolean', default: false } } } },
|
||||
true,
|
||||
],
|
||||
[{ 'screenshot.capture': { properties: {} } }, false],
|
||||
[{ 'screenshot.capture': { properties: { automation: { type: 'string' } } } }, false],
|
||||
[{}, false],
|
||||
[null, false],
|
||||
])(
|
||||
'checks the catalog automation field before enabling captures (%j)',
|
||||
async (catalog, supported) => {
|
||||
jest.mocked(runServeSimActionWithResultAsync).mockResolvedValueOnce(JSON.stringify(catalog));
|
||||
const capture = createServeSimPreviewCapture(options);
|
||||
await expect(capture.isSupportedAsync(signal)).resolves.toBe(supported);
|
||||
expect(runServeSimActionWithResultAsync).toHaveBeenCalledWith({
|
||||
port: options.port,
|
||||
token: options.token,
|
||||
action: 'actions.describe',
|
||||
params: {},
|
||||
timeoutMs: 30_000,
|
||||
signal,
|
||||
});
|
||||
expect(runServeSimActionAsync).not.toHaveBeenCalled();
|
||||
}
|
||||
);
|
||||
@@ -141,18 +141,25 @@ export async function captureDeviceRunSessionPreviewAsync({
|
||||
device,
|
||||
env,
|
||||
signal,
|
||||
captureIosScreenshotAsync,
|
||||
}: {
|
||||
runtimePlatform: BuildRuntimePlatform;
|
||||
device: string;
|
||||
env: BuildStepEnv;
|
||||
signal: AbortSignal;
|
||||
captureIosScreenshotAsync?: (file: string, signal: AbortSignal) => Promise<void>;
|
||||
}): Promise<Buffer> {
|
||||
const directory = await mkdtemp(path.join(os.tmpdir(), 'session-preview-'));
|
||||
try {
|
||||
const options = { env, signal, timeout: 30_000, stdio: 'pipe' as const };
|
||||
const preview = path.join(directory, 'preview.webp');
|
||||
if (runtimePlatform === BuildRuntimePlatform.DARWIN) {
|
||||
await captureIosPreviewAsync({ device, directory, preview, options });
|
||||
if (!captureIosScreenshotAsync) {
|
||||
throw new Error(
|
||||
'Cannot capture the iOS session preview: serve-sim screenshot capture is not configured.'
|
||||
);
|
||||
}
|
||||
await captureIosPreviewAsync({ captureIosScreenshotAsync, directory, preview, options });
|
||||
} else {
|
||||
await captureAndroidPreviewAsync({ device, directory, preview, options });
|
||||
}
|
||||
@@ -170,19 +177,20 @@ type CaptureOptions = {
|
||||
};
|
||||
|
||||
async function captureIosPreviewAsync({
|
||||
device,
|
||||
captureIosScreenshotAsync,
|
||||
directory,
|
||||
preview,
|
||||
options,
|
||||
}: {
|
||||
device: string;
|
||||
captureIosScreenshotAsync: (file: string, signal: AbortSignal) => Promise<void>;
|
||||
directory: string;
|
||||
preview: string;
|
||||
options: CaptureOptions;
|
||||
}): Promise<void> {
|
||||
const screenshot = path.join(directory, 'screen.png');
|
||||
const resized = path.join(directory, 'resized.png');
|
||||
await spawn('xcrun', ['simctl', 'io', device, 'screenshot', screenshot], options);
|
||||
await captureIosScreenshotAsync(screenshot, options.signal);
|
||||
options.signal.throwIfAborted();
|
||||
await spawn('sips', ['-Z', String(PREVIEW_MAX_DIMENSION), screenshot, '--out', resized], options);
|
||||
await spawn('cwebp', ['-quiet', '-q', String(PREVIEW_QUALITY), resized, '-o', preview], options);
|
||||
}
|
||||
|
||||
@@ -54,6 +54,7 @@ import {
|
||||
isPreinstalledExpoGoAsync,
|
||||
readIosApplicationIdentifierAsync,
|
||||
} from './iosAppArtifact';
|
||||
import { createServeSimPreviewCapture } from './serveSimPreviewCapture';
|
||||
import { type ServeSimActivityPolling, startServeSimActivityPolling } from './serveSimActivity';
|
||||
import { verifyLocalEgressGuardAsync } from './localEgressGuard';
|
||||
import { type IosSimulatorUuid } from '../../utils/IosSimulatorUtils';
|
||||
@@ -605,6 +606,7 @@ async function startDeviceSessionHostInternalAsync(
|
||||
const previewRetirementErrors: unknown[] = [];
|
||||
let finishTask: Promise<void> | null = null;
|
||||
let hostReady = false;
|
||||
let iosPreviewCapture: ReturnType<typeof createServeSimPreviewCapture> | undefined;
|
||||
let sessionPreview: ReturnType<typeof startDeviceRunSessionPreview> | null = null;
|
||||
const previewSetupController = new AbortController();
|
||||
let previewSetupTask: Promise<void> | undefined;
|
||||
@@ -827,6 +829,7 @@ async function startDeviceSessionHostInternalAsync(
|
||||
await sessionPreview?.stopAsync();
|
||||
await previewActivity?.stopAsync();
|
||||
},
|
||||
cleanupPreviewCaptureAsync: async () => iosPreviewCapture?.cleanupAfterHostStoppedAsync(),
|
||||
previewServer,
|
||||
screenshots,
|
||||
serverName,
|
||||
@@ -992,6 +995,18 @@ async function startDeviceSessionHostInternalAsync(
|
||||
// readiness on macOS, so it starts after its encoder is installed there.
|
||||
previewSetupTask = (async () => {
|
||||
if (!isAndroid) {
|
||||
iosPreviewCapture = createServeSimPreviewCapture({
|
||||
port,
|
||||
token: previewToken!,
|
||||
device,
|
||||
tmpdir: serveSimTmpdir,
|
||||
});
|
||||
if (!(await iosPreviewCapture.isSupportedAsync(previewSetupController.signal))) {
|
||||
logger.warn(
|
||||
'This serve-sim version does not support automated screenshots; skipping session previews.'
|
||||
);
|
||||
return;
|
||||
}
|
||||
await ensureMacosPreviewEncoderInstalledAsync({
|
||||
env,
|
||||
logger,
|
||||
@@ -1005,6 +1020,7 @@ async function startDeviceSessionHostInternalAsync(
|
||||
logger,
|
||||
captureAsync: signal =>
|
||||
captureDeviceRunSessionPreviewAsync({
|
||||
captureIosScreenshotAsync: iosPreviewCapture?.captureAsync,
|
||||
runtimePlatform,
|
||||
device: previewDevice ?? device,
|
||||
env,
|
||||
@@ -1080,6 +1096,7 @@ async function finishDeviceSessionHostAsync(
|
||||
{
|
||||
previewRetirement,
|
||||
stopSessionPreviewAsync,
|
||||
cleanupPreviewCaptureAsync,
|
||||
previewServer,
|
||||
screenshots,
|
||||
serverName,
|
||||
@@ -1091,6 +1108,7 @@ async function finishDeviceSessionHostAsync(
|
||||
}: {
|
||||
previewRetirement: Promise<boolean>;
|
||||
stopSessionPreviewAsync: () => Promise<void>;
|
||||
cleanupPreviewCaptureAsync: () => Promise<void>;
|
||||
previewServer: DetachedProcessHandle;
|
||||
screenshots: { finishAsync(hostStopped: boolean): Promise<void> };
|
||||
serverName: string;
|
||||
@@ -1124,6 +1142,13 @@ async function finishDeviceSessionHostAsync(
|
||||
} catch (err) {
|
||||
logger.warn({ err }, `Could not stop the ${serverName} session host.`);
|
||||
}
|
||||
if (hostStopped) {
|
||||
try {
|
||||
await cleanupPreviewCaptureAsync();
|
||||
} catch (err) {
|
||||
logger.warn({ err }, 'Could not remove session preview capture files.');
|
||||
}
|
||||
}
|
||||
const previewRetired = await previewRetirement;
|
||||
onStopped(hostStopped && !hostExited && previewRetired);
|
||||
await screenshots.finishAsync(hostStopped);
|
||||
|
||||
@@ -30,13 +30,20 @@ export async function stageServeSimAppAsync(
|
||||
}
|
||||
}
|
||||
|
||||
export async function runServeSimActionAsync({
|
||||
export async function runServeSimActionAsync(
|
||||
options: Parameters<typeof runServeSimActionWithResultAsync>[0]
|
||||
): Promise<void> {
|
||||
await runServeSimActionWithResultAsync(options);
|
||||
}
|
||||
|
||||
export async function runServeSimActionWithResultAsync({
|
||||
port,
|
||||
token,
|
||||
action,
|
||||
params,
|
||||
timeoutMs,
|
||||
signal,
|
||||
drainAfterDispatch = false,
|
||||
}: {
|
||||
port: number;
|
||||
token: string;
|
||||
@@ -44,13 +51,15 @@ export async function runServeSimActionAsync({
|
||||
params: Record<string, unknown>;
|
||||
timeoutMs: number;
|
||||
signal?: AbortSignal;
|
||||
}): Promise<void> {
|
||||
/** Abort before dispatch; once sent, wait for its reply or deadline because exec-ws cannot cancel it. */
|
||||
drainAfterDispatch?: boolean;
|
||||
}): Promise<string> {
|
||||
signal?.throwIfAborted();
|
||||
await new Promise<void>((resolve, reject) => {
|
||||
return await new Promise<string>((resolve, reject) => {
|
||||
const socket = new WebSocket(`ws://127.0.0.1:${port}/exec-ws`, [`serve-sim.token.${token}`]);
|
||||
let settled = false;
|
||||
let sent = false;
|
||||
const finish = (error?: unknown) => {
|
||||
const finish = (error?: unknown, stdout = '') => {
|
||||
if (settled) {
|
||||
return;
|
||||
}
|
||||
@@ -61,10 +70,14 @@ export async function runServeSimActionAsync({
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
resolve();
|
||||
resolve(stdout);
|
||||
}
|
||||
};
|
||||
const aborted = () => {
|
||||
if (!sent || !drainAfterDispatch) {
|
||||
finish(signal?.reason ?? new Error('Serve-sim action aborted.'));
|
||||
}
|
||||
};
|
||||
const aborted = () => finish(signal?.reason ?? new Error('Serve-sim action aborted.'));
|
||||
const timer = setTimeout(
|
||||
() => finish(new SystemError(`serve-sim ${action} timed out.`)),
|
||||
timeoutMs
|
||||
@@ -75,6 +88,9 @@ export async function runServeSimActionAsync({
|
||||
finish(new SystemError(`serve-sim ${action} connection closed before completion.`))
|
||||
);
|
||||
socket.on('message', data => {
|
||||
if (settled) {
|
||||
return;
|
||||
}
|
||||
let reply;
|
||||
try {
|
||||
reply = JSON.parse(data.toString());
|
||||
@@ -90,7 +106,8 @@ export async function runServeSimActionAsync({
|
||||
? undefined
|
||||
: new SystemError(
|
||||
`serve-sim ${action} failed: ${(typeof reply.error === 'string' && reply.error) || (typeof reply.stderr === 'string' && reply.stderr) || 'invalid response'}`
|
||||
)
|
||||
),
|
||||
typeof reply.stdout === 'string' ? reply.stdout : ''
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
import { randomUUID } from 'node:crypto';
|
||||
import { copyFile, rm } from 'node:fs/promises';
|
||||
import path from 'node:path';
|
||||
|
||||
import { runServeSimActionAsync, runServeSimActionWithResultAsync } from './serveSimActions';
|
||||
|
||||
export function createServeSimPreviewCapture({
|
||||
port,
|
||||
token,
|
||||
device,
|
||||
tmpdir,
|
||||
}: {
|
||||
port: number;
|
||||
token: string;
|
||||
device: string;
|
||||
tmpdir: string;
|
||||
}) {
|
||||
const ownedFiles = new Set<string>();
|
||||
return {
|
||||
async isSupportedAsync(signal: AbortSignal): Promise<boolean> {
|
||||
const result = await runServeSimActionWithResultAsync({
|
||||
port,
|
||||
token,
|
||||
action: 'actions.describe',
|
||||
params: {},
|
||||
timeoutMs: 30_000,
|
||||
signal,
|
||||
});
|
||||
const catalog: {
|
||||
'screenshot.capture'?: { properties?: { automation?: { type?: unknown } } };
|
||||
} | null = JSON.parse(result);
|
||||
return catalog?.['screenshot.capture']?.properties?.automation?.type === 'boolean';
|
||||
},
|
||||
async captureAsync(destination: string, signal: AbortSignal): Promise<void> {
|
||||
signal.throwIfAborted();
|
||||
const fileName = `serve-sim-screenshot-preview-${randomUUID()}.png`;
|
||||
const staged = path.join(tmpdir, 'serve-sim-screenshots', fileName);
|
||||
ownedFiles.add(staged);
|
||||
// Closing exec-ws does not cancel its host action. Drain a sent capture before honoring
|
||||
// cancellation; on timeout/disconnect, leave its file alone until the host has stopped.
|
||||
await runServeSimActionAsync({
|
||||
port,
|
||||
token,
|
||||
action: 'screenshot.capture',
|
||||
params: { udid: device, fileName, automation: true },
|
||||
timeoutMs: 30_000,
|
||||
signal,
|
||||
drainAfterDispatch: true,
|
||||
});
|
||||
try {
|
||||
signal.throwIfAborted();
|
||||
await copyFile(staged, destination);
|
||||
} finally {
|
||||
await rm(staged, { force: true });
|
||||
ownedFiles.delete(staged);
|
||||
}
|
||||
},
|
||||
/** Call only after the host process group has stopped, including timed-out actions. */
|
||||
async cleanupAfterHostStoppedAsync(): Promise<void> {
|
||||
const results = await Promise.allSettled(
|
||||
[...ownedFiles].map(async file => {
|
||||
await rm(file, { force: true });
|
||||
ownedFiles.delete(file);
|
||||
})
|
||||
);
|
||||
const errors = results
|
||||
.filter(result => result.status === 'rejected')
|
||||
.map(result => result.reason);
|
||||
if (errors.length) {
|
||||
throw new AggregateError(errors, 'Could not remove preview captures.');
|
||||
}
|
||||
},
|
||||
};
|
||||
}
|
||||
@@ -1,7 +1,10 @@
|
||||
import { SystemError } from '@expo/eas-build-job';
|
||||
import downloadFile from '@expo/downloader';
|
||||
import spawn from '@expo/turtle-spawn';
|
||||
import { spawnSync } from 'node:child_process';
|
||||
import fs from 'node:fs/promises';
|
||||
import os from 'node:os';
|
||||
import path from 'node:path';
|
||||
|
||||
import { createMockLogger } from '../../__tests__/utils/logger';
|
||||
import { BuildContext } from '../../context';
|
||||
@@ -164,10 +167,14 @@ describe(startUptermHostAsync, () => {
|
||||
};
|
||||
}
|
||||
|
||||
function makeCtx(env: Record<string, string> = {}): BuildContext {
|
||||
function makeCtx(
|
||||
env: Record<string, string> = {},
|
||||
buildDirectory = '/workingdir/build'
|
||||
): BuildContext {
|
||||
return {
|
||||
logger: createMockLogger(),
|
||||
env,
|
||||
buildDirectory,
|
||||
} as unknown as BuildContext;
|
||||
}
|
||||
|
||||
@@ -227,6 +234,33 @@ describe(startUptermHostAsync, () => {
|
||||
);
|
||||
});
|
||||
|
||||
it('starts each client shell in the build directory', async () => {
|
||||
const realFs = jest.requireActual<typeof import('node:fs')>('node:fs');
|
||||
const tmpDir = realFs.mkdtempSync(path.join(os.tmpdir(), 'eas-upterm-join-'));
|
||||
try {
|
||||
const buildDirectory = path.join(tmpDir, "it's $HOME `pwd`", 'build');
|
||||
realFs.mkdirSync(buildDirectory, { recursive: true });
|
||||
|
||||
await startUptermHostAsync(makeCtx({}, buildDirectory), { relayServerUrl: 'wss://r' });
|
||||
|
||||
const joinScriptCall = mockedFs.writeFile.mock.calls.find(
|
||||
([file]) => file === '/tmp/eas-ssh-1/join.sh'
|
||||
);
|
||||
const joinScriptPath = path.join(tmpDir, 'join.sh');
|
||||
realFs.writeFileSync(joinScriptPath, String(joinScriptCall?.[1]));
|
||||
const result = spawnSync('bash', [joinScriptPath], {
|
||||
cwd: tmpDir,
|
||||
env: { PATH: process.env.PATH, HOME: tmpDir },
|
||||
input: 'pwd\n',
|
||||
encoding: 'utf8',
|
||||
});
|
||||
|
||||
expect(result.stdout.trim()).toBe(buildDirectory);
|
||||
} finally {
|
||||
realFs.rmSync(tmpDir, { recursive: true, force: true });
|
||||
}
|
||||
});
|
||||
|
||||
it('downloads from GCS into a fresh temp dir when upterm is not on PATH', async () => {
|
||||
uptermOnPath = false;
|
||||
|
||||
|
||||
@@ -202,7 +202,12 @@ export async function startUptermHostAsync(
|
||||
await spawn('ssh-keygen', ['-t', 'ed25519', '-N', '', '-f', hostKeyPath, '-q'], {
|
||||
logger: ctx.logger,
|
||||
});
|
||||
await fs.writeFile(forceCommandPath, '#!/usr/bin/env bash\nexec bash -l\n', { mode: 0o755 });
|
||||
const quotedBuildDirectory = `'${ctx.buildDirectory.replaceAll("'", "'\\''")}'`;
|
||||
await fs.writeFile(
|
||||
forceCommandPath,
|
||||
`#!/usr/bin/env bash\ncd -- ${quotedBuildDirectory}\nexec bash -l\n`,
|
||||
{ mode: 0o755 }
|
||||
);
|
||||
|
||||
let currentProcess: SpawnPromise<SpawnResult> | null = null;
|
||||
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
# create-eas-build-function
|
||||
|
||||
## 27.7.2
|
||||
|
||||
No changes in this release.
|
||||
|
||||
## 27.7.1
|
||||
|
||||
No changes in this release.
|
||||
|
||||
## 27.7.0
|
||||
|
||||
No changes in this release.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "create-eas-build-function",
|
||||
"version": "27.7.0",
|
||||
"version": "27.7.2",
|
||||
"description": "Create functions for use in EAS Build custom builds.",
|
||||
"keywords": [
|
||||
"expo",
|
||||
@@ -35,7 +35,7 @@
|
||||
"clean": "rimraf ./build/ \"*.tsbuildinfo\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@expo/steps": "27.7.0"
|
||||
"@expo/steps": "27.7.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@expo/package-manager": "1.9.10",
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
# @expo/downloader
|
||||
|
||||
## 27.7.2
|
||||
|
||||
No changes in this release.
|
||||
|
||||
## 27.7.1
|
||||
|
||||
No changes in this release.
|
||||
|
||||
## 27.7.0
|
||||
|
||||
No changes in this release.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@expo/downloader",
|
||||
"version": "27.7.0",
|
||||
"version": "27.7.2",
|
||||
"bugs": "https://github.com/expo/eas-cli/issues",
|
||||
"license": "BUSL-1.1",
|
||||
"author": "Expo <[email protected]>",
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
# eas-build-cache-provider
|
||||
|
||||
## 27.7.2
|
||||
|
||||
No changes in this release.
|
||||
|
||||
## 27.7.1
|
||||
|
||||
No changes in this release.
|
||||
|
||||
## 27.7.0
|
||||
|
||||
No changes in this release.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "eas-build-cache-provider",
|
||||
"version": "27.7.0",
|
||||
"version": "27.7.2",
|
||||
"description": "A build cache provider plugin for the Expo CLI",
|
||||
"homepage": "https://github.com/expo/eas-cli",
|
||||
"bugs": "https://github.com/expo/eas-cli/issues",
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
# @expo/eas-build-job
|
||||
|
||||
## 27.7.2
|
||||
|
||||
No changes in this release.
|
||||
|
||||
## 27.7.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Update `node-forge`, `tar`, `nanoid`, `minimatch`, `joi`, `ajv`, `yaml`, and `zod` to versions with fixes for published security advisories. ([#4847](https://github.com/expo/eas-cli/pull/4847) by [@tchayen](https://github.com/tchayen))
|
||||
|
||||
## 27.7.0
|
||||
|
||||
No changes in this release.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@expo/eas-build-job",
|
||||
"version": "27.7.0",
|
||||
"version": "27.7.2",
|
||||
"bugs": "https://github.com/expo/eas-cli/issues",
|
||||
"license": "MIT",
|
||||
"author": "Expo <[email protected]>",
|
||||
@@ -25,12 +25,12 @@
|
||||
"clean": "rimraf node_modules dist coverage \"*.tsbuildinfo\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@expo/logger": "27.7.0",
|
||||
"@expo/logger": "27.7.2",
|
||||
"@expo/results": "1.0.0",
|
||||
"@expo/turtle-spawn": "27.7.0",
|
||||
"joi": "^17.13.1",
|
||||
"@expo/turtle-spawn": "27.7.2",
|
||||
"joi": "^17.13.9",
|
||||
"semver": "^7.6.2",
|
||||
"zod": "^4.3.5"
|
||||
"zod": "^4.6.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "^29.5.12",
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
# eas-cli
|
||||
|
||||
## 27.7.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Add `--log-source` to `eas simulator` to select which Android logs a session records. ([#4823](https://github.com/expo/eas-cli/pull/4823) by [@vonovak](https://github.com/vonovak))
|
||||
- Show that the ssh session has ended, instead of saying SSH was not enabled, when `eas workflow:ssh` is given the ID of a finished build. ([#4842](https://github.com/expo/eas-cli/pull/4842) by [@AHGIJMKLKKZNPJKQR](https://github.com/AHGIJMKLKKZNPJKQR))
|
||||
- Show the ID argument and examples in `eas workflow:ssh --help`. ([#4829](https://github.com/expo/eas-cli/pull/4829) by [@AHGIJMKLKKZNPJKQR](https://github.com/AHGIJMKLKKZNPJKQR))
|
||||
|
||||
## 27.7.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Update `node-forge`, `tar`, `nanoid`, `minimatch`, `joi`, `ajv`, `yaml`, and `zod` to versions with fixes for published security advisories. ([#4847](https://github.com/expo/eas-cli/pull/4847) by [@tchayen](https://github.com/tchayen))
|
||||
|
||||
## 27.7.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
+186
-163
File diff suppressed because it is too large.
Load diff
Generated
+20
@@ -47534,6 +47534,26 @@
|
||||
"isDeprecated": false,
|
||||
"deprecationReason": null
|
||||
},
|
||||
{
|
||||
"name": "logSources",
|
||||
"description": "Logs to record during the session and upload afterward: emulator-output and device-logcat. Defaults to\n[\"emulator-output\"]. An empty list disables recording and uploading both sources. Device-wide logcat can contain\ncredentials and personal data; include device-logcat only when you want to retain it.\nLogs are not redacted and use the existing 90-day artifact retention policy.",
|
||||
"type": {
|
||||
"kind": "LIST",
|
||||
"name": null,
|
||||
"ofType": {
|
||||
"kind": "NON_NULL",
|
||||
"name": null,
|
||||
"ofType": {
|
||||
"kind": "SCALAR",
|
||||
"name": "String",
|
||||
"ofType": null
|
||||
}
|
||||
}
|
||||
},
|
||||
"defaultValue": null,
|
||||
"isDeprecated": false,
|
||||
"deprecationReason": null
|
||||
},
|
||||
{
|
||||
"name": "systemImagePackage",
|
||||
"description": "Android SDK system image package to use for the emulator (e.g.\n\"system-images;android-35;google_apis;x86_64\").",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "eas-cli",
|
||||
"version": "27.7.0",
|
||||
"version": "27.7.2",
|
||||
"description": "EAS command line tool",
|
||||
"keywords": [
|
||||
"cli",
|
||||
@@ -48,12 +48,12 @@
|
||||
"@expo/code-signing-certificates": "0.0.5",
|
||||
"@expo/config": "55.0.10",
|
||||
"@expo/config-plugins": "55.0.7",
|
||||
"@expo/eas-build-job": "27.7.0",
|
||||
"@expo/eas-json": "27.7.0",
|
||||
"@expo/eas-build-job": "27.7.2",
|
||||
"@expo/eas-json": "27.7.2",
|
||||
"@expo/env": "^1.0.0",
|
||||
"@expo/experimentation": "0.0.5",
|
||||
"@expo/json-file": "8.3.3",
|
||||
"@expo/logger": "27.7.0",
|
||||
"@expo/logger": "27.7.2",
|
||||
"@expo/multipart-body-parser": "2.0.0",
|
||||
"@expo/osascript": "2.1.4",
|
||||
"@expo/package-manager": "1.9.10",
|
||||
@@ -65,7 +65,7 @@
|
||||
"@expo/results": "1.0.0",
|
||||
"@expo/rudder-sdk-node": "1.1.1",
|
||||
"@expo/spawn-async": "1.7.2",
|
||||
"@expo/steps": "27.7.0",
|
||||
"@expo/steps": "27.7.2",
|
||||
"@expo/timeago.js": "1.0.0",
|
||||
"@oclif/core": "^4.8.3",
|
||||
"@oclif/plugin-autocomplete": "^3.2.40",
|
||||
@@ -74,7 +74,7 @@
|
||||
"@urql/core": "4.0.11",
|
||||
"@urql/exchange-retry": "1.2.0",
|
||||
"agent-cli-detector": "0.1.7",
|
||||
"ajv": "8.11.0",
|
||||
"ajv": "8.20.0",
|
||||
"ajv-formats": "2.1.1",
|
||||
"better-opn": "3.0.2",
|
||||
"bplist-parser": "^0.3.0",
|
||||
@@ -101,15 +101,15 @@
|
||||
"indent-string": "4.0.0",
|
||||
"invariant": "^2.2.2",
|
||||
"jks-js": "1.1.0",
|
||||
"joi": "17.11.0",
|
||||
"joi": "17.13.9",
|
||||
"keychain": "1.5.0",
|
||||
"log-symbols": "4.1.0",
|
||||
"mime": "3.0.0",
|
||||
"minimatch": "5.1.2",
|
||||
"minimatch": "5.1.9",
|
||||
"minizlib": "3.1.0",
|
||||
"nanoid": "3.3.8",
|
||||
"nanoid": "3.3.20",
|
||||
"node-fetch": "2.6.7",
|
||||
"node-forge": "1.4.0",
|
||||
"node-forge": "1.4.3",
|
||||
"node-stream-zip": "1.15.0",
|
||||
"nullthrows": "1.1.1",
|
||||
"open": "8.4.0",
|
||||
@@ -126,7 +126,7 @@
|
||||
"semver": "7.5.4",
|
||||
"set-interval-async": "3.0.3",
|
||||
"slash": "3.0.0",
|
||||
"tar": "7.5.19",
|
||||
"tar": "7.5.22",
|
||||
"tar-stream": "3.1.7",
|
||||
"terminal-link": "2.1.1",
|
||||
"ts-deepmerge": "6.2.0",
|
||||
@@ -136,8 +136,8 @@
|
||||
"uuid": "11.1.1",
|
||||
"wrap-ansi": "7.0.0",
|
||||
"ws": "8.21.1",
|
||||
"yaml": "2.6.0",
|
||||
"zod": "^4.1.3"
|
||||
"yaml": "2.9.1",
|
||||
"zod": "^4.6.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@graphql-codegen/cli": "6.3.1",
|
||||
|
||||
@@ -1685,6 +1685,38 @@ describe(Simulator, () => {
|
||||
);
|
||||
});
|
||||
|
||||
it('accumulates repeated --log-source flags in order', async () => {
|
||||
const { command } = createCommand([
|
||||
'--platform',
|
||||
'android',
|
||||
'--non-interactive',
|
||||
'--log-source',
|
||||
'emulator-output',
|
||||
'--log-source',
|
||||
'device-logcat',
|
||||
]);
|
||||
await command.runAsync();
|
||||
expect(mockCreateDeviceRunSessionAsync).toHaveBeenCalledWith(
|
||||
graphqlClient,
|
||||
expect.objectContaining({ android: { logSources: ['emulator-output', 'device-logcat'] } })
|
||||
);
|
||||
});
|
||||
|
||||
it('leaves Android log sources omitted unless explicitly requested', async () => {
|
||||
const { command } = createCommand(['--platform', 'android', '--non-interactive']);
|
||||
await command.runAsync();
|
||||
expect(mockCreateDeviceRunSessionAsync.mock.calls[0][1].android?.logSources).toBeUndefined();
|
||||
});
|
||||
|
||||
it.each([
|
||||
{ args: ['--platform', 'ios', '--log-source', 'device-logcat'] },
|
||||
{ args: ['--platform', 'android', '--log-source', 'unknown'] },
|
||||
])('rejects invalid Android logging options $args', async ({ args }) => {
|
||||
const { command } = createCommand([...args, '--non-interactive']);
|
||||
await expect(command.runAsync()).rejects.toThrow();
|
||||
expect(mockCreateDeviceRunSessionAsync).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('passes --network-capture to the createDeviceRunSession mutation', async () => {
|
||||
const { command } = createCommand([
|
||||
'--platform',
|
||||
|
||||
@@ -0,0 +1,492 @@
|
||||
import { Config } from '@oclif/core';
|
||||
import chalk from 'chalk';
|
||||
import { stripVTControlCharacters } from 'node:util';
|
||||
|
||||
import { ExpoGraphqlClient } from '../../../commandUtils/context/contextUtils/createGraphqlClient';
|
||||
import { DeviceRunSessionStatus } from '../../../graphql/generated';
|
||||
import { DeviceRunSessionQuery } from '../../../graphql/queries/DeviceRunSessionQuery';
|
||||
import { downloadSimulatorArtifactAsync } from '../../../simulator/artifacts';
|
||||
import Log from '../../../log';
|
||||
import { ora } from '../../../ora';
|
||||
import { loadSimulatorEnvAsync } from '../../../simulator/env';
|
||||
import {
|
||||
downloadNetworkCaptureAsync,
|
||||
readNetworkRequestsAsync,
|
||||
streamNetworkRequestsAsync,
|
||||
} from '../../../simulator/networkRequests';
|
||||
import { resolveSimulatorPreviewAsync } from '../../../simulator/preview';
|
||||
import { enableJsonOutput, printJsonOnlyOutput } from '../../../utils/json';
|
||||
import SimulatorNetworkRequests from '../network-requests';
|
||||
|
||||
jest.mock('../../../log');
|
||||
jest.mock('../../../graphql/queries/DeviceRunSessionQuery');
|
||||
jest.mock('../../../simulator/artifacts', () => ({
|
||||
...jest.requireActual('../../../simulator/artifacts'),
|
||||
downloadSimulatorArtifactAsync: jest.fn(),
|
||||
}));
|
||||
jest.mock('../../../ora', () => ({
|
||||
ora: jest.fn(() => {
|
||||
const spinner = {
|
||||
fail: jest.fn(),
|
||||
start: jest.fn(),
|
||||
succeed: jest.fn(),
|
||||
};
|
||||
spinner.start.mockReturnValue(spinner);
|
||||
return spinner;
|
||||
}),
|
||||
}));
|
||||
jest.mock('../../../simulator/env', () => ({
|
||||
...jest.requireActual('../../../simulator/env'),
|
||||
loadSimulatorEnvAsync: jest.fn(),
|
||||
}));
|
||||
jest.mock('../../../simulator/networkRequests');
|
||||
jest.mock('../../../simulator/preview', () => ({
|
||||
...jest.requireActual('../../../simulator/preview'),
|
||||
resolveSimulatorPreviewAsync: jest.fn(),
|
||||
}));
|
||||
jest.mock('../../../utils/json');
|
||||
|
||||
const mockLoadSimulatorEnvAsync = jest.mocked(loadSimulatorEnvAsync);
|
||||
const mockOra = jest.mocked(ora);
|
||||
const mockResolvePreviewAsync = jest.mocked(resolveSimulatorPreviewAsync);
|
||||
const mockReadRequestsAsync = jest.mocked(readNetworkRequestsAsync);
|
||||
const mockDownloadCaptureAsync = jest.mocked(downloadNetworkCaptureAsync);
|
||||
const mockStreamRequestsAsync = jest.mocked(streamNetworkRequestsAsync);
|
||||
const mockEnableJsonOutput = jest.mocked(enableJsonOutput);
|
||||
const mockPrintJsonOnlyOutput = jest.mocked(printJsonOnlyOutput);
|
||||
const mockLog = jest.mocked(Log.log);
|
||||
const originalColorLevel = chalk.level;
|
||||
const graphqlClient = {} as ExpoGraphqlClient;
|
||||
const projectDir = '/test/project';
|
||||
const preview = {
|
||||
deviceRunSessionId: 'session-id',
|
||||
baseUrl: new URL('https://preview.test'),
|
||||
token: 'preview-token',
|
||||
};
|
||||
const requestSummary = {
|
||||
id: 'request-id',
|
||||
startedAt: Date.parse('2026-10-05T12:00:00.000Z'),
|
||||
startedDateTime: '2026-10-05T12:00:00.000Z',
|
||||
method: 'POST',
|
||||
url: 'https://example.test/posts',
|
||||
status: 201,
|
||||
duration: 50,
|
||||
requestSize: 100,
|
||||
responseSize: 200,
|
||||
};
|
||||
const request = {
|
||||
_captureId: 'request-id',
|
||||
startedDateTime: '2026-10-05T12:00:00.000Z',
|
||||
time: 50,
|
||||
request: {
|
||||
method: 'POST',
|
||||
url: 'https://example.test/posts',
|
||||
bodySize: 100,
|
||||
headers: [{ name: 'Content-Type', value: 'application/json' }],
|
||||
postData: { mimeType: 'application/json', text: '{"title":"Coin Flip"}' },
|
||||
},
|
||||
response: {
|
||||
status: 201,
|
||||
bodySize: 200,
|
||||
content: { mimeType: 'application/json', text: '{"id":101}' },
|
||||
},
|
||||
};
|
||||
|
||||
function getMockOclifConfig(): Config {
|
||||
const config = new Config({ root: __dirname });
|
||||
config.runHook = async () => ({ failures: [], successes: [] });
|
||||
return config;
|
||||
}
|
||||
|
||||
describe(SimulatorNetworkRequests, () => {
|
||||
beforeEach(() => {
|
||||
jest.clearAllMocks();
|
||||
process.env.EAS_SIMULATOR_SESSION_ID = 'session-id';
|
||||
chalk.level = 0;
|
||||
mockLoadSimulatorEnvAsync.mockResolvedValue();
|
||||
jest
|
||||
.mocked(DeviceRunSessionQuery.byIdAsync)
|
||||
.mockResolvedValue({ id: 'session-id', status: DeviceRunSessionStatus.InProgress } as Awaited<
|
||||
ReturnType<typeof DeviceRunSessionQuery.byIdAsync>
|
||||
>);
|
||||
mockResolvePreviewAsync.mockResolvedValue(preview);
|
||||
mockReadRequestsAsync.mockResolvedValue([]);
|
||||
mockDownloadCaptureAsync.mockResolvedValue('/test/capture.har');
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
delete process.env.EAS_SIMULATOR_SESSION_ID;
|
||||
chalk.level = originalColorLevel;
|
||||
});
|
||||
|
||||
it.each([DeviceRunSessionStatus.Stopped, DeviceRunSessionStatus.Errored])(
|
||||
'downloads the capture for a %s session without preview',
|
||||
async status => {
|
||||
const session = { id: 'session-id', status } as Awaited<
|
||||
ReturnType<typeof DeviceRunSessionQuery.byIdAsync>
|
||||
>;
|
||||
jest.mocked(DeviceRunSessionQuery.byIdAsync).mockResolvedValue(session);
|
||||
await createCommand(['--artifact', '2', '--output', 'capture.har', '--json']).runAsync();
|
||||
expect(downloadSimulatorArtifactAsync).toHaveBeenCalledWith(session, 'network-capture', {
|
||||
artifact: 2,
|
||||
output: 'capture.har',
|
||||
nonInteractive: true,
|
||||
json: true,
|
||||
});
|
||||
expect(mockResolvePreviewAsync).not.toHaveBeenCalled();
|
||||
expect(DeviceRunSessionQuery.byIdAsync).toHaveBeenCalledTimes(1);
|
||||
}
|
||||
);
|
||||
|
||||
it.each([['--follow'], ['--request-id', 'r1']])(
|
||||
'rejects live inspection of a stopped session %s',
|
||||
async (...args) => {
|
||||
jest
|
||||
.mocked(DeviceRunSessionQuery.byIdAsync)
|
||||
.mockResolvedValue({ id: 'session-id', status: DeviceRunSessionStatus.Stopped } as Awaited<
|
||||
ReturnType<typeof DeviceRunSessionQuery.byIdAsync>
|
||||
>);
|
||||
await expect(createCommand(args).runAsync()).rejects.toThrow('Use --output <path>');
|
||||
expect(mockResolvePreviewAsync).not.toHaveBeenCalled();
|
||||
}
|
||||
);
|
||||
|
||||
it('rejects artifact selection on a running session', async () => {
|
||||
await expect(createCommand(['--artifact', '1']).runAsync()).rejects.toThrow(
|
||||
'only available for stopped sessions'
|
||||
);
|
||||
expect(mockReadRequestsAsync).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('prints a JSON list for an explicit session with the default limit', async () => {
|
||||
mockReadRequestsAsync.mockResolvedValue([requestSummary]);
|
||||
|
||||
await createCommand(['--id', 'session-id', '--json']).runAsync();
|
||||
|
||||
expect(mockEnableJsonOutput).toHaveBeenCalled();
|
||||
expect(DeviceRunSessionQuery.byIdAsync).toHaveBeenCalledWith(graphqlClient, 'session-id');
|
||||
expect(mockResolvePreviewAsync).toHaveBeenCalledWith(
|
||||
expect.objectContaining({ id: 'session-id' })
|
||||
);
|
||||
expect(mockReadRequestsAsync).toHaveBeenCalledWith(preview, {
|
||||
limit: 100,
|
||||
requestId: undefined,
|
||||
});
|
||||
expect(mockPrintJsonOnlyOutput).toHaveBeenCalledWith({
|
||||
deviceRunSessionId: 'session-id',
|
||||
requests: [requestSummary],
|
||||
});
|
||||
expect(mockLog).not.toHaveBeenCalled();
|
||||
expect(mockDownloadCaptureAsync).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('prints a full request detail including captured headers and bodies as JSON', async () => {
|
||||
mockReadRequestsAsync.mockResolvedValue(request);
|
||||
|
||||
await createCommand(['--request-id', 'request-id', '--json']).runAsync();
|
||||
|
||||
expect(mockReadRequestsAsync).toHaveBeenCalledWith(preview, {
|
||||
limit: 100,
|
||||
requestId: 'request-id',
|
||||
});
|
||||
expect(mockPrintJsonOnlyOutput).toHaveBeenCalledWith({
|
||||
deviceRunSessionId: 'session-id',
|
||||
request,
|
||||
});
|
||||
expect(mockLog).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('downloads a HAR and prints only the resulting file metadata as JSON', async () => {
|
||||
await createCommand(['--output', './capture.har', '--json']).runAsync();
|
||||
|
||||
expect(mockDownloadCaptureAsync).toHaveBeenCalledWith(preview, './capture.har');
|
||||
expect(mockPrintJsonOnlyOutput).toHaveBeenCalledWith({
|
||||
deviceRunSessionId: 'session-id',
|
||||
filePath: '/test/capture.har',
|
||||
});
|
||||
expect(mockReadRequestsAsync).not.toHaveBeenCalled();
|
||||
expect(mockLog).not.toHaveBeenCalled();
|
||||
expect(mockOra).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('shows a spinner with the saved path for human output', async () => {
|
||||
await createCommand(['-o', './capture.har']).runAsync();
|
||||
|
||||
const spinner = mockOra.mock.results[0].value;
|
||||
expect(mockOra).toHaveBeenCalledWith('Saving network capture');
|
||||
expect(spinner.succeed).toHaveBeenCalledWith('Saved network capture to /test/capture.har');
|
||||
expect(mockPrintJsonOnlyOutput).not.toHaveBeenCalled();
|
||||
expect(mockReadRequestsAsync).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('forwards an explicit limit and uses the dotenv session ID', async () => {
|
||||
mockReadRequestsAsync.mockResolvedValue([requestSummary]);
|
||||
mockLoadSimulatorEnvAsync.mockImplementation(async () => {
|
||||
process.env.EAS_SIMULATOR_SESSION_ID = 'dotenv-id';
|
||||
});
|
||||
|
||||
await createCommand(['--limit', '3']).runAsync();
|
||||
|
||||
expect(mockLoadSimulatorEnvAsync).toHaveBeenCalledWith(projectDir);
|
||||
expect(DeviceRunSessionQuery.byIdAsync).toHaveBeenCalledWith(graphqlClient, 'dotenv-id');
|
||||
expect(mockReadRequestsAsync).toHaveBeenCalledWith(preview, { limit: 3, requestId: undefined });
|
||||
expect(mockLog).toHaveBeenCalledWith(
|
||||
'request-id POST https://example.test/posts 201 50ms'
|
||||
);
|
||||
});
|
||||
|
||||
it('sanitizes terminal controls in human request summaries', async () => {
|
||||
mockReadRequestsAsync.mockResolvedValue([
|
||||
{ ...requestSummary, url: '\u001b[31mhttps://example.test/posts\u001b[0m\u0007' },
|
||||
]);
|
||||
|
||||
await createCommand([]).runAsync();
|
||||
|
||||
expect(mockLog).toHaveBeenCalledWith(
|
||||
'request-id POST https://example.test/posts 201 50ms'
|
||||
);
|
||||
});
|
||||
|
||||
it('rounds floating-point HAR timing noise only in human summaries', async () => {
|
||||
const summary = { ...requestSummary, duration: 2.8999999999999995 };
|
||||
mockReadRequestsAsync.mockResolvedValue([summary]);
|
||||
|
||||
await createCommand([]).runAsync();
|
||||
|
||||
expect(mockLog).toHaveBeenCalledWith(
|
||||
'request-id POST https://example.test/posts 201 2.9ms'
|
||||
);
|
||||
|
||||
await createCommand(['--json']).runAsync();
|
||||
|
||||
expect(mockPrintJsonOnlyOutput).toHaveBeenCalledWith({
|
||||
deviceRunSessionId: 'session-id',
|
||||
requests: [summary],
|
||||
});
|
||||
});
|
||||
|
||||
it('adds intentional colors after sanitizing remote text and preserves full URLs', async () => {
|
||||
chalk.level = 1;
|
||||
const url = `https://example.test/${'long-path/'.repeat(30)}`;
|
||||
mockReadRequestsAsync.mockResolvedValue([
|
||||
{
|
||||
...requestSummary,
|
||||
id: '\u001b[35mr1\u001b[0m\u0007',
|
||||
startedDateTime: '\u001b[35m2026-10-05T12:00:00.000Z\u001b[0m\u0007',
|
||||
method: '\u001b[35mGET\u001b[0m\u0007',
|
||||
url: `\u001b[35m${url}\u001b[0m\u0007`,
|
||||
},
|
||||
]);
|
||||
|
||||
await createCommand(['--timestamp']).runAsync();
|
||||
|
||||
const output = mockLog.mock.calls[0][0] as string;
|
||||
expect(output).toBe(
|
||||
[
|
||||
chalk.dim('2026-10-05T12:00:00.000Z'),
|
||||
chalk.dim('r1 '),
|
||||
chalk.bold.cyan('GET '),
|
||||
url,
|
||||
chalk.green('201'),
|
||||
chalk.dim('50ms'),
|
||||
].join(' ')
|
||||
);
|
||||
expect(output).toContain('\u001b[1m\u001b[36mGET ');
|
||||
expect(output).not.toContain('\u001b[35m');
|
||||
expect(output).not.toContain('\u0007');
|
||||
expect(stripVTControlCharacters(output)).toBe(
|
||||
`2026-10-05T12:00:00.000Z r1 GET ${url} 201 50ms`
|
||||
);
|
||||
});
|
||||
|
||||
it.each([
|
||||
[200, '\u001b[32m'],
|
||||
[299, '\u001b[32m'],
|
||||
[301, '\u001b[36m'],
|
||||
[399, '\u001b[36m'],
|
||||
[404, '\u001b[33m'],
|
||||
[499, '\u001b[33m'],
|
||||
[500, '\u001b[31m'],
|
||||
[599, '\u001b[31m'],
|
||||
[0, '\u001b[31m'],
|
||||
])('colors numeric status %i by response class', async (status, color) => {
|
||||
chalk.level = 1;
|
||||
mockReadRequestsAsync.mockResolvedValue([{ ...requestSummary, status }]);
|
||||
|
||||
await createCommand([]).runAsync();
|
||||
|
||||
expect(mockLog.mock.calls[0][0]).toContain(`${color}${status}\u001b[39m`);
|
||||
});
|
||||
|
||||
it('leaves JSON data untouched when terminal color is enabled', async () => {
|
||||
chalk.level = 1;
|
||||
mockReadRequestsAsync.mockResolvedValue([requestSummary]);
|
||||
|
||||
await createCommand(['--json']).runAsync();
|
||||
|
||||
expect(mockPrintJsonOnlyOutput).toHaveBeenCalledWith({
|
||||
deviceRunSessionId: 'session-id',
|
||||
requests: [requestSummary],
|
||||
});
|
||||
expect(JSON.stringify(mockPrintJsonOnlyOutput.mock.calls[0][0])).not.toContain('\\u001b');
|
||||
expect(mockLog).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('shows request start timestamps only when requested in human output', async () => {
|
||||
mockReadRequestsAsync.mockResolvedValue([requestSummary]);
|
||||
|
||||
await createCommand(['--timestamp']).runAsync();
|
||||
|
||||
expect(mockLog).toHaveBeenCalledWith(
|
||||
'2026-10-05T12:00:00.000Z request-id POST https://example.test/posts 201 50ms'
|
||||
);
|
||||
});
|
||||
|
||||
it.each(['--follow', '-f'])(
|
||||
'streams human summaries with %s without fetching a finite list',
|
||||
async follow => {
|
||||
mockStreamRequestsAsync.mockImplementation(async (_preview, onRequest) => {
|
||||
onRequest(requestSummary);
|
||||
});
|
||||
|
||||
await createCommand([follow, '--timestamp']).runAsync();
|
||||
|
||||
expect(mockStreamRequestsAsync).toHaveBeenCalledWith(
|
||||
preview,
|
||||
expect.any(Function),
|
||||
expect.any(AbortSignal)
|
||||
);
|
||||
expect(mockLog).toHaveBeenCalledWith(
|
||||
'2026-10-05T12:00:00.000Z request-id POST https://example.test/posts 201 50ms'
|
||||
);
|
||||
expect(mockReadRequestsAsync).not.toHaveBeenCalled();
|
||||
expect(mockDownloadCaptureAsync).not.toHaveBeenCalled();
|
||||
expect(mockPrintJsonOnlyOutput).not.toHaveBeenCalled();
|
||||
}
|
||||
);
|
||||
|
||||
it('stops following on Ctrl+C and removes its interrupt handler', async () => {
|
||||
const listeners = process.listeners('SIGINT');
|
||||
let signal: AbortSignal | undefined;
|
||||
mockStreamRequestsAsync.mockImplementation(async (_preview, _onRequest, followSignal) => {
|
||||
signal = followSignal;
|
||||
process.emit('SIGINT');
|
||||
});
|
||||
|
||||
await createCommand(['--follow']).runAsync();
|
||||
|
||||
expect(signal?.aborted).toBe(true);
|
||||
expect(process.listeners('SIGINT')).toEqual(listeners);
|
||||
});
|
||||
|
||||
it.each([
|
||||
{ options: ['--json'] },
|
||||
{ options: ['--limit', '1'] },
|
||||
{ options: ['--request-id', 'r1'] },
|
||||
{ options: ['--output', 'capture.har'] },
|
||||
])('rejects incompatible follow options $options before session access', async ({ options }) => {
|
||||
await expect(createCommand(['--follow', ...options]).runAsync()).rejects.toThrow();
|
||||
|
||||
expect(mockResolvePreviewAsync).not.toHaveBeenCalled();
|
||||
expect(mockStreamRequestsAsync).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('enables JSON output before rejecting JSON follow output', async () => {
|
||||
await expect(createCommand(['--json', '--follow']).runAsync()).rejects.toThrow(
|
||||
'Use either --json or --follow, not both.'
|
||||
);
|
||||
|
||||
expect(mockEnableJsonOutput).toHaveBeenCalled();
|
||||
expect(mockLoadSimulatorEnvAsync).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('prints a full request detail for human output', async () => {
|
||||
mockReadRequestsAsync.mockResolvedValue(request);
|
||||
|
||||
await createCommand(['--request-id', 'request-id']).runAsync();
|
||||
|
||||
expect(mockLog).toHaveBeenCalledWith(JSON.stringify(request, null, 2));
|
||||
expect(mockPrintJsonOnlyOutput).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('explains the initial-launch limitation when the capture is empty', async () => {
|
||||
await createCommand([]).runAsync();
|
||||
|
||||
expect(mockLog).toHaveBeenCalledWith(
|
||||
'No completed network requests were captured. Initial-launch requests may have been missed.'
|
||||
);
|
||||
});
|
||||
|
||||
it('rejects combining a request detail and HAR output before resolving a session', async () => {
|
||||
await expect(
|
||||
createCommand(['--request-id', 'request-id', '--output', './capture.har']).runAsync()
|
||||
).rejects.toThrow();
|
||||
|
||||
expect(mockResolvePreviewAsync).not.toHaveBeenCalled();
|
||||
expect(mockReadRequestsAsync).not.toHaveBeenCalled();
|
||||
expect(mockDownloadCaptureAsync).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('rejects a nonpositive request limit', async () => {
|
||||
await expect(createCommand(['--limit', '0']).runAsync()).rejects.toThrow();
|
||||
|
||||
expect(mockResolvePreviewAsync).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('propagates a missing capture error without printing an empty list', async () => {
|
||||
mockReadRequestsAsync.mockRejectedValue(
|
||||
new Error('No network capture was found. Start the session with --network-capture.')
|
||||
);
|
||||
|
||||
await expect(createCommand([]).runAsync()).rejects.toThrow(
|
||||
'Start the session with --network-capture.'
|
||||
);
|
||||
|
||||
expect(mockLog).not.toHaveBeenCalled();
|
||||
expect(mockPrintJsonOnlyOutput).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('propagates HAR download failures without claiming a file was saved', async () => {
|
||||
mockDownloadCaptureAsync.mockRejectedValue(new Error('The output file already exists.'));
|
||||
|
||||
await expect(createCommand(['--output', './capture.har', '--json']).runAsync()).rejects.toThrow(
|
||||
'The output file already exists.'
|
||||
);
|
||||
|
||||
expect(mockPrintJsonOnlyOutput).not.toHaveBeenCalled();
|
||||
expect(mockLog).not.toHaveBeenCalled();
|
||||
expect(mockReadRequestsAsync).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('fails the spinner when the HAR download fails', async () => {
|
||||
mockDownloadCaptureAsync.mockRejectedValue(new Error('The output file already exists.'));
|
||||
|
||||
await expect(createCommand(['--output', './capture.har']).runAsync()).rejects.toThrow(
|
||||
'The output file already exists.'
|
||||
);
|
||||
|
||||
const spinner = mockOra.mock.results[0].value;
|
||||
expect(spinner.fail).toHaveBeenCalledWith('Failed to save network capture');
|
||||
expect(spinner.succeed).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('stops before reading traffic when there is no simulator session', async () => {
|
||||
delete process.env.EAS_SIMULATOR_SESSION_ID;
|
||||
|
||||
await expect(createCommand([]).runAsync()).rejects.toThrow('No simulator session ID provided.');
|
||||
|
||||
expect(mockResolvePreviewAsync).not.toHaveBeenCalled();
|
||||
expect(mockReadRequestsAsync).not.toHaveBeenCalled();
|
||||
expect(mockDownloadCaptureAsync).not.toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
||||
function createCommand(args: string[]): SimulatorNetworkRequests {
|
||||
const command = new SimulatorNetworkRequests(args, getMockOclifConfig());
|
||||
// @ts-expect-error getContextAsync is protected
|
||||
jest.spyOn(command, 'getContextAsync').mockResolvedValue({
|
||||
loggedIn: { graphqlClient },
|
||||
projectDir,
|
||||
});
|
||||
return command;
|
||||
}
|
||||
@@ -190,6 +190,12 @@ With local egress, actions wait for the connection and require interactive mode.
|
||||
description:
|
||||
'Version of the package backing the simulator session (e.g. "0.1.3-alpha.3"). Defaults to "latest" when omitted.',
|
||||
}),
|
||||
'log-source': Flags.option({
|
||||
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.',
|
||||
options: ['emulator-output', 'device-logcat'],
|
||||
multiple: true,
|
||||
})(),
|
||||
'network-capture': Flags.boolean({
|
||||
allowNo: true,
|
||||
description:
|
||||
@@ -300,6 +306,7 @@ With local egress, actions wait for the connection and require interactive mode.
|
||||
const tags = flags.tag?.map(tag => tag.trim()).filter(tag => tag.length > 0);
|
||||
const deviceIdentifier = flags.device?.trim() || undefined;
|
||||
const systemImagePackage = flags['system-image']?.trim() || undefined;
|
||||
const logSources = flags['log-source'];
|
||||
const buildId = flags['build-id']?.trim() || undefined;
|
||||
const buildFingerprint = flags['build-fingerprint']?.trim() || undefined;
|
||||
const applicationArchiveUrlFromFlag = flags['application-archive-url']?.trim() || undefined;
|
||||
@@ -346,6 +353,11 @@ With local egress, actions wait for the connection and require interactive mode.
|
||||
|
||||
const platform = await resolvePlatformAsync(flags.platform, nonInteractive);
|
||||
const egress = flags.egress === 'local' ? DeviceRunSessionEgress.Local : undefined;
|
||||
if (logSources && platform !== AppPlatform.Android) {
|
||||
throw new EasCommandError(
|
||||
'--log-source selects Android emulator logs. Pass --platform android.'
|
||||
);
|
||||
}
|
||||
if (systemImagePackage && platform !== AppPlatform.Android) {
|
||||
throw new EasCommandError('--system-image is only supported with --platform android.');
|
||||
}
|
||||
@@ -421,6 +433,19 @@ With local egress, actions wait for the connection and require interactive mode.
|
||||
packageVersion: flags['package-version'],
|
||||
nonInteractive,
|
||||
});
|
||||
const android = {
|
||||
...(deviceIdentifier ? { deviceIdentifier } : {}),
|
||||
...(systemImagePackage ? { systemImagePackage } : {}),
|
||||
...(logSources ? { logSources } : {}),
|
||||
};
|
||||
const platformInput =
|
||||
platform === AppPlatform.Ios
|
||||
? deviceIdentifier
|
||||
? { ios: { deviceIdentifier } }
|
||||
: {}
|
||||
: Object.keys(android).length
|
||||
? { android }
|
||||
: {};
|
||||
const session = await withSimulatorRequestAnalyticsAsync(
|
||||
analytics,
|
||||
requestProperties,
|
||||
@@ -436,18 +461,7 @@ With local egress, actions wait for the connection and require interactive mode.
|
||||
packageVersion: flags['package-version'],
|
||||
networkCapture: flags['network-capture'],
|
||||
...(networkCaptureFields.length ? { networkCaptureFields } : {}),
|
||||
...(platform === AppPlatform.Ios
|
||||
? deviceIdentifier
|
||||
? { ios: { deviceIdentifier } }
|
||||
: {}
|
||||
: deviceIdentifier || systemImagePackage
|
||||
? {
|
||||
android: {
|
||||
...(deviceIdentifier ? { deviceIdentifier } : {}),
|
||||
...(systemImagePackage ? { systemImagePackage } : {}),
|
||||
},
|
||||
}
|
||||
: {}),
|
||||
...platformInput,
|
||||
...(buildId ? { buildId } : {}),
|
||||
...(buildFingerprint ? { buildFingerprint } : {}),
|
||||
...(applicationArchiveUrlFromFlag
|
||||
|
||||
@@ -0,0 +1,216 @@
|
||||
import { Flags } from '@oclif/core';
|
||||
import chalk from 'chalk';
|
||||
|
||||
import EasCommand from '../../commandUtils/EasCommand';
|
||||
import {
|
||||
EasNonInteractiveAndJsonFlags,
|
||||
resolveNonInteractiveAndJsonFlags,
|
||||
} from '../../commandUtils/flags';
|
||||
import { DeviceRunSessionQuery } from '../../graphql/queries/DeviceRunSessionQuery';
|
||||
import Log from '../../log';
|
||||
import { downloadSimulatorArtifactAsync, hasSimulatorArtifacts } from '../../simulator/artifacts';
|
||||
import {
|
||||
getSimulatorCommandAliases,
|
||||
getSimulatorCommandHiddenAliases,
|
||||
} from '../../simulator/commandAliases';
|
||||
import { ora } from '../../ora';
|
||||
import {
|
||||
EAS_SIMULATOR_SESSION_ID,
|
||||
SIMULATOR_DOTENV_FILE_NAME,
|
||||
loadSimulatorEnvAsync,
|
||||
} from '../../simulator/env';
|
||||
import {
|
||||
type NetworkRequestSummary,
|
||||
downloadNetworkCaptureAsync,
|
||||
readNetworkRequestsAsync,
|
||||
streamNetworkRequestsAsync,
|
||||
} from '../../simulator/networkRequests';
|
||||
import { resolveSimulatorPreviewAsync } from '../../simulator/preview';
|
||||
import { stripTerminalControlCharacters } from '../../simulator/utils';
|
||||
import { enableJsonOutput, printJsonOnlyOutput } from '../../utils/json';
|
||||
|
||||
export default class SimulatorNetworkRequests extends EasCommand {
|
||||
static override aliases = getSimulatorCommandAliases('network-requests');
|
||||
static override hiddenAliases = getSimulatorCommandHiddenAliases('network-requests');
|
||||
static override description =
|
||||
'[EXPERIMENTAL] inspect completed network requests from a capture-enabled simulator session';
|
||||
|
||||
static override examples = [
|
||||
'<%= config.bin %> simulator:network-requests --json',
|
||||
'<%= config.bin %> simulator:network-requests --follow --timestamp',
|
||||
'<%= config.bin %> simulator:network-requests --request-id r1 --json',
|
||||
'<%= config.bin %> simulator:network-requests --output capture.har',
|
||||
];
|
||||
|
||||
static override flags = {
|
||||
id: Flags.string({
|
||||
description: `Simulator session ID. Defaults to ${SIMULATOR_DOTENV_FILE_NAME}.`,
|
||||
}),
|
||||
artifact: Flags.integer({
|
||||
min: 1,
|
||||
description: 'Artifact index to download from a stopped session (1-based).',
|
||||
}),
|
||||
'request-id': Flags.string({
|
||||
description:
|
||||
'Show a captured request, including the headers and bodies selected for capture.',
|
||||
exclusive: ['output'],
|
||||
}),
|
||||
output: Flags.string({
|
||||
char: 'o',
|
||||
description: 'Save the live HAR or a stopped session capture artifact to this path.',
|
||||
exclusive: ['request-id'],
|
||||
}),
|
||||
follow: Flags.boolean({
|
||||
char: 'f',
|
||||
description: 'Stream completed requests, including those retained by the current capture.',
|
||||
exclusive: ['request-id', 'output', 'limit'],
|
||||
}),
|
||||
limit: Flags.integer({
|
||||
description: 'Maximum number of recent live requests to list without --follow.',
|
||||
default: 100,
|
||||
min: 1,
|
||||
}),
|
||||
timestamp: Flags.boolean({
|
||||
description: 'Show request start timestamps in live human-readable lists.',
|
||||
}),
|
||||
...EasNonInteractiveAndJsonFlags,
|
||||
};
|
||||
|
||||
static override contextDefinition = {
|
||||
...this.ContextOptions.LoggedIn,
|
||||
...this.ContextOptions.ProjectDir,
|
||||
};
|
||||
|
||||
async runAsync(): Promise<void> {
|
||||
// Before parsing, so only the JSON result reaches stdout.
|
||||
if (this.argv.includes('--json')) {
|
||||
enableJsonOutput();
|
||||
}
|
||||
const { flags } = await this.parse(SimulatorNetworkRequests);
|
||||
const { json: jsonFlag, nonInteractive } = resolveNonInteractiveAndJsonFlags(flags);
|
||||
if (jsonFlag && flags.follow) {
|
||||
throw new Error('Use either --json or --follow, not both.');
|
||||
}
|
||||
|
||||
const {
|
||||
projectDir,
|
||||
loggedIn: { graphqlClient },
|
||||
} = await this.getContextAsync(SimulatorNetworkRequests, { nonInteractive });
|
||||
await loadSimulatorEnvAsync(projectDir);
|
||||
const deviceRunSessionId = flags.id ?? process.env[EAS_SIMULATOR_SESSION_ID];
|
||||
if (!deviceRunSessionId) {
|
||||
throw new Error(
|
||||
`No simulator session ID provided. Pass --id, or run \`eas simulator:start\` first to write ${SIMULATOR_DOTENV_FILE_NAME}.`
|
||||
);
|
||||
}
|
||||
const session = await DeviceRunSessionQuery.byIdAsync(graphqlClient, deviceRunSessionId);
|
||||
if (hasSimulatorArtifacts(session)) {
|
||||
if (flags.follow || flags['request-id']) {
|
||||
throw new Error(
|
||||
'The session has stopped. --follow and --request-id are only available while it runs. Use --output <path> to download its capture artifact.'
|
||||
);
|
||||
}
|
||||
await downloadSimulatorArtifactAsync(session, 'network-capture', {
|
||||
artifact: flags.artifact,
|
||||
output: flags.output,
|
||||
nonInteractive,
|
||||
json: jsonFlag,
|
||||
});
|
||||
return;
|
||||
}
|
||||
const preview = await resolveSimulatorPreviewAsync(session);
|
||||
if (flags.artifact !== undefined) {
|
||||
throw new Error(
|
||||
'--artifact is only available for stopped sessions. Use --output <path> to save the live HAR.'
|
||||
);
|
||||
}
|
||||
|
||||
if (flags.follow) {
|
||||
const abortController = new AbortController();
|
||||
const interruptHandler = (): void => {
|
||||
if (abortController.signal.aborted) {
|
||||
process.exit(130);
|
||||
}
|
||||
abortController.abort();
|
||||
};
|
||||
process.on('SIGINT', interruptHandler);
|
||||
try {
|
||||
await streamNetworkRequestsAsync(
|
||||
preview,
|
||||
request => {
|
||||
Log.log(formatRequestSummary(request, flags.timestamp));
|
||||
},
|
||||
abortController.signal
|
||||
);
|
||||
} finally {
|
||||
process.removeListener('SIGINT', interruptHandler);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (flags.output) {
|
||||
const downloadSpinner = jsonFlag ? null : ora('Saving network capture').start();
|
||||
let filePath: string;
|
||||
try {
|
||||
filePath = await downloadNetworkCaptureAsync(preview, flags.output);
|
||||
downloadSpinner?.succeed(`Saved network capture to ${filePath}`);
|
||||
} catch (err) {
|
||||
downloadSpinner?.fail('Failed to save network capture');
|
||||
throw err;
|
||||
}
|
||||
if (jsonFlag) {
|
||||
printJsonOnlyOutput({ deviceRunSessionId: preview.deviceRunSessionId, filePath });
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
const result = await readNetworkRequestsAsync(preview, {
|
||||
limit: flags.limit,
|
||||
requestId: flags['request-id'],
|
||||
});
|
||||
if (jsonFlag) {
|
||||
printJsonOnlyOutput({
|
||||
deviceRunSessionId: preview.deviceRunSessionId,
|
||||
...(Array.isArray(result) ? { requests: result } : { request: result }),
|
||||
});
|
||||
} else if (!Array.isArray(result)) {
|
||||
Log.log(
|
||||
stripTerminalControlCharacters(JSON.stringify(result, null, 2), {
|
||||
keepNewlinesAndTabs: true,
|
||||
})
|
||||
);
|
||||
} else if (result.length === 0) {
|
||||
Log.log(
|
||||
'No completed network requests were captured. Initial-launch requests may have been missed.'
|
||||
);
|
||||
} else {
|
||||
for (const request of result) {
|
||||
Log.log(formatRequestSummary(request, flags.timestamp));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function formatRequestSummary(request: NetworkRequestSummary, timestamp = false): string {
|
||||
let status = String(request.status);
|
||||
if (request.status === 0 || request.status >= 500) {
|
||||
status = chalk.red(status);
|
||||
} else if (request.status >= 400) {
|
||||
status = chalk.yellow(status);
|
||||
} else if (request.status >= 300) {
|
||||
status = chalk.cyan(status);
|
||||
} else if (request.status >= 200) {
|
||||
status = chalk.green(status);
|
||||
}
|
||||
const fields = [
|
||||
chalk.dim(stripTerminalControlCharacters(request.id ?? '-').padEnd(5)),
|
||||
chalk.bold.cyan(stripTerminalControlCharacters(request.method).padEnd(6)),
|
||||
stripTerminalControlCharacters(request.url),
|
||||
status,
|
||||
chalk.dim(`${Math.round(request.duration * 10) / 10}ms`),
|
||||
];
|
||||
if (timestamp) {
|
||||
fields.unshift(chalk.dim(stripTerminalControlCharacters(request.startedDateTime)));
|
||||
}
|
||||
return fields.join(' ');
|
||||
}
|
||||
@@ -105,6 +105,13 @@ export default class WorkflowSsh extends EasCommand {
|
||||
static override description =
|
||||
'[EXPERIMENTAL] open an ssh session on the worker running a workflow job';
|
||||
|
||||
static override usage = 'workflow:ssh [--show-connect] ID';
|
||||
|
||||
static override examples = [
|
||||
'$ eas workflow:ssh <ID> \t # Open an SSH session on the worker. Use the ID in the job logs ("Start SSH session" step)',
|
||||
'$ eas workflow:ssh --show-connect <ID> \t # Print the ssh command to connect, without opening the SSH session',
|
||||
];
|
||||
|
||||
static override strict = false;
|
||||
|
||||
static override flags = {
|
||||
|
||||
+7
@@ -6658,6 +6658,13 @@ export type CreateAndConfigureRepositoryInput = {
|
||||
export type CreateAndroidDeviceRunSessionInput = {
|
||||
/** AVD hardware profile id to use for the emulator (e.g. "pixel_9"). Defaults to "medium_phone". */
|
||||
deviceIdentifier?: InputMaybe<Scalars['String']['input']>;
|
||||
/**
|
||||
* Logs to record during the session and upload afterward: emulator-output and device-logcat. Defaults to
|
||||
* ["emulator-output"]. An empty list disables recording and uploading both sources. Device-wide logcat can contain
|
||||
* credentials and personal data; include device-logcat only when you want to retain it.
|
||||
* Logs are not redacted and use the existing 90-day artifact retention policy.
|
||||
*/
|
||||
logSources?: InputMaybe<Array<Scalars['String']['input']>>;
|
||||
/**
|
||||
* Android SDK system image package to use for the emulator (e.g.
|
||||
* "system-images;android-35;google_apis;x86_64").
|
||||
|
||||
@@ -215,9 +215,10 @@ export const WorkflowJobSshQuery = {
|
||||
throw error;
|
||||
}
|
||||
const build = data.builds.byId;
|
||||
const jobCompleted = FINAL_BUILD_STATUSES.has(build.status);
|
||||
return {
|
||||
sshRequested: build.sshSession !== null,
|
||||
jobCompleted: FINAL_BUILD_STATUSES.has(build.status),
|
||||
sshRequested: build.sshSession !== null || jobCompleted,
|
||||
jobCompleted,
|
||||
session: build.sshSession,
|
||||
};
|
||||
},
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { ExpoGraphqlClient } from '../../../commandUtils/context/contextUtils/createGraphqlClient';
|
||||
import { resolveSshConnectStatus, terminalSshStatusMessage } from '../../../commands/workflow/ssh';
|
||||
import { GraphqlError } from '../../client';
|
||||
import { BuildStatus, JobRunStatus, WorkflowJobStatus } from '../../generated';
|
||||
import { WorkflowJobSshQuery } from '../WorkflowJobSshQuery';
|
||||
@@ -227,6 +228,19 @@ describe(WorkflowJobSshQuery.connectInfoForBuildAsync.name, () => {
|
||||
}
|
||||
);
|
||||
|
||||
it.each([BuildStatus.Errored, BuildStatus.Finished, BuildStatus.Canceled])(
|
||||
'reports the ssh session as ended for a %s build without an sshSession',
|
||||
async status => {
|
||||
const { graphqlClient } = makeClient({ id: 'build-1', status, sshSession: null });
|
||||
|
||||
const sshStatus = resolveSshConnectStatus(
|
||||
await WorkflowJobSshQuery.connectInfoForBuildAsync(graphqlClient, 'build-1')
|
||||
);
|
||||
expect(sshStatus).toBe('ended');
|
||||
expect(terminalSshStatusMessage(sshStatus, 'build-1')).toBe('This ssh session has ended.');
|
||||
}
|
||||
);
|
||||
|
||||
it.each([BuildStatus.New, BuildStatus.InQueue, BuildStatus.PendingCancel])(
|
||||
'treats %s as not completed',
|
||||
async status => {
|
||||
|
||||
@@ -7,6 +7,7 @@ import SimulatorGet from '../../commands/simulator/get';
|
||||
import Simulator from '../../commands/simulator/index';
|
||||
import SimulatorList from '../../commands/simulator/list';
|
||||
import SimulatorLogs from '../../commands/simulator/logs';
|
||||
import SimulatorNetworkRequests from '../../commands/simulator/network-requests';
|
||||
import SimulatorStop from '../../commands/simulator/stop';
|
||||
import { isSimulatorCommandId } from '../commandAliases';
|
||||
|
||||
@@ -20,6 +21,7 @@ describe('simulator command aliases', () => {
|
||||
['get', SimulatorGet],
|
||||
['list', SimulatorList],
|
||||
['logs', SimulatorLogs],
|
||||
['network-requests', SimulatorNetworkRequests],
|
||||
['stop', SimulatorStop],
|
||||
])('runs simulator:%s from every simulator topic alias', (name, command) => {
|
||||
expect(command.aliases).toEqual([`sim:${name}`]);
|
||||
|
||||
@@ -0,0 +1,519 @@
|
||||
import { mkdtemp, readFile, readdir, rm, stat, symlink, writeFile } from 'node:fs/promises';
|
||||
import { createServer } from 'node:http';
|
||||
import { type AddressInfo } from 'node:net';
|
||||
import os from 'node:os';
|
||||
import path from 'node:path';
|
||||
import { Readable } from 'node:stream';
|
||||
|
||||
import { Response } from '../../fetch';
|
||||
import {
|
||||
type NetworkRequest,
|
||||
type NetworkRequestSummary,
|
||||
downloadNetworkCaptureAsync,
|
||||
readNetworkRequestsAsync,
|
||||
streamNetworkRequestsAsync,
|
||||
} from '../networkRequests';
|
||||
import { fetchSimulatorPreviewAsync, streamSimulatorPreviewAsync } from '../preview';
|
||||
|
||||
jest.mock('../preview', () => ({
|
||||
...jest.requireActual('../preview'),
|
||||
fetchSimulatorPreviewAsync: jest.fn(),
|
||||
streamSimulatorPreviewAsync: jest.fn(),
|
||||
}));
|
||||
|
||||
const NOT_ENABLED_MESSAGE =
|
||||
'Network capture is not enabled for this session. Capture must be requested when the session starts. Start a new session with `eas simulator:start --network-capture`.';
|
||||
const preview = {
|
||||
deviceRunSessionId: 'session-id',
|
||||
baseUrl: new URL('https://preview.test'),
|
||||
token: 'secret',
|
||||
};
|
||||
const signal = new AbortController().signal;
|
||||
let directory: string;
|
||||
|
||||
function entry(id: string): NetworkRequest {
|
||||
return {
|
||||
_captureId: id,
|
||||
_captureStartedAt: 123.45,
|
||||
startedDateTime: '2026-10-05T20:54:22.074Z',
|
||||
time: 82,
|
||||
request: { method: 'POST', url: 'https://example.test/posts', bodySize: 0, postData: null },
|
||||
response: { status: 201, bodySize: 12, content: { text: '{"id":101}' } },
|
||||
};
|
||||
}
|
||||
|
||||
function reply(body: string | Readable): void {
|
||||
jest
|
||||
.mocked(fetchSimulatorPreviewAsync)
|
||||
.mockResolvedValue(new Response(typeof body === 'string' ? Readable.from([body]) : body));
|
||||
}
|
||||
|
||||
function rejectOnTimeout(): AbortController {
|
||||
const controller = new AbortController();
|
||||
jest.spyOn(AbortSignal, 'timeout').mockReturnValue(controller.signal);
|
||||
jest.mocked(fetchSimulatorPreviewAsync).mockImplementation(
|
||||
async (_preview, _route, options) =>
|
||||
await new Promise<Response>((_resolve, reject) => {
|
||||
if (options?.signal?.aborted) {
|
||||
reject(new Error('secret remote URL'));
|
||||
}
|
||||
options?.signal?.addEventListener('abort', () => {
|
||||
reject(new Error('secret remote URL'));
|
||||
});
|
||||
})
|
||||
);
|
||||
return controller;
|
||||
}
|
||||
|
||||
function capturedRequest(
|
||||
id: string,
|
||||
startedAt = Date.parse(entry(id).startedDateTime)
|
||||
): {
|
||||
id: string;
|
||||
startedAt: number;
|
||||
method: string;
|
||||
url: string;
|
||||
status: number;
|
||||
durationMs: number;
|
||||
requestBytes: number;
|
||||
responseBytes: number;
|
||||
} {
|
||||
return {
|
||||
id,
|
||||
startedAt,
|
||||
method: 'POST',
|
||||
url: 'https://example.test/posts',
|
||||
status: 201,
|
||||
durationMs: 82,
|
||||
requestBytes: 0,
|
||||
responseBytes: 12,
|
||||
};
|
||||
}
|
||||
|
||||
function streamEvents(events: unknown[]): void {
|
||||
jest.mocked(streamSimulatorPreviewAsync).mockImplementation(async (_preview, _route, onData) => {
|
||||
for (const event of events) {
|
||||
onData(typeof event === 'string' ? event : JSON.stringify(event));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
beforeEach(async () => {
|
||||
jest.clearAllMocks();
|
||||
directory = await mkdtemp(path.join(os.tmpdir(), 'eas-network-requests-test-'));
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
jest.restoreAllMocks();
|
||||
await rm(directory, { recursive: true, force: true });
|
||||
});
|
||||
|
||||
describe(readNetworkRequestsAsync, () => {
|
||||
it('closes a real HTTP response immediately after a malformed capture frame', async () => {
|
||||
let markClosed: () => void = () => {};
|
||||
const closed = new Promise<void>(resolve => {
|
||||
markClosed = resolve;
|
||||
});
|
||||
const server = createServer((_request, response) => {
|
||||
response.writeHead(200, { 'content-type': 'application/x-ndjson' });
|
||||
response.write('malformed-frame\n');
|
||||
const timer = setInterval(() => response.write(' \n'), 10);
|
||||
response.on('close', () => {
|
||||
clearInterval(timer);
|
||||
markClosed();
|
||||
});
|
||||
});
|
||||
await new Promise<void>(resolve => server.listen(0, '127.0.0.1', resolve));
|
||||
jest
|
||||
.mocked(fetchSimulatorPreviewAsync)
|
||||
.mockImplementationOnce(
|
||||
jest.requireActual<typeof import('../preview')>('../preview').fetchSimulatorPreviewAsync
|
||||
);
|
||||
let timeout: NodeJS.Timeout | undefined;
|
||||
try {
|
||||
await expect(
|
||||
readNetworkRequestsAsync(
|
||||
{
|
||||
...preview,
|
||||
baseUrl: new URL(`http://127.0.0.1:${(server.address() as AddressInfo).port}`),
|
||||
},
|
||||
{ limit: 100 }
|
||||
)
|
||||
).rejects.toThrow('Could not read the network capture');
|
||||
await Promise.race([
|
||||
closed,
|
||||
new Promise<void>((_resolve, reject) => {
|
||||
timeout = setTimeout(() => {
|
||||
reject(new Error('The capture connection stayed open.'));
|
||||
}, 1000);
|
||||
}),
|
||||
]);
|
||||
} finally {
|
||||
clearTimeout(timeout);
|
||||
server.closeAllConnections();
|
||||
await new Promise<void>(resolve =>
|
||||
server.close(() => {
|
||||
resolve();
|
||||
})
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
it('keeps recent summaries without retaining captured bodies, including a final line without a newline', async () => {
|
||||
reply([entry('r1'), entry('r2'), entry('r3')].map(value => JSON.stringify(value)).join('\n'));
|
||||
const requests = await readNetworkRequestsAsync(preview, { limit: 2 });
|
||||
expect(fetchSimulatorPreviewAsync).toHaveBeenCalledWith(preview, '/network-capture.ndjson', {
|
||||
signal: expect.any(AbortSignal),
|
||||
notFoundMessage: NOT_ENABLED_MESSAGE,
|
||||
});
|
||||
expect(requests).toEqual(
|
||||
['r2', 'r3'].map(id => ({
|
||||
id,
|
||||
startedAt: 123.45,
|
||||
startedDateTime: '2026-10-05T20:54:22.074Z',
|
||||
method: 'POST',
|
||||
url: 'https://example.test/posts',
|
||||
status: 201,
|
||||
duration: 82,
|
||||
requestSize: 0,
|
||||
responseSize: 12,
|
||||
}))
|
||||
);
|
||||
});
|
||||
|
||||
it('orders snapshots by start date and limits the latest starts rather than completions', async () => {
|
||||
const entries = [
|
||||
{ ...entry('r3'), startedDateTime: '2026-10-05T20:54:24.000Z', _captureStartedAt: 1 },
|
||||
{ ...entry('r1'), startedDateTime: '2026-10-05T20:54:22.000Z', _captureStartedAt: 3 },
|
||||
{ ...entry('r2'), startedDateTime: '2026-10-05T20:54:23.000Z', _captureStartedAt: 2 },
|
||||
];
|
||||
reply(entries.map(value => JSON.stringify(value)).join('\n'));
|
||||
expect(await readNetworkRequestsAsync(preview, { limit: 2 })).toEqual([
|
||||
expect.objectContaining({ id: 'r2' }),
|
||||
expect.objectContaining({ id: 'r3' }),
|
||||
]);
|
||||
|
||||
reply(entries.map(value => JSON.stringify(value)).join('\n'));
|
||||
expect(await readNetworkRequestsAsync(preview, { limit: 1 })).toEqual([
|
||||
expect.objectContaining({ id: 'r3' }),
|
||||
]);
|
||||
});
|
||||
|
||||
it('uses fractional start times and numeric request IDs to order equal start dates', async () => {
|
||||
const entries = [
|
||||
{ ...entry('r10'), _captureStartedAt: 123.45 },
|
||||
{ ...entry('r3'), _captureStartedAt: 123.5 },
|
||||
{ ...entry('r2'), _captureStartedAt: 123.45 },
|
||||
];
|
||||
reply(entries.map(value => JSON.stringify(value)).join('\n'));
|
||||
|
||||
expect(await readNetworkRequestsAsync(preview, { limit: 2 })).toEqual([
|
||||
expect.objectContaining({ id: 'r10' }),
|
||||
expect.objectContaining({ id: 'r3' }),
|
||||
]);
|
||||
});
|
||||
|
||||
it('returns selected captured headers and bodies without depending on the live request buffer', async () => {
|
||||
const request = entry('r1');
|
||||
reply(JSON.stringify(request));
|
||||
expect(await readNetworkRequestsAsync(preview, { limit: 100, requestId: 'r1' })).toEqual(
|
||||
request
|
||||
);
|
||||
});
|
||||
|
||||
it('handles UTF-8 split across chunks', async () => {
|
||||
const bytes = Buffer.from(
|
||||
JSON.stringify({
|
||||
...entry('r1'),
|
||||
request: { ...entry('r1').request, url: 'https://example.test/é' },
|
||||
})
|
||||
);
|
||||
const split = bytes.indexOf(Buffer.from('é')) + 1;
|
||||
reply(Readable.from([bytes.subarray(0, split), bytes.subarray(split)]));
|
||||
const result = await readNetworkRequestsAsync(preview, { limit: 1 });
|
||||
expect(result).toEqual([expect.objectContaining({ url: 'https://example.test/é' })]);
|
||||
});
|
||||
|
||||
it('returns an empty list for an empty capture and reports a missing request', async () => {
|
||||
reply('');
|
||||
expect(await readNetworkRequestsAsync(preview, { limit: 100 })).toEqual([]);
|
||||
reply('');
|
||||
await expect(
|
||||
readNetworkRequestsAsync(preview, { limit: 100, requestId: 'r1' })
|
||||
).rejects.toThrow('not found');
|
||||
});
|
||||
|
||||
it.each([
|
||||
'secret-body',
|
||||
'{"startedDateTime":"secret-body"}',
|
||||
JSON.stringify({ ...entry('r1'), startedDateTime: 'secret-body' }),
|
||||
])('reports malformed data without echoing decrypted traffic %#', async data => {
|
||||
reply(data);
|
||||
const error = readNetworkRequestsAsync(preview, { limit: 100 });
|
||||
await expect(error).rejects.toThrow('Could not read the network capture.');
|
||||
await expect(error).rejects.not.toThrow('secret-body');
|
||||
});
|
||||
|
||||
it('reports a capture deadline', async () => {
|
||||
const controller = rejectOnTimeout();
|
||||
const pending = readNetworkRequestsAsync(preview, { limit: 100 });
|
||||
const rejected = expect(pending).rejects.toThrow('The network capture request timed out.');
|
||||
controller.abort();
|
||||
await rejected;
|
||||
expect(AbortSignal.timeout).toHaveBeenCalledWith(10 * 60_000);
|
||||
});
|
||||
|
||||
it('retains useful request failures', async () => {
|
||||
jest
|
||||
.mocked(fetchSimulatorPreviewAsync)
|
||||
.mockRejectedValue(new Error('Preview API access was refused.'));
|
||||
await expect(readNetworkRequestsAsync(preview, { limit: 100 })).rejects.toThrow(
|
||||
'Preview API access was refused.'
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe(streamNetworkRequestsAsync, () => {
|
||||
it('follows retained completed requests and emits live completions immediately', async () => {
|
||||
const requests: NetworkRequestSummary[] = [];
|
||||
jest
|
||||
.mocked(streamSimulatorPreviewAsync)
|
||||
.mockImplementation(async (_preview, _route, onData) => {
|
||||
onData(JSON.stringify({ type: 'meta', meta: { attachment: 'starting' }, initial: true }));
|
||||
onData(JSON.stringify({ type: 'meta', meta: { attachment: 'capturing' } }));
|
||||
onData(JSON.stringify({ type: 'finished', request: capturedRequest('r1', 1000) }));
|
||||
onData(JSON.stringify({ type: 'finished', request: capturedRequest('r2', 2000) }));
|
||||
onData(JSON.stringify({ type: 'started', request: capturedRequest('r3', 3000) }));
|
||||
onData(JSON.stringify({ type: 'finished', request: capturedRequest('r4', 4000) }));
|
||||
expect(requests.map(request => request.id)).toEqual(['r1', 'r2', 'r4']);
|
||||
onData(
|
||||
JSON.stringify({
|
||||
type: 'finished',
|
||||
request: { ...capturedRequest('r3', 3000), status: null, durationMs: null },
|
||||
})
|
||||
);
|
||||
});
|
||||
|
||||
await streamNetworkRequestsAsync(preview, request => requests.push(request), signal);
|
||||
|
||||
expect(streamSimulatorPreviewAsync).toHaveBeenCalledWith(
|
||||
preview,
|
||||
'/network-capture',
|
||||
expect.any(Function),
|
||||
{ signal, notFoundMessage: NOT_ENABLED_MESSAGE }
|
||||
);
|
||||
expect(fetchSimulatorPreviewAsync).not.toHaveBeenCalled();
|
||||
expect(requests.map(request => request.id)).toEqual(['r1', 'r2', 'r4', 'r3']);
|
||||
expect(requests[3]).toEqual({
|
||||
id: 'r3',
|
||||
startedAt: 3000,
|
||||
startedDateTime: '1970-01-01T00:00:03.000Z',
|
||||
method: 'POST',
|
||||
url: 'https://example.test/posts',
|
||||
status: 0,
|
||||
duration: 0,
|
||||
requestSize: 0,
|
||||
responseSize: 12,
|
||||
});
|
||||
});
|
||||
|
||||
it('keeps following when capture restarts, request IDs are reused, or events are unknown', async () => {
|
||||
streamEvents([
|
||||
{ type: 'meta', meta: { attachment: 'capturing' }, initial: true },
|
||||
{ type: 'session', udid: 'SIM-A' },
|
||||
{ type: 'finished', request: capturedRequest('r1', 1000) },
|
||||
{ type: 'cleared' },
|
||||
{ type: 'meta', meta: { attachment: 'starting' } },
|
||||
{ type: 'started', request: capturedRequest('r1', 2000) },
|
||||
{ type: 'finished', request: capturedRequest('r1', 2000) },
|
||||
{ type: 'evicted', id: 'r1' },
|
||||
{ type: 'finished', request: capturedRequest('r2', 3000) },
|
||||
]);
|
||||
const requests: NetworkRequestSummary[] = [];
|
||||
|
||||
await streamNetworkRequestsAsync(preview, request => requests.push(request), signal);
|
||||
|
||||
expect(requests.map(request => request.startedAt)).toEqual([1000, 2000, 3000]);
|
||||
});
|
||||
|
||||
it.each([
|
||||
['not-enabled', NOT_ENABLED_MESSAGE],
|
||||
[
|
||||
'failed',
|
||||
'The network capture failed. The session reported a capture error. Open the session preview to see the error, or start a new session with `eas simulator:start --network-capture`.',
|
||||
],
|
||||
])(
|
||||
'reports the %s capture state without exposing attachment errors',
|
||||
async (attachment, message) => {
|
||||
streamEvents([
|
||||
{ type: 'meta', meta: { attachment, attachError: 'secret remote URL' }, initial: true },
|
||||
]);
|
||||
|
||||
await expect(streamNetworkRequestsAsync(preview, jest.fn(), signal)).rejects.toEqual(
|
||||
new Error(message)
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
it('stops on capture failure after emitting earlier completed requests', async () => {
|
||||
streamEvents([
|
||||
{ type: 'meta', meta: { attachment: 'capturing' } },
|
||||
{ type: 'finished', request: capturedRequest('r1') },
|
||||
{ type: 'meta', meta: { attachment: 'failed' } },
|
||||
{ type: 'finished', request: capturedRequest('r2') },
|
||||
]);
|
||||
const onRequest = jest.fn();
|
||||
|
||||
await expect(streamNetworkRequestsAsync(preview, onRequest, signal)).rejects.toThrow(
|
||||
'The network capture failed.'
|
||||
);
|
||||
expect(onRequest).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
it('explains when capture is turned off after following has started', async () => {
|
||||
streamEvents([
|
||||
{ type: 'meta', meta: { attachment: 'capturing' }, initial: true },
|
||||
{ type: 'finished', request: capturedRequest('r1', 1000) },
|
||||
{ type: 'meta', meta: { attachment: 'not-enabled' } },
|
||||
]);
|
||||
const onRequest = jest.fn();
|
||||
|
||||
await expect(streamNetworkRequestsAsync(preview, onRequest, signal)).rejects.toThrow(
|
||||
'Network capture was turned off,'
|
||||
);
|
||||
expect(onRequest).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
it.each(['secret-body', '{"type":"finished","request":{"url":"secret-body"}}'])(
|
||||
'reports malformed stream data without echoing decrypted traffic %#',
|
||||
async data => {
|
||||
streamEvents([data]);
|
||||
|
||||
const error = streamNetworkRequestsAsync(preview, jest.fn(), signal);
|
||||
await expect(error).rejects.toThrow('Could not read the network capture stream.');
|
||||
await expect(error).rejects.not.toThrow('secret-body');
|
||||
}
|
||||
);
|
||||
|
||||
it('preserves useful stream setup errors and returns after a clean shared interruption', async () => {
|
||||
jest
|
||||
.mocked(streamSimulatorPreviewAsync)
|
||||
.mockRejectedValueOnce(new Error('The simulator preview is offline.'))
|
||||
.mockResolvedValueOnce();
|
||||
|
||||
await expect(streamNetworkRequestsAsync(preview, jest.fn(), signal)).rejects.toThrow(
|
||||
'The simulator preview is offline.'
|
||||
);
|
||||
await expect(streamNetworkRequestsAsync(preview, jest.fn(), signal)).resolves.toBeUndefined();
|
||||
});
|
||||
});
|
||||
|
||||
describe(downloadNetworkCaptureAsync, () => {
|
||||
it('streams an exact HAR into a private file', async () => {
|
||||
const data = JSON.stringify({ log: { entries: [entry('r1')] } });
|
||||
reply(Readable.from([data.slice(0, 15), data.slice(15)]));
|
||||
const output = path.join(directory, 'capture.har');
|
||||
const oldUmask = process.umask(0);
|
||||
try {
|
||||
expect(await downloadNetworkCaptureAsync(preview, output)).toBe(output);
|
||||
} finally {
|
||||
process.umask(oldUmask);
|
||||
}
|
||||
expect(fetchSimulatorPreviewAsync).toHaveBeenCalledWith(preview, '/network-capture.har', {
|
||||
signal: expect.any(AbortSignal),
|
||||
notFoundMessage: NOT_ENABLED_MESSAGE,
|
||||
});
|
||||
expect(await readFile(output, 'utf8')).toBe(data);
|
||||
expect((await stat(output)).mode & 0o777).toBe(0o600);
|
||||
expect(await readdir(directory)).toEqual(['capture.har']);
|
||||
});
|
||||
|
||||
it('refuses an existing file before requesting the capture', async () => {
|
||||
const output = path.join(directory, 'capture.har');
|
||||
await writeFile(output, 'keep');
|
||||
reply('new capture');
|
||||
await expect(downloadNetworkCaptureAsync(preview, output)).rejects.toThrow('already exists');
|
||||
expect(fetchSimulatorPreviewAsync).not.toHaveBeenCalled();
|
||||
expect(await readFile(output, 'utf8')).toBe('keep');
|
||||
});
|
||||
|
||||
it('does not overwrite a file created during the download', async () => {
|
||||
const output = path.join(directory, 'capture.har');
|
||||
jest.mocked(fetchSimulatorPreviewAsync).mockImplementation(async () => {
|
||||
await writeFile(output, 'created concurrently');
|
||||
return new Response(Readable.from(['new capture']));
|
||||
});
|
||||
|
||||
await expect(downloadNetworkCaptureAsync(preview, output)).rejects.toThrow('already exists');
|
||||
|
||||
expect(await readFile(output, 'utf8')).toBe('created concurrently');
|
||||
expect(await readdir(directory)).toEqual(['capture.har']);
|
||||
});
|
||||
|
||||
it('keeps a file created during a download whose body fails before the file opens', async () => {
|
||||
const output = path.join(directory, 'capture.har');
|
||||
jest.mocked(fetchSimulatorPreviewAsync).mockImplementation(async () => {
|
||||
await writeFile(output, 'created concurrently');
|
||||
const body = new Readable({ read() {} });
|
||||
body.destroy(new Error('secret remote URL'));
|
||||
return new Response(body);
|
||||
});
|
||||
|
||||
await expect(downloadNetworkCaptureAsync(preview, output)).rejects.toThrow();
|
||||
|
||||
expect(await readFile(output, 'utf8')).toBe('created concurrently');
|
||||
});
|
||||
|
||||
it('refuses to write through a dangling symlink', async () => {
|
||||
const output = path.join(directory, 'capture.har');
|
||||
await symlink(path.join(directory, 'missing-target'), output);
|
||||
reply('new capture');
|
||||
|
||||
await expect(downloadNetworkCaptureAsync(preview, output)).rejects.toThrow('already exists');
|
||||
|
||||
expect(await readdir(directory)).toEqual(['capture.har']);
|
||||
});
|
||||
|
||||
it('explains a missing output directory', async () => {
|
||||
reply('capture');
|
||||
await expect(
|
||||
downloadNetworkCaptureAsync(preview, path.join(directory, 'missing', 'capture.har'))
|
||||
).rejects.toThrow('Check that the --output directory exists and is writable,');
|
||||
expect(await readdir(directory)).toEqual([]);
|
||||
});
|
||||
|
||||
it('retains useful request errors without creating a file', async () => {
|
||||
jest
|
||||
.mocked(fetchSimulatorPreviewAsync)
|
||||
.mockRejectedValue(new Error('Start the session with --network-capture.'));
|
||||
await expect(
|
||||
downloadNetworkCaptureAsync(preview, path.join(directory, 'capture.har'))
|
||||
).rejects.toThrow('--network-capture');
|
||||
expect(await readdir(directory)).toEqual([]);
|
||||
});
|
||||
|
||||
it('removes the partial file after a failed transfer', async () => {
|
||||
reply(
|
||||
Readable.from(
|
||||
(async function* () {
|
||||
yield 'partial';
|
||||
throw new Error('secret remote URL');
|
||||
})()
|
||||
)
|
||||
);
|
||||
const error = downloadNetworkCaptureAsync(preview, path.join(directory, 'capture.har'));
|
||||
await expect(error).rejects.toThrow('Could not save the download.');
|
||||
await expect(error).rejects.not.toThrow('secret');
|
||||
expect(await readdir(directory)).toEqual([]);
|
||||
});
|
||||
|
||||
it('reports a download deadline', async () => {
|
||||
const controller = rejectOnTimeout();
|
||||
const pending = downloadNetworkCaptureAsync(preview, path.join(directory, 'capture.har'));
|
||||
const rejected = expect(pending).rejects.toThrow('The download timed out.');
|
||||
controller.abort();
|
||||
await rejected;
|
||||
expect(AbortSignal.timeout).toHaveBeenCalledWith(10 * 60_000);
|
||||
expect(await readdir(directory)).toEqual([]);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,211 @@
|
||||
import readline from 'node:readline';
|
||||
import { z } from 'zod';
|
||||
|
||||
import { downloadSimulatorFileAsync } from './download';
|
||||
import {
|
||||
type SimulatorPreview,
|
||||
fetchSimulatorPreviewAsync,
|
||||
streamSimulatorPreviewAsync,
|
||||
} from './preview';
|
||||
import { type Response } from '../fetch';
|
||||
|
||||
const NETWORK_CAPTURE_TIMEOUT_MS = 10 * 60_000;
|
||||
const NETWORK_CAPTURE_NOT_ENABLED_MESSAGE =
|
||||
'Network capture is not enabled for this session. Capture must be requested when the session starts. Start a new session with `eas simulator:start --network-capture`.';
|
||||
const INVALID_NETWORK_CAPTURE_MESSAGE =
|
||||
'Could not read the network capture. The capture data was incomplete or not in the expected format. Try again.';
|
||||
|
||||
const networkRequestSchema = z.looseObject({
|
||||
_captureId: z.string().optional(),
|
||||
_captureStartedAt: z.number().nullable().optional(),
|
||||
startedDateTime: z.string().refine(value => Number.isFinite(Date.parse(value))),
|
||||
time: z.number(),
|
||||
request: z.looseObject({ method: z.string(), url: z.string(), bodySize: z.number() }),
|
||||
response: z.looseObject({ status: z.number(), bodySize: z.number() }),
|
||||
});
|
||||
const networkCaptureEventSchema = z.union([
|
||||
z.object({
|
||||
type: z.literal('meta'),
|
||||
initial: z.boolean().optional(),
|
||||
meta: z.object({ attachment: z.string().optional() }),
|
||||
}),
|
||||
z.object({
|
||||
type: z.literal('finished'),
|
||||
request: z.object({
|
||||
id: z.string(),
|
||||
startedAt: z.number(),
|
||||
method: z.string(),
|
||||
url: z.string(),
|
||||
status: z.number().nullable(),
|
||||
durationMs: z.number().nullable(),
|
||||
requestBytes: z.number(),
|
||||
responseBytes: z.number(),
|
||||
}),
|
||||
}),
|
||||
// Other events, such as `started` and `cleared`, have nothing to print.
|
||||
z.object({ type: z.string().refine(type => type !== 'meta' && type !== 'finished') }),
|
||||
]);
|
||||
|
||||
export type NetworkRequest = z.infer<typeof networkRequestSchema>;
|
||||
|
||||
export type NetworkRequestSummary = {
|
||||
id: string | null;
|
||||
startedAt: number | null;
|
||||
startedDateTime: string;
|
||||
method: string;
|
||||
url: string;
|
||||
status: number;
|
||||
duration: number;
|
||||
requestSize: number;
|
||||
responseSize: number;
|
||||
};
|
||||
|
||||
function parseJson(text: string): unknown {
|
||||
try {
|
||||
return JSON.parse(text);
|
||||
} catch {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
||||
function compareRequestStarts(a: NetworkRequestSummary, b: NetworkRequestSummary): number {
|
||||
return (
|
||||
Date.parse(a.startedDateTime) - Date.parse(b.startedDateTime) ||
|
||||
(a.startedAt ?? 0) - (b.startedAt ?? 0) ||
|
||||
(a.id ?? '').localeCompare(b.id ?? '', undefined, { numeric: true })
|
||||
);
|
||||
}
|
||||
|
||||
export async function readNetworkRequestsAsync(
|
||||
preview: SimulatorPreview,
|
||||
{ limit, requestId }: { limit: number; requestId?: string }
|
||||
): Promise<NetworkRequestSummary[] | NetworkRequest> {
|
||||
const controller = new AbortController();
|
||||
const signal = AbortSignal.any([
|
||||
controller.signal,
|
||||
AbortSignal.timeout(NETWORK_CAPTURE_TIMEOUT_MS),
|
||||
]);
|
||||
let response: Response | undefined;
|
||||
let lines: readline.Interface | undefined;
|
||||
const requests: NetworkRequestSummary[] = [];
|
||||
let selected: NetworkRequest | undefined;
|
||||
try {
|
||||
response = await fetchSimulatorPreviewAsync(preview, '/network-capture.ndjson', {
|
||||
signal,
|
||||
notFoundMessage: NETWORK_CAPTURE_NOT_ENABLED_MESSAGE,
|
||||
});
|
||||
lines = readline.createInterface({ input: response.body, crlfDelay: Infinity });
|
||||
for await (const line of lines) {
|
||||
if (!line.trim()) {
|
||||
continue;
|
||||
}
|
||||
const result = networkRequestSchema.safeParse(parseJson(line));
|
||||
if (!result.success) {
|
||||
throw new Error(INVALID_NETWORK_CAPTURE_MESSAGE);
|
||||
}
|
||||
const entry = result.data;
|
||||
if (requestId) {
|
||||
if (entry._captureId === requestId) {
|
||||
selected = entry;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
requests.push({
|
||||
id: entry._captureId ?? null,
|
||||
startedAt: entry._captureStartedAt ?? null,
|
||||
startedDateTime: entry.startedDateTime,
|
||||
method: entry.request.method,
|
||||
url: entry.request.url,
|
||||
status: entry.response.status,
|
||||
duration: entry.time,
|
||||
requestSize: entry.request.bodySize,
|
||||
responseSize: entry.response.bodySize,
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
if (signal.aborted) {
|
||||
throw new Error(
|
||||
'The network capture request timed out. The capture did not download within 10 minutes. Run `eas simulator:get` to check that the session is still running, then try again.'
|
||||
);
|
||||
}
|
||||
if (!response) {
|
||||
throw error;
|
||||
}
|
||||
throw new Error(INVALID_NETWORK_CAPTURE_MESSAGE);
|
||||
} finally {
|
||||
lines?.close();
|
||||
response?.body.once('error', () => {});
|
||||
controller.abort();
|
||||
}
|
||||
if (!requestId) {
|
||||
return requests.sort(compareRequestStarts).slice(-limit);
|
||||
}
|
||||
if (!selected) {
|
||||
throw new Error(
|
||||
'The request was not found in the network capture. The ID does not match a completed request in the current capture. Run `eas simulator:network-requests` to see current request IDs.'
|
||||
);
|
||||
}
|
||||
return selected;
|
||||
}
|
||||
|
||||
export async function streamNetworkRequestsAsync(
|
||||
preview: SimulatorPreview,
|
||||
onRequest: (request: NetworkRequestSummary) => void,
|
||||
signal: AbortSignal
|
||||
): Promise<void> {
|
||||
await streamSimulatorPreviewAsync(
|
||||
preview,
|
||||
'/network-capture',
|
||||
data => {
|
||||
const result = networkCaptureEventSchema.safeParse(parseJson(data));
|
||||
if (!result.success) {
|
||||
throw new Error(
|
||||
'Could not read the network capture stream. An event from the session was not in the expected format. Run the command again.'
|
||||
);
|
||||
}
|
||||
const event = result.data;
|
||||
if ('meta' in event) {
|
||||
if (event.meta.attachment === 'not-enabled') {
|
||||
throw new Error(
|
||||
event.initial
|
||||
? NETWORK_CAPTURE_NOT_ENABLED_MESSAGE
|
||||
: 'Network capture was turned off, so the session no longer records requests. Start a new session with `eas simulator:start --network-capture` to capture again.'
|
||||
);
|
||||
}
|
||||
if (event.meta.attachment === 'failed') {
|
||||
throw new Error(
|
||||
'The network capture failed. The session reported a capture error. Open the session preview to see the error, or start a new session with `eas simulator:start --network-capture`.'
|
||||
);
|
||||
}
|
||||
} else if ('request' in event) {
|
||||
const { request } = event;
|
||||
onRequest({
|
||||
id: request.id,
|
||||
startedAt: request.startedAt,
|
||||
startedDateTime: new Date(request.startedAt).toISOString(),
|
||||
method: request.method,
|
||||
url: request.url,
|
||||
status: request.status ?? 0,
|
||||
duration: Math.max(0, request.durationMs ?? 0),
|
||||
requestSize: request.requestBytes,
|
||||
responseSize: request.responseBytes,
|
||||
});
|
||||
}
|
||||
},
|
||||
{ signal, notFoundMessage: NETWORK_CAPTURE_NOT_ENABLED_MESSAGE }
|
||||
);
|
||||
}
|
||||
|
||||
export async function downloadNetworkCaptureAsync(
|
||||
preview: SimulatorPreview,
|
||||
output: string
|
||||
): Promise<string> {
|
||||
return await downloadSimulatorFileAsync(
|
||||
output,
|
||||
async signal =>
|
||||
await fetchSimulatorPreviewAsync(preview, '/network-capture.har', {
|
||||
signal,
|
||||
notFoundMessage: NETWORK_CAPTURE_NOT_ENABLED_MESSAGE,
|
||||
})
|
||||
);
|
||||
}
|
||||
@@ -1,5 +1,15 @@
|
||||
# @expo/eas-json
|
||||
|
||||
## 27.7.2
|
||||
|
||||
No changes in this release.
|
||||
|
||||
## 27.7.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Update `node-forge`, `tar`, `nanoid`, `minimatch`, `joi`, `ajv`, `yaml`, and `zod` to versions with fixes for published security advisories. ([#4847](https://github.com/expo/eas-cli/pull/4847) by [@tchayen](https://github.com/tchayen))
|
||||
|
||||
## 27.7.0
|
||||
|
||||
No changes in this release.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@expo/eas-json",
|
||||
"version": "27.7.0",
|
||||
"version": "27.7.2",
|
||||
"description": "A library for interacting with eas.json",
|
||||
"homepage": "https://github.com/expo/eas-cli",
|
||||
"bugs": "https://github.com/expo/eas-cli/issues",
|
||||
@@ -32,12 +32,12 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/code-frame": "7.23.5",
|
||||
"@expo/eas-build-job": "27.7.0",
|
||||
"@expo/eas-build-job": "27.7.2",
|
||||
"chalk": "4.1.2",
|
||||
"env-string": "1.0.1",
|
||||
"fs-extra": "11.2.0",
|
||||
"golden-fleece": "1.0.9",
|
||||
"joi": "17.11.0",
|
||||
"joi": "17.13.9",
|
||||
"log-symbols": "4.1.0",
|
||||
"semver": "7.5.2",
|
||||
"terminal-link": "2.1.1",
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
# eas-cli-local-build-plugin
|
||||
|
||||
## 27.7.2
|
||||
|
||||
No changes in this release.
|
||||
|
||||
## 27.7.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Update `node-forge`, `tar`, `nanoid`, `minimatch`, `joi`, `ajv`, `yaml`, and `zod` to versions with fixes for published security advisories. ([#4847](https://github.com/expo/eas-cli/pull/4847) by [@tchayen](https://github.com/tchayen))
|
||||
|
||||
## 27.7.0
|
||||
|
||||
No changes in this release.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "eas-cli-local-build-plugin",
|
||||
"version": "27.7.0",
|
||||
"version": "27.7.2",
|
||||
"description": "Tool for running EAS compatible builds on a local machine.",
|
||||
"bugs": "https://github.com/expo/eas-cli/issues",
|
||||
"license": "BUSL-1.1",
|
||||
@@ -26,20 +26,20 @@
|
||||
"clean": "rimraf node_modules dist coverage \"*.tsbuildinfo\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@expo/build-tools": "27.7.0",
|
||||
"@expo/build-tools": "27.7.2",
|
||||
"@expo/bunyan": "^4.0.1",
|
||||
"@expo/eas-build-job": "27.7.0",
|
||||
"@expo/logger": "27.7.0",
|
||||
"@expo/eas-build-job": "27.7.2",
|
||||
"@expo/logger": "27.7.2",
|
||||
"@expo/spawn-async": "^1.7.2",
|
||||
"@expo/turtle-spawn": "27.7.0",
|
||||
"@expo/turtle-spawn": "27.7.2",
|
||||
"chalk": "4.1.2",
|
||||
"env-paths": "^2.2.1",
|
||||
"fs-extra": "^11.2.0",
|
||||
"joi": "^17.13.1",
|
||||
"joi": "^17.13.9",
|
||||
"lodash": "^4.18.1",
|
||||
"nullthrows": "^1.1.1",
|
||||
"semver": "^7.6.2",
|
||||
"tar": "7.5.19",
|
||||
"tar": "7.5.22",
|
||||
"uuid": "^9.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
# @expo/logger
|
||||
|
||||
## 27.7.2
|
||||
|
||||
No changes in this release.
|
||||
|
||||
## 27.7.1
|
||||
|
||||
No changes in this release.
|
||||
|
||||
## 27.7.0
|
||||
|
||||
No changes in this release.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@expo/logger",
|
||||
"version": "27.7.0",
|
||||
"version": "27.7.2",
|
||||
"bugs": "https://github.com/expo/eas-cli/issues",
|
||||
"license": "BUSL-1.1",
|
||||
"author": "Expo <[email protected]>",
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
# @expo/simulator-launcher
|
||||
|
||||
## 27.7.2
|
||||
|
||||
No changes in this release.
|
||||
|
||||
## 27.7.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Update `node-forge`, `tar`, `nanoid`, `minimatch`, `joi`, `ajv`, `yaml`, and `zod` to versions with fixes for published security advisories. ([#4847](https://github.com/expo/eas-cli/pull/4847) by [@tchayen](https://github.com/tchayen))
|
||||
|
||||
## 27.7.0
|
||||
|
||||
No changes in this release.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@expo/simulator-launcher",
|
||||
"version": "27.7.0",
|
||||
"version": "27.7.2",
|
||||
"description": "Launch and claim Simulator sessions on EAS workers",
|
||||
"bugs": "https://github.com/expo/eas-cli/issues",
|
||||
"license": "BUSL-1.1",
|
||||
@@ -34,6 +34,6 @@
|
||||
"semver": "^7.6.2",
|
||||
"ts-jest": "^29.4.12",
|
||||
"typescript": "^6.0.3",
|
||||
"zod": "^4.3.5"
|
||||
"zod": "^4.6.7"
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,15 @@
|
||||
# @expo/steps
|
||||
|
||||
## 27.7.2
|
||||
|
||||
No changes in this release.
|
||||
|
||||
## 27.7.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Update `node-forge`, `tar`, `nanoid`, `minimatch`, `joi`, `ajv`, `yaml`, and `zod` to versions with fixes for published security advisories. ([#4847](https://github.com/expo/eas-cli/pull/4847) by [@tchayen](https://github.com/tchayen))
|
||||
|
||||
## 27.7.0
|
||||
|
||||
No changes in this release.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@expo/steps",
|
||||
"version": "27.7.0",
|
||||
"version": "27.7.2",
|
||||
"bugs": "https://github.com/expo/eas-cli/issues",
|
||||
"license": "BUSL-1.1",
|
||||
"author": "Expo <[email protected]>",
|
||||
@@ -27,18 +27,18 @@
|
||||
"clean": "rimraf node_modules dist coverage \"*.tsbuildinfo\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@expo/eas-build-job": "27.7.0",
|
||||
"@expo/logger": "27.7.0",
|
||||
"@expo/eas-build-job": "27.7.2",
|
||||
"@expo/logger": "27.7.2",
|
||||
"@expo/spawn-async": "^1.7.2",
|
||||
"arg": "^5.0.2",
|
||||
"fast-glob": "^3.3.2",
|
||||
"fs-extra": "^11.2.0",
|
||||
"joi": "^17.13.1",
|
||||
"joi": "^17.13.9",
|
||||
"jsep": "^1.3.8",
|
||||
"lodash.clonedeep": "^4.5.0",
|
||||
"uuid": "^11.1.1",
|
||||
"yaml": "^2.4.3",
|
||||
"zod": "^4.3.5"
|
||||
"yaml": "^2.9.1",
|
||||
"zod": "^4.6.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@jest/globals": "^29.7.0",
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
# @expo/template-file
|
||||
|
||||
## 27.7.2
|
||||
|
||||
No changes in this release.
|
||||
|
||||
## 27.7.1
|
||||
|
||||
No changes in this release.
|
||||
|
||||
## 27.7.0
|
||||
|
||||
No changes in this release.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@expo/template-file",
|
||||
"version": "27.7.0",
|
||||
"version": "27.7.2",
|
||||
"bugs": "https://github.com/expo/eas-cli/issues",
|
||||
"license": "BUSL-1.1",
|
||||
"author": "Expo <[email protected]>",
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
# @expo/turtle-spawn
|
||||
|
||||
## 27.7.2
|
||||
|
||||
No changes in this release.
|
||||
|
||||
## 27.7.1
|
||||
|
||||
No changes in this release.
|
||||
|
||||
## 27.7.0
|
||||
|
||||
No changes in this release.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@expo/turtle-spawn",
|
||||
"version": "27.7.0",
|
||||
"version": "27.7.2",
|
||||
"bugs": "https://github.com/expo/eas-cli/issues",
|
||||
"license": "BUSL-1.1",
|
||||
"author": "Expo <[email protected]>",
|
||||
@@ -25,7 +25,7 @@
|
||||
"clean": "rimraf node_modules dist coverage \"*.tsbuildinfo\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@expo/logger": "27.7.0",
|
||||
"@expo/logger": "27.7.2",
|
||||
"@expo/spawn-async": "^1.7.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
# @expo/vm-tools
|
||||
|
||||
## 27.7.2
|
||||
|
||||
No changes in this release.
|
||||
|
||||
## 27.7.1
|
||||
|
||||
No changes in this release.
|
||||
|
||||
## 27.7.0
|
||||
|
||||
No changes in this release.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@expo/vm-tools",
|
||||
"version": "27.7.0",
|
||||
"version": "27.7.2",
|
||||
"description": "VM startup script loader",
|
||||
"bugs": "https://github.com/expo/eas-cli/issues",
|
||||
"license": "BUSL-1.1",
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
# @expo/worker
|
||||
|
||||
## 27.7.2
|
||||
|
||||
No changes in this release.
|
||||
|
||||
## 27.7.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Update `node-forge`, `tar`, `nanoid`, `minimatch`, `joi`, `ajv`, `yaml`, and `zod` to versions with fixes for published security advisories. ([#4847](https://github.com/expo/eas-cli/pull/4847) by [@tchayen](https://github.com/tchayen))
|
||||
|
||||
## 27.7.0
|
||||
|
||||
No changes in this release.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@expo/worker",
|
||||
"version": "27.7.0",
|
||||
"version": "27.7.2",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"start": "yarn watch",
|
||||
@@ -19,17 +19,17 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/core": "7.24.7",
|
||||
"@expo/build-tools": "27.7.0",
|
||||
"@expo/build-tools": "27.7.2",
|
||||
"@expo/config-plugins": "55.0.7",
|
||||
"@expo/config-types": "55.0.5",
|
||||
"@expo/eas-build-job": "27.7.0",
|
||||
"@expo/logger": "27.7.0",
|
||||
"@expo/eas-build-job": "27.7.2",
|
||||
"@expo/logger": "27.7.2",
|
||||
"@expo/results": "1.0.0",
|
||||
"@expo/rudder-sdk-node": "1.1.1",
|
||||
"@expo/spawn-async": "1.7.2",
|
||||
"@expo/steps": "27.7.0",
|
||||
"@expo/template-file": "27.7.0",
|
||||
"@expo/turtle-spawn": "27.7.0",
|
||||
"@expo/steps": "27.7.2",
|
||||
"@expo/template-file": "27.7.2",
|
||||
"@expo/turtle-spawn": "27.7.2",
|
||||
"@hapi/boom": "10.0.1",
|
||||
"check-disk-space": "3.4.0",
|
||||
"fast-glob": "3.3.2",
|
||||
@@ -45,12 +45,12 @@
|
||||
"node-os-utils": "1.3.7",
|
||||
"nullthrows": "1.1.1",
|
||||
"semver": "7.6.3",
|
||||
"tar": "7.5.19",
|
||||
"tar": "7.5.22",
|
||||
"uuid": "3.4.0",
|
||||
"uuidv7": "1.1.0",
|
||||
"ws": "8.21.1",
|
||||
"xml2js": "0.6.2",
|
||||
"zod": "4.1.8"
|
||||
"zod": "4.6.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/babel__core": "7.20.5",
|
||||
|
||||
@@ -2515,24 +2515,24 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@expo/build-tools@npm:27.7.0, @expo/build-tools@workspace:packages/build-tools":
|
||||
"@expo/build-tools@npm:27.7.2, @expo/build-tools@workspace:packages/build-tools":
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@expo/build-tools@workspace:packages/build-tools"
|
||||
dependencies:
|
||||
"@expo/config": "npm:55.0.10"
|
||||
"@expo/config-plugins": "npm:55.0.7"
|
||||
"@expo/downloader": "npm:27.7.0"
|
||||
"@expo/eas-build-job": "npm:27.7.0"
|
||||
"@expo/downloader": "npm:27.7.2"
|
||||
"@expo/eas-build-job": "npm:27.7.2"
|
||||
"@expo/env": "npm:^0.4.0"
|
||||
"@expo/logger": "npm:27.7.0"
|
||||
"@expo/logger": "npm:27.7.2"
|
||||
"@expo/package-manager": "npm:1.9.10"
|
||||
"@expo/plist": "npm:^0.3.5"
|
||||
"@expo/repack-app": "npm:~0.9.0"
|
||||
"@expo/results": "npm:^1.0.0"
|
||||
"@expo/spawn-async": "npm:1.7.2"
|
||||
"@expo/steps": "npm:27.7.0"
|
||||
"@expo/template-file": "npm:27.7.0"
|
||||
"@expo/turtle-spawn": "npm:27.7.0"
|
||||
"@expo/steps": "npm:27.7.2"
|
||||
"@expo/template-file": "npm:27.7.2"
|
||||
"@expo/turtle-spawn": "npm:27.7.2"
|
||||
"@expo/xcpretty": "npm:^4.4.7"
|
||||
"@ngrok/ngrok": "npm:1.7.0"
|
||||
"@sentry/node": "npm:7.77.0"
|
||||
@@ -2557,13 +2557,13 @@ __metadata:
|
||||
fs-extra: "npm:^11.2.0"
|
||||
gql.tada: "npm:^1.11.3"
|
||||
jest: "npm:^29.7.0"
|
||||
joi: "npm:^17.13.1"
|
||||
joi: "npm:^17.13.9"
|
||||
jose: "npm:5.10.0"
|
||||
lodash: "npm:^4.18.1"
|
||||
memfs: "npm:^4.17.1"
|
||||
nock: "npm:13.4.0"
|
||||
node-fetch: "npm:^2.7.0"
|
||||
node-forge: "npm:^1.3.1"
|
||||
node-forge: "npm:^1.4.3"
|
||||
node-pty: "npm:1.2.0-beta.15"
|
||||
node-stream-zip: "npm:1.15.0"
|
||||
nullthrows: "npm:^1.1.1"
|
||||
@@ -2574,15 +2574,15 @@ __metadata:
|
||||
retry: "npm:^0.13.1"
|
||||
rimraf: "npm:3.0.2"
|
||||
semver: "npm:^7.6.2"
|
||||
tar: "npm:7.5.19"
|
||||
tar: "npm:7.5.22"
|
||||
ts-jest: "npm:^29.4.12"
|
||||
ts-mockito: "npm:^2.6.1"
|
||||
tslib: "npm:^2.6.3"
|
||||
typescript: "npm:^6.0.3"
|
||||
uuid: "npm:^9.0.1"
|
||||
ws: "npm:8.21.1"
|
||||
yaml: "npm:^2.8.1"
|
||||
zod: "npm:^4.3.5"
|
||||
yaml: "npm:^2.9.1"
|
||||
zod: "npm:^4.6.7"
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
@@ -2768,7 +2768,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@expo/downloader@npm:27.7.0, @expo/downloader@workspace:packages/downloader":
|
||||
"@expo/downloader@npm:27.7.2, @expo/downloader@workspace:packages/downloader":
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@expo/downloader@workspace:packages/downloader"
|
||||
dependencies:
|
||||
@@ -2784,31 +2784,31 @@ __metadata:
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
"@expo/eas-build-job@npm:27.7.0, @expo/eas-build-job@workspace:packages/eas-build-job":
|
||||
"@expo/eas-build-job@npm:27.7.2, @expo/eas-build-job@workspace:packages/eas-build-job":
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@expo/eas-build-job@workspace:packages/eas-build-job"
|
||||
dependencies:
|
||||
"@expo/logger": "npm:27.7.0"
|
||||
"@expo/logger": "npm:27.7.2"
|
||||
"@expo/results": "npm:1.0.0"
|
||||
"@expo/turtle-spawn": "npm:27.7.0"
|
||||
"@expo/turtle-spawn": "npm:27.7.2"
|
||||
"@types/jest": "npm:^29.5.12"
|
||||
"@types/node": "npm:22.20.5"
|
||||
jest: "npm:^29.7.0"
|
||||
joi: "npm:^17.13.1"
|
||||
joi: "npm:^17.13.9"
|
||||
rimraf: "npm:3.0.2"
|
||||
semver: "npm:^7.6.2"
|
||||
ts-jest: "npm:^29.4.12"
|
||||
typescript: "npm:^6.0.3"
|
||||
zod: "npm:^4.3.5"
|
||||
zod: "npm:^4.6.7"
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
"@expo/eas-json@npm:27.7.0, @expo/eas-json@workspace:packages/eas-json":
|
||||
"@expo/eas-json@npm:27.7.2, @expo/eas-json@workspace:packages/eas-json":
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@expo/eas-json@workspace:packages/eas-json"
|
||||
dependencies:
|
||||
"@babel/code-frame": "npm:7.23.5"
|
||||
"@expo/eas-build-job": "npm:27.7.0"
|
||||
"@expo/eas-build-job": "npm:27.7.2"
|
||||
"@tsconfig/node22": "npm:22.0.6"
|
||||
"@types/babel__code-frame": "npm:7.0.3"
|
||||
"@types/fs-extra": "npm:11.0.4"
|
||||
@@ -2817,7 +2817,7 @@ __metadata:
|
||||
fs-extra: "npm:11.2.0"
|
||||
golden-fleece: "npm:1.0.9"
|
||||
jest: "npm:29.7.0"
|
||||
joi: "npm:17.11.0"
|
||||
joi: "npm:17.13.9"
|
||||
log-symbols: "npm:4.1.0"
|
||||
memfs: "npm:3.4.13"
|
||||
rimraf: "npm:3.0.2"
|
||||
@@ -2931,7 +2931,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@expo/logger@npm:27.7.0, @expo/logger@workspace:packages/logger":
|
||||
"@expo/logger@npm:27.7.2, @expo/logger@workspace:packages/logger":
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@expo/logger@workspace:packages/logger"
|
||||
dependencies:
|
||||
@@ -3134,7 +3134,7 @@ __metadata:
|
||||
semver: "npm:^7.6.2"
|
||||
ts-jest: "npm:^29.4.12"
|
||||
typescript: "npm:^6.0.3"
|
||||
zod: "npm:^4.3.5"
|
||||
zod: "npm:^4.6.7"
|
||||
bin:
|
||||
simulator-launcher: bin/simulator-launcher
|
||||
languageName: unknown
|
||||
@@ -3149,12 +3149,12 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@expo/steps@npm:27.7.0, @expo/steps@workspace:packages/steps":
|
||||
"@expo/steps@npm:27.7.2, @expo/steps@workspace:packages/steps":
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@expo/steps@workspace:packages/steps"
|
||||
dependencies:
|
||||
"@expo/eas-build-job": "npm:27.7.0"
|
||||
"@expo/logger": "npm:27.7.0"
|
||||
"@expo/eas-build-job": "npm:27.7.2"
|
||||
"@expo/logger": "npm:27.7.2"
|
||||
"@expo/spawn-async": "npm:^1.7.2"
|
||||
"@jest/globals": "npm:^29.7.0"
|
||||
"@types/jest": "npm:^29.5.12"
|
||||
@@ -3166,7 +3166,7 @@ __metadata:
|
||||
fast-glob: "npm:^3.3.2"
|
||||
fs-extra: "npm:^11.2.0"
|
||||
jest: "npm:^29.7.0"
|
||||
joi: "npm:^17.13.1"
|
||||
joi: "npm:^17.13.9"
|
||||
jsep: "npm:^1.3.8"
|
||||
lodash.clonedeep: "npm:^4.5.0"
|
||||
rimraf: "npm:3.0.2"
|
||||
@@ -3175,12 +3175,12 @@ __metadata:
|
||||
ts-node: "npm:^10.9.2"
|
||||
typescript: "npm:^6.0.3"
|
||||
uuid: "npm:^11.1.1"
|
||||
yaml: "npm:^2.4.3"
|
||||
zod: "npm:^4.3.5"
|
||||
yaml: "npm:^2.9.1"
|
||||
zod: "npm:^4.6.7"
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
"@expo/template-file@npm:27.7.0, @expo/template-file@workspace:packages/template-file":
|
||||
"@expo/template-file@npm:27.7.2, @expo/template-file@workspace:packages/template-file":
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@expo/template-file@workspace:packages/template-file"
|
||||
dependencies:
|
||||
@@ -3203,11 +3203,11 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@expo/turtle-spawn@npm:27.7.0, @expo/turtle-spawn@workspace:packages/turtle-spawn":
|
||||
"@expo/turtle-spawn@npm:27.7.2, @expo/turtle-spawn@workspace:packages/turtle-spawn":
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@expo/turtle-spawn@workspace:packages/turtle-spawn"
|
||||
dependencies:
|
||||
"@expo/logger": "npm:27.7.0"
|
||||
"@expo/logger": "npm:27.7.2"
|
||||
"@expo/spawn-async": "npm:^1.7.2"
|
||||
"@types/jest": "npm:^29.5.12"
|
||||
"@types/node": "npm:22.20.5"
|
||||
@@ -3238,17 +3238,17 @@ __metadata:
|
||||
resolution: "@expo/worker@workspace:packages/worker"
|
||||
dependencies:
|
||||
"@babel/core": "npm:7.24.7"
|
||||
"@expo/build-tools": "npm:27.7.0"
|
||||
"@expo/build-tools": "npm:27.7.2"
|
||||
"@expo/config-plugins": "npm:55.0.7"
|
||||
"@expo/config-types": "npm:55.0.5"
|
||||
"@expo/eas-build-job": "npm:27.7.0"
|
||||
"@expo/logger": "npm:27.7.0"
|
||||
"@expo/eas-build-job": "npm:27.7.2"
|
||||
"@expo/logger": "npm:27.7.2"
|
||||
"@expo/results": "npm:1.0.0"
|
||||
"@expo/rudder-sdk-node": "npm:1.1.1"
|
||||
"@expo/spawn-async": "npm:1.7.2"
|
||||
"@expo/steps": "npm:27.7.0"
|
||||
"@expo/template-file": "npm:27.7.0"
|
||||
"@expo/turtle-spawn": "npm:27.7.0"
|
||||
"@expo/steps": "npm:27.7.2"
|
||||
"@expo/template-file": "npm:27.7.2"
|
||||
"@expo/turtle-spawn": "npm:27.7.2"
|
||||
"@hapi/boom": "npm:10.0.1"
|
||||
"@types/babel__core": "npm:7.20.5"
|
||||
"@types/fs-extra": "npm:11.0.4"
|
||||
@@ -3282,14 +3282,14 @@ __metadata:
|
||||
rimraf: "npm:3.0.2"
|
||||
semver: "npm:7.6.3"
|
||||
supertest: "npm:7.2.2"
|
||||
tar: "npm:7.5.19"
|
||||
tar: "npm:7.5.22"
|
||||
ts-jest: "npm:29.4.12"
|
||||
typescript: "npm:6.0.3"
|
||||
uuid: "npm:3.4.0"
|
||||
uuidv7: "npm:1.1.0"
|
||||
ws: "npm:8.21.1"
|
||||
xml2js: "npm:0.6.2"
|
||||
zod: "npm:4.1.8"
|
||||
zod: "npm:4.6.7"
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
@@ -4264,15 +4264,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@hapi/topo@npm:^5.0.0":
|
||||
version: 5.0.0
|
||||
resolution: "@hapi/topo@npm:5.0.0"
|
||||
dependencies:
|
||||
"@hapi/hoek": "npm:^9.0.0"
|
||||
checksum: 10c0/37ddfc19e3e61cb3a0591686a0707fcfe3b965b88d2f1c0291f2b688e28d4f98456087665ecdbe80bd27640e03a68f433909c010f961f95ac69b3028d44a4ca0
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@hapi/topo@npm:^5.1.0":
|
||||
version: 5.1.0
|
||||
resolution: "@hapi/topo@npm:5.1.0"
|
||||
@@ -6492,15 +6483,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@sideway/address@npm:^4.1.3":
|
||||
version: 4.1.3
|
||||
resolution: "@sideway/address@npm:4.1.3"
|
||||
dependencies:
|
||||
"@hapi/hoek": "npm:^9.0.0"
|
||||
checksum: 10c0/d5f1cb09a66577eecd2f3b0b664fc9343218e7d8f2dc6abcc1045911bcc65b474e40825fe278cf05f649dde552e5f37d900691f38e9fc0b48486f3ee5d343b9c
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@sideway/address@npm:^4.1.5":
|
||||
version: 4.1.5
|
||||
resolution: "@sideway/address@npm:4.1.5"
|
||||
@@ -8431,15 +8413,15 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"ajv@npm:8.11.0, ajv@npm:^8.0.0":
|
||||
version: 8.11.0
|
||||
resolution: "ajv@npm:8.11.0"
|
||||
"ajv@npm:8.20.0, ajv@npm:^8.0.0":
|
||||
version: 8.20.0
|
||||
resolution: "ajv@npm:8.20.0"
|
||||
dependencies:
|
||||
fast-deep-equal: "npm:^3.1.1"
|
||||
fast-deep-equal: "npm:^3.1.3"
|
||||
fast-uri: "npm:^3.0.1"
|
||||
json-schema-traverse: "npm:^1.0.0"
|
||||
require-from-string: "npm:^2.0.2"
|
||||
uri-js: "npm:^4.2.2"
|
||||
checksum: 10c0/8a4b1b639a53d52169b94dd1cdd03716fe7bbc1fc676006957ba82497e764f4bd44b92f75e37c8804ea3176ee3c224322e22779d071fb01cd89aefaaa42c9414
|
||||
checksum: 10c0/5df9a1c8f83863cde1bd3a9ddb426f599718f88e3dc9153616c79fb28e0be455335830d7f21d745576519f057b371352daa31047b6a33d7036fe08777d60cf2a
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -9011,21 +8993,21 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"brace-expansion@npm:^5.0.2":
|
||||
version: 5.0.4
|
||||
resolution: "brace-expansion@npm:5.0.4"
|
||||
"brace-expansion@npm:^2.0.2":
|
||||
version: 2.1.7
|
||||
resolution: "brace-expansion@npm:2.1.7"
|
||||
dependencies:
|
||||
balanced-match: "npm:^4.0.2"
|
||||
checksum: 10c0/359cbcfa80b2eb914ca1f3440e92313fbfe7919ee6b274c35db55bec555aded69dac5ee78f102cec90c35f98c20fa43d10936d0cd9978158823c249257e1643a
|
||||
balanced-match: "npm:^1.0.0"
|
||||
checksum: 10c0/17ee4194c85b05cde0a7b7c068eeef664440c027116ef42c3d35c13ebabdc9fd3eaf05c5c8a06dd0ca20ae012d652561d8ac2a699daa5cbee1f0510e5134ab4d
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"brace-expansion@npm:^5.0.5":
|
||||
version: 5.0.7
|
||||
resolution: "brace-expansion@npm:5.0.7"
|
||||
"brace-expansion@npm:^5.0.8":
|
||||
version: 5.0.12
|
||||
resolution: "brace-expansion@npm:5.0.12"
|
||||
dependencies:
|
||||
balanced-match: "npm:^4.0.2"
|
||||
checksum: 10c0/4769109c3c082de178e449a371bcad50d51ab468f644bce2dd9188efe0cf0a080ed102105d7fc8577382cedc45bad7e6443a91bf3d8102264ee8cf927dbaf205
|
||||
checksum: 10c0/a40ac64d3bdb5bb222456514d3633c1f627f03b844f509c69e70f98b78be0ce85e21b44bbfecdd0ddd4cc0855ca4242b41ea96ddccf88c7c3c7a84405474bb3a
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -10141,7 +10123,7 @@ __metadata:
|
||||
resolution: "create-eas-build-function@workspace:packages/create-eas-build-function"
|
||||
dependencies:
|
||||
"@expo/package-manager": "npm:1.9.10"
|
||||
"@expo/steps": "npm:27.7.0"
|
||||
"@expo/steps": "npm:27.7.2"
|
||||
"@jest/globals": "npm:^29.7.0"
|
||||
"@types/jest": "npm:^29.5.12"
|
||||
"@types/node": "npm:22.20.5"
|
||||
@@ -10725,12 +10707,12 @@ __metadata:
|
||||
version: 0.0.0-use.local
|
||||
resolution: "eas-cli-local-build-plugin@workspace:packages/local-build-plugin"
|
||||
dependencies:
|
||||
"@expo/build-tools": "npm:27.7.0"
|
||||
"@expo/build-tools": "npm:27.7.2"
|
||||
"@expo/bunyan": "npm:^4.0.1"
|
||||
"@expo/eas-build-job": "npm:27.7.0"
|
||||
"@expo/logger": "npm:27.7.0"
|
||||
"@expo/eas-build-job": "npm:27.7.2"
|
||||
"@expo/logger": "npm:27.7.2"
|
||||
"@expo/spawn-async": "npm:^1.7.2"
|
||||
"@expo/turtle-spawn": "npm:27.7.0"
|
||||
"@expo/turtle-spawn": "npm:27.7.2"
|
||||
"@types/fs-extra": "npm:^11.0.4"
|
||||
"@types/hapi__joi": "npm:^17.1.14"
|
||||
"@types/lodash": "npm:^4.17.4"
|
||||
@@ -10740,12 +10722,12 @@ __metadata:
|
||||
env-paths: "npm:^2.2.1"
|
||||
fs-extra: "npm:^11.2.0"
|
||||
jest: "npm:^29.7.0"
|
||||
joi: "npm:^17.13.1"
|
||||
joi: "npm:^17.13.9"
|
||||
lodash: "npm:^4.18.1"
|
||||
nullthrows: "npm:^1.1.1"
|
||||
rimraf: "npm:3.0.2"
|
||||
semver: "npm:^7.6.2"
|
||||
tar: "npm:7.5.19"
|
||||
tar: "npm:7.5.22"
|
||||
ts-jest: "npm:^29.4.12"
|
||||
typescript: "npm:^6.0.3"
|
||||
uuid: "npm:^9.0.1"
|
||||
@@ -10784,12 +10766,12 @@ __metadata:
|
||||
"@expo/code-signing-certificates": "npm:0.0.5"
|
||||
"@expo/config": "npm:55.0.10"
|
||||
"@expo/config-plugins": "npm:55.0.7"
|
||||
"@expo/eas-build-job": "npm:27.7.0"
|
||||
"@expo/eas-json": "npm:27.7.0"
|
||||
"@expo/eas-build-job": "npm:27.7.2"
|
||||
"@expo/eas-json": "npm:27.7.2"
|
||||
"@expo/env": "npm:^1.0.0"
|
||||
"@expo/experimentation": "npm:0.0.5"
|
||||
"@expo/json-file": "npm:8.3.3"
|
||||
"@expo/logger": "npm:27.7.0"
|
||||
"@expo/logger": "npm:27.7.2"
|
||||
"@expo/multipart-body-parser": "npm:2.0.0"
|
||||
"@expo/osascript": "npm:2.1.4"
|
||||
"@expo/package-manager": "npm:1.9.10"
|
||||
@@ -10801,7 +10783,7 @@ __metadata:
|
||||
"@expo/results": "npm:1.0.0"
|
||||
"@expo/rudder-sdk-node": "npm:1.1.1"
|
||||
"@expo/spawn-async": "npm:1.7.2"
|
||||
"@expo/steps": "npm:27.7.0"
|
||||
"@expo/steps": "npm:27.7.2"
|
||||
"@expo/timeago.js": "npm:1.0.0"
|
||||
"@graphql-codegen/cli": "npm:6.3.1"
|
||||
"@graphql-codegen/introspection": "npm:5.0.2"
|
||||
@@ -10837,7 +10819,7 @@ __metadata:
|
||||
"@urql/core": "npm:4.0.11"
|
||||
"@urql/exchange-retry": "npm:1.2.0"
|
||||
agent-cli-detector: "npm:0.1.7"
|
||||
ajv: "npm:8.11.0"
|
||||
ajv: "npm:8.20.0"
|
||||
ajv-formats: "npm:2.1.1"
|
||||
axios: "npm:1.18.1"
|
||||
better-opn: "npm:3.0.2"
|
||||
@@ -10867,18 +10849,18 @@ __metadata:
|
||||
invariant: "npm:^2.2.2"
|
||||
jest: "npm:29.7.0"
|
||||
jks-js: "npm:1.1.0"
|
||||
joi: "npm:17.11.0"
|
||||
joi: "npm:17.13.9"
|
||||
keychain: "npm:1.5.0"
|
||||
log-symbols: "npm:4.1.0"
|
||||
memfs: "npm:3.4.13"
|
||||
mime: "npm:3.0.0"
|
||||
minimatch: "npm:5.1.2"
|
||||
minimatch: "npm:5.1.9"
|
||||
minizlib: "npm:3.1.0"
|
||||
mockdate: "npm:3.0.5"
|
||||
nanoid: "npm:3.3.8"
|
||||
nanoid: "npm:3.3.20"
|
||||
nock: "npm:13.4.0"
|
||||
node-fetch: "npm:2.6.7"
|
||||
node-forge: "npm:1.4.0"
|
||||
node-forge: "npm:1.4.3"
|
||||
node-stream-zip: "npm:1.15.0"
|
||||
nullthrows: "npm:1.1.1"
|
||||
open: "npm:8.4.0"
|
||||
@@ -10896,7 +10878,7 @@ __metadata:
|
||||
semver: "npm:7.5.4"
|
||||
set-interval-async: "npm:3.0.3"
|
||||
slash: "npm:3.0.0"
|
||||
tar: "npm:7.5.19"
|
||||
tar: "npm:7.5.22"
|
||||
tar-stream: "npm:3.1.7"
|
||||
terminal-link: "npm:2.1.1"
|
||||
ts-deepmerge: "npm:6.2.0"
|
||||
@@ -10909,8 +10891,8 @@ __metadata:
|
||||
uuid: "npm:11.1.1"
|
||||
wrap-ansi: "npm:7.0.0"
|
||||
ws: "npm:8.21.1"
|
||||
yaml: "npm:2.6.0"
|
||||
zod: "npm:^4.1.3"
|
||||
yaml: "npm:2.9.1"
|
||||
zod: "npm:^4.6.7"
|
||||
bin:
|
||||
eas: ./bin/run
|
||||
languageName: unknown
|
||||
@@ -11378,7 +11360,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"fast-deep-equal@npm:3.1.3, fast-deep-equal@npm:^3.1.1":
|
||||
"fast-deep-equal@npm:3.1.3, fast-deep-equal@npm:^3.1.3":
|
||||
version: 3.1.3
|
||||
resolution: "fast-deep-equal@npm:3.1.3"
|
||||
checksum: 10c0/40dedc862eb8992c54579c66d914635afbec43350afbbe991235fdcb4e3a8d5af1b23ae7e79bef7d4882d0ecee06c3197488026998fb19f72dc95acff1d1b1d0
|
||||
@@ -11484,6 +11466,13 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"fast-uri@npm:^3.0.1":
|
||||
version: 3.1.9
|
||||
resolution: "fast-uri@npm:3.1.9"
|
||||
checksum: 10c0/052757540d8c0bbc16bb124a45b8f5cb5d0932f9b89f019221ee41cdb3cafc1db44b2e809d6b888b87922af3e5560a863124454e9d9193e1fc955887357b5add
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"fast-wrap-ansi@npm:^0.2.0":
|
||||
version: 0.2.2
|
||||
resolution: "fast-wrap-ansi@npm:0.2.2"
|
||||
@@ -14070,29 +14059,16 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"joi@npm:17.11.0":
|
||||
version: 17.11.0
|
||||
resolution: "joi@npm:17.11.0"
|
||||
dependencies:
|
||||
"@hapi/hoek": "npm:^9.0.0"
|
||||
"@hapi/topo": "npm:^5.0.0"
|
||||
"@sideway/address": "npm:^4.1.3"
|
||||
"@sideway/formula": "npm:^3.0.1"
|
||||
"@sideway/pinpoint": "npm:^2.0.0"
|
||||
checksum: 10c0/c41c86fe772828b88fbdbcaef2e41235ccbb107c22523a377f9a2fd39829f203213f37a352589f49d9a9b38bf1c645846defede8b81d8c1f3123117c1a600010
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"joi@npm:^17.13.1":
|
||||
version: 17.13.1
|
||||
resolution: "joi@npm:17.13.1"
|
||||
"joi@npm:17.13.9, joi@npm:^17.13.9":
|
||||
version: 17.13.9
|
||||
resolution: "joi@npm:17.13.9"
|
||||
dependencies:
|
||||
"@hapi/hoek": "npm:^9.3.0"
|
||||
"@hapi/topo": "npm:^5.1.0"
|
||||
"@sideway/address": "npm:^4.1.5"
|
||||
"@sideway/formula": "npm:^3.0.1"
|
||||
"@sideway/pinpoint": "npm:^2.0.0"
|
||||
checksum: 10c0/485627809c5e424fc4af4310e06bc31a34fe10635b0bdbfcc425336db5e06b1da3ff8b35101878ffcbcd94c0187e7134c935fb2d1aeba641c92d7f505e6ffd8d
|
||||
checksum: 10c0/7a52549e8e9d99853d6166b647d102e58197720869aa5339f9b9c1704e471a70918645944a8aa6a9998955dc0a521ffd1580fdb3e9e502b1e2bb88793dd0e50c
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -15296,7 +15272,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"minimatch@npm:10.1.1, minimatch@npm:^10.0.3, minimatch@npm:^10.1.1":
|
||||
"minimatch@npm:10.1.1":
|
||||
version: 10.1.1
|
||||
resolution: "minimatch@npm:10.1.1"
|
||||
dependencies:
|
||||
@@ -15305,7 +15281,16 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"minimatch@npm:2 || 3, minimatch@npm:3.0.4":
|
||||
"minimatch@npm:2 || 3, minimatch@npm:^3.0.4":
|
||||
version: 3.1.5
|
||||
resolution: "minimatch@npm:3.1.5"
|
||||
dependencies:
|
||||
brace-expansion: "npm:^1.1.7"
|
||||
checksum: 10c0/2ecbdc0d33f07bddb0315a8b5afbcb761307a8778b48f0b312418ccbced99f104a2d17d8aca7573433c70e8ccd1c56823a441897a45e384ea76ef401a26ace70
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"minimatch@npm:3.0.4":
|
||||
version: 3.0.4
|
||||
resolution: "minimatch@npm:3.0.4"
|
||||
dependencies:
|
||||
@@ -15323,66 +15308,39 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"minimatch@npm:5.1.2":
|
||||
version: 5.1.2
|
||||
resolution: "minimatch@npm:5.1.2"
|
||||
"minimatch@npm:5.1.9, minimatch@npm:^5.0.1":
|
||||
version: 5.1.9
|
||||
resolution: "minimatch@npm:5.1.9"
|
||||
dependencies:
|
||||
brace-expansion: "npm:^2.0.1"
|
||||
checksum: 10c0/1376e34455e8eb1a493ea648571a0c449b99c44753aa3a562204b68dfea3ebd40193b9132d67c0e4adddeb9311a53173252664aafeba6516e5101c99fb6d0171
|
||||
checksum: 10c0/4202718683815a7288b13e470160a4f9560cf392adef4f453927505817e01ef6b3476ecde13cfcaed17e7326dd3b69ad44eb2daeb19a217c5500f9277893f1d6
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"minimatch@npm:^10.0.0":
|
||||
version: 10.2.5
|
||||
resolution: "minimatch@npm:10.2.5"
|
||||
"minimatch@npm:^10.0.0, minimatch@npm:^10.0.3, minimatch@npm:^10.1.1, minimatch@npm:^10.2.4":
|
||||
version: 10.2.6
|
||||
resolution: "minimatch@npm:10.2.6"
|
||||
dependencies:
|
||||
brace-expansion: "npm:^5.0.5"
|
||||
checksum: 10c0/6bb058bd6324104b9ec2f763476a35386d05079c1f5fe4fbf1f324a25237cd4534d6813ecd71f48208f4e635c1221899bef94c3c89f7df55698fe373aaae20fd
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"minimatch@npm:^10.2.4":
|
||||
version: 10.2.4
|
||||
resolution: "minimatch@npm:10.2.4"
|
||||
dependencies:
|
||||
brace-expansion: "npm:^5.0.2"
|
||||
checksum: 10c0/35f3dfb7b99b51efd46afd378486889f590e7efb10e0f6a10ba6800428cf65c9a8dedb74427d0570b318d749b543dc4e85f06d46d2858bc8cac7e1eb49a95945
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"minimatch@npm:^3.0.4":
|
||||
version: 3.1.2
|
||||
resolution: "minimatch@npm:3.1.2"
|
||||
dependencies:
|
||||
brace-expansion: "npm:^1.1.7"
|
||||
checksum: 10c0/0262810a8fc2e72cca45d6fd86bd349eee435eb95ac6aa45c9ea2180e7ee875ef44c32b55b5973ceabe95ea12682f6e3725cbb63d7a2d1da3ae1163c8b210311
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"minimatch@npm:^5.0.1":
|
||||
version: 5.1.0
|
||||
resolution: "minimatch@npm:5.1.0"
|
||||
dependencies:
|
||||
brace-expansion: "npm:^2.0.1"
|
||||
checksum: 10c0/21c4877438068da0728eeb678107ea716fd3c76fcde713c9d11b01d7d15c276071aa2fecfcd353b970a290cffd572c3ed43e0a64804470ab9ae97717ed13fb18
|
||||
brace-expansion: "npm:^5.0.8"
|
||||
checksum: 10c0/4559a836243b98bd4d17ea9f7edae698717c76399eea7be374f3737f33164e4907f19e9726891ddeb122f750a5a7fa80d2ac43e851d6e5984dc4ff42ec127d3a
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"minimatch@npm:^8.0.2":
|
||||
version: 8.0.4
|
||||
resolution: "minimatch@npm:8.0.4"
|
||||
version: 8.0.7
|
||||
resolution: "minimatch@npm:8.0.7"
|
||||
dependencies:
|
||||
brace-expansion: "npm:^2.0.1"
|
||||
checksum: 10c0/a0a394c356dd5b4cb7f821720841a82fa6f07c9c562c5b716909d1b6ec5e56a7e4c4b5029da26dd256b7d2b3a3f38cbf9ddd8680e887b9b5282b09c05501c1ca
|
||||
checksum: 10c0/46d9dee24174f8a9eadec97ba36cba2e63f1fff8b36324e1825229bd9307ffee7ffd2f5a2749b29ba796eda877cd9c1687f9d1b399a10b290346561f2a8145f8
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"minimatch@npm:^9.0.4":
|
||||
version: 9.0.5
|
||||
resolution: "minimatch@npm:9.0.5"
|
||||
version: 9.0.9
|
||||
resolution: "minimatch@npm:9.0.9"
|
||||
dependencies:
|
||||
brace-expansion: "npm:^2.0.1"
|
||||
checksum: 10c0/de96cf5e35bdf0eab3e2c853522f98ffbe9a36c37797778d2665231ec1f20a9447a7e567cb640901f89e4daaa95ae5d70c65a9e8aa2bb0019b6facbc3c0575ed
|
||||
brace-expansion: "npm:^2.0.2"
|
||||
checksum: 10c0/0b6a58530dbb00361745aa6c8cffaba4c90f551afe7c734830bd95fd88ebf469dd7355a027824ea1d09e37181cfeb0a797fb17df60c15ac174303ac110eb7e86
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -15660,12 +15618,12 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"nanoid@npm:3.3.8":
|
||||
version: 3.3.8
|
||||
resolution: "nanoid@npm:3.3.8"
|
||||
"nanoid@npm:3.3.20":
|
||||
version: 3.3.20
|
||||
resolution: "nanoid@npm:3.3.20"
|
||||
bin:
|
||||
nanoid: bin/nanoid.cjs
|
||||
checksum: 10c0/4b1bb29f6cfebf3be3bc4ad1f1296fb0a10a3043a79f34fbffe75d1621b4318319211cd420549459018ea3592f0d2f159247a6f874911d6d26eaaadda2478120
|
||||
checksum: 10c0/856e8bf3bddb959d65997bd94908be030dbc5e6ed88fb3af2a638e51d1938f4d4f454c7c7231aba340775224f88b8cfd3ce1693c70471bfd05f5b6a2227c0c1e
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -15820,10 +15778,10 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"node-forge@npm:1.4.0, node-forge@npm:^1.2.1, node-forge@npm:^1.3.1":
|
||||
version: 1.4.0
|
||||
resolution: "node-forge@npm:1.4.0"
|
||||
checksum: 10c0/67330a5f1f95257a4c8a93b7d555abe87b5f15e350123aa396c97a21a8ca94f9c6549008eb2c73668a91e0d7e3a905785acbd8f8bd0751c29401292011f8f8e1
|
||||
"node-forge@npm:1.4.3, node-forge@npm:^1.2.1, node-forge@npm:^1.3.1, node-forge@npm:^1.4.3":
|
||||
version: 1.4.3
|
||||
resolution: "node-forge@npm:1.4.3"
|
||||
checksum: 10c0/02202bf144dfb6f9662c21a2fdbc6251cb1e8b6dd7e4016d2bb8c996fb61a46383f7426503e06e3f15014d1b8a3215c32ee5cf22e5023ecd8e6d88b6a41dada0
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -17450,13 +17408,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"punycode@npm:^2.1.0":
|
||||
version: 2.1.1
|
||||
resolution: "punycode@npm:2.1.1"
|
||||
checksum: 10c0/83815ca9b9177f055771f31980cbec7ffaef10257d50a95ab99b4a30f0404846e85fa6887ee1bbc0aaddb7bad6d96e2fa150a016051ff0f6b92be4ad613ddca8
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"pure-rand@npm:^6.0.0":
|
||||
version: 6.0.4
|
||||
resolution: "pure-rand@npm:6.0.4"
|
||||
@@ -19014,16 +18965,16 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"tar@npm:7.5.19, tar@npm:^7.4.3, tar@npm:^7.5.2, tar@npm:^7.5.4":
|
||||
version: 7.5.19
|
||||
resolution: "tar@npm:7.5.19"
|
||||
"tar@npm:7.5.22, tar@npm:^7.4.3, tar@npm:^7.5.2, tar@npm:^7.5.4":
|
||||
version: 7.5.22
|
||||
resolution: "tar@npm:7.5.22"
|
||||
dependencies:
|
||||
"@isaacs/fs-minipass": "npm:^4.0.0"
|
||||
chownr: "npm:^3.0.0"
|
||||
minipass: "npm:^7.1.2"
|
||||
minizlib: "npm:^3.1.0"
|
||||
yallist: "npm:^5.0.0"
|
||||
checksum: 10c0/7022e8cb04a8ceccc0689f2c731743fa2aab2e3c3f559f7dbc37b65ef7d5913049b427284eded2ec0765c5db5ff72dd7939fe2ae15785ff422cef2116c95d798
|
||||
checksum: 10c0/1311f6be85a8157ac4c9147bae43e13923d2a1aae15e4aa1bd5239e4e03d2cf53cfe103dde7f35832fbb4c938b042856bc8e9a0afd29abd05e2d1608788c4fea
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -19879,15 +19830,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"uri-js@npm:^4.2.2":
|
||||
version: 4.2.2
|
||||
resolution: "uri-js@npm:4.2.2"
|
||||
dependencies:
|
||||
punycode: "npm:^2.1.0"
|
||||
checksum: 10c0/883130a63b280644e290f4b34d9ee6cc38477b57904bd39e1e31c33823b1d7897cd410113a2b588f8c0fb32543b43c29aa1569235fd72c57a6a82b595a476ba0
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"urlpattern-polyfill@npm:^10.0.0":
|
||||
version: 10.1.0
|
||||
resolution: "urlpattern-polyfill@npm:10.1.0"
|
||||
@@ -20456,57 +20398,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"yaml@npm:2.6.0":
|
||||
version: 2.6.0
|
||||
resolution: "yaml@npm:2.6.0"
|
||||
bin:
|
||||
yaml: bin.mjs
|
||||
checksum: 10c0/9e74cdb91cc35512a1c41f5ce509b0e93cc1d00eff0901e4ba831ee75a71ddf0845702adcd6f4ee6c811319eb9b59653248462ab94fa021ab855543a75396ceb
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"yaml@npm:^1.7.2":
|
||||
version: 1.10.0
|
||||
resolution: "yaml@npm:1.10.0"
|
||||
checksum: 10c0/04df034f8b250a785d715bce396a1ee78c7f5d937c37dfd1929fb7ab41dccc91ee834af77721763ae547e9b38e22ade5706a2cb8a8ebdd55b6a3612c43b6eb3d
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"yaml@npm:^2.3.1":
|
||||
version: 2.3.1
|
||||
resolution: "yaml@npm:2.3.1"
|
||||
checksum: 10c0/ed4c21a907fb1cd60a25177612fa46d95064a144623d269199817908475fe85bef20fb17406e3bdc175351b6488056a6f84beb7836e8c262646546a0220188e3
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"yaml@npm:^2.4.3":
|
||||
version: 2.4.3
|
||||
resolution: "yaml@npm:2.4.3"
|
||||
bin:
|
||||
yaml: bin.mjs
|
||||
checksum: 10c0/b4a9dea34265f000402c909144ac310be42c4526dfd16dff1aee2b04a0d94051713651c0cd2b0a3d8109266997422120f16a7934629d12f22dc215839ebbeccf
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"yaml@npm:^2.6.0":
|
||||
version: 2.8.0
|
||||
resolution: "yaml@npm:2.8.0"
|
||||
bin:
|
||||
yaml: bin.mjs
|
||||
checksum: 10c0/f6f7310cf7264a8107e72c1376f4de37389945d2fb4656f8060eca83f01d2d703f9d1b925dd8f39852a57034fafefde6225409ddd9f22aebfda16c6141b71858
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"yaml@npm:^2.8.1":
|
||||
version: 2.8.1
|
||||
resolution: "yaml@npm:2.8.1"
|
||||
bin:
|
||||
yaml: bin.mjs
|
||||
checksum: 10c0/7c587be00d9303d2ae1566e03bc5bc7fe978ba0d9bf39cc418c3139d37929dfcb93a230d9749f2cb578b6aa5d9ebebc322415e4b653cb83acd8bc0bc321707f3
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"yaml@npm:^2.9.0":
|
||||
"yaml@npm:2.9.1, yaml@npm:^2.3.1, yaml@npm:^2.6.0, yaml@npm:^2.9.0, yaml@npm:^2.9.1":
|
||||
version: 2.9.1
|
||||
resolution: "yaml@npm:2.9.1"
|
||||
bin:
|
||||
@@ -20515,6 +20407,13 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"yaml@npm:^1.7.2":
|
||||
version: 1.10.3
|
||||
resolution: "yaml@npm:1.10.3"
|
||||
checksum: 10c0/c309ff85a0a569a981d71ab9cf0fef68672a16b9cdf40639d1c3b30034f6cd16ee428602bd6d64ecf006f8c8bee499023cac236538f79898aa99fb5db529a2ed
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"yargs-parser@npm:21.1.1, yargs-parser@npm:^21.1.1":
|
||||
version: 21.1.1
|
||||
resolution: "yargs-parser@npm:21.1.1"
|
||||
@@ -20639,17 +20538,10 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"zod@npm:4.1.8, zod@npm:^4.1.3":
|
||||
version: 4.1.8
|
||||
resolution: "zod@npm:4.1.8"
|
||||
checksum: 10c0/5eae39da09d7bd0564a30dfd2348811e4e2e7dd15955d8f3444f8e196f35e5422b1482eda234b722fafb0738f4a8b718adb042b860936bfdd2cc19cdbdac8a9a
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"zod@npm:^4.1.12, zod@npm:^4.3.5":
|
||||
version: 4.3.5
|
||||
resolution: "zod@npm:4.3.5"
|
||||
checksum: 10c0/5a2db7e59177a3d7e202543f5136cb87b97b047b77c8a3d824098d3fa8b80d3aa40a0a5f296965c3b82dfdccdd05dbbfacce91347f16a39c675680fd7b1ab109
|
||||
"zod@npm:4.6.7, zod@npm:^4.1.12, zod@npm:^4.6.7":
|
||||
version: 4.6.7
|
||||
resolution: "zod@npm:4.6.7"
|
||||
checksum: 10c0/4ce2eb14034317b7254e347ca37b5ad591cf8333147030cf05b9b5d31692d45073f7f2747aa50cf8c6b29012194d2b22978cecc89969cf34a0d18e89d0ee7d7b
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
|
||||
Reference in new issue
Block a user