@regulaforensics/face-sdk 6.3.3-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.
- package/README.md +23 -0
- package/RNFaceSDK.podspec +21 -0
- package/android/CVDFaceSDK.kt +34 -0
- package/android/build.gradle +48 -0
- package/android/cordova.gradle +18 -0
- package/android/src/main/AndroidManifest.xml +1 -0
- package/android/src/main/java/com/regula/plugin/facesdk/Config.kt +165 -0
- package/android/src/main/java/com/regula/plugin/facesdk/JSONConstructor.kt +904 -0
- package/android/src/main/java/com/regula/plugin/facesdk/Main.kt +370 -0
- package/android/src/main/java/com/regula/plugin/facesdk/RNFaceApiModule.kt +54 -0
- package/android/src/main/java/com/regula/plugin/facesdk/RNFaceApiPackage.kt +11 -0
- package/android/src/main/java/com/regula/plugin/facesdk/Utils.kt +287 -0
- package/examples/capacitor/.browserslistrc +6 -0
- package/examples/capacitor/.eslintrc.js +17 -0
- package/examples/capacitor/README.md +27 -0
- package/examples/capacitor/android/app/build.gradle +54 -0
- package/examples/capacitor/android/app/capacitor.build.gradle +22 -0
- package/examples/capacitor/android/app/proguard-rules.pro +21 -0
- package/examples/capacitor/android/app/src/androidTest/java/com/getcapacitor/myapp/ExampleInstrumentedTest.java +26 -0
- package/examples/capacitor/android/app/src/main/AndroidManifest.xml +43 -0
- package/examples/capacitor/android/app/src/main/java/com/regula/faceapi/MainActivity.java +5 -0
- package/examples/capacitor/android/app/src/main/res/drawable/ic_launcher_background.xml +170 -0
- package/examples/capacitor/android/app/src/main/res/drawable/splash.png +0 -0
- package/examples/capacitor/android/app/src/main/res/drawable-land-hdpi/splash.png +0 -0
- package/examples/capacitor/android/app/src/main/res/drawable-land-mdpi/splash.png +0 -0
- package/examples/capacitor/android/app/src/main/res/drawable-land-xhdpi/splash.png +0 -0
- package/examples/capacitor/android/app/src/main/res/drawable-land-xxhdpi/splash.png +0 -0
- package/examples/capacitor/android/app/src/main/res/drawable-land-xxxhdpi/splash.png +0 -0
- package/examples/capacitor/android/app/src/main/res/drawable-port-hdpi/splash.png +0 -0
- package/examples/capacitor/android/app/src/main/res/drawable-port-mdpi/splash.png +0 -0
- package/examples/capacitor/android/app/src/main/res/drawable-port-xhdpi/splash.png +0 -0
- package/examples/capacitor/android/app/src/main/res/drawable-port-xxhdpi/splash.png +0 -0
- package/examples/capacitor/android/app/src/main/res/drawable-port-xxxhdpi/splash.png +0 -0
- package/examples/capacitor/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml +34 -0
- package/examples/capacitor/android/app/src/main/res/layout/activity_main.xml +12 -0
- package/examples/capacitor/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +5 -0
- package/examples/capacitor/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +5 -0
- package/examples/capacitor/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/examples/capacitor/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png +0 -0
- package/examples/capacitor/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
- package/examples/capacitor/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/examples/capacitor/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png +0 -0
- package/examples/capacitor/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
- package/examples/capacitor/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/examples/capacitor/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png +0 -0
- package/examples/capacitor/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
- package/examples/capacitor/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/examples/capacitor/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png +0 -0
- package/examples/capacitor/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- package/examples/capacitor/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/examples/capacitor/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png +0 -0
- package/examples/capacitor/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
- package/examples/capacitor/android/app/src/main/res/values/ic_launcher_background.xml +4 -0
- package/examples/capacitor/android/app/src/main/res/values/strings.xml +7 -0
- package/examples/capacitor/android/app/src/main/res/values/styles.xml +22 -0
- package/examples/capacitor/android/app/src/main/res/xml/file_paths.xml +5 -0
- package/examples/capacitor/android/app/src/test/java/com/getcapacitor/myapp/ExampleUnitTest.java +18 -0
- package/examples/capacitor/android/build.gradle +30 -0
- package/examples/capacitor/android/capacitor.settings.gradle +15 -0
- package/examples/capacitor/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/examples/capacitor/android/gradle/wrapper/gradle-wrapper.properties +6 -0
- package/examples/capacitor/android/gradle.properties +22 -0
- package/examples/capacitor/android/gradlew +244 -0
- package/examples/capacitor/android/gradlew.bat +92 -0
- package/examples/capacitor/android/settings.gradle +5 -0
- package/examples/capacitor/android/variables.gradle +16 -0
- package/examples/capacitor/capacitor.config.ts +12 -0
- package/examples/capacitor/cypress/e2e/test.cy.ts +6 -0
- package/examples/capacitor/cypress/fixtures/example.json +5 -0
- package/examples/capacitor/cypress/support/commands.ts +37 -0
- package/examples/capacitor/cypress/support/e2e.ts +20 -0
- package/examples/capacitor/cypress.config.ts +10 -0
- package/examples/capacitor/index.html +106 -0
- package/examples/capacitor/ionic.config.json +7 -0
- package/examples/capacitor/ios/App/App/App.entitlements +5 -0
- package/examples/capacitor/ios/App/App/AppDelegate.swift +49 -0
- package/examples/capacitor/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png +0 -0
- package/examples/capacitor/ios/App/App/Assets.xcassets/AppIcon.appiconset/Contents.json +14 -0
- package/examples/capacitor/ios/App/App/Assets.xcassets/Contents.json +6 -0
- package/examples/capacitor/ios/App/App/Assets.xcassets/Splash.imageset/Contents.json +23 -0
- package/examples/capacitor/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-1.png +0 -0
- package/examples/capacitor/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-2.png +0 -0
- package/examples/capacitor/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732.png +0 -0
- package/examples/capacitor/ios/App/App/Base.lproj/LaunchScreen.storyboard +32 -0
- package/examples/capacitor/ios/App/App/Base.lproj/Main.storyboard +19 -0
- package/examples/capacitor/ios/App/App/Info.plist +53 -0
- package/examples/capacitor/ios/App/App.xcodeproj/project.pbxproj +410 -0
- package/examples/capacitor/ios/App/App.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- package/examples/capacitor/ios/App/App.xcworkspace/contents.xcworkspacedata +10 -0
- package/examples/capacitor/ios/App/App.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/examples/capacitor/ios/App/Podfile +27 -0
- package/examples/capacitor/package.json +64 -0
- package/examples/capacitor/public/assets/.gitkeep +0 -0
- package/examples/capacitor/public/assets/img/id.png +0 -0
- package/examples/capacitor/public/assets/img/portrait.png +0 -0
- package/examples/capacitor/public/favicon.png +0 -0
- package/examples/capacitor/public/manifest.json +21 -0
- package/examples/capacitor/src/App.test.tsx +8 -0
- package/examples/capacitor/src/App.tsx +42 -0
- package/examples/capacitor/src/components/ExploreContainer.css +24 -0
- package/examples/capacitor/src/components/ExploreContainer.tsx +14 -0
- package/examples/capacitor/src/main.tsx +11 -0
- package/examples/capacitor/src/pages/Home.tsx +159 -0
- package/examples/capacitor/src/setupTests.ts +14 -0
- package/examples/capacitor/src/theme/variables.css +242 -0
- package/examples/capacitor/src/vite-env.d.ts +1 -0
- package/examples/capacitor/tsconfig.json +21 -0
- package/examples/capacitor/tsconfig.node.json +9 -0
- package/examples/capacitor/vite.config.ts +16 -0
- package/examples/cordova/.vscode/launch.json +28 -0
- package/examples/cordova/config.xml +37 -0
- package/examples/cordova/jsconfig.json +1 -0
- package/examples/cordova/package.json +40 -0
- package/examples/cordova/www/css/index.css +107 -0
- package/examples/cordova/www/img/id.png +0 -0
- package/examples/cordova/www/img/logo.png +0 -0
- package/examples/cordova/www/img/portrait.png +0 -0
- package/examples/cordova/www/index.html +94 -0
- package/examples/cordova/www/js/index.js +154 -0
- package/examples/ionic/angular.json +187 -0
- package/examples/ionic/browserslist +12 -0
- package/examples/ionic/config.xml +114 -0
- package/examples/ionic/e2e/protractor.conf.js +28 -0
- package/examples/ionic/e2e/src/app.e2e-spec.ts +14 -0
- package/examples/ionic/e2e/src/app.po.ts +11 -0
- package/examples/ionic/e2e/tsconfig.json +13 -0
- package/examples/ionic/ionic.config.json +7 -0
- package/examples/ionic/karma.conf.js +31 -0
- package/examples/ionic/package.json +97 -0
- package/examples/ionic/resources/README.md +8 -0
- package/examples/ionic/resources/android/icon/drawable-hdpi-icon.png +0 -0
- package/examples/ionic/resources/android/icon/drawable-ldpi-icon.png +0 -0
- package/examples/ionic/resources/android/icon/drawable-mdpi-icon.png +0 -0
- package/examples/ionic/resources/android/icon/drawable-xhdpi-icon.png +0 -0
- package/examples/ionic/resources/android/icon/drawable-xxhdpi-icon.png +0 -0
- package/examples/ionic/resources/android/icon/drawable-xxxhdpi-icon.png +0 -0
- package/examples/ionic/resources/android/splash/drawable-land-hdpi-screen.png +0 -0
- package/examples/ionic/resources/android/splash/drawable-land-ldpi-screen.png +0 -0
- package/examples/ionic/resources/android/splash/drawable-land-mdpi-screen.png +0 -0
- package/examples/ionic/resources/android/splash/drawable-land-xhdpi-screen.png +0 -0
- package/examples/ionic/resources/android/splash/drawable-land-xxhdpi-screen.png +0 -0
- package/examples/ionic/resources/android/splash/drawable-land-xxxhdpi-screen.png +0 -0
- package/examples/ionic/resources/android/splash/drawable-port-hdpi-screen.png +0 -0
- package/examples/ionic/resources/android/splash/drawable-port-ldpi-screen.png +0 -0
- package/examples/ionic/resources/android/splash/drawable-port-mdpi-screen.png +0 -0
- package/examples/ionic/resources/android/splash/drawable-port-xhdpi-screen.png +0 -0
- package/examples/ionic/resources/android/splash/drawable-port-xxhdpi-screen.png +0 -0
- package/examples/ionic/resources/android/splash/drawable-port-xxxhdpi-screen.png +0 -0
- package/examples/ionic/resources/android/xml/network_security_config.xml +6 -0
- package/examples/ionic/resources/icon.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-1024.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-20.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-20@2x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-20@3x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-24@2x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-27.5@2x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-29.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-29@2x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-29@3x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-40.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-40@2x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-40@3x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-44@2x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-50.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-50@2x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-60.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-60@2x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-60@3x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-72.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-72@2x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-76.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-76@2x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-83.5@2x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-86@2x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-98@2x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-small.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-small@2x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon-small@3x.png +0 -0
- package/examples/ionic/resources/ios/icon/icon.png +0 -0
- package/examples/ionic/resources/ios/icon/icon@2x.png +0 -0
- package/examples/ionic/resources/ios/splash/Default-2436h.png +0 -0
- package/examples/ionic/resources/ios/splash/Default-568h@2x~iphone.png +0 -0
- package/examples/ionic/resources/ios/splash/Default-667h.png +0 -0
- package/examples/ionic/resources/ios/splash/Default-736h.png +0 -0
- package/examples/ionic/resources/ios/splash/Default-Landscape-2436h.png +0 -0
- package/examples/ionic/resources/ios/splash/Default-Landscape-736h.png +0 -0
- package/examples/ionic/resources/ios/splash/Default-Landscape@2x~ipad.png +0 -0
- package/examples/ionic/resources/ios/splash/Default-Landscape@~ipadpro.png +0 -0
- package/examples/ionic/resources/ios/splash/Default-Landscape~ipad.png +0 -0
- package/examples/ionic/resources/ios/splash/Default-Portrait@2x~ipad.png +0 -0
- package/examples/ionic/resources/ios/splash/Default-Portrait@~ipadpro.png +0 -0
- package/examples/ionic/resources/ios/splash/Default-Portrait~ipad.png +0 -0
- package/examples/ionic/resources/ios/splash/Default@2x~iphone.png +0 -0
- package/examples/ionic/resources/ios/splash/Default@2x~universal~anyany.png +0 -0
- package/examples/ionic/resources/ios/splash/Default~iphone.png +0 -0
- package/examples/ionic/resources/splash.png +0 -0
- package/examples/ionic/src/app/app-routing.module.ts +15 -0
- package/examples/ionic/src/app/app.component.html +3 -0
- package/examples/ionic/src/app/app.component.scss +0 -0
- package/examples/ionic/src/app/app.component.spec.ts +47 -0
- package/examples/ionic/src/app/app.component.ts +27 -0
- package/examples/ionic/src/app/app.module.ts +23 -0
- package/examples/ionic/src/app/home/home.module.ts +29 -0
- package/examples/ionic/src/app/home/home.page.html +75 -0
- package/examples/ionic/src/app/home/home.page.scss +1 -0
- package/examples/ionic/src/app/home/home.page.spec.ts +24 -0
- package/examples/ionic/src/app/home/home.page.ts +166 -0
- package/examples/ionic/src/assets/icon/favicon.png +0 -0
- package/examples/ionic/src/assets/img/portrait.png +0 -0
- package/examples/ionic/src/assets/shapes.svg +1 -0
- package/examples/ionic/src/environments/environment.prod.ts +3 -0
- package/examples/ionic/src/environments/environment.ts +16 -0
- package/examples/ionic/src/global.scss +31 -0
- package/examples/ionic/src/index.html +25 -0
- package/examples/ionic/src/main.ts +12 -0
- package/examples/ionic/src/polyfills.ts +66 -0
- package/examples/ionic/src/test.ts +20 -0
- package/examples/ionic/src/theme/variables.scss +77 -0
- package/examples/ionic/src/zone-flags.ts +5 -0
- package/examples/ionic/tsconfig.app.json +14 -0
- package/examples/ionic/tsconfig.json +26 -0
- package/examples/ionic/tsconfig.spec.json +19 -0
- package/examples/ionic/tslint.json +88 -0
- package/examples/react-native/.vscode/launch.json +26 -0
- package/examples/react-native/.watchmanconfig +1 -0
- package/examples/react-native/App.tsx +206 -0
- package/examples/react-native/Gemfile +8 -0
- package/examples/react-native/Gemfile.lock +134 -0
- package/examples/react-native/android/app/build.gradle +123 -0
- package/examples/react-native/android/app/debug.keystore +0 -0
- package/examples/react-native/android/app/proguard-rules.pro +10 -0
- package/examples/react-native/android/app/src/debug/AndroidManifest.xml +9 -0
- package/examples/react-native/android/app/src/main/AndroidManifest.xml +27 -0
- package/examples/react-native/android/app/src/main/assets/.gitkeep +0 -0
- package/examples/react-native/android/app/src/main/java/com/regula/face/api/MainActivity.kt +22 -0
- package/examples/react-native/android/app/src/main/java/com/regula/face/api/MainApplication.kt +43 -0
- package/examples/react-native/android/app/src/main/res/drawable/rn_edit_text_material.xml +37 -0
- package/examples/react-native/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/examples/react-native/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
- package/examples/react-native/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/examples/react-native/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
- package/examples/react-native/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/examples/react-native/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
- package/examples/react-native/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/examples/react-native/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- package/examples/react-native/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/examples/react-native/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
- package/examples/react-native/android/app/src/main/res/values/strings.xml +3 -0
- package/examples/react-native/android/app/src/main/res/values/styles.xml +9 -0
- package/examples/react-native/android/build.gradle +21 -0
- package/examples/react-native/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/examples/react-native/android/gradle/wrapper/gradle-wrapper.properties +7 -0
- package/examples/react-native/android/gradle.properties +39 -0
- package/examples/react-native/android/gradlew +249 -0
- package/examples/react-native/android/gradlew.bat +92 -0
- package/examples/react-native/android/settings.gradle +6 -0
- package/examples/react-native/images/portrait.png +0 -0
- package/examples/react-native/index.js +4 -0
- package/examples/react-native/ios/.xcode.env +11 -0
- package/examples/react-native/ios/FaceSDK/AppDelegate.h +6 -0
- package/examples/react-native/ios/FaceSDK/AppDelegate.mm +31 -0
- package/examples/react-native/ios/FaceSDK/Images.xcassets/AppIcon.appiconset/Contents.json +53 -0
- package/examples/react-native/ios/FaceSDK/Images.xcassets/Contents.json +6 -0
- package/examples/react-native/ios/FaceSDK/Info.plist +51 -0
- package/examples/react-native/ios/FaceSDK/LaunchScreen.storyboard +47 -0
- package/examples/react-native/ios/FaceSDK/PrivacyInfo.xcprivacy +38 -0
- package/examples/react-native/ios/FaceSDK/main.m +10 -0
- package/examples/react-native/ios/FaceSDK.xcodeproj/project.pbxproj +719 -0
- package/examples/react-native/ios/FaceSDK.xcodeproj/xcshareddata/xcschemes/FaceSDK.xcscheme +88 -0
- package/examples/react-native/ios/FaceSDK.xcworkspace/contents.xcworkspacedata +10 -0
- package/examples/react-native/ios/FaceSDK.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/examples/react-native/ios/FaceSDKTests/FaceSDKTests.m +66 -0
- package/examples/react-native/ios/FaceSDKTests/Info.plist +24 -0
- package/examples/react-native/ios/Podfile +40 -0
- package/examples/react-native/ios/Podfile.lock +1822 -0
- package/examples/react-native/ios/license/.gitkeep +0 -0
- package/examples/react-native/metro.config.js +15 -0
- package/examples/react-native/package-lock.json +13098 -0
- package/examples/react-native/package.json +42 -0
- package/ios/CVDFaceSDK.h +7 -0
- package/ios/CVDFaceSDK.m +34 -0
- package/ios/RFSWConfig.h +27 -0
- package/ios/RFSWConfig.m +189 -0
- package/ios/RFSWJSONConstructor.h +134 -0
- package/ios/RFSWJSONConstructor.m +977 -0
- package/ios/RFSWMain.h +23 -0
- package/ios/RFSWMain.m +352 -0
- package/ios/RNFaceSDK.h +8 -0
- package/ios/RNFaceSDK.m +42 -0
- package/ios-ci/.gitlab-ci.yml +41 -0
- package/ios-ci/.sample-env +22 -0
- package/ios-ci/README.md +97 -0
- package/ios-ci/RegulaDanger/Package.swift +34 -0
- package/ios-ci/RegulaDanger/Sources/RegulaDanger/RegulaDanger.swift +44 -0
- package/ios-ci/RegulaDanger/Tests/LinuxMain.swift +7 -0
- package/ios-ci/RegulaDanger/Tests/RegulaDangerTests/RegulaDangerTests.swift +15 -0
- package/ios-ci/RegulaDanger/Tests/RegulaDangerTests/XCTestManifests.swift +9 -0
- package/ios-ci/install.sh +9 -0
- package/ios-ci/ios_ci/__init__.py +8 -0
- package/ios-ci/ios_ci/cli.py +408 -0
- package/ios-ci/ios_ci/common/__init__.py +0 -0
- package/ios-ci/ios_ci/common/build_index.py +70 -0
- package/ios-ci/ios_ci/common/clean_cocoapod.sh +13 -0
- package/ios-ci/ios_ci/common/dependency.py +466 -0
- package/ios-ci/ios_ci/common/ftp.py +314 -0
- package/ios-ci/ios_ci/common/searchpod.sh +6 -0
- package/ios-ci/ios_ci/common/wait_for_cocopod.sh +21 -0
- package/ios-ci/ios_ci/inject.py +145 -0
- package/ios-ci/ios_ci/podspec/__init__.py +0 -0
- package/ios-ci/ios_ci/podspec/podspec.py +88 -0
- package/ios-ci/ios_ci/podspec/templates/BTDevice.podspec +17 -0
- package/ios-ci/ios_ci/podspec/templates/Core.podspec +17 -0
- package/ios-ci/ios_ci/podspec/templates/DocumentReader.podspec +19 -0
- package/ios-ci/ios_ci/podspec/templates/FaceCore.podspec +17 -0
- package/ios-ci/ios_ci/podspec/templates/FaceSDK.podspec +18 -0
- package/ios-ci/ios_ci/podspec/templates/IRS.podspec +17 -0
- package/ios-ci/ios_ci/podspec/templates/RegulaCommon.podspec +17 -0
- package/ios-ci/ios_ci/resolve_podfile_common.py +76 -0
- package/ios-ci/ios_ci/spm/AppleRootCA-G3.cer +0 -0
- package/ios-ci/ios_ci/spm/AppleWWDRCAG3.cer +0 -0
- package/ios-ci/ios_ci/spm/SwiftPackageGenerator+Common.sh +48 -0
- package/ios-ci/ios_ci/spm/SwiftPackageGenerator.sh +33 -0
- package/ios-ci/ios_ci/spm/XcodeSPMCollection.json +29 -0
- package/ios-ci/ios_ci/spm/__init__.py +0 -0
- package/ios-ci/ios_ci/spm/askpass.py +19 -0
- package/ios-ci/ios_ci/spm/spm.py +227 -0
- package/ios-ci/ios_ci/upload_build.py +158 -0
- package/ios-ci/ios_ci/version.py +14 -0
- package/ios-ci/poetry.lock +342 -0
- package/ios-ci/pyproject.toml +26 -0
- package/ios-ci/scripts.py +9 -0
- package/ios-ci/tests/__init__.py +0 -0
- package/ios-ci/tests/podspec/fixtures/BTDevice.podspec +17 -0
- package/ios-ci/tests/podspec/fixtures/BTDeviceBeta.podspec +17 -0
- package/ios-ci/tests/podspec/fixtures/DocumentReaderBeta_RegulaCommon_Beta.podspec +19 -0
- package/ios-ci/tests/podspec/fixtures/DocumentReaderBeta_RegulaCommon_Release.podspec +19 -0
- package/ios-ci/tests/podspec/fixtures/DocumentReaderFullRFID.podspec +17 -0
- package/ios-ci/tests/podspec/fixtures/DocumentReaderFullRFIDBeta.podspec +17 -0
- package/ios-ci/tests/podspec/fixtures/DocumentReader_RegulaCommon_Beta.podspec +19 -0
- package/ios-ci/tests/podspec/fixtures/DocumentReader_RegulaCommon_Release.podspec +19 -0
- package/ios-ci/tests/podspec/fixtures/FaceSDK.podspec +18 -0
- package/ios-ci/tests/podspec/fixtures/FaceSDKBeta.podspec +18 -0
- package/ios-ci/tests/podspec/fixtures/IRS.podspec +17 -0
- package/ios-ci/tests/podspec/fixtures/IRSBeta.podspec +17 -0
- package/ios-ci/tests/podspec/fixtures/RegulaCommon.podspec +17 -0
- package/ios-ci/tests/podspec/fixtures/RegulaCommonBeta.podspec +17 -0
- package/ios-ci/tests/podspec/test_podspec.py +188 -0
- package/ios-ci/tests/test_build_index.py +117 -0
- package/ios-ci/tests/test_dependency.py +139 -0
- package/ios-ci/tests/test_ios_ci.py +5 -0
- package/package.json +36 -0
- package/plugin.xml +48 -0
- package/www/capacitor/customization/camera_position.js +4 -0
- package/www/capacitor/customization/customization.js +66 -0
- package/www/capacitor/customization/customization_colors.js +233 -0
- package/www/capacitor/customization/customization_fonts.js +106 -0
- package/www/capacitor/customization/customization_images.js +129 -0
- package/www/capacitor/customization/font.js +23 -0
- package/www/capacitor/customization/screen_orientation.js +4 -0
- package/www/capacitor/detect_faces/detect_face_result.js +38 -0
- package/www/capacitor/detect_faces/detect_faces_attribute.js +15 -0
- package/www/capacitor/detect_faces/detect_faces_attribute_result.js +20 -0
- package/www/capacitor/detect_faces/detect_faces_backend_exception.js +23 -0
- package/www/capacitor/detect_faces/detect_faces_config.js +14 -0
- package/www/capacitor/detect_faces/detect_faces_exception.js +30 -0
- package/www/capacitor/detect_faces/detect_faces_request.js +67 -0
- package/www/capacitor/detect_faces/detect_faces_response.js +24 -0
- package/www/capacitor/detect_faces/detect_faces_scenario.js +10 -0
- package/www/capacitor/face_capture/face_capture_config.js +28 -0
- package/www/capacitor/face_capture/face_capture_exception.js +25 -0
- package/www/capacitor/face_capture/face_capture_image.js +26 -0
- package/www/capacitor/face_capture/face_capture_response.js +17 -0
- package/www/capacitor/image_params/output_image_crop.js +21 -0
- package/www/capacitor/image_params/output_image_params.js +9 -0
- package/www/capacitor/image_params/point.js +14 -0
- package/www/capacitor/image_params/rect.js +18 -0
- package/www/capacitor/image_params/size.js +9 -0
- package/www/capacitor/image_quality/image_quality_characteristic.js +24 -0
- package/www/capacitor/image_quality/image_quality_characteristic_name.js +58 -0
- package/www/capacitor/image_quality/image_quality_group.js +332 -0
- package/www/capacitor/image_quality/image_quality_range.js +26 -0
- package/www/capacitor/image_quality/image_quality_result.js +40 -0
- package/www/capacitor/index.js +219 -0
- package/www/capacitor/init/face_sdk_version.js +16 -0
- package/www/capacitor/init/init_config.js +9 -0
- package/www/capacitor/init/init_exception.js +29 -0
- package/www/capacitor/init/license_exception.js +29 -0
- package/www/capacitor/internal/bridge.js +39 -0
- package/www/capacitor/internal/cordova.js +17 -0
- package/www/capacitor/internal/webpack.config.js +11 -0
- package/www/capacitor/liveness/liveness_backend_exception.js +38 -0
- package/www/capacitor/liveness/liveness_config.js +54 -0
- package/www/capacitor/liveness/liveness_exception.js +35 -0
- package/www/capacitor/liveness/liveness_notification.js +34 -0
- package/www/capacitor/liveness/liveness_response.js +30 -0
- package/www/capacitor/match_faces/compared_face.js +21 -0
- package/www/capacitor/match_faces/compared_faces_pair.js +23 -0
- package/www/capacitor/match_faces/compared_faces_split.js +22 -0
- package/www/capacitor/match_faces/match_faces_backend_exception.js +14 -0
- package/www/capacitor/match_faces/match_faces_config.js +12 -0
- package/www/capacitor/match_faces/match_faces_detection.js +25 -0
- package/www/capacitor/match_faces/match_faces_detection_face.js +28 -0
- package/www/capacitor/match_faces/match_faces_exception.js +30 -0
- package/www/capacitor/match_faces/match_faces_image.js +25 -0
- package/www/capacitor/match_faces/match_faces_request.js +13 -0
- package/www/capacitor/match_faces/match_faces_response.js +28 -0
- package/www/capacitor/person_database/edit_group_persons_request.js +9 -0
- package/www/capacitor/person_database/image_upload.js +16 -0
- package/www/capacitor/person_database/pageable_item_list.js +22 -0
- package/www/capacitor/person_database/person.js +22 -0
- package/www/capacitor/person_database/person_database.js +145 -0
- package/www/capacitor/person_database/person_group.js +18 -0
- package/www/capacitor/person_database/person_image.js +22 -0
- package/www/capacitor/person_database/search_person.js +31 -0
- package/www/capacitor/person_database/search_person_detection.js +22 -0
- package/www/capacitor/person_database/search_person_image.js +26 -0
- package/www/capacitor/person_database/search_person_request.js +17 -0
- package/www/cordova.js +3738 -0
- package/www/react-native/customization/camera_position.js +4 -0
- package/www/react-native/customization/customization.js +66 -0
- package/www/react-native/customization/customization_colors.js +233 -0
- package/www/react-native/customization/customization_fonts.js +106 -0
- package/www/react-native/customization/customization_images.js +129 -0
- package/www/react-native/customization/font.js +23 -0
- package/www/react-native/customization/screen_orientation.js +4 -0
- package/www/react-native/detect_faces/detect_face_result.js +38 -0
- package/www/react-native/detect_faces/detect_faces_attribute.js +15 -0
- package/www/react-native/detect_faces/detect_faces_attribute_result.js +20 -0
- package/www/react-native/detect_faces/detect_faces_backend_exception.js +23 -0
- package/www/react-native/detect_faces/detect_faces_config.js +14 -0
- package/www/react-native/detect_faces/detect_faces_exception.js +30 -0
- package/www/react-native/detect_faces/detect_faces_request.js +67 -0
- package/www/react-native/detect_faces/detect_faces_response.js +24 -0
- package/www/react-native/detect_faces/detect_faces_scenario.js +10 -0
- package/www/react-native/face_capture/face_capture_config.js +28 -0
- package/www/react-native/face_capture/face_capture_exception.js +25 -0
- package/www/react-native/face_capture/face_capture_image.js +26 -0
- package/www/react-native/face_capture/face_capture_response.js +17 -0
- package/www/react-native/image_params/output_image_crop.js +21 -0
- package/www/react-native/image_params/output_image_params.js +9 -0
- package/www/react-native/image_params/point.js +14 -0
- package/www/react-native/image_params/rect.js +18 -0
- package/www/react-native/image_params/size.js +9 -0
- package/www/react-native/image_quality/image_quality_characteristic.js +24 -0
- package/www/react-native/image_quality/image_quality_characteristic_name.js +58 -0
- package/www/react-native/image_quality/image_quality_group.js +332 -0
- package/www/react-native/image_quality/image_quality_range.js +26 -0
- package/www/react-native/image_quality/image_quality_result.js +40 -0
- package/www/react-native/index.js +219 -0
- package/www/react-native/init/face_sdk_version.js +16 -0
- package/www/react-native/init/init_config.js +9 -0
- package/www/react-native/init/init_exception.js +29 -0
- package/www/react-native/init/license_exception.js +29 -0
- package/www/react-native/internal/bridge.js +39 -0
- package/www/react-native/liveness/liveness_backend_exception.js +38 -0
- package/www/react-native/liveness/liveness_config.js +54 -0
- package/www/react-native/liveness/liveness_exception.js +35 -0
- package/www/react-native/liveness/liveness_notification.js +34 -0
- package/www/react-native/liveness/liveness_response.js +30 -0
- package/www/react-native/match_faces/compared_face.js +21 -0
- package/www/react-native/match_faces/compared_faces_pair.js +23 -0
- package/www/react-native/match_faces/compared_faces_split.js +22 -0
- package/www/react-native/match_faces/match_faces_backend_exception.js +14 -0
- package/www/react-native/match_faces/match_faces_config.js +12 -0
- package/www/react-native/match_faces/match_faces_detection.js +25 -0
- package/www/react-native/match_faces/match_faces_detection_face.js +28 -0
- package/www/react-native/match_faces/match_faces_exception.js +30 -0
- package/www/react-native/match_faces/match_faces_image.js +25 -0
- package/www/react-native/match_faces/match_faces_request.js +13 -0
- package/www/react-native/match_faces/match_faces_response.js +28 -0
- package/www/react-native/person_database/edit_group_persons_request.js +9 -0
- package/www/react-native/person_database/image_upload.js +16 -0
- package/www/react-native/person_database/pageable_item_list.js +22 -0
- package/www/react-native/person_database/person.js +22 -0
- package/www/react-native/person_database/person_database.js +145 -0
- package/www/react-native/person_database/person_group.js +18 -0
- package/www/react-native/person_database/person_image.js +22 -0
- package/www/react-native/person_database/search_person.js +31 -0
- package/www/react-native/person_database/search_person_detection.js +22 -0
- package/www/react-native/person_database/search_person_image.js +26 -0
- package/www/react-native/person_database/search_person_request.js +17 -0
- package/www/types/customization/camera_position.d.ts +4 -0
- package/www/types/customization/customization.d.ts +24 -0
- package/www/types/customization/customization_colors.d.ts +31 -0
- package/www/types/customization/customization_fonts.d.ts +17 -0
- package/www/types/customization/customization_images.d.ts +18 -0
- package/www/types/customization/font.d.ts +14 -0
- package/www/types/customization/screen_orientation.d.ts +4 -0
- package/www/types/detect_faces/detect_face_result.d.ts +16 -0
- package/www/types/detect_faces/detect_faces_attribute.d.ts +15 -0
- package/www/types/detect_faces/detect_faces_attribute_result.d.ts +11 -0
- package/www/types/detect_faces/detect_faces_backend_exception.d.ts +15 -0
- package/www/types/detect_faces/detect_faces_config.d.ts +19 -0
- package/www/types/detect_faces/detect_faces_exception.d.ts +21 -0
- package/www/types/detect_faces/detect_faces_request.d.ts +27 -0
- package/www/types/detect_faces/detect_faces_response.d.ts +12 -0
- package/www/types/detect_faces/detect_faces_scenario.d.ts +10 -0
- package/www/types/face_capture/face_capture_config.d.ts +30 -0
- package/www/types/face_capture/face_capture_exception.d.ts +17 -0
- package/www/types/face_capture/face_capture_image.d.ts +15 -0
- package/www/types/face_capture/face_capture_response.d.ts +9 -0
- package/www/types/image_params/output_image_crop.d.ts +25 -0
- package/www/types/image_params/output_image_params.d.ts +13 -0
- package/www/types/image_params/point.d.ts +6 -0
- package/www/types/image_params/rect.d.ts +8 -0
- package/www/types/image_params/size.d.ts +6 -0
- package/www/types/image_quality/image_quality_characteristic.d.ts +4 -0
- package/www/types/image_quality/image_quality_characteristic_name.d.ts +58 -0
- package/www/types/image_quality/image_quality_group.d.ts +155 -0
- package/www/types/image_quality/image_quality_range.d.ts +8 -0
- package/www/types/image_quality/image_quality_result.d.ts +30 -0
- package/www/types/index.d.ts +159 -0
- package/www/types/init/face_sdk_version.d.ts +7 -0
- package/www/types/init/init_config.d.ts +7 -0
- package/www/types/init/init_exception.d.ts +20 -0
- package/www/types/init/license_exception.d.ts +21 -0
- package/www/types/liveness/liveness_backend_exception.d.ts +30 -0
- package/www/types/liveness/liveness_config.d.ts +56 -0
- package/www/types/liveness/liveness_exception.d.ts +26 -0
- package/www/types/liveness/liveness_notification.d.ts +28 -0
- package/www/types/liveness/liveness_response.d.ts +18 -0
- package/www/types/match_faces/compared_face.d.ts +11 -0
- package/www/types/match_faces/compared_faces_pair.d.ts +12 -0
- package/www/types/match_faces/compared_faces_split.d.ts +8 -0
- package/www/types/match_faces/match_faces_backend_exception.d.ts +6 -0
- package/www/types/match_faces/match_faces_config.d.ts +14 -0
- package/www/types/match_faces/match_faces_detection.d.ts +12 -0
- package/www/types/match_faces/match_faces_detection_face.d.ts +13 -0
- package/www/types/match_faces/match_faces_exception.d.ts +21 -0
- package/www/types/match_faces/match_faces_image.d.ts +16 -0
- package/www/types/match_faces/match_faces_request.d.ts +18 -0
- package/www/types/match_faces/match_faces_response.d.ts +12 -0
- package/www/types/person_database/edit_group_persons_request.d.ts +8 -0
- package/www/types/person_database/image_upload.d.ts +6 -0
- package/www/types/person_database/pageable_item_list.d.ts +7 -0
- package/www/types/person_database/person.d.ts +10 -0
- package/www/types/person_database/person_database.d.ts +92 -0
- package/www/types/person_database/person_group.d.ts +8 -0
- package/www/types/person_database/person_image.d.ts +10 -0
- package/www/types/person_database/search_person.d.ts +15 -0
- package/www/types/person_database/search_person_detection.d.ts +11 -0
- package/www/types/person_database/search_person_image.d.ts +12 -0
- package/www/types/person_database/search_person_request.d.ts +15 -0
|
@@ -0,0 +1,466 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import subprocess
|
|
3
|
+
from enum import Enum, auto
|
|
4
|
+
from pathlib import Path
|
|
5
|
+
from typing import Optional, Tuple
|
|
6
|
+
|
|
7
|
+
from ios_ci import __script_call_location__
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class DependencyBuildType(Enum):
|
|
11
|
+
TEMP = "Temp"
|
|
12
|
+
BETA = "Beta"
|
|
13
|
+
NIGHTLY = "Nightly"
|
|
14
|
+
STAGE = "Stage"
|
|
15
|
+
RELEASE = "Release"
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class DependencySourceType(Enum):
|
|
19
|
+
COCOAPODS = auto()
|
|
20
|
+
FTP_PRIVATE = auto()
|
|
21
|
+
FTP_PUBLIC = auto()
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class Dependency:
|
|
25
|
+
name: str
|
|
26
|
+
""" Plain dependency name without `Beta` prefix. Example: `FaceSDK`, `FullRFID`, `DocumentReader` """
|
|
27
|
+
|
|
28
|
+
build_type: DependencyBuildType
|
|
29
|
+
|
|
30
|
+
def __init__(self, name: str, build_type: DependencyBuildType):
|
|
31
|
+
self.name = name
|
|
32
|
+
self.build_type = build_type
|
|
33
|
+
|
|
34
|
+
@property
|
|
35
|
+
def framework_name(self) -> str:
|
|
36
|
+
return f"{self.name}.xcframework"
|
|
37
|
+
|
|
38
|
+
@property
|
|
39
|
+
def pod_name(self) -> str:
|
|
40
|
+
"""The name of the dependency as if it is a pod name in Podfile. Has `Beta` prefix if needed"""
|
|
41
|
+
pod_name = self.name
|
|
42
|
+
if self.build_type == DependencyBuildType.BETA:
|
|
43
|
+
pod_name = f"{pod_name}Beta"
|
|
44
|
+
elif self.build_type == DependencyBuildType.NIGHTLY:
|
|
45
|
+
pod_name = f"{pod_name}Nightly"
|
|
46
|
+
elif self.build_type == DependencyBuildType.STAGE:
|
|
47
|
+
pod_name = f"{pod_name}Stage"
|
|
48
|
+
return pod_name
|
|
49
|
+
|
|
50
|
+
@property
|
|
51
|
+
def pod_name_temp(self) -> str:
|
|
52
|
+
"""The name of the dependency as if it is a pod name in Podfile. Has `Beta` or `Temp` prefix if needed"""
|
|
53
|
+
pod_name = self.name
|
|
54
|
+
if self.build_type == DependencyBuildType.BETA:
|
|
55
|
+
pod_name = f"{pod_name}Beta"
|
|
56
|
+
elif self.build_type == DependencyBuildType.NIGHTLY:
|
|
57
|
+
pod_name = f"{pod_name}Nightly"
|
|
58
|
+
elif self.build_type == DependencyBuildType.STAGE:
|
|
59
|
+
pod_name = f"{pod_name}Stage"
|
|
60
|
+
elif self.build_type == DependencyBuildType.TEMP:
|
|
61
|
+
pod_name = f"{pod_name}Temp"
|
|
62
|
+
return pod_name
|
|
63
|
+
|
|
64
|
+
def ftp_archive_name(self, version: str) -> str:
|
|
65
|
+
archive_name = f"{self.pod_name}-{version}"
|
|
66
|
+
return archive_name
|
|
67
|
+
|
|
68
|
+
@property
|
|
69
|
+
def ftp_project_path(self) -> str:
|
|
70
|
+
if self.build_type == DependencyBuildType.TEMP:
|
|
71
|
+
resource_path = f"iOS/{self.pod_name}"
|
|
72
|
+
else:
|
|
73
|
+
resource_path = f"{self.pod_name}"
|
|
74
|
+
return resource_path
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
def _core_full_name_from_short_name(short_name: str) -> str:
|
|
78
|
+
map = {
|
|
79
|
+
"barcode": "Barcode",
|
|
80
|
+
"barcodemrz": "MRZBarcode",
|
|
81
|
+
"barcodemrzrfid": "BarcodeMRZRFID",
|
|
82
|
+
"bounds": "Bounds",
|
|
83
|
+
"creditcard": "BankCard",
|
|
84
|
+
"doctype": "DocType",
|
|
85
|
+
"full": "Full",
|
|
86
|
+
"fullauth": "FullAuth",
|
|
87
|
+
"fullauthrfid": "FullAuthRFID",
|
|
88
|
+
"fullcc": "FullBankCard",
|
|
89
|
+
"fullrfid": "FullRFID",
|
|
90
|
+
"mrz": "MRZ",
|
|
91
|
+
"mrzcreditcard": "MRZBankCard",
|
|
92
|
+
"mrzrfid": "MRZRFID",
|
|
93
|
+
"ocrandmrz": "OCR",
|
|
94
|
+
"ocrandmrzcc": "OCRBankCard",
|
|
95
|
+
"ocrandmrzrfid": "OCRRFID",
|
|
96
|
+
"ocrmrzccrfid": "OCRBankCardRFID",
|
|
97
|
+
}
|
|
98
|
+
full_name = map.get(short_name)
|
|
99
|
+
return full_name
|
|
100
|
+
|
|
101
|
+
def _other_full_name_from_short_name(lower_case: str) -> str:
|
|
102
|
+
map = {
|
|
103
|
+
"faceSDK": "FaceSDK",
|
|
104
|
+
"basic": "FaceCoreBasic",
|
|
105
|
+
"match": "FaceCoreMatch",
|
|
106
|
+
"common": "RegulaCommon",
|
|
107
|
+
"documentReader": "DocumentReader",
|
|
108
|
+
"btDevice": "BTDevice",
|
|
109
|
+
}
|
|
110
|
+
upper_case = map.get(lower_case)
|
|
111
|
+
return upper_case
|
|
112
|
+
|
|
113
|
+
def _spm_git_url(short_name: str) -> str:
|
|
114
|
+
map = {
|
|
115
|
+
"barcode": "https://github.com/regulaforensics/DocumentReaderBarcode-Swift-Package.git",
|
|
116
|
+
"barcodemrz": "https://github.com/regulaforensics/DocumentReaderMRZBarcode-Swift-Package.git",
|
|
117
|
+
"barcodemrzrfid": "https://github.com/regulaforensics/DocumentReaderBarcodeMRZRFID-Swift-Package.git",
|
|
118
|
+
"bounds": "https://github.com/regulaforensics/DocumentReaderBounds-Swift-Package.git",
|
|
119
|
+
"doctype": "https://github.com/regulaforensics/DocumentReaderDocType-Swift-Package.git",
|
|
120
|
+
"full": "https://github.com/regulaforensics/DocumentReaderFull-Swift-Package.git",
|
|
121
|
+
"fullauth": "https://github.com/regulaforensics/DocumentReaderFullAuth-Swift-Package.git",
|
|
122
|
+
"fullauthrfid": "https://github.com/regulaforensics/DocumentReaderFullAuthRFID-Swift-Package.git",
|
|
123
|
+
"fullrfid": "https://github.com/regulaforensics/DocumentReaderFullRFID-Swift-Package.git",
|
|
124
|
+
"mrz": "https://github.com/regulaforensics/DocumentReaderMRZ-Swift-Package.git",
|
|
125
|
+
"mrzrfid": "https://github.com/regulaforensics/DocumentReaderMRZRFID-Swift-Package.git",
|
|
126
|
+
"ocrandmrz": "https://github.com/regulaforensics/DocumentReaderOCR-Swift-Package.git",
|
|
127
|
+
"ocrandmrzrfid": "https://github.com/regulaforensics/DocumentReaderOCRRFID-Swift-Package.git",
|
|
128
|
+
"basic": "https://github.com/regulaforensics/FaceCoreBasic-Swift-Package.git",
|
|
129
|
+
"match": "https://github.com/regulaforensics/FaceCoreMatch-Swift-Package.git",
|
|
130
|
+
"common": "https://github.com/regulaforensics/RegulaCommon-Swift-Package.git",
|
|
131
|
+
"documentReader": "https://github.com/regulaforensics/DocumentReader-Swift-Package.git",
|
|
132
|
+
"faceSDK": "https://github.com/regulaforensics/FaceSDK-Swift-Package.git",
|
|
133
|
+
"btDevice": "https://github.com/regulaforensics/BTDevice-Swift-Package.git",
|
|
134
|
+
|
|
135
|
+
}
|
|
136
|
+
git_url = map.get(short_name)
|
|
137
|
+
return git_url
|
|
138
|
+
|
|
139
|
+
def _is_core_by_short_name(short_name: str) -> bool:
|
|
140
|
+
return _core_full_name_from_short_name(short_name) is not None
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
class CoreDependency(Dependency):
|
|
144
|
+
core_short_name: str
|
|
145
|
+
""" Short name for Core dependency. Example: `fullrfid`, `mrz`. For decoded name see `name` field. """
|
|
146
|
+
|
|
147
|
+
def __init__(self, core_short_name: str, build_type: DependencyBuildType):
|
|
148
|
+
name = _core_full_name_from_short_name(core_short_name)
|
|
149
|
+
super().__init__(name, build_type)
|
|
150
|
+
self.core_short_name = core_short_name
|
|
151
|
+
|
|
152
|
+
@property
|
|
153
|
+
def framework_name(self) -> str:
|
|
154
|
+
return "DocumentReaderCore.xcframework"
|
|
155
|
+
|
|
156
|
+
@property
|
|
157
|
+
def pod_name(self) -> str:
|
|
158
|
+
pod_name = f"DocumentReader{self.name}"
|
|
159
|
+
if self.build_type == DependencyBuildType.BETA:
|
|
160
|
+
pod_name = f"{pod_name}Beta"
|
|
161
|
+
elif self.build_type == DependencyBuildType.NIGHTLY:
|
|
162
|
+
pod_name = f"{pod_name}Nightly"
|
|
163
|
+
elif self.build_type == DependencyBuildType.STAGE:
|
|
164
|
+
pod_name = f"{pod_name}Stage"
|
|
165
|
+
return pod_name
|
|
166
|
+
|
|
167
|
+
@property
|
|
168
|
+
def pod_name_temp(self) -> str:
|
|
169
|
+
pod_name = f"DocumentReader{self.name}"
|
|
170
|
+
if self.build_type == DependencyBuildType.BETA:
|
|
171
|
+
pod_name = f"{pod_name}Beta"
|
|
172
|
+
elif self.build_type == DependencyBuildType.NIGHTLY:
|
|
173
|
+
pod_name = f"{pod_name}Nightly"
|
|
174
|
+
elif self.build_type == DependencyBuildType.STAGE:
|
|
175
|
+
pod_name = f"{pod_name}Stage"
|
|
176
|
+
elif self.build_type == DependencyBuildType.TEMP:
|
|
177
|
+
pod_name = f"{pod_name}Temp"
|
|
178
|
+
return pod_name
|
|
179
|
+
|
|
180
|
+
@property
|
|
181
|
+
def pod_short_name(self) -> str:
|
|
182
|
+
"""Core pod name without `DocumentReader` prefix. Example: `FullRFID`"""
|
|
183
|
+
pod_name = self.name
|
|
184
|
+
if self.build_type == DependencyBuildType.BETA:
|
|
185
|
+
pod_name = f"{pod_name}Beta"
|
|
186
|
+
elif self.build_type == DependencyBuildType.NIGHTLY:
|
|
187
|
+
pod_name = f"{pod_name}Nightly"
|
|
188
|
+
elif self.build_type == DependencyBuildType.STAGE:
|
|
189
|
+
pod_name = f"{pod_name}Stage"
|
|
190
|
+
return pod_name
|
|
191
|
+
|
|
192
|
+
def ftp_archive_name(self, version: str) -> str:
|
|
193
|
+
archive_name = "DocumentReaderCore"
|
|
194
|
+
if self.build_type == DependencyBuildType.BETA:
|
|
195
|
+
archive_name = f"{archive_name}Beta"
|
|
196
|
+
elif self.build_type == DependencyBuildType.NIGHTLY:
|
|
197
|
+
archive_name = f"{archive_name}Nightly"
|
|
198
|
+
elif self.build_type == DependencyBuildType.STAGE:
|
|
199
|
+
archive_name = f"{archive_name}Stage"
|
|
200
|
+
archive_name = f"{archive_name}_{self.core_short_name}_{version}"
|
|
201
|
+
return archive_name
|
|
202
|
+
|
|
203
|
+
@property
|
|
204
|
+
def ftp_project_path(self) -> str:
|
|
205
|
+
if self.build_type == DependencyBuildType.TEMP:
|
|
206
|
+
resource_path = f"iOS/{self.core_short_name}"
|
|
207
|
+
else:
|
|
208
|
+
resource_path = f"{self.pod_short_name}"
|
|
209
|
+
return resource_path
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
def make_dependency(name: str, build_type: DependencyBuildType) -> Dependency:
|
|
213
|
+
if _is_core_by_short_name(name):
|
|
214
|
+
return CoreDependency(name, build_type)
|
|
215
|
+
else:
|
|
216
|
+
return Dependency(name, build_type)
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
class DependencyVersion:
|
|
220
|
+
version: str
|
|
221
|
+
version_selector: str
|
|
222
|
+
build_type: DependencyBuildType
|
|
223
|
+
source: DependencySourceType
|
|
224
|
+
|
|
225
|
+
def __init__(
|
|
226
|
+
self,
|
|
227
|
+
version: str,
|
|
228
|
+
version_selector: str,
|
|
229
|
+
build_type: DependencyBuildType,
|
|
230
|
+
source: DependencySourceType,
|
|
231
|
+
):
|
|
232
|
+
self.version = version
|
|
233
|
+
self.version_selector = version_selector
|
|
234
|
+
self.build_type = build_type
|
|
235
|
+
self.source = source
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
def inject_destination_path(dependency: Dependency) -> str:
|
|
239
|
+
pods_directory = _find_pods_folder()
|
|
240
|
+
if pods_directory is not None:
|
|
241
|
+
existing_filepath, _ = _find_existing_pod_location(
|
|
242
|
+
root_pods_directory=pods_directory, dependency=dependency
|
|
243
|
+
)
|
|
244
|
+
if existing_filepath is not None:
|
|
245
|
+
return existing_filepath
|
|
246
|
+
else:
|
|
247
|
+
print(
|
|
248
|
+
f"[warning] host project contains Pods folder and the dependency may be resolved as Cocoapods, but there is no folder for the dependency: {dependency.name}. Please make sure the project's frameworks are linked correctly or run pod install prior this script."
|
|
249
|
+
)
|
|
250
|
+
|
|
251
|
+
filepath = f"{pods_directory}/{dependency.pod_name}"
|
|
252
|
+
return filepath
|
|
253
|
+
|
|
254
|
+
filepath = __script_call_location__
|
|
255
|
+
return filepath
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
def _find_pods_folder() -> str:
|
|
259
|
+
script_call_path = Path(__script_call_location__)
|
|
260
|
+
possible_project_locations = [
|
|
261
|
+
script_call_path,
|
|
262
|
+
script_call_path.parent,
|
|
263
|
+
script_call_path.parent.parent,
|
|
264
|
+
]
|
|
265
|
+
|
|
266
|
+
pods_marks = ["Pods", "Podfile", "Podfile.lock"]
|
|
267
|
+
for location in possible_project_locations:
|
|
268
|
+
print(f"[log] looking for pods in {location}")
|
|
269
|
+
host_project_files = os.listdir(location)
|
|
270
|
+
|
|
271
|
+
for mark in pods_marks:
|
|
272
|
+
for filename in host_project_files:
|
|
273
|
+
if filename == mark:
|
|
274
|
+
pods = location / "Pods"
|
|
275
|
+
print(f"[log] found pods at {pods}")
|
|
276
|
+
return pods
|
|
277
|
+
|
|
278
|
+
return None
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
def _find_existing_pod_location(
|
|
282
|
+
root_pods_directory: str, dependency: Dependency
|
|
283
|
+
) -> Tuple[str, DependencyBuildType]:
|
|
284
|
+
pod_name = dependency.pod_name
|
|
285
|
+
possible_names = [pod_name, pod_name.replace("Beta", ""), pod_name.replace("Nightly", ""),
|
|
286
|
+
pod_name.replace("Stage", ""), f"{pod_name}Beta", f"{pod_name}Nightly", f"{pod_name}Stage"]
|
|
287
|
+
|
|
288
|
+
is_core = isinstance(dependency, CoreDependency)
|
|
289
|
+
if is_core:
|
|
290
|
+
possible_names.append("DocumentReaderFull")
|
|
291
|
+
possible_names.append("DocumentReaderFullBeta")
|
|
292
|
+
possible_names.append("DocumentReaderFullNightly")
|
|
293
|
+
possible_names.append("DocumentReaderFullStage")
|
|
294
|
+
|
|
295
|
+
for name in possible_names:
|
|
296
|
+
path = f"{root_pods_directory}/{name}"
|
|
297
|
+
|
|
298
|
+
build_type = DependencyBuildType.RELEASE
|
|
299
|
+
if name.find("Beta") != -1:
|
|
300
|
+
build_type = DependencyBuildType.BETA
|
|
301
|
+
elif name.find("Nightly") != -1:
|
|
302
|
+
build_type = DependencyBuildType.NIGHTLY
|
|
303
|
+
elif name.find("Stage") != -1:
|
|
304
|
+
build_type = DependencyBuildType.STAGE
|
|
305
|
+
|
|
306
|
+
if os.path.exists(path):
|
|
307
|
+
return [path, build_type]
|
|
308
|
+
|
|
309
|
+
return [None, None]
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
def clean_coaopod(pod_name: str):
|
|
313
|
+
this_script_path = os.path.dirname(os.path.realpath(__file__))
|
|
314
|
+
subprocess.run(
|
|
315
|
+
["bash", "clean_cocoapod.sh", pod_name],
|
|
316
|
+
cwd=this_script_path,
|
|
317
|
+
check=True,
|
|
318
|
+
text=True,
|
|
319
|
+
stdout=subprocess.PIPE,
|
|
320
|
+
).stdout
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
class VersionResolver:
|
|
324
|
+
def resolve_dependency_version(
|
|
325
|
+
self, dependency: Dependency, version_selector: str, branch: str
|
|
326
|
+
) -> DependencyVersion:
|
|
327
|
+
version = self.fetch_version(version_selector, branch, dependency)
|
|
328
|
+
pods_directory = _find_pods_folder()
|
|
329
|
+
path, type = _find_existing_pod_location(
|
|
330
|
+
root_pods_directory=pods_directory, dependency=dependency
|
|
331
|
+
)
|
|
332
|
+
|
|
333
|
+
if type is not None:
|
|
334
|
+
# Note: check only for Beta dependency. Temp and Release types are kind of the same.
|
|
335
|
+
if (
|
|
336
|
+
dependency.build_type is DependencyBuildType.BETA
|
|
337
|
+
and type is not DependencyBuildType.BETA
|
|
338
|
+
):
|
|
339
|
+
print(
|
|
340
|
+
f"[warning] given dependency and resolved path do not math: dependency.type: {dependency.build_type} and path: {path}. Make sure the paths and the dependency name are correct."
|
|
341
|
+
)
|
|
342
|
+
print(
|
|
343
|
+
f"[warning] resolving dependency.type by Pods folder: {dependency.build_type}"
|
|
344
|
+
)
|
|
345
|
+
|
|
346
|
+
source: DependencySourceType
|
|
347
|
+
if path is not None:
|
|
348
|
+
source = DependencySourceType.COCOAPODS
|
|
349
|
+
elif dependency.build_type is DependencyBuildType.TEMP:
|
|
350
|
+
source = DependencySourceType.FTP_PRIVATE
|
|
351
|
+
else:
|
|
352
|
+
source = DependencySourceType.FTP_PUBLIC
|
|
353
|
+
|
|
354
|
+
return DependencyVersion(
|
|
355
|
+
version=version,
|
|
356
|
+
version_selector=version_selector,
|
|
357
|
+
build_type=type,
|
|
358
|
+
source=source,
|
|
359
|
+
)
|
|
360
|
+
|
|
361
|
+
def fetch_version(
|
|
362
|
+
self, version_selector: str, branch: str, dependency: Dependency
|
|
363
|
+
) -> Optional[str]:
|
|
364
|
+
version = version_selector
|
|
365
|
+
if (
|
|
366
|
+
version_selector == "+"
|
|
367
|
+
and dependency.build_type != DependencyBuildType.TEMP
|
|
368
|
+
):
|
|
369
|
+
full_pod_name = dependency.pod_name
|
|
370
|
+
print(f"[log] searching for pod version for: {full_pod_name}")
|
|
371
|
+
version = self._search_pod_version(full_pod_name)
|
|
372
|
+
if version == "":
|
|
373
|
+
print(
|
|
374
|
+
f"[warning] search pod version returned empty for dependency: {dependency.name}"
|
|
375
|
+
)
|
|
376
|
+
return None
|
|
377
|
+
elif dependency.build_type == DependencyBuildType.TEMP:
|
|
378
|
+
version = self._search_temp_version(branch, dependency)
|
|
379
|
+
|
|
380
|
+
if version == "+":
|
|
381
|
+
print(
|
|
382
|
+
f"[warning] unable to fetch version for dependency: {dependency.name} – version: {version}"
|
|
383
|
+
)
|
|
384
|
+
return None
|
|
385
|
+
|
|
386
|
+
return version
|
|
387
|
+
|
|
388
|
+
def _search_temp_version(
|
|
389
|
+
self, branch: str, dependency: Dependency
|
|
390
|
+
) -> Optional[str]:
|
|
391
|
+
from ios_ci.common import ftp
|
|
392
|
+
|
|
393
|
+
last_version: Optional[str] = None
|
|
394
|
+
|
|
395
|
+
url = ftp.make_ftp_project_url(dependency=dependency)
|
|
396
|
+
index = ftp.fetch_build_index(project_url=url)
|
|
397
|
+
if index:
|
|
398
|
+
last_version = index.version(branch=branch)
|
|
399
|
+
|
|
400
|
+
if last_version is None:
|
|
401
|
+
# Search the filesystem on shared volume for file with version.
|
|
402
|
+
# This method is usually not appropriate for anything other than Core builds
|
|
403
|
+
# because we have already migrated all the iOS SDK products to use BuildIndex.
|
|
404
|
+
#
|
|
405
|
+
# The only thing is left to use legacy version indexing via shared volumes is Core builds.
|
|
406
|
+
# Maybe we should migrate them at one point too, but it was decided to keep it as it is for now.
|
|
407
|
+
version_filepath = self._make_temp_version_filepath(branch, dependency)
|
|
408
|
+
last_version = self._read_version_from_file(version_filepath)
|
|
409
|
+
|
|
410
|
+
return last_version
|
|
411
|
+
|
|
412
|
+
def _search_pod_version(self, pod_name):
|
|
413
|
+
"""
|
|
414
|
+
Searches pod version in the repository
|
|
415
|
+
Returns a string in a format of `x.x.x` e.g. `5.7.487`
|
|
416
|
+
"""
|
|
417
|
+
this_script_path = os.path.dirname(os.path.realpath(__file__))
|
|
418
|
+
result = subprocess.run(
|
|
419
|
+
["bash", "searchpod.sh", pod_name],
|
|
420
|
+
cwd=this_script_path,
|
|
421
|
+
check=True,
|
|
422
|
+
text=True,
|
|
423
|
+
stdout=subprocess.PIPE,
|
|
424
|
+
).stdout
|
|
425
|
+
if result == "unknown":
|
|
426
|
+
return None
|
|
427
|
+
return result.replace("\n", "")
|
|
428
|
+
|
|
429
|
+
def _read_version_from_file(self, filepath):
|
|
430
|
+
if filepath is None:
|
|
431
|
+
print(f"[warning] [_read_version_from_file]. Filepath is None.")
|
|
432
|
+
return None
|
|
433
|
+
if not os.path.exists(filepath):
|
|
434
|
+
print(
|
|
435
|
+
f"[warning] [_read_version_from_file]. There is no file at path:{filepath}"
|
|
436
|
+
)
|
|
437
|
+
return None
|
|
438
|
+
|
|
439
|
+
content = None
|
|
440
|
+
with open(filepath, "r") as content_file:
|
|
441
|
+
content = content_file.read().replace("\n", "")
|
|
442
|
+
return content
|
|
443
|
+
|
|
444
|
+
def _make_temp_version_filepath(self, branch: str, dependency: Dependency) -> str:
|
|
445
|
+
prefix = "/Volumes/work/software/AutoBuild/MobileApp"
|
|
446
|
+
type = dependency.build_type.value
|
|
447
|
+
paths = {
|
|
448
|
+
"DocumentReader": f"/iOSApi/api_{branch}_{type}.txt",
|
|
449
|
+
"BTDevice": f"/iOSBTDevice/BTDevice_{branch}_{type}.txt",
|
|
450
|
+
"FaceSDK": f"/iOSFaceSDK/facesdk_{branch}_{type}.txt",
|
|
451
|
+
"RegulaCommon": f"/iOSCommon/common_api_{branch}_{type}.txt",
|
|
452
|
+
}
|
|
453
|
+
is_core = isinstance(dependency, CoreDependency)
|
|
454
|
+
if is_core:
|
|
455
|
+
dependency.__class__ = CoreDependency
|
|
456
|
+
path = f"/iOSCore/core_{dependency.core_short_name}_{branch}_{type}.txt"
|
|
457
|
+
else:
|
|
458
|
+
path = paths.get(dependency.name)
|
|
459
|
+
|
|
460
|
+
if path:
|
|
461
|
+
return prefix + path
|
|
462
|
+
else:
|
|
463
|
+
print(
|
|
464
|
+
f"[error] the dependency: {dependency.name} is unknown. There is no .txt version file on local disk."
|
|
465
|
+
)
|
|
466
|
+
return None
|