@capawesome/capacitor-device-info 0.0.1

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.
Files changed (38) hide show
  1. package/CapawesomeCapacitorDeviceInfo.podspec +21 -0
  2. package/LICENSE +21 -0
  3. package/Package.swift +29 -0
  4. package/README.md +264 -0
  5. package/android/build.gradle +58 -0
  6. package/android/src/main/AndroidManifest.xml +2 -0
  7. package/android/src/main/java/io/capawesome/capacitorjs/plugins/deviceinfo/DeviceInfo.java +119 -0
  8. package/android/src/main/java/io/capawesome/capacitorjs/plugins/deviceinfo/DeviceInfoPlugin.java +106 -0
  9. package/android/src/main/java/io/capawesome/capacitorjs/plugins/deviceinfo/classes/results/GetIdResult.java +23 -0
  10. package/android/src/main/java/io/capawesome/capacitorjs/plugins/deviceinfo/classes/results/GetInfoResult.java +98 -0
  11. package/android/src/main/java/io/capawesome/capacitorjs/plugins/deviceinfo/classes/results/GetUptimeResult.java +22 -0
  12. package/android/src/main/java/io/capawesome/capacitorjs/plugins/deviceinfo/interfaces/Callback.java +5 -0
  13. package/android/src/main/java/io/capawesome/capacitorjs/plugins/deviceinfo/interfaces/NonEmptyResultCallback.java +7 -0
  14. package/android/src/main/java/io/capawesome/capacitorjs/plugins/deviceinfo/interfaces/Result.java +7 -0
  15. package/android/src/main/res/.gitkeep +0 -0
  16. package/dist/docs.json +413 -0
  17. package/dist/esm/definitions.d.ts +203 -0
  18. package/dist/esm/definitions.js +2 -0
  19. package/dist/esm/definitions.js.map +1 -0
  20. package/dist/esm/index.d.ts +4 -0
  21. package/dist/esm/index.js +7 -0
  22. package/dist/esm/index.js.map +1 -0
  23. package/dist/esm/web.d.ts +13 -0
  24. package/dist/esm/web.js +130 -0
  25. package/dist/esm/web.js.map +1 -0
  26. package/dist/plugin.cjs.js +144 -0
  27. package/dist/plugin.cjs.js.map +1 -0
  28. package/dist/plugin.js +147 -0
  29. package/dist/plugin.js.map +1 -0
  30. package/ios/Plugin/Classes/Results/GetIdResult.swift +16 -0
  31. package/ios/Plugin/Classes/Results/GetInfoResult.swift +66 -0
  32. package/ios/Plugin/Classes/Results/GetUptimeResult.swift +16 -0
  33. package/ios/Plugin/DeviceInfo.swift +89 -0
  34. package/ios/Plugin/DeviceInfoPlugin.swift +64 -0
  35. package/ios/Plugin/Info.plist +24 -0
  36. package/ios/Plugin/PrivacyInfo.xcprivacy +23 -0
  37. package/ios/Plugin/Protocols/Result.swift +5 -0
  38. package/package.json +91 -0
@@ -0,0 +1,203 @@
1
+ export interface DeviceInfoPlugin {
2
+ /**
3
+ * Get a unique identifier for the device.
4
+ *
5
+ * On **Android**, the identifier is the `ANDROID_ID` value, which is unique
6
+ * per app-signing key, user, and device. It is reset when the app is
7
+ * reinstalled after the signing key changes or the device is factory reset.
8
+ *
9
+ * On **iOS**, the identifier is the `identifierForVendor` value, which is
10
+ * unique per vendor and device. It is reset when all apps from the vendor are
11
+ * uninstalled.
12
+ *
13
+ * On **Web**, the identifier is a random UUID that is persisted in the
14
+ * browser's `localStorage`. It is reset when the browser storage is cleared.
15
+ *
16
+ * @since 0.1.0
17
+ */
18
+ getId(): Promise<GetIdResult>;
19
+ /**
20
+ * Get information about the device.
21
+ *
22
+ * @since 0.1.0
23
+ */
24
+ getInfo(): Promise<GetInfoResult>;
25
+ /**
26
+ * Get the time the device has been running since its last boot, in
27
+ * milliseconds.
28
+ *
29
+ * Only available on Android and iOS.
30
+ *
31
+ * @since 0.1.0
32
+ */
33
+ getUptime(): Promise<GetUptimeResult>;
34
+ }
35
+ /**
36
+ * @since 0.1.0
37
+ */
38
+ export interface GetIdResult {
39
+ /**
40
+ * The unique identifier of the device.
41
+ *
42
+ * @example '2f60cd8d-3b6a-4b3c-8f2e-1a2b3c4d5e6f'
43
+ * @since 0.1.0
44
+ */
45
+ identifier: string;
46
+ }
47
+ /**
48
+ * @since 0.1.0
49
+ */
50
+ export interface GetInfoResult {
51
+ /**
52
+ * The Android SDK version number (API level).
53
+ *
54
+ * Returns `null` on platforms other than Android.
55
+ *
56
+ * Only available on Android.
57
+ *
58
+ * @example 34
59
+ * @since 0.1.0
60
+ */
61
+ androidSdkVersion: number | null;
62
+ /**
63
+ * The type of the device.
64
+ *
65
+ * @since 0.1.0
66
+ */
67
+ deviceType: DeviceType;
68
+ /**
69
+ * The major version number of iOS.
70
+ *
71
+ * Returns `null` on platforms other than iOS.
72
+ *
73
+ * Only available on iOS.
74
+ *
75
+ * @example 17
76
+ * @since 0.1.0
77
+ */
78
+ iosVersion: number | null;
79
+ /**
80
+ * Whether the app is running on a virtual device (simulator or emulator).
81
+ *
82
+ * @since 0.1.0
83
+ */
84
+ isVirtual: boolean;
85
+ /**
86
+ * The manufacturer of the device.
87
+ *
88
+ * @example 'Apple'
89
+ * @since 0.1.0
90
+ */
91
+ manufacturer: string;
92
+ /**
93
+ * The model identifier of the device.
94
+ *
95
+ * On **iOS**, this is the internal model identifier (e.g. `iPhone13,4`), not
96
+ * the marketing name.
97
+ *
98
+ * @example 'iPhone13,4'
99
+ * @since 0.1.0
100
+ */
101
+ model: string;
102
+ /**
103
+ * The name of the device.
104
+ *
105
+ * On **iOS 16 and newer**, a generic device name (e.g. `iPhone`) is returned
106
+ * unless the app has the required entitlement.
107
+ *
108
+ * Returns `null` if the name cannot be determined.
109
+ *
110
+ * @example 'iPhone'
111
+ * @since 0.1.0
112
+ */
113
+ name: string | null;
114
+ /**
115
+ * The operating system of the device.
116
+ *
117
+ * @since 0.1.0
118
+ */
119
+ operatingSystem: OperatingSystem;
120
+ /**
121
+ * The version of the operating system.
122
+ *
123
+ * @example '17.5'
124
+ * @since 0.1.0
125
+ */
126
+ osVersion: string;
127
+ /**
128
+ * The platform the app is running on.
129
+ *
130
+ * @since 0.1.0
131
+ */
132
+ platform: Platform;
133
+ /**
134
+ * The total amount of memory of the device, in bytes.
135
+ *
136
+ * Returns `null` if the total memory cannot be determined.
137
+ *
138
+ * Only available on Android and iOS.
139
+ *
140
+ * @example 4294967296
141
+ * @since 0.1.0
142
+ */
143
+ totalMemory: number | null;
144
+ /**
145
+ * The amount of memory used by the app, in bytes.
146
+ *
147
+ * Returns `null` if the used memory cannot be determined.
148
+ *
149
+ * Only available on Android and iOS.
150
+ *
151
+ * @example 134217728
152
+ * @since 0.1.0
153
+ */
154
+ usedMemory: number | null;
155
+ /**
156
+ * The version of the WebView that renders the app.
157
+ *
158
+ * On **iOS**, the version of the operating system is returned, because the
159
+ * WebKit version is tied to it.
160
+ *
161
+ * Returns `null` if the WebView version cannot be determined.
162
+ *
163
+ * @example '126.0.6478.40'
164
+ * @since 0.1.0
165
+ */
166
+ webViewVersion: string | null;
167
+ }
168
+ /**
169
+ * @since 0.1.0
170
+ */
171
+ export interface GetUptimeResult {
172
+ /**
173
+ * The time the device has been running since its last boot, in milliseconds.
174
+ *
175
+ * @example 123456789
176
+ * @since 0.1.0
177
+ */
178
+ uptime: number;
179
+ }
180
+ /**
181
+ * The type of a device.
182
+ *
183
+ * - `phone`: A handheld phone-sized device.
184
+ * - `tablet`: A tablet-sized device.
185
+ * - `desktop`: A desktop or laptop computer.
186
+ * - `tv`: A television or set-top box.
187
+ * - `unknown`: The type could not be determined.
188
+ *
189
+ * @since 0.1.0
190
+ */
191
+ export type DeviceType = 'phone' | 'tablet' | 'desktop' | 'tv' | 'unknown';
192
+ /**
193
+ * The operating system of a device.
194
+ *
195
+ * @since 0.1.0
196
+ */
197
+ export type OperatingSystem = 'android' | 'ios' | 'windows' | 'mac' | 'unknown';
198
+ /**
199
+ * The platform an app is running on.
200
+ *
201
+ * @since 0.1.0
202
+ */
203
+ export type Platform = 'android' | 'ios' | 'web';
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=definitions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["export interface DeviceInfoPlugin {\n /**\n * Get a unique identifier for the device.\n *\n * On **Android**, the identifier is the `ANDROID_ID` value, which is unique\n * per app-signing key, user, and device. It is reset when the app is\n * reinstalled after the signing key changes or the device is factory reset.\n *\n * On **iOS**, the identifier is the `identifierForVendor` value, which is\n * unique per vendor and device. It is reset when all apps from the vendor are\n * uninstalled.\n *\n * On **Web**, the identifier is a random UUID that is persisted in the\n * browser's `localStorage`. It is reset when the browser storage is cleared.\n *\n * @since 0.1.0\n */\n getId(): Promise<GetIdResult>;\n /**\n * Get information about the device.\n *\n * @since 0.1.0\n */\n getInfo(): Promise<GetInfoResult>;\n /**\n * Get the time the device has been running since its last boot, in\n * milliseconds.\n *\n * Only available on Android and iOS.\n *\n * @since 0.1.0\n */\n getUptime(): Promise<GetUptimeResult>;\n}\n\n/**\n * @since 0.1.0\n */\nexport interface GetIdResult {\n /**\n * The unique identifier of the device.\n *\n * @example '2f60cd8d-3b6a-4b3c-8f2e-1a2b3c4d5e6f'\n * @since 0.1.0\n */\n identifier: string;\n}\n\n/**\n * @since 0.1.0\n */\nexport interface GetInfoResult {\n /**\n * The Android SDK version number (API level).\n *\n * Returns `null` on platforms other than Android.\n *\n * Only available on Android.\n *\n * @example 34\n * @since 0.1.0\n */\n androidSdkVersion: number | null;\n /**\n * The type of the device.\n *\n * @since 0.1.0\n */\n deviceType: DeviceType;\n /**\n * The major version number of iOS.\n *\n * Returns `null` on platforms other than iOS.\n *\n * Only available on iOS.\n *\n * @example 17\n * @since 0.1.0\n */\n iosVersion: number | null;\n /**\n * Whether the app is running on a virtual device (simulator or emulator).\n *\n * @since 0.1.0\n */\n isVirtual: boolean;\n /**\n * The manufacturer of the device.\n *\n * @example 'Apple'\n * @since 0.1.0\n */\n manufacturer: string;\n /**\n * The model identifier of the device.\n *\n * On **iOS**, this is the internal model identifier (e.g. `iPhone13,4`), not\n * the marketing name.\n *\n * @example 'iPhone13,4'\n * @since 0.1.0\n */\n model: string;\n /**\n * The name of the device.\n *\n * On **iOS 16 and newer**, a generic device name (e.g. `iPhone`) is returned\n * unless the app has the required entitlement.\n *\n * Returns `null` if the name cannot be determined.\n *\n * @example 'iPhone'\n * @since 0.1.0\n */\n name: string | null;\n /**\n * The operating system of the device.\n *\n * @since 0.1.0\n */\n operatingSystem: OperatingSystem;\n /**\n * The version of the operating system.\n *\n * @example '17.5'\n * @since 0.1.0\n */\n osVersion: string;\n /**\n * The platform the app is running on.\n *\n * @since 0.1.0\n */\n platform: Platform;\n /**\n * The total amount of memory of the device, in bytes.\n *\n * Returns `null` if the total memory cannot be determined.\n *\n * Only available on Android and iOS.\n *\n * @example 4294967296\n * @since 0.1.0\n */\n totalMemory: number | null;\n /**\n * The amount of memory used by the app, in bytes.\n *\n * Returns `null` if the used memory cannot be determined.\n *\n * Only available on Android and iOS.\n *\n * @example 134217728\n * @since 0.1.0\n */\n usedMemory: number | null;\n /**\n * The version of the WebView that renders the app.\n *\n * On **iOS**, the version of the operating system is returned, because the\n * WebKit version is tied to it.\n *\n * Returns `null` if the WebView version cannot be determined.\n *\n * @example '126.0.6478.40'\n * @since 0.1.0\n */\n webViewVersion: string | null;\n}\n\n/**\n * @since 0.1.0\n */\nexport interface GetUptimeResult {\n /**\n * The time the device has been running since its last boot, in milliseconds.\n *\n * @example 123456789\n * @since 0.1.0\n */\n uptime: number;\n}\n\n/**\n * The type of a device.\n *\n * - `phone`: A handheld phone-sized device.\n * - `tablet`: A tablet-sized device.\n * - `desktop`: A desktop or laptop computer.\n * - `tv`: A television or set-top box.\n * - `unknown`: The type could not be determined.\n *\n * @since 0.1.0\n */\nexport type DeviceType = 'phone' | 'tablet' | 'desktop' | 'tv' | 'unknown';\n\n/**\n * The operating system of a device.\n *\n * @since 0.1.0\n */\nexport type OperatingSystem = 'android' | 'ios' | 'windows' | 'mac' | 'unknown';\n\n/**\n * The platform an app is running on.\n *\n * @since 0.1.0\n */\nexport type Platform = 'android' | 'ios' | 'web';\n"]}
@@ -0,0 +1,4 @@
1
+ import type { DeviceInfoPlugin } from './definitions';
2
+ declare const DeviceInfo: DeviceInfoPlugin;
3
+ export * from './definitions';
4
+ export { DeviceInfo };
@@ -0,0 +1,7 @@
1
+ import { registerPlugin } from '@capacitor/core';
2
+ const DeviceInfo = registerPlugin('DeviceInfo', {
3
+ web: () => import('./web').then(m => new m.DeviceInfoWeb()),
4
+ });
5
+ export * from './definitions';
6
+ export { DeviceInfo };
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,UAAU,GAAG,cAAc,CAAmB,YAAY,EAAE;IAChE,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,aAAa,EAAE,CAAC;CAC5D,CAAC,CAAC;AAEH,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,CAAC","sourcesContent":["import { registerPlugin } from '@capacitor/core';\n\nimport type { DeviceInfoPlugin } from './definitions';\n\nconst DeviceInfo = registerPlugin<DeviceInfoPlugin>('DeviceInfo', {\n web: () => import('./web').then(m => new m.DeviceInfoWeb()),\n});\n\nexport * from './definitions';\nexport { DeviceInfo };\n"]}
@@ -0,0 +1,13 @@
1
+ import { WebPlugin } from '@capacitor/core';
2
+ import type { DeviceInfoPlugin, GetIdResult, GetInfoResult, GetUptimeResult } from './definitions';
3
+ export declare class DeviceInfoWeb extends WebPlugin implements DeviceInfoPlugin {
4
+ private static readonly identifierStorageKey;
5
+ getId(): Promise<GetIdResult>;
6
+ getInfo(): Promise<GetInfoResult>;
7
+ getUptime(): Promise<GetUptimeResult>;
8
+ private createIdentifier;
9
+ private determineDeviceType;
10
+ private determineOperatingSystem;
11
+ private determineOsVersion;
12
+ private determineWebViewVersion;
13
+ }
@@ -0,0 +1,130 @@
1
+ import { WebPlugin } from '@capacitor/core';
2
+ export class DeviceInfoWeb extends WebPlugin {
3
+ async getId() {
4
+ let identifier = window.localStorage.getItem(DeviceInfoWeb.identifierStorageKey);
5
+ if (!identifier) {
6
+ identifier = this.createIdentifier();
7
+ window.localStorage.setItem(DeviceInfoWeb.identifierStorageKey, identifier);
8
+ }
9
+ return { identifier };
10
+ }
11
+ async getInfo() {
12
+ var _a;
13
+ const userAgent = navigator.userAgent;
14
+ const userAgentData = navigator
15
+ .userAgentData;
16
+ return {
17
+ androidSdkVersion: null,
18
+ deviceType: this.determineDeviceType(userAgent, userAgentData),
19
+ iosVersion: null,
20
+ isVirtual: false,
21
+ manufacturer: 'unknown',
22
+ model: 'unknown',
23
+ name: null,
24
+ operatingSystem: this.determineOperatingSystem(userAgent, userAgentData),
25
+ osVersion: (_a = this.determineOsVersion(userAgent)) !== null && _a !== void 0 ? _a : 'unknown',
26
+ platform: 'web',
27
+ totalMemory: null,
28
+ usedMemory: null,
29
+ webViewVersion: this.determineWebViewVersion(userAgent),
30
+ };
31
+ }
32
+ async getUptime() {
33
+ throw this.unimplemented('Not implemented on web.');
34
+ }
35
+ createIdentifier() {
36
+ if (typeof crypto !== 'undefined' && 'randomUUID' in crypto) {
37
+ return crypto.randomUUID();
38
+ }
39
+ return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, character => {
40
+ const random = (Math.random() * 16) | 0;
41
+ const value = character === 'x' ? random : (random & 0x3) | 0x8;
42
+ return value.toString(16);
43
+ });
44
+ }
45
+ determineDeviceType(userAgent, userAgentData) {
46
+ if (/TV|SmartTV|Tizen|Web0S|WebOS/i.test(userAgent)) {
47
+ return 'tv';
48
+ }
49
+ if (/iPad/.test(userAgent)) {
50
+ return 'tablet';
51
+ }
52
+ if (/Android/.test(userAgent) && !/Mobile/.test(userAgent)) {
53
+ return 'tablet';
54
+ }
55
+ if (userAgentData === null || userAgentData === void 0 ? void 0 : userAgentData.mobile) {
56
+ return 'phone';
57
+ }
58
+ if (/Mobile|iPhone|iPod/.test(userAgent)) {
59
+ return 'phone';
60
+ }
61
+ return 'desktop';
62
+ }
63
+ determineOperatingSystem(userAgent, userAgentData) {
64
+ var _a;
65
+ const platform = (_a = userAgentData === null || userAgentData === void 0 ? void 0 : userAgentData.platform) === null || _a === void 0 ? void 0 : _a.toLowerCase();
66
+ if (platform) {
67
+ if (platform.includes('win')) {
68
+ return 'windows';
69
+ }
70
+ if (platform.includes('android')) {
71
+ return 'android';
72
+ }
73
+ if (platform.includes('ios')) {
74
+ return 'ios';
75
+ }
76
+ if (platform.includes('mac')) {
77
+ return 'mac';
78
+ }
79
+ }
80
+ if (/Windows/.test(userAgent)) {
81
+ return 'windows';
82
+ }
83
+ if (/Android/.test(userAgent)) {
84
+ return 'android';
85
+ }
86
+ if (/iPhone|iPad|iPod/.test(userAgent)) {
87
+ return 'ios';
88
+ }
89
+ if (/Mac OS X/.test(userAgent)) {
90
+ return 'mac';
91
+ }
92
+ return 'unknown';
93
+ }
94
+ determineOsVersion(userAgent) {
95
+ const windowsMatch = /Windows NT ([0-9._]+)/.exec(userAgent);
96
+ if (windowsMatch) {
97
+ return windowsMatch[1];
98
+ }
99
+ const androidMatch = /Android ([0-9._]+)/.exec(userAgent);
100
+ if (androidMatch) {
101
+ return androidMatch[1];
102
+ }
103
+ const iosMatch = /OS ([0-9_]+) like Mac OS X/.exec(userAgent);
104
+ if (iosMatch) {
105
+ return iosMatch[1].replace(/_/g, '.');
106
+ }
107
+ const macMatch = /Mac OS X ([0-9_]+)/.exec(userAgent);
108
+ if (macMatch) {
109
+ return macMatch[1].replace(/_/g, '.');
110
+ }
111
+ return null;
112
+ }
113
+ determineWebViewVersion(userAgent) {
114
+ const patterns = [
115
+ /Edg\/([0-9.]+)/,
116
+ /Chrome\/([0-9.]+)/,
117
+ /Firefox\/([0-9.]+)/,
118
+ /Version\/([0-9.]+).*Safari/,
119
+ ];
120
+ for (const pattern of patterns) {
121
+ const match = pattern.exec(userAgent);
122
+ if (match) {
123
+ return match[1];
124
+ }
125
+ }
126
+ return null;
127
+ }
128
+ }
129
+ DeviceInfoWeb.identifierStorageKey = 'capawesome-capacitor-device-info-id';
130
+ //# sourceMappingURL=web.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AA0B5C,MAAM,OAAO,aAAc,SAAQ,SAAS;IAI1C,KAAK,CAAC,KAAK;QACT,IAAI,UAAU,GAAG,MAAM,CAAC,YAAY,CAAC,OAAO,CAC1C,aAAa,CAAC,oBAAoB,CACnC,CAAC;QACF,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,UAAU,GAAG,IAAI,CAAC,gBAAgB,EAAE,CAAC;YACrC,MAAM,CAAC,YAAY,CAAC,OAAO,CACzB,aAAa,CAAC,oBAAoB,EAClC,UAAU,CACX,CAAC;QACJ,CAAC;QACD,OAAO,EAAE,UAAU,EAAE,CAAC;IACxB,CAAC;IAED,KAAK,CAAC,OAAO;;QACX,MAAM,SAAS,GAAG,SAAS,CAAC,SAAS,CAAC;QACtC,MAAM,aAAa,GAAI,SAAwC;aAC5D,aAAa,CAAC;QACjB,OAAO;YACL,iBAAiB,EAAE,IAAI;YACvB,UAAU,EAAE,IAAI,CAAC,mBAAmB,CAAC,SAAS,EAAE,aAAa,CAAC;YAC9D,UAAU,EAAE,IAAI;YAChB,SAAS,EAAE,KAAK;YAChB,YAAY,EAAE,SAAS;YACvB,KAAK,EAAE,SAAS;YAChB,IAAI,EAAE,IAAI;YACV,eAAe,EAAE,IAAI,CAAC,wBAAwB,CAAC,SAAS,EAAE,aAAa,CAAC;YACxE,SAAS,EAAE,MAAA,IAAI,CAAC,kBAAkB,CAAC,SAAS,CAAC,mCAAI,SAAS;YAC1D,QAAQ,EAAE,KAAK;YACf,WAAW,EAAE,IAAI;YACjB,UAAU,EAAE,IAAI;YAChB,cAAc,EAAE,IAAI,CAAC,uBAAuB,CA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AM,YAAY,GAAG,oBAAoB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC1D,IAAI,YAAY,EAAE,CAAC;YACjB,OAAO,YAAY,CAAC,CAAC,CAAC,CAAC;QACzB,CAAC;QACD,MAAM,QAAQ,GAAG,4BAA4B,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC9D,IAAI,QAAQ,EAAE,CAAC;YACb,OAAO,QAAQ,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;QACxC,CAAC;QACD,MAAM,QAAQ,GAAG,oBAAoB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACtD,IAAI,QAAQ,EAAE,CAAC;YACb,OAAO,QAAQ,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;QACxC,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAEO,uBAAuB,CAAC,SAAiB;QAC/C,MAAM,QAAQ,GAAG;YACf,gBAAgB;YAChB,mBAAmB;YACnB,oBAAoB;YACpB,4BAA4B;SAC7B,CAAC;QACF,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;YAC/B,MAAM,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YACtC,IAAI,KAAK,EAAE,CAAC;gBACV,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC;YAClB,CAAC;QACH,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;;AAlJuB,kCAAoB,GAC1C,qCAAqC,CAAC","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type {\n DeviceInfoPlugin,\n DeviceType,\n GetIdResult,\n GetInfoResult,\n GetUptimeResult,\n OperatingSystem,\n} from './definitions';\n\ninterface UserAgentBrand {\n brand: string;\n version: string;\n}\n\ninterface UserAgentData {\n brands?: UserAgentBrand[];\n mobile?: boolean;\n platform?: string;\n}\n\ninterface NavigatorWithUserAgentData extends Navigator {\n userAgentData?: UserAgentData;\n}\n\nexport class DeviceInfoWeb extends WebPlugin implements DeviceInfoPlugin {\n private static readonly identifierStorageKey =\n 'capawesome-capacitor-device-info-id';\n\n async getId(): Promise<GetIdResult> {\n let identifier = window.localStorage.getItem(\n DeviceInfoWeb.identifierStorageKey,\n );\n if (!identifier) {\n identifier = this.createIdentifier();\n window.localStorage.setItem(\n DeviceInfoWeb.identifierStorageKey,\n identifier,\n );\n }\n return { identifier };\n }\n\n async getInfo(): Promise<GetInfoResult> {\n const userAgent = navigator.userAgent;\n const userAgentData = (navigator as NavigatorWithUserAgentData)\n .userAgentData;\n return {\n androidSdkVersion: null,\n deviceType: this.determineDeviceType(userAgent, userAgentData),\n iosVersion: null,\n isVirtual: false,\n manufacturer: 'unknown',\n model: 'unknown',\n name: null,\n operatingSystem: this.determineOperatingSystem(userAgent, userAgentData),\n osVersion: this.determineOsVersion(userAgent) ?? 'unknown',\n platform: 'web',\n totalMemory: null,\n usedMemory: null,\n webViewVersion: this.determineWebViewVersion(userAgent),\n };\n }\n\n async getUptime(): Promise<GetUptimeResult> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n private createIdentifier(): string {\n if (typeof crypto !== 'undefined' && 'randomUUID' in crypto) {\n return crypto.randomUUID();\n }\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(\n /[xy]/g,\n character => {\n const random = (Math.random() * 16) | 0;\n const value = character === 'x' ? random : (random & 0x3) | 0x8;\n return value.toString(16);\n },\n );\n }\n\n private determineDeviceType(\n userAgent: string,\n userAgentData?: UserAgentData,\n ): DeviceType {\n if (/TV|SmartTV|Tizen|Web0S|WebOS/i.test(userAgent)) {\n return 'tv';\n }\n if (/iPad/.test(userAgent)) {\n return 'tablet';\n }\n if (/Android/.test(userAgent) && !/Mobile/.test(userAgent)) {\n return 'tablet';\n }\n if (userAgentData?.mobile) {\n return 'phone';\n }\n if (/Mobile|iPhone|iPod/.test(userAgent)) {\n return 'phone';\n }\n return 'desktop';\n }\n\n private determineOperatingSystem(\n userAgent: string,\n userAgentData?: UserAgentData,\n ): OperatingSystem {\n const platform = userAgentData?.platform?.toLowerCase();\n if (platform) {\n if (platform.includes('win')) {\n return 'windows';\n }\n if (platform.includes('android')) {\n return 'android';\n }\n if (platform.includes('ios')) {\n return 'ios';\n }\n if (platform.includes('mac')) {\n return 'mac';\n }\n }\n if (/Windows/.test(userAgent)) {\n return 'windows';\n }\n if (/Android/.test(userAgent)) {\n return 'android';\n }\n if (/iPhone|iPad|iPod/.test(userAgent)) {\n return 'ios';\n }\n if (/Mac OS X/.test(userAgent)) {\n return 'mac';\n }\n return 'unknown';\n }\n\n private determineOsVersion(userAgent: string): string | null {\n const windowsMatch = /Windows NT ([0-9._]+)/.exec(userAgent);\n if (windowsMatch) {\n return windowsMatch[1];\n }\n const androidMatch = /Android ([0-9._]+)/.exec(userAgent);\n if (androidMatch) {\n return androidMatch[1];\n }\n const iosMatch = /OS ([0-9_]+) like Mac OS X/.exec(userAgent);\n if (iosMatch) {\n return iosMatch[1].replace(/_/g, '.');\n }\n const macMatch = /Mac OS X ([0-9_]+)/.exec(userAgent);\n if (macMatch) {\n return macMatch[1].replace(/_/g, '.');\n }\n return null;\n }\n\n private determineWebViewVersion(userAgent: string): string | null {\n const patterns = [\n /Edg\\/([0-9.]+)/,\n /Chrome\\/([0-9.]+)/,\n /Firefox\\/([0-9.]+)/,\n /Version\\/([0-9.]+).*Safari/,\n ];\n for (const pattern of patterns) {\n const match = pattern.exec(userAgent);\n if (match) {\n return match[1];\n }\n }\n return null;\n }\n}\n"]}
@@ -0,0 +1,144 @@
1
+ 'use strict';
2
+
3
+ var core = require('@capacitor/core');
4
+
5
+ const DeviceInfo = core.registerPlugin('DeviceInfo', {
6
+ web: () => Promise.resolve().then(function () { return web; }).then(m => new m.DeviceInfoWeb()),
7
+ });
8
+
9
+ class DeviceInfoWeb extends core.WebPlugin {
10
+ async getId() {
11
+ let identifier = window.localStorage.getItem(DeviceInfoWeb.identifierStorageKey);
12
+ if (!identifier) {
13
+ identifier = this.createIdentifier();
14
+ window.localStorage.setItem(DeviceInfoWeb.identifierStorageKey, identifier);
15
+ }
16
+ return { identifier };
17
+ }
18
+ async getInfo() {
19
+ var _a;
20
+ const userAgent = navigator.userAgent;
21
+ const userAgentData = navigator
22
+ .userAgentData;
23
+ return {
24
+ androidSdkVersion: null,
25
+ deviceType: this.determineDeviceType(userAgent, userAgentData),
26
+ iosVersion: null,
27
+ isVirtual: false,
28
+ manufacturer: 'unknown',
29
+ model: 'unknown',
30
+ name: null,
31
+ operatingSystem: this.determineOperatingSystem(userAgent, userAgentData),
32
+ osVersion: (_a = this.determineOsVersion(userAgent)) !== null && _a !== void 0 ? _a : 'unknown',
33
+ platform: 'web',
34
+ totalMemory: null,
35
+ usedMemory: null,
36
+ webViewVersion: this.determineWebViewVersion(userAgent),
37
+ };
38
+ }
39
+ async getUptime() {
40
+ throw this.unimplemented('Not implemented on web.');
41
+ }
42
+ createIdentifier() {
43
+ if (typeof crypto !== 'undefined' && 'randomUUID' in crypto) {
44
+ return crypto.randomUUID();
45
+ }
46
+ return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, character => {
47
+ const random = (Math.random() * 16) | 0;
48
+ const value = character === 'x' ? random : (random & 0x3) | 0x8;
49
+ return value.toString(16);
50
+ });
51
+ }
52
+ determineDeviceType(userAgent, userAgentData) {
53
+ if (/TV|SmartTV|Tizen|Web0S|WebOS/i.test(userAgent)) {
54
+ return 'tv';
55
+ }
56
+ if (/iPad/.test(userAgent)) {
57
+ return 'tablet';
58
+ }
59
+ if (/Android/.test(userAgent) && !/Mobile/.test(userAgent)) {
60
+ return 'tablet';
61
+ }
62
+ if (userAgentData === null || userAgentData === void 0 ? void 0 : userAgentData.mobile) {
63
+ return 'phone';
64
+ }
65
+ if (/Mobile|iPhone|iPod/.test(userAgent)) {
66
+ return 'phone';
67
+ }
68
+ return 'desktop';
69
+ }
70
+ determineOperatingSystem(userAgent, userAgentData) {
71
+ var _a;
72
+ const platform = (_a = userAgentData === null || userAgentData === void 0 ? void 0 : userAgentData.platform) === null || _a === void 0 ? void 0 : _a.toLowerCase();
73
+ if (platform) {
74
+ if (platform.includes('win')) {
75
+ return 'windows';
76
+ }
77
+ if (platform.includes('android')) {
78
+ return 'android';
79
+ }
80
+ if (platform.includes('ios')) {
81
+ return 'ios';
82
+ }
83
+ if (platform.includes('mac')) {
84
+ return 'mac';
85
+ }
86
+ }
87
+ if (/Windows/.test(userAgent)) {
88
+ return 'windows';
89
+ }
90
+ if (/Android/.test(userAgent)) {
91
+ return 'android';
92
+ }
93
+ if (/iPhone|iPad|iPod/.test(userAgent)) {
94
+ return 'ios';
95
+ }
96
+ if (/Mac OS X/.test(userAgent)) {
97
+ return 'mac';
98
+ }
99
+ return 'unknown';
100
+ }
101
+ determineOsVersion(userAgent) {
102
+ const windowsMatch = /Windows NT ([0-9._]+)/.exec(userAgent);
103
+ if (windowsMatch) {
104
+ return windowsMatch[1];
105
+ }
106
+ const androidMatch = /Android ([0-9._]+)/.exec(userAgent);
107
+ if (androidMatch) {
108
+ return androidMatch[1];
109
+ }
110
+ const iosMatch = /OS ([0-9_]+) like Mac OS X/.exec(userAgent);
111
+ if (iosMatch) {
112
+ return iosMatch[1].replace(/_/g, '.');
113
+ }
114
+ const macMatch = /Mac OS X ([0-9_]+)/.exec(userAgent);
115
+ if (macMatch) {
116
+ return macMatch[1].replace(/_/g, '.');
117
+ }
118
+ return null;
119
+ }
120
+ determineWebViewVersion(userAgent) {
121
+ const patterns = [
122
+ /Edg\/([0-9.]+)/,
123
+ /Chrome\/([0-9.]+)/,
124
+ /Firefox\/([0-9.]+)/,
125
+ /Version\/([0-9.]+).*Safari/,
126
+ ];
127
+ for (const pattern of patterns) {
128
+ const match = pattern.exec(userAgent);
129
+ if (match) {
130
+ return match[1];
131
+ }
132
+ }
133
+ return null;
134
+ }
135
+ }
136
+ DeviceInfoWeb.identifierStorageKey = 'capawesome-capacitor-device-info-id';
137
+
138
+ var web = /*#__PURE__*/Object.freeze({
139
+ __proto__: null,
140
+ DeviceInfoWeb: DeviceInfoWeb
141
+ });
142
+
143
+ exports.DeviceInfo = DeviceInfo;
144
+ //# sourceMappingURL=plugin.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst DeviceInfo = registerPlugin('DeviceInfo', {\n web: () => import('./web').then(m => new m.DeviceInfoWeb()),\n});\nexport * from './definitions';\nexport { DeviceInfo };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class DeviceInfoWeb extends WebPlugin {\n async getId() {\n let identifier = window.localStorage.getItem(DeviceInfoWeb.identifierStorageKey);\n if (!identifier) {\n identifier = this.createIdentifier();\n window.localStorage.setItem(DeviceInfoWeb.identifierStorageKey, identifier);\n }\n return { identifier };\n }\n async getInfo() {\n var _a;\n const userAgent = navigator.userAgent;\n const userAgentData = navigator\n .userAgentData;\n return {\n androidSdkVersion: null,\n deviceType: this.determineDeviceType(userAgent, userAgentData),\n iosVersion: null,\n isVirtual: false,\n manufacturer: 'unknown',\n model: 'unknown',\n name: null,\n operatingSystem: this.determineOperatingSystem(userAgent, userAgentData),\n osVersion: (_a = this.determineOsVersion(userAgent)) !== null && _a !== void 0 ? _a : 'unknown',\n platform: 'web',\n totalMemory: null,\n usedMemory: null,\n webViewVersion: this.determineWebViewVersion(userAgent),\n };\n }\n async getUptime() {\n throw this.unimplemented('Not implemented on web.');\n }\n createIdentifier() {\n if (typeof crypto !== 'undefined' && 'randomUUID' in crypto) {\n return crypto.randomUUID();\n }\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, character => {\n const random = (Math.random() * 16) | 0;\n const value = character === 'x' ? random : (random & 0x3) | 0x8;\n return value.toString(16);\n });\n }\n determineDeviceType(userAgent, userAgentData) {\n if (/TV|SmartTV|Tizen|Web0S|WebOS/i.test(userAgent)) {\n return 'tv';\n }\n if (/iPad/.test(userAgent)) {\n return 'tablet';\n }\n if (/Android/.test(userAgent) && !/Mobile/.test(userAgent)) {\n return 'tablet';\n }\n if (userAgentData === null || userAgentData === void 0 ? void 0 : userAgentData.mobile) {\n return 'phone';\n }\n if (/Mobile|iPhone|iPod/.test(userAgent)) {\n return 'phone';\n }\n return 'desktop';\n }\n determineOperatingSystem(userAgent, userAgentData) {\n var _a;\n const platform = (_a = userAgentData === null || userAgentData === void 0 ? void 0 : userAgentData.platform) === null || _a === void 0 ? void 0 : _a.toLowerCase();\n if (platform) {\n if (platform.includes('win')) {\n return 'windows';\n }\n if (platform.includes('android')) {\n return 'android';\n }\n if (platform.includes('ios')) {\n return 'ios';\n }\n if (platform.includes('mac')) {\n return 'mac';\n }\n }\n if (/Windows/.test(userAgent)) {\n return 'windows';\n }\n if (/Android/.test(userAgent)) {\n return 'android';\n }\n if (/iPhone|iPad|iPod/.test(userAgent)) {\n return 'ios';\n }\n if (/Mac OS X/.test(userAgent)) {\n return 'mac';\n }\n return 'unknown';\n }\n determineOsVersion(userAgent) {\n const windowsMatch = /Windows NT ([0-9._]+)/.exec(userAgent);\n if (windowsMatch) {\n return windowsMatch[1];\n }\n const androidMatch = /Android ([0-9._]+)/.exec(userAgent);\n if (androidMatch) {\n return androidMatch[1];\n }\n const iosMatch = /OS ([0-9_]+) like Mac OS X/.exec(userAgent);\n if (iosMatch) {\n return iosMatch[1].replace(/_/g, '.');\n }\n const macMatch = /Mac OS X ([0-9_]+)/.exec(userAgent);\n if (macMatch) {\n return macMatch[1].replace(/_/g, '.');\n }\n return null;\n }\n determineWebViewVersion(userAgent) {\n const patterns = [\n /Edg\\/([0-9.]+)/,\n /Chrome\\/([0-9.]+)/,\n /Firefox\\/([0-9.]+)/,\n /Version\\/([0-9.]+).*Safari/,\n ];\n for (const pattern of patterns) {\n const match = pattern.exec(userAgent);\n if (match) {\n return match[1];\n }\n }\n return null;\n }\n}\nDeviceInfoWeb.identifierStorageKey = 'capawesome-capacitor-device-info-id';\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,IAAI,IAAI,CAAC,CAAC,aAAa,EAAE,CAAC;AAC/D,CAAC;;ACFM,MAAM,aAAa,SAASC,cAAS,CAAC;AAC7C,IAAI,MAAM,KAAK,GAAG;AAClB,QAAQ,IAAI,UAAU,GAAG,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,aAAa,CAAC,oBAAoB,CAAC;AACxF,QAAQ,IAAI,CAAC,UAAU,EAAE;AACzB,YAAY,UAAU,GAAG,IAAI,CAAC,gBAAgB,EAAE;AAChD,YAAY,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,aAAa,CAAC,oBAAoB,EAAE,UAAU,CAAC;AACvF,QAAQ;AACR,QAAQ,OAAO,EAAE,UAAU,EAAE;AAC7B,IAAI;AACJ,IAAI,MAAM,OAAO,GAAG;AACpB,QAAQ,IAAI,EAAE;AACd,QAAQ,MAAM,SAAS,GAAG,SAAS,CAAC,SAAS;AAC7C,QAAQ,MAAM,aAAa,GAAG;AAC9B,aAAa,aAAa;AAC1B,QAAQ,OAAO;AACf,YAAY,iBAAiB,EAAE,IAAI;AACnC,YAAY,UAAU,EAAE,IAAI,CAAC,mBAAmB,CAAC,SAAS,EAAE,aAAa,CAAC;AAC1E,YAAY,UAAU,EAAE,IAAI;AAC5B,YAAY,SAAS,EAAE,KAAK;AAC5B,YAAY,YAAY,EAAE,SAAS;AACnC,YAAY,KAAK,EAAE,SAAS;AAC5B,YAAY,IAAI,EAAE,IAAI;AACtB,YAAY,eAAe,EAAE,IAAI,CAAC,wBAAwB,CAAC,SAAS,EAAE,aAAa,CAAC;AACpF,YAAY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