@rnpack/utils 0.1.10 → 0.1.11
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/__mocks__/jestSetupFile.js +0 -0
- package/__mocks__/rnpack-utils-mock.js +17 -0
- package/example/node_modules/react-native/Libraries/ActionSheetIOS/React-RCTActionSheet.podspec +34 -0
- package/example/node_modules/react-native/Libraries/AppDelegate/React-RCTAppDelegate.podspec +88 -0
- package/example/node_modules/react-native/Libraries/Blob/React-RCTBlob.podspec +59 -0
- package/example/node_modules/react-native/Libraries/FBLazyVector/FBLazyVector.podspec +31 -0
- package/example/node_modules/react-native/Libraries/Image/React-RCTImage.podspec +57 -0
- package/example/node_modules/react-native/Libraries/LinkingIOS/React-RCTLinking.podspec +51 -0
- package/example/node_modules/react-native/Libraries/NativeAnimation/React-RCTAnimation.podspec +54 -0
- package/example/node_modules/react-native/Libraries/Network/React-RCTNetwork.podspec +56 -0
- package/example/node_modules/react-native/Libraries/PushNotificationIOS/React-RCTPushNotification.podspec +53 -0
- package/example/node_modules/react-native/Libraries/Required/RCTRequired.podspec +30 -0
- package/example/node_modules/react-native/Libraries/Settings/React-RCTSettings.podspec +53 -0
- package/example/node_modules/react-native/Libraries/Text/React-RCTText.podspec +37 -0
- package/example/node_modules/react-native/Libraries/TypeSafety/RCTTypeSafety.podspec +39 -0
- package/example/node_modules/react-native/Libraries/Vibration/React-RCTVibration.podspec +53 -0
- package/example/node_modules/react-native/React/CoreModules/React-CoreModules.podspec +67 -0
- package/example/node_modules/react-native/React/React-RCTFBReactNativeSpec.podspec +95 -0
- package/example/node_modules/react-native/React/React-RCTFabric.podspec +107 -0
- package/example/node_modules/react-native/React/Runtime/React-RCTRuntime.podspec +70 -0
- package/example/node_modules/react-native/React-Core-prebuilt.podspec +78 -0
- package/example/node_modules/react-native/React-Core.podspec +137 -0
- package/example/node_modules/react-native/React.podspec +56 -0
- package/example/node_modules/react-native/ReactApple/Libraries/RCTFoundation/RCTDeprecation/RCTDeprecation.podspec +25 -0
- package/example/node_modules/react-native/ReactCommon/React-Fabric.podspec +207 -0
- package/example/node_modules/react-native/ReactCommon/React-FabricComponents.podspec +170 -0
- package/example/node_modules/react-native/ReactCommon/React-FabricImage.podspec +79 -0
- package/example/node_modules/react-native/ReactCommon/React-Mapbuffer.podspec +40 -0
- package/example/node_modules/react-native/ReactCommon/ReactCommon.podspec +72 -0
- package/example/node_modules/react-native/ReactCommon/callinvoker/React-callinvoker.podspec +30 -0
- package/example/node_modules/react-native/ReactCommon/cxxreact/React-cxxreact.podspec +56 -0
- package/example/node_modules/react-native/ReactCommon/hermes/React-hermes.podspec +52 -0
- package/example/node_modules/react-native/ReactCommon/hermes/executor/React-jsitracing.podspec +38 -0
- package/example/node_modules/react-native/ReactCommon/jserrorhandler/React-jserrorhandler.podspec +52 -0
- package/example/node_modules/react-native/ReactCommon/jsi/React-jsi.podspec +50 -0
- package/example/node_modules/react-native/ReactCommon/jsiexecutor/React-jsiexecutor.podspec +45 -0
- package/example/node_modules/react-native/ReactCommon/jsinspector-modern/React-jsinspector.podspec +63 -0
- package/example/node_modules/react-native/ReactCommon/jsinspector-modern/cdp/React-jsinspectorcdp.podspec +48 -0
- package/example/node_modules/react-native/ReactCommon/jsinspector-modern/network/React-jsinspectornetwork.podspec +53 -0
- package/example/node_modules/react-native/ReactCommon/jsinspector-modern/tracing/React-jsinspectortracing.podspec +51 -0
- package/example/node_modules/react-native/ReactCommon/jsitooling/React-jsitooling.podspec +47 -0
- package/example/node_modules/react-native/ReactCommon/logger/React-logger.podspec +34 -0
- package/example/node_modules/react-native/ReactCommon/oscompat/React-oscompat.podspec +31 -0
- package/example/node_modules/react-native/ReactCommon/react/debug/React-debug.podspec +34 -0
- package/example/node_modules/react-native/ReactCommon/react/featureflags/React-featureflags.podspec +44 -0
- package/example/node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios/React-NativeModulesApple.podspec +54 -0
- package/example/node_modules/react-native/ReactCommon/react/nativemodule/defaults/React-defaultsnativemodule.podspec +54 -0
- package/example/node_modules/react-native/ReactCommon/react/nativemodule/dom/React-domnativemodule.podspec +60 -0
- package/example/node_modules/react-native/ReactCommon/react/nativemodule/featureflags/React-featureflagsnativemodule.podspec +53 -0
- package/example/node_modules/react-native/ReactCommon/react/nativemodule/idlecallbacks/React-idlecallbacksnativemodule.podspec +55 -0
- package/example/node_modules/react-native/ReactCommon/react/nativemodule/microtasks/React-microtasksnativemodule.podspec +52 -0
- package/example/node_modules/react-native/ReactCommon/react/nativemodule/samples/ReactCommon-Samples.podspec +63 -0
- package/example/node_modules/react-native/ReactCommon/react/performance/timeline/React-performancetimeline.podspec +50 -0
- package/example/node_modules/react-native/ReactCommon/react/renderer/consistency/React-rendererconsistency.podspec +43 -0
- package/example/node_modules/react-native/ReactCommon/react/renderer/css/React-renderercss.podspec +47 -0
- package/example/node_modules/react-native/ReactCommon/react/renderer/debug/React-rendererdebug.podspec +48 -0
- package/example/node_modules/react-native/ReactCommon/react/renderer/graphics/React-graphics.podspec +55 -0
- package/example/node_modules/react-native/ReactCommon/react/renderer/imagemanager/platform/ios/React-ImageManager.podspec +56 -0
- package/example/node_modules/react-native/ReactCommon/react/renderer/runtimescheduler/React-runtimescheduler.podspec +59 -0
- package/example/node_modules/react-native/ReactCommon/react/runtime/React-RuntimeCore.podspec +56 -0
- package/example/node_modules/react-native/ReactCommon/react/runtime/React-RuntimeHermes.podspec +53 -0
- package/example/node_modules/react-native/ReactCommon/react/runtime/platform/ios/React-RuntimeApple.podspec +72 -0
- package/example/node_modules/react-native/ReactCommon/react/timing/React-timing.podspec +43 -0
- package/example/node_modules/react-native/ReactCommon/react/utils/React-utils.podspec +55 -0
- package/example/node_modules/react-native/ReactCommon/reactperflogger/React-perflogger.podspec +42 -0
- package/example/node_modules/react-native/ReactCommon/runtimeexecutor/React-runtimeexecutor.podspec +56 -0
- package/example/node_modules/react-native/ReactCommon/yoga/Yoga.podspec +66 -0
- package/example/node_modules/react-native/react-native.config.js +139 -0
- package/example/node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec +165 -0
- package/example/node_modules/react-native/third-party-podspecs/DoubleConversion.podspec +34 -0
- package/example/node_modules/react-native/third-party-podspecs/RCT-Folly.podspec +132 -0
- package/example/node_modules/react-native/third-party-podspecs/ReactNativeDependencies.podspec +99 -0
- package/example/node_modules/react-native/third-party-podspecs/boost.podspec +34 -0
- package/example/node_modules/react-native/third-party-podspecs/fast_float.podspec +29 -0
- package/example/node_modules/react-native/third-party-podspecs/fmt.podspec +29 -0
- package/example/node_modules/react-native/third-party-podspecs/glog.podspec +47 -0
- package/example/node_modules/react-native-nitro-modules/NitroModules.podspec +90 -0
- package/example/node_modules/react-native-nitro-modules/react-native.config.js +16 -0
- package/example/react-native.config.js +21 -0
- package/lib/typescript/__tests__/utils/string.test.d.ts +2 -0
- package/lib/typescript/__tests__/utils/string.test.d.ts.map +1 -0
- package/package.json +3 -2
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
fast_float_config = get_fast_float_config()
|
|
7
|
+
fast_float_git_url = fast_float_config[:git]
|
|
8
|
+
|
|
9
|
+
Pod::Spec.new do |spec|
|
|
10
|
+
spec.name = "fast_float"
|
|
11
|
+
spec.version = "8.0.0"
|
|
12
|
+
spec.license = { :type => "MIT" }
|
|
13
|
+
spec.homepage = "https://github.com/fastfloat/fast_float"
|
|
14
|
+
spec.summary = "{fast_float} is an open-source number parsing library for C++. The library provides fast header-only implementations."
|
|
15
|
+
spec.authors = "The fast_float contributors"
|
|
16
|
+
spec.source = {
|
|
17
|
+
:git => fast_float_git_url,
|
|
18
|
+
:tag => "v8.0.0"
|
|
19
|
+
}
|
|
20
|
+
spec.pod_target_xcconfig = {
|
|
21
|
+
"CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
|
|
22
|
+
"GCC_WARN_INHIBIT_ALL_WARNINGS" => "YES" # Disable warnings because we don't control this library
|
|
23
|
+
}
|
|
24
|
+
spec.platforms = min_supported_versions
|
|
25
|
+
spec.libraries = "c++"
|
|
26
|
+
spec.public_header_files = "include/fast_float/*.h"
|
|
27
|
+
spec.header_mappings_dir = "include"
|
|
28
|
+
spec.source_files = ["include/fast_float/*.h"]
|
|
29
|
+
end
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
fmt_config = get_fmt_config()
|
|
7
|
+
fmt_git_url = fmt_config[:git]
|
|
8
|
+
|
|
9
|
+
Pod::Spec.new do |spec|
|
|
10
|
+
spec.name = "fmt"
|
|
11
|
+
spec.version = "11.0.2"
|
|
12
|
+
spec.license = { :type => "MIT" }
|
|
13
|
+
spec.homepage = "https://github.com/fmtlib/fmt"
|
|
14
|
+
spec.summary = "{fmt} is an open-source formatting library for C++. It can be used as a safe and fast alternative to (s)printf and iostreams."
|
|
15
|
+
spec.authors = "The fmt contributors"
|
|
16
|
+
spec.source = {
|
|
17
|
+
:git => fmt_git_url,
|
|
18
|
+
:tag => "11.0.2"
|
|
19
|
+
}
|
|
20
|
+
spec.pod_target_xcconfig = {
|
|
21
|
+
"CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
|
|
22
|
+
"GCC_WARN_INHIBIT_ALL_WARNINGS" => "YES" # Disable warnings because we don't control this library
|
|
23
|
+
}
|
|
24
|
+
spec.platforms = min_supported_versions
|
|
25
|
+
spec.libraries = "c++"
|
|
26
|
+
spec.public_header_files = "include/fmt/*.h"
|
|
27
|
+
spec.header_mappings_dir = "include"
|
|
28
|
+
spec.source_files = ["include/fmt/*.h", "src/format.cc"]
|
|
29
|
+
end
|
|
@@ -0,0 +1,47 @@
|
|
|
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
|
+
glog_config = get_glog_config()
|
|
7
|
+
glog_git_url = glog_config[:git]
|
|
8
|
+
|
|
9
|
+
Pod::Spec.new do |spec|
|
|
10
|
+
spec.name = 'glog'
|
|
11
|
+
spec.version = '0.3.5'
|
|
12
|
+
spec.license = { :type => 'Google', :file => 'COPYING' }
|
|
13
|
+
spec.homepage = 'https://github.com/google/glog'
|
|
14
|
+
spec.summary = 'Google logging module'
|
|
15
|
+
spec.authors = 'Google'
|
|
16
|
+
|
|
17
|
+
spec.prepare_command = File.read("../scripts/ios-configure-glog.sh")
|
|
18
|
+
spec.source = { :git => glog_git_url,
|
|
19
|
+
:tag => "v#{spec.version}" }
|
|
20
|
+
spec.module_name = 'glog'
|
|
21
|
+
spec.header_dir = 'glog'
|
|
22
|
+
spec.source_files = 'src/glog/*.h',
|
|
23
|
+
'src/demangle.cc',
|
|
24
|
+
'src/logging.cc',
|
|
25
|
+
'src/raw_logging.cc',
|
|
26
|
+
'src/signalhandler.cc',
|
|
27
|
+
'src/symbolize.cc',
|
|
28
|
+
'src/utilities.cc',
|
|
29
|
+
'src/vlog_is_on.cc'
|
|
30
|
+
# workaround for https://github.com/facebook/react-native/issues/14326
|
|
31
|
+
spec.preserve_paths = 'src/*.h',
|
|
32
|
+
'src/base/*.h'
|
|
33
|
+
spec.exclude_files = "src/windows/**/*"
|
|
34
|
+
spec.compiler_flags = '-Wno-shorten-64-to-32'
|
|
35
|
+
spec.resource_bundles = {'glog_privacy' => 'glog/PrivacyInfo.xcprivacy'}
|
|
36
|
+
|
|
37
|
+
spec.pod_target_xcconfig = {
|
|
38
|
+
"USE_HEADERMAP" => "NO",
|
|
39
|
+
"HEADER_SEARCH_PATHS" => "$(PODS_TARGET_SRCROOT)/src",
|
|
40
|
+
"DEFINES_MODULE" => "YES",
|
|
41
|
+
"GCC_WARN_INHIBIT_ALL_WARNINGS" => "YES" # Disable warnings because we don't control this library
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
# Pinning to the same version as React.podspec.
|
|
45
|
+
spec.platforms = min_supported_versions
|
|
46
|
+
|
|
47
|
+
end
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
require "json"
|
|
2
|
+
require "./nitro_pod_utils"
|
|
3
|
+
|
|
4
|
+
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
|
|
5
|
+
|
|
6
|
+
Pod::UI.puts "[NitroModules] 🔥 Your app is boosted by nitro modules!"
|
|
7
|
+
|
|
8
|
+
Pod::Spec.new do |s|
|
|
9
|
+
s.name = "NitroModules"
|
|
10
|
+
s.version = package["version"]
|
|
11
|
+
s.summary = package["description"]
|
|
12
|
+
s.homepage = package["homepage"]
|
|
13
|
+
s.license = package["license"]
|
|
14
|
+
s.authors = package["author"]
|
|
15
|
+
s.source = { :git => "https://github.com/mrousavy/nitro.git", :tag => "#{s.version}" }
|
|
16
|
+
s.platforms = {
|
|
17
|
+
:ios => min_ios_version_supported,
|
|
18
|
+
:visionos => 1.0,
|
|
19
|
+
:macos => 10.13,
|
|
20
|
+
:tvos => 13.4,
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
s.source_files = [
|
|
24
|
+
# Shared C++ codebase
|
|
25
|
+
"cpp/**/*.{h,hpp}",
|
|
26
|
+
"cpp/**/*.{c,cpp}",
|
|
27
|
+
# iOS codebase
|
|
28
|
+
"ios/**/*.{h,hpp}",
|
|
29
|
+
"ios/**/*.{c,cpp}",
|
|
30
|
+
"ios/**/*.{m,mm}",
|
|
31
|
+
"ios/**/*.swift",
|
|
32
|
+
]
|
|
33
|
+
s.public_header_files = [
|
|
34
|
+
# Public C++ headers will be exposed in modulemap (for Swift)
|
|
35
|
+
"cpp/core/AnyMap.hpp",
|
|
36
|
+
"cpp/core/ArrayBuffer.hpp",
|
|
37
|
+
"cpp/core/HybridObject.hpp",
|
|
38
|
+
"cpp/core/Null.hpp",
|
|
39
|
+
"cpp/core/Promise.hpp",
|
|
40
|
+
"cpp/entrypoint/HybridNitroModulesProxy.hpp",
|
|
41
|
+
"cpp/entrypoint/InstallNitro.hpp",
|
|
42
|
+
"cpp/registry/HybridObjectRegistry.hpp",
|
|
43
|
+
"cpp/jsi/JSIConverter.hpp",
|
|
44
|
+
"cpp/jsi/JSIHelpers.hpp",
|
|
45
|
+
"cpp/platform/NitroLogger.hpp",
|
|
46
|
+
"cpp/threading/Dispatcher.hpp",
|
|
47
|
+
"cpp/utils/JSCallback.hpp",
|
|
48
|
+
"cpp/utils/FastVectorCopy.hpp",
|
|
49
|
+
"cpp/utils/NitroHash.hpp",
|
|
50
|
+
"cpp/utils/NitroDefines.hpp",
|
|
51
|
+
"cpp/views/CachedProp.hpp",
|
|
52
|
+
# Public iOS-specific headers that will be exposed in modulemap (for Swift)
|
|
53
|
+
"ios/core/ArrayBufferHolder.hpp",
|
|
54
|
+
"ios/core/PromiseHolder.hpp",
|
|
55
|
+
"ios/utils/AnyMapUtils.hpp",
|
|
56
|
+
"ios/utils/AnyMapHolder.hpp", # <-- deprecated, removed soon
|
|
57
|
+
"ios/utils/Result.hpp",
|
|
58
|
+
"ios/utils/DateToChronoDate.hpp",
|
|
59
|
+
"ios/utils/RuntimeError.hpp",
|
|
60
|
+
"ios/utils/SwiftClosure.hpp",
|
|
61
|
+
]
|
|
62
|
+
|
|
63
|
+
xcconfig = {
|
|
64
|
+
# Use C++ 20
|
|
65
|
+
"CLANG_CXX_LANGUAGE_STANDARD" => "c++20",
|
|
66
|
+
# Enables C++ <-> Swift interop (by default it's only C)
|
|
67
|
+
"SWIFT_OBJC_INTEROP_MODE" => "objcxx",
|
|
68
|
+
# Enables stricter modular headers
|
|
69
|
+
"DEFINES_MODULE" => "YES",
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if has_react_native()
|
|
73
|
+
react_native_version = get_react_native_version()
|
|
74
|
+
if (react_native_version < 80)
|
|
75
|
+
# C++ compiler flags, for folly when building as static framework:
|
|
76
|
+
current_header_search_paths = Array(xcconfig["HEADER_SEARCH_PATHS"])
|
|
77
|
+
xcconfig["HEADER_SEARCH_PATHS"] = current_header_search_paths + ["${PODS_ROOT}/RCT-Folly"]
|
|
78
|
+
xcconfig["GCC_PREPROCESSOR_DEFINITIONS"] = "$(inherited) FOLLY_NO_CONFIG FOLLY_CFG_NO_COROUTINES"
|
|
79
|
+
xcconfig["OTHER_CPLUSPLUSFLAGS"] = "$(inherited) -DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1"
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
s.pod_target_xcconfig = xcconfig
|
|
84
|
+
|
|
85
|
+
# Nitro depends on JSI.
|
|
86
|
+
s.dependency 'React-jsi'
|
|
87
|
+
# For React Native, we implement nitro::Dispatcher using react::CallInvoker
|
|
88
|
+
s.dependency 'React-callinvoker'
|
|
89
|
+
install_modules_dependencies(s)
|
|
90
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// https://github.com/react-native-community/cli/blob/main/docs/dependencies.md
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
dependency: {
|
|
5
|
+
platforms: {
|
|
6
|
+
/**
|
|
7
|
+
* @type {import('@react-native-community/cli-types').IOSDependencyParams}
|
|
8
|
+
*/
|
|
9
|
+
ios: {},
|
|
10
|
+
/**
|
|
11
|
+
* @type {import('@react-native-community/cli-types').AndroidDependencyParams}
|
|
12
|
+
*/
|
|
13
|
+
android: {},
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const path = require('path');
|
|
2
|
+
const pkg = require('../package.json');
|
|
3
|
+
|
|
4
|
+
module.exports = {
|
|
5
|
+
project: {
|
|
6
|
+
ios: {
|
|
7
|
+
automaticPodsInstallation: true,
|
|
8
|
+
},
|
|
9
|
+
},
|
|
10
|
+
dependencies: {
|
|
11
|
+
[pkg.name]: {
|
|
12
|
+
root: path.join(__dirname, '..'),
|
|
13
|
+
platforms: {
|
|
14
|
+
// Codegen script incorrectly fails without this
|
|
15
|
+
// So we explicitly specify the platforms with empty object
|
|
16
|
+
ios: {},
|
|
17
|
+
android: {},
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"string.test.d.ts","sourceRoot":"","sources":["../../../../__tests__/utils/string.test.tsx"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rnpack/utils",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.11",
|
|
4
4
|
"description": "Basic utilities will be available and ready to use",
|
|
5
5
|
"main": "./lib/module/index.js",
|
|
6
6
|
"types": "./lib/typescript/src/index.d.ts",
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"nitro.json",
|
|
23
23
|
"*.podspec",
|
|
24
24
|
"react-native.config.js",
|
|
25
|
+
"__mocks__",
|
|
25
26
|
"!ios/build",
|
|
26
27
|
"!android/build",
|
|
27
28
|
"!android/gradle",
|
|
@@ -30,7 +31,7 @@
|
|
|
30
31
|
"!android/local.properties",
|
|
31
32
|
"!**/__tests__",
|
|
32
33
|
"!**/__fixtures__",
|
|
33
|
-
"
|
|
34
|
+
"**/__mocks__",
|
|
34
35
|
"!**/.*"
|
|
35
36
|
],
|
|
36
37
|
"scripts": {
|