@dawidzawada/bonjour-zeroconf 1.1.0 → 1.2.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 (57) hide show
  1. package/README.md +8 -0
  2. package/nitrogen/generated/android/c++/JBonjourFail.hpp +4 -5
  3. package/nitrogen/generated/android/c++/JBonjourListener.hpp +3 -4
  4. package/nitrogen/generated/android/c++/JFunc_void.hpp +3 -2
  5. package/nitrogen/generated/android/c++/JFunc_void_BonjourFail.hpp +3 -2
  6. package/nitrogen/generated/android/c++/JFunc_void_bool.hpp +3 -2
  7. package/nitrogen/generated/android/c++/JFunc_void_std__vector_ScanResult_.hpp +3 -2
  8. package/nitrogen/generated/android/c++/JHybridBonjourZeroconfSpec.cpp +9 -1
  9. package/nitrogen/generated/android/c++/JHybridBonjourZeroconfSpec.hpp +2 -1
  10. package/nitrogen/generated/android/c++/JScanOptions.hpp +1 -1
  11. package/nitrogen/generated/android/c++/JScanResult.hpp +1 -1
  12. package/nitrogen/generated/android/dawidzawada_bonjourzeroconf+autolinking.cmake +1 -1
  13. package/nitrogen/generated/android/dawidzawada_bonjourzeroconf+autolinking.gradle +1 -1
  14. package/nitrogen/generated/android/dawidzawada_bonjourzeroconfOnLoad.cpp +1 -1
  15. package/nitrogen/generated/android/dawidzawada_bonjourzeroconfOnLoad.hpp +1 -1
  16. package/nitrogen/generated/android/kotlin/com/margelo/nitro/dawidzawada/bonjourzeroconf/BonjourFail.kt +3 -1
  17. package/nitrogen/generated/android/kotlin/com/margelo/nitro/dawidzawada/bonjourzeroconf/BonjourListener.kt +2 -2
  18. package/nitrogen/generated/android/kotlin/com/margelo/nitro/dawidzawada/bonjourzeroconf/Func_void.kt +1 -1
  19. package/nitrogen/generated/android/kotlin/com/margelo/nitro/dawidzawada/bonjourzeroconf/Func_void_BonjourFail.kt +1 -1
  20. package/nitrogen/generated/android/kotlin/com/margelo/nitro/dawidzawada/bonjourzeroconf/Func_void_bool.kt +1 -1
  21. package/nitrogen/generated/android/kotlin/com/margelo/nitro/dawidzawada/bonjourzeroconf/Func_void_std__vector_ScanResult_.kt +1 -1
  22. package/nitrogen/generated/android/kotlin/com/margelo/nitro/dawidzawada/bonjourzeroconf/HybridBonjourZeroconfSpec.kt +1 -1
  23. package/nitrogen/generated/android/kotlin/com/margelo/nitro/dawidzawada/bonjourzeroconf/ScanOptions.kt +2 -2
  24. package/nitrogen/generated/android/kotlin/com/margelo/nitro/dawidzawada/bonjourzeroconf/ScanResult.kt +2 -2
  25. package/nitrogen/generated/android/kotlin/com/margelo/nitro/dawidzawada/bonjourzeroconf/dawidzawada_bonjourzeroconfOnLoad.kt +1 -1
  26. package/nitrogen/generated/ios/BonjourZeroconf+autolinking.rb +2 -2
  27. package/nitrogen/generated/ios/BonjourZeroconf-Swift-Cxx-Bridge.cpp +1 -1
  28. package/nitrogen/generated/ios/BonjourZeroconf-Swift-Cxx-Bridge.hpp +1 -1
  29. package/nitrogen/generated/ios/BonjourZeroconf-Swift-Cxx-Umbrella.hpp +1 -1
  30. package/nitrogen/generated/ios/BonjourZeroconfAutolinking.mm +1 -1
  31. package/nitrogen/generated/ios/BonjourZeroconfAutolinking.swift +1 -1
  32. package/nitrogen/generated/ios/c++/HybridBonjourZeroconfSpecSwift.cpp +1 -1
  33. package/nitrogen/generated/ios/c++/HybridBonjourZeroconfSpecSwift.hpp +7 -1
  34. package/nitrogen/generated/ios/c++/HybridLocalNetworkPermissionSpecSwift.cpp +1 -1
  35. package/nitrogen/generated/ios/c++/HybridLocalNetworkPermissionSpecSwift.hpp +7 -1
  36. package/nitrogen/generated/ios/swift/BonjourFail.swift +1 -1
  37. package/nitrogen/generated/ios/swift/BonjourListener.swift +8 -17
  38. package/nitrogen/generated/ios/swift/Func_void.swift +1 -1
  39. package/nitrogen/generated/ios/swift/Func_void_BonjourFail.swift +1 -1
  40. package/nitrogen/generated/ios/swift/Func_void_bool.swift +1 -1
  41. package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +1 -1
  42. package/nitrogen/generated/ios/swift/Func_void_std__vector_ScanResult_.swift +1 -1
  43. package/nitrogen/generated/ios/swift/HybridBonjourZeroconfSpec.swift +1 -1
  44. package/nitrogen/generated/ios/swift/HybridBonjourZeroconfSpec_cxx.swift +9 -1
  45. package/nitrogen/generated/ios/swift/HybridLocalNetworkPermissionSpec.swift +1 -1
  46. package/nitrogen/generated/ios/swift/HybridLocalNetworkPermissionSpec_cxx.swift +9 -1
  47. package/nitrogen/generated/ios/swift/ScanOptions.swift +3 -15
  48. package/nitrogen/generated/ios/swift/ScanResult.swift +32 -86
  49. package/nitrogen/generated/shared/c++/BonjourFail.hpp +1 -1
  50. package/nitrogen/generated/shared/c++/BonjourListener.hpp +13 -5
  51. package/nitrogen/generated/shared/c++/HybridBonjourZeroconfSpec.cpp +1 -1
  52. package/nitrogen/generated/shared/c++/HybridBonjourZeroconfSpec.hpp +1 -1
  53. package/nitrogen/generated/shared/c++/HybridLocalNetworkPermissionSpec.cpp +1 -1
  54. package/nitrogen/generated/shared/c++/HybridLocalNetworkPermissionSpec.hpp +1 -1
  55. package/nitrogen/generated/shared/c++/ScanOptions.hpp +13 -5
  56. package/nitrogen/generated/shared/c++/ScanResult.hpp +25 -17
  57. package/package.json +5 -6
@@ -2,7 +2,7 @@
2
2
  /// Func_void_std__exception_ptr.swift
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
5
+ /// Copyright © Marc Rousavy @ Margelo
6
6
  ///
7
7
 
8
8
  import Foundation
@@ -2,7 +2,7 @@
2
2
  /// Func_void_std__vector_ScanResult_.swift
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
5
+ /// Copyright © Marc Rousavy @ Margelo
6
6
  ///
7
7
 
8
8
  import Foundation
@@ -2,7 +2,7 @@
2
2
  /// HybridBonjourZeroconfSpec.swift
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
5
+ /// Copyright © Marc Rousavy @ Margelo
6
6
  ///
7
7
 
8
8
  import Foundation
@@ -2,7 +2,7 @@
2
2
  /// HybridBonjourZeroconfSpec_cxx.swift
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
5
+ /// Copyright © Marc Rousavy @ Margelo
6
6
  ///
7
7
 
8
8
  import Foundation
@@ -96,6 +96,14 @@ open class HybridBonjourZeroconfSpec_cxx {
96
96
  return MemoryHelper.getSizeOf(self.__implementation) + self.__implementation.memorySize
97
97
  }
98
98
 
99
+ /**
100
+ * Compares this object with the given [other] object for reference equality.
101
+ */
102
+ @inline(__always)
103
+ public func equals(other: HybridBonjourZeroconfSpec_cxx) -> Bool {
104
+ return self.__implementation === other.__implementation
105
+ }
106
+
99
107
  /**
100
108
  * Call dispose() on the Swift class.
101
109
  * This _may_ be called manually from JS.
@@ -2,7 +2,7 @@
2
2
  /// HybridLocalNetworkPermissionSpec.swift
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
5
+ /// Copyright © Marc Rousavy @ Margelo
6
6
  ///
7
7
 
8
8
  import Foundation
@@ -2,7 +2,7 @@
2
2
  /// HybridLocalNetworkPermissionSpec_cxx.swift
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
5
+ /// Copyright © Marc Rousavy @ Margelo
6
6
  ///
7
7
 
8
8
  import Foundation
@@ -96,6 +96,14 @@ open class HybridLocalNetworkPermissionSpec_cxx {
96
96
  return MemoryHelper.getSizeOf(self.__implementation) + self.__implementation.memorySize
97
97
  }
98
98
 
99
+ /**
100
+ * Compares this object with the given [other] object for reference equality.
101
+ */
102
+ @inline(__always)
103
+ public func equals(other: HybridLocalNetworkPermissionSpec_cxx) -> Bool {
104
+ return self.__implementation === other.__implementation
105
+ }
106
+
99
107
  /**
100
108
  * Call dispose() on the Swift class.
101
109
  * This _may_ be called manually from JS.
@@ -2,7 +2,7 @@
2
2
  /// ScanOptions.swift
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
5
+ /// Copyright © Marc Rousavy @ Margelo
6
6
  ///
7
7
 
8
8
  import Foundation
@@ -29,20 +29,8 @@ public extension ScanOptions {
29
29
  }())
30
30
  }
31
31
 
32
+ @inline(__always)
32
33
  var addressResolveTimeout: Double? {
33
- @inline(__always)
34
- get {
35
- return self.__addressResolveTimeout.value
36
- }
37
- @inline(__always)
38
- set {
39
- self.__addressResolveTimeout = { () -> bridge.std__optional_double_ in
40
- if let __unwrappedValue = newValue {
41
- return bridge.create_std__optional_double_(__unwrappedValue)
42
- } else {
43
- return .init()
44
- }
45
- }()
46
- }
34
+ return self.__addressResolveTimeout.value
47
35
  }
48
36
  }
@@ -2,7 +2,7 @@
2
2
  /// ScanResult.swift
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
5
+ /// Copyright © Marc Rousavy @ Margelo
6
6
  ///
7
7
 
8
8
  import Foundation
@@ -47,103 +47,49 @@ public extension ScanResult {
47
47
  }())
48
48
  }
49
49
 
50
+ @inline(__always)
50
51
  var name: String {
51
- @inline(__always)
52
- get {
53
- return String(self.__name)
54
- }
55
- @inline(__always)
56
- set {
57
- self.__name = std.string(newValue)
58
- }
52
+ return String(self.__name)
59
53
  }
60
54
 
55
+ @inline(__always)
61
56
  var ipv4: String? {
62
- @inline(__always)
63
- get {
64
- return { () -> String? in
65
- if bridge.has_value_std__optional_std__string_(self.__ipv4) {
66
- let __unwrapped = bridge.get_std__optional_std__string_(self.__ipv4)
67
- return String(__unwrapped)
68
- } else {
69
- return nil
70
- }
71
- }()
72
- }
73
- @inline(__always)
74
- set {
75
- self.__ipv4 = { () -> bridge.std__optional_std__string_ in
76
- if let __unwrappedValue = newValue {
77
- return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
78
- } else {
79
- return .init()
80
- }
81
- }()
82
- }
57
+ return { () -> String? in
58
+ if bridge.has_value_std__optional_std__string_(self.__ipv4) {
59
+ let __unwrapped = bridge.get_std__optional_std__string_(self.__ipv4)
60
+ return String(__unwrapped)
61
+ } else {
62
+ return nil
63
+ }
64
+ }()
83
65
  }
84
66
 
67
+ @inline(__always)
85
68
  var ipv6: String? {
86
- @inline(__always)
87
- get {
88
- return { () -> String? in
89
- if bridge.has_value_std__optional_std__string_(self.__ipv6) {
90
- let __unwrapped = bridge.get_std__optional_std__string_(self.__ipv6)
91
- return String(__unwrapped)
92
- } else {
93
- return nil
94
- }
95
- }()
96
- }
97
- @inline(__always)
98
- set {
99
- self.__ipv6 = { () -> bridge.std__optional_std__string_ in
100
- if let __unwrappedValue = newValue {
101
- return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
102
- } else {
103
- return .init()
104
- }
105
- }()
106
- }
69
+ return { () -> String? in
70
+ if bridge.has_value_std__optional_std__string_(self.__ipv6) {
71
+ let __unwrapped = bridge.get_std__optional_std__string_(self.__ipv6)
72
+ return String(__unwrapped)
73
+ } else {
74
+ return nil
75
+ }
76
+ }()
107
77
  }
108
78
 
79
+ @inline(__always)
109
80
  var hostname: String? {
110
- @inline(__always)
111
- get {
112
- return { () -> String? in
113
- if bridge.has_value_std__optional_std__string_(self.__hostname) {
114
- let __unwrapped = bridge.get_std__optional_std__string_(self.__hostname)
115
- return String(__unwrapped)
116
- } else {
117
- return nil
118
- }
119
- }()
120
- }
121
- @inline(__always)
122
- set {
123
- self.__hostname = { () -> bridge.std__optional_std__string_ in
124
- if let __unwrappedValue = newValue {
125
- return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
126
- } else {
127
- return .init()
128
- }
129
- }()
130
- }
81
+ return { () -> String? in
82
+ if bridge.has_value_std__optional_std__string_(self.__hostname) {
83
+ let __unwrapped = bridge.get_std__optional_std__string_(self.__hostname)
84
+ return String(__unwrapped)
85
+ } else {
86
+ return nil
87
+ }
88
+ }()
131
89
  }
132
90
 
91
+ @inline(__always)
133
92
  var port: Double? {
134
- @inline(__always)
135
- get {
136
- return self.__port.value
137
- }
138
- @inline(__always)
139
- set {
140
- self.__port = { () -> bridge.std__optional_double_ in
141
- if let __unwrappedValue = newValue {
142
- return bridge.create_std__optional_double_(__unwrappedValue)
143
- } else {
144
- return .init()
145
- }
146
- }()
147
- }
93
+ return self.__port.value
148
94
  }
149
95
  }
@@ -2,7 +2,7 @@
2
2
  /// BonjourFail.hpp
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
5
+ /// Copyright © Marc Rousavy @ Margelo
6
6
  ///
7
7
 
8
8
  #pragma once
@@ -2,7 +2,7 @@
2
2
  /// BonjourListener.hpp
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
5
+ /// Copyright © Marc Rousavy @ Margelo
6
6
  ///
7
7
 
8
8
  #pragma once
@@ -22,6 +22,11 @@
22
22
  #else
23
23
  #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
24
24
  #endif
25
+ #if __has_include(<NitroModules/PropNameIDCache.hpp>)
26
+ #include <NitroModules/PropNameIDCache.hpp>
27
+ #else
28
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
29
+ #endif
25
30
 
26
31
 
27
32
 
@@ -32,13 +37,16 @@ namespace margelo::nitro::dawidzawada_bonjourzeroconf {
32
37
  /**
33
38
  * A struct which can be represented as a JavaScript object (BonjourListener).
34
39
  */
35
- struct BonjourListener {
40
+ struct BonjourListener final {
36
41
  public:
37
42
  std::function<void()> remove SWIFT_PRIVATE;
38
43
 
39
44
  public:
40
45
  BonjourListener() = default;
41
46
  explicit BonjourListener(std::function<void()> remove): remove(remove) {}
47
+
48
+ public:
49
+ // BonjourListener is not equatable because these properties are not equatable: remove
42
50
  };
43
51
 
44
52
  } // namespace margelo::nitro::dawidzawada_bonjourzeroconf
@@ -51,12 +59,12 @@ namespace margelo::nitro {
51
59
  static inline margelo::nitro::dawidzawada_bonjourzeroconf::BonjourListener fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
52
60
  jsi::Object obj = arg.asObject(runtime);
53
61
  return margelo::nitro::dawidzawada_bonjourzeroconf::BonjourListener(
54
- JSIConverter<std::function<void()>>::fromJSI(runtime, obj.getProperty(runtime, "remove"))
62
+ JSIConverter<std::function<void()>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "remove")))
55
63
  );
56
64
  }
57
65
  static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::dawidzawada_bonjourzeroconf::BonjourListener& arg) {
58
66
  jsi::Object obj(runtime);
59
- obj.setProperty(runtime, "remove", JSIConverter<std::function<void()>>::toJSI(runtime, arg.remove));
67
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "remove"), JSIConverter<std::function<void()>>::toJSI(runtime, arg.remove));
60
68
  return obj;
61
69
  }
62
70
  static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
@@ -67,7 +75,7 @@ namespace margelo::nitro {
67
75
  if (!nitro::isPlainObject(runtime, obj)) {
68
76
  return false;
69
77
  }
70
- if (!JSIConverter<std::function<void()>>::canConvert(runtime, obj.getProperty(runtime, "remove"))) return false;
78
+ if (!JSIConverter<std::function<void()>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "remove")))) return false;
71
79
  return true;
72
80
  }
73
81
  };
@@ -2,7 +2,7 @@
2
2
  /// HybridBonjourZeroconfSpec.cpp
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
5
+ /// Copyright © Marc Rousavy @ Margelo
6
6
  ///
7
7
 
8
8
  #include "HybridBonjourZeroconfSpec.hpp"
@@ -2,7 +2,7 @@
2
2
  /// HybridBonjourZeroconfSpec.hpp
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
5
+ /// Copyright © Marc Rousavy @ Margelo
6
6
  ///
7
7
 
8
8
  #pragma once
@@ -2,7 +2,7 @@
2
2
  /// HybridLocalNetworkPermissionSpec.cpp
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
5
+ /// Copyright © Marc Rousavy @ Margelo
6
6
  ///
7
7
 
8
8
  #include "HybridLocalNetworkPermissionSpec.hpp"
@@ -2,7 +2,7 @@
2
2
  /// HybridLocalNetworkPermissionSpec.hpp
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
5
+ /// Copyright © Marc Rousavy @ Margelo
6
6
  ///
7
7
 
8
8
  #pragma once
@@ -2,7 +2,7 @@
2
2
  /// ScanOptions.hpp
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
5
+ /// Copyright © Marc Rousavy @ Margelo
6
6
  ///
7
7
 
8
8
  #pragma once
@@ -22,6 +22,11 @@
22
22
  #else
23
23
  #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
24
24
  #endif
25
+ #if __has_include(<NitroModules/PropNameIDCache.hpp>)
26
+ #include <NitroModules/PropNameIDCache.hpp>
27
+ #else
28
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
29
+ #endif
25
30
 
26
31
 
27
32
 
@@ -32,13 +37,16 @@ namespace margelo::nitro::dawidzawada_bonjourzeroconf {
32
37
  /**
33
38
  * A struct which can be represented as a JavaScript object (ScanOptions).
34
39
  */
35
- struct ScanOptions {
40
+ struct ScanOptions final {
36
41
  public:
37
42
  std::optional<double> addressResolveTimeout SWIFT_PRIVATE;
38
43
 
39
44
  public:
40
45
  ScanOptions() = default;
41
46
  explicit ScanOptions(std::optional<double> addressResolveTimeout): addressResolveTimeout(addressResolveTimeout) {}
47
+
48
+ public:
49
+ friend bool operator==(const ScanOptions& lhs, const ScanOptions& rhs) = default;
42
50
  };
43
51
 
44
52
  } // namespace margelo::nitro::dawidzawada_bonjourzeroconf
@@ -51,12 +59,12 @@ namespace margelo::nitro {
51
59
  static inline margelo::nitro::dawidzawada_bonjourzeroconf::ScanOptions fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
52
60
  jsi::Object obj = arg.asObject(runtime);
53
61
  return margelo::nitro::dawidzawada_bonjourzeroconf::ScanOptions(
54
- JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "addressResolveTimeout"))
62
+ JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "addressResolveTimeout")))
55
63
  );
56
64
  }
57
65
  static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::dawidzawada_bonjourzeroconf::ScanOptions& arg) {
58
66
  jsi::Object obj(runtime);
59
- obj.setProperty(runtime, "addressResolveTimeout", JSIConverter<std::optional<double>>::toJSI(runtime, arg.addressResolveTimeout));
67
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "addressResolveTimeout"), JSIConverter<std::optional<double>>::toJSI(runtime, arg.addressResolveTimeout));
60
68
  return obj;
61
69
  }
62
70
  static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
@@ -67,7 +75,7 @@ namespace margelo::nitro {
67
75
  if (!nitro::isPlainObject(runtime, obj)) {
68
76
  return false;
69
77
  }
70
- if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "addressResolveTimeout"))) return false;
78
+ if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "addressResolveTimeout")))) return false;
71
79
  return true;
72
80
  }
73
81
  };
@@ -2,7 +2,7 @@
2
2
  /// ScanResult.hpp
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
- /// Copyright © 2026 Marc Rousavy @ Margelo
5
+ /// Copyright © Marc Rousavy @ Margelo
6
6
  ///
7
7
 
8
8
  #pragma once
@@ -22,6 +22,11 @@
22
22
  #else
23
23
  #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
24
24
  #endif
25
+ #if __has_include(<NitroModules/PropNameIDCache.hpp>)
26
+ #include <NitroModules/PropNameIDCache.hpp>
27
+ #else
28
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
29
+ #endif
25
30
 
26
31
 
27
32
 
@@ -33,7 +38,7 @@ namespace margelo::nitro::dawidzawada_bonjourzeroconf {
33
38
  /**
34
39
  * A struct which can be represented as a JavaScript object (ScanResult).
35
40
  */
36
- struct ScanResult {
41
+ struct ScanResult final {
37
42
  public:
38
43
  std::string name SWIFT_PRIVATE;
39
44
  std::optional<std::string> ipv4 SWIFT_PRIVATE;
@@ -44,6 +49,9 @@ namespace margelo::nitro::dawidzawada_bonjourzeroconf {
44
49
  public:
45
50
  ScanResult() = default;
46
51
  explicit ScanResult(std::string name, std::optional<std::string> ipv4, std::optional<std::string> ipv6, std::optional<std::string> hostname, std::optional<double> port): name(name), ipv4(ipv4), ipv6(ipv6), hostname(hostname), port(port) {}
52
+
53
+ public:
54
+ friend bool operator==(const ScanResult& lhs, const ScanResult& rhs) = default;
47
55
  };
48
56
 
49
57
  } // namespace margelo::nitro::dawidzawada_bonjourzeroconf
@@ -56,20 +64,20 @@ namespace margelo::nitro {
56
64
  static inline margelo::nitro::dawidzawada_bonjourzeroconf::ScanResult fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
57
65
  jsi::Object obj = arg.asObject(runtime);
58
66
  return margelo::nitro::dawidzawada_bonjourzeroconf::ScanResult(
59
- JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "name")),
60
- JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "ipv4")),
61
- JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "ipv6")),
62
- JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "hostname")),
63
- JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "port"))
67
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "name"))),
68
+ JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "ipv4"))),
69
+ JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "ipv6"))),
70
+ JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "hostname"))),
71
+ JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "port")))
64
72
  );
65
73
  }
66
74
  static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::dawidzawada_bonjourzeroconf::ScanResult& arg) {
67
75
  jsi::Object obj(runtime);
68
- obj.setProperty(runtime, "name", JSIConverter<std::string>::toJSI(runtime, arg.name));
69
- obj.setProperty(runtime, "ipv4", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.ipv4));
70
- obj.setProperty(runtime, "ipv6", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.ipv6));
71
- obj.setProperty(runtime, "hostname", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.hostname));
72
- obj.setProperty(runtime, "port", JSIConverter<std::optional<double>>::toJSI(runtime, arg.port));
76
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "name"), JSIConverter<std::string>::toJSI(runtime, arg.name));
77
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "ipv4"), JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.ipv4));
78
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "ipv6"), JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.ipv6));
79
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "hostname"), JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.hostname));
80
+ obj.setProperty(runtime, PropNameIDCache::get(runtime, "port"), JSIConverter<std::optional<double>>::toJSI(runtime, arg.port));
73
81
  return obj;
74
82
  }
75
83
  static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
@@ -80,11 +88,11 @@ namespace margelo::nitro {
80
88
  if (!nitro::isPlainObject(runtime, obj)) {
81
89
  return false;
82
90
  }
83
- if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "name"))) return false;
84
- if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "ipv4"))) return false;
85
- if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "ipv6"))) return false;
86
- if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "hostname"))) return false;
87
- if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "port"))) return false;
91
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "name")))) return false;
92
+ if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "ipv4")))) return false;
93
+ if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "ipv6")))) return false;
94
+ if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "hostname")))) return false;
95
+ if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "port")))) return false;
88
96
  return true;
89
97
  }
90
98
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dawidzawada/bonjour-zeroconf",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "React Native Zeroconf scanner using Bonjour (iOS) and NSD (Android). Powered by Nitro Modules.",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",
@@ -95,12 +95,12 @@
95
95
  "eslint-config-prettier": "^10.1.8",
96
96
  "eslint-plugin-prettier": "^5.5.4",
97
97
  "jest": "^29.7.0",
98
- "nitrogen": "0.31.8",
98
+ "nitrogen": "0.32.2",
99
99
  "prettier": "^3.6.2",
100
100
  "react": "19.1.0",
101
101
  "react-native": "0.81.1",
102
102
  "react-native-builder-bob": "^0.40.13",
103
- "react-native-nitro-modules": "0.31.8",
103
+ "react-native-nitro-modules": "0.32.2",
104
104
  "release-it": "^19.0.4",
105
105
  "turbo": "^2.5.6",
106
106
  "typescript": "^5.9.2"
@@ -108,7 +108,7 @@
108
108
  "peerDependencies": {
109
109
  "react": "*",
110
110
  "react-native": "*",
111
- "react-native-nitro-modules": "0.31.8"
111
+ "react-native-nitro-modules": "0.32.2"
112
112
  },
113
113
  "workspaces": [
114
114
  "example"
@@ -159,8 +159,7 @@
159
159
  [
160
160
  "custom",
161
161
  {
162
- "script": "nitrogen",
163
- "clean": "nitrogen/"
162
+ "script": "nitrogen"
164
163
  }
165
164
  ],
166
165
  [