@capgo/capacitor-device-info 8.0.0 → 8.0.2

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.
@@ -58,7 +58,7 @@ public class DeviceInfo {
58
58
  }
59
59
 
60
60
  public String getPluginVersion() {
61
- return "8.0.0";
61
+ return "8.0.1";
62
62
  }
63
63
 
64
64
  private JSObject getCpuInfo() {
@@ -121,7 +121,7 @@ public class DeviceInfo {
121
121
  private JSObject getStorageInfo(Context context) {
122
122
  JSObject storage = new JSObject();
123
123
  File filesDir = context.getFilesDir();
124
- File target = filesDir != null ? filesDir : context.getDataDir();
124
+ File target = filesDir != null ? filesDir : new File(context.getApplicationInfo().dataDir);
125
125
  StatFs statFs = new StatFs(target.getAbsolutePath());
126
126
  long totalBytes = statFs.getTotalBytes();
127
127
  long freeBytes = statFs.getAvailableBytes();
@@ -26,7 +26,7 @@ import Metal
26
26
  }
27
27
 
28
28
  @objc public func getPluginVersion() -> String {
29
- return "8.0.0"
29
+ return "8.0.1"
30
30
  }
31
31
 
32
32
  private func cpuInfo() -> [String: Any] {
@@ -3,7 +3,7 @@ import Foundation
3
3
 
4
4
  @objc(DeviceInfoPlugin)
5
5
  public class DeviceInfoPlugin: CAPPlugin, CAPBridgedPlugin {
6
- private let pluginVersion = "8.0.0"
6
+ private let pluginVersion = "8.0.1"
7
7
  private let defaultIntervalMs = 1000
8
8
  private let minimumIntervalMs = 250
9
9
 
@@ -17,6 +17,6 @@ class DeviceInfoTests: XCTestCase {
17
17
  let implementation = DeviceInfo()
18
18
  let result = implementation.getPluginVersion()
19
19
 
20
- XCTAssertEqual("8.0.0", result)
20
+ XCTAssertEqual("8.0.1", result)
21
21
  }
22
22
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/capacitor-device-info",
3
- "version": "8.0.0",
3
+ "version": "8.0.2",
4
4
  "description": "Capacitor plugin for reading CPU, memory, GPU, storage, and onboard sensor metrics.",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",