wifidirectplugin 1.2.8 → 1.3.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.
package/README.md CHANGED
@@ -14,6 +14,12 @@ npx cap sync
14
14
  <docgen-index>
15
15
 
16
16
  * [`echo(...)`](#echo)
17
+ * [`scanWifiPeers(...)`](#scanwifipeers)
18
+ * [`connectToDevice(...)`](#connecttodevice)
19
+ * [`getGroupOwnerAddress()`](#getgroupowneraddress)
20
+ * [`getNetworkBand()`](#getnetworkband)
21
+ * [`disconnect()`](#disconnect)
22
+ * [Interfaces](#interfaces)
17
23
 
18
24
  </docgen-index>
19
25
 
@@ -34,4 +40,78 @@ echo(options: { value: string; }) => Promise<{ value: string; }>
34
40
 
35
41
  --------------------
36
42
 
43
+
44
+ ### scanWifiPeers(...)
45
+
46
+ ```typescript
47
+ scanWifiPeers(options: { deviceName?: string; }) => Promise<{ devices: WifiP2pDevice[]; }>
48
+ ```
49
+
50
+ | Param | Type |
51
+ | ------------- | ------------------------------------- |
52
+ | **`options`** | <code>{ deviceName?: string; }</code> |
53
+
54
+ **Returns:** <code>Promise&lt;{ devices: WifiP2pDevice[]; }&gt;</code>
55
+
56
+ --------------------
57
+
58
+
59
+ ### connectToDevice(...)
60
+
61
+ ```typescript
62
+ connectToDevice(options: { deviceAddress: string; }) => Promise<void>
63
+ ```
64
+
65
+ | Param | Type |
66
+ | ------------- | --------------------------------------- |
67
+ | **`options`** | <code>{ deviceAddress: string; }</code> |
68
+
69
+ --------------------
70
+
71
+
72
+ ### getGroupOwnerAddress()
73
+
74
+ ```typescript
75
+ getGroupOwnerAddress() => Promise<{ Ip: string; }>
76
+ ```
77
+
78
+ **Returns:** <code>Promise&lt;{ Ip: string; }&gt;</code>
79
+
80
+ --------------------
81
+
82
+
83
+ ### getNetworkBand()
84
+
85
+ ```typescript
86
+ getNetworkBand() => Promise<{ band: number; }>
87
+ ```
88
+
89
+ **Returns:** <code>Promise&lt;{ band: number; }&gt;</code>
90
+
91
+ --------------------
92
+
93
+
94
+ ### disconnect()
95
+
96
+ ```typescript
97
+ disconnect() => Promise<{ disconnected: boolean; }>
98
+ ```
99
+
100
+ **Returns:** <code>Promise&lt;{ disconnected: boolean; }&gt;</code>
101
+
102
+ --------------------
103
+
104
+
105
+ ### Interfaces
106
+
107
+
108
+ #### WifiP2pDevice
109
+
110
+ | Prop | Type |
111
+ | ------------------- | -------------------- |
112
+ | **`deviceName`** | <code>string</code> |
113
+ | **`deviceAddress`** | <code>string</code> |
114
+ | **`status`** | <code>number</code> |
115
+ | **`connected`** | <code>boolean</code> |
116
+
37
117
  </docgen-api>
@@ -27,6 +27,8 @@ public class WifiDirectPlugin extends Plugin {
27
27
  private List<WifiP2pDevice> peerWifiDirDevices = new ArrayList<>();
28
28
  private static final String TAG = "WifiDirectPlugin";
29
29
 
30
+ private PluginCall pendingConnectCall = null;
31
+
30
32
  private final BroadcastReceiver wifiP2pReceiver = new BroadcastReceiver() {
31
33
  @Override
32
34
  public void onReceive(Context context, Intent intent) {
@@ -36,11 +38,21 @@ public class WifiDirectPlugin extends Plugin {
36
38
  NetworkInfo networkInfo = intent.getParcelableExtra(WifiP2pManager.EXTRA_NETWORK_INFO);
37
39
  if (networkInfo != null && networkInfo.isConnected()) {
38
40
  Log.d(TAG, "Wi-Fi Direct connected");
39
- // 필요한 경우 연결된 상태를 Flutter/Ionic에 전달하는 코드를 여기서 실행
40
- // 예: call JavaScript 이벤트 전송 또는 콜백 호출
41
+ if (pendingConnectCall != null) {
42
+ manager.requestConnectionInfo(channel, info -> {
43
+ if (info != null && info.groupFormed) {
44
+ Log.d(TAG, "Group formed, resolving connectToDevice");
45
+ pendingConnectCall.resolve();
46
+ pendingConnectCall = null;
47
+ }
48
+ });
49
+ }
41
50
  } else {
42
51
  Log.d(TAG, "Wi-Fi Direct disconnected");
43
- // 연결 해제 상태 처리
52
+ if (pendingConnectCall != null) {
53
+ pendingConnectCall.reject("Wi-Fi Direct connection lost before group formed");
54
+ pendingConnectCall = null;
55
+ }
44
56
  }
45
57
  }
46
58
  }
@@ -182,18 +194,22 @@ public class WifiDirectPlugin extends Plugin {
182
194
  manager.connect(channel, config, new WifiP2pManager.ActionListener() {
183
195
  @Override
184
196
  public void onSuccess() {
185
- Log.d(TAG, "connect onSuccess Called");
186
- call.resolve();
197
+ // connect request accepted — group formation is async
198
+ // resolve will be called from BroadcastReceiver once group is formed
199
+ Log.d(TAG, "connect onSuccess Called, waiting for group formation");
200
+ pendingConnectCall = call;
187
201
  }
188
202
 
189
203
  @Override
190
204
  public void onFailure(int reason) {
191
205
  Log.e(TAG, "connect onFailure Called");
206
+ pendingConnectCall = null;
192
207
  call.reject("Connection failed: " + reason);
193
208
  }
194
209
  });
195
210
  } catch (Exception e) {
196
211
  Log.e(TAG, "connect exception", e);
212
+ pendingConnectCall = null;
197
213
  call.reject("Connection exception: " + e.getMessage());
198
214
  }
199
215
  }
@@ -212,6 +228,49 @@ public class WifiDirectPlugin extends Plugin {
212
228
  });
213
229
  }
214
230
 
231
+ @PluginMethod
232
+ public void getNetworkBand(PluginCall call) {
233
+ if (manager == null || channel == null) {
234
+ Log.e(TAG, "WifiP2pManager or Channel is null");
235
+ call.reject("WifiP2pManager or Channel not initialized");
236
+ return;
237
+ }
238
+
239
+ manager.requestConnectionInfo(channel, wifiP2pInfo -> {
240
+ if (wifiP2pInfo == null || !wifiP2pInfo.groupFormed) {
241
+ call.reject("No Wi-Fi P2P group formed");
242
+ return;
243
+ }
244
+
245
+ String ip = wifiP2pInfo.groupOwnerAddress.getHostAddress();
246
+ Log.d(TAG, "getNetworkBand - groupOwnerAddress: " + ip);
247
+
248
+ int band = -1;
249
+ if (ip != null) {
250
+ String[] parts = ip.split("\\.");
251
+ if (parts.length == 4) {
252
+ try {
253
+ int thirdOctet = Integer.parseInt(parts[2]);
254
+ if (thirdOctet == 20 || thirdOctet == 50) {
255
+ band = thirdOctet;
256
+ }
257
+ } catch (NumberFormatException e) {
258
+ Log.e(TAG, "Failed to parse IP octet: " + e.getMessage());
259
+ }
260
+ }
261
+ }
262
+
263
+ if (band == -1) {
264
+ call.reject("Unknown network band for IP: " + ip);
265
+ return;
266
+ }
267
+
268
+ JSObject ret = new JSObject();
269
+ ret.put("band", band);
270
+ call.resolve(ret);
271
+ });
272
+ }
273
+
215
274
  @PluginMethod
216
275
  public void disconnect(PluginCall call) {
217
276
  if (manager == null || channel == null) {
package/dist/docs.json CHANGED
@@ -20,11 +20,113 @@
20
20
  "docs": "",
21
21
  "complexTypes": [],
22
22
  "slug": "echo"
23
+ },
24
+ {
25
+ "name": "scanWifiPeers",
26
+ "signature": "(options: { deviceName?: string; }) => Promise<{ devices: WifiP2pDevice[]; }>",
27
+ "parameters": [
28
+ {
29
+ "name": "options",
30
+ "docs": "",
31
+ "type": "{ deviceName?: string | undefined; }"
32
+ }
33
+ ],
34
+ "returns": "Promise<{ devices: WifiP2pDevice[]; }>",
35
+ "tags": [],
36
+ "docs": "",
37
+ "complexTypes": [
38
+ "WifiP2pDevice"
39
+ ],
40
+ "slug": "scanwifipeers"
41
+ },
42
+ {
43
+ "name": "connectToDevice",
44
+ "signature": "(options: { deviceAddress: string; }) => Promise<void>",
45
+ "parameters": [
46
+ {
47
+ "name": "options",
48
+ "docs": "",
49
+ "type": "{ deviceAddress: string; }"
50
+ }
51
+ ],
52
+ "returns": "Promise<void>",
53
+ "tags": [],
54
+ "docs": "",
55
+ "complexTypes": [],
56
+ "slug": "connecttodevice"
57
+ },
58
+ {
59
+ "name": "getGroupOwnerAddress",
60
+ "signature": "() => Promise<{ Ip: string; }>",
61
+ "parameters": [],
62
+ "returns": "Promise<{ Ip: string; }>",
63
+ "tags": [],
64
+ "docs": "",
65
+ "complexTypes": [],
66
+ "slug": "getgroupowneraddress"
67
+ },
68
+ {
69
+ "name": "getNetworkBand",
70
+ "signature": "() => Promise<{ band: number; }>",
71
+ "parameters": [],
72
+ "returns": "Promise<{ band: number; }>",
73
+ "tags": [],
74
+ "docs": "",
75
+ "complexTypes": [],
76
+ "slug": "getnetworkband"
77
+ },
78
+ {
79
+ "name": "disconnect",
80
+ "signature": "() => Promise<{ disconnected: boolean; }>",
81
+ "parameters": [],
82
+ "returns": "Promise<{ disconnected: boolean; }>",
83
+ "tags": [],
84
+ "docs": "",
85
+ "complexTypes": [],
86
+ "slug": "disconnect"
23
87
  }
24
88
  ],
25
89
  "properties": []
26
90
  },
27
- "interfaces": [],
91
+ "interfaces": [
92
+ {
93
+ "name": "WifiP2pDevice",
94
+ "slug": "wifip2pdevice",
95
+ "docs": "",
96
+ "tags": [],
97
+ "methods": [],
98
+ "properties": [
99
+ {
100
+ "name": "deviceName",
101
+ "tags": [],
102
+ "docs": "",
103
+ "complexTypes": [],
104
+ "type": "string"
105
+ },
106
+ {
107
+ "name": "deviceAddress",
108
+ "tags": [],
109
+ "docs": "",
110
+ "complexTypes": [],
111
+ "type": "string"
112
+ },
113
+ {
114
+ "name": "status",
115
+ "tags": [],
116
+ "docs": "",
117
+ "complexTypes": [],
118
+ "type": "number"
119
+ },
120
+ {
121
+ "name": "connected",
122
+ "tags": [],
123
+ "docs": "",
124
+ "complexTypes": [],
125
+ "type": "boolean"
126
+ }
127
+ ]
128
+ }
129
+ ],
28
130
  "enums": [],
29
131
  "typeAliases": [],
30
132
  "pluginConfigs": []
@@ -4,4 +4,27 @@ export interface WifiDirectPlugin {
4
4
  }): Promise<{
5
5
  value: string;
6
6
  }>;
7
+ scanWifiPeers(options: {
8
+ deviceName?: string;
9
+ }): Promise<{
10
+ devices: WifiP2pDevice[];
11
+ }>;
12
+ connectToDevice(options: {
13
+ deviceAddress: string;
14
+ }): Promise<void>;
15
+ getGroupOwnerAddress(): Promise<{
16
+ Ip: string;
17
+ }>;
18
+ getNetworkBand(): Promise<{
19
+ band: number;
20
+ }>;
21
+ disconnect(): Promise<{
22
+ disconnected: boolean;
23
+ }>;
24
+ }
25
+ export interface WifiP2pDevice {
26
+ deviceName: string;
27
+ deviceAddress: string;
28
+ status: number;
29
+ connected: boolean;
7
30
  }
@@ -1 +1 @@
1
- {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["export interface WifiDirectPlugin {\n echo(options: { value: string }): Promise<{ value: string }>;\n}\n"]}
1
+ {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["export interface WifiDirectPlugin {\n echo(options: { value: string }): Promise<{ value: string }>;\n scanWifiPeers(options: { deviceName?: string }): Promise<{ devices: WifiP2pDevice[] }>;\n connectToDevice(options: { deviceAddress: string }): Promise<void>;\n getGroupOwnerAddress(): Promise<{ Ip: string }>;\n getNetworkBand(): Promise<{ band: number }>;\n disconnect(): Promise<{ disconnected: boolean }>;\n}\n\nexport interface WifiP2pDevice {\n deviceName: string;\n deviceAddress: string;\n status: number;\n connected: boolean;\n}\n"]}
package/dist/esm/web.d.ts CHANGED
@@ -6,4 +6,21 @@ export declare class WifiDirectWeb extends WebPlugin implements WifiDirectPlugin
6
6
  }): Promise<{
7
7
  value: string;
8
8
  }>;
9
+ scanWifiPeers(_options: {
10
+ deviceName?: string;
11
+ }): Promise<{
12
+ devices: any[];
13
+ }>;
14
+ connectToDevice(_options: {
15
+ deviceAddress: string;
16
+ }): Promise<void>;
17
+ getGroupOwnerAddress(): Promise<{
18
+ Ip: string;
19
+ }>;
20
+ getNetworkBand(): Promise<{
21
+ band: number;
22
+ }>;
23
+ disconnect(): Promise<{
24
+ disconnected: boolean;
25
+ }>;
9
26
  }
package/dist/esm/web.js CHANGED
@@ -4,5 +4,20 @@ export class WifiDirectWeb extends WebPlugin {
4
4
  console.log('ECHO', options);
5
5
  return options;
6
6
  }
7
+ async scanWifiPeers(_options) {
8
+ throw this.unimplemented('Not available on web.');
9
+ }
10
+ async connectToDevice(_options) {
11
+ throw this.unimplemented('Not available on web.');
12
+ }
13
+ async getGroupOwnerAddress() {
14
+ throw this.unimplemented('Not available on web.');
15
+ }
16
+ async getNetworkBand() {
17
+ throw this.unimplemented('Not available on web.');
18
+ }
19
+ async disconnect() {
20
+ throw this.unimplemented('Not available on web.');
21
+ }
7
22
  }
8
23
  //# sourceMappingURL=web.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,MAAM,OAAO,aAAc,SAAQ,SAAS;IAC1C,KAAK,CAAC,IAAI,CAAC,OAA0B;QACnC,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC7B,OAAO,OAAO,CAAC;IACjB,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type { WifiDirectPlugin } from './definitions';\n\nexport class WifiDirectWeb extends WebPlugin implements WifiDirectPlugin {\n async echo(options: { value: string }): Promise<{ value: string }> {\n console.log('ECHO', options);\n return options;\n }\n}\n"]}
1
+ {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,MAAM,OAAO,aAAc,SAAQ,SAAS;IAC1C,KAAK,CAAC,IAAI,CAAC,OAA0B;QACnC,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC7B,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,KAAK,CAAC,aAAa,CAAC,QAAiC;QACnD,MAAM,IAAI,CAAC,aAAa,CAAC,uBAAuB,CAAC,CAAC;IACpD,CAAC;IAED,KAAK,CAAC,eAAe,CAAC,QAAmC;QACvD,MAAM,IAAI,CAAC,aAAa,CAAC,uBAAuB,CAAC,CAAC;IACpD,CAAC;IAED,KAAK,CAAC,oBAAoB;QACxB,MAAM,IAAI,CAAC,aAAa,CAAC,uBAAuB,CAAC,CAAC;IACpD,CAAC;IAED,KAAK,CAAC,cAAc;QAClB,MAAM,IAAI,CAAC,aAAa,CAAC,uBAAuB,CAAC,CAAC;IACpD,CAAC;IAED,KAAK,CAAC,UAAU;QACd,MAAM,IAAI,CAAC,aAAa,CAAC,uBAAuB,CAAC,CAAC;IACpD,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type { WifiDirectPlugin } from './definitions';\n\nexport class WifiDirectWeb extends WebPlugin implements WifiDirectPlugin {\n async echo(options: { value: string }): Promise<{ value: string }> {\n console.log('ECHO', options);\n return options;\n }\n\n async scanWifiPeers(_options: { deviceName?: string }): Promise<{ devices: any[] }> {\n throw this.unimplemented('Not available on web.');\n }\n\n async connectToDevice(_options: { deviceAddress: string }): Promise<void> {\n throw this.unimplemented('Not available on web.');\n }\n\n async getGroupOwnerAddress(): Promise<{ Ip: string }> {\n throw this.unimplemented('Not available on web.');\n }\n\n async getNetworkBand(): Promise<{ band: number }> {\n throw this.unimplemented('Not available on web.');\n }\n\n async disconnect(): Promise<{ disconnected: boolean }> {\n throw this.unimplemented('Not available on web.');\n }\n}\n"]}
@@ -11,6 +11,21 @@ class WifiDirectWeb extends core.WebPlugin {
11
11
  console.log('ECHO', options);
12
12
  return options;
13
13
  }
14
+ async scanWifiPeers(_options) {
15
+ throw this.unimplemented('Not available on web.');
16
+ }
17
+ async connectToDevice(_options) {
18
+ throw this.unimplemented('Not available on web.');
19
+ }
20
+ async getGroupOwnerAddress() {
21
+ throw this.unimplemented('Not available on web.');
22
+ }
23
+ async getNetworkBand() {
24
+ throw this.unimplemented('Not available on web.');
25
+ }
26
+ async disconnect() {
27
+ throw this.unimplemented('Not available on web.');
28
+ }
14
29
  }
15
30
 
16
31
  var web = /*#__PURE__*/Object.freeze({
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst WifiDirect = registerPlugin('WifiDirect', {\n web: () => import('./web').then((m) => new m.WifiDirectWeb()),\n});\nexport * from './definitions';\nexport { WifiDirect };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class WifiDirectWeb extends WebPlugin {\n async echo(options) {\n console.log('ECHO', options);\n return options;\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;AACK,MAAC,UAAU,GAAGA,mBAAc,CAAC,YAAY,EAAE;AAChD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,aAAa,EAAE,CAAC;AACjE,CAAC;;ACFM,MAAM,aAAa,SAASC,cAAS,CAAC;AAC7C,IAAI,MAAM,IAAI,CAAC,OAAO,EAAE;AACxB,QAAQ,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;AACpC,QAAQ,OAAO,OAAO;AACtB,IAAI;AACJ;;;;;;;;;"}
1
+ {"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst WifiDirect = registerPlugin('WifiDirect', {\n web: () => import('./web').then((m) => new m.WifiDirectWeb()),\n});\nexport * from './definitions';\nexport { WifiDirect };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class WifiDirectWeb extends WebPlugin {\n async echo(options) {\n console.log('ECHO', options);\n return options;\n }\n async scanWifiPeers(_options) {\n throw this.unimplemented('Not available on web.');\n }\n async connectToDevice(_options) {\n throw this.unimplemented('Not available on web.');\n }\n async getGroupOwnerAddress() {\n throw this.unimplemented('Not available on web.');\n }\n async getNetworkBand() {\n throw this.unimplemented('Not available on web.');\n }\n async disconnect() {\n throw this.unimplemented('Not available on web.');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;AACK,MAAC,UAAU,GAAGA,mBAAc,CAAC,YAAY,EAAE;AAChD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,aAAa,EAAE,CAAC;AACjE,CAAC;;ACFM,MAAM,aAAa,SAASC,cAAS,CAAC;AAC7C,IAAI,MAAM,IAAI,CAAC,OAAO,EAAE;AACxB,QAAQ,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;AACpC,QAAQ,OAAO,OAAO;AACtB,IAAI;AACJ,IAAI,MAAM,aAAa,CAAC,QAAQ,EAAE;AAClC,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,uBAAuB,CAAC;AACzD,IAAI;AACJ,IAAI,MAAM,eAAe,CAAC,QAAQ,EAAE;AACpC,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,uBAAuB,CAAC;AACzD,IAAI;AACJ,IAAI,MAAM,oBAAoB,GAAG;AACjC,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,uBAAuB,CAAC;AACzD,IAAI;AACJ,IAAI,MAAM,cAAc,GAAG;AAC3B,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,uBAAuB,CAAC;AACzD,IAAI;AACJ,IAAI,MAAM,UAAU,GAAG;AACvB,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,uBAAuB,CAAC;AACzD,IAAI;AACJ;;;;;;;;;"}
package/dist/plugin.js CHANGED
@@ -10,6 +10,21 @@ var capacitorWifiDirect = (function (exports, core) {
10
10
  console.log('ECHO', options);
11
11
  return options;
12
12
  }
13
+ async scanWifiPeers(_options) {
14
+ throw this.unimplemented('Not available on web.');
15
+ }
16
+ async connectToDevice(_options) {
17
+ throw this.unimplemented('Not available on web.');
18
+ }
19
+ async getGroupOwnerAddress() {
20
+ throw this.unimplemented('Not available on web.');
21
+ }
22
+ async getNetworkBand() {
23
+ throw this.unimplemented('Not available on web.');
24
+ }
25
+ async disconnect() {
26
+ throw this.unimplemented('Not available on web.');
27
+ }
13
28
  }
14
29
 
15
30
  var web = /*#__PURE__*/Object.freeze({
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst WifiDirect = registerPlugin('WifiDirect', {\n web: () => import('./web').then((m) => new m.WifiDirectWeb()),\n});\nexport * from './definitions';\nexport { WifiDirect };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class WifiDirectWeb extends WebPlugin {\n async echo(options) {\n console.log('ECHO', options);\n return options;\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,UAAU,GAAGA,mBAAc,CAAC,YAAY,EAAE;IAChD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,aAAa,EAAE,CAAC;IACjE,CAAC;;ICFM,MAAM,aAAa,SAASC,cAAS,CAAC;IAC7C,IAAI,MAAM,IAAI,CAAC,OAAO,EAAE;IACxB,QAAQ,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;IACpC,QAAQ,OAAO,OAAO;IACtB,IAAI;IACJ;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst WifiDirect = registerPlugin('WifiDirect', {\n web: () => import('./web').then((m) => new m.WifiDirectWeb()),\n});\nexport * from './definitions';\nexport { WifiDirect };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class WifiDirectWeb extends WebPlugin {\n async echo(options) {\n console.log('ECHO', options);\n return options;\n }\n async scanWifiPeers(_options) {\n throw this.unimplemented('Not available on web.');\n }\n async connectToDevice(_options) {\n throw this.unimplemented('Not available on web.');\n }\n async getGroupOwnerAddress() {\n throw this.unimplemented('Not available on web.');\n }\n async getNetworkBand() {\n throw this.unimplemented('Not available on web.');\n }\n async disconnect() {\n throw this.unimplemented('Not available on web.');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,UAAU,GAAGA,mBAAc,CAAC,YAAY,EAAE;IAChD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,aAAa,EAAE,CAAC;IACjE,CAAC;;ICFM,MAAM,aAAa,SAASC,cAAS,CAAC;IAC7C,IAAI,MAAM,IAAI,CAAC,OAAO,EAAE;IACxB,QAAQ,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;IACpC,QAAQ,OAAO,OAAO;IACtB,IAAI;IACJ,IAAI,MAAM,aAAa,CAAC,QAAQ,EAAE;IAClC,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,uBAAuB,CAAC;IACzD,IAAI;IACJ,IAAI,MAAM,eAAe,CAAC,QAAQ,EAAE;IACpC,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,uBAAuB,CAAC;IACzD,IAAI;IACJ,IAAI,MAAM,oBAAoB,GAAG;IACjC,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,uBAAuB,CAAC;IACzD,IAAI;IACJ,IAAI,MAAM,cAAc,GAAG;IAC3B,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,uBAAuB,CAAC;IACzD,IAAI;IACJ,IAAI,MAAM,UAAU,GAAG;IACvB,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,uBAAuB,CAAC;IACzD,IAAI;IACJ;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wifidirectplugin",
3
- "version": "1.2.8",
3
+ "version": "1.3.0",
4
4
  "description": "HT-Installer Wifi Direct Plugin",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",