simtap 0.0.0-stage → 0.6.1
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/LICENSE +21 -0
- package/README.md +192 -2
- package/THIRD_PARTY_LICENSES +61 -0
- package/bin/simtap.js +4 -0
- package/dist/act/diff.js +67 -0
- package/dist/act/resolve.js +49 -0
- package/dist/act/steps.js +188 -0
- package/dist/cli.js +123 -0
- package/dist/engine/apps.js +153 -0
- package/dist/engine/axe.js +107 -0
- package/dist/engine/exec.js +36 -0
- package/dist/engine/jobs.js +95 -0
- package/dist/engine/logs.js +115 -0
- package/dist/engine/simctl.js +191 -0
- package/dist/engine/state.js +30 -0
- package/dist/engine/xcode.js +253 -0
- package/dist/engine/xcresult.js +95 -0
- package/dist/errors.js +11 -0
- package/dist/look/read.js +50 -0
- package/dist/look/snapshot.js +455 -0
- package/dist/mcp.js +108 -0
- package/dist/registry.js +65 -0
- package/dist/tools/app-control.js +127 -0
- package/dist/tools/app-logs.js +128 -0
- package/dist/tools/app-run.js +94 -0
- package/dist/tools/device-use.js +68 -0
- package/dist/tools/devices.js +26 -0
- package/dist/tools/jobs.js +55 -0
- package/dist/tools/launch-app.js +68 -0
- package/dist/tools/screen-record.js +79 -0
- package/dist/tools/tests-run.js +81 -0
- package/dist/tools/types.js +2 -0
- package/dist/tools/ui-act.js +435 -0
- package/dist/tools/ui-look.js +40 -0
- package/package.json +45 -4
- package/skill/SKILL.md +23 -0
- package/vendor/axe/.version +1 -0
- package/vendor/axe/AXe_AXe.bundle/skills/axe/SKILL.md +87 -0
- package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/FBControlCore +0 -0
- package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBAccessibilityTraits.h +23 -0
- package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBArchitecture.h +20 -0
- package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBArchiveOperations.h +136 -0
- package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBBinaryDescriptor.h +73 -0
- package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBControlCore-Swift.h +3232 -0
- package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBControlCore-SwiftImport.h +28 -0
- package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBControlCore.h +47 -0
- package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBControlCoreFrameworkLoader.h +104 -0
- package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBControlCoreLogger+OSLog.h +30 -0
- package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBControlCoreLogger.h +107 -0
- package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBCrashLog.h +20 -0
- package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBDataBuffer.h +75 -0
- package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBDataConsumer.h +173 -0
- package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBFileContainer.h +46 -0
- package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBFileReader.h +25 -0
- package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBFourCharCode.h +30 -0
- package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBFuture+Sync.h +104 -0
- package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBFuture.h +580 -0
- package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBFutureContextManager.h +61 -0
- package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBInstalledApplication.h +30 -0
- package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBInstrumentsCommands.h +29 -0
- package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBInstrumentsOperation.h +83 -0
- package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBObjCExceptionGuard.h +59 -0
- package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBProcessBuilder.h +272 -0
- package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBProcessFetcher.h +128 -0
- package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBProcessIO.h +126 -0
- package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBProcessStream.h +175 -0
- package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBProcessTerminationStrategy.h +25 -0
- package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBScreenshotCommands.h +15 -0
- package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBSettingsCommands.h +22 -0
- package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBSocketServer.h +63 -0
- package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBSubprocess.h +131 -0
- package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBVideoStream.h +255 -0
- package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBVideoStreamConfiguration.h +51 -0
- package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBXCTraceOperation.h +13 -0
- package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBiOSTarget.h +69 -0
- package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBiOSTargetConfiguration.h +322 -0
- package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBiOSTargetConstants.h +48 -0
- package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBiOSTargetOperation.h +18 -0
- package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Modules/FBControlCore.swiftmodule/Project/arm64-apple-macos.swiftsourceinfo +0 -0
- package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Modules/FBControlCore.swiftmodule/Project/x86_64-apple-macos.swiftsourceinfo +0 -0
- package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Modules/FBControlCore.swiftmodule/arm64-apple-macos.abi.json +51890 -0
- package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Modules/FBControlCore.swiftmodule/arm64-apple-macos.private.swiftinterface +1341 -0
- package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Modules/FBControlCore.swiftmodule/arm64-apple-macos.swiftdoc +0 -0
- package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Modules/FBControlCore.swiftmodule/arm64-apple-macos.swiftinterface +1341 -0
- package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Modules/FBControlCore.swiftmodule/arm64-apple-macos.swiftmodule +0 -0
- package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Modules/FBControlCore.swiftmodule/x86_64-apple-macos.abi.json +51890 -0
- package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Modules/FBControlCore.swiftmodule/x86_64-apple-macos.private.swiftinterface +1341 -0
- package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Modules/FBControlCore.swiftmodule/x86_64-apple-macos.swiftdoc +0 -0
- package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Modules/FBControlCore.swiftmodule/x86_64-apple-macos.swiftinterface +1341 -0
- package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Modules/FBControlCore.swiftmodule/x86_64-apple-macos.swiftmodule +0 -0
- package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Modules/module.modulemap +10 -0
- package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Resources/Info.plist +50 -0
- package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/_CodeSignature/CodeResources +492 -0
- package/vendor/axe/Frameworks/FBDeviceControl.framework/Versions/A/FBDeviceControl +0 -0
- package/vendor/axe/Frameworks/FBDeviceControl.framework/Versions/A/Headers/FBAFCConnection.h +135 -0
- package/vendor/axe/Frameworks/FBDeviceControl.framework/Versions/A/Headers/FBAMDServiceConnection.h +239 -0
- package/vendor/axe/Frameworks/FBDeviceControl.framework/Versions/A/Headers/FBAMDefines.h +256 -0
- package/vendor/axe/Frameworks/FBDeviceControl.framework/Versions/A/Headers/FBAMDevice.h +105 -0
- package/vendor/axe/Frameworks/FBDeviceControl.framework/Versions/A/Headers/FBAMDeviceManager.h +59 -0
- package/vendor/axe/Frameworks/FBDeviceControl.framework/Versions/A/Headers/FBAMRestorableDevice.h +72 -0
- package/vendor/axe/Frameworks/FBDeviceControl.framework/Versions/A/Headers/FBAMRestorableDeviceManager.h +32 -0
- package/vendor/axe/Frameworks/FBDeviceControl.framework/Versions/A/Headers/FBDevice.h +89 -0
- package/vendor/axe/Frameworks/FBDeviceControl.framework/Versions/A/Headers/FBDeviceCommands.h +147 -0
- package/vendor/axe/Frameworks/FBDeviceControl.framework/Versions/A/Headers/FBDeviceControl-Swift.h +1500 -0
- package/vendor/axe/Frameworks/FBDeviceControl.framework/Versions/A/Headers/FBDeviceControl.h +24 -0
- package/vendor/axe/Frameworks/FBDeviceControl.framework/Versions/A/Headers/FBDeviceControlFrameworkLoader.h +25 -0
- package/vendor/axe/Frameworks/FBDeviceControl.framework/Versions/A/Headers/FBDeviceDebugSymbolsCommands.h +29 -0
- package/vendor/axe/Frameworks/FBDeviceControl.framework/Versions/A/Headers/FBDeviceManager.h +118 -0
- package/vendor/axe/Frameworks/FBDeviceControl.framework/Versions/A/Headers/FBInstrumentsClient.h +49 -0
- package/vendor/axe/Frameworks/FBDeviceControl.framework/Versions/A/Modules/FBDeviceControl.swiftmodule/Project/arm64-apple-macos.swiftsourceinfo +0 -0
- package/vendor/axe/Frameworks/FBDeviceControl.framework/Versions/A/Modules/FBDeviceControl.swiftmodule/Project/x86_64-apple-macos.swiftsourceinfo +0 -0
- package/vendor/axe/Frameworks/FBDeviceControl.framework/Versions/A/Modules/FBDeviceControl.swiftmodule/arm64-apple-macos.abi.json +16073 -0
- package/vendor/axe/Frameworks/FBDeviceControl.framework/Versions/A/Modules/FBDeviceControl.swiftmodule/arm64-apple-macos.private.swiftinterface +398 -0
- package/vendor/axe/Frameworks/FBDeviceControl.framework/Versions/A/Modules/FBDeviceControl.swiftmodule/arm64-apple-macos.swiftdoc +0 -0
- package/vendor/axe/Frameworks/FBDeviceControl.framework/Versions/A/Modules/FBDeviceControl.swiftmodule/arm64-apple-macos.swiftinterface +398 -0
- package/vendor/axe/Frameworks/FBDeviceControl.framework/Versions/A/Modules/FBDeviceControl.swiftmodule/arm64-apple-macos.swiftmodule +0 -0
- package/vendor/axe/Frameworks/FBDeviceControl.framework/Versions/A/Modules/FBDeviceControl.swiftmodule/x86_64-apple-macos.abi.json +16073 -0
- package/vendor/axe/Frameworks/FBDeviceControl.framework/Versions/A/Modules/FBDeviceControl.swiftmodule/x86_64-apple-macos.private.swiftinterface +398 -0
- package/vendor/axe/Frameworks/FBDeviceControl.framework/Versions/A/Modules/FBDeviceControl.swiftmodule/x86_64-apple-macos.swiftdoc +0 -0
- package/vendor/axe/Frameworks/FBDeviceControl.framework/Versions/A/Modules/FBDeviceControl.swiftmodule/x86_64-apple-macos.swiftinterface +398 -0
- package/vendor/axe/Frameworks/FBDeviceControl.framework/Versions/A/Modules/FBDeviceControl.swiftmodule/x86_64-apple-macos.swiftmodule +0 -0
- package/vendor/axe/Frameworks/FBDeviceControl.framework/Versions/A/Modules/module.modulemap +10 -0
- package/vendor/axe/Frameworks/FBDeviceControl.framework/Versions/A/Resources/Info.plist +50 -0
- package/vendor/axe/Frameworks/FBDeviceControl.framework/Versions/A/_CodeSignature/CodeResources +324 -0
- package/vendor/axe/Frameworks/FBSimulatorControl.framework/Versions/A/FBSimulatorControl +0 -0
- package/vendor/axe/Frameworks/FBSimulatorControl.framework/Versions/A/Headers/FBFramebuffer.h +24 -0
- package/vendor/axe/Frameworks/FBSimulatorControl.framework/Versions/A/Headers/FBPeriodicStatsTimer.h +43 -0
- package/vendor/axe/Frameworks/FBSimulatorControl.framework/Versions/A/Headers/FBSimDeviceWrapper.h +86 -0
- package/vendor/axe/Frameworks/FBSimulatorControl.framework/Versions/A/Headers/FBSimulator.h +160 -0
- package/vendor/axe/Frameworks/FBSimulatorControl.framework/Versions/A/Headers/FBSimulatorBootConfiguration.h +18 -0
- package/vendor/axe/Frameworks/FBSimulatorControl.framework/Versions/A/Headers/FBSimulatorControl-Swift.h +2270 -0
- package/vendor/axe/Frameworks/FBSimulatorControl.framework/Versions/A/Headers/FBSimulatorControl.h +21 -0
- package/vendor/axe/Frameworks/FBSimulatorControl.framework/Versions/A/Headers/FBSimulatorControlFrameworkLoader.h +45 -0
- package/vendor/axe/Frameworks/FBSimulatorControl.framework/Versions/A/Headers/FBSimulatorVideoStream.h +153 -0
- package/vendor/axe/Frameworks/FBSimulatorControl.framework/Versions/A/Modules/FBSimulatorControl.swiftmodule/Project/arm64-apple-macos.swiftsourceinfo +0 -0
- package/vendor/axe/Frameworks/FBSimulatorControl.framework/Versions/A/Modules/FBSimulatorControl.swiftmodule/Project/x86_64-apple-macos.swiftsourceinfo +0 -0
- package/vendor/axe/Frameworks/FBSimulatorControl.framework/Versions/A/Modules/FBSimulatorControl.swiftmodule/arm64-apple-macos.abi.json +46980 -0
- package/vendor/axe/Frameworks/FBSimulatorControl.framework/Versions/A/Modules/FBSimulatorControl.swiftmodule/arm64-apple-macos.private.swiftinterface +1072 -0
- package/vendor/axe/Frameworks/FBSimulatorControl.framework/Versions/A/Modules/FBSimulatorControl.swiftmodule/arm64-apple-macos.swiftdoc +0 -0
- package/vendor/axe/Frameworks/FBSimulatorControl.framework/Versions/A/Modules/FBSimulatorControl.swiftmodule/arm64-apple-macos.swiftinterface +1072 -0
- package/vendor/axe/Frameworks/FBSimulatorControl.framework/Versions/A/Modules/FBSimulatorControl.swiftmodule/arm64-apple-macos.swiftmodule +0 -0
- package/vendor/axe/Frameworks/FBSimulatorControl.framework/Versions/A/Modules/FBSimulatorControl.swiftmodule/x86_64-apple-macos.abi.json +46980 -0
- package/vendor/axe/Frameworks/FBSimulatorControl.framework/Versions/A/Modules/FBSimulatorControl.swiftmodule/x86_64-apple-macos.private.swiftinterface +1072 -0
- package/vendor/axe/Frameworks/FBSimulatorControl.framework/Versions/A/Modules/FBSimulatorControl.swiftmodule/x86_64-apple-macos.swiftdoc +0 -0
- package/vendor/axe/Frameworks/FBSimulatorControl.framework/Versions/A/Modules/FBSimulatorControl.swiftmodule/x86_64-apple-macos.swiftinterface +1072 -0
- package/vendor/axe/Frameworks/FBSimulatorControl.framework/Versions/A/Modules/FBSimulatorControl.swiftmodule/x86_64-apple-macos.swiftmodule +0 -0
- package/vendor/axe/Frameworks/FBSimulatorControl.framework/Versions/A/Modules/module.modulemap +10 -0
- package/vendor/axe/Frameworks/FBSimulatorControl.framework/Versions/A/Resources/Info.plist +50 -0
- package/vendor/axe/Frameworks/FBSimulatorControl.framework/Versions/A/Resources/README.md +124 -0
- package/vendor/axe/Frameworks/FBSimulatorControl.framework/Versions/A/_CodeSignature/CodeResources +293 -0
- package/vendor/axe/Frameworks/XCTestBootstrap.framework/Versions/A/Headers/FBActivityRecord.h +33 -0
- package/vendor/axe/Frameworks/XCTestBootstrap.framework/Versions/A/Headers/FBAttachment.h +25 -0
- package/vendor/axe/Frameworks/XCTestBootstrap.framework/Versions/A/Headers/FBCodeCoverageConfiguration.h +15 -0
- package/vendor/axe/Frameworks/XCTestBootstrap.framework/Versions/A/Headers/FBTestBundleConnection.h +37 -0
- package/vendor/axe/Frameworks/XCTestBootstrap.framework/Versions/A/Headers/FBTestConfiguration.h +74 -0
- package/vendor/axe/Frameworks/XCTestBootstrap.framework/Versions/A/Headers/FBTestManagerAPIMediator.h +46 -0
- package/vendor/axe/Frameworks/XCTestBootstrap.framework/Versions/A/Headers/FBTestManagerResultSummary.h +19 -0
- package/vendor/axe/Frameworks/XCTestBootstrap.framework/Versions/A/Headers/FBTestReporterAdapter.h +27 -0
- package/vendor/axe/Frameworks/XCTestBootstrap.framework/Versions/A/Headers/FBXCTestConfiguration.h +30 -0
- package/vendor/axe/Frameworks/XCTestBootstrap.framework/Versions/A/Headers/XCTestBootstrap-Swift.h +1570 -0
- package/vendor/axe/Frameworks/XCTestBootstrap.framework/Versions/A/Headers/XCTestBootstrap.h +22 -0
- package/vendor/axe/Frameworks/XCTestBootstrap.framework/Versions/A/Headers/XCTestBootstrapError.h +25 -0
- package/vendor/axe/Frameworks/XCTestBootstrap.framework/Versions/A/Modules/XCTestBootstrap.swiftmodule/Project/arm64-apple-macos.swiftsourceinfo +0 -0
- package/vendor/axe/Frameworks/XCTestBootstrap.framework/Versions/A/Modules/XCTestBootstrap.swiftmodule/Project/x86_64-apple-macos.swiftsourceinfo +0 -0
- package/vendor/axe/Frameworks/XCTestBootstrap.framework/Versions/A/Modules/XCTestBootstrap.swiftmodule/arm64-apple-macos.abi.json +15972 -0
- package/vendor/axe/Frameworks/XCTestBootstrap.framework/Versions/A/Modules/XCTestBootstrap.swiftmodule/arm64-apple-macos.private.swiftinterface +397 -0
- package/vendor/axe/Frameworks/XCTestBootstrap.framework/Versions/A/Modules/XCTestBootstrap.swiftmodule/arm64-apple-macos.swiftdoc +0 -0
- package/vendor/axe/Frameworks/XCTestBootstrap.framework/Versions/A/Modules/XCTestBootstrap.swiftmodule/arm64-apple-macos.swiftinterface +397 -0
- package/vendor/axe/Frameworks/XCTestBootstrap.framework/Versions/A/Modules/XCTestBootstrap.swiftmodule/arm64-apple-macos.swiftmodule +0 -0
- package/vendor/axe/Frameworks/XCTestBootstrap.framework/Versions/A/Modules/XCTestBootstrap.swiftmodule/x86_64-apple-macos.abi.json +15972 -0
- package/vendor/axe/Frameworks/XCTestBootstrap.framework/Versions/A/Modules/XCTestBootstrap.swiftmodule/x86_64-apple-macos.private.swiftinterface +397 -0
- package/vendor/axe/Frameworks/XCTestBootstrap.framework/Versions/A/Modules/XCTestBootstrap.swiftmodule/x86_64-apple-macos.swiftdoc +0 -0
- package/vendor/axe/Frameworks/XCTestBootstrap.framework/Versions/A/Modules/XCTestBootstrap.swiftmodule/x86_64-apple-macos.swiftinterface +397 -0
- package/vendor/axe/Frameworks/XCTestBootstrap.framework/Versions/A/Modules/XCTestBootstrap.swiftmodule/x86_64-apple-macos.swiftmodule +0 -0
- package/vendor/axe/Frameworks/XCTestBootstrap.framework/Versions/A/Modules/module.modulemap +13 -0
- package/vendor/axe/Frameworks/XCTestBootstrap.framework/Versions/A/Resources/Info.plist +50 -0
- package/vendor/axe/Frameworks/XCTestBootstrap.framework/Versions/A/XCTestBootstrap +0 -0
- package/vendor/axe/Frameworks/XCTestBootstrap.framework/Versions/A/_CodeSignature/CodeResources +303 -0
- package/vendor/axe/axe +0 -0
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#import <Foundation/Foundation.h>
|
|
9
|
+
|
|
10
|
+
#import <FBControlCore/FBProcessStream.h>
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
A result of "attaching" to an IO object, realized as file descriptors.
|
|
14
|
+
*/
|
|
15
|
+
@interface FBProcessIOAttachment : NSObject
|
|
16
|
+
|
|
17
|
+
#pragma mark Properties
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
The attachment for stdin.
|
|
21
|
+
*/
|
|
22
|
+
@property (nullable, nonatomic, readonly, strong) FBProcessStreamAttachment *stdIn;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
The attachment for stdout.
|
|
26
|
+
*/
|
|
27
|
+
@property (nullable, nonatomic, readonly, strong) FBProcessStreamAttachment *stdOut;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
The attachment for stderr.
|
|
31
|
+
*/
|
|
32
|
+
@property (nullable, nonatomic, readonly, strong) FBProcessStreamAttachment *stdErr;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
Detach from all the streams.
|
|
36
|
+
This may be called multiple times, the underlying streams will only detach once per instance.
|
|
37
|
+
*/
|
|
38
|
+
- (nonnull FBFuture<NSNull *> *)detach;
|
|
39
|
+
|
|
40
|
+
@end
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
A result of "attaching" to an IO object, realized as file paths.
|
|
44
|
+
*/
|
|
45
|
+
@interface FBProcessFileAttachment : NSObject
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
The attachment for stdout.
|
|
49
|
+
*/
|
|
50
|
+
@property (nullable, nonatomic, readonly, strong) id<FBProcessFileOutput> stdOut;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
The attachment for stderr.
|
|
54
|
+
*/
|
|
55
|
+
@property (nullable, nonatomic, readonly, strong) id<FBProcessFileOutput> stdErr;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
Detach from all the streams.
|
|
59
|
+
This may be called multiple times, the underlying streams will only detach once per instance.
|
|
60
|
+
*/
|
|
61
|
+
- (nonnull FBFuture<NSNull *> *)detach;
|
|
62
|
+
|
|
63
|
+
@end
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
A composite of streams for the stdin, stdout and stderr streams connected to a process.
|
|
67
|
+
*/
|
|
68
|
+
@interface FBProcessIO <StdInType : id, StdOutType : id, StdErrType : id> : NSObject
|
|
69
|
+
|
|
70
|
+
#pragma mark Initializers
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
The Designated Initializer.
|
|
74
|
+
|
|
75
|
+
@param stdIn the stdin.
|
|
76
|
+
@param stdOut the stdout.
|
|
77
|
+
@param stdErr the stderr.
|
|
78
|
+
@return a new FBProcessIO instance.
|
|
79
|
+
*/
|
|
80
|
+
- (nonnull instancetype)initWithStdIn:(nullable FBProcessInput<StdInType> *)stdIn stdOut:(nullable FBProcessOutput<StdOutType> *)stdOut stdErr:(nullable FBProcessOutput<StdErrType> *)stdErr;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
An IO object that accepts no input and returns no output.
|
|
84
|
+
*/
|
|
85
|
+
+ (nonnull instancetype)outputToDevNull;
|
|
86
|
+
|
|
87
|
+
#pragma mark Properties
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
The FBProcessInput for stdin.
|
|
91
|
+
*/
|
|
92
|
+
@property (nullable, nonatomic, readonly, strong) FBProcessInput<StdInType> *stdIn;
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
The FBProcessOutput for stdout.
|
|
96
|
+
*/
|
|
97
|
+
@property (nullable, nonatomic, readonly, strong) FBProcessOutput<StdOutType> *stdOut;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
The FBProcessOutput for stderr.
|
|
101
|
+
*/
|
|
102
|
+
@property (nullable, nonatomic, readonly, strong) FBProcessOutput<StdErrType> *stdErr;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
The queue to use.
|
|
106
|
+
*/
|
|
107
|
+
@property (nonnull, nonatomic, readonly, strong) dispatch_queue_t queue;
|
|
108
|
+
|
|
109
|
+
#pragma mark Methods
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
Attach to all the streams, returning the composite attachment for file descriptors.
|
|
113
|
+
Will error if any of the stream attachments error.
|
|
114
|
+
If any of the stream attachments error, then any succeeding attachments will detach.
|
|
115
|
+
This should only be called once. Calling attach more than once per instance will fail.
|
|
116
|
+
*/
|
|
117
|
+
- (nonnull FBFuture<FBProcessIOAttachment *> *)attach;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
Attach to all the streams, returning the composite attachment for file paths.
|
|
121
|
+
Will error if any of the stream attachments error.
|
|
122
|
+
If any of the stream attachments error, then any succeeding attachments will detach.
|
|
123
|
+
*/
|
|
124
|
+
- (nonnull FBFuture<FBProcessFileAttachment *> *)attachViaFile;
|
|
125
|
+
|
|
126
|
+
@end
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#import <Foundation/Foundation.h>
|
|
9
|
+
|
|
10
|
+
#import <FBControlCore/FBDataConsumer.h>
|
|
11
|
+
#import <FBControlCore/FBFuture.h>
|
|
12
|
+
|
|
13
|
+
typedef NS_ENUM(NSUInteger, FBProcessStreamAttachmentMode) {
|
|
14
|
+
FBProcessStreamAttachmentModeInput = 0,
|
|
15
|
+
FBProcessStreamAttachmentModeOutput = 1,
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
An attached standard stream object.
|
|
20
|
+
*/
|
|
21
|
+
@interface FBProcessStreamAttachment : NSObject
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
The file descriptor to attach to.
|
|
25
|
+
*/
|
|
26
|
+
@property (nonatomic, readonly, assign) int fileDescriptor;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
Whether the implementor should close when it reaches the end of its stream.
|
|
30
|
+
*/
|
|
31
|
+
@property (nonatomic, readonly, assign) BOOL closeOnEndOfFile;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
Whether the attachment represents an input or an output.
|
|
35
|
+
*/
|
|
36
|
+
@property (nonatomic, readonly, assign) FBProcessStreamAttachmentMode mode;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
Checks fileDescriptor status and closes it if necessary;
|
|
40
|
+
*/
|
|
41
|
+
- (void)close;
|
|
42
|
+
|
|
43
|
+
@end
|
|
44
|
+
|
|
45
|
+
@protocol FBStandardStream;
|
|
46
|
+
@protocol FBStandardStreamTransfer;
|
|
47
|
+
@protocol FBProcessFileOutput;
|
|
48
|
+
@protocol FBProcessOutput;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
A container object for the output of a process.
|
|
52
|
+
*/
|
|
53
|
+
@interface FBProcessOutput <WrappedType> : NSObject
|
|
54
|
+
|
|
55
|
+
#pragma mark Initializers
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
An Output Container for /dev/nul
|
|
59
|
+
|
|
60
|
+
@return a Process Output instance.
|
|
61
|
+
*/
|
|
62
|
+
+ (nonnull FBProcessOutput<NSNull *> *)outputForNullDevice;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
An Output Container for a File Path.
|
|
66
|
+
|
|
67
|
+
@param filePath the File Path to write to, may not be nil.
|
|
68
|
+
@return a Process Output instance.
|
|
69
|
+
*/
|
|
70
|
+
+ (nonnull FBProcessOutput<NSString *> *)outputForFilePath:(nonnull NSString *)filePath;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
An Output Container for an Input Stream
|
|
74
|
+
|
|
75
|
+
@return a Process Output instance.
|
|
76
|
+
*/
|
|
77
|
+
+ (nonnull FBProcessOutput<NSInputStream *> *)outputToInputStream;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
An Output Container that passes to both a data consumer and a logger.
|
|
81
|
+
|
|
82
|
+
@param dataConsumer the file consumer to write to.
|
|
83
|
+
@param logger the logger to log to.
|
|
84
|
+
@return a Process Output instance.
|
|
85
|
+
*/
|
|
86
|
+
+ (nonnull FBProcessOutput<id<FBDataConsumer>> *)outputForDataConsumer:(nonnull id<FBDataConsumer>)dataConsumer logger:(nonnull id<FBControlCoreLogger>)logger;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
An Output Container that passes to Data Consumer.
|
|
90
|
+
|
|
91
|
+
@param dataConsumer the data consumer to write to.
|
|
92
|
+
@return a Process Output instance.
|
|
93
|
+
*/
|
|
94
|
+
+ (nonnull FBProcessOutput<id<FBDataConsumer>> *)outputForDataConsumer:(nonnull id<FBDataConsumer>)dataConsumer;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
An Output Container that writes to a logger
|
|
98
|
+
|
|
99
|
+
@param logger the logger to log to.
|
|
100
|
+
@return a Process Output instance.
|
|
101
|
+
*/
|
|
102
|
+
+ (nonnull FBProcessOutput<id<FBControlCoreLogger>> *)outputForLogger:(nonnull id<FBControlCoreLogger>)logger;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
An Output Container that accumulates data in memory
|
|
106
|
+
|
|
107
|
+
@param data the mutable data to append to.
|
|
108
|
+
@return a Process Output instance.
|
|
109
|
+
*/
|
|
110
|
+
+ (nonnull FBProcessOutput<NSMutableData *> *)outputToMutableData:(nonnull NSMutableData *)data;
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
An Output Container that accumulates data in memory, exposing it as a string.
|
|
114
|
+
|
|
115
|
+
@param data the mutable data to append to.
|
|
116
|
+
@return a Process Output instance.
|
|
117
|
+
*/
|
|
118
|
+
+ (nonnull FBProcessOutput<NSString *> *)outputToStringBackedByMutableData:(nonnull NSMutableData *)data;
|
|
119
|
+
|
|
120
|
+
#pragma mark Properties
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
The wrapped contents of the stream.
|
|
124
|
+
*/
|
|
125
|
+
@property (nonnull, nonatomic, readonly, strong) WrappedType contents;
|
|
126
|
+
|
|
127
|
+
- (nonnull FBFuture<FBProcessStreamAttachment *> *)attach;
|
|
128
|
+
- (nonnull FBFuture<NSNull *> *)detach;
|
|
129
|
+
- (nonnull FBFuture<id<FBProcessFileOutput>> *)providedThroughFile;
|
|
130
|
+
- (nonnull FBFuture<id<FBDataConsumer>> *)providedThroughConsumer;
|
|
131
|
+
|
|
132
|
+
@end
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
A container object for the input of a process.
|
|
136
|
+
*/
|
|
137
|
+
@interface FBProcessInput <WrappedType> : NSObject
|
|
138
|
+
|
|
139
|
+
#pragma mark Initializers
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
An input container that provides a data consumer.
|
|
143
|
+
The 'contents' field will contain an opaque consumer that can be written to externally.
|
|
144
|
+
|
|
145
|
+
@return a FBProcessInput instance wrapping a data consumer.
|
|
146
|
+
*/
|
|
147
|
+
+ (nonnull FBProcessInput<id<FBDataConsumer>> *)inputFromConsumer;
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
An input container that provides an NSOutputStream.
|
|
151
|
+
The 'contents' field will contain an NSOutputStream that can be written to.
|
|
152
|
+
|
|
153
|
+
@return a FBProcessInput instance wrapping an NSOutputStream.
|
|
154
|
+
*/
|
|
155
|
+
+ (nonnull FBProcessInput<NSOutputStream *> *)inputFromStream;
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
An Input container that connects data to the input.
|
|
159
|
+
|
|
160
|
+
@param data the data to send.
|
|
161
|
+
@return a Process Input instance.
|
|
162
|
+
*/
|
|
163
|
+
+ (nonnull FBProcessInput<NSData *> *)inputFromData:(nonnull NSData *)data;
|
|
164
|
+
|
|
165
|
+
#pragma mark Properties
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
The wrapped contents of the stream.
|
|
169
|
+
*/
|
|
170
|
+
@property (nonnull, nonatomic, readonly, strong) WrappedType contents;
|
|
171
|
+
|
|
172
|
+
- (nonnull FBFuture<FBProcessStreamAttachment *> *)attach;
|
|
173
|
+
- (nonnull FBFuture<NSNull *> *)detach;
|
|
174
|
+
|
|
175
|
+
@end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#import <Foundation/Foundation.h>
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
An Option Set for Process Termination.
|
|
12
|
+
*/
|
|
13
|
+
typedef NS_ENUM(NSUInteger, FBProcessTerminationStrategyOptions) {
|
|
14
|
+
FBProcessTerminationStrategyOptionsCheckProcessExistsBeforeSignal = 1 << 2, /** Checks for the process to exist before signalling **/
|
|
15
|
+
FBProcessTerminationStrategyOptionsCheckDeathAfterSignal = 1 << 3, /** Waits for the process to die before returning **/
|
|
16
|
+
FBProcessTerminationStrategyOptionsBackoffToSIGKILL = 1 << 4, /** Whether to backoff to SIGKILL if a less severe signal fails **/
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
A Configuration for the Strategy.
|
|
21
|
+
*/
|
|
22
|
+
typedef struct {
|
|
23
|
+
int signo;
|
|
24
|
+
FBProcessTerminationStrategyOptions options;
|
|
25
|
+
} FBProcessTerminationStrategyConfiguration;
|
package/vendor/axe/Frameworks/FBControlCore.framework/Versions/A/Headers/FBScreenshotCommands.h
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#import <Foundation/Foundation.h>
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
An enum for Screenshot Formats.
|
|
12
|
+
*/
|
|
13
|
+
typedef NSString *FBScreenshotFormat NS_STRING_ENUM;
|
|
14
|
+
extern FBScreenshotFormat _Nonnull const FBScreenshotFormatJPEG NS_SWIFT_NAME(jpeg);
|
|
15
|
+
extern FBScreenshotFormat _Nonnull const FBScreenshotFormatPNG NS_SWIFT_NAME(png);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#import <Foundation/Foundation.h>
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
An Enumeration Representing Services.
|
|
12
|
+
*/
|
|
13
|
+
typedef NSString *FBTargetSettingsService NS_STRING_ENUM;
|
|
14
|
+
|
|
15
|
+
extern FBTargetSettingsService _Nonnull const FBTargetSettingsServiceContacts;
|
|
16
|
+
extern FBTargetSettingsService _Nonnull const FBTargetSettingsServicePhotos;
|
|
17
|
+
extern FBTargetSettingsService _Nonnull const FBTargetSettingsServiceCamera;
|
|
18
|
+
extern FBTargetSettingsService _Nonnull const FBTargetSettingsServiceLocation;
|
|
19
|
+
extern FBTargetSettingsService _Nonnull const FBTargetSettingsServiceMicrophone;
|
|
20
|
+
extern FBTargetSettingsService _Nonnull const FBTargetSettingsServiceUrl;
|
|
21
|
+
extern FBTargetSettingsService _Nonnull const FBTargetSettingsServiceNotification;
|
|
22
|
+
extern FBTargetSettingsService _Nonnull const FBTargetSettingsServiceHealth;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#import <netinet/in.h>
|
|
9
|
+
#import <sys/socket.h>
|
|
10
|
+
|
|
11
|
+
#import <Foundation/Foundation.h>
|
|
12
|
+
|
|
13
|
+
#import <FBControlCore/FBFuture.h>
|
|
14
|
+
|
|
15
|
+
@protocol FBSocketServerDelegate;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
A Generic Socket Server.
|
|
19
|
+
*/
|
|
20
|
+
@interface FBSocketServer : NSObject
|
|
21
|
+
|
|
22
|
+
#pragma mark Initializers
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
Creates and returns a socket reader for the provided port and consumer.
|
|
26
|
+
|
|
27
|
+
@param port the port to bind against.
|
|
28
|
+
@param delegate the delegate to use.
|
|
29
|
+
@return a new socket reader.
|
|
30
|
+
*/
|
|
31
|
+
+ (nonnull instancetype)socketServerOnPort:(in_port_t)port delegate:(nonnull id<FBSocketServerDelegate>)delegate;
|
|
32
|
+
|
|
33
|
+
#pragma mark Properties
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
The Port the Server is Bound on
|
|
37
|
+
*/
|
|
38
|
+
@property (nonatomic, readonly, assign) in_port_t port;
|
|
39
|
+
|
|
40
|
+
#pragma mark Public Methods
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
Create and Listen to the socket.
|
|
44
|
+
|
|
45
|
+
@return A future that resolves when listening has started.
|
|
46
|
+
*/
|
|
47
|
+
- (nonnull FBFuture<NSNull *> *)startListening;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
Stop listening to the socket
|
|
51
|
+
|
|
52
|
+
@return A future that resolves when listening has ended.
|
|
53
|
+
*/
|
|
54
|
+
- (nonnull FBFuture<NSNull *> *)stopListening;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
Starts the socket server, managed by a context manager
|
|
58
|
+
|
|
59
|
+
@return a FBFutureContext that will stop listening when the context is torn down.
|
|
60
|
+
*/
|
|
61
|
+
- (nonnull FBFutureContext<NSNull *> *)startListeningContext;
|
|
62
|
+
|
|
63
|
+
@end
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#import <Foundation/Foundation.h>
|
|
9
|
+
|
|
10
|
+
#import <FBControlCore/FBFuture.h>
|
|
11
|
+
#import <FBControlCore/FBiOSTargetOperation.h>
|
|
12
|
+
|
|
13
|
+
static const size_t FBProcessOutputErrorMessageLength = 200;
|
|
14
|
+
|
|
15
|
+
@class FBProcessSpawnConfiguration;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
A representation of a process that has been launched.
|
|
19
|
+
*/
|
|
20
|
+
@interface FBSubprocess <StdInType : id, StdOutType : id, StdErrType : id> : NSObject
|
|
21
|
+
|
|
22
|
+
#pragma mark Properties
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
The Process Idenfifer of the Launched Process.
|
|
26
|
+
*/
|
|
27
|
+
@property (nonatomic, readonly, assign) pid_t processIdentifier;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
A future that resolves with the the value from waitpid(2) on termination.
|
|
31
|
+
This will always resolve on completion, regardless of whether the process was signalled or exited normally.
|
|
32
|
+
Cancelling this Future will have no effect. To terminate the process use the `sendSignal:` APIs.
|
|
33
|
+
*/
|
|
34
|
+
@property (nonnull, nonatomic, readonly, strong) FBFuture<NSNumber *> *statLoc;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
A future that resolves with the exit code upon termination.
|
|
38
|
+
If the process exited abnormally then this future will error.
|
|
39
|
+
Cancelling this Future will have no effect. To terminate the process use the `sendSignal:` APIs.
|
|
40
|
+
*/
|
|
41
|
+
@property (nonnull, nonatomic, readonly, strong) FBFuture<NSNumber *> *exitCode;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
A future that resolves when the process terminates with a signal.
|
|
45
|
+
If the process exited normally then this future will error.
|
|
46
|
+
Cancelling this Future will have no effect. To terminate the process use the `sendSignal:` APIs.
|
|
47
|
+
*/
|
|
48
|
+
@property (nonnull, nonatomic, readonly, strong) FBFuture<NSNumber *> *signal;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
The IO Object attached to the process.
|
|
52
|
+
*/
|
|
53
|
+
@property (nonnull, nonatomic, readonly, strong) FBProcessSpawnConfiguration *configuration;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
Returns the stdin of the task.
|
|
57
|
+
May be called from any thread.
|
|
58
|
+
The valid types for these values are the wrapped types in FBProcessInput.
|
|
59
|
+
*/
|
|
60
|
+
@property (nullable, nonatomic, readonly, strong) StdInType stdIn;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
Returns the stdout of the task.
|
|
64
|
+
May be called from any thread.
|
|
65
|
+
The valid types for these values are the wrapped types in FBProcessOutput.
|
|
66
|
+
*/
|
|
67
|
+
@property (nullable, nonatomic, readonly, strong) StdOutType stdOut;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
Returns the stderr of the task.
|
|
71
|
+
May be called from any thread.
|
|
72
|
+
The valid types for these values are the wrapped types in FBProcessOutput.
|
|
73
|
+
*/
|
|
74
|
+
@property (nullable, nonatomic, readonly, strong) StdErrType stdErr;
|
|
75
|
+
|
|
76
|
+
#pragma mark Initializers
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
The Designated Initializer.
|
|
80
|
+
|
|
81
|
+
@param processIdentifier the process identifier of the launched process
|
|
82
|
+
@param statLoc a future that will fire when the process has terminated. The value is that of waitpid(2).
|
|
83
|
+
@param exitCode a future that will fire when the process exits. See -[FBSubprocess exitCode]
|
|
84
|
+
@param signal a future that will fire when the process is signalled. See -[FBSubprocess signal]
|
|
85
|
+
@param configuration the configuration the process was launched with.
|
|
86
|
+
@param queue the queue to perform actions on.
|
|
87
|
+
@return an implementation of FBSubprocess.
|
|
88
|
+
*/
|
|
89
|
+
- (nonnull instancetype)initWithProcessIdentifier:(pid_t)processIdentifier statLoc:(nonnull FBFuture<NSNumber *> *)statLoc exitCode:(nonnull FBFuture<NSNumber *> *)exitCode signal:(nonnull FBFuture<NSNumber *> *)signal configuration:(nonnull FBProcessSpawnConfiguration *)configuration queue:(nonnull dispatch_queue_t)queue;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
Launches a process with the provided configuration.
|
|
93
|
+
|
|
94
|
+
@param configuration the configuration to use.
|
|
95
|
+
@param logger an optional logger to log process lifecycle events to.
|
|
96
|
+
@return a future that resolves with the launched process once it has been started.
|
|
97
|
+
*/
|
|
98
|
+
+ (nonnull FBFuture<FBSubprocess *> *)launchProcessWithConfiguration:(nonnull FBProcessSpawnConfiguration *)configuration logger:(nonnull id<FBControlCoreLogger>)logger;
|
|
99
|
+
|
|
100
|
+
#pragma mark Methods
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
Confirms that the process exited with a defined set of status codes.
|
|
104
|
+
Cancelling this future will have no effect.
|
|
105
|
+
|
|
106
|
+
@param acceptableExitCodes the exit codes to check for, must not be nil.
|
|
107
|
+
@return a Future with the same base behaviour as -[FBSubprocess exitCode] with additional checking of codes.
|
|
108
|
+
*/
|
|
109
|
+
- (nonnull FBFuture<NSNumber *> *)exitedWithCodes:(nonnull NSSet<NSNumber *> *)acceptableExitCodes;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
Signal the process.
|
|
113
|
+
The future returned will resolve when the process has terminated and can be ignored if not required.
|
|
114
|
+
|
|
115
|
+
@param signo the signal number to send.
|
|
116
|
+
@return a successful Future that resolves to the signal number when the process has terminated.
|
|
117
|
+
*/
|
|
118
|
+
- (nonnull FBFuture<NSNumber *> *)sendSignal:(int)signo;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
A mechanism for sending an signal to a task, backing off to a kill.
|
|
122
|
+
If the process does not die before the timeout is hit, a SIGKILL will be sent.
|
|
123
|
+
|
|
124
|
+
@param signo the signal number to send.
|
|
125
|
+
@param timeout the timeout to wait before sending a SIGKILL.
|
|
126
|
+
@param logger used for log information when timeout happened, may be nil.
|
|
127
|
+
@return a future that resolves to the signal sent when the process has been terminated.
|
|
128
|
+
*/
|
|
129
|
+
- (nonnull FBFuture<NSNumber *> *)sendSignal:(int)signo backingOffToKillWithTimeout:(NSTimeInterval)timeout logger:(nullable id<FBControlCoreLogger>)logger;
|
|
130
|
+
|
|
131
|
+
@end
|