peachsim 0.1.2676 → 0.1.2678
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-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 +2 -2
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +5 -5
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +3 -3
- package/dist-lib/bundle-channel.cjs +71 -13
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +3 -3
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +3 -3
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +2 -2
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +7 -7
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +5 -5
- package/dist-lib/detox/index.cjs +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/esm-chunks/{acorn-YQ2Y333V.mjs → acorn-6NTFJUZZ.mjs} +3 -3
- package/dist-lib/esm-chunks/{chunk-4Q6YODSW.mjs → chunk-AIYFJPNY.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-KLFBECKK.mjs → chunk-CJFXKD4K.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-25EMRCS4.mjs → chunk-CMANWSFL.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-3TL2TT2H.mjs → chunk-G3AHFHOI.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-626GTL22.mjs → chunk-GSXSCWPF.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-JSIHMPMM.mjs → chunk-I3BGDOHA.mjs} +4 -4
- package/dist-lib/esm-chunks/{chunk-D575CGCI.mjs → chunk-IKTQWJ7L.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-QRFI6Y4S.mjs → chunk-IMEMFDP7.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-B3U6FXEV.mjs → chunk-J6H64OJR.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-ZK5FTTPS.mjs → chunk-K4CJV7OT.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-QGE6LXQT.mjs → chunk-K6GTUB57.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-MPFHNHE7.mjs → chunk-K6SU54Z2.mjs} +6 -6
- package/dist-lib/esm-chunks/{chunk-S6J4D2JN.mjs → chunk-LYN5AZVF.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-LF6SZQV5.mjs → chunk-M3QSJPHD.mjs} +2 -2
- package/dist-lib/esm-chunks/{chunk-FVUPL6XV.mjs → chunk-P7HMXFSS.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-RADKK7SO.mjs → chunk-R62E444R.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-VBRL6FF3.mjs → chunk-SMMFE5TS.mjs} +3 -3
- package/dist-lib/esm-chunks/{chunk-DG6QGBQR.mjs → chunk-SQLLOTNA.mjs} +6 -6
- package/dist-lib/esm-chunks/{chunk-UANRG6RG.mjs → chunk-SSOIDYR6.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-FWXP663K.mjs → chunk-UZ6YCHZV.mjs} +5 -5
- package/dist-lib/esm-chunks/{chunk-VUPCH2NW.mjs → chunk-VA56TPD2.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-A35OFKUL.mjs → chunk-WD36IM6D.mjs} +15 -15
- package/dist-lib/esm-chunks/{chunk-HKPMHGF2.mjs → chunk-ZGONAGHL.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-5EH6JZZK.mjs → chunk-ZOQG2HXB.mjs} +1 -1
- package/dist-lib/esm-chunks/{metro-layout-parser-AVSCGHIP.mjs → metro-layout-parser-M2J34G5Z.mjs} +3 -3
- package/dist-lib/esm-chunks/{swift-package-prebuilt-WAUVHTJ6.mjs → swift-package-prebuilt-KS2JD6AP.mjs} +12 -12
- package/dist-lib/esm-chunks/{swift-sdk-app-module-SMITHJSE.mjs → swift-sdk-app-module-P4G7Q4TL.mjs} +16 -16
- package/dist-lib/esm-chunks/{swift-sdk-image-A3PUVC5O.mjs → swift-sdk-image-ZWJ25AHU.mjs} +16 -16
- package/dist-lib/esm-chunks/{swift-sdk-image-producer-5OLYXCL2.mjs → swift-sdk-image-producer-XJWWPDG5.mjs} +5 -5
- package/dist-lib/expo-swift-bundle.cjs +7 -5
- package/dist-lib/expo-swift-metadata.cjs +1 -1
- package/dist-lib/expo-swift-metadata.mjs +7 -7
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +104 -14
- package/dist-lib/host/fetch-proxy-handler.cjs +4 -4
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +2 -2
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +3 -3
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +3 -3
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +4 -4
- package/dist-lib/native-app-identity-project.cjs +1 -1
- package/dist-lib/native-app-identity-project.mjs +15 -15
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +6 -6
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +3 -3
- package/dist-lib/pdfium-raster.cjs +1 -1
- package/dist-lib/pdfium-raster.mjs +2 -2
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +3 -3
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +85 -85
- package/dist-lib/public-origins-lib.json +64 -64
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +2 -2
- package/dist-lib/reap-browser.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +1 -1
- package/dist-lib/sdk.mjs +8 -8
- package/dist-lib/skills.cjs +104 -14
- package/dist-lib/swift-compile.cjs +2 -2
- package/dist-lib/swift-compile.mjs +12 -12
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +3 -3
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +6 -6
- package/dist-lib/swift-svg-raster.cjs +1 -1
- package/dist-lib/swift-svg-raster.mjs +2 -2
- package/dist-lib/swift-toolchain.cjs +1 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vendor/@peculiar/x509.cjs +1 -1
- package/dist-lib/vendor/@ruby/prism/src/nodes.js.cjs +1 -1
- package/dist-lib/vendor/@ruby/prism/src/parsePrism.js.cjs +1 -1
- package/dist-lib/vendor/acorn.cjs +1 -1
- package/dist-lib/vendor/magic-string.cjs +1 -1
- package/dist-lib/vendor/stream-json.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/tokenizer/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/tokenizer/types.js.cjs +1 -1
- package/dist-lib/vendor/sucrase.cjs +1 -1
- package/dist-lib/vendor/terser.cjs +1 -1
- package/dist-lib/vendor/valibot.cjs +1 -1
- package/dist-lib/vendor/ws.cjs +1 -1
- package/dist-lib/vendor/zod.cjs +1 -1
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +3 -3
- package/package.json +1 -1
- package/sdk/ios/System/Library/Frameworks/AuthenticationServices.framework/Headers/ASAuthorization.h +24 -0
- package/sdk/ios/System/Library/Frameworks/AuthenticationServices.framework/Headers/ASAuthorizationAppleIDButton.h +28 -0
- package/sdk/ios/System/Library/Frameworks/AuthenticationServices.framework/Headers/ASAuthorizationAppleIDCredential.h +37 -0
- package/sdk/ios/System/Library/Frameworks/AuthenticationServices.framework/Headers/ASAuthorizationAppleIDProvider.h +24 -0
- package/sdk/ios/System/Library/Frameworks/AuthenticationServices.framework/Headers/ASAuthorizationAppleIDRequest.h +13 -0
- package/sdk/ios/System/Library/Frameworks/AuthenticationServices.framework/Headers/ASAuthorizationController.h +51 -0
- package/sdk/ios/System/Library/Frameworks/AuthenticationServices.framework/Headers/ASAuthorizationCredential.h +11 -0
- package/sdk/ios/System/Library/Frameworks/AuthenticationServices.framework/Headers/ASAuthorizationError.h +22 -0
- package/sdk/ios/System/Library/Frameworks/AuthenticationServices.framework/Headers/ASAuthorizationOpenIDRequest.h +24 -0
- package/sdk/ios/System/Library/Frameworks/AuthenticationServices.framework/Headers/ASAuthorizationPasswordProvider.h +14 -0
- package/sdk/ios/System/Library/Frameworks/AuthenticationServices.framework/Headers/ASAuthorizationPasswordRequest.h +10 -0
- package/sdk/ios/System/Library/Frameworks/AuthenticationServices.framework/Headers/ASAuthorizationProvider.h +11 -0
- package/sdk/ios/System/Library/Frameworks/AuthenticationServices.framework/Headers/ASAuthorizationRequest.h +17 -0
- package/sdk/ios/System/Library/Frameworks/AuthenticationServices.framework/Headers/ASPasswordCredential.h +19 -0
- package/sdk/ios/System/Library/Frameworks/AuthenticationServices.framework/Headers/AuthenticationServices.h +14 -0
- package/src/installed-native-libraries.ts +1 -0
- package/src/one-direct-host-source.ts +33 -1
- package/src/turbo-compile.ts +77 -7
- package/src/turbo-source.ts +1 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
#import <AuthenticationServices/ASFoundation.h>
|
|
2
|
+
|
|
3
|
+
AS_HEADER_AUDIT_BEGIN(nullability, sendability)
|
|
4
|
+
|
|
5
|
+
typedef NS_ENUM(NSInteger, ASAuthorizationAppleIDButtonType) {
|
|
6
|
+
ASAuthorizationAppleIDButtonTypeSignIn,
|
|
7
|
+
ASAuthorizationAppleIDButtonTypeContinue,
|
|
8
|
+
ASAuthorizationAppleIDButtonTypeSignUp API_AVAILABLE(ios(13.2), macos(10.15.1), tvos(13.1)) API_UNAVAILABLE(watchos),
|
|
9
|
+
ASAuthorizationAppleIDButtonTypeDefault = ASAuthorizationAppleIDButtonTypeSignIn,
|
|
10
|
+
} NS_SWIFT_NAME(ASAuthorizationAppleIDButton.ButtonType) API_AVAILABLE(ios(13.0), macos(10.15), tvos(13.0)) API_UNAVAILABLE(watchos);
|
|
11
|
+
|
|
12
|
+
typedef NS_ENUM(NSInteger, ASAuthorizationAppleIDButtonStyle) {
|
|
13
|
+
ASAuthorizationAppleIDButtonStyleWhite,
|
|
14
|
+
ASAuthorizationAppleIDButtonStyleWhiteOutline,
|
|
15
|
+
ASAuthorizationAppleIDButtonStyleBlack,
|
|
16
|
+
} NS_SWIFT_NAME(ASAuthorizationAppleIDButton.Style) API_AVAILABLE(ios(13.0), macos(10.15), tvos(13.0)) API_UNAVAILABLE(watchos);
|
|
17
|
+
|
|
18
|
+
AS_EXTERN API_AVAILABLE(ios(13.0), macos(10.15), tvos(13.0)) API_UNAVAILABLE(watchos)
|
|
19
|
+
PEACH_SWIFT_CLASS(SwiftUICore) @interface ASAuthorizationAppleIDButton : UIControl
|
|
20
|
+
|
|
21
|
+
+ (instancetype)buttonWithType:(ASAuthorizationAppleIDButtonType)type style:(ASAuthorizationAppleIDButtonStyle)style;
|
|
22
|
+
- (instancetype)initWithAuthorizationButtonType:(ASAuthorizationAppleIDButtonType)type authorizationButtonStyle:(ASAuthorizationAppleIDButtonStyle)style NS_DESIGNATED_INITIALIZER;
|
|
23
|
+
|
|
24
|
+
@property (nonatomic, assign) CGFloat cornerRadius API_UNAVAILABLE(tvos);
|
|
25
|
+
|
|
26
|
+
@end
|
|
27
|
+
|
|
28
|
+
AS_HEADER_AUDIT_END(nullability, sendability)
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
#import <AuthenticationServices/ASAuthorization.h>
|
|
2
|
+
#import <AuthenticationServices/ASAuthorizationCredential.h>
|
|
3
|
+
#import <Foundation/Foundation.h>
|
|
4
|
+
|
|
5
|
+
AS_HEADER_AUDIT_BEGIN(nullability, sendability)
|
|
6
|
+
|
|
7
|
+
typedef NS_ENUM(NSInteger, ASUserDetectionStatus) {
|
|
8
|
+
ASUserDetectionStatusUnsupported,
|
|
9
|
+
ASUserDetectionStatusUnknown,
|
|
10
|
+
ASUserDetectionStatusLikelyReal,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
typedef NS_ENUM(NSInteger, ASUserAgeRange) {
|
|
14
|
+
ASUserAgeRangeUnknown,
|
|
15
|
+
ASUserAgeRangeChild,
|
|
16
|
+
ASUserAgeRangeNotChild,
|
|
17
|
+
} API_AVAILABLE(ios(17.0), macos(14.0), tvos(17.0), watchos(10.0));
|
|
18
|
+
|
|
19
|
+
AS_EXTERN API_AVAILABLE(ios(13.0), macos(10.15), tvos(13.0), watchos(6.0))
|
|
20
|
+
PEACH_SWIFT_CLASS(SwiftUICore) @interface ASAuthorizationAppleIDCredential : NSObject <ASAuthorizationCredential>
|
|
21
|
+
|
|
22
|
+
@property (nonatomic, readonly, copy) NSString *user;
|
|
23
|
+
@property (nonatomic, readonly, copy, nullable) NSString *state;
|
|
24
|
+
@property (nonatomic, readonly, copy) NSArray<ASAuthorizationScope> *authorizedScopes;
|
|
25
|
+
@property (nonatomic, readonly, copy, nullable) NSData *authorizationCode;
|
|
26
|
+
@property (nonatomic, readonly, copy, nullable) NSData *identityToken;
|
|
27
|
+
@property (nonatomic, readonly, copy, nullable) NSString *email;
|
|
28
|
+
@property (nonatomic, readonly, copy, nullable) NSPersonNameComponents *fullName;
|
|
29
|
+
@property (nonatomic, readonly) ASUserDetectionStatus realUserStatus;
|
|
30
|
+
@property (nonatomic, readonly) ASUserAgeRange userAgeRange API_AVAILABLE(ios(17.0), macos(14.0), tvos(17.0), watchos(10.0));
|
|
31
|
+
|
|
32
|
+
+ (instancetype)new NS_UNAVAILABLE;
|
|
33
|
+
- (instancetype)init NS_UNAVAILABLE;
|
|
34
|
+
|
|
35
|
+
@end
|
|
36
|
+
|
|
37
|
+
AS_HEADER_AUDIT_END(nullability, sendability)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
#import <AuthenticationServices/ASAuthorizationAppleIDRequest.h>
|
|
2
|
+
#import <AuthenticationServices/ASAuthorizationProvider.h>
|
|
3
|
+
#import <AuthenticationServices/ASFoundation.h>
|
|
4
|
+
|
|
5
|
+
AS_HEADER_AUDIT_BEGIN(nullability, sendability)
|
|
6
|
+
|
|
7
|
+
typedef NS_ENUM(NSInteger, ASAuthorizationAppleIDProviderCredentialState) {
|
|
8
|
+
ASAuthorizationAppleIDProviderCredentialRevoked,
|
|
9
|
+
ASAuthorizationAppleIDProviderCredentialAuthorized,
|
|
10
|
+
ASAuthorizationAppleIDProviderCredentialNotFound,
|
|
11
|
+
ASAuthorizationAppleIDProviderCredentialTransferred,
|
|
12
|
+
} NS_SWIFT_NAME(ASAuthorizationAppleIDProvider.CredentialState) API_AVAILABLE(ios(13.0), macos(10.15), tvos(13.0), watchos(6.0));
|
|
13
|
+
|
|
14
|
+
AS_EXTERN NSNotificationName const ASAuthorizationAppleIDProviderCredentialRevokedNotification API_AVAILABLE(ios(13.0), macos(10.15), tvos(13.0), watchos(6.0));
|
|
15
|
+
|
|
16
|
+
AS_EXTERN API_AVAILABLE(ios(13.0), macos(10.15), tvos(13.0), watchos(6.0))
|
|
17
|
+
PEACH_SWIFT_CLASS(SwiftUICore) @interface ASAuthorizationAppleIDProvider : NSObject <ASAuthorizationProvider>
|
|
18
|
+
|
|
19
|
+
- (ASAuthorizationAppleIDRequest *)createRequest;
|
|
20
|
+
- (void)getCredentialStateForUserID:(NSString *)userID completion:(void (^)(ASAuthorizationAppleIDProviderCredentialState credentialState, NSError * _Nullable error))completion;
|
|
21
|
+
|
|
22
|
+
@end
|
|
23
|
+
|
|
24
|
+
AS_HEADER_AUDIT_END(nullability, sendability)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#import <AuthenticationServices/ASAuthorization.h>
|
|
2
|
+
#import <AuthenticationServices/ASAuthorizationOpenIDRequest.h>
|
|
3
|
+
|
|
4
|
+
AS_HEADER_AUDIT_BEGIN(nullability, sendability)
|
|
5
|
+
|
|
6
|
+
AS_EXTERN API_AVAILABLE(ios(13.0), macos(10.15), tvos(13.0), watchos(6.0))
|
|
7
|
+
PEACH_SWIFT_CLASS(SwiftUICore) @interface ASAuthorizationAppleIDRequest : ASAuthorizationOpenIDRequest
|
|
8
|
+
|
|
9
|
+
@property (nonatomic, copy, nullable) NSString *user;
|
|
10
|
+
|
|
11
|
+
@end
|
|
12
|
+
|
|
13
|
+
AS_HEADER_AUDIT_END(nullability, sendability)
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
#import <AuthenticationServices/ASFoundation.h>
|
|
2
|
+
#import <Foundation/Foundation.h>
|
|
3
|
+
|
|
4
|
+
AS_HEADER_AUDIT_BEGIN(nullability, sendability)
|
|
5
|
+
|
|
6
|
+
@class ASAuthorization;
|
|
7
|
+
@class ASAuthorizationRequest;
|
|
8
|
+
@class ASAuthorizationController;
|
|
9
|
+
|
|
10
|
+
NS_SWIFT_UI_ACTOR
|
|
11
|
+
AS_EXTERN API_AVAILABLE(ios(13.0), macos(10.15), tvos(13.0), watchos(6.0))
|
|
12
|
+
@protocol ASAuthorizationControllerDelegate <NSObject>
|
|
13
|
+
@optional
|
|
14
|
+
|
|
15
|
+
- (void)authorizationController:(ASAuthorizationController *)controller didCompleteWithAuthorization:(ASAuthorization *)authorization NS_SWIFT_NAME(authorizationController(controller:didCompleteWithAuthorization:));
|
|
16
|
+
- (void)authorizationController:(ASAuthorizationController *)controller didCompleteWithError:(NSError *)error NS_SWIFT_NAME(authorizationController(controller:didCompleteWithError:));
|
|
17
|
+
|
|
18
|
+
@end
|
|
19
|
+
|
|
20
|
+
AS_EXTERN API_AVAILABLE(ios(13.0), macos(10.15), tvos(13.0)) API_UNAVAILABLE(watchos)
|
|
21
|
+
NS_SWIFT_UI_ACTOR
|
|
22
|
+
@protocol ASAuthorizationControllerPresentationContextProviding <NSObject>
|
|
23
|
+
@required
|
|
24
|
+
|
|
25
|
+
- (ASPresentationAnchor)presentationAnchorForAuthorizationController:(ASAuthorizationController *)controller;
|
|
26
|
+
|
|
27
|
+
@end
|
|
28
|
+
|
|
29
|
+
typedef NS_OPTIONS(NSUInteger, ASAuthorizationControllerRequestOptions) {
|
|
30
|
+
ASAuthorizationControllerRequestOptionPreferImmediatelyAvailableCredentials API_UNAVAILABLE(tvos, watchos) = 1 << 0,
|
|
31
|
+
} NS_SWIFT_NAME(ASAuthorizationController.RequestOptions) API_AVAILABLE(ios(16.0), macos(13.0)) API_UNAVAILABLE(tvos, watchos);
|
|
32
|
+
|
|
33
|
+
AS_EXTERN API_AVAILABLE(ios(13.0), macos(10.15), tvos(13.0), watchos(6.0))
|
|
34
|
+
PEACH_SWIFT_CLASS(SwiftUICore) @interface ASAuthorizationController : NSObject
|
|
35
|
+
|
|
36
|
+
@property (nonatomic, readonly, strong) NSArray<ASAuthorizationRequest *> *authorizationRequests;
|
|
37
|
+
@property (nonatomic, weak, nullable) id <ASAuthorizationControllerDelegate> delegate;
|
|
38
|
+
@property (nonatomic, weak, nullable) id <ASAuthorizationControllerPresentationContextProviding> presentationContextProvider API_UNAVAILABLE(watchos);
|
|
39
|
+
|
|
40
|
+
- (instancetype)initWithAuthorizationRequests:(NSArray<ASAuthorizationRequest *> *)authorizationRequests NS_DESIGNATED_INITIALIZER;
|
|
41
|
+
- (void)performRequests;
|
|
42
|
+
- (void)performAutoFillAssistedRequests API_AVAILABLE(ios(16.0)) API_UNAVAILABLE(macos, macCatalyst, watchos, tvos);
|
|
43
|
+
- (void)performRequestsWithOptions:(ASAuthorizationControllerRequestOptions)options NS_SWIFT_NAME(performRequests(options:)) API_AVAILABLE(ios(16.0), macos(13.0)) API_UNAVAILABLE(watchos, tvos);
|
|
44
|
+
- (void)cancel API_AVAILABLE(macos(13.0), ios(16.0), tvos(18.0)) API_UNAVAILABLE(watchos);
|
|
45
|
+
|
|
46
|
+
+ (instancetype)new NS_UNAVAILABLE;
|
|
47
|
+
- (instancetype)init NS_UNAVAILABLE;
|
|
48
|
+
|
|
49
|
+
@end
|
|
50
|
+
|
|
51
|
+
AS_HEADER_AUDIT_END(nullability, sendability)
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#import <AuthenticationServices/ASFoundation.h>
|
|
2
|
+
#import <Foundation/Foundation.h>
|
|
3
|
+
|
|
4
|
+
AS_HEADER_AUDIT_BEGIN(nullability, sendability)
|
|
5
|
+
|
|
6
|
+
AS_EXTERN API_AVAILABLE(ios(13.0), macos(10.15), tvos(13.0), watchos(6.0))
|
|
7
|
+
@protocol ASAuthorizationCredential <NSObject, NSCopying, NSSecureCoding>
|
|
8
|
+
|
|
9
|
+
@end
|
|
10
|
+
|
|
11
|
+
AS_HEADER_AUDIT_END(nullability, sendability)
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
#import <AuthenticationServices/ASFoundation.h>
|
|
2
|
+
#import <Foundation/Foundation.h>
|
|
3
|
+
|
|
4
|
+
AS_HEADER_AUDIT_BEGIN(nullability, sendability)
|
|
5
|
+
|
|
6
|
+
AS_EXTERN NSErrorDomain const ASAuthorizationErrorDomain API_AVAILABLE(ios(13.0), macos(10.15), tvos(13.0), watchos(6.0));
|
|
7
|
+
|
|
8
|
+
typedef NS_ERROR_ENUM(ASAuthorizationErrorDomain, ASAuthorizationError) {
|
|
9
|
+
ASAuthorizationErrorUnknown = 1000,
|
|
10
|
+
ASAuthorizationErrorCanceled = 1001,
|
|
11
|
+
ASAuthorizationErrorInvalidResponse = 1002,
|
|
12
|
+
ASAuthorizationErrorNotHandled = 1003,
|
|
13
|
+
ASAuthorizationErrorFailed = 1004,
|
|
14
|
+
ASAuthorizationErrorNotInteractive API_AVAILABLE(ios(15.0), macos(12.0)) API_UNAVAILABLE(tvos, watchos) = 1005,
|
|
15
|
+
ASAuthorizationErrorMatchedExcludedCredential AS_API_AVAILABLE(ios(18.0), macos(15.0), visionos(2.0)) = 1006,
|
|
16
|
+
ASAuthorizationErrorCredentialImport AS_API_AVAILABLE(ios(18.2), macos(15.2), visionos(2.2)) = 1007,
|
|
17
|
+
ASAuthorizationErrorCredentialExport AS_API_AVAILABLE(ios(18.2), macos(15.2), visionos(2.2)) = 1008,
|
|
18
|
+
ASAuthorizationErrorPreferSignInWithApple AS_API_AVAILABLE(ios(19.0), macos(16.0), visionos(3.0)) = 1009,
|
|
19
|
+
ASAuthorizationErrorDeviceNotConfiguredForPasskeyCreation AS_API_AVAILABLE(ios(19.0), macos(16.0), visionos(3.0)) = 1010,
|
|
20
|
+
} API_AVAILABLE(ios(13.0), macos(10.15), tvos(13.0), watchos(6.0));
|
|
21
|
+
|
|
22
|
+
AS_HEADER_AUDIT_END(nullability, sendability)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
#import <AuthenticationServices/ASAuthorization.h>
|
|
2
|
+
#import <AuthenticationServices/ASAuthorizationRequest.h>
|
|
3
|
+
|
|
4
|
+
AS_HEADER_AUDIT_BEGIN(nullability, sendability)
|
|
5
|
+
|
|
6
|
+
typedef NSString * ASAuthorizationOpenIDOperation API_AVAILABLE(ios(13.0), macos(10.15), tvos(13.0), watchos(6.0))
|
|
7
|
+
NS_SWIFT_NAME(ASAuthorization.OpenIDOperation) NS_TYPED_EXTENSIBLE_ENUM;
|
|
8
|
+
|
|
9
|
+
AS_EXTERN ASAuthorizationOpenIDOperation const ASAuthorizationOperationImplicit API_AVAILABLE(ios(13.0), macos(10.15), tvos(13.0), watchos(6.0));
|
|
10
|
+
AS_EXTERN ASAuthorizationOpenIDOperation const ASAuthorizationOperationLogin API_AVAILABLE(ios(13.0), macos(10.15), tvos(13.0), watchos(6.0));
|
|
11
|
+
AS_EXTERN ASAuthorizationOpenIDOperation const ASAuthorizationOperationRefresh API_AVAILABLE(ios(13.0), macos(10.15), tvos(13.0), watchos(6.0));
|
|
12
|
+
AS_EXTERN ASAuthorizationOpenIDOperation const ASAuthorizationOperationLogout API_AVAILABLE(ios(13.0), macos(10.15), tvos(13.0), watchos(6.0));
|
|
13
|
+
|
|
14
|
+
AS_EXTERN API_AVAILABLE(ios(13.0), macos(10.15), tvos(13.0), watchos(6.0))
|
|
15
|
+
PEACH_SWIFT_CLASS(SwiftUICore) @interface ASAuthorizationOpenIDRequest : ASAuthorizationRequest
|
|
16
|
+
|
|
17
|
+
@property (nonatomic, copy, nullable) NSArray<ASAuthorizationScope> *requestedScopes;
|
|
18
|
+
@property (nonatomic, copy, nullable) NSString *state;
|
|
19
|
+
@property (nonatomic, copy, nullable) NSString *nonce;
|
|
20
|
+
@property (nonatomic, copy) ASAuthorizationOpenIDOperation requestedOperation;
|
|
21
|
+
|
|
22
|
+
@end
|
|
23
|
+
|
|
24
|
+
AS_HEADER_AUDIT_END(nullability, sendability)
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#import <AuthenticationServices/ASAuthorizationPasswordRequest.h>
|
|
2
|
+
#import <AuthenticationServices/ASAuthorizationProvider.h>
|
|
3
|
+
#import <AuthenticationServices/ASFoundation.h>
|
|
4
|
+
|
|
5
|
+
AS_HEADER_AUDIT_BEGIN(nullability, sendability)
|
|
6
|
+
|
|
7
|
+
AS_EXTERN API_AVAILABLE(ios(13.0), macos(10.15), tvos(15.0), watchos(6.0))
|
|
8
|
+
PEACH_SWIFT_CLASS(SwiftUICore) @interface ASAuthorizationPasswordProvider : NSObject <ASAuthorizationProvider>
|
|
9
|
+
|
|
10
|
+
- (ASAuthorizationPasswordRequest *)createRequest;
|
|
11
|
+
|
|
12
|
+
@end
|
|
13
|
+
|
|
14
|
+
AS_HEADER_AUDIT_END(nullability, sendability)
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#import <AuthenticationServices/ASAuthorizationRequest.h>
|
|
2
|
+
|
|
3
|
+
AS_HEADER_AUDIT_BEGIN(nullability, sendability)
|
|
4
|
+
|
|
5
|
+
AS_EXTERN API_AVAILABLE(ios(13.0), macos(10.15), tvos(15.0), watchos(6.0))
|
|
6
|
+
PEACH_SWIFT_CLASS(SwiftUICore) @interface ASAuthorizationPasswordRequest : ASAuthorizationRequest
|
|
7
|
+
|
|
8
|
+
@end
|
|
9
|
+
|
|
10
|
+
AS_HEADER_AUDIT_END(nullability, sendability)
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#import <AuthenticationServices/ASFoundation.h>
|
|
2
|
+
#import <Foundation/Foundation.h>
|
|
3
|
+
|
|
4
|
+
AS_HEADER_AUDIT_BEGIN(nullability, sendability)
|
|
5
|
+
|
|
6
|
+
AS_EXTERN API_AVAILABLE(ios(13.0), macos(10.15), tvos(13.0), watchos(6.0))
|
|
7
|
+
@protocol ASAuthorizationProvider <NSObject>
|
|
8
|
+
|
|
9
|
+
@end
|
|
10
|
+
|
|
11
|
+
AS_HEADER_AUDIT_END(nullability, sendability)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#import <AuthenticationServices/ASAuthorizationProvider.h>
|
|
2
|
+
#import <AuthenticationServices/ASFoundation.h>
|
|
3
|
+
#import <Foundation/Foundation.h>
|
|
4
|
+
|
|
5
|
+
AS_HEADER_AUDIT_BEGIN(nullability, sendability)
|
|
6
|
+
|
|
7
|
+
AS_EXTERN API_AVAILABLE(ios(13.0), macos(10.15), tvos(13.0), watchos(6.0))
|
|
8
|
+
PEACH_SWIFT_CLASS(SwiftUICore) @interface ASAuthorizationRequest : NSObject <NSCopying, NSSecureCoding>
|
|
9
|
+
|
|
10
|
+
@property (nonatomic, readonly, strong) id <ASAuthorizationProvider> provider;
|
|
11
|
+
|
|
12
|
+
+ (instancetype)new NS_UNAVAILABLE;
|
|
13
|
+
- (instancetype)init NS_UNAVAILABLE;
|
|
14
|
+
|
|
15
|
+
@end
|
|
16
|
+
|
|
17
|
+
AS_HEADER_AUDIT_END(nullability, sendability)
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#import <AuthenticationServices/ASAuthorizationCredential.h>
|
|
2
|
+
#import <AuthenticationServices/ASFoundation.h>
|
|
3
|
+
#import <Foundation/Foundation.h>
|
|
4
|
+
|
|
5
|
+
AS_HEADER_AUDIT_BEGIN(nullability, sendability)
|
|
6
|
+
|
|
7
|
+
AS_EXTERN API_AVAILABLE(ios(12.0), macos(10.15), tvos(15.0), watchos(6.0))
|
|
8
|
+
AS_SWIFT_SENDABLE
|
|
9
|
+
PEACH_SWIFT_CLASS(SwiftUICore) @interface ASPasswordCredential : NSObject <ASAuthorizationCredential>
|
|
10
|
+
|
|
11
|
+
- (instancetype)initWithUser:(NSString *)user password:(NSString *)password;
|
|
12
|
+
+ (instancetype)credentialWithUser:(NSString *)user password:(NSString *)password;
|
|
13
|
+
|
|
14
|
+
@property (nonatomic, copy, readonly) NSString *user;
|
|
15
|
+
@property (nonatomic, copy, readonly) NSString *password;
|
|
16
|
+
|
|
17
|
+
@end
|
|
18
|
+
|
|
19
|
+
AS_HEADER_AUDIT_END(nullability, sendability)
|
|
@@ -1,3 +1,17 @@
|
|
|
1
1
|
#import <AuthenticationServices/ASFoundation.h>
|
|
2
|
+
#import <AuthenticationServices/ASAuthorizationProvider.h>
|
|
3
|
+
#import <AuthenticationServices/ASAuthorizationCredential.h>
|
|
4
|
+
#import <AuthenticationServices/ASAuthorization.h>
|
|
5
|
+
#import <AuthenticationServices/ASAuthorizationRequest.h>
|
|
6
|
+
#import <AuthenticationServices/ASAuthorizationOpenIDRequest.h>
|
|
7
|
+
#import <AuthenticationServices/ASAuthorizationAppleIDRequest.h>
|
|
8
|
+
#import <AuthenticationServices/ASAuthorizationAppleIDProvider.h>
|
|
9
|
+
#import <AuthenticationServices/ASAuthorizationAppleIDCredential.h>
|
|
10
|
+
#import <AuthenticationServices/ASAuthorizationAppleIDButton.h>
|
|
11
|
+
#import <AuthenticationServices/ASAuthorizationController.h>
|
|
12
|
+
#import <AuthenticationServices/ASAuthorizationError.h>
|
|
13
|
+
#import <AuthenticationServices/ASAuthorizationPasswordProvider.h>
|
|
14
|
+
#import <AuthenticationServices/ASAuthorizationPasswordRequest.h>
|
|
15
|
+
#import <AuthenticationServices/ASPasswordCredential.h>
|
|
2
16
|
#import <AuthenticationServices/ASWebAuthenticationSession.h>
|
|
3
17
|
#import <AuthenticationServices/ASWebAuthenticationSessionCallback.h>
|
|
@@ -1524,6 +1524,15 @@ NSDictionary* jsonDictFromBytes(const char* ptr, uint32_t len) {
|
|
|
1524
1524
|
return [parsed isKindOfClass:NSDictionary.class] ? (NSDictionary*)parsed : @{};
|
|
1525
1525
|
}
|
|
1526
1526
|
|
|
1527
|
+
std::unordered_map<std::string, std::string> gLastGeometryEvents;
|
|
1528
|
+
|
|
1529
|
+
bool isGeometryContainerEvent(NSString* event) {
|
|
1530
|
+
return [event isEqualToString:@"layout"] ||
|
|
1531
|
+
[event isEqualToString:@"contentLayout"] ||
|
|
1532
|
+
[event isEqualToString:@"viewportLayout"] ||
|
|
1533
|
+
[event isEqualToString:@"intrinsicWidth"];
|
|
1534
|
+
}
|
|
1535
|
+
|
|
1527
1536
|
int32_t emitEventToHost(peach_node node, NSString* event, NSDictionary* payload) {
|
|
1528
1537
|
if ([event isEqualToString:@"layout"]) {
|
|
1529
1538
|
[PeachOneDirectStage.shared markDirty];
|
|
@@ -1531,12 +1540,30 @@ int32_t emitEventToHost(peach_node node, NSString* event, NSDictionary* payload)
|
|
|
1531
1540
|
}
|
|
1532
1541
|
NSData* eventData = [event dataUsingEncoding:NSUTF8StringEncoding];
|
|
1533
1542
|
NSData* jsonData = payload
|
|
1534
|
-
? [NSJSONSerialization dataWithJSONObject:payload options:
|
|
1543
|
+
? [NSJSONSerialization dataWithJSONObject:payload options:NSJSONWritingSortedKeys error:nil]
|
|
1535
1544
|
: nil;
|
|
1536
1545
|
const char* evPtr = eventData ? static_cast<const char*>(eventData.bytes) : "";
|
|
1537
1546
|
const uint32_t evLen = eventData ? static_cast<uint32_t>(eventData.length) : 0;
|
|
1538
1547
|
const char* jsPtr = jsonData ? static_cast<const char*>(jsonData.bytes) : "{}";
|
|
1539
1548
|
const uint32_t jsLen = jsonData ? static_cast<uint32_t>(jsonData.length) : 2;
|
|
1549
|
+
if (isGeometryContainerEvent(event)) {
|
|
1550
|
+
std::string key = std::to_string(node);
|
|
1551
|
+
key.push_back(':');
|
|
1552
|
+
key.append(evPtr, evLen);
|
|
1553
|
+
if ([event isEqualToString:@"layout"] && [payload[@"column"] isKindOfClass:NSString.class]) {
|
|
1554
|
+
NSData* colData = [static_cast<NSString*>(payload[@"column"]) dataUsingEncoding:NSUTF8StringEncoding];
|
|
1555
|
+
if (colData && colData.length > 0) {
|
|
1556
|
+
key.push_back(':');
|
|
1557
|
+
key.append(static_cast<const char*>(colData.bytes), colData.length);
|
|
1558
|
+
}
|
|
1559
|
+
}
|
|
1560
|
+
std::string jsonStr(jsPtr, jsLen);
|
|
1561
|
+
if (const auto prev = gLastGeometryEvents.find(key);
|
|
1562
|
+
prev != gLastGeometryEvents.end() && prev->second == jsonStr) {
|
|
1563
|
+
return 0;
|
|
1564
|
+
}
|
|
1565
|
+
gLastGeometryEvents[std::move(key)] = std::move(jsonStr);
|
|
1566
|
+
}
|
|
1540
1567
|
return peach_one_emit_container_event(nodeLo(node), nodeHi(node), evPtr, evLen, jsPtr, jsLen);
|
|
1541
1568
|
}
|
|
1542
1569
|
|
|
@@ -1886,6 +1913,11 @@ void peach_one_container_release(uint32_t targetLo, uint32_t targetHi) {
|
|
|
1886
1913
|
gRecords.erase(it);
|
|
1887
1914
|
if (wasSwift) emitEventToHost(node, @"__swiftHeight", @{@"height": @(-1)});
|
|
1888
1915
|
}
|
|
1916
|
+
const std::string prefix = std::to_string(node) + ":";
|
|
1917
|
+
for (auto git = gLastGeometryEvents.begin(); git != gLastGeometryEvents.end();) {
|
|
1918
|
+
if (git->first.rfind(prefix, 0) == 0) git = gLastGeometryEvents.erase(git);
|
|
1919
|
+
else ++git;
|
|
1920
|
+
}
|
|
1889
1921
|
if (const auto cit = gContentViews.find(node); cit != gContentViews.end()) {
|
|
1890
1922
|
[cit->second removeFromSuperview];
|
|
1891
1923
|
[PeachOneDirectStage.shared tagContentView:cit->second node:0];
|
package/src/turbo-compile.ts
CHANGED
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
type SwiftCompileInput,
|
|
14
14
|
} from './swift-compile'
|
|
15
15
|
import { swiftModuleToolchain } from './swift-distribution'
|
|
16
|
+
import { nativeHeaderIncludes } from './swift-header-dependencies'
|
|
16
17
|
import {
|
|
17
18
|
artifactFor,
|
|
18
19
|
installedWorkspaceInput,
|
|
@@ -31,6 +32,7 @@ import {
|
|
|
31
32
|
swiftManifestSettings,
|
|
32
33
|
swiftManifestTargets,
|
|
33
34
|
} from './swift-package'
|
|
35
|
+
import { projectSourceKey } from './swift-source-file'
|
|
34
36
|
import {
|
|
35
37
|
collectTurboSources,
|
|
36
38
|
prepareTurboSourceDependencies,
|
|
@@ -296,6 +298,7 @@ function retainInstalledReactNativeDeclarations(
|
|
|
296
298
|
snapshot: Awaited<ReturnType<typeof installedWorkspaceInput>>,
|
|
297
299
|
options: Pick<CompileTurboModuleOptions, 'appRoot' | 'projectRoot'>,
|
|
298
300
|
skipped: ReadonlySet<string>,
|
|
301
|
+
coreFiles: SwiftCompileInput['files'],
|
|
299
302
|
): { reactOwned: Set<string>; codegenTargets: Set<string> } {
|
|
300
303
|
const reactNative = [options.appRoot, options.projectRoot].map(
|
|
301
304
|
(root) =>
|
|
@@ -307,6 +310,20 @@ function retainInstalledReactNativeDeclarations(
|
|
|
307
310
|
),
|
|
308
311
|
) + path.sep,
|
|
309
312
|
)
|
|
313
|
+
// clang must import each react declaration through the same file identity.
|
|
314
|
+
for (const [file, original] of Object.entries(snapshot.sourcePaths)) {
|
|
315
|
+
if (!/\.(?:h|hh|hpp|hxx|inc|inl|ipp)$/.test(file)) continue
|
|
316
|
+
const source = fs.realpathSync(original)
|
|
317
|
+
const root = reactNative.find((directory) => source.startsWith(directory))
|
|
318
|
+
if (!root) continue
|
|
319
|
+
const relative = source.slice(root.length).split(path.sep).join('/')
|
|
320
|
+
const header = `Sources/${TURBO_CORE_TARGET}/upstream/react-native/${relative}`
|
|
321
|
+
if (!Object.hasOwn(coreFiles, header)) continue
|
|
322
|
+
snapshot.input.files[file] =
|
|
323
|
+
`#include ${JSON.stringify(path.posix.relative(path.posix.dirname(file), header))}\n`
|
|
324
|
+
const aliases = (snapshot.input.headerAliases ??= {})
|
|
325
|
+
aliases[file] = header
|
|
326
|
+
}
|
|
310
327
|
const generated = `${path.sep}build${path.sep}generated${path.sep}ios${path.sep}`
|
|
311
328
|
const supportFiles = `${path.sep}Target Support Files${path.sep}`
|
|
312
329
|
const derivedFiles = `${path.sep}DerivedSources${path.sep}`
|
|
@@ -392,13 +409,39 @@ export async function prepareTurboCompileInput(
|
|
|
392
409
|
)
|
|
393
410
|
// the prebuilt core already owns its Swift pods. other Swift targets retain
|
|
394
411
|
// the installed workspace's source settings.
|
|
395
|
-
const
|
|
396
|
-
|
|
397
|
-
|
|
412
|
+
const installedWorkspace = installedXcodeWorkspace(options.projectRoot)
|
|
413
|
+
const installedHeaderProducers = new Set<string>()
|
|
414
|
+
if (installedWorkspace && options.installedPods?.size) {
|
|
415
|
+
const swiftHeaders = new Set<string>()
|
|
416
|
+
for (const [file, contents] of Object.entries(collection.files)) {
|
|
417
|
+
if (!/\.(?:h|hh|hpp|hxx|m|mm)$/.test(file)) continue
|
|
418
|
+
for (const include of nativeHeaderIncludes(contents)) {
|
|
419
|
+
if (include.endsWith('-Swift.h'))
|
|
420
|
+
swiftHeaders.add(path.posix.basename(include, '-Swift.h'))
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
for (const { moduleName, files } of options.installedPods.values()) {
|
|
424
|
+
if (
|
|
425
|
+
!coreSwiftModules.has(moduleName) &&
|
|
426
|
+
!swiftTargets.some(({ name }) => name === moduleName) &&
|
|
427
|
+
swiftHeaders.has(moduleName) &&
|
|
428
|
+
files.some((file) => file.endsWith('.swift'))
|
|
429
|
+
)
|
|
430
|
+
installedHeaderProducers.add(moduleName)
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
const workspaceSwift = [
|
|
434
|
+
...swiftTargets
|
|
435
|
+
.map(({ name }) => name)
|
|
436
|
+
.filter(
|
|
437
|
+
(name) => installedWorkspace || !collection.rendererSwiftTargets.includes(name),
|
|
438
|
+
),
|
|
439
|
+
...installedHeaderProducers,
|
|
440
|
+
]
|
|
398
441
|
if (workspaceSwift.length) {
|
|
399
442
|
const workspace = requireInstalledXcodeWorkspace(
|
|
400
443
|
options.projectRoot,
|
|
401
|
-
`Swift TurboModule providers (${workspaceSwift.
|
|
444
|
+
`Swift TurboModule providers (${workspaceSwift.join(', ')})`,
|
|
402
445
|
)
|
|
403
446
|
await prepareXcodeSwiftPackages(workspace, options.iosTarget)
|
|
404
447
|
await withXcodeProject(
|
|
@@ -408,7 +451,7 @@ export async function prepareTurboCompileInput(
|
|
|
408
451
|
configuration: 'Release',
|
|
409
452
|
moduleRoot: options.moduleRoot,
|
|
410
453
|
interfaceRoot: options.moduleRoot,
|
|
411
|
-
nativeModules:
|
|
454
|
+
nativeModules: workspaceSwift,
|
|
412
455
|
},
|
|
413
456
|
async (root) => {
|
|
414
457
|
const snapshot = await installedWorkspaceInput(
|
|
@@ -416,7 +459,7 @@ export async function prepareTurboCompileInput(
|
|
|
416
459
|
'main.swift',
|
|
417
460
|
options.moduleRoot,
|
|
418
461
|
)
|
|
419
|
-
const names = new Set(
|
|
462
|
+
const names = new Set(workspaceSwift)
|
|
420
463
|
const installed = swiftManifestTargets(snapshot.input.files['Package.swift']!)
|
|
421
464
|
for (const target of installed)
|
|
422
465
|
if (
|
|
@@ -444,11 +487,38 @@ export async function prepareTurboCompileInput(
|
|
|
444
487
|
snapshot,
|
|
445
488
|
options,
|
|
446
489
|
names,
|
|
490
|
+
core.files,
|
|
447
491
|
)
|
|
448
492
|
for (const name of [...reactOwned, ...codegenTargets]) names.add(name)
|
|
449
493
|
snapshot.input.nativeTargets = snapshot.input.nativeTargets?.filter(({ name }) =>
|
|
450
494
|
names.has(name),
|
|
451
495
|
)
|
|
496
|
+
if (installedHeaderProducers.size) {
|
|
497
|
+
const roots = [options.appRoot, options.projectRoot].map((root) =>
|
|
498
|
+
fs.realpathSync(root),
|
|
499
|
+
)
|
|
500
|
+
const installedUnits = new Set(
|
|
501
|
+
(snapshot.input.nativeTargets ?? [])
|
|
502
|
+
.filter(({ name }) => installedHeaderProducers.has(name))
|
|
503
|
+
.flatMap(({ sourceDirectories }) => Object.keys(sourceDirectories))
|
|
504
|
+
.flatMap((file) => {
|
|
505
|
+
const source = snapshot.sourcePaths[file]
|
|
506
|
+
return source ? [projectSourceKey(roots, source)] : []
|
|
507
|
+
}),
|
|
508
|
+
)
|
|
509
|
+
for (const { file, source } of collection.sources) {
|
|
510
|
+
if (
|
|
511
|
+
!isSwiftNativeTranslationUnit(file) ||
|
|
512
|
+
!installedUnits.has(projectSourceKey(roots, source))
|
|
513
|
+
)
|
|
514
|
+
continue
|
|
515
|
+
delete collection.files[file]
|
|
516
|
+
for (const native of collection.nativeTargets ?? []) {
|
|
517
|
+
delete native.sourceDirectories[file]
|
|
518
|
+
delete native.fileFlags[file]
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
}
|
|
452
522
|
applyInstalledSwiftTargets(
|
|
453
523
|
collection,
|
|
454
524
|
snapshot,
|
|
@@ -534,7 +604,7 @@ export async function prepareTurboCompileInput(
|
|
|
534
604
|
'main.swift',
|
|
535
605
|
options.moduleRoot,
|
|
536
606
|
)
|
|
537
|
-
retainInstalledReactNativeDeclarations(snapshot, options, new Set())
|
|
607
|
+
retainInstalledReactNativeDeclarations(snapshot, options, new Set(), core.files)
|
|
538
608
|
return snapshot.input
|
|
539
609
|
},
|
|
540
610
|
)
|
package/src/turbo-source.ts
CHANGED
|
@@ -80,6 +80,7 @@ export interface TurboInstalledSources {
|
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
export interface TurboInstalledPod extends TurboInstalledSources {
|
|
83
|
+
moduleName: string
|
|
83
84
|
publicHeaders: string[]
|
|
84
85
|
headerSearchPaths: string[]
|
|
85
86
|
dependencySearchPaths: { root: string; directory: string }[]
|