@capacitor/network 5.0.7-nightly-20231107T150458.0 → 5.0.7
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/README.md +3 -3
- package/android/build.gradle +3 -3
- package/dist/docs.json +3 -3
- package/dist/esm/definitions.d.ts +1 -1
- package/dist/esm/definitions.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -30,7 +30,7 @@ const logCurrentNetworkStatus = async () => {
|
|
|
30
30
|
<docgen-index>
|
|
31
31
|
|
|
32
32
|
* [`getStatus()`](#getstatus)
|
|
33
|
-
* [`addListener('networkStatusChange', ...)`](#addlistenernetworkstatuschange)
|
|
33
|
+
* [`addListener('networkStatusChange', ...)`](#addlistenernetworkstatuschange-)
|
|
34
34
|
* [`removeAllListeners()`](#removealllisteners)
|
|
35
35
|
* [Interfaces](#interfaces)
|
|
36
36
|
* [Type Aliases](#type-aliases)
|
|
@@ -58,7 +58,7 @@ Query the current status of the network connection.
|
|
|
58
58
|
### addListener('networkStatusChange', ...)
|
|
59
59
|
|
|
60
60
|
```typescript
|
|
61
|
-
addListener(eventName: 'networkStatusChange', listenerFunc: ConnectionStatusChangeListener) => Promise<PluginListenerHandle>
|
|
61
|
+
addListener(eventName: 'networkStatusChange', listenerFunc: ConnectionStatusChangeListener) => Promise<PluginListenerHandle> & PluginListenerHandle
|
|
62
62
|
```
|
|
63
63
|
|
|
64
64
|
Listen for changes in the network connection.
|
|
@@ -68,7 +68,7 @@ Listen for changes in the network connection.
|
|
|
68
68
|
| **`eventName`** | <code>'networkStatusChange'</code> |
|
|
69
69
|
| **`listenerFunc`** | <code><a href="#connectionstatuschangelistener">ConnectionStatusChangeListener</a></code> |
|
|
70
70
|
|
|
71
|
-
**Returns:** <code>Promise<<a href="#pluginlistenerhandle">PluginListenerHandle</a>>
|
|
71
|
+
**Returns:** <code>Promise<<a href="#pluginlistenerhandle">PluginListenerHandle</a>> & <a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
|
|
72
72
|
|
|
73
73
|
**Since:** 1.0.0
|
|
74
74
|
|
package/android/build.gradle
CHANGED
|
@@ -15,7 +15,7 @@ buildscript {
|
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
dependencies {
|
|
18
|
-
classpath 'com.android.tools.build:gradle:8.
|
|
18
|
+
classpath 'com.android.tools.build:gradle:8.0.0'
|
|
19
19
|
if (System.getenv("CAP_PLUGIN_PUBLISH") == "true") {
|
|
20
20
|
classpath 'io.github.gradle-nexus:publish-plugin:1.3.0'
|
|
21
21
|
}
|
|
@@ -31,10 +31,10 @@ if (System.getenv("CAP_PLUGIN_PUBLISH") == "true") {
|
|
|
31
31
|
|
|
32
32
|
android {
|
|
33
33
|
namespace "com.capacitorjs.plugins.network"
|
|
34
|
-
compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion :
|
|
34
|
+
compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 33
|
|
35
35
|
defaultConfig {
|
|
36
36
|
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 22
|
|
37
|
-
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion :
|
|
37
|
+
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 33
|
|
38
38
|
versionCode 1
|
|
39
39
|
versionName "1.0"
|
|
40
40
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
package/dist/docs.json
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
"name": "addListener",
|
|
27
|
-
"signature": "(eventName: 'networkStatusChange', listenerFunc: ConnectionStatusChangeListener) => Promise<PluginListenerHandle>",
|
|
27
|
+
"signature": "(eventName: 'networkStatusChange', listenerFunc: ConnectionStatusChangeListener) => Promise<PluginListenerHandle> & PluginListenerHandle",
|
|
28
28
|
"parameters": [
|
|
29
29
|
{
|
|
30
30
|
"name": "eventName",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"type": "ConnectionStatusChangeListener"
|
|
38
38
|
}
|
|
39
39
|
],
|
|
40
|
-
"returns": "Promise<PluginListenerHandle>",
|
|
40
|
+
"returns": "Promise<PluginListenerHandle> & PluginListenerHandle",
|
|
41
41
|
"tags": [
|
|
42
42
|
{
|
|
43
43
|
"name": "since",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"PluginListenerHandle",
|
|
50
50
|
"ConnectionStatusChangeListener"
|
|
51
51
|
],
|
|
52
|
-
"slug": "addlistenernetworkstatuschange"
|
|
52
|
+
"slug": "addlistenernetworkstatuschange-"
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
55
|
"name": "removeAllListeners",
|
|
@@ -11,7 +11,7 @@ export interface NetworkPlugin {
|
|
|
11
11
|
*
|
|
12
12
|
* @since 1.0.0
|
|
13
13
|
*/
|
|
14
|
-
addListener(eventName: 'networkStatusChange', listenerFunc: ConnectionStatusChangeListener): Promise<PluginListenerHandle
|
|
14
|
+
addListener(eventName: 'networkStatusChange', listenerFunc: ConnectionStatusChangeListener): Promise<PluginListenerHandle> & PluginListenerHandle;
|
|
15
15
|
/**
|
|
16
16
|
* Remove all listeners (including the network status changes) for this plugin.
|
|
17
17
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["import type { PluginListenerHandle } from '@capacitor/core';\n\nexport interface NetworkPlugin {\n /**\n * Query the current status of the network connection.\n *\n * @since 1.0.0\n */\n getStatus(): Promise<ConnectionStatus>;\n\n /**\n * Listen for changes in the network connection.\n *\n * @since 1.0.0\n */\n addListener(\n eventName: 'networkStatusChange',\n listenerFunc: ConnectionStatusChangeListener,\n ): Promise<PluginListenerHandle
|
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["import type { PluginListenerHandle } from '@capacitor/core';\n\nexport interface NetworkPlugin {\n /**\n * Query the current status of the network connection.\n *\n * @since 1.0.0\n */\n getStatus(): Promise<ConnectionStatus>;\n\n /**\n * Listen for changes in the network connection.\n *\n * @since 1.0.0\n */\n addListener(\n eventName: 'networkStatusChange',\n listenerFunc: ConnectionStatusChangeListener,\n ): Promise<PluginListenerHandle> & PluginListenerHandle;\n\n /**\n * Remove all listeners (including the network status changes) for this plugin.\n *\n * @since 1.0.0\n */\n removeAllListeners(): Promise<void>;\n}\n\n/**\n * Represents the state and type of the network connection.\n *\n * @since 1.0.0\n */\nexport interface ConnectionStatus {\n /**\n * Whether there is an active connection or not.\n *\n * @since 1.0.0\n */\n connected: boolean;\n\n /**\n * The type of network connection currently in use.\n *\n * If there is no active network connection, `connectionType` will be `'none'`.\n *\n * @since 1.0.0\n */\n connectionType: ConnectionType;\n}\n\n/**\n * Callback to receive the status change notifications.\n *\n * @since 1.0.0\n */\nexport type ConnectionStatusChangeListener = (status: ConnectionStatus) => void;\n\n/**\n * The type of network connection that a device might have.\n *\n * @since 1.0.0\n */\nexport type ConnectionType = 'wifi' | 'cellular' | 'none' | 'unknown';\n\n/**\n * @deprecated Use `ConnectionStatus`.\n * @since 1.0.0\n */\nexport type NetworkStatus = ConnectionStatus;\n\n/**\n * @deprecated Use `ConnectionStatusChangeListener`.\n * @since 1.0.0\n */\nexport type NetworkStatusChangeCallback = ConnectionStatusChangeListener;\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capacitor/network",
|
|
3
|
-
"version": "5.0.7
|
|
3
|
+
"version": "5.0.7",
|
|
4
4
|
"description": "The Network API provides network and connectivity information.",
|
|
5
5
|
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@capacitor/android": "^5.0.0",
|
|
49
49
|
"@capacitor/core": "^5.0.0",
|
|
50
|
-
"@capacitor/docgen": "0.2.
|
|
50
|
+
"@capacitor/docgen": "0.2.2",
|
|
51
51
|
"@capacitor/ios": "^5.0.0",
|
|
52
52
|
"@ionic/eslint-config": "^0.3.0",
|
|
53
53
|
"@ionic/prettier-config": "~1.0.1",
|
|
@@ -79,5 +79,5 @@
|
|
|
79
79
|
"publishConfig": {
|
|
80
80
|
"access": "public"
|
|
81
81
|
},
|
|
82
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "d5483ce9f666f1a38c25a11e63899fd35701ca45"
|
|
83
83
|
}
|