@regulaforensics/idv 3.10.277-rc → 3.10.278-nightly

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.
@@ -7,11 +7,11 @@
7
7
  "postinstall": "patch-package"
8
8
  },
9
9
  "dependencies": {
10
- "@regulaforensics/idv": "3.10.277-rc",
11
- "@regulaforensics/idv-module-document-reader": "3.10.409-rc",
12
- "@regulaforensics/idv-module-face": "3.10.410-rc",
13
- "@regulaforensics/document-reader-core-fullauthrfid": "9.10.3459-rc",
14
- "@regulaforensics/face-core-basic": "8.5.909-rc",
10
+ "@regulaforensics/idv": "3.10.278-nightly",
11
+ "@regulaforensics/idv-module-document-reader": "3.10.411-nightly",
12
+ "@regulaforensics/idv-module-face": "3.10.412-nightly",
13
+ "@regulaforensics/document-reader-core-fullauthrfid": "9.10.3444-nightly",
14
+ "@regulaforensics/face-core-basic": "8.5.916-nightly",
15
15
  "@angular-devkit/build-angular": "^22.1.8",
16
16
  "@angular/cli": "^22.1.8",
17
17
  "@angular/common": "^22.1.7",
@@ -20,11 +20,14 @@
20
20
  "@angular/forms": "^22.1.7",
21
21
  "@angular/platform-browser-dynamic": "^22.1.7",
22
22
  "@angular/router": "^22.1.7",
23
+ "@ionic/cli": "^7.2.1",
23
24
  "@ionic/angular": "^9.0.4",
24
25
  "@ionic/cordova-builders": "^13.0.0",
26
+ "cordova": "^13.0.0",
25
27
  "cordova-android": "^15.1.0",
26
28
  "cordova-ios": "^8.1.1",
27
29
  "cordova-plugin-ionic-webview": "^5.0.1",
30
+ "native-run": "^2.0.3",
28
31
  "patch-package": "^8.0.1",
29
32
  "@angular/compiler": "^22.1.7",
30
33
  "@angular/platform-browser": "^22.1.7",
@@ -32,8 +35,10 @@
32
35
  "typescript": "~6.0.3"
33
36
  },
34
37
  "overrides": {
35
- "serialize-javascript": "^7.1.1",
36
- "uuid": "^11.1.1"
38
+ "serialize-javascript": "^7.1.2",
39
+ "uuid": "^11.1.1",
40
+ "source-map-js": "^1.2.2",
41
+ "shell-quote": "^1.11.0"
37
42
  },
38
43
  "cordova": {
39
44
  "plugins": {
@@ -5,5 +5,7 @@ if [[ " $* " == *" --open "* ]] || [[ " $* " == *" -o "* ]]; then
5
5
  ionic cordova prepare ios
6
6
  open platforms/ios/App.xcworkspace
7
7
  else
8
- ionic cordova run ios
8
+ ionic cordova build ios --device
9
+ # Use the .app directly to bypass Ionic's outdated IPA path and ZIP extraction.
10
+ native-run ios --app platforms/ios/App.xcarchive/Products/Applications/IDV.app --device
9
11
  fi
@@ -14,4 +14,4 @@ Requires Node.js 22+, Xcode 26+, CocoaPods, Android Studio with JDK 17 and Andro
14
14
  7. After initialization click the **Start Workflow** button.
15
15
  8. Complete workflow and get your session id.
16
16
 
17
- **Note**: `npm run ios`/`npm run android` is just one way of running the app. You can also pass `-- -o` or `-- --open` argument to the command, and this will open Xcode/Android Studio, then run the app directly from the IDE. Overall, this is a more consistent way, so if you're having troubles running the app from terminal, try running it from the IDE. Just don't forget to make sure that Metro Bundler is running(`npm start`).
17
+ **Note**: `npm run ios`/`npm run android` is just one way of running the app. You can also pass `-- -o` or `-- --open` argument to the command, and this will open Xcode/Android Studio, then run the app directly from the IDE. Overall, this is a more consistent way, so if you're having troubles running the app from terminal, try running it from the IDE.
@@ -36,17 +36,19 @@ export default ({ config }: ConfigContext): ExpoConfig => ({
36
36
  },
37
37
  plugins: [
38
38
  '@regulaforensics/idv',
39
+ './scripts/withoutMetroServer',
39
40
  ['expo-custom-assets', { assetsPaths: ['./assets'] }],
40
41
  ['expo-build-properties', {
42
+ ios: { networkInspector: false },
41
43
  android: {
44
+ networkInspector: false,
42
45
  extraMavenRepos: [
43
46
  { url: 'https://maven.regulaforensics.com/RegulaDocumentReader' },
44
47
  { url: 'https://maven.regulaforensics.com/RegulaDocumentReader/Beta' },
45
48
  { url: 'https://maven.regulaforensics.com/RegulaDocumentReader/Nightly' },
46
49
  { url: 'https://maven.regulaforensics.com/RegulaDocumentReader/Stage' }
47
50
  ]
48
- },
49
- ios: { networkInspector: false }
51
+ }
50
52
  }]
51
53
  ]
52
54
  })
@@ -1,6 +1,8 @@
1
1
  import { registerRootComponent } from 'expo'
2
2
  import WebView from 'react-native-webview'
3
3
  import React from 'react'
4
+ import * as RNFS from 'react-native-fs'
5
+ import { Platform } from 'react-native'
4
6
  import { main } from './src/main'
5
7
 
6
8
  var webViewRef: any
@@ -47,17 +49,45 @@ const document = {
47
49
  }
48
50
 
49
51
  function parseValue(value: any) {
50
- if (value !== true && value !== false) return `"${value}"`
51
- return value
52
+ const json = JSON.stringify(value)
53
+ return typeof value === 'string' ? `(window.webImages[${json}] ?? ${json})` : json
54
+ }
55
+
56
+ async function loadWebUI() {
57
+ const webRoot = Platform.OS === 'ios' ? RNFS.MainBundlePath + '/web/' : 'web/'
58
+ const readWebFile = Platform.OS === 'ios' ? RNFS.readFile : RNFS.readFileAssets
59
+ const readWebDir = Platform.OS === 'ios' ? RNFS.readDir : RNFS.readDirAssets
60
+ const webImages: Record<string, string> = {}
61
+ const [styles, content] = await Promise.all(['src/main.css', 'src/main.html'].map(path => readWebFile(webRoot + path, 'utf8')))
62
+
63
+ for (const file of (await readWebDir(webRoot + 'images')).filter(file => file.isFile())) {
64
+ const extension = file.name.split('.').pop()!.toLowerCase()
65
+ const type = ({ jpg: 'jpeg', svg: 'svg+xml' } as Record<string, string>)[extension] ?? extension
66
+ webImages['images/' + file.name] = `data:image/${type};base64,${await readWebFile(file.path, 'base64')}`
67
+ }
68
+
69
+ const html = content.replace(/src="([^"]+)"/g, (match, path) => webImages[path] ? `src="${webImages[path]}"` : match)
70
+ return `<meta name="viewport" content="initial-scale=1, user-scalable=no, viewport-fit=cover">
71
+ <style>${styles}</style>
72
+ <div id="content" style="height: 100%">${html}</div>
73
+ <script>
74
+ window.webImages = ${JSON.stringify(webImages)};
75
+ requestAnimationFrame(() => requestAnimationFrame(() => {
76
+ window.ReactNativeWebView.postMessage(JSON.stringify({ id: "ready" }))
77
+ }))
78
+ </script>`
52
79
  }
53
80
 
54
81
  (globalThis as any).document = document;
55
- registerRootComponent(() =>
56
- <WebView
82
+ registerRootComponent(() => {
83
+ const [html, setHtml] = React.useState('')
84
+ React.useEffect(() => { loadWebUI().then(setHtml).catch(console.error) }, [])
85
+ return html ? <WebView
57
86
  ref={ref => { webViewRef = ref }}
58
87
  onMessage={onMessage}
59
- source={require("./index.html")}
88
+ originWhitelist={['*']}
89
+ source={{ html }}
60
90
  scrollEnabled={false}
61
91
  overScrollMode={'content'}
62
- />
63
- )
92
+ /> : null
93
+ })
@@ -1,7 +1,5 @@
1
1
  const config = require('expo/metro-config').getDefaultConfig(__dirname)
2
2
  config.watchFolders = [
3
- __dirname + '/node_modules'
4
3
  ]
5
- config.resolver.nodeModulesPaths = config.watchFolders
6
- config.resolver.assetExts.push('css')
4
+ config.resolver.nodeModulesPaths = [__dirname + '/node_modules']
7
5
  module.exports = config