@regulaforensics/idv 3.2.23-beta

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 (113) hide show
  1. package/README.md +36 -0
  2. package/RNIDV.podspec +21 -0
  3. package/android/CVDIDV.kt +48 -0
  4. package/android/build.gradle +41 -0
  5. package/android/cordova.gradle +20 -0
  6. package/android/src/main/java/com/regula/plugin/idv/JSONConstructor.kt +135 -0
  7. package/android/src/main/java/com/regula/plugin/idv/Main.kt +124 -0
  8. package/android/src/main/java/com/regula/plugin/idv/RNIDVModule.kt +71 -0
  9. package/android/src/main/java/com/regula/plugin/idv/Utils.kt +60 -0
  10. package/examples/capacitor/README.md +15 -0
  11. package/examples/capacitor/android/app/build.gradle +50 -0
  12. package/examples/capacitor/android/app/capacitor.build.gradle +22 -0
  13. package/examples/capacitor/android/app/proguard-rules.pro +21 -0
  14. package/examples/capacitor/android/app/src/main/AndroidManifest.xml +26 -0
  15. package/examples/capacitor/android/app/src/main/assets/Regula/.gitkeep +0 -0
  16. package/examples/capacitor/android/app/src/main/java/com/regula/example/idv/capacitor/MainActivity.java +5 -0
  17. package/examples/capacitor/android/app/src/main/res/drawable/ic_launcher.png +0 -0
  18. package/examples/capacitor/android/app/src/main/res/drawable/ic_launcher_foreground.png +0 -0
  19. package/examples/capacitor/android/app/src/main/res/drawable/ic_launcher_round.png +0 -0
  20. package/examples/capacitor/android/app/src/main/res/drawable/launcher.xml +4 -0
  21. package/examples/capacitor/android/app/src/main/res/drawable/launcher_round.xml +4 -0
  22. package/examples/capacitor/android/app/src/main/res/drawable/splash.png +0 -0
  23. package/examples/capacitor/android/app/src/main/res/layout/activity_main.xml +12 -0
  24. package/examples/capacitor/android/app/src/main/res/values/styles.xml +22 -0
  25. package/examples/capacitor/android/build.gradle +30 -0
  26. package/examples/capacitor/android/capacitor.settings.gradle +15 -0
  27. package/examples/capacitor/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  28. package/examples/capacitor/android/gradle/wrapper/gradle-wrapper.properties +7 -0
  29. package/examples/capacitor/android/gradle.properties +22 -0
  30. package/examples/capacitor/android/gradlew +252 -0
  31. package/examples/capacitor/android/gradlew.bat +94 -0
  32. package/examples/capacitor/android/settings.gradle +5 -0
  33. package/examples/capacitor/android/variables.gradle +16 -0
  34. package/examples/capacitor/index.html +5 -0
  35. package/examples/capacitor/index.tsx +16 -0
  36. package/examples/capacitor/ionic.config.json +7 -0
  37. package/examples/capacitor/ios/App/App/App.entitlements +10 -0
  38. package/examples/capacitor/ios/App/App/AppDelegate.swift +49 -0
  39. package/examples/capacitor/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png +0 -0
  40. package/examples/capacitor/ios/App/App/Assets.xcassets/AppIcon.appiconset/Contents.json +14 -0
  41. package/examples/capacitor/ios/App/App/Assets.xcassets/Contents.json +6 -0
  42. package/examples/capacitor/ios/App/App/Assets.xcassets/Splash.imageset/Contents.json +23 -0
  43. package/examples/capacitor/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-1.png +0 -0
  44. package/examples/capacitor/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-2.png +0 -0
  45. package/examples/capacitor/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732.png +0 -0
  46. package/examples/capacitor/ios/App/App/Base.lproj/LaunchScreen.storyboard +32 -0
  47. package/examples/capacitor/ios/App/App/Base.lproj/Main.storyboard +19 -0
  48. package/examples/capacitor/ios/App/App/Info.plist +65 -0
  49. package/examples/capacitor/ios/App/App.xcodeproj/project.pbxproj +414 -0
  50. package/examples/capacitor/ios/App/App.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  51. package/examples/capacitor/ios/App/App.xcworkspace/contents.xcworkspacedata +10 -0
  52. package/examples/capacitor/ios/App/App.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  53. package/examples/capacitor/ios/App/Podfile +26 -0
  54. package/examples/capacitor/package.json +27 -0
  55. package/examples/capacitor/public/assets/.gitkeep +0 -0
  56. package/examples/capacitor/scripts/android.sh +9 -0
  57. package/examples/capacitor/scripts/ios.sh +8 -0
  58. package/examples/capacitor/scripts/setup.sh +14 -0
  59. package/examples/capacitor/src/main.css +148 -0
  60. package/examples/capacitor/src/main.html +38 -0
  61. package/examples/capacitor/src/main.tsx +10 -0
  62. package/examples/capacitor/tsconfig.json +5 -0
  63. package/examples/capacitor/vite.config.ts +17 -0
  64. package/examples/ionic/README.md +15 -0
  65. package/examples/ionic/angular.json +39 -0
  66. package/examples/ionic/assets/.gitkeep +0 -0
  67. package/examples/ionic/config.xml +59 -0
  68. package/examples/ionic/images/icon.png +0 -0
  69. package/examples/ionic/index.html +19 -0
  70. package/examples/ionic/index.tsx +28 -0
  71. package/examples/ionic/ionic.config.json +7 -0
  72. package/examples/ionic/package.json +46 -0
  73. package/examples/ionic/scripts/android.sh +8 -0
  74. package/examples/ionic/scripts/ios.sh +8 -0
  75. package/examples/ionic/scripts/setup.sh +8 -0
  76. package/examples/ionic/src/main.css +148 -0
  77. package/examples/ionic/src/main.html +38 -0
  78. package/examples/ionic/src/main.tsx +10 -0
  79. package/examples/ionic/tsconfig.json +14 -0
  80. package/examples/react_native/README.md +15 -0
  81. package/examples/react_native/app.config.ts +46 -0
  82. package/examples/react_native/assets/.gitkeep +0 -0
  83. package/examples/react_native/images/icon.png +0 -0
  84. package/examples/react_native/index.html +11 -0
  85. package/examples/react_native/index.tsx +63 -0
  86. package/examples/react_native/metro.config.js +7 -0
  87. package/examples/react_native/package.json +29 -0
  88. package/examples/react_native/scripts/android.sh +13 -0
  89. package/examples/react_native/scripts/ios.sh +12 -0
  90. package/examples/react_native/scripts/setup.sh +9 -0
  91. package/examples/react_native/src/main.css +148 -0
  92. package/examples/react_native/src/main.html +38 -0
  93. package/examples/react_native/src/main.tsx +10 -0
  94. package/ios/CVDIDV.swift +72 -0
  95. package/ios/FlutterIDVPlugin.swift +72 -0
  96. package/ios/JSONConstructor.swift +134 -0
  97. package/ios/Main.swift +89 -0
  98. package/ios/RNIDV.swift +72 -0
  99. package/ios/Utils.swift +56 -0
  100. package/package.json +38 -0
  101. package/plugin.xml +45 -0
  102. package/test/json.tsx +0 -0
  103. package/test/package-lock.json +584 -0
  104. package/test/package.json +9 -0
  105. package/test/test.tsx +3 -0
  106. package/test/utils.tsx +38 -0
  107. package/www/capacitor/index.js +6 -0
  108. package/www/capacitor/internal/bridge.js +19 -0
  109. package/www/capacitor/internal/cordova.js +17 -0
  110. package/www/cordova.js +150 -0
  111. package/www/react-native/index.js +6 -0
  112. package/www/react-native/internal/bridge.js +19 -0
  113. package/www/types/index.d.ts +12 -0
@@ -0,0 +1,584 @@
1
+ {
2
+ "name": "test-runner",
3
+ "lockfileVersion": 3,
4
+ "requires": true,
5
+ "packages": {
6
+ "": {
7
+ "name": "test-runner",
8
+ "devDependencies": {
9
+ "@regulaforensics/idv": "file:../",
10
+ "@types/node": "24.3.0",
11
+ "tsx": "4.20.4"
12
+ }
13
+ },
14
+ "..": {
15
+ "name": "@regulaforensics/idv",
16
+ "version": "3.2.23-beta",
17
+ "dev": true,
18
+ "license": "commercial"
19
+ },
20
+ "node_modules/@esbuild/aix-ppc64": {
21
+ "version": "0.25.9",
22
+ "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.9.tgz",
23
+ "integrity": "sha512-OaGtL73Jck6pBKjNIe24BnFE6agGl+6KxDtTfHhy1HmhthfKouEcOhqpSL64K4/0WCtbKFLOdzD/44cJ4k9opA==",
24
+ "cpu": [
25
+ "ppc64"
26
+ ],
27
+ "dev": true,
28
+ "license": "MIT",
29
+ "optional": true,
30
+ "os": [
31
+ "aix"
32
+ ],
33
+ "engines": {
34
+ "node": ">=18"
35
+ }
36
+ },
37
+ "node_modules/@esbuild/android-arm": {
38
+ "version": "0.25.9",
39
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.9.tgz",
40
+ "integrity": "sha512-5WNI1DaMtxQ7t7B6xa572XMXpHAaI/9Hnhk8lcxF4zVN4xstUgTlvuGDorBguKEnZO70qwEcLpfifMLoxiPqHQ==",
41
+ "cpu": [
42
+ "arm"
43
+ ],
44
+ "dev": true,
45
+ "license": "MIT",
46
+ "optional": true,
47
+ "os": [
48
+ "android"
49
+ ],
50
+ "engines": {
51
+ "node": ">=18"
52
+ }
53
+ },
54
+ "node_modules/@esbuild/android-arm64": {
55
+ "version": "0.25.9",
56
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.9.tgz",
57
+ "integrity": "sha512-IDrddSmpSv51ftWslJMvl3Q2ZT98fUSL2/rlUXuVqRXHCs5EUF1/f+jbjF5+NG9UffUDMCiTyh8iec7u8RlTLg==",
58
+ "cpu": [
59
+ "arm64"
60
+ ],
61
+ "dev": true,
62
+ "license": "MIT",
63
+ "optional": true,
64
+ "os": [
65
+ "android"
66
+ ],
67
+ "engines": {
68
+ "node": ">=18"
69
+ }
70
+ },
71
+ "node_modules/@esbuild/android-x64": {
72
+ "version": "0.25.9",
73
+ "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.9.tgz",
74
+ "integrity": "sha512-I853iMZ1hWZdNllhVZKm34f4wErd4lMyeV7BLzEExGEIZYsOzqDWDf+y082izYUE8gtJnYHdeDpN/6tUdwvfiw==",
75
+ "cpu": [
76
+ "x64"
77
+ ],
78
+ "dev": true,
79
+ "license": "MIT",
80
+ "optional": true,
81
+ "os": [
82
+ "android"
83
+ ],
84
+ "engines": {
85
+ "node": ">=18"
86
+ }
87
+ },
88
+ "node_modules/@esbuild/darwin-arm64": {
89
+ "version": "0.25.9",
90
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.9.tgz",
91
+ "integrity": "sha512-XIpIDMAjOELi/9PB30vEbVMs3GV1v2zkkPnuyRRURbhqjyzIINwj+nbQATh4H9GxUgH1kFsEyQMxwiLFKUS6Rg==",
92
+ "cpu": [
93
+ "arm64"
94
+ ],
95
+ "dev": true,
96
+ "license": "MIT",
97
+ "optional": true,
98
+ "os": [
99
+ "darwin"
100
+ ],
101
+ "engines": {
102
+ "node": ">=18"
103
+ }
104
+ },
105
+ "node_modules/@esbuild/darwin-x64": {
106
+ "version": "0.25.9",
107
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.9.tgz",
108
+ "integrity": "sha512-jhHfBzjYTA1IQu8VyrjCX4ApJDnH+ez+IYVEoJHeqJm9VhG9Dh2BYaJritkYK3vMaXrf7Ogr/0MQ8/MeIefsPQ==",
109
+ "cpu": [
110
+ "x64"
111
+ ],
112
+ "dev": true,
113
+ "license": "MIT",
114
+ "optional": true,
115
+ "os": [
116
+ "darwin"
117
+ ],
118
+ "engines": {
119
+ "node": ">=18"
120
+ }
121
+ },
122
+ "node_modules/@esbuild/freebsd-arm64": {
123
+ "version": "0.25.9",
124
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.9.tgz",
125
+ "integrity": "sha512-z93DmbnY6fX9+KdD4Ue/H6sYs+bhFQJNCPZsi4XWJoYblUqT06MQUdBCpcSfuiN72AbqeBFu5LVQTjfXDE2A6Q==",
126
+ "cpu": [
127
+ "arm64"
128
+ ],
129
+ "dev": true,
130
+ "license": "MIT",
131
+ "optional": true,
132
+ "os": [
133
+ "freebsd"
134
+ ],
135
+ "engines": {
136
+ "node": ">=18"
137
+ }
138
+ },
139
+ "node_modules/@esbuild/freebsd-x64": {
140
+ "version": "0.25.9",
141
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.9.tgz",
142
+ "integrity": "sha512-mrKX6H/vOyo5v71YfXWJxLVxgy1kyt1MQaD8wZJgJfG4gq4DpQGpgTB74e5yBeQdyMTbgxp0YtNj7NuHN0PoZg==",
143
+ "cpu": [
144
+ "x64"
145
+ ],
146
+ "dev": true,
147
+ "license": "MIT",
148
+ "optional": true,
149
+ "os": [
150
+ "freebsd"
151
+ ],
152
+ "engines": {
153
+ "node": ">=18"
154
+ }
155
+ },
156
+ "node_modules/@esbuild/linux-arm": {
157
+ "version": "0.25.9",
158
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.9.tgz",
159
+ "integrity": "sha512-HBU2Xv78SMgaydBmdor38lg8YDnFKSARg1Q6AT0/y2ezUAKiZvc211RDFHlEZRFNRVhcMamiToo7bDx3VEOYQw==",
160
+ "cpu": [
161
+ "arm"
162
+ ],
163
+ "dev": true,
164
+ "license": "MIT",
165
+ "optional": true,
166
+ "os": [
167
+ "linux"
168
+ ],
169
+ "engines": {
170
+ "node": ">=18"
171
+ }
172
+ },
173
+ "node_modules/@esbuild/linux-arm64": {
174
+ "version": "0.25.9",
175
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.9.tgz",
176
+ "integrity": "sha512-BlB7bIcLT3G26urh5Dmse7fiLmLXnRlopw4s8DalgZ8ef79Jj4aUcYbk90g8iCa2467HX8SAIidbL7gsqXHdRw==",
177
+ "cpu": [
178
+ "arm64"
179
+ ],
180
+ "dev": true,
181
+ "license": "MIT",
182
+ "optional": true,
183
+ "os": [
184
+ "linux"
185
+ ],
186
+ "engines": {
187
+ "node": ">=18"
188
+ }
189
+ },
190
+ "node_modules/@esbuild/linux-ia32": {
191
+ "version": "0.25.9",
192
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.9.tgz",
193
+ "integrity": "sha512-e7S3MOJPZGp2QW6AK6+Ly81rC7oOSerQ+P8L0ta4FhVi+/j/v2yZzx5CqqDaWjtPFfYz21Vi1S0auHrap3Ma3A==",
194
+ "cpu": [
195
+ "ia32"
196
+ ],
197
+ "dev": true,
198
+ "license": "MIT",
199
+ "optional": true,
200
+ "os": [
201
+ "linux"
202
+ ],
203
+ "engines": {
204
+ "node": ">=18"
205
+ }
206
+ },
207
+ "node_modules/@esbuild/linux-loong64": {
208
+ "version": "0.25.9",
209
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.9.tgz",
210
+ "integrity": "sha512-Sbe10Bnn0oUAB2AalYztvGcK+o6YFFA/9829PhOCUS9vkJElXGdphz0A3DbMdP8gmKkqPmPcMJmJOrI3VYB1JQ==",
211
+ "cpu": [
212
+ "loong64"
213
+ ],
214
+ "dev": true,
215
+ "license": "MIT",
216
+ "optional": true,
217
+ "os": [
218
+ "linux"
219
+ ],
220
+ "engines": {
221
+ "node": ">=18"
222
+ }
223
+ },
224
+ "node_modules/@esbuild/linux-mips64el": {
225
+ "version": "0.25.9",
226
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.9.tgz",
227
+ "integrity": "sha512-YcM5br0mVyZw2jcQeLIkhWtKPeVfAerES5PvOzaDxVtIyZ2NUBZKNLjC5z3/fUlDgT6w89VsxP2qzNipOaaDyA==",
228
+ "cpu": [
229
+ "mips64el"
230
+ ],
231
+ "dev": true,
232
+ "license": "MIT",
233
+ "optional": true,
234
+ "os": [
235
+ "linux"
236
+ ],
237
+ "engines": {
238
+ "node": ">=18"
239
+ }
240
+ },
241
+ "node_modules/@esbuild/linux-ppc64": {
242
+ "version": "0.25.9",
243
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.9.tgz",
244
+ "integrity": "sha512-++0HQvasdo20JytyDpFvQtNrEsAgNG2CY1CLMwGXfFTKGBGQT3bOeLSYE2l1fYdvML5KUuwn9Z8L1EWe2tzs1w==",
245
+ "cpu": [
246
+ "ppc64"
247
+ ],
248
+ "dev": true,
249
+ "license": "MIT",
250
+ "optional": true,
251
+ "os": [
252
+ "linux"
253
+ ],
254
+ "engines": {
255
+ "node": ">=18"
256
+ }
257
+ },
258
+ "node_modules/@esbuild/linux-riscv64": {
259
+ "version": "0.25.9",
260
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.9.tgz",
261
+ "integrity": "sha512-uNIBa279Y3fkjV+2cUjx36xkx7eSjb8IvnL01eXUKXez/CBHNRw5ekCGMPM0BcmqBxBcdgUWuUXmVWwm4CH9kg==",
262
+ "cpu": [
263
+ "riscv64"
264
+ ],
265
+ "dev": true,
266
+ "license": "MIT",
267
+ "optional": true,
268
+ "os": [
269
+ "linux"
270
+ ],
271
+ "engines": {
272
+ "node": ">=18"
273
+ }
274
+ },
275
+ "node_modules/@esbuild/linux-s390x": {
276
+ "version": "0.25.9",
277
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.9.tgz",
278
+ "integrity": "sha512-Mfiphvp3MjC/lctb+7D287Xw1DGzqJPb/J2aHHcHxflUo+8tmN/6d4k6I2yFR7BVo5/g7x2Monq4+Yew0EHRIA==",
279
+ "cpu": [
280
+ "s390x"
281
+ ],
282
+ "dev": true,
283
+ "license": "MIT",
284
+ "optional": true,
285
+ "os": [
286
+ "linux"
287
+ ],
288
+ "engines": {
289
+ "node": ">=18"
290
+ }
291
+ },
292
+ "node_modules/@esbuild/linux-x64": {
293
+ "version": "0.25.9",
294
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.9.tgz",
295
+ "integrity": "sha512-iSwByxzRe48YVkmpbgoxVzn76BXjlYFXC7NvLYq+b+kDjyyk30J0JY47DIn8z1MO3K0oSl9fZoRmZPQI4Hklzg==",
296
+ "cpu": [
297
+ "x64"
298
+ ],
299
+ "dev": true,
300
+ "license": "MIT",
301
+ "optional": true,
302
+ "os": [
303
+ "linux"
304
+ ],
305
+ "engines": {
306
+ "node": ">=18"
307
+ }
308
+ },
309
+ "node_modules/@esbuild/netbsd-arm64": {
310
+ "version": "0.25.9",
311
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.9.tgz",
312
+ "integrity": "sha512-9jNJl6FqaUG+COdQMjSCGW4QiMHH88xWbvZ+kRVblZsWrkXlABuGdFJ1E9L7HK+T0Yqd4akKNa/lO0+jDxQD4Q==",
313
+ "cpu": [
314
+ "arm64"
315
+ ],
316
+ "dev": true,
317
+ "license": "MIT",
318
+ "optional": true,
319
+ "os": [
320
+ "netbsd"
321
+ ],
322
+ "engines": {
323
+ "node": ">=18"
324
+ }
325
+ },
326
+ "node_modules/@esbuild/netbsd-x64": {
327
+ "version": "0.25.9",
328
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.9.tgz",
329
+ "integrity": "sha512-RLLdkflmqRG8KanPGOU7Rpg829ZHu8nFy5Pqdi9U01VYtG9Y0zOG6Vr2z4/S+/3zIyOxiK6cCeYNWOFR9QP87g==",
330
+ "cpu": [
331
+ "x64"
332
+ ],
333
+ "dev": true,
334
+ "license": "MIT",
335
+ "optional": true,
336
+ "os": [
337
+ "netbsd"
338
+ ],
339
+ "engines": {
340
+ "node": ">=18"
341
+ }
342
+ },
343
+ "node_modules/@esbuild/openbsd-arm64": {
344
+ "version": "0.25.9",
345
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.9.tgz",
346
+ "integrity": "sha512-YaFBlPGeDasft5IIM+CQAhJAqS3St3nJzDEgsgFixcfZeyGPCd6eJBWzke5piZuZ7CtL656eOSYKk4Ls2C0FRQ==",
347
+ "cpu": [
348
+ "arm64"
349
+ ],
350
+ "dev": true,
351
+ "license": "MIT",
352
+ "optional": true,
353
+ "os": [
354
+ "openbsd"
355
+ ],
356
+ "engines": {
357
+ "node": ">=18"
358
+ }
359
+ },
360
+ "node_modules/@esbuild/openbsd-x64": {
361
+ "version": "0.25.9",
362
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.9.tgz",
363
+ "integrity": "sha512-1MkgTCuvMGWuqVtAvkpkXFmtL8XhWy+j4jaSO2wxfJtilVCi0ZE37b8uOdMItIHz4I6z1bWWtEX4CJwcKYLcuA==",
364
+ "cpu": [
365
+ "x64"
366
+ ],
367
+ "dev": true,
368
+ "license": "MIT",
369
+ "optional": true,
370
+ "os": [
371
+ "openbsd"
372
+ ],
373
+ "engines": {
374
+ "node": ">=18"
375
+ }
376
+ },
377
+ "node_modules/@esbuild/openharmony-arm64": {
378
+ "version": "0.25.9",
379
+ "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.9.tgz",
380
+ "integrity": "sha512-4Xd0xNiMVXKh6Fa7HEJQbrpP3m3DDn43jKxMjxLLRjWnRsfxjORYJlXPO4JNcXtOyfajXorRKY9NkOpTHptErg==",
381
+ "cpu": [
382
+ "arm64"
383
+ ],
384
+ "dev": true,
385
+ "license": "MIT",
386
+ "optional": true,
387
+ "os": [
388
+ "openharmony"
389
+ ],
390
+ "engines": {
391
+ "node": ">=18"
392
+ }
393
+ },
394
+ "node_modules/@esbuild/sunos-x64": {
395
+ "version": "0.25.9",
396
+ "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.9.tgz",
397
+ "integrity": "sha512-WjH4s6hzo00nNezhp3wFIAfmGZ8U7KtrJNlFMRKxiI9mxEK1scOMAaa9i4crUtu+tBr+0IN6JCuAcSBJZfnphw==",
398
+ "cpu": [
399
+ "x64"
400
+ ],
401
+ "dev": true,
402
+ "license": "MIT",
403
+ "optional": true,
404
+ "os": [
405
+ "sunos"
406
+ ],
407
+ "engines": {
408
+ "node": ">=18"
409
+ }
410
+ },
411
+ "node_modules/@esbuild/win32-arm64": {
412
+ "version": "0.25.9",
413
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.9.tgz",
414
+ "integrity": "sha512-mGFrVJHmZiRqmP8xFOc6b84/7xa5y5YvR1x8djzXpJBSv/UsNK6aqec+6JDjConTgvvQefdGhFDAs2DLAds6gQ==",
415
+ "cpu": [
416
+ "arm64"
417
+ ],
418
+ "dev": true,
419
+ "license": "MIT",
420
+ "optional": true,
421
+ "os": [
422
+ "win32"
423
+ ],
424
+ "engines": {
425
+ "node": ">=18"
426
+ }
427
+ },
428
+ "node_modules/@esbuild/win32-ia32": {
429
+ "version": "0.25.9",
430
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.9.tgz",
431
+ "integrity": "sha512-b33gLVU2k11nVx1OhX3C8QQP6UHQK4ZtN56oFWvVXvz2VkDoe6fbG8TOgHFxEvqeqohmRnIHe5A1+HADk4OQww==",
432
+ "cpu": [
433
+ "ia32"
434
+ ],
435
+ "dev": true,
436
+ "license": "MIT",
437
+ "optional": true,
438
+ "os": [
439
+ "win32"
440
+ ],
441
+ "engines": {
442
+ "node": ">=18"
443
+ }
444
+ },
445
+ "node_modules/@esbuild/win32-x64": {
446
+ "version": "0.25.9",
447
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.9.tgz",
448
+ "integrity": "sha512-PPOl1mi6lpLNQxnGoyAfschAodRFYXJ+9fs6WHXz7CSWKbOqiMZsubC+BQsVKuul+3vKLuwTHsS2c2y9EoKwxQ==",
449
+ "cpu": [
450
+ "x64"
451
+ ],
452
+ "dev": true,
453
+ "license": "MIT",
454
+ "optional": true,
455
+ "os": [
456
+ "win32"
457
+ ],
458
+ "engines": {
459
+ "node": ">=18"
460
+ }
461
+ },
462
+ "node_modules/@regulaforensics/idv": {
463
+ "resolved": "..",
464
+ "link": true
465
+ },
466
+ "node_modules/@types/node": {
467
+ "version": "24.3.0",
468
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-24.3.0.tgz",
469
+ "integrity": "sha512-aPTXCrfwnDLj4VvXrm+UUCQjNEvJgNA8s5F1cvwQU+3KNltTOkBm1j30uNLyqqPNe7gE3KFzImYoZEfLhp4Yow==",
470
+ "dev": true,
471
+ "license": "MIT",
472
+ "dependencies": {
473
+ "undici-types": "~7.10.0"
474
+ }
475
+ },
476
+ "node_modules/esbuild": {
477
+ "version": "0.25.9",
478
+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.9.tgz",
479
+ "integrity": "sha512-CRbODhYyQx3qp7ZEwzxOk4JBqmD/seJrzPa/cGjY1VtIn5E09Oi9/dB4JwctnfZ8Q8iT7rioVv5k/FNT/uf54g==",
480
+ "dev": true,
481
+ "hasInstallScript": true,
482
+ "license": "MIT",
483
+ "bin": {
484
+ "esbuild": "bin/esbuild"
485
+ },
486
+ "engines": {
487
+ "node": ">=18"
488
+ },
489
+ "optionalDependencies": {
490
+ "@esbuild/aix-ppc64": "0.25.9",
491
+ "@esbuild/android-arm": "0.25.9",
492
+ "@esbuild/android-arm64": "0.25.9",
493
+ "@esbuild/android-x64": "0.25.9",
494
+ "@esbuild/darwin-arm64": "0.25.9",
495
+ "@esbuild/darwin-x64": "0.25.9",
496
+ "@esbuild/freebsd-arm64": "0.25.9",
497
+ "@esbuild/freebsd-x64": "0.25.9",
498
+ "@esbuild/linux-arm": "0.25.9",
499
+ "@esbuild/linux-arm64": "0.25.9",
500
+ "@esbuild/linux-ia32": "0.25.9",
501
+ "@esbuild/linux-loong64": "0.25.9",
502
+ "@esbuild/linux-mips64el": "0.25.9",
503
+ "@esbuild/linux-ppc64": "0.25.9",
504
+ "@esbuild/linux-riscv64": "0.25.9",
505
+ "@esbuild/linux-s390x": "0.25.9",
506
+ "@esbuild/linux-x64": "0.25.9",
507
+ "@esbuild/netbsd-arm64": "0.25.9",
508
+ "@esbuild/netbsd-x64": "0.25.9",
509
+ "@esbuild/openbsd-arm64": "0.25.9",
510
+ "@esbuild/openbsd-x64": "0.25.9",
511
+ "@esbuild/openharmony-arm64": "0.25.9",
512
+ "@esbuild/sunos-x64": "0.25.9",
513
+ "@esbuild/win32-arm64": "0.25.9",
514
+ "@esbuild/win32-ia32": "0.25.9",
515
+ "@esbuild/win32-x64": "0.25.9"
516
+ }
517
+ },
518
+ "node_modules/fsevents": {
519
+ "version": "2.3.3",
520
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
521
+ "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
522
+ "dev": true,
523
+ "hasInstallScript": true,
524
+ "license": "MIT",
525
+ "optional": true,
526
+ "os": [
527
+ "darwin"
528
+ ],
529
+ "engines": {
530
+ "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
531
+ }
532
+ },
533
+ "node_modules/get-tsconfig": {
534
+ "version": "4.10.1",
535
+ "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.10.1.tgz",
536
+ "integrity": "sha512-auHyJ4AgMz7vgS8Hp3N6HXSmlMdUyhSUrfBF16w153rxtLIEOE+HGqaBppczZvnHLqQJfiHotCYpNhl0lUROFQ==",
537
+ "dev": true,
538
+ "license": "MIT",
539
+ "dependencies": {
540
+ "resolve-pkg-maps": "^1.0.0"
541
+ },
542
+ "funding": {
543
+ "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1"
544
+ }
545
+ },
546
+ "node_modules/resolve-pkg-maps": {
547
+ "version": "1.0.0",
548
+ "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz",
549
+ "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==",
550
+ "dev": true,
551
+ "license": "MIT",
552
+ "funding": {
553
+ "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1"
554
+ }
555
+ },
556
+ "node_modules/tsx": {
557
+ "version": "4.20.4",
558
+ "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.20.4.tgz",
559
+ "integrity": "sha512-yyxBKfORQ7LuRt/BQKBXrpcq59ZvSW0XxwfjAt3w2/8PmdxaFzijtMhTawprSHhpzeM5BgU2hXHG3lklIERZXg==",
560
+ "dev": true,
561
+ "license": "MIT",
562
+ "dependencies": {
563
+ "esbuild": "~0.25.0",
564
+ "get-tsconfig": "^4.7.5"
565
+ },
566
+ "bin": {
567
+ "tsx": "dist/cli.mjs"
568
+ },
569
+ "engines": {
570
+ "node": ">=18.0.0"
571
+ },
572
+ "optionalDependencies": {
573
+ "fsevents": "~2.3.3"
574
+ }
575
+ },
576
+ "node_modules/undici-types": {
577
+ "version": "7.10.0",
578
+ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.10.0.tgz",
579
+ "integrity": "sha512-t5Fy/nfn+14LuOc2KNYg75vZqClpAiqscVvMygNnlsHBFpSXdJaYtXMcdNLpl/Qvc3P2cB3s6lOV51nqsFq4ag==",
580
+ "dev": true,
581
+ "license": "MIT"
582
+ }
583
+ }
584
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "test-runner",
3
+ "type": "module",
4
+ "devDependencies": {
5
+ "@regulaforensics/idv": "file:../",
6
+ "@types/node": "24.3.0",
7
+ "tsx": "4.20.4"
8
+ }
9
+ }
package/test/test.tsx ADDED
@@ -0,0 +1,3 @@
1
+ import { compare } from './utils'
2
+ import { } from '@regulaforensics/idv'
3
+ import { } from './json'
package/test/utils.tsx ADDED
@@ -0,0 +1,38 @@
1
+ import test from 'node:test'
2
+ import * as assert from 'assert'
3
+
4
+ export function compare(
5
+ name: string,
6
+ json: Record<string, any>,
7
+ fromJson: (json: Record<string, any>) => any,
8
+ skip?: string[],
9
+ ) {
10
+ test(name, () => {
11
+ var actual = removeUndefineds(fromJson(json).toJson())
12
+ if (skip) for (const item of skip) delete actual[item]
13
+ assert.deepEqual(actual, json)
14
+ })
15
+ }
16
+
17
+ function removeUndefineds(input) {
18
+ const isPlainObject = obj => Object.prototype.toString.call(obj) === '[object Object]';
19
+
20
+ if (input === undefined) return undefined;
21
+ if (input === null || typeof input !== 'object') return input;
22
+
23
+ if (Array.isArray(input)) {
24
+ return input
25
+ .map(item => removeUndefineds(item))
26
+ .filter(item => item !== undefined);
27
+ }
28
+
29
+ if (!isPlainObject(input)) return input;
30
+
31
+ const result = {};
32
+ for (const [key, value] of Object.entries(input)) {
33
+ if (value === undefined) continue;
34
+ const cleaned = removeUndefineds(value);
35
+ if (cleaned !== undefined) result[key] = cleaned;
36
+ }
37
+ return result;
38
+ }
@@ -0,0 +1,6 @@
1
+ import { exec } from './internal/bridge'
2
+
3
+ export class IDV {
4
+ static get instance() { return IDV._instance }
5
+ static _instance = new IDV()
6
+ }
@@ -0,0 +1,19 @@
1
+ import { NativeModules, NativeEventEmitter } from './cordova'
2
+
3
+ const { RNIDV } = NativeModules
4
+ var eventManager = new NativeEventEmitter(RNIDV)
5
+
6
+ export async function exec(name, params) {
7
+ return RNIDV.exec(name, params)
8
+ }
9
+
10
+ function _setEvent(id, completion, fromJson) {
11
+ eventManager.removeAllListeners(id)
12
+ if (completion == null) return
13
+ if (fromJson == null) eventManager.addListener(id, completion)
14
+ else eventManager.addListener(id, data => {
15
+ data = fromJson(data)
16
+ if (data !== null && typeof data[Symbol.iterator] === 'function') completion(...data)
17
+ else completion(data)
18
+ })
19
+ }
@@ -0,0 +1,17 @@
1
+ var _exec = (completion, params) => cordova.exec(completion, null, "IDV", "exec", params)
2
+
3
+ export const NativeModules = {
4
+ RNIDV: {
5
+ exec: async (name, params) => new Promise((resolve, _) => _exec(data => resolve(data), [name, ...params]))
6
+ }
7
+ }
8
+
9
+ export class NativeEventEmitter {
10
+ addListener(id, completion) {
11
+ _exec(completion, ["setEvent", id])
12
+ }
13
+
14
+ removeAllListeners(id) {
15
+ _exec(null, ["setEvent", id])
16
+ }
17
+ }