@capacitor/device 4.0.0-nightly-44c040f.0 → 4.0.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/CHANGELOG.md +16 -0
- package/README.md +15 -15
- package/dist/docs.json +2 -2
- package/dist/esm/definitions.d.ts +2 -2
- package/dist/esm/definitions.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [4.0.0](https://github.com/ionic-team/capacitor-plugins/compare/4.0.0-beta.2...4.0.0) (2022-07-27)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @capacitor/device
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [4.0.0-beta.2](https://github.com/ionic-team/capacitor-plugins/compare/4.0.0-beta.0...4.0.0-beta.2) (2022-07-08)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @capacitor/device
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
# 4.0.0-beta.0 (2022-06-27)
|
|
7
23
|
|
|
8
24
|
|
package/README.md
CHANGED
|
@@ -131,21 +131,21 @@ Get the device's current language locale tag.
|
|
|
131
131
|
|
|
132
132
|
#### DeviceInfo
|
|
133
133
|
|
|
134
|
-
| Prop | Type | Description
|
|
135
|
-
| --------------------- | ----------------------------------------------------------- |
|
|
136
|
-
| **`name`** | <code>string</code> | The name of the device. For example, "John's iPhone". This is only supported on iOS and Android 7.1 or above.
|
|
137
|
-
| **`model`** | <code>string</code> | The device model. For example, "iPhone13,4".
|
|
138
|
-
| **`platform`** | <code>'ios' \| 'android' \| 'web'</code> | The device platform (lowercase).
|
|
139
|
-
| **`operatingSystem`** | <code><a href="#operatingsystem">OperatingSystem</a></code> | The operating system of the device.
|
|
140
|
-
| **`osVersion`** | <code>string</code> | The version of the device OS.
|
|
141
|
-
| **`manufacturer`** | <code>string</code> | The manufacturer of the device.
|
|
142
|
-
| **`isVirtual`** | <code>boolean</code> | Whether the app is running in a simulator/emulator.
|
|
143
|
-
| **`memUsed`** | <code>number</code> | Approximate memory used by the current app, in bytes. Divide by 1048576 to get the number of MBs used.
|
|
144
|
-
| **`diskFree`** | <code>number</code> | How much free disk space is available on the
|
|
145
|
-
| **`diskTotal`** | <code>number</code> | The total size of the normal data storage path for the OS, in bytes. On Android it returns the disk space on the "system" partition holding the core Android OS.
|
|
146
|
-
| **`realDiskFree`** | <code>number</code> | How much free disk space is available on the
|
|
147
|
-
| **`realDiskTotal`** | <code>number</code> | The total size of the normal data storage path, in bytes.
|
|
148
|
-
| **`webViewVersion`** | <code>string</code> | The web view browser version
|
|
134
|
+
| Prop | Type | Description | Since |
|
|
135
|
+
| --------------------- | ----------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- |
|
|
136
|
+
| **`name`** | <code>string</code> | The name of the device. For example, "John's iPhone". This is only supported on iOS and Android 7.1 or above. | 1.0.0 |
|
|
137
|
+
| **`model`** | <code>string</code> | The device model. For example, "iPhone13,4". | 1.0.0 |
|
|
138
|
+
| **`platform`** | <code>'ios' \| 'android' \| 'web'</code> | The device platform (lowercase). | 1.0.0 |
|
|
139
|
+
| **`operatingSystem`** | <code><a href="#operatingsystem">OperatingSystem</a></code> | The operating system of the device. | 1.0.0 |
|
|
140
|
+
| **`osVersion`** | <code>string</code> | The version of the device OS. | 1.0.0 |
|
|
141
|
+
| **`manufacturer`** | <code>string</code> | The manufacturer of the device. | 1.0.0 |
|
|
142
|
+
| **`isVirtual`** | <code>boolean</code> | Whether the app is running in a simulator/emulator. | 1.0.0 |
|
|
143
|
+
| **`memUsed`** | <code>number</code> | Approximate memory used by the current app, in bytes. Divide by 1048576 to get the number of MBs used. | 1.0.0 |
|
|
144
|
+
| **`diskFree`** | <code>number</code> | How much free disk space is available on the normal data storage path for the os, in bytes. On Android it returns the free disk space on the "system" partition holding the core Android OS. On iOS this value is not accurate. | 1.0.0 |
|
|
145
|
+
| **`diskTotal`** | <code>number</code> | The total size of the normal data storage path for the OS, in bytes. On Android it returns the disk space on the "system" partition holding the core Android OS. | 1.0.0 |
|
|
146
|
+
| **`realDiskFree`** | <code>number</code> | How much free disk space is available on the normal data storage, in bytes. | 1.1.0 |
|
|
147
|
+
| **`realDiskTotal`** | <code>number</code> | The total size of the normal data storage path, in bytes. | 1.1.0 |
|
|
148
|
+
| **`webViewVersion`** | <code>string</code> | The web view browser version | 1.0.0 |
|
|
149
149
|
|
|
150
150
|
|
|
151
151
|
#### BatteryInfo
|
package/dist/docs.json
CHANGED
|
@@ -232,7 +232,7 @@
|
|
|
232
232
|
"name": "since"
|
|
233
233
|
}
|
|
234
234
|
],
|
|
235
|
-
"docs": "How much free disk space is available on the
|
|
235
|
+
"docs": "How much free disk space is available on the normal data storage\npath for the os, in bytes.\n\nOn Android it returns the free disk space on the \"system\"\npartition holding the core Android OS.\nOn iOS this value is not accurate.",
|
|
236
236
|
"complexTypes": [],
|
|
237
237
|
"type": "number | undefined"
|
|
238
238
|
},
|
|
@@ -260,7 +260,7 @@
|
|
|
260
260
|
"name": "since"
|
|
261
261
|
}
|
|
262
262
|
],
|
|
263
|
-
"docs": "How much free disk space is available on the
|
|
263
|
+
"docs": "How much free disk space is available on the normal data storage, in bytes.",
|
|
264
264
|
"complexTypes": [],
|
|
265
265
|
"type": "number | undefined"
|
|
266
266
|
},
|
|
@@ -64,7 +64,7 @@ export interface DeviceInfo {
|
|
|
64
64
|
*/
|
|
65
65
|
memUsed?: number;
|
|
66
66
|
/**
|
|
67
|
-
* How much free disk space is available on the
|
|
67
|
+
* How much free disk space is available on the normal data storage
|
|
68
68
|
* path for the os, in bytes.
|
|
69
69
|
*
|
|
70
70
|
* On Android it returns the free disk space on the "system"
|
|
@@ -86,7 +86,7 @@ export interface DeviceInfo {
|
|
|
86
86
|
*/
|
|
87
87
|
diskTotal?: number;
|
|
88
88
|
/**
|
|
89
|
-
* How much free disk space is available on the
|
|
89
|
+
* How much free disk space is available on the normal data storage, in bytes.
|
|
90
90
|
*
|
|
91
91
|
* @since 1.1.0
|
|
92
92
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["export type OperatingSystem = 'ios' | 'android' | 'windows' | 'mac' | 'unknown';\n\nexport interface DeviceId {\n /**\n * The UUID of the device as available to the app. This identifier may change\n * on modern mobile platforms that only allow per-app install UUIDs.\n *\n * On web, a random identifier is generated and stored on localStorage for subsequent calls.\n * If localStorage is not available a new random identifier will be generated on every call.\n *\n * @since 1.0.0\n */\n uuid: string;\n}\n\nexport interface DeviceInfo {\n /**\n * The name of the device. For example, \"John's iPhone\".\n *\n * This is only supported on iOS and Android 7.1 or above.\n *\n * @since 1.0.0\n */\n name?: string;\n\n /**\n * The device model. For example, \"iPhone13,4\".\n *\n * @since 1.0.0\n */\n model: string;\n\n /**\n * The device platform (lowercase).\n *\n * @since 1.0.0\n */\n platform: 'ios' | 'android' | 'web';\n\n /**\n * The operating system of the device.\n *\n * @since 1.0.0\n */\n operatingSystem: OperatingSystem;\n\n /**\n * The version of the device OS.\n *\n * @since 1.0.0\n */\n osVersion: string;\n\n /**\n * The manufacturer of the device.\n *\n * @since 1.0.0\n */\n manufacturer: string;\n\n /**\n * Whether the app is running in a simulator/emulator.\n *\n * @since 1.0.0\n */\n isVirtual: boolean;\n\n /**\n * Approximate memory used by the current app, in bytes. Divide by\n * 1048576 to get the number of MBs used.\n *\n * @since 1.0.0\n */\n memUsed?: number;\n\n /**\n * How much free disk space is available on the
|
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["export type OperatingSystem = 'ios' | 'android' | 'windows' | 'mac' | 'unknown';\n\nexport interface DeviceId {\n /**\n * The UUID of the device as available to the app. This identifier may change\n * on modern mobile platforms that only allow per-app install UUIDs.\n *\n * On web, a random identifier is generated and stored on localStorage for subsequent calls.\n * If localStorage is not available a new random identifier will be generated on every call.\n *\n * @since 1.0.0\n */\n uuid: string;\n}\n\nexport interface DeviceInfo {\n /**\n * The name of the device. For example, \"John's iPhone\".\n *\n * This is only supported on iOS and Android 7.1 or above.\n *\n * @since 1.0.0\n */\n name?: string;\n\n /**\n * The device model. For example, \"iPhone13,4\".\n *\n * @since 1.0.0\n */\n model: string;\n\n /**\n * The device platform (lowercase).\n *\n * @since 1.0.0\n */\n platform: 'ios' | 'android' | 'web';\n\n /**\n * The operating system of the device.\n *\n * @since 1.0.0\n */\n operatingSystem: OperatingSystem;\n\n /**\n * The version of the device OS.\n *\n * @since 1.0.0\n */\n osVersion: string;\n\n /**\n * The manufacturer of the device.\n *\n * @since 1.0.0\n */\n manufacturer: string;\n\n /**\n * Whether the app is running in a simulator/emulator.\n *\n * @since 1.0.0\n */\n isVirtual: boolean;\n\n /**\n * Approximate memory used by the current app, in bytes. Divide by\n * 1048576 to get the number of MBs used.\n *\n * @since 1.0.0\n */\n memUsed?: number;\n\n /**\n * How much free disk space is available on the normal data storage\n * path for the os, in bytes.\n *\n * On Android it returns the free disk space on the \"system\"\n * partition holding the core Android OS.\n * On iOS this value is not accurate.\n *\n * @deprecated Use `realDiskFree`.\n * @since 1.0.0\n */\n diskFree?: number;\n\n /**\n * The total size of the normal data storage path for the OS, in bytes.\n *\n * On Android it returns the disk space on the \"system\"\n * partition holding the core Android OS.\n *\n * @deprecated Use `realDiskTotal`.\n * @since 1.0.0\n */\n diskTotal?: number;\n\n /**\n * How much free disk space is available on the normal data storage, in bytes.\n *\n * @since 1.1.0\n */\n realDiskFree?: number;\n\n /**\n * The total size of the normal data storage path, in bytes.\n *\n * @since 1.1.0\n */\n realDiskTotal?: number;\n\n /**\n * The web view browser version\n *\n * @since 1.0.0\n */\n webViewVersion: string;\n}\n\nexport interface BatteryInfo {\n /**\n * A percentage (0 to 1) indicating how much the battery is charged.\n *\n * @since 1.0.0\n */\n batteryLevel?: number;\n\n /**\n * Whether the device is charging.\n *\n * @since 1.0.0\n */\n isCharging?: boolean;\n}\n\nexport interface GetLanguageCodeResult {\n /**\n * Two character language code.\n *\n * @since 1.0.0\n */\n value: string;\n}\n\nexport interface LanguageTag {\n /**\n * Returns a well-formed IETF BCP 47 language tag.\n *\n * @since 4.0.0\n */\n value: string;\n}\n\nexport interface DevicePlugin {\n /**\n * Return an unique identifier for the device.\n *\n * @since 1.0.0\n */\n getId(): Promise<DeviceId>;\n\n /**\n * Return information about the underlying device/os/platform.\n *\n * @since 1.0.0\n */\n getInfo(): Promise<DeviceInfo>;\n\n /**\n * Return information about the battery.\n *\n * @since 1.0.0\n */\n getBatteryInfo(): Promise<BatteryInfo>;\n\n /**\n * Get the device's current language locale code.\n *\n * @since 1.0.0\n */\n getLanguageCode(): Promise<GetLanguageCodeResult>;\n\n /**\n * Get the device's current language locale tag.\n *\n * @since 4.0.0\n */\n getLanguageTag(): Promise<LanguageTag>;\n}\n\n/**\n * @deprecated Use `BatteryInfo`.\n * @since 1.0.0\n */\nexport type DeviceBatteryInfo = BatteryInfo;\n\n/**\n * @deprecated Use `GetLanguageCodeResult`.\n * @since 1.0.0\n */\nexport type DeviceLanguageCodeResult = GetLanguageCodeResult;\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capacitor/device",
|
|
3
|
-
"version": "4.0.0
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "The Device API exposes internal information about the device, such as the model and operating system version, along with user information such as unique ids.",
|
|
5
5
|
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -83,5 +83,5 @@
|
|
|
83
83
|
"publishConfig": {
|
|
84
84
|
"access": "public"
|
|
85
85
|
},
|
|
86
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "27bd016fc57850ae151ae06017bb1e9ee0d62975"
|
|
87
87
|
}
|