peachsim 0.1.1716 → 0.1.1728
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/README.md +21 -3
- package/cli/app-bundle-resources.ts +2 -1
- package/cli/app-fonts.ts +4 -4
- package/cli/app-splash.ts +4 -4
- package/cli/app-stubs.ts +17 -0
- package/cli/command-registry.ts +1 -0
- package/cli/commands/control.ts +82 -822
- package/cli/commands/daemon.ts +8 -0
- package/cli/commands/detox.ts +3 -0
- package/cli/commands/doctor.ts +19 -2
- package/cli/commands/inspect/actions.ts +74 -14
- package/cli/commands/inspect/core.ts +5 -1
- package/cli/commands/inspect/settling.ts +5 -2
- package/cli/commands/inspect/wait-ready.ts +6 -0
- package/cli/commands/inspect.ts +48 -45
- package/cli/commands/kotlin.ts +12 -2
- package/cli/commands/package.ts +750 -0
- package/cli/commands/serve.ts +6 -0
- package/cli/commands/shell-url.ts +834 -0
- package/cli/commands/swift.ts +42 -102
- package/cli/commands/test.ts +20 -0
- package/cli/commands/upload.ts +1 -1
- package/cli/device-option.ts +1 -1
- package/cli/main.ts +13 -1
- package/cli/native-input.ts +199 -0
- package/cli/outbound-endpoints.ts +26 -1
- package/cli/packaged-app-launcher.ts +95 -0
- package/cli/scene-video.ts +13 -6
- package/detox/index.ts +187 -23
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +1 -1
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +1 -1
- package/dist-lib/bundle-channel.cjs +38000 -31658
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +1 -1
- package/dist-lib/detox/index.cjs +184 -60
- package/dist-lib/dev-bundle-resolution.cjs +14 -13
- package/dist-lib/expo-swift-bundle.cjs +18199 -11834
- package/dist-lib/expo-swift-metadata.cjs +4 -1
- package/dist-lib/expo-swift-metadata.mjs +3 -1
- package/dist-lib/home-paths.cjs +21 -2
- package/dist-lib/host/bridge-host.cjs +26509 -23850
- package/dist-lib/host/fetch-proxy-handler.cjs +221 -222
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +876 -389
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/jump-to-source-native.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +127 -16
- package/dist-lib/menu.cjs +7 -1
- package/dist-lib/menu.mjs +7 -1
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +883 -404
- package/dist-lib/native-app-identity-project.cjs +694 -280
- package/dist-lib/native-app-identity-project.mjs +490 -83
- package/dist-lib/native-app-identity.cjs +13 -2
- package/dist-lib/native-app-identity.mjs +13 -2
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +28 -23
- package/dist-lib/public-origins-lib.json +392 -224
- package/dist-lib/react-native-host-modules.cjs +32 -2
- package/dist-lib/react-native-host-modules.mjs +32 -2
- package/dist-lib/reap-browser.cjs +12 -4
- package/dist-lib/scripts/dev-server-scanner.cjs +15 -8
- package/dist-lib/sdk.cjs +17 -7
- package/dist-lib/sdk.mjs +16 -7
- package/dist-lib/skills.cjs +61838 -47851
- package/dist-lib/swift-compile.cjs +583 -360
- package/dist-lib/swift-compile.mjs +496 -275
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +1 -1
- package/dist-lib/swift-submit.cjs +2 -2
- package/dist-lib/swift-submit.mjs +2 -2
- package/dist-lib/swift-toolchain.cjs +105 -17
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +4453 -2231
- package/dist-lib/vite.cjs +230 -228
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-compat/src/stubs/native-seams/react-native-cookies.d.ts +17 -8
- package/dist-types/packages/peach-engine/src/engine/canvaskit-renderer.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/image-loader.d.ts +7 -5
- package/dist-types/packages/peach-engine/src/engine/memory-counts.d.ts +3 -1
- package/dist-types/packages/peach-engine/src/engine/node.d.ts +1 -11
- package/dist-types/packages/peach-engine/src/engine/types.d.ts +3 -0
- package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +9 -0
- package/dist-types/packages/peach-engine/src/render-worker/host-service-protocol.d.ts +3 -0
- package/dist-types/packages/peach-engine/src/render-worker/native-ui-commandContract.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/render-worker/shell-protocol.d.ts +4 -0
- package/dist-types/packages/peach-engine/src/render-worker/tree-sync-port.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/render-worker/worklet-runtime.d.ts +23 -1
- package/dist-types/packages/peach-engine/src/shell-events.d.ts +1 -0
- package/dist-types/packages/peach-globals/src/audioBridgeContract.d.ts +5 -0
- package/dist-types/packages/peach-globals/src/index.d.ts +1 -1
- package/dist-types/packages/peach-globals/src/keyboardBridgeContract.d.ts +11 -0
- package/dist-types/packages/peach-globals/src/shellBridgeContract.d.ts +1 -0
- package/dist-types/packages/peach-globals/src/testBridgeContract.d.ts +9 -2
- package/package.json +1 -1
- package/runtime-companion.json +1 -1
- package/scripts/dev-server-scanner.ts +12 -25
- package/sdk/ios/System/Library/Frameworks/AuthenticationServices.framework/Headers/ASFoundation.h +52 -0
- package/sdk/ios/System/Library/Frameworks/AuthenticationServices.framework/Headers/ASWebAuthenticationSession.h +128 -0
- package/sdk/ios/System/Library/Frameworks/AuthenticationServices.framework/Headers/ASWebAuthenticationSessionCallback.h +35 -0
- package/sdk/ios/System/Library/Frameworks/AuthenticationServices.framework/Headers/AuthenticationServices.h +3 -0
- package/sdk/ios/System/Library/Frameworks/AuthenticationServices.framework/Modules/module.modulemap +5 -0
- package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Headers/CFHTTPMessage.h +724 -0
- package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Headers/CFNetwork.h +4 -0
- package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Headers/CFNetworkDefs.h +27 -0
- package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Modules/module.modulemap +5 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFURL.h +1301 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h +2 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationManager.h +21 -50
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLRegion.h +6 -6
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +75 -9
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h +12 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIInterface.h +23 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h +7 -9
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIOrientation.h +14 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIStringDrawing.h +12 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIView.h +14 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIViewAnimating.h +12 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIViewController.h +16 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIWindow.h +2 -0
- package/sdk/ios/usr/include/ConditionalMacros.h +619 -0
- package/sdk/ios/usr/include/module.modulemap +1 -0
- package/sdk/ios/usr/include/objc/objc-sync.h +59 -0
- package/sdk/ios/usr/include/os.modulemap +5 -0
- package/sdk/ios/usr/include/sys/cdefs.h +5 -0
- package/sdk/ios/usr/include/sys/ioccom.h +99 -0
- package/sdk/ios/usr/include/sys/syslog.h +236 -0
- package/sdk/ios/usr/include/syslog.h +24 -0
- package/sdk/ios/wasm/include/fcntl.h +4 -2
- package/sdk/ios/wasm/include/stdio.h +24 -0
- package/sdk/ios/wasm/include/stdlib.h +32 -7
- package/sdk/ios/wasm/include/sys/file.h +7 -0
- package/sdk/ios/wasm/include/sys/ioctl.h +6 -0
- package/sdk/ios/wasm/include/sys/syscall.h +9 -0
- package/sdk/ios/wasm/include/sys/time.h +10 -0
- package/sdk/ios/wasm/include/unistd.h +12 -3
- package/sdk/native-hashes.json +1 -0
- package/skills/contrast/SKILL.md +2 -1
- package/skills/peach-test/SKILL.md +7 -3
- package/src/admitted-mac-build.ts +3 -0
- package/src/android-app-identity.ts +18 -0
- package/src/android-root-module.ts +9 -9
- package/src/appPackageContract.ts +81 -0
- package/src/bridge-contract.ts +50 -0
- package/src/bundle-channel.mjs +21 -4
- package/src/dev-bundle-resolution.ts +7 -27
- package/src/dom-source-reference.ts +15 -0
- package/src/expo-discovery-cache.ts +127 -23
- package/src/expo-manifest-body.ts +33 -0
- package/src/expo-native-workspace.ts +38 -13
- package/src/expo-swift-host.ts +264 -62
- package/src/expoSwiftContract.ts +3 -0
- package/src/generated/swift-c-predefines.json +1 -1
- package/src/home-paths.ts +35 -1
- package/src/host/app-package-handler.ts +47 -0
- package/src/host/bridge-host.ts +3 -0
- package/src/host/staged-host-files.ts +18 -0
- package/src/index.ts +3 -0
- package/src/kotlin-host.ts +21 -18
- package/src/kotlin-instance-source.ts +126 -0
- package/src/menu.ts +7 -0
- package/src/native-app-identity-project.ts +7 -2
- package/src/native-app-identity.ts +11 -0
- package/src/native-firebase-config.ts +24 -1
- package/src/nitro-adapter.lock.json +268 -268
- package/src/nitro-bundle.ts +8 -0
- package/src/nitro-compile.ts +35 -9
- package/src/nitro-dependencies.ts +21 -19
- package/src/nitro-source.ts +4 -0
- package/src/nitroContract.ts +7 -0
- package/src/react-native-bridge-modules.ts +68 -42
- package/src/react-native-host-modules.ts +31 -1
- package/src/reactNativeConfigurationContract.ts +14 -0
- package/src/reap-browser.ts +15 -3
- package/src/sdk.ts +5 -0
- package/src/settingsContract.ts +27 -1
- package/src/sim-client.ts +4 -1
- package/src/storageSnapshotContract.ts +3 -0
- package/src/swift-compile.ts +221 -41
- package/src/swift-coverage/provenance.ts +1 -0
- package/src/swift-coverage/xcode-asset-symbols.ts +922 -0
- package/src/swift-coverage/xcode-assets.ts +89 -131
- package/src/swift-coverage/xcode.ts +1 -1
- package/src/swift-cxx-reachable.ts +2 -1
- package/src/swift-distribution.lock.json +14 -13
- package/src/swift-host.ts +95 -22
- package/src/swift-icu.ts +1 -1
- package/src/swift-link-roots.ts +118 -0
- package/src/swift-objc-compile.ts +144 -22
- package/src/swift-objc-import.ts +6 -0
- package/src/swift-objc-standin.ts +2 -14
- package/src/swift-package-manifest.ts +14 -6
- package/src/swift-packages.ts +75 -11
- package/src/swift-pdf-raster.ts +1 -0
- package/src/swift-root-lock.ts +17 -1
- package/src/swift-source-pods.ts +2 -10
- package/src/swift-standin-emit.ts +592 -57
- package/src/swift-standins.ts +430 -49
- package/src/swift-submit.ts +3 -1
- package/src/swift-toolchain.ts +140 -17
- package/src/turbo-codegen-intake.ts +91 -0
- package/src/vite-plugin-one.ts +13 -9
- package/src/vite-plugin.ts +28 -15
- package/src/xcode-project.ts +223 -22
|
@@ -75,6 +75,11 @@
|
|
|
75
75
|
#else
|
|
76
76
|
#define __disable_tail_calls
|
|
77
77
|
#endif
|
|
78
|
+
#if __has_attribute(not_tail_called)
|
|
79
|
+
#define __not_tail_called __attribute__((__not_tail_called__))
|
|
80
|
+
#else
|
|
81
|
+
#define __not_tail_called
|
|
82
|
+
#endif
|
|
78
83
|
#if __has_attribute(warn_unused_result)
|
|
79
84
|
#define __result_use_check __attribute__((__warn_unused_result__))
|
|
80
85
|
#else
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
|
|
5
|
+
*
|
|
6
|
+
* This file contains Original Code and/or Modifications of Original Code
|
|
7
|
+
* as defined in and that are subject to the Apple Public Source License
|
|
8
|
+
* Version 2.0 (the 'License'). You may not use this file except in
|
|
9
|
+
* compliance with the License. The rights granted to you under the License
|
|
10
|
+
* may not be used to create, or enable the creation or redistribution of,
|
|
11
|
+
* unlawful or unlicensed copies of an Apple operating system, or to
|
|
12
|
+
* circumvent, violate, or enable the circumvention or violation of, any
|
|
13
|
+
* terms of an Apple operating system software license agreement.
|
|
14
|
+
*
|
|
15
|
+
* Please obtain a copy of the License at
|
|
16
|
+
* http://www.opensource.apple.com/apsl/ and read it before using this file.
|
|
17
|
+
*
|
|
18
|
+
* The Original Code and all software distributed under the License are
|
|
19
|
+
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
|
20
|
+
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
|
21
|
+
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
|
22
|
+
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
|
23
|
+
* Please see the License for the specific language governing rights and
|
|
24
|
+
* limitations under the License.
|
|
25
|
+
*
|
|
26
|
+
* @APPLE_OSREFERENCE_LICENSE_HEADER_END@
|
|
27
|
+
*/
|
|
28
|
+
/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */
|
|
29
|
+
/*-
|
|
30
|
+
* Copyright (c) 1982, 1986, 1990, 1993, 1994
|
|
31
|
+
* The Regents of the University of California. All rights reserved.
|
|
32
|
+
*
|
|
33
|
+
* Redistribution and use in source and binary forms, with or without
|
|
34
|
+
* modification, are permitted provided that the following conditions
|
|
35
|
+
* are met:
|
|
36
|
+
* 1. Redistributions of source code must retain the above copyright
|
|
37
|
+
* notice, this list of conditions and the following disclaimer.
|
|
38
|
+
* 2. Redistributions in binary form must reproduce the above copyright
|
|
39
|
+
* notice, this list of conditions and the following disclaimer in the
|
|
40
|
+
* documentation and/or other materials provided with the distribution.
|
|
41
|
+
* 3. All advertising materials mentioning features or use of this software
|
|
42
|
+
* must display the following acknowledgement:
|
|
43
|
+
* This product includes software developed by the University of
|
|
44
|
+
* California, Berkeley and its contributors.
|
|
45
|
+
* 4. Neither the name of the University nor the names of its contributors
|
|
46
|
+
* may be used to endorse or promote products derived from this software
|
|
47
|
+
* without specific prior written permission.
|
|
48
|
+
*
|
|
49
|
+
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
|
50
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
51
|
+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
52
|
+
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|
53
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
54
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
55
|
+
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
56
|
+
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
57
|
+
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
58
|
+
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
59
|
+
* SUCH DAMAGE.
|
|
60
|
+
*
|
|
61
|
+
* @(#)ioccom.h 8.2 (Berkeley) 3/28/94
|
|
62
|
+
*/
|
|
63
|
+
|
|
64
|
+
#ifndef _SYS_IOCCOM_H_
|
|
65
|
+
#define _SYS_IOCCOM_H_
|
|
66
|
+
|
|
67
|
+
#include <sys/_types.h>
|
|
68
|
+
|
|
69
|
+
/*
|
|
70
|
+
* Ioctl's have the command encoded in the lower word, and the size of
|
|
71
|
+
* any in or out parameters in the upper word. The high 3 bits of the
|
|
72
|
+
* upper word are used to encode the in/out status of the parameter.
|
|
73
|
+
*/
|
|
74
|
+
#define IOCPARM_MASK 0x1fff /* parameter length, at most 13 bits */
|
|
75
|
+
#define IOCPARM_LEN(x) (((x) >> 16) & IOCPARM_MASK)
|
|
76
|
+
#define IOCBASECMD(x) ((x) & ~(IOCPARM_MASK << 16))
|
|
77
|
+
#define IOCGROUP(x) (((x) >> 8) & 0xff)
|
|
78
|
+
|
|
79
|
+
#define IOCPARM_MAX (IOCPARM_MASK + 1) /* max size of ioctl args */
|
|
80
|
+
/* no parameters */
|
|
81
|
+
#define IOC_VOID (__uint32_t)0x20000000
|
|
82
|
+
/* copy parameters out */
|
|
83
|
+
#define IOC_OUT (__uint32_t)0x40000000
|
|
84
|
+
/* copy parameters in */
|
|
85
|
+
#define IOC_IN (__uint32_t)0x80000000
|
|
86
|
+
/* copy parameters in and out */
|
|
87
|
+
#define IOC_INOUT (IOC_IN|IOC_OUT)
|
|
88
|
+
/* mask for IN/OUT/VOID */
|
|
89
|
+
#define IOC_DIRMASK (__uint32_t)0xe0000000
|
|
90
|
+
|
|
91
|
+
#define _IOC(inout, group, num, len) \
|
|
92
|
+
(inout | ((len & IOCPARM_MASK) << 16) | ((group) << 8) | (num))
|
|
93
|
+
#define _IO(g, n) _IOC(IOC_VOID, (g), (n), 0)
|
|
94
|
+
#define _IOR(g, n, t) _IOC(IOC_OUT, (g), (n), sizeof(t))
|
|
95
|
+
#define _IOW(g, n, t) _IOC(IOC_IN, (g), (n), sizeof(t))
|
|
96
|
+
/* this should be _IORW, but stdio got there first */
|
|
97
|
+
#define _IOWR(g, n, t) _IOC(IOC_INOUT, (g), (n), sizeof(t))
|
|
98
|
+
|
|
99
|
+
#endif /* !_SYS_IOCCOM_H_ */
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
|
|
5
|
+
*
|
|
6
|
+
* This file contains Original Code and/or Modifications of Original Code
|
|
7
|
+
* as defined in and that are subject to the Apple Public Source License
|
|
8
|
+
* Version 2.0 (the 'License'). You may not use this file except in
|
|
9
|
+
* compliance with the License. The rights granted to you under the License
|
|
10
|
+
* may not be used to create, or enable the creation or redistribution of,
|
|
11
|
+
* unlawful or unlicensed copies of an Apple operating system, or to
|
|
12
|
+
* circumvent, violate, or enable the circumvention or violation of, any
|
|
13
|
+
* terms of an Apple operating system software license agreement.
|
|
14
|
+
*
|
|
15
|
+
* Please obtain a copy of the License at
|
|
16
|
+
* http://www.opensource.apple.com/apsl/ and read it before using this file.
|
|
17
|
+
*
|
|
18
|
+
* The Original Code and all software distributed under the License are
|
|
19
|
+
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
|
20
|
+
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
|
21
|
+
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
|
22
|
+
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
|
23
|
+
* Please see the License for the specific language governing rights and
|
|
24
|
+
* limitations under the License.
|
|
25
|
+
*
|
|
26
|
+
* @APPLE_OSREFERENCE_LICENSE_HEADER_END@
|
|
27
|
+
*/
|
|
28
|
+
/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */
|
|
29
|
+
/*-
|
|
30
|
+
* Copyright (c) 1982, 1986, 1988, 1993
|
|
31
|
+
* The Regents of the University of California. All rights reserved.
|
|
32
|
+
*
|
|
33
|
+
* Redistribution and use in source and binary forms, with or without
|
|
34
|
+
* modification, are permitted provided that the following conditions
|
|
35
|
+
* are met:
|
|
36
|
+
* 1. Redistributions of source code must retain the above copyright
|
|
37
|
+
* notice, this list of conditions and the following disclaimer.
|
|
38
|
+
* 2. Redistributions in binary form must reproduce the above copyright
|
|
39
|
+
* notice, this list of conditions and the following disclaimer in the
|
|
40
|
+
* documentation and/or other materials provided with the distribution.
|
|
41
|
+
* 4. Neither the name of the University nor the names of its contributors
|
|
42
|
+
* may be used to endorse or promote products derived from this software
|
|
43
|
+
* without specific prior written permission.
|
|
44
|
+
*
|
|
45
|
+
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
|
46
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
47
|
+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
48
|
+
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|
49
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
50
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
51
|
+
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
52
|
+
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
53
|
+
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
54
|
+
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
55
|
+
* SUCH DAMAGE.
|
|
56
|
+
*
|
|
57
|
+
* @(#)syslog.h 8.1 (Berkeley) 6/2/93
|
|
58
|
+
* $FreeBSD: src/sys/sys/syslog.h,v 1.27.2.1.4.1 2010/06/14 02:09:06 kensmith Exp $
|
|
59
|
+
*/
|
|
60
|
+
|
|
61
|
+
#ifndef _SYS_SYSLOG_H_
|
|
62
|
+
#define _SYS_SYSLOG_H_
|
|
63
|
+
|
|
64
|
+
#include <sys/appleapiopts.h>
|
|
65
|
+
#include <sys/cdefs.h>
|
|
66
|
+
|
|
67
|
+
#define _PATH_LOG "/var/run/syslog"
|
|
68
|
+
|
|
69
|
+
/*
|
|
70
|
+
* priorities/facilities are encoded into a single 32-bit quantity, where the
|
|
71
|
+
* bottom 3 bits are the priority (0-7) and the top 28 bits are the facility
|
|
72
|
+
* (0-big number). Both the priorities and the facilities map roughly
|
|
73
|
+
* one-to-one to strings in the syslogd(8) source code. This mapping is
|
|
74
|
+
* included in this file.
|
|
75
|
+
*
|
|
76
|
+
* priorities (these are ordered)
|
|
77
|
+
*/
|
|
78
|
+
#define LOG_EMERG 0 /* system is unusable */
|
|
79
|
+
#define LOG_ALERT 1 /* action must be taken immediately */
|
|
80
|
+
#define LOG_CRIT 2 /* critical conditions */
|
|
81
|
+
#define LOG_ERR 3 /* error conditions */
|
|
82
|
+
#define LOG_WARNING 4 /* warning conditions */
|
|
83
|
+
#define LOG_NOTICE 5 /* normal but significant condition */
|
|
84
|
+
#define LOG_INFO 6 /* informational */
|
|
85
|
+
#define LOG_DEBUG 7 /* debug-level messages */
|
|
86
|
+
|
|
87
|
+
#define LOG_PRIMASK 0x07 /* mask to extract priority part (internal) */
|
|
88
|
+
/* extract priority */
|
|
89
|
+
#define LOG_PRI(p) ((p) & LOG_PRIMASK)
|
|
90
|
+
#define LOG_MAKEPRI(fac, pri) ((fac) | (pri))
|
|
91
|
+
|
|
92
|
+
#ifdef SYSLOG_NAMES
|
|
93
|
+
#define INTERNAL_NOPRI 0x10 /* the "no priority" priority */
|
|
94
|
+
/* mark "facility" */
|
|
95
|
+
#define INTERNAL_MARK LOG_MAKEPRI((LOG_NFACILITIES<<3), 0)
|
|
96
|
+
typedef struct _code {
|
|
97
|
+
const char *c_name;
|
|
98
|
+
int c_val;
|
|
99
|
+
} CODE;
|
|
100
|
+
|
|
101
|
+
CODE prioritynames[] = {
|
|
102
|
+
{ "alert", LOG_ALERT, },
|
|
103
|
+
{ "crit", LOG_CRIT, },
|
|
104
|
+
{ "debug", LOG_DEBUG, },
|
|
105
|
+
{ "emerg", LOG_EMERG, },
|
|
106
|
+
{ "err", LOG_ERR, },
|
|
107
|
+
{ "error", LOG_ERR, }, /* DEPRECATED */
|
|
108
|
+
{ "info", LOG_INFO, },
|
|
109
|
+
{ "none", INTERNAL_NOPRI, }, /* INTERNAL */
|
|
110
|
+
{ "notice", LOG_NOTICE, },
|
|
111
|
+
{ "panic", LOG_EMERG, }, /* DEPRECATED */
|
|
112
|
+
{ "warn", LOG_WARNING, }, /* DEPRECATED */
|
|
113
|
+
{ "warning", LOG_WARNING, },
|
|
114
|
+
{ NULL, -1, }
|
|
115
|
+
};
|
|
116
|
+
#endif
|
|
117
|
+
|
|
118
|
+
/* facility codes */
|
|
119
|
+
#define LOG_KERN (0<<3) /* kernel messages */
|
|
120
|
+
#define LOG_USER (1<<3) /* random user-level messages */
|
|
121
|
+
#define LOG_MAIL (2<<3) /* mail system */
|
|
122
|
+
#define LOG_DAEMON (3<<3) /* system daemons */
|
|
123
|
+
#define LOG_AUTH (4<<3) /* authorization messages */
|
|
124
|
+
#define LOG_SYSLOG (5<<3) /* messages generated internally by syslogd */
|
|
125
|
+
#define LOG_LPR (6<<3) /* line printer subsystem */
|
|
126
|
+
#define LOG_NEWS (7<<3) /* network news subsystem */
|
|
127
|
+
#define LOG_UUCP (8<<3) /* UUCP subsystem */
|
|
128
|
+
#define LOG_CRON (9<<3) /* clock daemon */
|
|
129
|
+
#define LOG_AUTHPRIV (10<<3) /* authorization messages (private) */
|
|
130
|
+
/* Facility #10 clashes in DEC UNIX, where */
|
|
131
|
+
/* it's defined as LOG_MEGASAFE for AdvFS */
|
|
132
|
+
/* event logging. */
|
|
133
|
+
#define LOG_FTP (11<<3) /* ftp daemon */
|
|
134
|
+
//#define LOG_NTP (12<<3) /* NTP subsystem */
|
|
135
|
+
//#define LOG_SECURITY (13<<3) /* security subsystems (firewalling, etc.) */
|
|
136
|
+
//#define LOG_CONSOLE (14<<3) /* /dev/console output */
|
|
137
|
+
#define LOG_NETINFO (12<<3) /* NetInfo */
|
|
138
|
+
#define LOG_REMOTEAUTH (13<<3) /* remote authentication/authorization */
|
|
139
|
+
#define LOG_INSTALL (14<<3) /* installer subsystem */
|
|
140
|
+
#define LOG_RAS (15<<3) /* Remote Access Service (VPN / PPP) */
|
|
141
|
+
|
|
142
|
+
/* other codes through 15 reserved for system use */
|
|
143
|
+
#define LOG_LOCAL0 (16<<3) /* reserved for local use */
|
|
144
|
+
#define LOG_LOCAL1 (17<<3) /* reserved for local use */
|
|
145
|
+
#define LOG_LOCAL2 (18<<3) /* reserved for local use */
|
|
146
|
+
#define LOG_LOCAL3 (19<<3) /* reserved for local use */
|
|
147
|
+
#define LOG_LOCAL4 (20<<3) /* reserved for local use */
|
|
148
|
+
#define LOG_LOCAL5 (21<<3) /* reserved for local use */
|
|
149
|
+
#define LOG_LOCAL6 (22<<3) /* reserved for local use */
|
|
150
|
+
#define LOG_LOCAL7 (23<<3) /* reserved for local use */
|
|
151
|
+
|
|
152
|
+
#define LOG_LAUNCHD (24<<3) /* launchd - general bootstrap daemon */
|
|
153
|
+
|
|
154
|
+
#define LOG_NFACILITIES 25 /* current number of facilities */
|
|
155
|
+
#define LOG_FACMASK 0x03f8 /* mask to extract facility part */
|
|
156
|
+
/* facility of pri */
|
|
157
|
+
#define LOG_FAC(p) (((p) & LOG_FACMASK) >> 3)
|
|
158
|
+
|
|
159
|
+
#ifdef SYSLOG_NAMES
|
|
160
|
+
CODE facilitynames[] = {
|
|
161
|
+
{ "auth", LOG_AUTH, },
|
|
162
|
+
{ "authpriv", LOG_AUTHPRIV, },
|
|
163
|
+
{ "cron", LOG_CRON, },
|
|
164
|
+
{ "daemon", LOG_DAEMON, },
|
|
165
|
+
{ "ftp", LOG_FTP, },
|
|
166
|
+
{ "install", LOG_INSTALL },
|
|
167
|
+
{ "kern", LOG_KERN, },
|
|
168
|
+
{ "lpr", LOG_LPR, },
|
|
169
|
+
{ "mail", LOG_MAIL, },
|
|
170
|
+
{ "mark", INTERNAL_MARK, }, /* INTERNAL */
|
|
171
|
+
{ "netinfo", LOG_NETINFO, },
|
|
172
|
+
{ "ras", LOG_RAS },
|
|
173
|
+
{ "remoteauth", LOG_REMOTEAUTH },
|
|
174
|
+
{ "news", LOG_NEWS, },
|
|
175
|
+
{ "security", LOG_AUTH }, /* DEPRECATED */
|
|
176
|
+
{ "syslog", LOG_SYSLOG, },
|
|
177
|
+
{ "user", LOG_USER, },
|
|
178
|
+
{ "uucp", LOG_UUCP, },
|
|
179
|
+
{ "local0", LOG_LOCAL0, },
|
|
180
|
+
{ "local1", LOG_LOCAL1, },
|
|
181
|
+
{ "local2", LOG_LOCAL2, },
|
|
182
|
+
{ "local3", LOG_LOCAL3, },
|
|
183
|
+
{ "local4", LOG_LOCAL4, },
|
|
184
|
+
{ "local5", LOG_LOCAL5, },
|
|
185
|
+
{ "local6", LOG_LOCAL6, },
|
|
186
|
+
{ "local7", LOG_LOCAL7, },
|
|
187
|
+
{ "launchd", LOG_LAUNCHD },
|
|
188
|
+
{ NULL, -1, }
|
|
189
|
+
};
|
|
190
|
+
#endif
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
/*
|
|
194
|
+
* arguments to setlogmask.
|
|
195
|
+
*/
|
|
196
|
+
#define LOG_MASK(pri) (1 << (pri)) /* mask for one priority */
|
|
197
|
+
#define LOG_UPTO(pri) ((1 << ((pri)+1)) - 1) /* all priorities through pri */
|
|
198
|
+
|
|
199
|
+
/*
|
|
200
|
+
* Option flags for openlog.
|
|
201
|
+
*
|
|
202
|
+
* LOG_ODELAY no longer does anything.
|
|
203
|
+
* LOG_NDELAY is the inverse of what it used to be.
|
|
204
|
+
*/
|
|
205
|
+
#define LOG_PID 0x01 /* log the pid with each message */
|
|
206
|
+
#define LOG_CONS 0x02 /* log on the console if errors in sending */
|
|
207
|
+
#define LOG_ODELAY 0x04 /* delay open until first syslog() (default) */
|
|
208
|
+
#define LOG_NDELAY 0x08 /* don't delay open */
|
|
209
|
+
#define LOG_NOWAIT 0x10 /* don't wait for console forks: DEPRECATED */
|
|
210
|
+
#define LOG_PERROR 0x20 /* log to stderr as well */
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
/*
|
|
214
|
+
* Don't use va_list in the vsyslog() prototype. Va_list is typedef'd in two
|
|
215
|
+
* places (<machine/varargs.h> and <machine/stdarg.h>), so if we include one
|
|
216
|
+
* of them here we may collide with the utility's includes. It's unreasonable
|
|
217
|
+
* for utilities to have to include one of them to include syslog.h, so we get
|
|
218
|
+
* __va_list from <sys/_types.h> and use it.
|
|
219
|
+
*/
|
|
220
|
+
#include <sys/_types.h>
|
|
221
|
+
|
|
222
|
+
__BEGIN_DECLS
|
|
223
|
+
void closelog(void);
|
|
224
|
+
void openlog(const char *, int, int);
|
|
225
|
+
int setlogmask(int);
|
|
226
|
+
#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __DARWIN_C_LEVEL >= __DARWIN_C_FULL
|
|
227
|
+
void syslog(int, const char *, ...) __DARWIN_ALIAS_STARTING(__MAC_10_13, __IPHONE_NA, __DARWIN_EXTSN(syslog)) __printflike(2, 3) __not_tail_called;
|
|
228
|
+
#else
|
|
229
|
+
void syslog(int, const char *, ...) __printflike(2, 3) __not_tail_called;
|
|
230
|
+
#endif
|
|
231
|
+
#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
|
|
232
|
+
void vsyslog(int, const char *, __darwin_va_list) __printflike(2, 0) __not_tail_called;
|
|
233
|
+
#endif
|
|
234
|
+
__END_DECLS
|
|
235
|
+
|
|
236
|
+
#endif /* !_SYS_SYSLOG_H_ */
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* @APPLE_LICENSE_HEADER_START@
|
|
5
|
+
*
|
|
6
|
+
* This file contains Original Code and/or Modifications of Original Code
|
|
7
|
+
* as defined in and that are subject to the Apple Public Source License
|
|
8
|
+
* Version 2.0 (the 'License'). You may not use this file except in
|
|
9
|
+
* compliance with the License. Please obtain a copy of the License at
|
|
10
|
+
* http://www.opensource.apple.com/apsl/ and read it before using this
|
|
11
|
+
* file.
|
|
12
|
+
*
|
|
13
|
+
* The Original Code and all software distributed under the License are
|
|
14
|
+
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
|
15
|
+
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
|
|
16
|
+
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
|
|
18
|
+
* Please see the License for the specific language governing rights and
|
|
19
|
+
* limitations under the License.
|
|
20
|
+
*
|
|
21
|
+
* @APPLE_LICENSE_HEADER_END@
|
|
22
|
+
*/
|
|
23
|
+
#include <sys/syslog.h>
|
|
24
|
+
|
|
@@ -5,8 +5,10 @@
|
|
|
5
5
|
#include_next <fcntl.h>
|
|
6
6
|
#include <sys/cdefs.h>
|
|
7
7
|
// darwin's path and cache commands and file security records. no installed
|
|
8
|
-
// libc command shares F_GETPATH's or F_NOCACHE's number
|
|
9
|
-
//
|
|
8
|
+
// libc command shares F_GETPATH's or F_NOCACHE's number: the darwin provider
|
|
9
|
+
// answers F_GETPATH from the path it recorded when the guest opened the
|
|
10
|
+
// descriptor, and the installed libc refuses F_NOCACHE with EINVAL since a wasi
|
|
11
|
+
// descriptor has no cache control.
|
|
10
12
|
#define F_GETPATH 50 /* return the full path of the fd */
|
|
11
13
|
#define F_NOCACHE 48 /* turn data caching off/on for this fd */
|
|
12
14
|
|
|
@@ -2,7 +2,12 @@
|
|
|
2
2
|
// the installed libc owns FILE. darwin's stdio.h guard stands for it, so
|
|
3
3
|
// darwin's _stdio.h adds nothing and xlocale.h declares the locale variants
|
|
4
4
|
// in xlocale/_stdio.h; darwin's _stdio.h also brings its availability macros.
|
|
5
|
+
// the installed libc's fpos_t is a 16-byte union while darwin's is Int64;
|
|
6
|
+
// darwin's swift overlay owns the public name, so the installed one hides
|
|
7
|
+
// under a wasi-spelled name (ftw.h pattern).
|
|
8
|
+
#define fpos_t __peach_wasi_fpos_t
|
|
5
9
|
#include_next <stdio.h>
|
|
10
|
+
#undef fpos_t
|
|
6
11
|
#include <Availability.h>
|
|
7
12
|
#define _STDIO_H_
|
|
8
13
|
#ifdef _USE_EXTENDED_LOCALES_
|
|
@@ -10,3 +15,22 @@
|
|
|
10
15
|
#endif
|
|
11
16
|
// darwin's rename flags and renamex_np, from darwin's own sys/stdio.h.
|
|
12
17
|
#include <sys/stdio.h>
|
|
18
|
+
// the installed libc withholds popen ("WASI has no popen") and knows no
|
|
19
|
+
// sys_nerr. the declarations below are darwin's own _stdio.h spellings with
|
|
20
|
+
// darwin's level guards, answered by the darwin records providers: popen and
|
|
21
|
+
// pclose fail as one process that starts no children must, and sys_nerr with
|
|
22
|
+
// sys_errlist mirror the installed libc's 77-message table, whose numbers are
|
|
23
|
+
// wasi's 1 through 76 rather than darwin's.
|
|
24
|
+
#include <sys/cdefs.h>
|
|
25
|
+
#if __DARWIN_C_LEVEL >= 199209L
|
|
26
|
+
__BEGIN_DECLS
|
|
27
|
+
int pclose(FILE *) __swift_unavailable("Use posix_spawn APIs or NSTask instead. (On iOS, process spawning is unavailable.)");
|
|
28
|
+
FILE *popen(const char *, const char *) __swift_unavailable("Use posix_spawn APIs or NSTask instead. (On iOS, process spawning is unavailable.)");
|
|
29
|
+
__END_DECLS
|
|
30
|
+
#endif
|
|
31
|
+
#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
|
|
32
|
+
__BEGIN_DECLS
|
|
33
|
+
extern __const int sys_nerr;
|
|
34
|
+
extern __const char *__const sys_errlist[];
|
|
35
|
+
__END_DECLS
|
|
36
|
+
#endif
|
|
@@ -1,19 +1,44 @@
|
|
|
1
1
|
#pragma once
|
|
2
|
+
// the installed libc keeps its stdlib storage and every declaration it shares
|
|
3
|
+
// with darwin; only what it lacks or declares differently joins it here, and
|
|
4
|
+
// only where a genuine provider answers, under apple's own visibility guards.
|
|
2
5
|
// realpath binds to darwin's provider, which fills at most darwin's 1024-byte
|
|
3
|
-
// PATH_MAX where the installed libc's fills up to 4096.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
#include <sys/wait.h>
|
|
9
|
-
#endif
|
|
6
|
+
// PATH_MAX where the installed libc's fills up to 4096. realpath and setstate
|
|
7
|
+
// differ, so the installed declarations are renamed out of the way and
|
|
8
|
+
// darwin's exact ones follow, over the installed libc's symbols. the legacy
|
|
9
|
+
// converters bind to the installed libc's symbols, which share darwin's
|
|
10
|
+
// signatures.
|
|
10
11
|
// darwin's stdlib.h guard, which xlocale.h reads to declare the locale
|
|
11
12
|
// variants in xlocale/_stdlib.h.
|
|
13
|
+
#define setstate __peach_darwin_alias_setstate
|
|
14
|
+
#define realpath __peach_darwin_alias_realpath
|
|
15
|
+
#include_next <stdlib.h>
|
|
16
|
+
#undef setstate
|
|
17
|
+
#undef realpath
|
|
18
|
+
#include <sys/cdefs.h>
|
|
19
|
+
#include <Availability.h>
|
|
12
20
|
#define _STDLIB_H_
|
|
13
21
|
__BEGIN_DECLS
|
|
22
|
+
#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
|
|
14
23
|
void *reallocf(void *__ptr, size_t __size);
|
|
24
|
+
void srandomdev(void);
|
|
25
|
+
#endif
|
|
26
|
+
#ifndef _ANSI_SOURCE
|
|
15
27
|
char *realpath(const char *__restrict, char *__restrict) __asm__("__peach_darwin_realpath");
|
|
28
|
+
char *setstate(const char *);
|
|
29
|
+
char *ecvt(double, int, int *__restrict, int *__restrict);
|
|
30
|
+
char *fcvt(double, int, int *__restrict, int *__restrict);
|
|
31
|
+
char *gcvt(double, int, char *);
|
|
32
|
+
#endif
|
|
33
|
+
#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
|
|
34
|
+
#ifdef __BLOCKS__
|
|
35
|
+
int atexit_b(void (^ _Nonnull)(void)) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2);
|
|
36
|
+
#endif
|
|
37
|
+
#endif
|
|
16
38
|
__END_DECLS
|
|
17
39
|
#ifdef _USE_EXTENDED_LOCALES_
|
|
18
40
|
#include <xlocale/_stdlib.h>
|
|
19
41
|
#endif
|
|
42
|
+
#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
|
|
43
|
+
#include <sys/wait.h>
|
|
44
|
+
#endif
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
// the installed libc's file.h keeps darwin's flock constants and declaration.
|
|
3
|
+
// darwin's mmap constants reach a unit through sys/mman.h alone, which sqlite
|
|
4
|
+
// skips when it defines SQLITE_WASI yet still compiles its mapped-file code,
|
|
5
|
+
// so they arrive with the header it includes whenever it locks as darwin does.
|
|
6
|
+
#include_next <sys/file.h>
|
|
7
|
+
#include <sys/mman.h>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
// the installed libc's ioctl.h declares no request encoding; darwin's includes
|
|
3
|
+
// ioccom.h for the _IO, _IOR, _IOW and _IOWR macros that drivers and file
|
|
4
|
+
// system selectors build requests with.
|
|
5
|
+
#include_next <sys/ioctl.h>
|
|
6
|
+
#include <sys/ioccom.h>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
// the installed libc's sys/syscall.h is empty ("WASI has no syscall"). the
|
|
3
|
+
// numbers below are darwin's sys/syscall.h values for exactly the calls the
|
|
4
|
+
// reached original units make: glog writes raw logs through SYS_write and
|
|
5
|
+
// probes SYS_gettid, tolerating its failure. numbers no reached unit calls
|
|
6
|
+
// stay undeclared.
|
|
7
|
+
#include_next <sys/syscall.h>
|
|
8
|
+
#define SYS_write 4
|
|
9
|
+
#define SYS_gettid 286
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
// the installed libc compiles futimes out; darwin declares it, and the darwin
|
|
3
|
+
// provider answers it over futimens.
|
|
4
|
+
#include_next <sys/time.h>
|
|
5
|
+
#include <sys/cdefs.h>
|
|
6
|
+
__BEGIN_DECLS
|
|
7
|
+
#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
|
|
8
|
+
int futimes(int, const struct timeval *);
|
|
9
|
+
#endif
|
|
10
|
+
__END_DECLS
|
|
@@ -3,9 +3,11 @@
|
|
|
3
3
|
// undeclared because wasi has no processes or users; darwin declares them for
|
|
4
4
|
// every process. it leaves dup and dup2 undeclared because wasi cannot
|
|
5
5
|
// duplicate a descriptor; darwin declares them, and libc's descriptor table
|
|
6
|
-
// defines them.
|
|
7
|
-
//
|
|
8
|
-
//
|
|
6
|
+
// defines them. the installed libc withholds syscall ("WASI has no
|
|
7
|
+
// processes"); it is declared for the darwin numbers the reached units call.
|
|
8
|
+
// darwin's cancellation points bind to the darwin provider, which acts on a
|
|
9
|
+
// pending cancel first, and getcwd binds to the provider that refuses an
|
|
10
|
+
// empty buffer as darwin does.
|
|
9
11
|
#include_next <unistd.h>
|
|
10
12
|
// darwin unistd.h includes Availability.h, which defines __API_AVAILABLE for
|
|
11
13
|
// headers such as vImage_Types.h that only include os/availability.h.
|
|
@@ -18,9 +20,14 @@ uid_t geteuid(void);
|
|
|
18
20
|
gid_t getgid(void);
|
|
19
21
|
uid_t getuid(void);
|
|
20
22
|
int issetugid(void);
|
|
23
|
+
int fsctl(const char *, unsigned long, void *, unsigned int);
|
|
24
|
+
int ffsctl(int, unsigned long, void *, unsigned int);
|
|
21
25
|
int pthread_getugid_np(uid_t *, gid_t *);
|
|
22
26
|
int dup(int);
|
|
23
27
|
int dup2(int, int);
|
|
28
|
+
#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
|
|
29
|
+
long syscall(long, ...);
|
|
30
|
+
#endif
|
|
24
31
|
int close(int) __asm__("__peach_darwin_close");
|
|
25
32
|
ssize_t read(int, void *, size_t) __asm__("__peach_darwin_read");
|
|
26
33
|
ssize_t write(int, const void *, size_t) __asm__("__peach_darwin_write");
|
|
@@ -30,4 +37,6 @@ int fsync(int) __asm__("__peach_darwin_fsync");
|
|
|
30
37
|
unsigned sleep(unsigned) __asm__("__peach_darwin_sleep");
|
|
31
38
|
int usleep(unsigned) __asm__("__peach_darwin_usleep");
|
|
32
39
|
char *getcwd(char *, size_t) __asm__("__peach_darwin_getcwd");
|
|
40
|
+
int access(const char *, int) __asm__("__peach_darwin_access");
|
|
41
|
+
int chdir(const char *) __asm__("__peach_darwin_chdir");
|
|
33
42
|
__END_DECLS
|
package/sdk/native-hashes.json
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"usr/include/limits.h": "4e09d7a2307887fe787c65e31d63747720c4d462b7ba3bf8f45e401d74f0b246",
|
|
11
11
|
"usr/include/machine/limits.h": "50345f1ab843fca787a38c552a84177e678d79dab86e714434f94f2546839357",
|
|
12
12
|
"usr/include/machine/param.h": "9a03a8edbbe2c4718553013b97dbac07113610350f983994aa53db0db07e0bb5",
|
|
13
|
+
"usr/include/sys/ioccom.h": "b3284ebc39413010e71d77efbae1b5ec71d2cf0b3c9ae9f2095e7fe827976694",
|
|
13
14
|
"usr/include/sys/param.h": "10d7a9553d341c5bc0b473444802920a7ec2e6222281eeaeb61b32dfff29c4b4",
|
|
14
15
|
"usr/include/sys/syslimits.h": "170629c923b4ef2b7132dc8a9d71e9f010332bada56363f619b7c758e17d2c83",
|
|
15
16
|
"usr/include/Availability.h": "d39d74d343b5f3dc147525c5f4ba99c1ae9133bccc57eb6205a74d0ba99d92cb",
|
package/skills/contrast/SKILL.md
CHANGED
|
@@ -53,8 +53,9 @@ automation, inspecting the render tree, and managing sims.
|
|
|
53
53
|
| `peach ios` | start an iOS simulator |
|
|
54
54
|
| `peach android` | start an Android simulator |
|
|
55
55
|
| `peach remote` | run a prebuilt bundle on a remote simulator |
|
|
56
|
-
| `peach open` | load a target into the
|
|
56
|
+
| `peach open` | build native sources or load a target into the simulator |
|
|
57
57
|
| `peach preview` | publish an Expo project or bundle as a standalone preview |
|
|
58
|
+
| `peach package` | package one app as a standalone macOS app |
|
|
58
59
|
| `peach list` | list connected sims or available launch drivers |
|
|
59
60
|
| `peach use` | select a connected sim |
|
|
60
61
|
| `peach skill` | install and inspect bundled peach agent skills |
|
|
@@ -228,9 +228,13 @@ these throw `unsupported maestro verb: X`:
|
|
|
228
228
|
- **"missing environment variable for flow placeholder: FOO"** — pass
|
|
229
229
|
`--env FOO=bar` or export it. pick one mechanism per repo and document
|
|
230
230
|
it in the flow directory's README.
|
|
231
|
-
- **flow can't find an element** —
|
|
232
|
-
|
|
233
|
-
|
|
231
|
+
- **flow can't find an element** — inspect `peach get a11y` on the target
|
|
232
|
+
sim. On iOS, Maestro text selectors match the whole accessibility label,
|
|
233
|
+
value or input placeholder, including joined text groups. Rendered text
|
|
234
|
+
inside an accessible group is not a separate selector target. Use the
|
|
235
|
+
observed full name or an explicit regular expression such as `.*part.*`;
|
|
236
|
+
identifier selectors use testID. Android text selectors use the render
|
|
237
|
+
tree, so qualify an existing suite against the same native platform.
|
|
234
238
|
- **flow runs but nothing renders** — confirm the bundler your flow
|
|
235
239
|
targets is reachable and pass `--url <port>` or add `app: <port>`
|
|
236
240
|
frontmatter at the top of the YAML.
|
|
@@ -9,6 +9,9 @@ export function windowAdmission(): WindowAdmission | null {
|
|
|
9
9
|
encoding: 'utf8',
|
|
10
10
|
stdio: ['ignore', 'pipe', 'inherit'],
|
|
11
11
|
})
|
|
12
|
+
// a host without tm (a disposable guest) has no window registry to admit it
|
|
13
|
+
if (result.error && 'code' in result.error && result.error.code === 'ENOENT')
|
|
14
|
+
return null
|
|
12
15
|
if (result.error) throw result.error
|
|
13
16
|
if (result.status === 1) return null
|
|
14
17
|
if (result.status !== 0) throw new Error(`tm window ancestor exited ${result.status}`)
|
|
@@ -75,6 +75,23 @@ export function nativeAppIdentityFromAndroidManifest(
|
|
|
75
75
|
...(max === undefined ? {} : { maxSdkVersion: Number(max) }),
|
|
76
76
|
})
|
|
77
77
|
}
|
|
78
|
+
// one prebuild writes native.app.photoLibrary.addOnly as application meta-data
|
|
79
|
+
// once the merger has combined the app and linked libraries. resource
|
|
80
|
+
// references, placeholders and false stay uncertified like the Kotlin
|
|
81
|
+
// PackageManager read's default.
|
|
82
|
+
let androidPhotoLibraryAddOnly: true | undefined
|
|
83
|
+
for (const element of application.children) {
|
|
84
|
+
if (
|
|
85
|
+
element.name !== 'meta-data' ||
|
|
86
|
+
element.attributes[`${attribute}name`] !== 'one.photoLibrary.addOnly'
|
|
87
|
+
)
|
|
88
|
+
continue
|
|
89
|
+
// aapt2 parses true, True and TRUE as the boolean true
|
|
90
|
+
if (
|
|
91
|
+
/^(?:true|True|TRUE)$/.test(element.attributes[`${attribute}value`]?.trim() ?? '')
|
|
92
|
+
)
|
|
93
|
+
androidPhotoLibraryAddOnly = true
|
|
94
|
+
}
|
|
78
95
|
let label = application.attributes[`${attribute}label`]
|
|
79
96
|
let applicationName: string | null = null
|
|
80
97
|
if (label && !/\$\{|^[@?]/.test(label)) applicationName = label
|
|
@@ -126,6 +143,7 @@ export function nativeAppIdentityFromAndroidManifest(
|
|
|
126
143
|
bundleIdentifier,
|
|
127
144
|
platform: 'android',
|
|
128
145
|
androidManifestPermissions,
|
|
146
|
+
...(androidPhotoLibraryAddOnly === undefined ? {} : { androidPhotoLibraryAddOnly }),
|
|
129
147
|
}
|
|
130
148
|
}
|
|
131
149
|
|