@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,15 @@
|
|
|
1
|
+
import XCTest
|
|
2
|
+
@testable import Danger
|
|
3
|
+
@testable import RegulaDanger
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
final class RegulaDangerTests: XCTestCase {
|
|
7
|
+
func testAllGood() {
|
|
8
|
+
let hello = "Hello, World!"
|
|
9
|
+
XCTAssertEqual(hello, "Hello, World!")
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
static var allTests = [
|
|
13
|
+
("testAllGood", testAllGood),
|
|
14
|
+
]
|
|
15
|
+
}
|
|
@@ -0,0 +1,408 @@
|
|
|
1
|
+
import click
|
|
2
|
+
from ios_ci.spm import spm
|
|
3
|
+
from ios_ci import inject
|
|
4
|
+
from ios_ci import upload_build
|
|
5
|
+
from ios_ci import version
|
|
6
|
+
from ios_ci.common import dependency
|
|
7
|
+
from ios_ci.podspec import podspec
|
|
8
|
+
|
|
9
|
+
#
|
|
10
|
+
# NOTE: click framework documentation: https://click.palletsprojects.com/en/8.0.x/
|
|
11
|
+
#
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@click.group()
|
|
15
|
+
def cli():
|
|
16
|
+
"""Collection of tools related to Continuous Integration for iOS Platform"""
|
|
17
|
+
pass
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
@cli.command()
|
|
21
|
+
@click.option(
|
|
22
|
+
"-n",
|
|
23
|
+
"--name",
|
|
24
|
+
required=True,
|
|
25
|
+
type=str,
|
|
26
|
+
help="a name of a dependency without `Beta` suffix. For Core dependency use short lowercase name.",
|
|
27
|
+
metavar="`FaceSDK`, `fullrfid`, `DocumentReader`",
|
|
28
|
+
)
|
|
29
|
+
@click.option(
|
|
30
|
+
"-v",
|
|
31
|
+
"--version",
|
|
32
|
+
required=True,
|
|
33
|
+
type=str,
|
|
34
|
+
help="a version of a dependency.",
|
|
35
|
+
metavar="`x.x.x` | `+`",
|
|
36
|
+
)
|
|
37
|
+
@click.option(
|
|
38
|
+
"-t",
|
|
39
|
+
"--type",
|
|
40
|
+
required=True,
|
|
41
|
+
type=click.Choice(["Release", "Beta", "Temp", "Nightly", "Stage"], case_sensitive=True),
|
|
42
|
+
help="a type of a dependency.",
|
|
43
|
+
metavar="`Release` | `Beta` | `Temp` | `Nightly` | `Stage`",
|
|
44
|
+
)
|
|
45
|
+
@click.option(
|
|
46
|
+
"-b",
|
|
47
|
+
"--branch",
|
|
48
|
+
default="none",
|
|
49
|
+
type=str,
|
|
50
|
+
help="a branch for Temp dependency. [required] for --type Temp",
|
|
51
|
+
metavar="`develop`",
|
|
52
|
+
)
|
|
53
|
+
@click.option(
|
|
54
|
+
"-d",
|
|
55
|
+
"--dest",
|
|
56
|
+
type=click.Path(exists=True, file_okay=False, resolve_path=True),
|
|
57
|
+
help="a path location for the dependency. [optional]",
|
|
58
|
+
)
|
|
59
|
+
def inject_dependency(name, version, type, branch, dest):
|
|
60
|
+
"""
|
|
61
|
+
Downloads and unzips specified dependency.
|
|
62
|
+
|
|
63
|
+
Supports exact version and `+`.
|
|
64
|
+
Finds the most appropriate location for the framework to store if the directory is not specified explicitly.
|
|
65
|
+
If there is a Pods directory - the dependency will be injected there.
|
|
66
|
+
Otherwise the location is the root of the host project.
|
|
67
|
+
"""
|
|
68
|
+
|
|
69
|
+
if type == "Temp" and branch == "none":
|
|
70
|
+
raise click.UsageError("The option --branch is [required] for --type `Temp`")
|
|
71
|
+
|
|
72
|
+
inject.inject_dependency(
|
|
73
|
+
name=name,
|
|
74
|
+
version_selector=version,
|
|
75
|
+
dependency_type=type,
|
|
76
|
+
branch=branch,
|
|
77
|
+
destination=dest,
|
|
78
|
+
)
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
@cli.command()
|
|
82
|
+
@click.option(
|
|
83
|
+
"-n",
|
|
84
|
+
"--name",
|
|
85
|
+
required=True,
|
|
86
|
+
type=str,
|
|
87
|
+
help="a name of a dependency without `Beta` suffix. For Core dependency use short lowercase name.",
|
|
88
|
+
metavar="`FaceSDK`, `fullrfid`, `DocumentReader`",
|
|
89
|
+
)
|
|
90
|
+
@click.option(
|
|
91
|
+
"-v",
|
|
92
|
+
"--version",
|
|
93
|
+
required=True,
|
|
94
|
+
type=str,
|
|
95
|
+
help="a version of a dependency.",
|
|
96
|
+
metavar="`x.x.x` | `+`",
|
|
97
|
+
)
|
|
98
|
+
@click.option(
|
|
99
|
+
"-t",
|
|
100
|
+
"--type",
|
|
101
|
+
required=True,
|
|
102
|
+
type=click.Choice(["Release", "Beta", "Temp", "Nightly", "Stage"], case_sensitive=True),
|
|
103
|
+
help="a type of a dependency.",
|
|
104
|
+
metavar="`Release` | `Beta` | `Temp` | `Nightly` | `Stage`",
|
|
105
|
+
)
|
|
106
|
+
@click.option(
|
|
107
|
+
"-b",
|
|
108
|
+
"--branch",
|
|
109
|
+
default="none",
|
|
110
|
+
type=str,
|
|
111
|
+
help="a branch for Temp dependency to update the index.toml. [required] for --type Temp",
|
|
112
|
+
metavar="`develop`",
|
|
113
|
+
)
|
|
114
|
+
@click.option(
|
|
115
|
+
"-p",
|
|
116
|
+
"--path",
|
|
117
|
+
required=True,
|
|
118
|
+
type=click.Path(exists=True, file_okay=False, resolve_path=True),
|
|
119
|
+
help="a location of the [xc]framework folder.",
|
|
120
|
+
)
|
|
121
|
+
def ftp_upload(name, version, type, branch, path):
|
|
122
|
+
"""
|
|
123
|
+
Determines the ftp location (private or public FTP server) by the name and the version of a package.
|
|
124
|
+
Creates .zip archive and upload the build to the server.
|
|
125
|
+
|
|
126
|
+
Prompts the user with credentials for the FTP server. To skip the interaction please specify
|
|
127
|
+
environment variables:
|
|
128
|
+
[PUBLIC_UPLOAD_FTP_USERNAME] [PUBLIC_UPLOAD_FTP_PASSWORD]
|
|
129
|
+
[PRIVATE_UPLOAD_FTP_USERNAME] [PRIVATE_UPLOAD_FTP_PASSWORD]
|
|
130
|
+
"""
|
|
131
|
+
|
|
132
|
+
if type == "Temp" and branch == "none":
|
|
133
|
+
raise click.UsageError("The option --branch is [required] for --type `Temp`")
|
|
134
|
+
|
|
135
|
+
upload_build.upload_build(
|
|
136
|
+
name=name,
|
|
137
|
+
version=version,
|
|
138
|
+
dependency_type=type,
|
|
139
|
+
branch=branch,
|
|
140
|
+
build_location=path,
|
|
141
|
+
)
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
@cli.command()
|
|
145
|
+
@click.option(
|
|
146
|
+
"-n",
|
|
147
|
+
"--name",
|
|
148
|
+
required=True,
|
|
149
|
+
type=str,
|
|
150
|
+
help="a name of a dependency without `Beta` suffix. For Core dependency use short lowercase name.",
|
|
151
|
+
metavar="`FaceSDK`, `fullrfid`, `DocumentReader`",
|
|
152
|
+
)
|
|
153
|
+
@click.option(
|
|
154
|
+
"-v",
|
|
155
|
+
"--version",
|
|
156
|
+
required=True,
|
|
157
|
+
type=str,
|
|
158
|
+
help="a version of a dependency.",
|
|
159
|
+
metavar="`x.x.x` | `+`",
|
|
160
|
+
)
|
|
161
|
+
@click.option(
|
|
162
|
+
"-b",
|
|
163
|
+
"--branch",
|
|
164
|
+
default="none",
|
|
165
|
+
type=str,
|
|
166
|
+
help="a branch for Temp dependency to update the index.toml. [required] for --type Temp",
|
|
167
|
+
metavar="`develop`",
|
|
168
|
+
)
|
|
169
|
+
def ftp_update_index_toml(name, version, branch):
|
|
170
|
+
"""
|
|
171
|
+
Only for Temp build type. Adds current version and branch to index.toml
|
|
172
|
+
"""
|
|
173
|
+
|
|
174
|
+
upload_build.update_index_toml(name=name, version=version, branch=branch)
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
@cli.command()
|
|
178
|
+
@click.option(
|
|
179
|
+
"-n",
|
|
180
|
+
"--name",
|
|
181
|
+
required=True,
|
|
182
|
+
type=str,
|
|
183
|
+
help="a name of a dependency without `Beta` suffix.",
|
|
184
|
+
metavar="`FaceSDK`, `Common`, `DocumentReader`",
|
|
185
|
+
)
|
|
186
|
+
@click.option(
|
|
187
|
+
"-v",
|
|
188
|
+
"--version",
|
|
189
|
+
required=True,
|
|
190
|
+
type=str,
|
|
191
|
+
help="plugin version.",
|
|
192
|
+
metavar="`x.x.x` | `+`",
|
|
193
|
+
)
|
|
194
|
+
@click.option(
|
|
195
|
+
"-w",
|
|
196
|
+
"--wrapper",
|
|
197
|
+
required=True,
|
|
198
|
+
type=str,
|
|
199
|
+
help="Wrapper name.",
|
|
200
|
+
metavar="`react`, `cordova`, `flutter`, `ionic`, `xamarin`",
|
|
201
|
+
)
|
|
202
|
+
@click.option(
|
|
203
|
+
"-p",
|
|
204
|
+
"--path",
|
|
205
|
+
required=True,
|
|
206
|
+
type=click.Path(exists=True, file_okay=False, resolve_path=True),
|
|
207
|
+
help="a location of the plugin folder.",
|
|
208
|
+
)
|
|
209
|
+
def ftp_upload_wrapper(name, version, wrapper, path):
|
|
210
|
+
"""
|
|
211
|
+
Creates .zip archive and upload the build to the server.
|
|
212
|
+
|
|
213
|
+
Prompts the user with credentials for the FTP server. To skip the interaction please specify
|
|
214
|
+
environment variables:
|
|
215
|
+
[PUBLIC_UPLOAD_FTP_USERNAME] [PUBLIC_UPLOAD_FTP_PASSWORD]
|
|
216
|
+
[PRIVATE_UPLOAD_FTP_USERNAME] [PRIVATE_UPLOAD_FTP_PASSWORD]
|
|
217
|
+
"""
|
|
218
|
+
|
|
219
|
+
upload_build.upload_wrapper(
|
|
220
|
+
name=name,
|
|
221
|
+
version=version,
|
|
222
|
+
wrapper=wrapper,
|
|
223
|
+
build_location=path,
|
|
224
|
+
)
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
@cli.command()
|
|
228
|
+
@click.option(
|
|
229
|
+
"-n",
|
|
230
|
+
"--name",
|
|
231
|
+
required=True,
|
|
232
|
+
type=str,
|
|
233
|
+
help="a name of a dependency without `Beta` suffix. For Core dependency use short lowercase name.",
|
|
234
|
+
metavar="`FaceSDK`, `fullrfid`, `DocumentReader`",
|
|
235
|
+
)
|
|
236
|
+
@click.option(
|
|
237
|
+
"-t",
|
|
238
|
+
"--type",
|
|
239
|
+
required=True,
|
|
240
|
+
type=click.Choice(["Release", "Beta", "Temp", "Nightly", "Stage"], case_sensitive=True),
|
|
241
|
+
help="a type of a dependency.",
|
|
242
|
+
metavar="`Release` | `Beta` | `Temp` | `Nightly` | `Stage`",
|
|
243
|
+
)
|
|
244
|
+
@click.option(
|
|
245
|
+
"-b",
|
|
246
|
+
"--branch",
|
|
247
|
+
default="none",
|
|
248
|
+
type=str,
|
|
249
|
+
help="a branch for Temp dependency. [required] for --type Temp",
|
|
250
|
+
metavar="`develop`",
|
|
251
|
+
)
|
|
252
|
+
def dependency_version(name, type, branch):
|
|
253
|
+
"""
|
|
254
|
+
Fetches the version of a package by the name and the type.
|
|
255
|
+
"""
|
|
256
|
+
if type == "Temp" and branch == "none":
|
|
257
|
+
raise click.UsageError("The option --branch is [required] for --type `Temp`")
|
|
258
|
+
|
|
259
|
+
result = version.fetch_version(name=name, type=type, branch=branch)
|
|
260
|
+
if result is None:
|
|
261
|
+
click.echo("Failed to fetch version", err=True)
|
|
262
|
+
exit(1)
|
|
263
|
+
else:
|
|
264
|
+
click.echo(f"Dependency version: {result}")
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
@cli.command()
|
|
268
|
+
@click.option(
|
|
269
|
+
"--package-name",
|
|
270
|
+
type=str,
|
|
271
|
+
help="The name of the package used to create a link to pods.regulaforensics.",
|
|
272
|
+
metavar="PACKAGE_NAME",
|
|
273
|
+
)
|
|
274
|
+
@click.option(
|
|
275
|
+
"-v",
|
|
276
|
+
"--version",
|
|
277
|
+
required=True,
|
|
278
|
+
type=str,
|
|
279
|
+
help="a version of a new SDK to be published.",
|
|
280
|
+
metavar="`x.x.x`",
|
|
281
|
+
)
|
|
282
|
+
@click.option(
|
|
283
|
+
"--collection-update",
|
|
284
|
+
type=str,
|
|
285
|
+
help="Updates spm collection.",
|
|
286
|
+
metavar="COLLECTION_UPDATE",
|
|
287
|
+
)
|
|
288
|
+
@click.option(
|
|
289
|
+
"--common-version",
|
|
290
|
+
type=str,
|
|
291
|
+
help="a version of the RegulaCommon dependency.",
|
|
292
|
+
metavar="`x.x.x`",
|
|
293
|
+
)
|
|
294
|
+
@click.option(
|
|
295
|
+
"-b",
|
|
296
|
+
"--branch",
|
|
297
|
+
required=True,
|
|
298
|
+
type=str,
|
|
299
|
+
help="a branch from which the Package.swift will be used as a template.",
|
|
300
|
+
metavar="develop",
|
|
301
|
+
)
|
|
302
|
+
def update_spm(package_name, version, collection_update, common_version, branch):
|
|
303
|
+
"""Updates the SPM repository manifest with provided version and .zip archived build."""
|
|
304
|
+
spm.update_spm(
|
|
305
|
+
package_name=package_name, #for post build sh input name
|
|
306
|
+
build_version=version,
|
|
307
|
+
collection_update=collection_update,
|
|
308
|
+
common_version=common_version,
|
|
309
|
+
zipped_build_filepath="README.md",
|
|
310
|
+
spm_repo_url="repo",
|
|
311
|
+
spm_repo_template_branch=branch,
|
|
312
|
+
)
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
@cli.command()
|
|
316
|
+
@click.option(
|
|
317
|
+
"-n",
|
|
318
|
+
"--name",
|
|
319
|
+
required=True,
|
|
320
|
+
type=str,
|
|
321
|
+
help="a name of a dependency without `Beta` suffix. For Core dependency use short lowercase name.",
|
|
322
|
+
metavar="`FaceSDK`, `fullrfid`, `DocumentReader`",
|
|
323
|
+
)
|
|
324
|
+
@click.option(
|
|
325
|
+
"-v",
|
|
326
|
+
"--version",
|
|
327
|
+
required=True,
|
|
328
|
+
type=str,
|
|
329
|
+
help="a version of a dependency.",
|
|
330
|
+
metavar="`x.x.x`",
|
|
331
|
+
)
|
|
332
|
+
@click.option(
|
|
333
|
+
"-t",
|
|
334
|
+
"--type",
|
|
335
|
+
required=True,
|
|
336
|
+
type=click.Choice(["Release", "Beta", "Temp", "Nightly", "Stage"], case_sensitive=True),
|
|
337
|
+
help="a type of a dependency.",
|
|
338
|
+
metavar="`Release` | `Beta` | `Temp` | `Nightly` | `Stage`",
|
|
339
|
+
)
|
|
340
|
+
@click.option(
|
|
341
|
+
"-d",
|
|
342
|
+
"--dependency",
|
|
343
|
+
nargs=3,
|
|
344
|
+
type=click.Tuple(
|
|
345
|
+
[str, str, click.Choice(["Release", "Beta", "Temp", "Nightly", "Stage"], case_sensitive=True)]
|
|
346
|
+
),
|
|
347
|
+
help="a dependency for a podspec",
|
|
348
|
+
metavar="`name` `version` `type`",
|
|
349
|
+
)
|
|
350
|
+
@click.option(
|
|
351
|
+
"-d",
|
|
352
|
+
"--dest",
|
|
353
|
+
type=click.Path(exists=True, file_okay=False, resolve_path=True),
|
|
354
|
+
help="a path location for the output files. [optional]",
|
|
355
|
+
)
|
|
356
|
+
def create_podspec(name, version, type, dependency, dest):
|
|
357
|
+
"""
|
|
358
|
+
Creates a podspec file for a package at a given location with a dependency.
|
|
359
|
+
Packages such as FaceSDK, DocumentReader and IRS require specifying a dependency.
|
|
360
|
+
"""
|
|
361
|
+
import re
|
|
362
|
+
|
|
363
|
+
version_pattern = "^\d+\.\d+\.\d+$"
|
|
364
|
+
if not re.search(version_pattern, version):
|
|
365
|
+
raise click.UsageError(
|
|
366
|
+
"The option --version must be in a format of 'x.x.x' where x is a digit."
|
|
367
|
+
)
|
|
368
|
+
|
|
369
|
+
if name in ["FaceSDK", "DocumentReader"] and dependency is None:
|
|
370
|
+
raise click.UsageError(
|
|
371
|
+
f"The option --dependency is [required] for the {name} podspec creation."
|
|
372
|
+
)
|
|
373
|
+
if dependency:
|
|
374
|
+
if not re.search(version_pattern, dependency[1]):
|
|
375
|
+
raise click.UsageError(
|
|
376
|
+
"The option --version must be in a format of 'x.x.x' where `x` is a digit."
|
|
377
|
+
)
|
|
378
|
+
|
|
379
|
+
result = podspec.make_podspec(
|
|
380
|
+
name=name,
|
|
381
|
+
version=version,
|
|
382
|
+
type=type,
|
|
383
|
+
dependency_name=dependency[0] if dependency else None,
|
|
384
|
+
dependency_version=dependency[1] if dependency else None,
|
|
385
|
+
dependency_type=dependency[2] if dependency else None,
|
|
386
|
+
output_location_directory=dest,
|
|
387
|
+
)
|
|
388
|
+
if result is None:
|
|
389
|
+
click.echo("Failed to create podspec", err=True)
|
|
390
|
+
exit(1)
|
|
391
|
+
else:
|
|
392
|
+
click.echo(f"Created podspec at: {result}")
|
|
393
|
+
|
|
394
|
+
|
|
395
|
+
@cli.command()
|
|
396
|
+
@click.option(
|
|
397
|
+
"-n",
|
|
398
|
+
"--name",
|
|
399
|
+
required=True,
|
|
400
|
+
type=str,
|
|
401
|
+
help="a short version of corename.",
|
|
402
|
+
metavar="fullauthrfid",
|
|
403
|
+
)
|
|
404
|
+
def core_full_name_from_short_name(name):
|
|
405
|
+
click.echo(dependency._core_full_name_from_short_name(name))
|
|
406
|
+
|
|
407
|
+
if __name__ == "__main__":
|
|
408
|
+
cli()
|
|
File without changes
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
from dataclasses import dataclass
|
|
3
|
+
from typing import List
|
|
4
|
+
from typing import Dict
|
|
5
|
+
from typing import Optional
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
@dataclass
|
|
9
|
+
class BuildIndex:
|
|
10
|
+
branches: List[str]
|
|
11
|
+
builds: Dict[str, List[str]]
|
|
12
|
+
|
|
13
|
+
def add_version(self, version: str, branch: str):
|
|
14
|
+
if branch in self.branches:
|
|
15
|
+
builds = self.builds[branch]
|
|
16
|
+
if version not in builds:
|
|
17
|
+
builds.append(version)
|
|
18
|
+
else:
|
|
19
|
+
self.branches.append(branch)
|
|
20
|
+
self.builds[branch] = [version]
|
|
21
|
+
|
|
22
|
+
def version(self, branch: str) -> Optional[str]:
|
|
23
|
+
if branch in self.branches and len(self.builds[branch]) > 0:
|
|
24
|
+
last_element = self.builds[branch][-1]
|
|
25
|
+
return last_element
|
|
26
|
+
return None
|
|
27
|
+
|
|
28
|
+
@classmethod
|
|
29
|
+
def empty(cls) -> BuildIndex:
|
|
30
|
+
return BuildIndex(branches=[], builds={})
|
|
31
|
+
|
|
32
|
+
@classmethod
|
|
33
|
+
def from_json(cls, json: dict) -> Optional[BuildIndex]:
|
|
34
|
+
if "branches" not in json.keys():
|
|
35
|
+
return None
|
|
36
|
+
try:
|
|
37
|
+
mapped_builds: dict[str, list[str]] = {}
|
|
38
|
+
for branch_key, values in json["branches"].items():
|
|
39
|
+
if "builds" not in values.keys():
|
|
40
|
+
return None
|
|
41
|
+
builds = values["builds"]
|
|
42
|
+
if not builds:
|
|
43
|
+
return None
|
|
44
|
+
mapped_builds[branch_key] = builds.copy()
|
|
45
|
+
branches = list(json["branches"].keys())
|
|
46
|
+
except AttributeError as error:
|
|
47
|
+
print(
|
|
48
|
+
f"[error] failed to parse BuildIndex from json: {json}. Error: {error}"
|
|
49
|
+
)
|
|
50
|
+
return None
|
|
51
|
+
|
|
52
|
+
index = BuildIndex(branches=branches, builds=mapped_builds)
|
|
53
|
+
return index
|
|
54
|
+
|
|
55
|
+
def to_json(self) -> dict:
|
|
56
|
+
from datetime import datetime
|
|
57
|
+
|
|
58
|
+
updated_at = datetime.utcnow().isoformat()
|
|
59
|
+
branches = {}
|
|
60
|
+
for branch_name in self.branches:
|
|
61
|
+
json_branch = {"builds": self.builds[branch_name]}
|
|
62
|
+
branches[branch_name] = json_branch
|
|
63
|
+
json = {
|
|
64
|
+
"metadata": {
|
|
65
|
+
"version": 1,
|
|
66
|
+
"updated_at": updated_at,
|
|
67
|
+
},
|
|
68
|
+
"branches": branches,
|
|
69
|
+
}
|
|
70
|
+
return json
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/bin/bash -l
|
|
2
|
+
|
|
3
|
+
PODNAME=$1
|
|
4
|
+
output=$(pod trunk info ${PODNAME})
|
|
5
|
+
|
|
6
|
+
while read -r line; do
|
|
7
|
+
version=$(echo "$line" | egrep -oh '\d+\.\d+\.\d+')
|
|
8
|
+
upload_date=$(echo "$line" | egrep -oh '\d{4}-\d{2}-\d{2}')
|
|
9
|
+
if [[ $(gdate -d "60 days ago" +'%s') > $(gdate -d "${upload_date}" +'%s') ]]; then
|
|
10
|
+
echo "Deleting pod: ${PODNAME} Version: $version upload date: ${upload_date}"
|
|
11
|
+
echo "yes" | pod trunk delete ${PODNAME} $version --silent
|
|
12
|
+
fi
|
|
13
|
+
done <<< "$(echo "$output" | egrep -oh '\d+\.\d+\.\d+.+\d{4}-\d{2}-\d{2}')"
|