react-native-consumet 1.5.0 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/Consumet.podspec +9 -0
  2. package/README.md +7 -0
  3. package/android/generated/jni/CMakeLists.txt +1 -9
  4. package/android/generated/jni/react/renderer/components/RNConsumetSpec/RNConsumetSpecJSI.h +65 -92
  5. package/ios/Consumet.h +1 -1
  6. package/ios/Consumet.mm +681 -7
  7. package/ios/generated/Package.swift +66 -0
  8. package/ios/generated/ReactAppDependencyProvider/RCTAppDependencyProvider.h +25 -0
  9. package/ios/generated/ReactAppDependencyProvider/RCTAppDependencyProvider.mm +40 -0
  10. package/ios/generated/ReactAppDependencyProvider/ReactAppDependencyProvider.podspec +34 -0
  11. package/ios/generated/ReactCodegen/RCTModuleProviders.h +16 -0
  12. package/ios/generated/ReactCodegen/RCTModuleProviders.mm +51 -0
  13. package/ios/generated/ReactCodegen/RCTModulesConformingToProtocolsProvider.h +18 -0
  14. package/ios/generated/ReactCodegen/RCTModulesConformingToProtocolsProvider.mm +54 -0
  15. package/ios/generated/ReactCodegen/RCTThirdPartyComponentsProvider.h +16 -0
  16. package/ios/generated/ReactCodegen/RCTThirdPartyComponentsProvider.mm +30 -0
  17. package/ios/generated/ReactCodegen/RCTUnstableModulesRequiringMainQueueSetupProvider.h +14 -0
  18. package/ios/generated/ReactCodegen/RCTUnstableModulesRequiringMainQueueSetupProvider.mm +19 -0
  19. package/ios/generated/ReactCodegen/RNConsumetSpecJSI.h +98 -0
  20. package/ios/generated/ReactCodegen/ReactCodegen.podspec +114 -0
  21. package/lib/commonjs/extension-registry.json +80 -32
  22. package/lib/commonjs/providers/anime/anikoto/create-anikoto.js +11 -4
  23. package/lib/commonjs/providers/anime/anikoto/create-anikoto.js.map +1 -1
  24. package/lib/commonjs/providers/movies/vegamovies/create-vegamovies.js +11 -11
  25. package/lib/commonjs/providers/movies/vegamovies/create-vegamovies.js.map +1 -1
  26. package/lib/commonjs/utils/ExtractorManager.js +13 -27
  27. package/lib/commonjs/utils/ExtractorManager.js.map +1 -1
  28. package/lib/commonjs/utils/ProviderManager.js +23 -33
  29. package/lib/commonjs/utils/ProviderManager.js.map +1 -1
  30. package/lib/module/extension-registry.json +80 -32
  31. package/lib/module/providers/anime/anikoto/create-anikoto.js +11 -4
  32. package/lib/module/providers/anime/anikoto/create-anikoto.js.map +1 -1
  33. package/lib/module/providers/movies/vegamovies/create-vegamovies.js +11 -11
  34. package/lib/module/providers/movies/vegamovies/create-vegamovies.js.map +1 -1
  35. package/lib/module/utils/ExtractorManager.js +13 -27
  36. package/lib/module/utils/ExtractorManager.js.map +1 -1
  37. package/lib/module/utils/ProviderManager.js +23 -33
  38. package/lib/module/utils/ProviderManager.js.map +1 -1
  39. package/lib/typescript/commonjs/src/models/extension-manifest.d.ts +4 -0
  40. package/lib/typescript/commonjs/src/models/extension-manifest.d.ts.map +1 -1
  41. package/lib/typescript/commonjs/src/providers/anime/anikoto/create-anikoto.d.ts.map +1 -1
  42. package/lib/typescript/commonjs/src/utils/ExtractorManager.d.ts +1 -0
  43. package/lib/typescript/commonjs/src/utils/ExtractorManager.d.ts.map +1 -1
  44. package/lib/typescript/commonjs/src/utils/ProviderManager.d.ts +5 -4
  45. package/lib/typescript/commonjs/src/utils/ProviderManager.d.ts.map +1 -1
  46. package/lib/typescript/module/src/models/extension-manifest.d.ts +4 -0
  47. package/lib/typescript/module/src/models/extension-manifest.d.ts.map +1 -1
  48. package/lib/typescript/module/src/providers/anime/anikoto/create-anikoto.d.ts.map +1 -1
  49. package/lib/typescript/module/src/utils/ExtractorManager.d.ts +1 -0
  50. package/lib/typescript/module/src/utils/ExtractorManager.d.ts.map +1 -1
  51. package/lib/typescript/module/src/utils/ProviderManager.d.ts +5 -4
  52. package/lib/typescript/module/src/utils/ProviderManager.d.ts.map +1 -1
  53. package/package.json +7 -7
  54. package/src/extension-registry.json +80 -32
  55. package/src/models/extension-manifest.ts +5 -0
  56. package/src/providers/anime/anikoto/create-anikoto.ts +10 -3
  57. package/src/providers/movies/vegamovies/create-vegamovies.ts +11 -11
  58. package/src/utils/ExtractorManager.ts +16 -27
  59. package/src/utils/ProviderManager.ts +26 -33
  60. package/android/generated/jni/react/renderer/components/RNConsumetSpec/RNConsumetSpecJSI-generated.cpp +0 -75
  61. package/ios/generated/RNConsumetSpecJSI-generated.cpp +0 -75
  62. package/ios/generated/RNConsumetSpecJSI.h +0 -125
  63. /package/ios/generated/{RNConsumetSpec → ReactCodegen/RNConsumetSpec}/RNConsumetSpec-generated.mm +0 -0
  64. /package/ios/generated/{RNConsumetSpec → ReactCodegen/RNConsumetSpec}/RNConsumetSpec.h +0 -0
@@ -0,0 +1,66 @@
1
+ /*
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ // swift-tools-version: 6.1
9
+ // The swift-tools-version declares the minimum version of Swift required to build this package.
10
+
11
+ import PackageDescription
12
+
13
+ let package = Package(
14
+ name: "React-GeneratedCode",
15
+ platforms: [.iOS(.v15), .macCatalyst(SupportedPlatform.MacCatalystVersion.v13)],
16
+ products: [
17
+ // Products define the executables and libraries a package produces, making them visible to other packages.
18
+ .library(
19
+ name: "ReactCodegen",
20
+ targets: ["ReactCodegen"]),
21
+ .library(
22
+ name: "ReactAppDependencyProvider",
23
+ targets: ["ReactAppDependencyProvider"]),
24
+ ],
25
+ dependencies: [
26
+ .package(name: "React", path: "../../../../../../../node_modules/react-native")
27
+ ],
28
+ targets: [
29
+ // Targets are the basic building blocks of a package, defining a module or a test suite.
30
+ // Targets can depend on other targets in this package and products from dependencies.
31
+ .target(
32
+ name: "ReactCodegen",
33
+ dependencies: ["React"],
34
+ path: "ReactCodegen",
35
+ exclude: ["ReactCodegen.podspec"],
36
+ publicHeadersPath: ".",
37
+ cSettings: [
38
+ .headerSearchPath("headers")
39
+ ],
40
+ cxxSettings: [
41
+ .headerSearchPath("headers"),
42
+ .unsafeFlags(["-std=c++20"]),
43
+ ],
44
+ linkerSettings: [
45
+ .linkedFramework("Foundation")
46
+ ]
47
+ ),
48
+ .target(
49
+ name: "ReactAppDependencyProvider",
50
+ dependencies: ["ReactCodegen"],
51
+ path: "ReactAppDependencyProvider",
52
+ exclude: ["ReactAppDependencyProvider.podspec"],
53
+ publicHeadersPath: ".",
54
+ cSettings: [
55
+ .headerSearchPath("headers"),
56
+ ],
57
+ cxxSettings: [
58
+ .headerSearchPath("headers"),
59
+ .unsafeFlags(["-std=c++20"]),
60
+ ],
61
+ linkerSettings: [
62
+ .linkedFramework("Foundation")
63
+ ]
64
+ )
65
+ ]
66
+ )
@@ -0,0 +1,25 @@
1
+ /*
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+
9
+ #import <Foundation/Foundation.h>
10
+
11
+ #if __has_include(<React-RCTAppDelegate/RCTDependencyProvider.h>)
12
+ #import <React-RCTAppDelegate/RCTDependencyProvider.h>
13
+ #elif __has_include(<React_RCTAppDelegate/RCTDependencyProvider.h>)
14
+ #import <React_RCTAppDelegate/RCTDependencyProvider.h>
15
+ #else
16
+ #import "RCTDependencyProvider.h"
17
+ #endif
18
+
19
+ NS_ASSUME_NONNULL_BEGIN
20
+
21
+ @interface RCTAppDependencyProvider : NSObject <RCTDependencyProvider>
22
+
23
+ @end
24
+
25
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,40 @@
1
+ /*
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ #import "RCTAppDependencyProvider.h"
9
+ #import <ReactCodegen/RCTModulesConformingToProtocolsProvider.h>
10
+ #import <ReactCodegen/RCTThirdPartyComponentsProvider.h>
11
+ #import <ReactCodegen/RCTUnstableModulesRequiringMainQueueSetupProvider.h>
12
+ #import <ReactCodegen/RCTModuleProviders.h>
13
+
14
+ @implementation RCTAppDependencyProvider
15
+
16
+ - (nonnull NSArray<NSString *> *)URLRequestHandlerClassNames {
17
+ return RCTModulesConformingToProtocolsProvider.URLRequestHandlerClassNames;
18
+ }
19
+
20
+ - (nonnull NSArray<NSString *> *)imageDataDecoderClassNames {
21
+ return RCTModulesConformingToProtocolsProvider.imageDataDecoderClassNames;
22
+ }
23
+
24
+ - (nonnull NSArray<NSString *> *)imageURLLoaderClassNames {
25
+ return RCTModulesConformingToProtocolsProvider.imageURLLoaderClassNames;
26
+ }
27
+
28
+ - (nonnull NSArray<NSString *> *)unstableModulesRequiringMainQueueSetup {
29
+ return RCTUnstableModulesRequiringMainQueueSetupProvider.modules;
30
+ }
31
+
32
+ - (nonnull NSDictionary<NSString *,Class<RCTComponentViewProtocol>> *)thirdPartyFabricComponents {
33
+ return RCTThirdPartyComponentsProvider.thirdPartyFabricComponents;
34
+ }
35
+
36
+ - (nonnull NSDictionary<NSString *, id<RCTModuleProvider>> *)moduleProviders {
37
+ return RCTModuleProviders.moduleProviders;
38
+ }
39
+
40
+ @end
@@ -0,0 +1,34 @@
1
+ # Copyright (c) Meta Platforms, Inc. and affiliates.
2
+ #
3
+ # This source code is licensed under the MIT license found in the
4
+ # LICENSE file in the root directory of this source tree.
5
+
6
+ version = "0.87.1"
7
+ source = { :git => 'https://github.com/facebook/react-native.git' }
8
+ if version == '1000.0.0'
9
+ # This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
10
+ source[:commit] = `git rev-parse HEAD`.strip if system("git rev-parse --git-dir > /dev/null 2>&1")
11
+ else
12
+ source[:tag] = "v#{version}"
13
+ end
14
+
15
+ Pod::Spec.new do |s|
16
+ s.name = "ReactAppDependencyProvider"
17
+ s.version = version
18
+ s.summary = "The third party dependency provider for the app"
19
+ s.homepage = "https://reactnative.dev/"
20
+ s.documentation_url = "https://reactnative.dev/"
21
+ s.license = "MIT"
22
+ s.author = "Meta Platforms, Inc. and its affiliates"
23
+ s.platforms = min_supported_versions
24
+ s.source = source
25
+ s.source_files = "**/RCTAppDependencyProvider.{h,mm}"
26
+
27
+ # This guard prevent to install the dependencies when we run `pod install` in the old architecture.
28
+ s.pod_target_xcconfig = {
29
+ "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
30
+ "DEFINES_MODULE" => "YES"
31
+ }
32
+
33
+ s.dependency "ReactCodegen"
34
+ end
@@ -0,0 +1,16 @@
1
+ /*
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ #import <Foundation/Foundation.h>
9
+
10
+ @protocol RCTModuleProvider;
11
+
12
+ @interface RCTModuleProviders: NSObject
13
+
14
+ + (NSDictionary<NSString *, id<RCTModuleProvider>> *)moduleProviders;
15
+
16
+ @end
@@ -0,0 +1,51 @@
1
+ /*
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ #import <Foundation/Foundation.h>
9
+
10
+ #import "RCTModuleProviders.h"
11
+ #import <ReactCommon/RCTTurboModule.h>
12
+ #import <React/RCTLog.h>
13
+
14
+ @implementation RCTModuleProviders
15
+
16
+ + (NSDictionary<NSString *, id<RCTModuleProvider>> *)moduleProviders
17
+ {
18
+ static NSDictionary<NSString *, id<RCTModuleProvider>> *providers = nil;
19
+ static dispatch_once_t onceToken;
20
+
21
+ dispatch_once(&onceToken, ^{
22
+ NSDictionary<NSString *, NSString *> * moduleMapping = @{
23
+
24
+ };
25
+
26
+ NSMutableDictionary *dict = [[NSMutableDictionary alloc] initWithCapacity:moduleMapping.count];
27
+
28
+ for (NSString *key in moduleMapping) {
29
+ NSString * moduleProviderName = moduleMapping[key];
30
+ Class klass = NSClassFromString(moduleProviderName);
31
+ if (!klass) {
32
+ RCTLogError(@"Module provider %@ cannot be found in the runtime", moduleProviderName);
33
+ continue;
34
+ }
35
+
36
+ id instance = [klass new];
37
+ if (![instance respondsToSelector:@selector(getTurboModule:)]) {
38
+ RCTLogError(@"Module provider %@ does not conform to RCTModuleProvider", moduleProviderName);
39
+ continue;
40
+ }
41
+
42
+ [dict setObject:instance forKey:key];
43
+ }
44
+
45
+ providers = dict;
46
+ });
47
+
48
+ return providers;
49
+ }
50
+
51
+ @end
@@ -0,0 +1,18 @@
1
+ /*
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ #import <Foundation/Foundation.h>
9
+
10
+ @interface RCTModulesConformingToProtocolsProvider: NSObject
11
+
12
+ +(NSArray<NSString *> *)imageURLLoaderClassNames;
13
+
14
+ +(NSArray<NSString *> *)imageDataDecoderClassNames;
15
+
16
+ +(NSArray<NSString *> *)URLRequestHandlerClassNames;
17
+
18
+ @end
@@ -0,0 +1,54 @@
1
+ /*
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ #import "RCTModulesConformingToProtocolsProvider.h"
9
+
10
+ @implementation RCTModulesConformingToProtocolsProvider
11
+
12
+ +(NSArray<NSString *> *)imageURLLoaderClassNames
13
+ {
14
+ static NSArray<NSString *> *classNames = nil;
15
+ static dispatch_once_t onceToken;
16
+
17
+ dispatch_once(&onceToken, ^{
18
+ classNames = @[
19
+
20
+ ];
21
+ });
22
+
23
+ return classNames;
24
+ }
25
+
26
+ +(NSArray<NSString *> *)imageDataDecoderClassNames
27
+ {
28
+ static NSArray<NSString *> *classNames = nil;
29
+ static dispatch_once_t onceToken;
30
+
31
+ dispatch_once(&onceToken, ^{
32
+ classNames = @[
33
+
34
+ ];
35
+ });
36
+
37
+ return classNames;
38
+ }
39
+
40
+ +(NSArray<NSString *> *)URLRequestHandlerClassNames
41
+ {
42
+ static NSArray<NSString *> *classNames = nil;
43
+ static dispatch_once_t onceToken;
44
+
45
+ dispatch_once(&onceToken, ^{
46
+ classNames = @[
47
+
48
+ ];
49
+ });
50
+
51
+ return classNames;
52
+ }
53
+
54
+ @end
@@ -0,0 +1,16 @@
1
+ /*
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ #import <Foundation/Foundation.h>
9
+
10
+ @protocol RCTComponentViewProtocol;
11
+
12
+ @interface RCTThirdPartyComponentsProvider: NSObject
13
+
14
+ + (NSDictionary<NSString *, Class<RCTComponentViewProtocol>> *)thirdPartyFabricComponents;
15
+
16
+ @end
@@ -0,0 +1,30 @@
1
+ /*
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+
9
+ #import <Foundation/Foundation.h>
10
+
11
+ #import "RCTThirdPartyComponentsProvider.h"
12
+ #import <React/RCTComponentViewProtocol.h>
13
+
14
+ @implementation RCTThirdPartyComponentsProvider
15
+
16
+ + (NSDictionary<NSString *, Class<RCTComponentViewProtocol>> *)thirdPartyFabricComponents
17
+ {
18
+ static NSDictionary<NSString *, Class<RCTComponentViewProtocol>> *thirdPartyComponents = nil;
19
+ static dispatch_once_t nativeComponentsToken;
20
+
21
+ dispatch_once(&nativeComponentsToken, ^{
22
+ thirdPartyComponents = @{
23
+
24
+ };
25
+ });
26
+
27
+ return thirdPartyComponents;
28
+ }
29
+
30
+ @end
@@ -0,0 +1,14 @@
1
+ /*
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ #import <Foundation/Foundation.h>
9
+
10
+ @interface RCTUnstableModulesRequiringMainQueueSetupProvider: NSObject
11
+
12
+ +(NSArray<NSString *> *)modules;
13
+
14
+ @end
@@ -0,0 +1,19 @@
1
+ /*
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ #import "RCTUnstableModulesRequiringMainQueueSetupProvider.h"
9
+
10
+ @implementation RCTUnstableModulesRequiringMainQueueSetupProvider
11
+
12
+ +(NSArray<NSString *> *)modules
13
+ {
14
+ return @[
15
+
16
+ ];
17
+ }
18
+
19
+ @end
@@ -0,0 +1,98 @@
1
+ /**
2
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
3
+ *
4
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
5
+ * once the code is regenerated.
6
+ *
7
+ * @generated by codegen project: GenerateModuleH.js
8
+ */
9
+
10
+ #pragma once
11
+
12
+ #include <ReactCommon/TurboModule.h>
13
+ #include <react/bridging/Bridging.h>
14
+
15
+ namespace facebook::react {
16
+
17
+
18
+ template <typename T>
19
+ class JSI_EXPORT NativeConsumetCxxSpec : public TurboModule {
20
+ public:
21
+ static constexpr std::string_view kModuleName = "Consumet";
22
+
23
+ protected:
24
+ NativeConsumetCxxSpec(std::shared_ptr<CallInvoker> jsInvoker) : TurboModule(std::string{NativeConsumetCxxSpec::kModuleName}, jsInvoker) {
25
+ methodMap_["bypassDdosGuard"] = MethodMetadata {.argCount = 1, .invoker = __bypassDdosGuard};
26
+ methodMap_["getDdosGuardCookiesWithWebView"] = MethodMetadata {.argCount = 1, .invoker = __getDdosGuardCookiesWithWebView};
27
+ methodMap_["makeGetRequestWithWebView"] = MethodMetadata {.argCount = 2, .invoker = __makeGetRequestWithWebView};
28
+ methodMap_["makePostRequestWithWebView"] = MethodMetadata {.argCount = 3, .invoker = __makePostRequestWithWebView};
29
+ methodMap_["makePostRequest"] = MethodMetadata {.argCount = 3, .invoker = __makePostRequest};
30
+ methodMap_["deobfuscateScript"] = MethodMetadata {.argCount = 1, .invoker = __deobfuscateScript};
31
+ methodMap_["multiply"] = MethodMetadata {.argCount = 2, .invoker = __multiply};
32
+ }
33
+
34
+ private:
35
+ static jsi::Value __bypassDdosGuard(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
36
+ static_assert(
37
+ bridging::getParameterCount(&T::bypassDdosGuard) == 2,
38
+ "Expected bypassDdosGuard(...) to have 2 parameters");
39
+ return bridging::callFromJs<jsi::Value>(rt, &T::bypassDdosGuard, static_cast<NativeConsumetCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule),
40
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt));
41
+ }
42
+
43
+ static jsi::Value __getDdosGuardCookiesWithWebView(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
44
+ static_assert(
45
+ bridging::getParameterCount(&T::getDdosGuardCookiesWithWebView) == 2,
46
+ "Expected getDdosGuardCookiesWithWebView(...) to have 2 parameters");
47
+ return bridging::callFromJs<jsi::Value>(rt, &T::getDdosGuardCookiesWithWebView, static_cast<NativeConsumetCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule),
48
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt));
49
+ }
50
+
51
+ static jsi::Value __makeGetRequestWithWebView(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
52
+ static_assert(
53
+ bridging::getParameterCount(&T::makeGetRequestWithWebView) == 3,
54
+ "Expected makeGetRequestWithWebView(...) to have 3 parameters");
55
+ return bridging::callFromJs<jsi::Value>(rt, &T::makeGetRequestWithWebView, static_cast<NativeConsumetCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule),
56
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
57
+ count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asObject(rt));
58
+ }
59
+
60
+ static jsi::Value __makePostRequestWithWebView(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
61
+ static_assert(
62
+ bridging::getParameterCount(&T::makePostRequestWithWebView) == 4,
63
+ "Expected makePostRequestWithWebView(...) to have 4 parameters");
64
+ return bridging::callFromJs<jsi::Value>(rt, &T::makePostRequestWithWebView, static_cast<NativeConsumetCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule),
65
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
66
+ count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asObject(rt),
67
+ count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asString(rt));
68
+ }
69
+
70
+ static jsi::Value __makePostRequest(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
71
+ static_assert(
72
+ bridging::getParameterCount(&T::makePostRequest) == 4,
73
+ "Expected makePostRequest(...) to have 4 parameters");
74
+ return bridging::callFromJs<jsi::Value>(rt, &T::makePostRequest, static_cast<NativeConsumetCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule),
75
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
76
+ count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asObject(rt),
77
+ count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asString(rt));
78
+ }
79
+
80
+ static jsi::Value __deobfuscateScript(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
81
+ static_assert(
82
+ bridging::getParameterCount(&T::deobfuscateScript) == 2,
83
+ "Expected deobfuscateScript(...) to have 2 parameters");
84
+ return bridging::callFromJs<jsi::Value>(rt, &T::deobfuscateScript, static_cast<NativeConsumetCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule),
85
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt));
86
+ }
87
+
88
+ static jsi::Value __multiply(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
89
+ static_assert(
90
+ bridging::getParameterCount(&T::multiply) == 3,
91
+ "Expected multiply(...) to have 3 parameters");
92
+ return bridging::callFromJs<double>(rt, &T::multiply, static_cast<NativeConsumetCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule),
93
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(),
94
+ count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asNumber());
95
+ }
96
+ };
97
+
98
+ } // namespace facebook::react
@@ -0,0 +1,114 @@
1
+ # Copyright (c) Meta Platforms, Inc. and affiliates.
2
+ #
3
+ # This source code is licensed under the MIT license found in the
4
+ # LICENSE file in the root directory of this source tree.
5
+
6
+ version = "0.87.1"
7
+ source = { :git => 'https://github.com/facebook/react-native.git' }
8
+ if version == '1000.0.0'
9
+ # This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
10
+ source[:commit] = `git rev-parse HEAD`.strip if system("git rev-parse --git-dir > /dev/null 2>&1")
11
+ else
12
+ source[:tag] = "v#{version}"
13
+ end
14
+
15
+ use_frameworks = ENV['USE_FRAMEWORKS'] != nil
16
+ folly_compiler_flags = Helpers::Constants.folly_config[:compiler_flags]
17
+ boost_compiler_flags = Helpers::Constants.boost_config[:compiler_flags]
18
+
19
+ header_search_paths = []
20
+ framework_search_paths = []
21
+
22
+ header_search_paths = [
23
+ "\"$(PODS_ROOT)/ReactNativeDependencies\"",
24
+ "\"${PODS_ROOT}/Headers/Public/ReactCodegen/react/renderer/components\"",
25
+ "\"$(PODS_ROOT)/Headers/Private/React-Fabric\"",
26
+ "\"$(PODS_ROOT)/Headers/Private/React-RCTFabric\"",
27
+ "\"$(PODS_ROOT)/Headers/Private/Yoga\"",
28
+ "\"$(PODS_TARGET_SRCROOT)\"",
29
+ ]
30
+
31
+ if use_frameworks
32
+ ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "React-Fabric", "React_Fabric", ["react/renderer/components/view/platform/cxx"])
33
+ .concat(ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "React-FabricImage", "React_FabricImage", []))
34
+ .concat(ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "React-graphics", "React_graphics", ["react/renderer/graphics/platform/ios"]))
35
+ .concat(ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "ReactCommon", "ReactCommon", ["react/nativemodule/core"]))
36
+ .concat(ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "React-runtimeexecutor", "React_runtimeexecutor", ["platform/ios"]))
37
+ .concat(ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "React-NativeModulesApple", "React_NativeModulesApple", []))
38
+ .concat(ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "React-RCTFabric", "RCTFabric", []))
39
+ .concat(ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "React-debug", "React_debug", []))
40
+ .concat(ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "React-rendererdebug", "React_rendererdebug", []))
41
+ .concat(ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "React-utils", "React_utils", []))
42
+ .concat(ReactNativePodsUtils.create_header_search_path_for_frameworks("PODS_CONFIGURATION_BUILD_DIR", "React-featureflags", "React_featureflags", []))
43
+ .each { |search_path|
44
+ header_search_paths << "\"#{search_path}\""
45
+ }
46
+ end
47
+
48
+ Pod::Spec.new do |s|
49
+ s.name = "ReactCodegen"
50
+ s.version = version
51
+ s.summary = 'Temp pod for generated files for React Native'
52
+ s.homepage = 'https://facebook.com/'
53
+ s.license = 'Unlicense'
54
+ s.authors = 'Facebook'
55
+ s.compiler_flags = "#{folly_compiler_flags} #{boost_compiler_flags} -Wno-nullability-completeness -std=c++20"
56
+ s.source = { :git => '' }
57
+ s.header_mappings_dir = './'
58
+ s.platforms = min_supported_versions
59
+ s.source_files = "**/*.{h,mm,cpp}"
60
+ s.exclude_files = "RCTAppDependencyProvider.{h,mm}" # these files are generated in the same codegen path but needs to belong to a different pod
61
+ s.pod_target_xcconfig = {
62
+ "HEADER_SEARCH_PATHS" => header_search_paths.join(' '),
63
+ "FRAMEWORK_SEARCH_PATHS" => framework_search_paths,
64
+ "OTHER_CPLUSPLUSFLAGS" => "$(inherited) #{folly_compiler_flags} #{boost_compiler_flags}"
65
+ }
66
+
67
+ s.dependency "React-jsiexecutor"
68
+ s.dependency "RCTRequired"
69
+ s.dependency "RCTTypeSafety"
70
+ s.dependency "React-Core"
71
+ s.dependency "React-jsi"
72
+ s.dependency "React-bridging"
73
+ s.dependency "ReactCommon/turbomodule/core"
74
+ s.dependency "React-NativeModulesApple"
75
+ s.dependency 'React-graphics'
76
+ s.dependency 'React-rendererdebug'
77
+ s.dependency 'React-Fabric'
78
+ s.dependency 'React-FabricImage'
79
+ s.dependency 'React-debug'
80
+ s.dependency 'React-utils'
81
+ s.dependency 'React-featureflags'
82
+ s.dependency 'React-RCTAppDelegate'
83
+
84
+ depend_on_js_engine(s)
85
+ add_rn_third_party_dependencies(s)
86
+ add_rncore_dependency(s)
87
+
88
+ s.script_phases = {
89
+ 'name' => 'Generate Specs',
90
+ 'execution_position' => :before_compile,
91
+ 'input_files' => ["${PODS_ROOT}/../../../src/NativeConsumet.ts"],
92
+ 'show_env_vars_in_log' => true,
93
+ 'output_files' => ["${DERIVED_FILE_DIR}/react-codegen.log"],
94
+ 'script': <<-SCRIPT
95
+ if [ -n "$PODFILE_DIR" ]; then
96
+ RCT_SCRIPT_POD_INSTALLATION_ROOT="$PODFILE_DIR"
97
+ else
98
+ pushd "$PODS_ROOT/../" > /dev/null
99
+ RCT_SCRIPT_POD_INSTALLATION_ROOT=$(pwd)
100
+ popd >/dev/null
101
+ fi
102
+
103
+ export RCT_SCRIPT_RN_DIR="$RCT_SCRIPT_POD_INSTALLATION_ROOT/../../node_modules/react-native"
104
+ export RCT_SCRIPT_APP_PATH="$RCT_SCRIPT_POD_INSTALLATION_ROOT/../.."
105
+ export RCT_SCRIPT_OUTPUT_DIR="$RCT_SCRIPT_POD_INSTALLATION_ROOT"
106
+ export RCT_SCRIPT_TYPE="withCodegenDiscovery"
107
+
108
+ export SCRIPT_PHASES_SCRIPT="$RCT_SCRIPT_RN_DIR/scripts/react_native_pods_utils/script_phases.sh"
109
+ export WITH_ENVIRONMENT="$RCT_SCRIPT_RN_DIR/scripts/xcode/with-environment.sh"
110
+ /bin/sh -c '"$WITH_ENVIRONMENT" "$SCRIPT_PHASES_SCRIPT"'
111
+ SCRIPT
112
+ }
113
+
114
+ end