@amazon-devices/kepler-system-info 1.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.
Files changed (41) hide show
  1. package/LICENSE +7 -0
  2. package/README.md +183 -0
  3. package/SystemBundles/e16a93a86b5ba76c92a98cffc1104c3097bec849eda18c214a4ba641eba38698.bundle +1252 -0
  4. package/SystemBundles/e16a93a86b5ba76c92a98cffc1104c3097bec849eda18c214a4ba641eba38698.bundle.map +1 -0
  5. package/SystemModules/amzn__kepler-system-info-1.modules.txt +10 -0
  6. package/SystemModules/amzn__kepler-system-info-1.private.modules.txt +12 -0
  7. package/SystemModules/keplerscript-system-bundle-config.json +7 -0
  8. package/THIRD_PARTY_NOTICES.txt +5993 -0
  9. package/dist/SystemInfoModule.d.ts +34 -0
  10. package/dist/SystemInfoModule.js +52 -0
  11. package/dist/index.d.ts +7 -0
  12. package/dist/index.js +27 -0
  13. package/dist/kepler/tm-manifest.json +1 -0
  14. package/dist/turbo-modules/NativeSystemInfo.d.ts +18 -0
  15. package/dist/turbo-modules/NativeSystemInfo.js +4 -0
  16. package/dist/turbo-modules/interfaces/IBuildInfo.d.ts +55 -0
  17. package/dist/turbo-modules/interfaces/IBuildInfo.js +2 -0
  18. package/dist/turbo-modules/interfaces/IOperatingSystemInfo.d.ts +41 -0
  19. package/dist/turbo-modules/interfaces/IOperatingSystemInfo.js +2 -0
  20. package/dist/turbo-modules/interfaces/ISystemInfo.d.ts +25 -0
  21. package/dist/turbo-modules/interfaces/ISystemInfo.js +2 -0
  22. package/dist/turbo-modules/interfaces/index.d.ts +3 -0
  23. package/dist/turbo-modules/interfaces/index.js +2 -0
  24. package/dist/turbo-modules/types/BuildInfo.d.ts +10 -0
  25. package/dist/turbo-modules/types/BuildInfo.js +30 -0
  26. package/dist/turbo-modules/types/MonotonicDuration.d.ts +10 -0
  27. package/dist/turbo-modules/types/MonotonicDuration.js +14 -0
  28. package/dist/turbo-modules/types/OperatingSystemInfo.d.ts +8 -0
  29. package/dist/turbo-modules/types/OperatingSystemInfo.js +25 -0
  30. package/dist/turbo-modules/types/RawTimeValue.d.ts +8 -0
  31. package/dist/turbo-modules/types/RawTimeValue.js +14 -0
  32. package/dist/turbo-modules/types/RealTimeInstant.d.ts +10 -0
  33. package/dist/turbo-modules/types/RealTimeInstant.js +14 -0
  34. package/dist/turbo-modules/types/SystemInfo.d.ts +8 -0
  35. package/dist/turbo-modules/types/SystemInfo.js +22 -0
  36. package/dist/turbo-modules/types/index.d.ts +4 -0
  37. package/dist/turbo-modules/types/index.js +14 -0
  38. package/kepler-compatibility.json +6 -0
  39. package/kepler-transformed-package-info.json +3 -0
  40. package/package.json +1 -0
  41. package/react-native.config.js +17 -0
package/LICENSE ADDED
@@ -0,0 +1,7 @@
1
+ Copyright 2025 Amazon.com, Inc. or its affiliates. All rights reserved.
2
+
3
+ These materials are licensed as "Program Materials" under the Program Materials License Agreement (the "Agreement"). The Agreement is available at https://developer.amazon.com/support/legal/pml. See the Agreement for the specific terms and conditions of the Agreement. Capitalized terms not defined in this file have the meanings given to them in the Agreement.
4
+
5
+ If you do not agree to the above terms and conditions, you may not use any file in this package.
6
+
7
+ YOUR USE OF THE PROGRAM MATERIALS IN OR ASSOCIATED WITH THIS PACKAGE IS AT YOUR SOLE RISK. IN NO EVENT WILL AMAZON BE LIABLE FOR ANY DAMAGES, INCLUDING WITHOUT LIMITATION ANY DIRECT, INDIRECT, CONSEQUENTIAL, SPECIAL, INCIDENTAL, OR PUNITIVE DAMAGES (INCLUDING FOR ANY LOSS OF GOODWILL, BUSINESS INTERRUPTION, LOST PROFITS OR DATA, OR COMPUTER FAILURE OR MALFUNCTION) ARISING FROM OR RELATING TO SUCH PROGRAM MATERIALS, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, EVEN IF AMAZON HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS AND DISCLAIMERS APPLY EXCEPT TO THE EXTENT PROHIBITED BY APPLICABLE LAW.
package/README.md ADDED
@@ -0,0 +1,183 @@
1
+ # @amazon-devices/kepler-system-info
2
+
3
+ ## Overview
4
+
5
+ @amazon-devices/kepler-system-info provides SystemInfo API for querying basic system-level information about the running operating system instance, including system uptime, operating system details, and build information.
6
+
7
+ ## Getting Started
8
+
9
+ ### Installation
10
+
11
+ 1. Add the JavaScript library dependency in the `package.json` file:
12
+
13
+ ```json
14
+ "dependencies": {
15
+ ...
16
+ "@amazon-devices/kepler-system-info": "~0.0.1"
17
+ }
18
+ ```
19
+
20
+ 2. Regenerate the `package-lock.json` file using the `npm install` command.
21
+
22
+ ## Accessing {@link ISystemInfo} interface object
23
+
24
+ ```ts
25
+ import { SystemInfoModule } from '@amazon-devices/kepler-system-info';
26
+ import { ISystemInfo } from '@amazon-devices/kepler-system-info';
27
+ try {
28
+ let systemInfo = SystemInfoModule.getSystemInfo();
29
+ } catch (error) {
30
+ console.error(error);
31
+ }
32
+ ```
33
+
34
+ ### System Uptime
35
+
36
+ ```ts
37
+ import { MonotonicDuration } from '@amazon-devices/kepler-system-info';
38
+ import { RawTimeValue } from '@amazon-devices/kepler-system-info';
39
+
40
+ try {
41
+ let uptime = await systemInfo.getUptime();
42
+ console.log(
43
+ 'Uptime seconds: ',
44
+ uptime.time.seconds,
45
+ ' nanoseconds: ',
46
+ uptime.time.nanoseconds
47
+ );
48
+ } catch (error) {
49
+ console.error(error);
50
+ }
51
+ ```
52
+
53
+ ### Emulator
54
+
55
+ ```ts
56
+ try {
57
+ console.log('Is running in emulator: ', systemInfo.isEmulator());
58
+ } catch (error) {
59
+ console.error(error);
60
+ }
61
+ ```
62
+
63
+ ## Accessing {@link IOperatingSystemInfo} interface object
64
+
65
+ ```js
66
+ import { IOperatingSystemInfo } from '@amazon-devices/kepler-system-info';
67
+ try {
68
+ let osInfo = systemInfo.getOperatingSystemInfo();
69
+ } catch (error) {
70
+ console.error(error);
71
+ }
72
+ ```
73
+
74
+ ### OperatingSystem Display Name
75
+
76
+ ```ts
77
+ try {
78
+ console.log('OS display name: ', osInfo.getDisplayName());
79
+ } catch (error) {
80
+ console.error(error);
81
+ }
82
+ ```
83
+
84
+ ### OperatingSystem Codename
85
+
86
+ ```ts
87
+ try {
88
+ console.log('OS codename: ', osInfo.getCodeName());
89
+ } catch (error) {
90
+ console.error(error);
91
+ }
92
+ ```
93
+
94
+ ### OperatingSystem Version
95
+
96
+ ```ts
97
+ try {
98
+ console.log('OS version: ', osInfo.getVersion());
99
+ } catch (error) {
100
+ console.error(error);
101
+ }
102
+ ```
103
+
104
+ ## Accessing Operating System {@link IBuildInfo} interface object
105
+
106
+ ```ts
107
+ import { IBuildInfo } from '@amazon-devices/kepler-system-info';
108
+ try {
109
+ let buildInfo = osInfo.getBuildInfo();
110
+ } catch (error) {
111
+ console.error(error);
112
+ }
113
+ ```
114
+
115
+ ### OS Build Display Name
116
+
117
+ ```ts
118
+ try {
119
+ console.log('OS build display name: ', buildInfo.getDisplayName());
120
+ } catch (error) {
121
+ console.error(error);
122
+ }
123
+ ```
124
+
125
+ ### OS Build ID
126
+
127
+ ```ts
128
+ try {
129
+ console.log('OS build ID: ', buildInfo.getId());
130
+ } catch (error) {
131
+ console.error(error);
132
+ }
133
+ ```
134
+
135
+ ### OS Build Variant
136
+
137
+ ```ts
138
+ try {
139
+ console.log('OS build variant: ', buildInfo.getVariant());
140
+ } catch (error) {
141
+ console.error(error);
142
+ }
143
+ ```
144
+
145
+ ### OS Build Timestamp
146
+
147
+ ```ts
148
+ import { RealTimeInstant } from '@amazon-devices/kepler-system-info';
149
+ import { RawTimeValue } from '@amazon-devices/kepler-system-info';
150
+
151
+ try {
152
+ let timestamp = buildInfo.getTimestamp();
153
+ console.log(
154
+ 'OS build time seconds: ',
155
+ timestamp.time.seconds,
156
+ ' nanoseconds: ',
157
+ timestamp.time.nanoseconds
158
+ );
159
+ } catch (error) {
160
+ console.error(error);
161
+ }
162
+ ```
163
+
164
+ ### OS Build Tags
165
+
166
+ ```ts
167
+ try {
168
+ let tags = buildInfo.getTags();
169
+ console.log('OS build tags: ', JSON.stringify(tags));
170
+ } catch (error) {
171
+ console.error(error);
172
+ }
173
+ ```
174
+
175
+ ### OS Build Fingerprint
176
+
177
+ ```ts
178
+ try {
179
+ console.log('OS build fingerprint: ', buildInfo.getFingerprint());
180
+ } catch (error) {
181
+ console.error(error);
182
+ }
183
+ ```