@matter/react-native 0.16.11-alpha.0-20260228-3ee9c97df → 0.17.0-alpha.0-20260301-e04453ac0
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.
|
@@ -5,7 +5,7 @@ export declare class NetworkReactNative extends Network {
|
|
|
5
5
|
static getNetInterfaceForIp(ip: string): Promise<string | undefined>;
|
|
6
6
|
private static readonly netInterfaces;
|
|
7
7
|
close(): Promise<void>;
|
|
8
|
-
private static
|
|
8
|
+
private static getNetInterfaceForRemoteAddress;
|
|
9
9
|
/**
|
|
10
10
|
* Get all network interfaces.
|
|
11
11
|
* The optional configuration parameter allows to map interface names to types if this mapping is known.
|
|
@@ -105,13 +105,13 @@ class NetworkReactNative extends import_general.Network {
|
|
|
105
105
|
}
|
|
106
106
|
static netInterfaces = new import_general.AsyncCache(
|
|
107
107
|
"Network interface",
|
|
108
|
-
(ip) => this.
|
|
108
|
+
(ip) => this.getNetInterfaceForRemoteAddress(ip),
|
|
109
109
|
(0, import_general.Minutes)(5)
|
|
110
110
|
);
|
|
111
111
|
async close() {
|
|
112
112
|
await NetworkReactNative.netInterfaces.close();
|
|
113
113
|
}
|
|
114
|
-
static async
|
|
114
|
+
static async getNetInterfaceForRemoteAddress(ip) {
|
|
115
115
|
if (ip.includes("%")) {
|
|
116
116
|
return ip.split("%")[1];
|
|
117
117
|
} else {
|
|
@@ -5,7 +5,7 @@ export declare class NetworkReactNative extends Network {
|
|
|
5
5
|
static getNetInterfaceForIp(ip: string): Promise<string | undefined>;
|
|
6
6
|
private static readonly netInterfaces;
|
|
7
7
|
close(): Promise<void>;
|
|
8
|
-
private static
|
|
8
|
+
private static getNetInterfaceForRemoteAddress;
|
|
9
9
|
/**
|
|
10
10
|
* Get all network interfaces.
|
|
11
11
|
* The optional configuration parameter allows to map interface names to types if this mapping is known.
|
|
@@ -81,13 +81,13 @@ class NetworkReactNative extends Network {
|
|
|
81
81
|
}
|
|
82
82
|
static netInterfaces = new AsyncCache(
|
|
83
83
|
"Network interface",
|
|
84
|
-
(ip) => this.
|
|
84
|
+
(ip) => this.getNetInterfaceForRemoteAddress(ip),
|
|
85
85
|
Minutes(5)
|
|
86
86
|
);
|
|
87
87
|
async close() {
|
|
88
88
|
await NetworkReactNative.netInterfaces.close();
|
|
89
89
|
}
|
|
90
|
-
static async
|
|
90
|
+
static async getNetInterfaceForRemoteAddress(ip) {
|
|
91
91
|
if (ip.includes("%")) {
|
|
92
92
|
return ip.split("%")[1];
|
|
93
93
|
} else {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@matter/react-native",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0-alpha.0-20260301-e04453ac0",
|
|
4
4
|
"description": "Experimental React Native support for matter.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"iot",
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@craftzdog/react-native-buffer": "6.1.1",
|
|
39
|
-
"@matter/general": "0.
|
|
40
|
-
"@matter/nodejs": "0.
|
|
41
|
-
"@matter/protocol": "0.
|
|
39
|
+
"@matter/general": "0.17.0-alpha.0-20260301-e04453ac0",
|
|
40
|
+
"@matter/nodejs": "0.17.0-alpha.0-20260301-e04453ac0",
|
|
41
|
+
"@matter/protocol": "0.17.0-alpha.0-20260301-e04453ac0",
|
|
42
42
|
"@react-native-async-storage/async-storage": "^2.2.0",
|
|
43
43
|
"@react-native-community/netinfo": "^12.0.1",
|
|
44
44
|
"@types/node": "^25.3.0",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"react-native-udp": "^4.1.7"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@matter/tools": "0.
|
|
51
|
+
"@matter/tools": "0.17.0-alpha.0-20260301-e04453ac0"
|
|
52
52
|
},
|
|
53
53
|
"overrides": {
|
|
54
54
|
"brorand": "npm:@matter.js/brorand@1.1.0"
|
|
@@ -113,7 +113,7 @@ export class NetworkReactNative extends Network {
|
|
|
113
113
|
|
|
114
114
|
private static readonly netInterfaces = new AsyncCache<string | undefined>(
|
|
115
115
|
"Network interface",
|
|
116
|
-
(ip: string) => this.
|
|
116
|
+
(ip: string) => this.getNetInterfaceForRemoteAddress(ip),
|
|
117
117
|
Minutes(5),
|
|
118
118
|
);
|
|
119
119
|
|
|
@@ -121,7 +121,7 @@ export class NetworkReactNative extends Network {
|
|
|
121
121
|
await NetworkReactNative.netInterfaces.close();
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
-
private static async
|
|
124
|
+
private static async getNetInterfaceForRemoteAddress(ip: string) {
|
|
125
125
|
if (ip.includes("%")) {
|
|
126
126
|
// IPv6 address with scope
|
|
127
127
|
return ip.split("%")[1];
|