react-native-acoustic-connect-beta 19.0.36 → 19.1.2
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/CHANGELOG.md +10 -0
- package/README.md +42 -12
- package/android/build.gradle +15 -61
- package/android/src/main/assets/ConnectBasicConfig.properties +4 -4
- package/android/src/main/java/com/acousticconnectrn/HybridAcousticConnectRN.kt +47 -47
- package/ios/AcousticConnectRNConfig.json +9 -16
- package/ios/HybridAcousticConnectRN.swift +5 -5
- package/nitrogen/generated/android/AcousticConnectRN+autolinking.cmake +1 -1
- package/nitrogen/generated/android/c++/JHybridAcousticConnectRNSpec.cpp +7 -7
- package/nitrogen/generated/android/c++/JHybridAcousticConnectRNSpec.hpp +2 -2
- package/nitrogen/generated/android/c++/JPushErrorInfo.hpp +1 -1
- package/nitrogen/generated/android/c++/JPushPermissionResult.hpp +1 -1
- package/nitrogen/generated/android/c++/JVariant_Boolean_NullType.cpp +26 -0
- package/nitrogen/generated/android/c++/{JVariant_NullType_Boolean.hpp → JVariant_Boolean_NullType.hpp} +22 -22
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/acousticconnectrn/HybridAcousticConnectRNSpec.kt +4 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/acousticconnectrn/{Variant_NullType_Boolean.kt → Variant_Boolean_NullType.kt} +10 -10
- package/nitrogen/generated/ios/AcousticConnectRN-Swift-Cxx-Bridge.cpp +4 -4
- package/nitrogen/generated/ios/AcousticConnectRN-Swift-Cxx-Bridge.hpp +43 -43
- package/nitrogen/generated/ios/c++/HybridAcousticConnectRNSpecSwift.hpp +2 -2
- package/nitrogen/generated/ios/swift/{Func_void_std__variant_nitro__NullType__bool_.swift → Func_void_std__variant_bool__nitro__NullType_.swift} +13 -13
- package/nitrogen/generated/ios/swift/HybridAcousticConnectRNSpec.swift +2 -2
- package/nitrogen/generated/ios/swift/HybridAcousticConnectRNSpec_cxx.swift +17 -17
- package/nitrogen/generated/ios/swift/{Variant_NullType_Bool.swift → Variant_Bool_NullType.swift} +6 -6
- package/nitrogen/generated/shared/c++/HybridAcousticConnectRNSpec.hpp +2 -2
- package/package.json +11 -10
- package/scripts/gradleParser.js +7 -0
- package/nitrogen/generated/android/c++/JVariant_NullType_Boolean.cpp +0 -26
package/nitrogen/generated/ios/swift/{Variant_NullType_Bool.swift → Variant_Bool_NullType.swift}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
///
|
|
2
|
-
///
|
|
2
|
+
/// Variant_Bool_NullType.swift
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
5
|
/// Copyright © Marc Rousavy @ Margelo
|
|
@@ -9,15 +9,15 @@ import NitroModules
|
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* An Swift enum with associated values representing a Variant/Union type.
|
|
12
|
-
* JS type: `
|
|
12
|
+
* JS type: `boolean | null`
|
|
13
13
|
*/
|
|
14
14
|
@frozen
|
|
15
|
-
public enum
|
|
16
|
-
case first(
|
|
17
|
-
case second(
|
|
15
|
+
public enum Variant_Bool_NullType {
|
|
16
|
+
case first(Bool)
|
|
17
|
+
case second(NullType)
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
public extension
|
|
20
|
+
public extension Variant_Bool_NullType {
|
|
21
21
|
func asType<T>(_ type: T.Type = T.self) -> T? {
|
|
22
22
|
switch self {
|
|
23
23
|
case .first(let value): return value as? T
|
|
@@ -89,9 +89,9 @@ namespace margelo::nitro::acousticconnectrn {
|
|
|
89
89
|
virtual std::shared_ptr<Promise<bool>> pushDidFailToRegister(const PushErrorInfo& error) = 0;
|
|
90
90
|
virtual std::shared_ptr<Promise<bool>> pushDidReceiveNotification(const std::unordered_map<std::string, std::variant<bool, std::string, double>>& userInfo) = 0;
|
|
91
91
|
virtual std::shared_ptr<Promise<bool>> pushDidReceiveResponse(const std::string& actionIdentifier, const std::unordered_map<std::string, std::variant<bool, std::string, double>>& userInfo) = 0;
|
|
92
|
-
virtual std::shared_ptr<Promise<bool>> pushDidReceiveAuthorization(const std::optional<std::variant<nitro::NullType
|
|
92
|
+
virtual std::shared_ptr<Promise<bool>> pushDidReceiveAuthorization(const std::optional<std::variant<bool, nitro::NullType>>& granted, const std::optional<PushErrorInfo>& error) = 0;
|
|
93
93
|
virtual std::shared_ptr<Promise<PushPermissionResult>> pushRequestPermission() = 0;
|
|
94
|
-
virtual std::shared_ptr<Promise<std::variant<nitro::NullType
|
|
94
|
+
virtual std::shared_ptr<Promise<std::variant<bool, nitro::NullType>>> pushGetPermissionState() = 0;
|
|
95
95
|
|
|
96
96
|
protected:
|
|
97
97
|
// Hybrid Setup
|
package/package.json
CHANGED
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
"@expo/config-plugins": "~55.0.10",
|
|
17
17
|
"@expo/config-types": "^55.0.5",
|
|
18
18
|
"@jamesacarr/eslint-formatter-github-actions": "^0.2.0",
|
|
19
|
-
"@react-native/babel-preset": "0.
|
|
19
|
+
"@react-native/babel-preset": "0.86.3",
|
|
20
|
+
"@react-native/jest-preset": "0.86.3",
|
|
20
21
|
"@release-it/bumper": "^7.0.1",
|
|
21
22
|
"@release-it/conventional-changelog": "^10.0.0",
|
|
22
23
|
"@testing-library/react-native": "^13.3.3",
|
|
@@ -25,13 +26,13 @@
|
|
|
25
26
|
"jest": "^29.7.0",
|
|
26
27
|
"jest-junit": "^16.0.0",
|
|
27
28
|
"jetifier": "^1.6.3",
|
|
28
|
-
"nitrogen": "0.
|
|
29
|
+
"nitrogen": "0.37.1",
|
|
29
30
|
"prettier-plugin-kotlin": "^2.1.0",
|
|
30
|
-
"react": "19.
|
|
31
|
-
"react-native": "0.
|
|
31
|
+
"react": "19.2.3",
|
|
32
|
+
"react-native": "0.86.3",
|
|
32
33
|
"react-native-builder-bob": "^0.37.0",
|
|
33
|
-
"react-native-nitro-modules": "0.
|
|
34
|
-
"react-test-renderer": "19.
|
|
34
|
+
"react-native-nitro-modules": "0.37.1",
|
|
35
|
+
"react-test-renderer": "19.2.3",
|
|
35
36
|
"release-it": "^19.0.2",
|
|
36
37
|
"typescript": "5.0.4"
|
|
37
38
|
},
|
|
@@ -118,8 +119,8 @@
|
|
|
118
119
|
"peerDependencies": {
|
|
119
120
|
"@expo/config-plugins": ">=55.0.0",
|
|
120
121
|
"react": ">=19.1.1 <20.0.0",
|
|
121
|
-
"react-native": ">=0.
|
|
122
|
-
"react-native-nitro-modules": "0.
|
|
122
|
+
"react-native": ">=0.84.0 <0.88.0",
|
|
123
|
+
"react-native-nitro-modules": "0.37.1"
|
|
123
124
|
},
|
|
124
125
|
"peerDependenciesMeta": {
|
|
125
126
|
"@expo/config-plugins": {
|
|
@@ -217,7 +218,7 @@
|
|
|
217
218
|
"test": "jest",
|
|
218
219
|
"test:all": "npm test && npm run test:plugin && npm run test:cli && npm run test:skills",
|
|
219
220
|
"test:cli": "node --test cli/__tests__/",
|
|
220
|
-
"test:plugin": "npm run build:plugin && node --test plugin/__tests__
|
|
221
|
+
"test:plugin": "npm run build:plugin && node --test plugin/__tests__/*.test.mjs",
|
|
221
222
|
"test:skills": "node .claude/skills/release-verification/scripts/assert-messages.mjs selftest",
|
|
222
223
|
"test:watch": "jest --watch",
|
|
223
224
|
"typecheck": "tsc --noEmit",
|
|
@@ -227,7 +228,7 @@
|
|
|
227
228
|
"source": "src/index",
|
|
228
229
|
"summary": "react-native ios android tealeaf connect cxa wxca er enhanced-replay",
|
|
229
230
|
"types": "./lib/typescript/src/index.d.ts",
|
|
230
|
-
"version": "19.
|
|
231
|
+
"version": "19.1.2",
|
|
231
232
|
"workspaces": [
|
|
232
233
|
"example",
|
|
233
234
|
"Examples/bare-workflow"
|
package/scripts/gradleParser.js
CHANGED
|
@@ -26,6 +26,11 @@ const gradleCode = `apply from: new File(["node", "--print", "require.resolve('r
|
|
|
26
26
|
// Matches the legacy `apply from: project(':react-native-acoustic-connect-beta')...`
|
|
27
27
|
// line so an existing integration is upgraded in place on the next install.
|
|
28
28
|
const legacyGradleCodeRe = /^.*apply from:\s*project\(':react-native-acoustic-connect-beta'\).*config\.gradle".*$/m
|
|
29
|
+
// Matches any other live (uncommented) `apply from:` of this SDK's config.gradle —
|
|
30
|
+
// e.g. the bare-workflow sample's `resolveNodeModule(...)` form. Checked so an
|
|
31
|
+
// app that already wires config.gradle its own way doesn't get a second apply
|
|
32
|
+
// appended on every install.
|
|
33
|
+
const otherGradleCodeRe = /^(?!\s*\/\/).*apply from:.*react-native-acoustic-connect-beta.*config\.gradle.*$/m
|
|
29
34
|
const filePath = `${directoryPath}/android/app/build.gradle`
|
|
30
35
|
|
|
31
36
|
if(!isValid(filePath)){
|
|
@@ -48,6 +53,8 @@ try {
|
|
|
48
53
|
gradleData = gradleData.replace(legacyGradleCodeRe, gradleCode)
|
|
49
54
|
fs.writeFileSync(filePath, gradleData);
|
|
50
55
|
console.log("Upgraded legacy config.gradle apply-from line in:", filePath)
|
|
56
|
+
} else if (otherGradleCodeRe.test(gradleData)) {
|
|
57
|
+
console.log("config.gradle is already applied another way, skipping:", filePath)
|
|
51
58
|
} else {
|
|
52
59
|
gradleData = `${gradleData}\n${gradleCode}\n`
|
|
53
60
|
fs.writeFileSync(filePath, gradleData);
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
///
|
|
2
|
-
/// JVariant_NullType_Boolean.cpp
|
|
3
|
-
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
-
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
-
///
|
|
7
|
-
|
|
8
|
-
#include "JVariant_NullType_Boolean.hpp"
|
|
9
|
-
|
|
10
|
-
namespace margelo::nitro::acousticconnectrn {
|
|
11
|
-
/**
|
|
12
|
-
* Converts JVariant_NullType_Boolean to std::variant<nitro::NullType, bool>
|
|
13
|
-
*/
|
|
14
|
-
std::variant<nitro::NullType, bool> JVariant_NullType_Boolean::toCpp() const {
|
|
15
|
-
if (isInstanceOf(JVariant_NullType_Boolean_impl::First::javaClassStatic())) {
|
|
16
|
-
// It's a `nitro::NullType`
|
|
17
|
-
auto jniValue = static_cast<const JVariant_NullType_Boolean_impl::First*>(this)->getValue();
|
|
18
|
-
return nitro::null;
|
|
19
|
-
} else if (isInstanceOf(JVariant_NullType_Boolean_impl::Second::javaClassStatic())) {
|
|
20
|
-
// It's a `bool`
|
|
21
|
-
auto jniValue = static_cast<const JVariant_NullType_Boolean_impl::Second*>(this)->getValue();
|
|
22
|
-
return static_cast<bool>(jniValue);
|
|
23
|
-
}
|
|
24
|
-
throw std::invalid_argument("Variant is unknown Kotlin instance!");
|
|
25
|
-
}
|
|
26
|
-
} // namespace margelo::nitro::acousticconnectrn
|