peachsim 0.1.1876 → 0.1.1878

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.
Files changed (87) hide show
  1. package/cli/commands/inspect/settling.ts +10 -2
  2. package/detox/index.ts +7 -3
  3. package/dist-lib/agent-daemon-client.cjs +1 -1
  4. package/dist-lib/agent-events.cjs +1 -1
  5. package/dist-lib/attached-projects.cjs +1 -1
  6. package/dist-lib/auth/shared-session.cjs +1 -1
  7. package/dist-lib/backend-origin.cjs +1 -1
  8. package/dist-lib/beta.cjs +1 -1
  9. package/dist-lib/beta.mjs +1 -1
  10. package/dist-lib/bridge-constants.cjs +1 -1
  11. package/dist-lib/bridge-contract-input.cjs +1 -1
  12. package/dist-lib/bridge-contract-input.mjs +1 -1
  13. package/dist-lib/bridge-contract.cjs +1 -1
  14. package/dist-lib/bridge-contract.mjs +1 -1
  15. package/dist-lib/bundle-channel.cjs +8 -9
  16. package/dist-lib/capture-contract.cjs +1 -1
  17. package/dist-lib/capture-contract.mjs +1 -1
  18. package/dist-lib/cloud-contract.cjs +1 -1
  19. package/dist-lib/cloud-contract.mjs +1 -1
  20. package/dist-lib/cloud-test-args.cjs +1 -1
  21. package/dist-lib/cloud-test-args.mjs +1 -1
  22. package/dist-lib/cloud.cjs +1 -1
  23. package/dist-lib/cloud.mjs +1 -1
  24. package/dist-lib/config.cjs +1 -1
  25. package/dist-lib/config.mjs +1 -1
  26. package/dist-lib/detox/index.cjs +14 -6
  27. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  28. package/dist-lib/expo-swift-bundle.cjs +7 -8
  29. package/dist-lib/expo-swift-metadata.cjs +1 -1
  30. package/dist-lib/expo-swift-metadata.mjs +1 -1
  31. package/dist-lib/home-paths.cjs +1 -1
  32. package/dist-lib/host/bridge-host.cjs +8 -9
  33. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  34. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  35. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  36. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  37. package/dist-lib/host/websocket-proxy.cjs +1 -1
  38. package/dist-lib/index.cjs +12 -4
  39. package/dist-lib/jump-to-source-babel.cjs +1 -1
  40. package/dist-lib/jump-to-source-native.cjs +1 -1
  41. package/dist-lib/kotlin-host.cjs +1 -1
  42. package/dist-lib/menu.cjs +1 -1
  43. package/dist-lib/menu.mjs +1 -1
  44. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  45. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  46. package/dist-lib/metro-production-bundle.cjs +1 -1
  47. package/dist-lib/metro-production-bundle.mjs +1 -1
  48. package/dist-lib/metro.cjs +2 -2
  49. package/dist-lib/native-app-identity-project.cjs +2 -2
  50. package/dist-lib/native-app-identity-project.mjs +2 -2
  51. package/dist-lib/native-app-identity.cjs +1 -1
  52. package/dist-lib/native-app-identity.mjs +1 -1
  53. package/dist-lib/native-firebase-metadata.cjs +1 -1
  54. package/dist-lib/native-firebase-metadata.mjs +1 -1
  55. package/dist-lib/pdfium-raster.cjs +1 -1
  56. package/dist-lib/pdfium-raster.mjs +1 -1
  57. package/dist-lib/plist.cjs +1 -1
  58. package/dist-lib/plist.mjs +1 -1
  59. package/dist-lib/profiles.cjs +1 -1
  60. package/dist-lib/public-brand.cjs +1 -1
  61. package/dist-lib/public-origins-lib-esm.json +24 -24
  62. package/dist-lib/public-origins-lib.json +53 -53
  63. package/dist-lib/react-native-host-modules.cjs +1 -1
  64. package/dist-lib/react-native-host-modules.mjs +1 -1
  65. package/dist-lib/reap-browser.cjs +1 -1
  66. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  67. package/dist-lib/sdk.cjs +11 -3
  68. package/dist-lib/sdk.mjs +11 -3
  69. package/dist-lib/skills.cjs +18 -11
  70. package/dist-lib/swift-compile.cjs +5 -6
  71. package/dist-lib/swift-compile.mjs +5 -6
  72. package/dist-lib/swift-package.cjs +1 -1
  73. package/dist-lib/swift-package.mjs +1 -1
  74. package/dist-lib/swift-submit.cjs +1 -1
  75. package/dist-lib/swift-submit.mjs +1 -1
  76. package/dist-lib/swift-toolchain.cjs +1 -1
  77. package/dist-lib/swift.cjs +1 -1
  78. package/dist-lib/vite-swift.cjs +6 -7
  79. package/dist-lib/vite.cjs +1 -1
  80. package/dist-lib/worklet-executable.cjs +1 -1
  81. package/dist-lib/worklet-executable.mjs +1 -1
  82. package/package.json +1 -1
  83. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecImportExport.h +722 -0
  84. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecSharedCredential.h +119 -0
  85. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/Security.h +2 -0
  86. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIGestureRecognizer.h +1 -1
  87. package/src/swift-wasm-prune.ts +10 -16
@@ -0,0 +1,119 @@
1
+ /*
2
+ * Copyright (c) 2014-2020 Apple 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
+
24
+ /*!
25
+ @header SecSharedCredential
26
+ SecSharedCredential defines CoreFoundation-based functions for
27
+ storing and requesting shared password-based credentials.
28
+ These credentials are currently able to be shared with Safari and
29
+ applications which have a 'com.apple.developer.associated-domains'
30
+ entitlement that includes the domain being requested.
31
+ */
32
+
33
+ #ifndef _SECURITY_SECSHAREDCREDENTIAL_H_
34
+ #define _SECURITY_SECSHAREDCREDENTIAL_H_
35
+
36
+ #include <Security/SecItem.h>
37
+ #include <CoreFoundation/CoreFoundation.h>
38
+ #include <AvailabilityMacros.h>
39
+
40
+ __BEGIN_DECLS
41
+
42
+ CF_ASSUME_NONNULL_BEGIN
43
+ CF_IMPLICIT_BRIDGING_ENABLED
44
+
45
+ #ifdef __BLOCKS__
46
+
47
+ /*!
48
+ @enum Credential Key Constants
49
+ @discussion Predefined key constants used to get values in a dictionary
50
+ of credentials returned by SecRequestWebCredential.
51
+ @constant kSecSharedPassword Specifies a dictionary key whose value is a
52
+ shared password. You use this key to get a value of type CFStringRef
53
+ that contains a password.
54
+ */
55
+ extern const CFStringRef kSecSharedPassword
56
+ API_AVAILABLE(ios(8.0), macCatalyst(14.0), macos(11.0))
57
+ API_UNAVAILABLE(tvos, watchos);
58
+
59
+ /*!
60
+ @function SecAddSharedWebCredential
61
+ @abstract Asynchronously store (or update) a shared password for a website.
62
+ @param fqdn The fully qualified domain name of the website requiring the password.
63
+ @param account The account name associated with this password.
64
+ @param password The password to be stored. Pass NULL to remove a shared password if it exists.
65
+ @param completionHandler A block which will be invoked when the function has completed. If the shared password was successfully added (or removed), the CFErrorRef parameter passed to the block will be NULL. If the error parameter is non-NULL, an error occurred and the error reference will hold the result. Note: the error reference will be automatically released after this handler is called, though you may optionally retain it for as long as needed.
66
+ @discussion This function adds a shared password item which will be accessible by Safari and applications that have the specified fully-qualified domain name in their 'com.apple.developer.associated-domains' entitlement. If a shared password item already exists for the specified website and account, it will be updated with the provided password. To remove a password, pass NULL for the password parameter.
67
+
68
+ Note: since a request involving shared web credentials may potentially require user interaction or other verification to be approved, this function is dispatched asynchronously; your code provides a completion handler that will be called once the results (if any) are available.
69
+ */
70
+ void SecAddSharedWebCredential(CFStringRef fqdn, CFStringRef account, CFStringRef __nullable password,
71
+ void (^completionHandler)(CFErrorRef __nullable error))
72
+ API_DEPRECATED("Use ASCredentialDataManager.save(password:for:title:anchor:) (AuthenticationServices framework)",
73
+ ios(8.0, 26.2), macCatalyst(14.0, 26.2), macos(11.0, 26.2))
74
+ API_UNAVAILABLE(tvos, watchos);
75
+
76
+ /*!
77
+ @function SecRequestSharedWebCredential
78
+ @abstract Asynchronously obtain one or more shared passwords for a website.
79
+ @param fqdn (Optional) Fully qualified domain name of the website for which passwords are being requested. If NULL is passed in this argument, the domain name(s) listed in the calling application's 'com.apple.developer.associated-domains' entitlement are searched implicitly.
80
+ @param account (Optional) Account name for which passwords are being requested. The account may be NULL to request all shared credentials which are available for the site, allowing the caller to discover an existing account.
81
+ @param completionHandler A block which will be called to deliver the requested credentials. If no matching items were found, the credentials array will be empty, and the CFErrorRef parameter will provide the error result. Note: the credentials and error references will be automatically released after this handler is called, though you may optionally retain either for as long as needed.
82
+ @discussion This function requests one or more shared passwords for a given website, depending on whether the optional account parameter is supplied. To obtain results, the website specified in the fqdn parameter must be one which matches an entry in the calling application's 'com.apple.developer.associated-domains' entitlement.
83
+
84
+ If matching shared password items are found, the credentials provided to the completionHandler will be a CFArrayRef containing CFDictionaryRef entries. Each dictionary entry will contain the following pairs (see Security/SecItem.h):
85
+ key: kSecAttrServer value: CFStringRef (the website)
86
+ key: kSecAttrAccount value: CFStringRef (the account)
87
+ key: kSecSharedPassword value: CFStringRef (the password)
88
+
89
+ If the found item specifies a non-standard port number (i.e. other than 443 for https), the following key may also be present:
90
+ key: kSecAttrPort value: CFNumberRef (the port number)
91
+
92
+ Note: since a request involving shared web credentials may potentially require user interaction or other verification to be approved, this function is dispatched asynchronously; your code provides a completion handler that will be called once the results (if any) are available.
93
+ */
94
+ void SecRequestSharedWebCredential(CFStringRef __nullable fqdn, CFStringRef __nullable account,
95
+ void (^completionHandler)(CFArrayRef __nullable credentials, CFErrorRef __nullable error))
96
+ API_DEPRECATED("Use ASAuthorizationController to make an ASAuthorizationPasswordRequest (AuthenticationServices framework)",
97
+ ios(8.0,14.0), macCatalyst(14.0,14.0), macos(10.16,11.0))
98
+ API_UNAVAILABLE(tvos, watchos);
99
+
100
+ /*!
101
+ @function SecCreateSharedWebCredentialPassword
102
+ @abstract Returns a randomly generated password.
103
+ @return CFStringRef password in the form xxx-xxx-xxx-xxx where x is taken from the sets "abcdefghkmnopqrstuvwxy", "ABCDEFGHJKLMNPQRSTUVWXYZ", "3456789" with at least one character from each set being present.
104
+ */
105
+ __nullable
106
+ CFStringRef SecCreateSharedWebCredentialPassword(void)
107
+ API_AVAILABLE(ios(8.0), macCatalyst(14.0), macos(11.0))
108
+ API_UNAVAILABLE(tvos, watchos);
109
+
110
+
111
+ #endif /* __BLOCKS__ */
112
+
113
+ CF_IMPLICIT_BRIDGING_DISABLED
114
+ CF_ASSUME_NONNULL_END
115
+
116
+ __END_DECLS
117
+
118
+ #endif /* !_SECURITY_SECSHAREDCREDENTIAL_H_ */
119
+
@@ -14,3 +14,5 @@
14
14
  #include <Security/SecProtocolOptions.h>
15
15
  #include <Security/SecProtocolMetadata.h>
16
16
  #include <Security/SecRandom.h>
17
+ #include <Security/SecSharedCredential.h>
18
+ #include <Security/SecImportExport.h>
@@ -77,7 +77,7 @@ PEACH_SWIFT_CLASS(UIKitCore) @interface UIGestureRecognizer : NSObject
77
77
 
78
78
 
79
79
  API_UNAVAILABLE(watchos) NS_SWIFT_UI_ACTOR
80
- @protocol UIGestureRecognizerDelegate <NSObject>
80
+ PEACH_SWIFT_CLASS(UIKitCore) @protocol UIGestureRecognizerDelegate <NSObject>
81
81
  @optional
82
82
  // called when a gesture recognizer attempts to transition out of UIGestureRecognizerStatePossible. returning NO causes it to transition to UIGestureRecognizerStateFailed
83
83
  - (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer;
@@ -871,6 +871,14 @@ export function pruneSwiftWasmLink(
871
871
  throw new Error(`swift-wasm-prune: the build owns its sdk directory ${sdkWasiDir}`)
872
872
  const sdkObjsDir = ensureUnpackedSdkObjects(sdkWasiDir)
873
873
  const distDir = path.join(moduleRoot, 'lib')
874
+ // the app's own struct and class field descriptors stay: SwiftUI attaches
875
+ // @State and @StateObject by reflecting the app's view structs.
876
+ const dropsReflection = (obj: ParsedObject, name: string | undefined) =>
877
+ !!name &&
878
+ (name.startsWith('l__swift5_reflection_descriptor') ||
879
+ (name.startsWith('$s') &&
880
+ (name.endsWith('CMF') || name.endsWith('VMF')) &&
881
+ !(!obj.file.startsWith(distDir) && obj.file.endsWith('.swift.o'))))
874
882
 
875
883
  const prunedObjsDir = path.join(directory, '.peach-pruned-objs')
876
884
  fs.rmSync(prunedObjsDir, { recursive: true, force: true })
@@ -1339,15 +1347,7 @@ export function pruneSwiftWasmLink(
1339
1347
  }
1340
1348
 
1341
1349
  for (const symIdx of relocs) {
1342
- if (
1343
- obj.isDist &&
1344
- (obj.symNames[symIdx]?.startsWith('l__swift5_reflection_descriptor') ||
1345
- (obj.symNames[symIdx]?.startsWith('$s') &&
1346
- (obj.symNames[symIdx]!.endsWith('CMF') ||
1347
- obj.symNames[symIdx]!.endsWith('VMF'))))
1348
- ) {
1349
- continue
1350
- }
1350
+ if (obj.isDist && dropsReflection(obj, obj.symNames[symIdx])) continue
1351
1351
  const fl = obj.symFlags[symIdx]!
1352
1352
  const isUndef = (fl & 0x10) !== 0
1353
1353
  const isLocal = (fl & 0x03) === 0x02
@@ -1484,13 +1484,7 @@ export function pruneSwiftWasmLink(
1484
1484
  }
1485
1485
  } else if (r.ownerSymIdx !== -1) {
1486
1486
  if (dLive.has(r.ownerSymIdx)) {
1487
- if (
1488
- obj.isDist &&
1489
- (obj.symNames[r.rs]?.startsWith('l__swift5_reflection_descriptor') ||
1490
- (obj.symNames[r.rs]?.startsWith('$s') &&
1491
- (obj.symNames[r.rs]!.endsWith('CMF') ||
1492
- obj.symNames[r.rs]!.endsWith('VMF'))))
1493
- ) {
1487
+ if (obj.isDist && dropsReflection(obj, obj.symNames[r.rs])) {
1494
1488
  zeroDataRelocOffsets.push(r.ro)
1495
1489
  } else {
1496
1490
  keptDataRelocBytes.push(r.rawBytes)