@expo/build-tools 23.2.0 → 24.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/common/projectSources.js +4 -2
- package/dist/context.d.ts +2 -0
- package/dist/context.js +2 -0
- package/dist/customBuildContext.d.ts +1 -0
- package/dist/customBuildContext.js +2 -0
- package/dist/generic.js +11 -1
- package/dist/steps/easFunctions.js +2 -0
- package/dist/steps/functions/startAgentDeviceRemoteSession.js +7 -3
- package/dist/steps/functions/startAndroidEmulator.js +21 -0
- package/dist/steps/functions/startAppiumRemoteSession.js +7 -3
- package/dist/steps/functions/startArgentRemoteSession.js +26 -15
- package/dist/steps/functions/startLocalEgress.d.ts +10 -0
- package/dist/steps/functions/startLocalEgress.js +156 -0
- package/dist/steps/functions/startWebPreviewRemoteSession.js +10 -4
- package/dist/steps/functions/uploadToAsc.js +11 -5
- package/dist/steps/utils/appiumCommandSummary.js +3 -0
- package/dist/steps/utils/appiumCommands.generated.d.ts +2 -2
- package/dist/steps/utils/localEgress.d.ts +152 -0
- package/dist/steps/utils/localEgress.js +550 -0
- package/dist/steps/utils/localEgressSession.d.ts +9 -0
- package/dist/steps/utils/localEgressSession.js +40 -0
- package/dist/steps/utils/remoteDeviceRunSession.d.ts +8 -18
- package/dist/steps/utils/remoteDeviceRunSession.js +66 -21
- package/dist/steps/utils/serveSimMetricsRecorder.d.ts +4 -1
- package/dist/steps/utils/serveSimMetricsRecorder.js +14 -6
- package/dist/utils/AndroidEmulatorUtils.d.ts +4 -1
- package/dist/utils/AndroidEmulatorUtils.js +5 -1
- package/dist/utils/logPhase.d.ts +2 -0
- package/dist/utils/logPhase.js +22 -0
- package/package.json +8 -8
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export type BaseDriverAppiumCommand = 'activateApp' | 'activateIMEEngine' | 'active' | 'addAuthCredential' | 'addVirtualAuthenticator' | 'availableIMEEngines' | 'back' | 'clear' | 'clearDevicePosture' | 'click' | 'closeWindow' | 'createNewWindow' | 'createSession' | 'createVirtualPressureSource' | 'createVirtualSensor' | 'deactivateIMEEngine' | 'deleteCookie' | 'deleteCookies' | 'deleteSession' | 'deleteVirtualPressureSource' | 'deleteVirtualSensor' | 'elementDisplayed' | 'elementEnabled' | 'elementSelected' | 'elementShadowRoot' | 'execute' | 'executeAsync' | 'executeCdp' | 'fedCMCancelDialog' | 'fedCMClickDialogButton' | 'fedCMGetAccounts' | 'fedCMGetDialogType' | 'fedCMGetTitle' | 'fedCMResetCooldown' | 'fedCMSelectAccount' | 'fedCMSetDelayEnabled' | 'findElement' | 'findElementFromElement' | 'findElementFromShadowRoot' | 'findElements' | 'findElementsFromElement' | 'findElementsFromShadowRoot' | 'forward' | 'fullScreenWindow' | 'generateTestReport' | 'getActiveIMEEngine' | 'getAlertText' | 'getAppiumSessionCapabilities' | 'getAppiumSessions' | 'getAttribute' | 'getAuthCredential' | 'getComputedLabel' | 'getComputedRole' | 'getContexts' | 'getCookie' | 'getCookies' | 'getCssProperty' | 'getCurrentContext' | 'getDeviceTime' | 'getElementRect' | 'getElementScreenshot' | 'getGeoLocation' | 'getGlobalPrivacyControl' | 'getLog' | 'getLogEvents' | 'getLogTypes' | 'getName' | 'getNetworkConnection' | 'getOrientation' | 'getPageSource' | 'getProperty' | 'getRotation' | 'getScreenshot' | 'getSession' | 'getSettings' | 'getStatus' | 'getText' | 'getTimeouts' | 'getUrl' | 'getVirtualSensorInfo' | 'getWindowHandle' | 'getWindowHandles' | 'getWindowRect' | 'hideKeyboard' | 'installApp' | 'isAppInstalled' | 'isIMEActivated' | 'isKeyboardShown' | 'listCommands' | 'listExtensions' | 'logCustomEvent' | 'maximizeWindow' | 'minimizeWindow' | 'performActions' | 'postAcceptAlert' | 'postDismissAlert' | 'printPage' | 'pullFile' | 'pullFolder' | 'pushFile' | 'queryAppState' | 'receiveAsyncResponse' | 'refresh' | 'releaseActions' | 'removeAllAuthCredentials' | 'removeApp' | 'removeAuthCredential' | 'removeVirtualAuthenticator' | 'setAlertText' | 'setContext' | 'setCookie' | 'setDevicePosture' | 'setFrame' | 'setGeoLocation' | 'setGlobalPrivacyControl' | 'setNetworkConnection' | 'setOrientation' | 'setPermissions' | 'setRPHRegistrationMode' | 'setRotation' | 'setSPCTransactionMode' | 'setStorageAccess' | 'setUrl' | 'setUserAuthVerified' | 'setValue' | 'setWindow' | 'setWindowRect' | 'switchToParentFrame' | 'terminateApp' | 'timeouts' | 'title' | 'updateSettings' | 'updateVirtualPressureSource' | 'updateVirtualSensorReading';
|
|
2
|
-
export type XCUITestAppiumCommand = 'asyncScriptTimeout' | 'background' | 'closeApp' | 'disableConditionInducer' | 'enableConditionInducer' | 'getClipboard' | 'getLocation' | 'getLocationInView' | 'getScreenInfo' | 'getSize' | 'getStrings' | 'getViewportRect' | 'getViewportScreenshot' | 'getWindowSize' | 'implicitWait' | 'isLocked' | 'keys' | 'launchApp' | 'listConditionInducers' | 'lock' | 'mobileActivateApp' | 'mobileCalibrateWebToRealCoordinatesTranslation' | 'mobileClearApp' | 'mobileClearKeychains' | 'mobileConfigureLocalization' | 'mobileDeepLink' | 'mobileDeleteFile' | 'mobileDeleteFolder' | 'mobileDisableVoiceOver' | 'mobileDoubleTap' | 'mobileDragFromToForDuration' | 'mobileDragFromToWithVelocity' | 'mobileEnableVoiceOver' | 'mobileEnrollBiometric' | 'mobileExpectNotification' | 'mobileForcePress' | 'mobileGetActiveAppInfo' | 'mobileGetAppearance' | 'mobileGetBatteryInfo' | 'mobileGetContentSize' | 'mobileGetContexts' | 'mobileGetDeviceInfo' | 'mobileGetDeviceTime' | 'mobileGetIncreaseContrast' | 'mobileGetPasteboard' | 'mobileGetPermission' | 'mobileGetSimulatedLocation' | 'mobileGetSource' | 'mobileGetXctestScreenRecordingInfo' | 'mobileHandleAlert' | 'mobileHideKeyboard' | 'mobileInstallApp' | 'mobileInstallCertificate' | 'mobileInstallXCTestBundle' | 'mobileIsAppInstalled' | 'mobileIsBiometricEnrolled' | 'mobileIsVoiceOverEnabled' | 'mobileKeys' | 'mobileKillApp' | 'mobileLaunchApp' | 'mobileListApps' | 'mobileListCertificates' | 'mobileListXCTestBundles' | 'mobilePerformAccessibilityAudit' | 'mobilePerformHandGesture' | 'mobilePerformIndigoHidEvent' | 'mobilePerformIoHidEvent' | 'mobilePinch' | 'mobilePressButton' | 'mobilePullFile' | 'mobilePullFolder' | 'mobilePushFile' | 'mobilePushNotification' | 'mobileQueryAppState' | 'mobileRemoveApp' | 'mobileRemoveCertificate' | 'mobileResetLocationService' | 'mobileResetPermission' | 'mobileResetSimulatedLocation' | 'mobileRotateDigitalCrown' | 'mobileRotateElement' | 'mobileRunXCTest' | 'mobileScroll' | 'mobileScrollToElement' | 'mobileSelectPickerWheelValue' | 'mobileSendBiometricMatch' | 'mobileSendMemoryWarning' | 'mobileSetAppearance' | 'mobileSetContentSize' | 'mobileSetIncreaseContrast' | 'mobileSetPasteboard' | 'mobileSetPermissions' | 'mobileSetSimulatedLocation' | 'mobileShake' | 'mobileSimctl' | 'mobileSiriCommand' | 'mobileStartLogsBroadcast' | 'mobileStartNetworkMonitor' | 'mobileStartPerfRecord' | 'mobileStartScreenRecording' | 'mobileStartSystemMonitor' | 'mobileStartXctestScreenRecording' | 'mobileStopLogsBroadcast' | 'mobileStopNetworkMonitor' | 'mobileStopPerfRecord' | 'mobileStopScreenRecording' | 'mobileStopSystemMonitor' | 'mobileStopXctestScreenRecording' | 'mobileSwipe' | 'mobileTap' | 'mobileTapWithNumberOfTaps' | 'mobileTerminateApp' | 'mobileTouchAndHold' | 'mobileTwoFingerTap' | 'mobileUpdateSafariPreferences' | 'mobileVoiceOverCurrentSpeech' | 'mobileVoiceOverMove' | 'reset' | 'setClipboard' | 'setValueImmediate' | 'startAudioRecording' | 'startRecordingScreen' | 'stopAudioRecording' | 'stopRecordingScreen' | 'submit' | 'toggleEnrollTouchId' | 'touchId' | 'unlock';
|
|
3
|
-
export type UiAutomator2AppiumCommand = 'background' | 'fingerprint' | 'getClipboard' | 'getCurrentActivity' | 'getCurrentPackage' | 'getDisplayDensity' | 'getLocation' | 'getLocationInView' | 'getPerformanceData' | 'getPerformanceDataTypes' | 'getSize' | 'getStrings' | 'getSystemBars' | 'getWindowSize' | 'gsmCall' | 'gsmSignal' | 'gsmVoice' | 'implicitWait' | 'isLocationServicesEnabled' | 'isLocked' | 'keyevent' | 'keys' | 'lock' | 'longPressKeyCode' | 'mobileAcceptAlert' | 'mobileBackgroundApp' | 'mobileBluetooth' | 'mobileBroadcast' | 'mobileChangePermissions' | 'mobileClearApp' | 'mobileClickGesture' | 'mobileDeepLink' | 'mobileDeleteFile' | 'mobileDeviceidle' | 'mobileDismissAlert' | 'mobileDoubleClickGesture' | 'mobileDragGesture' | 'mobileExecEmuConsoleCommand' | 'mobileFingerprint' | 'mobileFlingGesture' | 'mobileGetActionHistory' | 'mobileGetBatteryInfo' | 'mobileGetChromeCapabilities' | 'mobileGetConnectivity' | 'mobileGetContexts' | 'mobileGetDeclaredOrientation' | 'mobileGetDeviceInfo' | 'mobileGetDeviceTime' | 'mobileGetGeolocation' | 'mobileGetNotifications' | 'mobileGetPerformanceData' | 'mobileGetPermissions' | 'mobileGetUiMode' | 'mobileGsmCall' | 'mobileGsmSignal' | 'mobileGsmVoice' | 'mobileInjectEmulatorCameraImage' | 'mobileInstallApp' | 'mobileInstallMultipleApks' | 'mobileIsAppInstalled' | 'mobileIsMediaProjectionRecordingRunning' | 'mobileListApps' | 'mobileListDisplays' | 'mobileListSms' | 'mobileListWindows' | 'mobileLongClickGesture' | 'mobileNetworkSpeed' | 'mobileNfc' | 'mobilePerformEditorAction' | 'mobilePerformStatusBarCommand' | 'mobilePinchCloseGesture' | 'mobilePinchOpenGesture' | 'mobilePowerAc' | 'mobilePowerCapacity' | 'mobilePressKey' | 'mobileRefreshGpsCache' | 'mobileRemoveApp' | 'mobileReplaceElementValue' | 'mobileResetAccessibilityCache' | 'mobileResetGeolocation' | 'mobileScheduleAction' | 'mobileScreenshots' | 'mobileScroll' | 'mobileScrollBackTo' | 'mobileScrollGesture' | 'mobileSendSms' | 'mobileSendTrimMemory' | 'mobileSetConnectivity' | 'mobileSetGeolocation' | 'mobileSetUiMode' | 'mobileShell' | 'mobileStartActivity' | 'mobileStartLogsBroadcast' | 'mobileStartMediaProjectionRecording' | 'mobileStartScreenStreaming' | 'mobileStartService' | 'mobileStopLogsBroadcast' | 'mobileStopMediaProjectionRecording' | 'mobileStopScreenStreaming' | 'mobileStopService' | 'mobileSwipeGesture' | 'mobileTerminateApp' | 'mobileType' | 'mobileUnlock' | 'mobileUnscheduleAction' | 'mobileViewPortRect' | 'mobileViewportScreenshot' | 'networkSpeed' | 'openNotifications' | 'powerAC' | 'powerCapacity' | 'pressKeyCode' | 'replaceValue' | 'sendSMS' | 'sensorSet' | 'setClipboard' | 'setStylusHandwriting' | 'setValueImmediate' | 'startActivity' | 'startRecordingScreen' | 'stopRecordingScreen' | 'toggleData' | 'toggleFlightMode' | 'toggleLocationServices' | 'toggleWiFi' | 'unlock';
|
|
2
|
+
export type XCUITestAppiumCommand = 'asyncScriptTimeout' | 'background' | 'closeApp' | 'disableConditionInducer' | 'enableConditionInducer' | 'getClipboard' | 'getLocation' | 'getLocationInView' | 'getScreenInfo' | 'getSize' | 'getStrings' | 'getViewportRect' | 'getViewportScreenshot' | 'getWindowSize' | 'implicitWait' | 'isLocked' | 'keys' | 'launchApp' | 'listConditionInducers' | 'lock' | 'mobileActivateApp' | 'mobileCalibrateWebToRealCoordinatesTranslation' | 'mobileClearApp' | 'mobileClearKeychains' | 'mobileConfigureLocalization' | 'mobileDeepLink' | 'mobileDeleteFile' | 'mobileDeleteFolder' | 'mobileDisableVoiceOver' | 'mobileDoubleTap' | 'mobileDragFromToForDuration' | 'mobileDragFromToWithVelocity' | 'mobileEnableVoiceOver' | 'mobileEnrollBiometric' | 'mobileExpectNotification' | 'mobileForcePress' | 'mobileGetActiveAppInfo' | 'mobileGetAppearance' | 'mobileGetBatteryInfo' | 'mobileGetContentSize' | 'mobileGetContexts' | 'mobileGetDeviceInfo' | 'mobileGetDeviceTime' | 'mobileGetIncreaseContrast' | 'mobileGetPasteboard' | 'mobileGetPermission' | 'mobileGetSimulatedLocation' | 'mobileGetSource' | 'mobileGetXctestScreenRecordingInfo' | 'mobileHandleAlert' | 'mobileHideKeyboard' | 'mobileInstallApp' | 'mobileInstallCertificate' | 'mobileInstallXCTestBundle' | 'mobileIsAppInstalled' | 'mobileIsBiometricEnrolled' | 'mobileIsVoiceOverEnabled' | 'mobileKeys' | 'mobileKillApp' | 'mobileLaunchApp' | 'mobileListApps' | 'mobileListCertificates' | 'mobileListXCTestBundles' | 'mobilePerformAccessibilityAudit' | 'mobilePerformHandGesture' | 'mobilePerformIndigoHidEvent' | 'mobilePerformIoHidEvent' | 'mobilePinch' | 'mobilePressButton' | 'mobilePullFile' | 'mobilePullFolder' | 'mobilePushFile' | 'mobilePushNotification' | 'mobileQueryAppState' | 'mobileRemoveApp' | 'mobileRemoveCertificate' | 'mobileResetLocationService' | 'mobileResetPermission' | 'mobileResetSimulatedLocation' | 'mobileRotateDigitalCrown' | 'mobileRotateElement' | 'mobileRunXCTest' | 'mobileScroll' | 'mobileScrollToElement' | 'mobileSelectPickerWheelValue' | 'mobileSendBiometricMatch' | 'mobileSendMemoryWarning' | 'mobileSetAppearance' | 'mobileSetContentSize' | 'mobileSetIncreaseContrast' | 'mobileSetPasteboard' | 'mobileSetPermissions' | 'mobileSetSimulatedLocation' | 'mobileShake' | 'mobileSimctl' | 'mobileSiriCommand' | 'mobileStartAutomationSession' | 'mobileStartLogsBroadcast' | 'mobileStartNetworkMonitor' | 'mobileStartPerfRecord' | 'mobileStartScreenRecording' | 'mobileStartSystemMonitor' | 'mobileStartXctestScreenRecording' | 'mobileStopAutomationSession' | 'mobileStopLogsBroadcast' | 'mobileStopNetworkMonitor' | 'mobileStopPerfRecord' | 'mobileStopScreenRecording' | 'mobileStopSystemMonitor' | 'mobileStopXctestScreenRecording' | 'mobileSwipe' | 'mobileTap' | 'mobileTapWithNumberOfTaps' | 'mobileTerminateApp' | 'mobileTouchAndHold' | 'mobileTwoFingerTap' | 'mobileUpdateSafariPreferences' | 'mobileVoiceOverCurrentSpeech' | 'mobileVoiceOverMove' | 'reset' | 'setClipboard' | 'setValueImmediate' | 'startAudioRecording' | 'startRecordingScreen' | 'stopAudioRecording' | 'stopRecordingScreen' | 'submit' | 'toggleEnrollTouchId' | 'touchId' | 'unlock';
|
|
3
|
+
export type UiAutomator2AppiumCommand = 'background' | 'fingerprint' | 'getClipboard' | 'getCurrentActivity' | 'getCurrentPackage' | 'getDisplayDensity' | 'getLocation' | 'getLocationInView' | 'getPerformanceData' | 'getPerformanceDataTypes' | 'getSize' | 'getStrings' | 'getSystemBars' | 'getWindowSize' | 'gsmCall' | 'gsmSignal' | 'gsmVoice' | 'implicitWait' | 'isLocationServicesEnabled' | 'isLocked' | 'keyevent' | 'keys' | 'lock' | 'longPressKeyCode' | 'mobileAcceptAlert' | 'mobileBackgroundApp' | 'mobileBluetooth' | 'mobileBroadcast' | 'mobileChangePermissions' | 'mobileClearApp' | 'mobileClickGesture' | 'mobileDeepLink' | 'mobileDeleteFile' | 'mobileDeviceidle' | 'mobileDismissAlert' | 'mobileDoubleClickGesture' | 'mobileDragGesture' | 'mobileExecEmuConsoleCommand' | 'mobileFingerprint' | 'mobileFlingGesture' | 'mobileGetActionHistory' | 'mobileGetBatteryInfo' | 'mobileGetChromeCapabilities' | 'mobileGetConnectivity' | 'mobileGetContexts' | 'mobileGetDeclaredOrientation' | 'mobileGetDeviceInfo' | 'mobileGetDeviceTime' | 'mobileGetGeolocation' | 'mobileGetNotifications' | 'mobileGetPerformanceData' | 'mobileGetPermissions' | 'mobileGetUiMode' | 'mobileGsmCall' | 'mobileGsmSignal' | 'mobileGsmVoice' | 'mobileInjectEmulatorCameraImage' | 'mobileInstallApp' | 'mobileInstallMultipleApks' | 'mobileIsAppInstalled' | 'mobileIsMediaProjectionRecordingRunning' | 'mobileListApps' | 'mobileListDisplays' | 'mobileListSms' | 'mobileListWindows' | 'mobileLongClickGesture' | 'mobileNetworkSpeed' | 'mobileNfc' | 'mobilePerformEditorAction' | 'mobilePerformStatusBarCommand' | 'mobilePinchCloseGesture' | 'mobilePinchOpenGesture' | 'mobilePowerAc' | 'mobilePowerCapacity' | 'mobilePressKey' | 'mobileRefreshGpsCache' | 'mobileRemoveApp' | 'mobileReplaceElementValue' | 'mobileResetAccessibilityCache' | 'mobileResetGeolocation' | 'mobileScheduleAction' | 'mobileScreenshots' | 'mobileScroll' | 'mobileScrollBackTo' | 'mobileScrollGesture' | 'mobileSendSms' | 'mobileSendTrimMemory' | 'mobileSetConnectivity' | 'mobileSetGeolocation' | 'mobileSetUiMode' | 'mobileShell' | 'mobileStartActivity' | 'mobileStartLogsBroadcast' | 'mobileStartMediaProjectionRecording' | 'mobileStartScreenStreaming' | 'mobileStartService' | 'mobileStopLogsBroadcast' | 'mobileStopMediaProjectionRecording' | 'mobileStopScreenStreaming' | 'mobileStopService' | 'mobileSwipeGesture' | 'mobileTerminateApp' | 'mobileType' | 'mobileUnlock' | 'mobileUnscheduleAction' | 'mobileViewPortRect' | 'mobileViewportElementRect' | 'mobileViewportScreenshot' | 'networkSpeed' | 'openNotifications' | 'powerAC' | 'powerCapacity' | 'pressKeyCode' | 'replaceValue' | 'sendSMS' | 'sensorSet' | 'setClipboard' | 'setStylusHandwriting' | 'setValueImmediate' | 'startActivity' | 'startRecordingScreen' | 'stopRecordingScreen' | 'toggleData' | 'toggleFlightMode' | 'toggleLocationServices' | 'toggleWiFi' | 'unlock';
|
|
4
4
|
export type AppiumCommand = BaseDriverAppiumCommand | XCUITestAppiumCommand | UiAutomator2AppiumCommand;
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { bunyan } from '@expo/logger';
|
|
2
|
+
import { BuildStepEnv } from '@expo/steps';
|
|
3
|
+
import { type DetachedProcessHandle } from './remoteDeviceRunSession';
|
|
4
|
+
/**
|
|
5
|
+
* Local egress provides an HTTP(S) proxy through the machine running the EAS CLI.
|
|
6
|
+
* Requests that use this proxy exit through that machine's network.
|
|
7
|
+
*
|
|
8
|
+
* Worker side: a chisel server in reverse mode listens on loopback and is exposed
|
|
9
|
+
* through the session's ngrok domain. When the CLI's egress client connects, chisel
|
|
10
|
+
* opens LOCAL_EGRESS_PROXY_PORT on this host and forwards every connection to the
|
|
11
|
+
* HTTP proxy the CLI runs. The macOS system proxy points at that port. Until the
|
|
12
|
+
* client connects, nothing listens on the port and proxied requests fail.
|
|
13
|
+
*
|
|
14
|
+
* Contract: HTTP(S) and WebSocket requests that honor the system proxy (WebKit,
|
|
15
|
+
* URLSession and other CFNetwork clients) exit from the egress client's network
|
|
16
|
+
* and fail while the client is disconnected. Requests from libraries that bypass
|
|
17
|
+
* the system proxy are not covered and exit from this host. Nothing here enforces
|
|
18
|
+
* routing; the session monitor reports such direct connections instead.
|
|
19
|
+
*/
|
|
20
|
+
export declare const LOCAL_EGRESS_PROXY_HOST = "127.0.0.1";
|
|
21
|
+
export declare const LOCAL_EGRESS_PROXY_PORT = 8899;
|
|
22
|
+
export declare const LOCAL_EGRESS_USERNAME = "eas";
|
|
23
|
+
export declare const LOCAL_EGRESS_HANDOFF_PATH: string;
|
|
24
|
+
export declare const CHISEL_VERSION = "1.12.0";
|
|
25
|
+
export type LocalEgressHandoff = {
|
|
26
|
+
/** Public URL of the reverse tunnel server, reachable through ngrok. */
|
|
27
|
+
url: string;
|
|
28
|
+
/** Secret the client presents to the tunnel server, paired with LOCAL_EGRESS_USERNAME. */
|
|
29
|
+
token: string;
|
|
30
|
+
/** Fingerprint of the tunnel server key, for the client to pin. */
|
|
31
|
+
fingerprint: string;
|
|
32
|
+
/** Loopback port on this host that the client must serve. */
|
|
33
|
+
port: number;
|
|
34
|
+
};
|
|
35
|
+
export declare function getChiselAssetName({ platform, arch, }: {
|
|
36
|
+
platform: NodeJS.Platform;
|
|
37
|
+
arch: string;
|
|
38
|
+
}): string;
|
|
39
|
+
export declare function getChiselDownloadUrl(assetName: string): string;
|
|
40
|
+
export declare function downloadChiselAsync({ destinationDir, logger, platform, arch, }: {
|
|
41
|
+
destinationDir: string;
|
|
42
|
+
logger: bunyan;
|
|
43
|
+
platform?: NodeJS.Platform;
|
|
44
|
+
arch?: string;
|
|
45
|
+
}): Promise<string>;
|
|
46
|
+
export declare function generateEgressCredentials(): {
|
|
47
|
+
user: string;
|
|
48
|
+
password: string;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* chisel authfile: one user, allowed to open reverse remotes on loopback only.
|
|
52
|
+
* The proxy port carries proxied requests. Any unprivileged loopback port may be
|
|
53
|
+
* forwarded too: the EAS CLI opens one per `--egress-allow localhost:<port>`
|
|
54
|
+
* entry so `127.0.0.1:<port>` inside the simulator reaches that port on the
|
|
55
|
+
* developer's machine, like `adb reverse`. iOS never sends loopback-literal
|
|
56
|
+
* requests to the system proxy, so the proxy alone cannot serve them.
|
|
57
|
+
* Reverse remotes are matched as `R:<interface>:<port>`.
|
|
58
|
+
*/
|
|
59
|
+
export declare function createChiselAuthfileContents({ user, password, port, }: {
|
|
60
|
+
user: string;
|
|
61
|
+
password: string;
|
|
62
|
+
port: number;
|
|
63
|
+
}): string;
|
|
64
|
+
export declare function parseChiselFingerprint(output: string): string | null;
|
|
65
|
+
export declare function startChiselServerAsync({ chiselPath, controlPort, authfilePath, env, signal, }: {
|
|
66
|
+
chiselPath: string;
|
|
67
|
+
controlPort: number;
|
|
68
|
+
authfilePath: string;
|
|
69
|
+
env: BuildStepEnv;
|
|
70
|
+
signal?: AbortSignal;
|
|
71
|
+
}): Promise<{
|
|
72
|
+
process: DetachedProcessHandle;
|
|
73
|
+
fingerprint: string;
|
|
74
|
+
}>;
|
|
75
|
+
export declare function parseDefaultRouteInterface(routeOutput: string): string | null;
|
|
76
|
+
/**
|
|
77
|
+
* `networksetup -listnetworkserviceorder` prints each service as two lines:
|
|
78
|
+
* "(1) Wi-Fi" followed by "(Hardware Port: Wi-Fi, Device: en0)". Return the
|
|
79
|
+
* service name whose device matches.
|
|
80
|
+
*/
|
|
81
|
+
export declare function parseNetworkServiceNameForDevice(listOutput: string, device: string): string | null;
|
|
82
|
+
export declare function resolveActiveNetworkServiceNameAsync({ env, }: {
|
|
83
|
+
env: BuildStepEnv;
|
|
84
|
+
}): Promise<string>;
|
|
85
|
+
export declare function buildNetworksetupProxyArgs({ service, host, port, }: {
|
|
86
|
+
service: string;
|
|
87
|
+
host: string;
|
|
88
|
+
port: number;
|
|
89
|
+
}): string[][];
|
|
90
|
+
/**
|
|
91
|
+
* Point the macOS system HTTP and HTTPS proxy at the loopback egress port. The
|
|
92
|
+
* simulator reads these settings when it boots, so this must run before
|
|
93
|
+
* `start_ios_simulator`. Existing bypass and automatic proxy settings are left
|
|
94
|
+
* unchanged. Requests that bypass this proxy can leave from this host's address.
|
|
95
|
+
*/
|
|
96
|
+
export declare function configureSystemProxyAsync({ env, logger, port, signal, }: {
|
|
97
|
+
env: BuildStepEnv;
|
|
98
|
+
logger: bunyan;
|
|
99
|
+
port: number;
|
|
100
|
+
signal?: AbortSignal;
|
|
101
|
+
}): Promise<{
|
|
102
|
+
service: string;
|
|
103
|
+
}>;
|
|
104
|
+
export declare function writeLocalEgressHandoffAsync(handoff: LocalEgressHandoff, handoffPath?: string): Promise<void>;
|
|
105
|
+
export declare function readLocalEgressHandoffAsync(handoffPath?: string): Promise<LocalEgressHandoff | null>;
|
|
106
|
+
/** remoteConfig fields the CLI needs to start the egress client. */
|
|
107
|
+
export declare function buildEgressRemoteConfigFields(handoff: LocalEgressHandoff | null): Record<string, string | number>;
|
|
108
|
+
export declare function registerLocalEgressResources(stopAsync: () => Promise<void>): AbortSignal;
|
|
109
|
+
export declare function stopLocalEgressResourcesAsync(logger: bunyan): Promise<void>;
|
|
110
|
+
export declare function isPortListeningAsync({ host, port, timeoutMs, }: {
|
|
111
|
+
host: string;
|
|
112
|
+
port: number;
|
|
113
|
+
timeoutMs?: number;
|
|
114
|
+
}): Promise<boolean>;
|
|
115
|
+
export declare function parseExitIpResponse(body: string): string;
|
|
116
|
+
export declare function fetchExitIpThroughProxyAsync({ port, env, }: {
|
|
117
|
+
port: number;
|
|
118
|
+
env: BuildStepEnv;
|
|
119
|
+
}): Promise<string>;
|
|
120
|
+
/**
|
|
121
|
+
* Processes inside the simulator run on the host as descendants of launchd_sim,
|
|
122
|
+
* so `ps -axo pid=,ppid=,comm=` ancestry identifies them. Returns every
|
|
123
|
+
* descendant pid; launchd_sim itself opens no network connections.
|
|
124
|
+
*/
|
|
125
|
+
export declare function collectSimulatorProcessIds(psOutput: string): number[];
|
|
126
|
+
export type DirectSimulatorConnection = {
|
|
127
|
+
pid: number;
|
|
128
|
+
command: string;
|
|
129
|
+
protocol: string;
|
|
130
|
+
/** Remote peer as lsof prints it, e.g. `93.184.216.34:443` or `[2606::1]:443`. */
|
|
131
|
+
remote: string;
|
|
132
|
+
};
|
|
133
|
+
/**
|
|
134
|
+
* Parse `lsof -nP -i -F pcPnT` output. Returns the TCP and UDP connections that
|
|
135
|
+
* simulator processes hold to peers outside loopback. Those did not go through
|
|
136
|
+
* the proxy on 127.0.0.1, so they exit from this host instead of the egress
|
|
137
|
+
* client. Listening sockets, unconnected UDP sockets and connections to
|
|
138
|
+
* loopback (the proxy itself) are ignored.
|
|
139
|
+
*/
|
|
140
|
+
export declare function parseDirectSimulatorConnections(lsofOutput: string, simulatorPids: ReadonlySet<number>): DirectSimulatorConnection[];
|
|
141
|
+
/**
|
|
142
|
+
* Log proxy listener availability, the exit IP observed by a worker request
|
|
143
|
+
* through it, and simulator connections that bypassed the proxy. Neither check
|
|
144
|
+
* verifies that proxied simulator requests reach the egress client. Never
|
|
145
|
+
* rejects: it runs in the background for the whole session.
|
|
146
|
+
*/
|
|
147
|
+
export declare function monitorLocalEgressAsync({ port, env, logger, signal, }: {
|
|
148
|
+
port: number;
|
|
149
|
+
env: BuildStepEnv;
|
|
150
|
+
logger: bunyan;
|
|
151
|
+
signal: AbortSignal;
|
|
152
|
+
}): Promise<void>;
|