@capacitor/network 8.0.0-nightly-20251113T150733.0 → 8.0.0-nightly-20251117T150727.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/Package.swift CHANGED
@@ -10,7 +10,7 @@ let package = Package(
10
10
  targets: ["CAPNetworkPlugin"])
11
11
  ],
12
12
  dependencies: [
13
- .package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", from: "7.0.0")
13
+ .package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", from: "8.0.0-beta")
14
14
  ],
15
15
  targets: [
16
16
  .target(
@@ -21,7 +21,7 @@ public class NetworkPlugin extends Plugin {
21
21
  @Override
22
22
  public void load() {
23
23
  implementation = new Network(getContext());
24
- Network.NetworkStatusChangeListener listener = wasLostEvent -> {
24
+ Network.NetworkStatusChangeListener listener = (wasLostEvent) -> {
25
25
  if (wasLostEvent) {
26
26
  JSObject jsObject = new JSObject();
27
27
  jsObject.put("connected", false);
@@ -45,20 +45,20 @@ export interface ConnectionStatus {
45
45
  *
46
46
  * @since 1.0.0
47
47
  */
48
- export declare type ConnectionStatusChangeListener = (status: ConnectionStatus) => void;
48
+ export type ConnectionStatusChangeListener = (status: ConnectionStatus) => void;
49
49
  /**
50
50
  * The type of network connection that a device might have.
51
51
  *
52
52
  * @since 1.0.0
53
53
  */
54
- export declare type ConnectionType = 'wifi' | 'cellular' | 'none' | 'unknown';
54
+ export type ConnectionType = 'wifi' | 'cellular' | 'none' | 'unknown';
55
55
  /**
56
56
  * @deprecated Use `ConnectionStatus`.
57
57
  * @since 1.0.0
58
58
  */
59
- export declare type NetworkStatus = ConnectionStatus;
59
+ export type NetworkStatus = ConnectionStatus;
60
60
  /**
61
61
  * @deprecated Use `ConnectionStatusChangeListener`.
62
62
  * @since 1.0.0
63
63
  */
64
- export declare type NetworkStatusChangeCallback = ConnectionStatusChangeListener;
64
+ export type NetworkStatusChangeCallback = ConnectionStatusChangeListener;
package/dist/esm/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { registerPlugin } from '@capacitor/core';
2
2
  const Network = registerPlugin('Network', {
3
- web: () => import('./web').then(m => new m.NetworkWeb()),
3
+ web: () => import('./web').then((m) => new m.NetworkWeb()),
4
4
  });
5
5
  export * from './definitions';
6
6
  export { Network };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,OAAO,GAAG,cAAc,CAAgB,SAAS,EAAE;IACvD,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,CAAC;CACzD,CAAC,CAAC;AAEH,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,OAAO,EAAE,CAAC","sourcesContent":["import { registerPlugin } from '@capacitor/core';\n\nimport type { NetworkPlugin } from './definitions';\n\nconst Network = registerPlugin<NetworkPlugin>('Network', {\n web: () => import('./web').then(m => new m.NetworkWeb()),\n});\n\nexport * from './definitions';\nexport { Network };\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,OAAO,GAAG,cAAc,CAAgB,SAAS,EAAE;IACvD,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,CAAC;CAC3D,CAAC,CAAC;AAEH,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,OAAO,EAAE,CAAC","sourcesContent":["import { registerPlugin } from '@capacitor/core';\n\nimport type { NetworkPlugin } from './definitions';\n\nconst Network = registerPlugin<NetworkPlugin>('Network', {\n web: () => import('./web').then((m) => new m.NetworkWeb()),\n});\n\nexport * from './definitions';\nexport { Network };\n"]}
package/dist/esm/web.js CHANGED
@@ -1,8 +1,6 @@
1
1
  import { WebPlugin } from '@capacitor/core';
2
2
  function translatedConnection() {
3
- const connection = window.navigator.connection ||
4
- window.navigator.mozConnection ||
5
- window.navigator.webkitConnection;
3
+ const connection = window.navigator.connection || window.navigator.mozConnection || window.navigator.webkitConnection;
6
4
  let result = 'unknown';
7
5
  const type = connection ? connection.type || connection.effectiveType : null;
8
6
  if (type && typeof type === 'string') {
@@ -1 +1 @@
1
- {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAgB5C,SAAS,oBAAoB;IAC3B,MAAM,UAAU,GACd,MAAM,CAAC,SAAS,CAAC,UAAU;QAC3B,MAAM,CAAC,SAAS,CAAC,aAAa;QAC9B,MAAM,CAAC,SAAS,CAAC,gBAAgB,CAAC;IACpC,IAAI,MAAM,GAAmB,SAAS,CAAC;IACvC,MAAM,IAAI,GAAG,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,IAAI,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC;IAC7E,IAAI,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;QACpC,QAAQ,IAAI,EAAE;YACZ,uBAAuB;YACvB,KAAK,WAAW,CAAC;YACjB,KAAK,UAAU;gBACb,MAAM,GAAG,UAAU,CAAC;gBACpB,MAAM;YACR,KAAK,MAAM;gBACT,MAAM,GAAG,MAAM,CAAC;gBAChB,MAAM;YACR,KAAK,UAAU,CAAC;YAChB,KAAK,MAAM,CAAC;YACZ,KAAK,OAAO;gBACV,MAAM,GAAG,MAAM,CAAC;gBAChB,MAAM;YACR,KAAK,OAAO,CAAC;YACb,KAAK,SAAS;gBACZ,MAAM,GAAG,SAAS,CAAC;gBACnB,MAAM;Y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AAS;YACT,cAAc,EAAE,SAAS,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM;SACpD,CAAC;QAEF,OAAO,MAAM,CAAC;IAChB,CAAC;CAqBF;AAED,MAAM,OAAO,GAAG,IAAI,UAAU,EAAE,CAAC;AAEjC,OAAO,EAAE,OAAO,EAAE,CAAC","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type {\n ConnectionStatus,\n ConnectionType,\n NetworkPlugin,\n} from './definitions';\n\ndeclare global {\n interface Navigator {\n connection: any;\n mozConnection: any;\n webkitConnection: any;\n }\n}\n\nfunction translatedConnection(): ConnectionType {\n const connection =\n window.navigator.connection ||\n window.navigator.mozConnection ||\n window.navigator.webkitConnection;\n let result: ConnectionType = 'unknown';\n const type = connection ? connection.type || connection.effectiveType : null;\n if (type && typeof type === 'string') {\n switch (type) {\n // possible type values\n case 'bluetooth':\n case 'cellular':\n result = 'cellular';\n break;\n case 'none':\n result = 'none';\n break;\n case 'ethernet':\n case 'wifi':\n case 'wimax':\n result = 'wifi';\n break;\n case 'other':\n case 'unknown':\n result = 'unknown';\n break;\n // possible effectiveType values\n case 'slow-2g':\n case '2g':\n case '3g':\n result = 'cellular';\n break;\n case '4g':\n result = 'wifi';\n break;\n default:\n break;\n }\n }\n return result;\n}\n\nexport class NetworkWeb extends WebPlugin implements NetworkPlugin {\n constructor() {\n super();\n if (typeof window !== 'undefined') {\n window.addEventListener('online', this.handleOnline);\n window.addEventListener('offline', this.handleOffline);\n }\n }\n\n async getStatus(): Promise<ConnectionStatus> {\n if (!window.navigator) {\n throw this.unavailable(\n 'Browser does not support the Network Information API',\n );\n }\n\n const connected = window.navigator.onLine;\n const connectionType = translatedConnection();\n\n const status: ConnectionStatus = {\n connected,\n connectionType: connected ? connectionType : 'none',\n };\n\n return status;\n }\n\n private handleOnline = () => {\n const connectionType = translatedConnection();\n\n const status: ConnectionStatus = {\n connected: true,\n connectionType: connectionType,\n };\n\n this.notifyListeners('networkStatusChange', status);\n };\n\n private handleOffline = () => {\n const status: ConnectionStatus = {\n connected: false,\n connectionType: 'none',\n };\n\n this.notifyListeners('networkStatusChange', status);\n };\n}\n\nconst Network = new NetworkWeb();\n\nexport { Network };\n"]}
1
+ {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAY5C,SAAS,oBAAoB;IAC3B,MAAM,UAAU,GAAG,MAAM,CAAC,SAAS,CAAC,UAAU,IAAI,MAAM,CAAC,SAAS,CAAC,aAAa,IAAI,MAAM,CAAC,SAAS,CAAC,gBAAgB,CAAC;IACtH,IAAI,MAAM,GAAmB,SAAS,CAAC;IACvC,MAAM,IAAI,GAAG,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,IAAI,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC;IAC7E,IAAI,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;QACrC,QAAQ,IAAI,EAAE,CAAC;YACb,uBAAuB;YACvB,KAAK,WAAW,CAAC;YACjB,KAAK,UAAU;gBACb,MAAM,GAAG,UAAU,CAAC;gBACpB,MAAM;YACR,KAAK,MAAM;gBACT,MAAM,GAAG,MAAM,CAAC;gBAChB,MAAM;YACR,KAAK,UAAU,CAAC;YAChB,KAAK,MAAM,CAAC;YACZ,KAAK,OAAO;gBACV,MAAM,GAAG,MAAM,CAAC;gBAChB,MAAM;YACR,KAAK,OAAO,CAAC;YACb,KAAK,SAAS;gBACZ,MAAM,GAAG,SAAS,CAAC;gBACnB,MAAM;YACR,gCAAgC;YAChC,KAAK,SAAS,CAAC;YACf,KAAK,IAAI,CAAC;YACV,KAAK,IAAI;gBACP,MAAM,GAAG,UAAU,CAAC;gBACpB,MAAM;YACR,KAAK,IAAI;gBACP,MAAM,GAAG,MAAM,CAAC;gBAChB,MAAM;YACR;gBACE,MAAM;QACV,CAAC;IACH,CA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;AAEjC,OAAO,EAAE,OAAO,EAAE,CAAC","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type { ConnectionStatus, ConnectionType, NetworkPlugin } from './definitions';\n\ndeclare global {\n interface Navigator {\n connection: any;\n mozConnection: any;\n webkitConnection: any;\n }\n}\n\nfunction translatedConnection(): ConnectionType {\n const connection = window.navigator.connection || window.navigator.mozConnection || window.navigator.webkitConnection;\n let result: ConnectionType = 'unknown';\n const type = connection ? connection.type || connection.effectiveType : null;\n if (type && typeof type === 'string') {\n switch (type) {\n // possible type values\n case 'bluetooth':\n case 'cellular':\n result = 'cellular';\n break;\n case 'none':\n result = 'none';\n break;\n case 'ethernet':\n case 'wifi':\n case 'wimax':\n result = 'wifi';\n break;\n case 'other':\n case 'unknown':\n result = 'unknown';\n break;\n // possible effectiveType values\n case 'slow-2g':\n case '2g':\n case '3g':\n result = 'cellular';\n break;\n case '4g':\n result = 'wifi';\n break;\n default:\n break;\n }\n }\n return result;\n}\n\nexport class NetworkWeb extends WebPlugin implements NetworkPlugin {\n constructor() {\n super();\n if (typeof window !== 'undefined') {\n window.addEventListener('online', this.handleOnline);\n window.addEventListener('offline', this.handleOffline);\n }\n }\n\n async getStatus(): Promise<ConnectionStatus> {\n if (!window.navigator) {\n throw this.unavailable('Browser does not support the Network Information API');\n }\n\n const connected = window.navigator.onLine;\n const connectionType = translatedConnection();\n\n const status: ConnectionStatus = {\n connected,\n connectionType: connected ? connectionType : 'none',\n };\n\n return status;\n }\n\n private handleOnline = () => {\n const connectionType = translatedConnection();\n\n const status: ConnectionStatus = {\n connected: true,\n connectionType: connectionType,\n };\n\n this.notifyListeners('networkStatusChange', status);\n };\n\n private handleOffline = () => {\n const status: ConnectionStatus = {\n connected: false,\n connectionType: 'none',\n };\n\n this.notifyListeners('networkStatusChange', status);\n };\n}\n\nconst Network = new NetworkWeb();\n\nexport { Network };\n"]}
@@ -3,13 +3,11 @@
3
3
  var core = require('@capacitor/core');
4
4
 
5
5
  const Network = core.registerPlugin('Network', {
6
- web: () => Promise.resolve().then(function () { return web; }).then(m => new m.NetworkWeb()),
6
+ web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.NetworkWeb()),
7
7
  });
8
8
 
9
9
  function translatedConnection() {
10
- const connection = window.navigator.connection ||
11
- window.navigator.mozConnection ||
12
- window.navigator.webkitConnection;
10
+ const connection = window.navigator.connection || window.navigator.mozConnection || window.navigator.webkitConnection;
13
11
  let result = 'unknown';
14
12
  const type = connection ? connection.type || connection.effectiveType : null;
15
13
  if (type && typeof type === 'string') {
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst Network = registerPlugin('Network', {\n web: () => import('./web').then(m => new m.NetworkWeb()),\n});\nexport * from './definitions';\nexport { Network };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nfunction translatedConnection() {\n const connection = window.navigator.connection ||\n window.navigator.mozConnection ||\n window.navigator.webkitConnection;\n let result = 'unknown';\n const type = connection ? connection.type || connection.effectiveType : null;\n if (type && typeof type === 'string') {\n switch (type) {\n // possible type values\n case 'bluetooth':\n case 'cellular':\n result = 'cellular';\n break;\n case 'none':\n result = 'none';\n break;\n case 'ethernet':\n case 'wifi':\n case 'wimax':\n result = 'wifi';\n break;\n case 'other':\n case 'unknown':\n result = 'unknown';\n break;\n // possible effectiveType values\n case 'slow-2g':\n case '2g':\n case '3g':\n result = 'cellular';\n break;\n case '4g':\n result = 'wifi';\n break;\n default:\n break;\n }\n }\n return result;\n}\nexport class NetworkWeb extends WebPlugin {\n constructor() {\n super();\n this.handleOnline = () => {\n const connectionType = translatedConnection();\n const status = {\n connected: true,\n connectionType: connectionType,\n };\n this.notifyListeners('networkStatusChange', status);\n };\n this.handleOffline = () => {\n const status = {\n connected: false,\n connectionType: 'none',\n };\n this.notifyListeners('networkStatusChange', status);\n };\n if (typeof window !== 'undefined') {\n window.addEventListener('online', this.handleOnline);\n window.addEventListener('offline', this.handleOffline);\n }\n }\n async getStatus() {\n if (!window.navigator) {\n throw this.unavailable('Browser does not support the Network Information API');\n }\n const connected = window.navigator.onLine;\n const connectionType = translatedConnection();\n const status = {\n connected,\n connectionType: connected ? connectionType : 'none',\n };\n return status;\n }\n}\nconst Network = new NetworkWeb();\nexport { Network };\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;AACK,MAAC,OAAO,GAAGA,mBAAc,CAAC,SAAS,EAAE;AAC1C,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,UAAU,EAAE,CAAC;AAC5D,CAAC;;ACFD,SAAS,oBAAoB,GAAG;AAChC,IAAI,MAAM,UAAU,GAAG,MAAM,CAAC,SAAS,CAAC,UAAU;AAClD,QAAQ,MAAM,CAAC,SAAS,CAAC,aAAa;AACtC,QAAQ,MAAM,CAAC,SAAS,CAAC,gBAAgB;AACzC,IAAI,IAAI,MAAM,GAAG,SAAS;AAC1B,IAAI,MAAM,IAAI,GAAG,UAAU,GAAG,UAAU,CAAC,IAAI,IAAI,UAAU,CAAC,aAAa,GAAG,IAAI;AAChF,IAAI,IAAI,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;AAC1C,QAAQ,QAAQ,IAAI;AACpB;AACA,YAAY,KAAK,WAAW;AAC5B,YAAY,KAAK,UAAU;AAC3B,gBAAgB,MAAM,GAAG,UAAU;AACnC,gBAAgB;AAChB,YAAY,KAAK,MAAM;AACvB,gBAAgB,MAAM,GAAG,MAAM;AAC/B,gBAAgB;AAChB,YAAY,KAAK,UAAU;AAC3B,YAAY,KAAK,MAAM;AACvB,YAAY,KAAK,OAAO;AACxB,gBAAgB,MAAM,GAAG,MAAM;AAC/B,gBAAgB;AAChB,YAAY,KAAK,OAAO;AACxB,YAAY,KAAK,SAAS;AAC1B,gBAAgB,MAAM,GAAG,SAAS;AAClC,gBAAgB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AAM,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC,MAAM;AACjD,QAAQ,MAAM,cAAc,GAAG,oBAAoB,EAAE;AACrD,QAAQ,MAAM,MAAM,GAAG;AACvB,YAAY,SAAS;AACrB,YAAY,cAAc,EAAE,SAAS,GAAG,cAAc,GAAG,MAAM;AAC/D,SAAS;AACT,QAAQ,OAAO,MAAM;AACrB,IAAI;AACJ;AACgB,IAAI,UAAU;;;;;;;;;"}
1
+ {"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst Network = registerPlugin('Network', {\n web: () => import('./web').then((m) => new m.NetworkWeb()),\n});\nexport * from './definitions';\nexport { Network };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nfunction translatedConnection() {\n const connection = window.navigator.connection || window.navigator.mozConnection || window.navigator.webkitConnection;\n let result = 'unknown';\n const type = connection ? connection.type || connection.effectiveType : null;\n if (type && typeof type === 'string') {\n switch (type) {\n // possible type values\n case 'bluetooth':\n case 'cellular':\n result = 'cellular';\n break;\n case 'none':\n result = 'none';\n break;\n case 'ethernet':\n case 'wifi':\n case 'wimax':\n result = 'wifi';\n break;\n case 'other':\n case 'unknown':\n result = 'unknown';\n break;\n // possible effectiveType values\n case 'slow-2g':\n case '2g':\n case '3g':\n result = 'cellular';\n break;\n case '4g':\n result = 'wifi';\n break;\n default:\n break;\n }\n }\n return result;\n}\nexport class NetworkWeb extends WebPlugin {\n constructor() {\n super();\n this.handleOnline = () => {\n const connectionType = translatedConnection();\n const status = {\n connected: true,\n connectionType: connectionType,\n };\n this.notifyListeners('networkStatusChange', status);\n };\n this.handleOffline = () => {\n const status = {\n connected: false,\n connectionType: 'none',\n };\n this.notifyListeners('networkStatusChange', status);\n };\n if (typeof window !== 'undefined') {\n window.addEventListener('online', this.handleOnline);\n window.addEventListener('offline', this.handleOffline);\n }\n }\n async getStatus() {\n if (!window.navigator) {\n throw this.unavailable('Browser does not support the Network Information API');\n }\n const connected = window.navigator.onLine;\n const connectionType = translatedConnection();\n const status = {\n connected,\n connectionType: connected ? connectionType : 'none',\n };\n return status;\n }\n}\nconst Network = new NetworkWeb();\nexport { Network };\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;AACK,MAAC,OAAO,GAAGA,mBAAc,CAAC,SAAS,EAAE;AAC1C,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,UAAU,EAAE,CAAC;AAC9D,CAAC;;ACFD,SAAS,oBAAoB,GAAG;AAChC,IAAI,MAAM,UAAU,GAAG,MAAM,CAAC,SAAS,CAAC,UAAU,IAAI,MAAM,CAAC,SAAS,CAAC,aAAa,IAAI,MAAM,CAAC,SAAS,CAAC,gBAAgB;AACzH,IAAI,IAAI,MAAM,GAAG,SAAS;AAC1B,IAAI,MAAM,IAAI,GAAG,UAAU,GAAG,UAAU,CAAC,IAAI,IAAI,UAAU,CAAC,aAAa,GAAG,IAAI;AAChF,IAAI,IAAI,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;AAC1C,QAAQ,QAAQ,IAAI;AACpB;AACA,YAAY,KAAK,WAAW;AAC5B,YAAY,KAAK,UAAU;AAC3B,gBAAgB,MAAM,GAAG,UAAU;AACnC,gBAAgB;AAChB,YAAY,KAAK,MAAM;AACvB,gBAAgB,MAAM,GAAG,MAAM;AAC/B,gBAAgB;AAChB,YAAY,KAAK,UAAU;AAC3B,YAAY,KAAK,MAAM;AACvB,YAAY,KAAK,OAAO;AACxB,gBAAgB,MAAM,GAAG,MAAM;AAC/B,gBAAgB;AAChB,YAAY,KAAK,OAAO;AACxB,YAAY,KAAK,SAAS;AAC1B,gBAAgB,MAAM,GAAG,SAAS;AAClC,gBAAgB;AAChB;AACA,YAAY,KAAK,SAAS;AAC1B,YAAY,KAAK,IAAI;AACrB,YAAY,KAAK,IAAI;AACrB,gB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AAE;AACrD,QAAQ,MAAM,MAAM,GAAG;AACvB,YAAY,SAAS;AACrB,YAAY,cAAc,EAAE,SAAS,GAAG,cAAc,GAAG,MAAM;AAC/D,SAAS;AACT,QAAQ,OAAO,MAAM;AACrB,IAAI;AACJ;AACgB,IAAI,UAAU;;;;;;;;;"}
package/dist/plugin.js CHANGED
@@ -2,13 +2,11 @@ var capacitorNetwork = (function (exports, core) {
2
2
  'use strict';
3
3
 
4
4
  const Network = core.registerPlugin('Network', {
5
- web: () => Promise.resolve().then(function () { return web; }).then(m => new m.NetworkWeb()),
5
+ web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.NetworkWeb()),
6
6
  });
7
7
 
8
8
  function translatedConnection() {
9
- const connection = window.navigator.connection ||
10
- window.navigator.mozConnection ||
11
- window.navigator.webkitConnection;
9
+ const connection = window.navigator.connection || window.navigator.mozConnection || window.navigator.webkitConnection;
12
10
  let result = 'unknown';
13
11
  const type = connection ? connection.type || connection.effectiveType : null;
14
12
  if (type && typeof type === 'string') {
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst Network = registerPlugin('Network', {\n web: () => import('./web').then(m => new m.NetworkWeb()),\n});\nexport * from './definitions';\nexport { Network };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nfunction translatedConnection() {\n const connection = window.navigator.connection ||\n window.navigator.mozConnection ||\n window.navigator.webkitConnection;\n let result = 'unknown';\n const type = connection ? connection.type || connection.effectiveType : null;\n if (type && typeof type === 'string') {\n switch (type) {\n // possible type values\n case 'bluetooth':\n case 'cellular':\n result = 'cellular';\n break;\n case 'none':\n result = 'none';\n break;\n case 'ethernet':\n case 'wifi':\n case 'wimax':\n result = 'wifi';\n break;\n case 'other':\n case 'unknown':\n result = 'unknown';\n break;\n // possible effectiveType values\n case 'slow-2g':\n case '2g':\n case '3g':\n result = 'cellular';\n break;\n case '4g':\n result = 'wifi';\n break;\n default:\n break;\n }\n }\n return result;\n}\nexport class NetworkWeb extends WebPlugin {\n constructor() {\n super();\n this.handleOnline = () => {\n const connectionType = translatedConnection();\n const status = {\n connected: true,\n connectionType: connectionType,\n };\n this.notifyListeners('networkStatusChange', status);\n };\n this.handleOffline = () => {\n const status = {\n connected: false,\n connectionType: 'none',\n };\n this.notifyListeners('networkStatusChange', status);\n };\n if (typeof window !== 'undefined') {\n window.addEventListener('online', this.handleOnline);\n window.addEventListener('offline', this.handleOffline);\n }\n }\n async getStatus() {\n if (!window.navigator) {\n throw this.unavailable('Browser does not support the Network Information API');\n }\n const connected = window.navigator.onLine;\n const connectionType = translatedConnection();\n const status = {\n connected,\n connectionType: connected ? connectionType : 'none',\n };\n return status;\n }\n}\nconst Network = new NetworkWeb();\nexport { Network };\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,OAAO,GAAGA,mBAAc,CAAC,SAAS,EAAE;IAC1C,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,UAAU,EAAE,CAAC;IAC5D,CAAC;;ICFD,SAAS,oBAAoB,GAAG;IAChC,IAAI,MAAM,UAAU,GAAG,MAAM,CAAC,SAAS,CAAC,UAAU;IAClD,QAAQ,MAAM,CAAC,SAAS,CAAC,aAAa;IACtC,QAAQ,MAAM,CAAC,SAAS,CAAC,gBAAgB;IACzC,IAAI,IAAI,MAAM,GAAG,SAAS;IAC1B,IAAI,MAAM,IAAI,GAAG,UAAU,GAAG,UAAU,CAAC,IAAI,IAAI,UAAU,CAAC,aAAa,GAAG,IAAI;IAChF,IAAI,IAAI,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;IAC1C,QAAQ,QAAQ,IAAI;IACpB;IACA,YAAY,KAAK,WAAW;IAC5B,YAAY,KAAK,UAAU;IAC3B,gBAAgB,MAAM,GAAG,UAAU;IACnC,gBAAgB;IACh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AI,CAAC,YAAY,CAAC;IAChE,YAAY,MAAM,CAAC,gBAAgB,CAAC,SAAS,EAAE,IAAI,CAAC,aAAa,CAAC;IAClE,QAAQ;IACR,IAAI;IACJ,IAAI,MAAM,SAAS,GAAG;IACtB,QAAQ,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE;IAC/B,YAAY,MAAM,IAAI,CAAC,WAAW,CAAC,sDAAsD,CAAC;IAC1F,QAAQ;IACR,QAAQ,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC,MAAM;IACjD,QAAQ,MAAM,cAAc,GAAG,oBAAoB,EAAE;IACrD,QAAQ,MAAM,MAAM,GAAG;IACvB,YAAY,SAAS;IACrB,YAAY,cAAc,EAAE,SAAS,GAAG,cAAc,GAAG,MAAM;IAC/D,SAAS;IACT,QAAQ,OAAO,MAAM;IACrB,IAAI;IACJ;IACgB,IAAI,UAAU;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst Network = registerPlugin('Network', {\n web: () => import('./web').then((m) => new m.NetworkWeb()),\n});\nexport * from './definitions';\nexport { Network };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nfunction translatedConnection() {\n const connection = window.navigator.connection || window.navigator.mozConnection || window.navigator.webkitConnection;\n let result = 'unknown';\n const type = connection ? connection.type || connection.effectiveType : null;\n if (type && typeof type === 'string') {\n switch (type) {\n // possible type values\n case 'bluetooth':\n case 'cellular':\n result = 'cellular';\n break;\n case 'none':\n result = 'none';\n break;\n case 'ethernet':\n case 'wifi':\n case 'wimax':\n result = 'wifi';\n break;\n case 'other':\n case 'unknown':\n result = 'unknown';\n break;\n // possible effectiveType values\n case 'slow-2g':\n case '2g':\n case '3g':\n result = 'cellular';\n break;\n case '4g':\n result = 'wifi';\n break;\n default:\n break;\n }\n }\n return result;\n}\nexport class NetworkWeb extends WebPlugin {\n constructor() {\n super();\n this.handleOnline = () => {\n const connectionType = translatedConnection();\n const status = {\n connected: true,\n connectionType: connectionType,\n };\n this.notifyListeners('networkStatusChange', status);\n };\n this.handleOffline = () => {\n const status = {\n connected: false,\n connectionType: 'none',\n };\n this.notifyListeners('networkStatusChange', status);\n };\n if (typeof window !== 'undefined') {\n window.addEventListener('online', this.handleOnline);\n window.addEventListener('offline', this.handleOffline);\n }\n }\n async getStatus() {\n if (!window.navigator) {\n throw this.unavailable('Browser does not support the Network Information API');\n }\n const connected = window.navigator.onLine;\n const connectionType = translatedConnection();\n const status = {\n connected,\n connectionType: connected ? connectionType : 'none',\n };\n return status;\n }\n}\nconst Network = new NetworkWeb();\nexport { Network };\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,OAAO,GAAGA,mBAAc,CAAC,SAAS,EAAE;IAC1C,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,UAAU,EAAE,CAAC;IAC9D,CAAC;;ICFD,SAAS,oBAAoB,GAAG;IAChC,IAAI,MAAM,UAAU,GAAG,MAAM,CAAC,SAAS,CAAC,UAAU,IAAI,MAAM,CAAC,SAAS,CAAC,aAAa,IAAI,MAAM,CAAC,SAAS,CAAC,gBAAgB;IACzH,IAAI,IAAI,MAAM,GAAG,SAAS;IAC1B,IAAI,MAAM,IAAI,GAAG,UAAU,GAAG,UAAU,CAAC,IAAI,IAAI,UAAU,CAAC,aAAa,GAAG,IAAI;IAChF,IAAI,IAAI,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;IAC1C,QAAQ,QAAQ,IAAI;IACpB;IACA,YAAY,KAAK,WAAW;IAC5B,YAAY,KAAK,UAAU;IAC3B,gBAAgB,MAAM,GAAG,UAAU;IACnC,gBAAgB;IAChB,YAAY,KAAK,MAAM;IACvB,gBAAgB,MAAM,GAAG,MAAM;IAC/B,gBAAgB;IAChB,YAAY,KAAK,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Aa,CAAC;IAClE,QAAQ;IACR,IAAI;IACJ,IAAI,MAAM,SAAS,GAAG;IACtB,QAAQ,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE;IAC/B,YAAY,MAAM,IAAI,CAAC,WAAW,CAAC,sDAAsD,CAAC;IAC1F,QAAQ;IACR,QAAQ,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC,MAAM;IACjD,QAAQ,MAAM,cAAc,GAAG,oBAAoB,EAAE;IACrD,QAAQ,MAAM,MAAM,GAAG;IACvB,YAAY,SAAS;IACrB,YAAY,cAAc,EAAE,SAAS,GAAG,cAAc,GAAG,MAAM;IAC/D,SAAS;IACT,QAAQ,OAAO,MAAM;IACrB,IAAI;IACJ;IACgB,IAAI,UAAU;;;;;;;;;;;;;;;"}
@@ -191,7 +191,7 @@ public extension Reachability {
191
191
  _ = unmanagedWeakifiedReachability.retain()
192
192
  return UnsafeRawPointer(unmanagedWeakifiedReachability.toOpaque())
193
193
  },
194
- release: { (info: UnsafeRawPointer) -> Void in
194
+ release: { (info: UnsafeRawPointer) in
195
195
  let unmanagedWeakifiedReachability = Unmanaged<ReachabilityWeakifier>.fromOpaque(info)
196
196
  unmanagedWeakifiedReachability.release()
197
197
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capacitor/network",
3
- "version": "8.0.0-nightly-20251113T150733.0",
3
+ "version": "8.0.0-nightly-20251117T150727.0",
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",
@@ -37,7 +37,7 @@
37
37
  "lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint",
38
38
  "fmt": "npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format",
39
39
  "eslint": "eslint . --ext ts",
40
- "prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
40
+ "prettier": "prettier \"**/*.{css,html,ts,js,java}\" --plugin=prettier-plugin-java",
41
41
  "swiftlint": "node-swiftlint",
42
42
  "docgen": "docgen --api NetworkPlugin --output-readme README.md --output-json dist/docs.json",
43
43
  "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",
@@ -49,18 +49,18 @@
49
49
  "devDependencies": {
50
50
  "@capacitor/android": "next",
51
51
  "@capacitor/core": "next",
52
- "@capacitor/docgen": "0.2.2",
52
+ "@capacitor/docgen": "0.3.0",
53
53
  "@capacitor/ios": "next",
54
54
  "@ionic/eslint-config": "^0.4.0",
55
- "@ionic/prettier-config": "~1.0.1",
56
- "@ionic/swiftlint-config": "^1.1.2",
57
- "eslint": "^8.57.0",
58
- "prettier": "~2.3.0",
59
- "prettier-plugin-java": "~1.0.2",
60
- "rimraf": "^6.0.1",
61
- "rollup": "^4.26.0",
62
- "swiftlint": "^1.0.1",
63
- "typescript": "~4.1.5"
55
+ "@ionic/prettier-config": "^4.0.0",
56
+ "@ionic/swiftlint-config": "^2.0.0",
57
+ "eslint": "^8.57.1",
58
+ "prettier": "^3.6.2",
59
+ "prettier-plugin-java": "^2.7.7",
60
+ "rimraf": "^6.1.0",
61
+ "rollup": "^4.53.2",
62
+ "swiftlint": "^2.0.0",
63
+ "typescript": "^5.9.3"
64
64
  },
65
65
  "peerDependencies": {
66
66
  "@capacitor/core": "next"
@@ -81,5 +81,5 @@
81
81
  "publishConfig": {
82
82
  "access": "public"
83
83
  },
84
- "gitHead": "8016b666634bc6b65bfb2ef998e7ed98ba848e82"
84
+ "gitHead": "06921fb53dc712720523c13836a92ba371054dcb"
85
85
  }