(params: {
deviceId: string;
appBundleId: string;
startedAt?: number;
simulatorSetPath?: string;
appLogPath: string;
maxEntries: number;
include: NetworkIncludeMode;
maxPayloadChars: number;
maxScanLines: number;
})
| 382 | } |
| 383 | |
| 384 | async function readRecentIosSimulatorNetworkCapture(params: { |
| 385 | deviceId: string; |
| 386 | appBundleId: string; |
| 387 | startedAt?: number; |
| 388 | simulatorSetPath?: string; |
| 389 | appLogPath: string; |
| 390 | maxEntries: number; |
| 391 | include: NetworkIncludeMode; |
| 392 | maxPayloadChars: number; |
| 393 | maxScanLines: number; |
| 394 | }): Promise<IosSimulatorNetworkRecovery | null> { |
| 395 | const recovered = await readRecentIosSimulatorLogShowForBundle({ |
| 396 | deviceId: params.deviceId, |
| 397 | appBundleId: params.appBundleId, |
| 398 | startedAt: params.startedAt, |
| 399 | simulatorSetPath: params.simulatorSetPath, |
| 400 | }); |
| 401 | if (!recovered) { |
| 402 | return null; |
| 403 | } |
| 404 | return { |
| 405 | dump: readRecentNetworkTrafficFromText(recovered.text, { |
| 406 | path: `${params.appLogPath} (simctl log show recovery)`, |
| 407 | backend: 'ios-simulator', |
| 408 | maxEntries: params.maxEntries, |
| 409 | include: params.include, |
| 410 | maxPayloadChars: params.maxPayloadChars, |
| 411 | maxScanLines: params.maxScanLines, |
| 412 | }), |
| 413 | recoveredLineCount: recovered.recoveredLineCount, |
| 414 | }; |
| 415 | } |
| 416 | |
| 417 | function buildNoHttpEntriesNote(device: DeviceInfo): string { |
| 418 | if (isIosFamily(device) && device.kind === 'simulator') { |
no test coverage detected
searching dependent graphs…