@sigx/lynx-network 0.4.0 → 0.4.1
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/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -13
- package/dist/index.js.map +1 -1
- package/dist/network.js +22 -0
- package/dist/network.js.map +1 -0
- package/package.json +7 -6
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { Network } from './network';
|
|
2
|
-
export type { ConnectionType, NetworkState } from './network';
|
|
1
|
+
export { Network } from './network.js';
|
|
2
|
+
export type { ConnectionType, NetworkState } from './network.js';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,YAAY,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,14 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
//#region src/network.ts
|
|
3
|
-
var n = "Network", r = {
|
|
4
|
-
getState() {
|
|
5
|
-
return e(n, "getState");
|
|
6
|
-
},
|
|
7
|
-
isAvailable() {
|
|
8
|
-
return t(n);
|
|
9
|
-
}
|
|
10
|
-
};
|
|
11
|
-
//#endregion
|
|
12
|
-
export { r as Network };
|
|
13
|
-
|
|
1
|
+
export { Network } from './network.js';
|
|
14
2
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC"}
|
package/dist/network.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { callAsync, isModuleAvailable } from '@sigx/lynx-core';
|
|
2
|
+
const MODULE = 'Network';
|
|
3
|
+
/**
|
|
4
|
+
* Network connectivity APIs.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```ts
|
|
8
|
+
* import { Network } from '@sigx/lynx-network';
|
|
9
|
+
*
|
|
10
|
+
* const state = await Network.getState();
|
|
11
|
+
* console.log(state.isConnected, state.type);
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
export const Network = {
|
|
15
|
+
getState() {
|
|
16
|
+
return callAsync(MODULE, 'getState');
|
|
17
|
+
},
|
|
18
|
+
isAvailable() {
|
|
19
|
+
return isModuleAvailable(MODULE);
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=network.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"network.js","sourceRoot":"","sources":["../src/network.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAE/D,MAAM,MAAM,GAAG,SAAS,CAAC;AAUzB;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG;IACnB,QAAQ;QACJ,OAAO,SAAS,CAAe,MAAM,EAAE,UAAU,CAAC,CAAC;IACvD,CAAC;IAED,WAAW;QACP,OAAO,iBAAiB,CAAC,MAAM,CAAC,CAAC;IACrC,CAAC;CACK,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sigx/lynx-network",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "Network connectivity status for sigx-lynx",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
"signalx-module.json"
|
|
20
20
|
],
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@sigx/lynx-core": "^0.4.
|
|
22
|
+
"@sigx/lynx-core": "^0.4.1"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"typescript": "
|
|
26
|
-
"
|
|
25
|
+
"@typescript/native-preview": "7.0.0-dev.20260511.1",
|
|
26
|
+
"typescript": "^6.0.3"
|
|
27
27
|
},
|
|
28
28
|
"author": "Andreas Ekdahl",
|
|
29
29
|
"license": "MIT",
|
|
@@ -49,7 +49,8 @@
|
|
|
49
49
|
"network"
|
|
50
50
|
],
|
|
51
51
|
"scripts": {
|
|
52
|
-
"build": "
|
|
53
|
-
"dev": "
|
|
52
|
+
"build": "node ../../scripts/clean.mjs dist && tsgo",
|
|
53
|
+
"dev": "tsgo --watch",
|
|
54
|
+
"clean": "node ../../scripts/clean.mjs dist .turbo"
|
|
54
55
|
}
|
|
55
56
|
}
|