[js/react_native] Create ONNX Runtime React Native pipeline (#10474)
* Pipeline for ONNX Runtime react native * Fix a test failure * test with custom built binaries * add onnxruntime-common package back * don't bob build when bootstrap * revise Android test * rename example to e2e * remove onnxruntime packages from package.json * remove release-it package * upgrade gradle version to the same as CI * add a pipeline for react native * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * android and ios mobile build for react native e2e * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * use android aar package template * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * use android aar package template * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * publish ios test results * add e2e tests and publish a npm package * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * remove aar from npm package * wait for view displayed * change a waiting logic * increase wait time for app launching * give more time to launch an app * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * disable metro server on testing * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * test ios simulator launching * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * fix iOS e2e test * use a publishing version of npm packages * make pretty * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * make only one onnxruntime-common package after packaging * make a powershell script of packaging universal * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * Add a warning for file changes during a test * clean up * fix lint errors * fix js npm packaging * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * Update mac-react-native-ci-pipeline.yml for Azure Pipelines * resolve comments * fix a typo
|
|
@ -160,7 +160,7 @@ module.exports = {
|
|||
'@typescript-eslint/naming-convention': 'off'
|
||||
}
|
||||
}, {
|
||||
files: ['react_native/example/src/**/*.ts', 'react_native/example/src/**/*.tsx'], rules: {
|
||||
files: ['react_native/e2e/src/**/*.ts', 'react_native/e2e/src/**/*.tsx'], rules: {
|
||||
'@typescript-eslint/no-non-null-assertion': 'off',
|
||||
'@typescript-eslint/no-unnecessary-type-assertion': 'off',
|
||||
'unicorn/filename-case': 'off',
|
||||
|
|
|
|||
47
js/README.md
|
|
@ -363,12 +363,10 @@ By default, ONNX Runtime React Native leverages ONNX Runtime Mobile package with
|
|||
|
||||
4. Copy `<BUILD_DIRECTORY>/aar_out/MinSizeRel/com/microsoft/onnxruntime/onnxruntime-mobile/<version>/onnxruntime-mobile-<version>.aar` into `<ORT_ROOT>/js/react_native/android/libs` directory.
|
||||
|
||||
5. Modify `Onnxruntime_mobileVersion` property in `<ORT_ROOT>/js/react_native/android/build.properties` to consume a locally built package or a newly published package from Maven.
|
||||
|
||||
6. To verify, open Android Emulator and run this command from `<ORT_ROOT>/js/react_native/android`
|
||||
5. To verify, open Android Emulator and run this command from `<ORT_ROOT>/js/react_native/android`
|
||||
|
||||
```sh
|
||||
adb shell am instrument -w ai.onnxruntime.react_native.test/androidx.test.runner.AndroidJUnitRunner
|
||||
./gradlew connectedDebugAndroidTest
|
||||
```
|
||||
|
||||
3. Build iOS ONNX Runtime package
|
||||
|
|
@ -393,38 +391,57 @@ By default, ONNX Runtime React Native leverages ONNX Runtime Mobile package with
|
|||
|
||||
```sh
|
||||
pod install
|
||||
xcodebuild test -workspace OnnxruntimeModule.xcworkspace -scheme OnnxruntimeModuleTest -destination 'platform=iOS Simulator,name=iPhone 11,OS=15.0'
|
||||
xcodebuild test -workspace OnnxruntimeModule.xcworkspace -scheme OnnxruntimeModuleTest -destination 'platform=iOS Simulator,OS=latest,name=iPhone 13'
|
||||
```
|
||||
|
||||
4. Test an example for Android and iOS. In Windows, open Android Emulator first.
|
||||
4. Test Android and iOS apps. In Windows, open Android Emulator first.
|
||||
|
||||
`debug.keystore` must be generated ahead for Android example.
|
||||
|
||||
```sh
|
||||
keytool -genkey -v -keystore <ORT_ROOT>/js/react_native/example/android/app/debug.keystore -alias androiddebugkey -storepass android -keypass android -keyalg RSA -keysize 2048 -validity 999999 -dname "CN=Android Debug,O=Android,C=US"
|
||||
keytool -genkey -v -keystore <ORT_ROOT>/js/react_native/e2e/android/debug.keystore -alias androiddebugkey -storepass android -keypass android -keyalg RSA -keysize 2048 -validity 999999 -dname "CN=Android Debug,O=Android,C=US"
|
||||
```
|
||||
|
||||
From `<ORT_ROOT>/js/react_native,
|
||||
|
||||
```sh
|
||||
yarn bootstrap
|
||||
yarn example ios
|
||||
yarn example android
|
||||
```
|
||||
|
||||
When testing with a custom built ONNX Runtime Android package, copy `<BUILD_DIRECTORY>/aar_out/MinSizeRel/com/microsoft/onnxruntime/onnxruntime-mobile/<version>/onnxruntime-mobile-<version>.aar` into `<ORT_ROOT>/js/react_native/e2e/node_modules/onnxruntime-react-native/android/libs` directory. Using a custom built ONNX Runtime iOS package, copy `onnxruntime-mobile-c.zip` into `<ORT_ROOT>/js/react_native/local_pods` directory if it's not already done.
|
||||
|
||||
From `<ORT_ROOT>/js/react_native/e2e/android`, run e2e Android tests as follows,
|
||||
|
||||
```sh
|
||||
./gradlew :app:connectedDebugAndroidTest
|
||||
```
|
||||
|
||||
From `<ORT_ROOT>/js/react_native/e2e/ios`, run e2e iOS tests as follows,
|
||||
|
||||
```sh
|
||||
xcrun xcodebuild test -workspace OnnxruntimeModuleExample.xcworkspace -scheme OnnxruntimeModuleExample -destination 'platform=iOS Simulator,OS=latest,name=iPhone 13'
|
||||
```
|
||||
|
||||
***`yarn bootstrap` changes `packages.json` and `yarn.lock` files. Once testing is done, restore changes to avoid unwanted commit.***
|
||||
|
||||
5. Run Android and iOS apps.
|
||||
|
||||
```sh
|
||||
yarn e2e android
|
||||
yarn e2e ios
|
||||
```
|
||||
|
||||
### NPM Packaging
|
||||
|
||||
1. Update a version using `npm verison <version>` from `<ORT_ROOT>/js/react_native` folder. If it's for a dev, use `npm version <version>-dev.<subversion>`
|
||||
|
||||
2. Modify Onnxruntime_mobileVersion property in `<ORT_ROOT>/js/react_native/android/build.properties` to update ONNX Runtime Android package version.
|
||||
2. Run `yarn prepack-rel` to change `onnxruntime-common` to point to a published npm package
|
||||
|
||||
3. Run `yarn prepack` to change `onnxruntime-common` to point to a published npm package
|
||||
3. Run `npm pack` and verify NPM package contents
|
||||
|
||||
4. Run `npm pack` and verify NPM package contents
|
||||
4. Run `npm publish <tgz> --dry-run` to see how it's going to be published
|
||||
|
||||
5. Run `npm publish <tgz> --dry-run` to see how it's going to be published
|
||||
|
||||
6. Run `npm publish <tgz>` to publish to npmjs. If it's for a dev, add flag `--tag dev`.
|
||||
5. Run `npm publish <tgz>` to publish to npmjs. If it's for a dev, add flag `--tag dev`.
|
||||
|
||||
### Distribution
|
||||
|
||||
|
|
|
|||
2
js/react_native/.gitignore
vendored
|
|
@ -36,7 +36,7 @@ android.iml
|
|||
# Cocoapods
|
||||
#
|
||||
ios/Pods/
|
||||
example/ios/Pods/
|
||||
e2e/ios/Pods/
|
||||
|
||||
# node.js
|
||||
#
|
||||
|
|
|
|||
|
|
@ -121,8 +121,6 @@ repositories {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
def onnxruntimeMobileVersion = project.properties['Onnxruntime_mobileVersion']
|
||||
|
||||
// noinspection GradleDynamicVersion
|
||||
api "com.facebook.react:react-native:+"
|
||||
api "org.mockito:mockito-core:2.28.2"
|
||||
|
|
@ -134,5 +132,5 @@ dependencies {
|
|||
|
||||
androidTestImplementation "com.linkedin.dexmaker:dexmaker-mockito-inline-extended:2.28.1"
|
||||
|
||||
implementation "com.microsoft.onnxruntime:onnxruntime-mobile:$onnxruntimeMobileVersion@aar"
|
||||
implementation "com.microsoft.onnxruntime:onnxruntime-mobile:latest.integration@aar"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,4 +16,3 @@ android.useAndroidX=true
|
|||
OnnxruntimeModule_buildToolsVersion=29.0.2
|
||||
OnnxruntimeModule_compileSdkVersion=29
|
||||
OnnxruntimeModule_targetSdkVersion=29
|
||||
Onnxruntime_mobileVersion=1.8.2
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
#Tue Jan 26 16:57:19 PST 2021
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
|
||||
|
|
|
|||
|
|
@ -82,6 +82,7 @@ esac
|
|||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
|
|
@ -129,6 +130,7 @@ fi
|
|||
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
|
|
@ -5,7 +5,7 @@
|
|||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem http://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
|
|
@ -84,6 +84,7 @@ set CMD_LINE_ARGS=%*
|
|||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||
|
||||
|
|
@ -133,6 +133,8 @@ android {
|
|||
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
splits {
|
||||
abi {
|
||||
|
|
@ -144,16 +146,13 @@ android {
|
|||
}
|
||||
signingConfigs {
|
||||
debug {
|
||||
storeFile file('debug.keystore')
|
||||
storePassword 'android'
|
||||
storeFile rootProject.file('debug.keystore')
|
||||
keyAlias 'androiddebugkey'
|
||||
keyPassword 'android'
|
||||
storePassword 'android'
|
||||
}
|
||||
}
|
||||
buildTypes {
|
||||
debug {
|
||||
signingConfig signingConfigs.debug
|
||||
}
|
||||
release {
|
||||
// Caution! In production, you need to generate your own keystore file.
|
||||
// see https://reactnative.dev/docs/signed-apk-android.
|
||||
|
|
@ -183,7 +182,6 @@ dependencies {
|
|||
//noinspection GradleDynamicVersion
|
||||
implementation "com.facebook.react:react-native:+" // From node_modules
|
||||
|
||||
|
||||
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
|
||||
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
|
||||
exclude group:'com.facebook.fbjni'
|
||||
|
|
@ -204,7 +202,11 @@ dependencies {
|
|||
implementation jscFlavor
|
||||
}
|
||||
|
||||
implementation project(':onnxruntimereactnative')
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
|
||||
androidTestImplementation 'androidx.test:runner:1.4.0'
|
||||
androidTestImplementation 'androidx.test:rules:1.4.0'
|
||||
|
||||
implementation project(':onnxruntime-react-native')
|
||||
}
|
||||
|
||||
// Run this once to be able to run the application with BUCK
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
package com.example.reactnativeonnxruntimemodule;
|
||||
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.test.espresso.NoMatchingViewException;
|
||||
import androidx.test.espresso.UiController;
|
||||
import androidx.test.espresso.ViewAction;
|
||||
import androidx.test.espresso.ViewInteraction;
|
||||
import androidx.test.filters.LargeTest;
|
||||
import androidx.test.rule.ActivityTestRule;
|
||||
import androidx.test.runner.AndroidJUnit4;
|
||||
|
||||
import org.hamcrest.Matcher;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import static androidx.test.espresso.Espresso.onView;
|
||||
import static androidx.test.espresso.matcher.ViewMatchers.isAssignableFrom;
|
||||
import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed;
|
||||
import static androidx.test.espresso.matcher.ViewMatchers.withContentDescription;
|
||||
import static org.hamcrest.Matchers.allOf;
|
||||
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
@LargeTest
|
||||
public class OnnxruntimeModuleExampleUITests {
|
||||
@Rule
|
||||
public ActivityTestRule<MainActivity> activityTestRule = new ActivityTestRule<>(MainActivity.class);
|
||||
|
||||
@Test
|
||||
public void testExample() {
|
||||
// Wait for a view displayed
|
||||
int waitTime = 0;
|
||||
final int sleepTime = 1000;
|
||||
do {
|
||||
try {
|
||||
ViewInteraction view = onView(allOf(withContentDescription("output"), isDisplayed()));
|
||||
if (getText(view) != null) {
|
||||
break;
|
||||
}
|
||||
} catch (NoMatchingViewException ne) {
|
||||
try {
|
||||
Thread.sleep(sleepTime);
|
||||
} catch (InterruptedException ie) {
|
||||
}
|
||||
waitTime += sleepTime;
|
||||
}
|
||||
} while (waitTime < 180000);
|
||||
|
||||
ViewInteraction view = onView(allOf(withContentDescription("output"), isDisplayed()));
|
||||
Assert.assertEquals(getText(view), "Result: 3");
|
||||
}
|
||||
|
||||
private String getText(ViewInteraction matcher) {
|
||||
final String[] text = {null};
|
||||
|
||||
matcher.perform(new ViewAction() {
|
||||
@Override
|
||||
public Matcher<View> getConstraints() {
|
||||
return isAssignableFrom(TextView.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return "get a text from a TextView";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void perform(UiController uiController, View view) {
|
||||
TextView textView = (TextView)view;
|
||||
text[0] = textView.getText().toString();
|
||||
}
|
||||
});
|
||||
|
||||
return text[0];
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
|
|
@ -186,7 +186,7 @@ public class MNISTDataHandler extends ReactContextBaseJavaModule {
|
|||
if (maxValue == 0) {
|
||||
detectionResult = "No match";
|
||||
} else {
|
||||
detectionResult = "I guess, it's " + argmax;
|
||||
detectionResult = String.valueOf(argmax);
|
||||
}
|
||||
|
||||
WritableMap cookedMap = Arguments.createMap();
|
||||
|
|
@ -27,7 +27,6 @@ public class MainApplication extends Application implements ReactApplication {
|
|||
@Override
|
||||
protected List<ReactPackage> getPackages() {
|
||||
@SuppressWarnings("UnnecessaryLocalVariable") List<ReactPackage> packages = new PackageList(this).getPackages();
|
||||
packages.add(new OnnxruntimePackage());
|
||||
packages.add(new DataHandlerPackage());
|
||||
|
||||
return packages;
|
||||
|
Before Width: | Height: | Size: 3 KiB After Width: | Height: | Size: 3 KiB |
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 2 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 6.3 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 9 KiB After Width: | Height: | Size: 9 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
|
@ -34,9 +34,5 @@ allprojects {
|
|||
google()
|
||||
jcenter()
|
||||
maven { url 'https://www.jitpack.io' }
|
||||
|
||||
flatDir {
|
||||
dir project(':onnxruntimereactnative').file('libs')
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
js/react_native/e2e/android/gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
|
|
@ -1,6 +1,5 @@
|
|||
#Tue Jan 26 22:27:34 PST 2021
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
|
||||
185
js/react_native/e2e/android/gradlew
vendored
Executable file
|
|
@ -0,0 +1,185 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
#
|
||||
# Copyright 2015 the original author or authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# https://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
## Gradle start up script for UN*X
|
||||
##
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
# Resolve links: $0 may be a link
|
||||
PRG="$0"
|
||||
# Need this for relative symlinks.
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`"/$link"
|
||||
fi
|
||||
done
|
||||
SAVED="`pwd`"
|
||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||
APP_HOME="`pwd -P`"
|
||||
cd "$SAVED" >/dev/null
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
}
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
NONSTOP* )
|
||||
nonstop=true
|
||||
;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD="java"
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||
MAX_FD_LIMIT=`ulimit -H -n`
|
||||
if [ $? -eq 0 ] ; then
|
||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||
MAX_FD="$MAX_FD_LIMIT"
|
||||
fi
|
||||
ulimit -n $MAX_FD
|
||||
if [ $? -ne 0 ] ; then
|
||||
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||
fi
|
||||
else
|
||||
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||
fi
|
||||
fi
|
||||
|
||||
# For Darwin, add options to specify how the application appears in the dock
|
||||
if $darwin; then
|
||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||
fi
|
||||
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||
SEP=""
|
||||
for dir in $ROOTDIRSRAW ; do
|
||||
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||
SEP="|"
|
||||
done
|
||||
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||
# Add a user-defined pattern to the cygpath arguments
|
||||
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||
fi
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
i=0
|
||||
for arg in "$@" ; do
|
||||
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
||||
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
||||
|
||||
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||
else
|
||||
eval `echo args$i`="\"$arg\""
|
||||
fi
|
||||
i=`expr $i + 1`
|
||||
done
|
||||
case $i in
|
||||
0) set -- ;;
|
||||
1) set -- "$args0" ;;
|
||||
2) set -- "$args0" "$args1" ;;
|
||||
3) set -- "$args0" "$args1" "$args2" ;;
|
||||
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Escape application args
|
||||
save () {
|
||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||
echo " "
|
||||
}
|
||||
APP_ARGS=`save "$@"`
|
||||
|
||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
104
js/react_native/e2e/android/gradlew.bat
vendored
Normal file
|
|
@ -0,0 +1,104 @@
|
|||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:init
|
||||
@rem Get command-line arguments, handling Windows variants
|
||||
|
||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||
|
||||
:win9xME_args
|
||||
@rem Slurp the command line arguments.
|
||||
set CMD_LINE_ARGS=
|
||||
set _SKIP=2
|
||||
|
||||
:win9xME_args_slurp
|
||||
if "x%~1" == "x" goto execute
|
||||
|
||||
set CMD_LINE_ARGS=%*
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
|
|
@ -1,6 +1,3 @@
|
|||
rootProject.name = 'OnnxruntimeModuleExample'
|
||||
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
|
||||
include ':app'
|
||||
|
||||
include ':onnxruntimereactnative'
|
||||
project(':onnxruntimereactnative').projectDir = new File(rootProject.projectDir, '../../android')
|
||||
4
js/react_native/e2e/app.json
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"name": "OnnxruntimeModuleExample",
|
||||
"displayName": "OnnxruntimeModule Example"
|
||||
}
|
||||
|
|
@ -156,7 +156,7 @@ RCT_EXPORT_METHOD(postprocess
|
|||
if (maxValue == 0.0f) {
|
||||
detectionResult = [NSMutableString stringWithString:@"No match"];
|
||||
} else {
|
||||
detectionResult = [NSMutableString stringWithFormat:@"I guess, it's %d", argmax];
|
||||
detectionResult = [NSMutableString stringWithFormat:@"%d", argmax];
|
||||
}
|
||||
|
||||
NSDictionary *cookedMap = @{@"result" : detectionResult};
|
||||
|
|
@ -12,11 +12,22 @@
|
|||
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
|
||||
81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; };
|
||||
A769E116237385B138BCB816 /* Pods_OnnxruntimeModuleExample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0C2AC7C168BAB1163669C38C /* Pods_OnnxruntimeModuleExample.framework */; };
|
||||
DB61BA27278684FB0096C971 /* OnnxruntimeModuleExampleUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = DB61BA26278684FB0096C971 /* OnnxruntimeModuleExampleUITests.m */; };
|
||||
DBA8BA87267293C4008CC55A /* mnist.ort in Resources */ = {isa = PBXBuildFile; fileRef = DBA8BA86267293C4008CC55A /* mnist.ort */; };
|
||||
DBBF7412263B8C7100487C77 /* MNISTDataHandler.mm in Sources */ = {isa = PBXBuildFile; fileRef = DBBF7411263B8C7100487C77 /* MNISTDataHandler.mm */; };
|
||||
DBBF7414263B8CCB00487C77 /* 3.jpg in Resources */ = {isa = PBXBuildFile; fileRef = DBBF7413263B8CCB00487C77 /* 3.jpg */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
DB61BA2A278684FB0096C971 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 13B07F861A680F5B00A75B9A;
|
||||
remoteInfo = OnnxruntimeModuleExample;
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
DB8FCD9C25C3404B00C72F26 /* Embed Libraries */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
|
|
@ -41,6 +52,8 @@
|
|||
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = OnnxruntimeModuleExample/main.m; sourceTree = "<group>"; };
|
||||
47F7ED3B7971BE374F7B8635 /* Pods-OnnxruntimeModuleExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OnnxruntimeModuleExample.debug.xcconfig"; path = "Target Support Files/Pods-OnnxruntimeModuleExample/Pods-OnnxruntimeModuleExample.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = OnnxruntimeModuleExample/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||
DB61BA24278684FB0096C971 /* OnnxruntimeModuleExampleUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = OnnxruntimeModuleExampleUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
DB61BA26278684FB0096C971 /* OnnxruntimeModuleExampleUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OnnxruntimeModuleExampleUITests.m; sourceTree = "<group>"; };
|
||||
DBA8BA86267293C4008CC55A /* mnist.ort */ = {isa = PBXFileReference; lastKnownFileType = file; name = mnist.ort; path = ../src/mnist.ort; sourceTree = "<group>"; };
|
||||
DBBF7410263B8C5F00487C77 /* MNISTDataHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MNISTDataHandler.h; sourceTree = "<group>"; };
|
||||
DBBF7411263B8C7100487C77 /* MNISTDataHandler.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MNISTDataHandler.mm; sourceTree = "<group>"; };
|
||||
|
|
@ -58,6 +71,13 @@
|
|||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
DB61BA21278684FB0096C971 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
|
|
@ -109,6 +129,7 @@
|
|||
DBBF7413263B8CCB00487C77 /* 3.jpg */,
|
||||
13B07FAE1A68108700A75B9A /* OnnxruntimeModuleExample */,
|
||||
832341AE1AAA6A7D00B99B32 /* Libraries */,
|
||||
DB61BA25278684FB0096C971 /* OnnxruntimeModuleExampleUITests */,
|
||||
83CBBA001A601CBA00E9B192 /* Products */,
|
||||
2D16E6871FA4F8E400B85C8A /* Frameworks */,
|
||||
6B9684456A2045ADE5A6E47E /* Pods */,
|
||||
|
|
@ -122,10 +143,19 @@
|
|||
isa = PBXGroup;
|
||||
children = (
|
||||
13B07F961A680F5B00A75B9A /* OnnxruntimeModuleExample.app */,
|
||||
DB61BA24278684FB0096C971 /* OnnxruntimeModuleExampleUITests.xctest */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
DB61BA25278684FB0096C971 /* OnnxruntimeModuleExampleUITests */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
DB61BA26278684FB0096C971 /* OnnxruntimeModuleExampleUITests.m */,
|
||||
);
|
||||
path = OnnxruntimeModuleExampleUITests;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
|
|
@ -151,6 +181,24 @@
|
|||
productReference = 13B07F961A680F5B00A75B9A /* OnnxruntimeModuleExample.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
DB61BA23278684FB0096C971 /* OnnxruntimeModuleExampleUITests */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = DB61BA2E278684FB0096C971 /* Build configuration list for PBXNativeTarget "OnnxruntimeModuleExampleUITests" */;
|
||||
buildPhases = (
|
||||
DB61BA20278684FB0096C971 /* Sources */,
|
||||
DB61BA21278684FB0096C971 /* Frameworks */,
|
||||
DB61BA22278684FB0096C971 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
DB61BA2B278684FB0096C971 /* PBXTargetDependency */,
|
||||
);
|
||||
name = OnnxruntimeModuleExampleUITests;
|
||||
productName = OnnxruntimeModuleExampleUITests;
|
||||
productReference = DB61BA24278684FB0096C971 /* OnnxruntimeModuleExampleUITests.xctest */;
|
||||
productType = "com.apple.product-type.bundle.ui-testing";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
|
|
@ -160,9 +208,13 @@
|
|||
LastUpgradeCheck = 1130;
|
||||
TargetAttributes = {
|
||||
13B07F861A680F5B00A75B9A = {
|
||||
DevelopmentTeam = X7YWPPMK53;
|
||||
LastSwiftMigration = 1120;
|
||||
};
|
||||
DB61BA23278684FB0096C971 = {
|
||||
CreatedOnToolsVersion = 13.2.1;
|
||||
ProvisioningStyle = Automatic;
|
||||
TestTargetID = 13B07F861A680F5B00A75B9A;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "OnnxruntimeModuleExample" */;
|
||||
|
|
@ -179,6 +231,7 @@
|
|||
projectRoot = "";
|
||||
targets = (
|
||||
13B07F861A680F5B00A75B9A /* OnnxruntimeModuleExample */,
|
||||
DB61BA23278684FB0096C971 /* OnnxruntimeModuleExampleUITests */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
|
@ -195,6 +248,13 @@
|
|||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
DB61BA22278684FB0096C971 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
|
|
@ -221,7 +281,7 @@
|
|||
"${PODS_ROOT}/Target Support Files/Pods-OnnxruntimeModuleExample/Pods-OnnxruntimeModuleExample-frameworks.sh",
|
||||
"${BUILT_PRODUCTS_DIR}/DoubleConversion/DoubleConversion.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/FBReactNativeSpec/FBReactNativeSpec.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/Folly/folly.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/RCT-Folly/folly.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/RCTTypeSafety/RCTTypeSafety.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/React-Core/React.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/React-CoreModules/CoreModules.framework",
|
||||
|
|
@ -237,8 +297,11 @@
|
|||
"${BUILT_PRODUCTS_DIR}/React-jsi/jsi.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/React-jsiexecutor/jsireact.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/React-jsinspector/jsinspector.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/React-logger/logger.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/React-perflogger/reactperflogger.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/ReactCommon/ReactCommon.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/Yoga/yoga.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/fmt/fmt.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/glog/glog.framework",
|
||||
);
|
||||
name = "[CP] Embed Pods Frameworks";
|
||||
|
|
@ -261,8 +324,11 @@
|
|||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/jsi.framework",
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/jsireact.framework",
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/jsinspector.framework",
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/logger.framework",
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/reactperflogger.framework",
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ReactCommon.framework",
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/yoga.framework",
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/fmt.framework",
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/glog.framework",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
|
|
@ -324,8 +390,24 @@
|
|||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
DB61BA20278684FB0096C971 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
DB61BA27278684FB0096C971 /* OnnxruntimeModuleExampleUITests.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
DB61BA2B278684FB0096C971 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 13B07F861A680F5B00A75B9A /* OnnxruntimeModuleExample */;
|
||||
targetProxy = DB61BA2A278684FB0096C971 /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
13B07F941A680F5B00A75B9A /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
|
|
@ -334,7 +416,7 @@
|
|||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEVELOPMENT_TEAM = X7YWPPMK53;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
ENABLE_BITCODE = NO;
|
||||
INFOPLIST_FILE = OnnxruntimeModuleExample/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
|
|
@ -358,7 +440,7 @@
|
|||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEVELOPMENT_TEAM = X7YWPPMK53;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
INFOPLIST_FILE = OnnxruntimeModuleExample/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
OTHER_LDFLAGS = (
|
||||
|
|
@ -487,6 +569,60 @@
|
|||
};
|
||||
name = Release;
|
||||
};
|
||||
DB61BA2C278684FB0096C971 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 15.2;
|
||||
MARKETING_VERSION = 1.0;
|
||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||
MTL_FAST_MATH = YES;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = ai.onnxruntime.reactnative.OnnxruntimeModuleExampleUITests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_EMIT_LOC_STRINGS = NO;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
TEST_TARGET_NAME = OnnxruntimeModuleExample;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
DB61BA2D278684FB0096C971 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 15.2;
|
||||
MARKETING_VERSION = 1.0;
|
||||
MTL_FAST_MATH = YES;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = ai.onnxruntime.reactnative.OnnxruntimeModuleExampleUITests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_EMIT_LOC_STRINGS = NO;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
TEST_TARGET_NAME = OnnxruntimeModuleExample;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
|
|
@ -508,6 +644,15 @@
|
|||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
DB61BA2E278684FB0096C971 /* Build configuration list for PBXNativeTarget "OnnxruntimeModuleExampleUITests" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
DB61BA2C278684FB0096C971 /* Debug */,
|
||||
DB61BA2D278684FB0096C971 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */;
|
||||
|
|
@ -50,9 +50,21 @@
|
|||
ReferencedContainer = "container:OnnxruntimeModuleExample.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "DB61BA23278684FB0096C971"
|
||||
BuildableName = "OnnxruntimeModuleExampleUITests.xctest"
|
||||
BlueprintName = "OnnxruntimeModuleExampleUITests"
|
||||
ReferencedContainer = "container:OnnxruntimeModuleExample.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
buildConfiguration = "Release"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#import <XCTest/XCTest.h>
|
||||
|
||||
@interface OnnxruntimeModuleExampleUITests : XCTestCase
|
||||
|
||||
@end
|
||||
|
||||
@implementation OnnxruntimeModuleExampleUITests
|
||||
|
||||
- (void)setUp {
|
||||
self.continueAfterFailure = NO;
|
||||
}
|
||||
|
||||
- (void)testExample {
|
||||
XCUIApplication *app = [[XCUIApplication alloc] init];
|
||||
[app launch];
|
||||
|
||||
XCTAssert([app.textFields[@"output"] waitForExistenceWithTimeout:180]);
|
||||
NSString* value = app.textFields[@"output"].value;
|
||||
XCTAssertEqualObjects(value, @"Result: 3");
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
@ -13,6 +13,7 @@ target 'OnnxruntimeModuleExample' do
|
|||
if File.exist?('../../local_pods/onnxruntime-mobile-c.zip')
|
||||
pod 'onnxruntime-mobile-c', :podspec => '../../onnxruntime-mobile-c.podspec'
|
||||
end
|
||||
#pod 'onnxruntime-react-native', :path => '../node_modules/onnxruntime-react-native'
|
||||
pod 'onnxruntime-react-native', :path => '../..'
|
||||
|
||||
inherit! :search_paths
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
const path = require('path');
|
||||
const exclusionList = require('metro-config/src/defaults/exclusionList');
|
||||
const exclusionlist = require('metro-config/src/defaults/exclusionList');
|
||||
const escape = require('escape-string-regexp');
|
||||
const pak = require('../package.json');
|
||||
|
||||
|
|
@ -16,9 +16,9 @@ module.exports = {
|
|||
watchFolders: [root],
|
||||
|
||||
// We need to make sure that only one version is loaded for peerDependencies
|
||||
// So we exclusionList them at the root, and alias them to the versions in example's node_modules
|
||||
// So we exclusionlist them at the root, and alias them to the versions in example's node_modules
|
||||
resolver: {
|
||||
exclusionListRE: exclusionList(
|
||||
exclusionlistRE: exclusionlist(
|
||||
modules.map(
|
||||
(m) =>
|
||||
new RegExp(`^${escape(path.join(root, 'node_modules', m))}\\/.*$`)
|
||||
|
|
@ -13,8 +13,8 @@
|
|||
"react-native": "^0.67.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.12.10",
|
||||
"@babel/runtime": "^7.12.5",
|
||||
"@babel/core": "^7.17.0",
|
||||
"@babel/runtime": "^7.17.0",
|
||||
"babel-plugin-module-resolver": "^4.0.0",
|
||||
"metro-react-native-babel-preset": "^0.67.0"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
|
|
@ -1,28 +1,19 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import *as React from 'react';
|
||||
import{Button, Image, Text, View} from 'react-native';
|
||||
import * as React from 'react';
|
||||
import{Image, Text, TextInput, View} from 'react-native';
|
||||
// onnxruntime-react-native package is installed when bootstraping
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
import{InferenceSession, Tensor} from 'onnxruntime-react-native';
|
||||
import MNIST, {MNISTInput, MNISTOutput, MNISTResult, } from './mnist-data-handler';
|
||||
import{Buffer} from 'buffer';
|
||||
|
||||
interface Duration {
|
||||
preprocess:
|
||||
number;
|
||||
inference:
|
||||
number;
|
||||
postprocess:
|
||||
number;
|
||||
}
|
||||
|
||||
interface State {
|
||||
session:
|
||||
InferenceSession | null;
|
||||
output:
|
||||
string | null;
|
||||
duration:
|
||||
Duration | null;
|
||||
imagePath:
|
||||
string | null;
|
||||
}
|
||||
|
|
@ -36,7 +27,6 @@ export default class App extends React.PureComponent<{}, State> {
|
|||
this.state = {
|
||||
session : null,
|
||||
output : null,
|
||||
duration : null,
|
||||
imagePath : null,
|
||||
};
|
||||
}
|
||||
|
|
@ -51,6 +41,8 @@ export default class App extends React.PureComponent<{}, State> {
|
|||
const modelPath = await MNIST.getLocalModelPath();
|
||||
const session : InferenceSession = await InferenceSession.create(modelPath);
|
||||
this.setState({session});
|
||||
|
||||
void this.infer();
|
||||
} catch (err) {
|
||||
console.log(err.message);
|
||||
}
|
||||
|
|
@ -60,13 +52,8 @@ export default class App extends React.PureComponent<{}, State> {
|
|||
// Run a model with a given image
|
||||
infer = async() : Promise<void> => {
|
||||
try {
|
||||
let preprocessTime = 0;
|
||||
let inferenceTime = 0;
|
||||
let postprocessTime = 0;
|
||||
|
||||
const options : InferenceSession.RunOptions = {};
|
||||
|
||||
let startTime = Date.now();
|
||||
const mnistInput : MNISTInput = await MNIST.preprocess(this.state.imagePath !);
|
||||
const input : {[name:string] : Tensor} = {};
|
||||
for (const key in mnistInput) {
|
||||
|
|
@ -77,14 +64,10 @@ export default class App extends React.PureComponent<{}, State> {
|
|||
input[key] = new Tensor(mnistInput[key].type as keyof Tensor.DataTypeMap, tensorData, mnistInput[key].dims);
|
||||
}
|
||||
}
|
||||
preprocessTime = Date.now() - startTime;
|
||||
|
||||
startTime = Date.now();
|
||||
const output : InferenceSession.ReturnType =
|
||||
await this.state.session !.run(input, this.state.session !.outputNames, options);
|
||||
inferenceTime = Date.now() - startTime;
|
||||
|
||||
startTime = Date.now();
|
||||
const mnistOutput : MNISTOutput = {};
|
||||
for (const key in output) {
|
||||
if (Object.hasOwnProperty.call(output, key)) {
|
||||
|
|
@ -96,15 +79,9 @@ export default class App extends React.PureComponent<{}, State> {
|
|||
}
|
||||
}
|
||||
const result : MNISTResult = await MNIST.postprocess(mnistOutput);
|
||||
postprocessTime = Date.now() - startTime;
|
||||
|
||||
this.setState({
|
||||
output : result.result,
|
||||
duration : {
|
||||
preprocess : preprocessTime,
|
||||
inference : inferenceTime,
|
||||
postprocess : postprocessTime,
|
||||
},
|
||||
output : result.result
|
||||
});
|
||||
} catch (err) {
|
||||
console.log(err.message);
|
||||
|
|
@ -112,16 +89,11 @@ export default class App extends React.PureComponent<{}, State> {
|
|||
};
|
||||
|
||||
render() : JSX.Element {
|
||||
const {output, duration, imagePath} = this.state;
|
||||
const {output, imagePath} = this.state;
|
||||
|
||||
return (
|
||||
<View>
|
||||
<Text>{'\n'}</Text>
|
||||
<Button
|
||||
title={'Run'}
|
||||
disabled={!this.state.session}
|
||||
onPress={this.infer}
|
||||
/>
|
||||
{imagePath && (
|
||||
<Image
|
||||
source={
|
||||
|
|
@ -137,13 +109,9 @@ export default class App extends React.PureComponent<{}, State> {
|
|||
/>
|
||||
)}
|
||||
{output && (
|
||||
<Text>
|
||||
Result: {output} {'\n'}
|
||||
{'--------------------------------\n'}
|
||||
Preprocess time taken: {duration?.preprocess} ms {'\n'}
|
||||
Inference time taken: {duration?.inference} ms {'\n'}
|
||||
Postprocess time taken: {duration?.postprocess} ms {'\n'}
|
||||
</Text>
|
||||
<TextInput accessibilityLabel='output'>
|
||||
Result: {output}
|
||||
</TextInput>
|
||||
)}
|
||||
</View>
|
||||
);
|
||||
|
|
@ -2,6 +2,15 @@
|
|||
# yarn lockfile v1
|
||||
|
||||
|
||||
"@ampproject/remapping@^2.0.0":
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.0.1.tgz#9a04a4aba7b8323b65498d9554a1bdd15d960296"
|
||||
integrity sha512-EldHF4Ufj3NL9yCAmYrPzY+3/Yqrzxu24F4Mu4nRjK3w70AKYRmhuLwGZdA9JeoDsbIwkgGkbqUK2INuF582Og==
|
||||
dependencies:
|
||||
"@jridgewell/resolve-uri" "^3.0.3"
|
||||
"@jridgewell/trace-mapping" "^0.2.2"
|
||||
sourcemap-codec "1.4.8"
|
||||
|
||||
"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.16.7":
|
||||
version "7.16.7"
|
||||
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.16.7.tgz#44416b6bd7624b998f5b1af5d470856c40138789"
|
||||
|
|
@ -10,37 +19,37 @@
|
|||
"@babel/highlight" "^7.16.7"
|
||||
|
||||
"@babel/compat-data@^7.13.11", "@babel/compat-data@^7.16.4":
|
||||
version "7.16.8"
|
||||
resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.16.8.tgz#31560f9f29fdf1868de8cb55049538a1b9732a60"
|
||||
integrity sha512-m7OkX0IdKLKPpBlJtF561YJal5y/jyI5fNfWbPxh2D/nbzzGI4qRyrD8xO2jB24u7l+5I2a43scCG2IrfjC50Q==
|
||||
version "7.17.0"
|
||||
resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.17.0.tgz#86850b8597ea6962089770952075dcaabb8dba34"
|
||||
integrity sha512-392byTlpGWXMv4FbyWw3sAZ/FrW/DrwqLGXpy0mbyNe9Taqv1mg9yON5/o0cnr8XYCkFTZbC1eV+c+LAROgrng==
|
||||
|
||||
"@babel/core@^7.1.6", "@babel/core@^7.12.10", "@babel/core@^7.14.0":
|
||||
version "7.16.12"
|
||||
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.16.12.tgz#5edc53c1b71e54881315923ae2aedea2522bb784"
|
||||
integrity sha512-dK5PtG1uiN2ikk++5OzSYsitZKny4wOCD0nrO4TqnW4BVBTQ2NGS3NgilvT/TEyxTST7LNyWV/T4tXDoD3fOgg==
|
||||
"@babel/core@^7.1.6", "@babel/core@^7.14.0", "@babel/core@^7.17.0":
|
||||
version "7.17.0"
|
||||
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.17.0.tgz#16b8772b0a567f215839f689c5ded6bb20e864d5"
|
||||
integrity sha512-x/5Ea+RO5MvF9ize5DeVICJoVrNv0Mi2RnIABrZEKYvPEpldXwauPkgvYA17cKa6WpU3LoYvYbuEMFtSNFsarA==
|
||||
dependencies:
|
||||
"@ampproject/remapping" "^2.0.0"
|
||||
"@babel/code-frame" "^7.16.7"
|
||||
"@babel/generator" "^7.16.8"
|
||||
"@babel/generator" "^7.17.0"
|
||||
"@babel/helper-compilation-targets" "^7.16.7"
|
||||
"@babel/helper-module-transforms" "^7.16.7"
|
||||
"@babel/helpers" "^7.16.7"
|
||||
"@babel/parser" "^7.16.12"
|
||||
"@babel/helpers" "^7.17.0"
|
||||
"@babel/parser" "^7.17.0"
|
||||
"@babel/template" "^7.16.7"
|
||||
"@babel/traverse" "^7.16.10"
|
||||
"@babel/types" "^7.16.8"
|
||||
"@babel/traverse" "^7.17.0"
|
||||
"@babel/types" "^7.17.0"
|
||||
convert-source-map "^1.7.0"
|
||||
debug "^4.1.0"
|
||||
gensync "^1.0.0-beta.2"
|
||||
json5 "^2.1.2"
|
||||
semver "^6.3.0"
|
||||
source-map "^0.5.0"
|
||||
|
||||
"@babel/generator@^7.14.0", "@babel/generator@^7.16.8":
|
||||
version "7.16.8"
|
||||
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.16.8.tgz#359d44d966b8cd059d543250ce79596f792f2ebe"
|
||||
integrity sha512-1ojZwE9+lOXzcWdWmO6TbUzDfqLD39CmEhN8+2cX9XkDo5yW1OpgfejfliysR2AWLpMamTiOiAp/mtroaymhpw==
|
||||
"@babel/generator@^7.14.0", "@babel/generator@^7.17.0":
|
||||
version "7.17.0"
|
||||
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.17.0.tgz#7bd890ba706cd86d3e2f727322346ffdbf98f65e"
|
||||
integrity sha512-I3Omiv6FGOC29dtlZhkfXO6pgkmukJSlT26QjVvS1DGZe/NzSVCPG41X0tS21oZkJYlovfj9qDWgKP+Cn4bXxw==
|
||||
dependencies:
|
||||
"@babel/types" "^7.16.8"
|
||||
"@babel/types" "^7.17.0"
|
||||
jsesc "^2.5.1"
|
||||
source-map "^0.5.0"
|
||||
|
||||
|
|
@ -70,9 +79,9 @@
|
|||
semver "^6.3.0"
|
||||
|
||||
"@babel/helper-create-class-features-plugin@^7.16.7":
|
||||
version "7.16.10"
|
||||
resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.16.10.tgz#8a6959b9cc818a88815ba3c5474619e9c0f2c21c"
|
||||
integrity sha512-wDeej0pu3WN/ffTxMNCPW5UCiOav8IcLRxSIyp/9+IF2xJUM9h/OYjg0IJLHaL6F8oU8kqMz9nc1vryXhMsgXg==
|
||||
version "7.17.0"
|
||||
resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.17.0.tgz#3ba0eae83313d4077319d11a768c46adad026433"
|
||||
integrity sha512-S3+IHG72pJFb0RmJgeXg/TjVKt641ZsLla028haXJjdqCf9eccE5r1JsdO//L7nzTDzXjtC+hwV/lrkEb2+t0Q==
|
||||
dependencies:
|
||||
"@babel/helper-annotate-as-pure" "^7.16.7"
|
||||
"@babel/helper-environment-visitor" "^7.16.7"
|
||||
|
|
@ -83,12 +92,12 @@
|
|||
"@babel/helper-split-export-declaration" "^7.16.7"
|
||||
|
||||
"@babel/helper-create-regexp-features-plugin@^7.16.7":
|
||||
version "7.16.7"
|
||||
resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.16.7.tgz#0cb82b9bac358eb73bfbd73985a776bfa6b14d48"
|
||||
integrity sha512-fk5A6ymfp+O5+p2yCkXAu5Kyj6v0xh0RBeNcAkYUMDvvAAoxvSKXn+Jb37t/yWFiQVDFK1ELpUTD8/aLhCPu+g==
|
||||
version "7.17.0"
|
||||
resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.17.0.tgz#1dcc7d40ba0c6b6b25618997c5dbfd310f186fe1"
|
||||
integrity sha512-awO2So99wG6KnlE+TPs6rn83gCz5WlEePJDTnLEqbchMVrBeAujURVphRdigsk094VhvZehFoNOihSlcBjwsXA==
|
||||
dependencies:
|
||||
"@babel/helper-annotate-as-pure" "^7.16.7"
|
||||
regexpu-core "^4.7.1"
|
||||
regexpu-core "^5.0.1"
|
||||
|
||||
"@babel/helper-define-polyfill-provider@^0.3.1":
|
||||
version "0.3.1"
|
||||
|
|
@ -242,14 +251,14 @@
|
|||
"@babel/traverse" "^7.16.8"
|
||||
"@babel/types" "^7.16.8"
|
||||
|
||||
"@babel/helpers@^7.16.7":
|
||||
version "7.16.7"
|
||||
resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.16.7.tgz#7e3504d708d50344112767c3542fc5e357fffefc"
|
||||
integrity sha512-9ZDoqtfY7AuEOt3cxchfii6C7GDyyMBffktR5B2jvWv8u2+efwvpnVKXMWzNehqy68tKgAfSwfdw/lWpthS2bw==
|
||||
"@babel/helpers@^7.17.0":
|
||||
version "7.17.0"
|
||||
resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.17.0.tgz#79cdf6c66a579f3a7b5e739371bc63ca0306886b"
|
||||
integrity sha512-Xe/9NFxjPwELUvW2dsukcMZIp6XwPSbI4ojFBJuX5ramHuVE22SVcZIwqzdWo5uCgeTXW8qV97lMvSOjq+1+nQ==
|
||||
dependencies:
|
||||
"@babel/template" "^7.16.7"
|
||||
"@babel/traverse" "^7.16.7"
|
||||
"@babel/types" "^7.16.7"
|
||||
"@babel/traverse" "^7.17.0"
|
||||
"@babel/types" "^7.17.0"
|
||||
|
||||
"@babel/highlight@^7.16.7":
|
||||
version "7.16.10"
|
||||
|
|
@ -260,10 +269,10 @@
|
|||
chalk "^2.0.0"
|
||||
js-tokens "^4.0.0"
|
||||
|
||||
"@babel/parser@^7.1.6", "@babel/parser@^7.14.0", "@babel/parser@^7.16.10", "@babel/parser@^7.16.12", "@babel/parser@^7.16.7":
|
||||
version "7.16.12"
|
||||
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.16.12.tgz#9474794f9a650cf5e2f892444227f98e28cdf8b6"
|
||||
integrity sha512-VfaV15po8RiZssrkPweyvbGVSe4x2y+aciFCgn0n0/SJMR22cwofRV1mtnJQYcSB1wUTaA/X1LnA3es66MCO5A==
|
||||
"@babel/parser@^7.1.6", "@babel/parser@^7.14.0", "@babel/parser@^7.16.7", "@babel/parser@^7.17.0":
|
||||
version "7.17.0"
|
||||
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.17.0.tgz#f0ac33eddbe214e4105363bb17c3341c5ffcc43c"
|
||||
integrity sha512-VKXSCQx5D8S04ej+Dqsr1CzYvvWgf20jIw2D+YhQCrIlr2UZGaDds23Y0xg75/skOxpLCRpUZvk/1EAVkGoDOw==
|
||||
|
||||
"@babel/plugin-proposal-class-properties@^7.0.0", "@babel/plugin-proposal-class-properties@^7.1.0":
|
||||
version "7.16.7"
|
||||
|
|
@ -570,9 +579,9 @@
|
|||
regenerator-transform "^0.14.2"
|
||||
|
||||
"@babel/plugin-transform-runtime@^7.0.0":
|
||||
version "7.16.10"
|
||||
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.16.10.tgz#53d9fd3496daedce1dd99639097fa5d14f4c7c2c"
|
||||
integrity sha512-9nwTiqETv2G7xI4RvXHNfpGdr8pAA+Q/YtN3yLK7OoK7n9OibVm/xymJ838a9A6E/IciOLPj82lZk0fW6O4O7w==
|
||||
version "7.17.0"
|
||||
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.17.0.tgz#0a2e08b5e2b2d95c4b1d3b3371a2180617455b70"
|
||||
integrity sha512-fr7zPWnKXNc1xoHfrIU9mN/4XKX4VLZ45Q+oMhfsYIaHvg7mHgmhfOy/ckRWqDK7XF3QDigRpkh5DKq6+clE8A==
|
||||
dependencies:
|
||||
"@babel/helper-module-imports" "^7.16.7"
|
||||
"@babel/helper-plugin-utils" "^7.16.7"
|
||||
|
|
@ -646,20 +655,20 @@
|
|||
"@babel/plugin-transform-typescript" "^7.16.7"
|
||||
|
||||
"@babel/register@^7.0.0":
|
||||
version "7.16.9"
|
||||
resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.16.9.tgz#fcfb23cfdd9ad95c9771e58183de83b513857806"
|
||||
integrity sha512-jJ72wcghdRIlENfvALcyODhNoGE5j75cYHdC+aQMh6cU/P86tiiXTp9XYZct1UxUMo/4+BgQRyNZEGx0KWGS+g==
|
||||
version "7.17.0"
|
||||
resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.17.0.tgz#8051e0b7cb71385be4909324f072599723a1f084"
|
||||
integrity sha512-UNZsMAZ7uKoGHo1HlEXfteEOYssf64n/PNLHGqOKq/bgYcu/4LrQWAHJwSCb3BRZK8Hi5gkJdRcwrGTO2wtRCg==
|
||||
dependencies:
|
||||
clone-deep "^4.0.1"
|
||||
find-cache-dir "^2.0.0"
|
||||
make-dir "^2.1.0"
|
||||
pirates "^4.0.0"
|
||||
pirates "^4.0.5"
|
||||
source-map-support "^0.5.16"
|
||||
|
||||
"@babel/runtime@^7.12.5", "@babel/runtime@^7.8.4":
|
||||
version "7.16.7"
|
||||
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.16.7.tgz#03ff99f64106588c9c403c6ecb8c3bafbbdff1fa"
|
||||
integrity sha512-9E9FJowqAsytyOY6LG+1KuueckRL+aQW+mKvXRXnuFGyRAyepJPmEo9vgMfXUA6O9u3IeEdv9MAkppFcaQwogQ==
|
||||
"@babel/runtime@^7.17.0", "@babel/runtime@^7.8.4":
|
||||
version "7.17.0"
|
||||
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.17.0.tgz#b8d142fc0f7664fb3d9b5833fd40dcbab89276c0"
|
||||
integrity sha512-etcO/ohMNaNA2UBdaXBBSX/3aEzFMRrVfaPv8Ptc0k+cWpWW0QFiGZ2XnVqQZI1Cf734LbPGmqBKWESfW4x/dQ==
|
||||
dependencies:
|
||||
regenerator-runtime "^0.13.4"
|
||||
|
||||
|
|
@ -672,26 +681,26 @@
|
|||
"@babel/parser" "^7.16.7"
|
||||
"@babel/types" "^7.16.7"
|
||||
|
||||
"@babel/traverse@^7.13.0", "@babel/traverse@^7.14.0", "@babel/traverse@^7.16.10", "@babel/traverse@^7.16.7", "@babel/traverse@^7.16.8":
|
||||
version "7.16.10"
|
||||
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.16.10.tgz#448f940defbe95b5a8029975b051f75993e8239f"
|
||||
integrity sha512-yzuaYXoRJBGMlBhsMJoUW7G1UmSb/eXr/JHYM/MsOJgavJibLwASijW7oXBdw3NQ6T0bW7Ty5P/VarOs9cHmqw==
|
||||
"@babel/traverse@^7.13.0", "@babel/traverse@^7.14.0", "@babel/traverse@^7.16.7", "@babel/traverse@^7.16.8", "@babel/traverse@^7.17.0":
|
||||
version "7.17.0"
|
||||
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.17.0.tgz#3143e5066796408ccc880a33ecd3184f3e75cd30"
|
||||
integrity sha512-fpFIXvqD6kC7c7PUNnZ0Z8cQXlarCLtCUpt2S1Dx7PjoRtCFffvOkHHSom+m5HIxMZn5bIBVb71lhabcmjEsqg==
|
||||
dependencies:
|
||||
"@babel/code-frame" "^7.16.7"
|
||||
"@babel/generator" "^7.16.8"
|
||||
"@babel/generator" "^7.17.0"
|
||||
"@babel/helper-environment-visitor" "^7.16.7"
|
||||
"@babel/helper-function-name" "^7.16.7"
|
||||
"@babel/helper-hoist-variables" "^7.16.7"
|
||||
"@babel/helper-split-export-declaration" "^7.16.7"
|
||||
"@babel/parser" "^7.16.10"
|
||||
"@babel/types" "^7.16.8"
|
||||
"@babel/parser" "^7.17.0"
|
||||
"@babel/types" "^7.17.0"
|
||||
debug "^4.1.0"
|
||||
globals "^11.1.0"
|
||||
|
||||
"@babel/types@^7.0.0", "@babel/types@^7.16.0", "@babel/types@^7.16.7", "@babel/types@^7.16.8":
|
||||
version "7.16.8"
|
||||
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.16.8.tgz#0ba5da91dd71e0a4e7781a30f22770831062e3c1"
|
||||
integrity sha512-smN2DQc5s4M7fntyjGtyIPbRJv6wW4rU/94fmYJ7PKQuZkC0qGMHXJbg6sNGt12JmVr4k5YaptI/XtiLJBnmIg==
|
||||
"@babel/types@^7.0.0", "@babel/types@^7.16.0", "@babel/types@^7.16.7", "@babel/types@^7.16.8", "@babel/types@^7.17.0":
|
||||
version "7.17.0"
|
||||
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.17.0.tgz#a826e368bccb6b3d84acd76acad5c0d87342390b"
|
||||
integrity sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw==
|
||||
dependencies:
|
||||
"@babel/helper-validator-identifier" "^7.16.7"
|
||||
to-fast-properties "^2.0.0"
|
||||
|
|
@ -745,6 +754,19 @@
|
|||
"@types/yargs" "^16.0.0"
|
||||
chalk "^4.0.0"
|
||||
|
||||
"@jridgewell/resolve-uri@^3.0.3":
|
||||
version "3.0.3"
|
||||
resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.0.3.tgz#b80093f4edbb5490c49746231513669c8f518acb"
|
||||
integrity sha512-fuIOnc81C5iRNevb/XPiM8Khp9bVjreydRQ37rt0C/dY0PAW1DRvEM3WrKX/5rStS5lbgwS0FCgqSndh9tvK5w==
|
||||
|
||||
"@jridgewell/trace-mapping@^0.2.2":
|
||||
version "0.2.2"
|
||||
resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.2.2.tgz#77510cc2f6f3b92e78c78de216d42de631b1d7fb"
|
||||
integrity sha512-I9AGQzMPEzQNJgib2YSqciYWazGsXSyu1rEEeaPeM1764ZtnfNTxA5bofzG/POMI3QcvpBUxwecOPZM6ZhkEpg==
|
||||
dependencies:
|
||||
"@jridgewell/resolve-uri" "^3.0.3"
|
||||
sourcemap-codec "1.4.8"
|
||||
|
||||
"@react-native-community/cli-debugger-ui@^6.0.0-rc.0":
|
||||
version "6.0.0-rc.0"
|
||||
resolved "https://registry.yarnpkg.com/@react-native-community/cli-debugger-ui/-/cli-debugger-ui-6.0.0-rc.0.tgz#774378626e4b70f5e1e2e54910472dcbaffa1536"
|
||||
|
|
@ -977,12 +999,12 @@ absolute-path@^0.0.0:
|
|||
integrity sha1-p4di+9rftSl76ZsV01p4Wy8JW/c=
|
||||
|
||||
accepts@^1.3.7, accepts@~1.3.5, accepts@~1.3.7:
|
||||
version "1.3.7"
|
||||
resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd"
|
||||
integrity sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==
|
||||
version "1.3.8"
|
||||
resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e"
|
||||
integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==
|
||||
dependencies:
|
||||
mime-types "~2.1.24"
|
||||
negotiator "0.6.2"
|
||||
mime-types "~2.1.34"
|
||||
negotiator "0.6.3"
|
||||
|
||||
anser@^1.4.9:
|
||||
version "1.4.10"
|
||||
|
|
@ -1680,9 +1702,9 @@ ee-first@1.1.1:
|
|||
integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=
|
||||
|
||||
electron-to-chromium@^1.4.17:
|
||||
version "1.4.61"
|
||||
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.61.tgz#97689f81b4ac5c996363d9ee7babd3406c44d6c3"
|
||||
integrity sha512-kpzCOOFlx63C9qKRyIDEsKIUgzoe98ump7T4gU+/OLzj8gYkkWf2SIyBjhTSE0keAjMAp3i7C262YtkQOMYrGw==
|
||||
version "1.4.62"
|
||||
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.62.tgz#f97b643d206813b9154f1700b3c5b5b828ddc9ac"
|
||||
integrity sha512-fWc/zAThqZzl7fbuLzar+x6bqZBWHrsBXQOqv//yrgdTLY/G3JGTPOWhPKIhbhynJJhqE9QNzKzlpCINUmUMoA==
|
||||
|
||||
emoji-regex@^8.0.0:
|
||||
version "8.0.0"
|
||||
|
|
@ -1888,9 +1910,9 @@ find-up@^4.1.0:
|
|||
path-exists "^4.0.0"
|
||||
|
||||
flow-parser@0.*:
|
||||
version "0.170.0"
|
||||
resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.170.0.tgz#52cac19fd884c41894f39368bdf384183a597b3b"
|
||||
integrity sha512-H1Fu8EM/F6MtOpHYpsFXPyySatowrXMWENxRmmKAfirfBr8kjHrms3YDuv82Nhn0xWaXV7Hhynp2tEaZsLhHLw==
|
||||
version "0.171.0"
|
||||
resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.171.0.tgz#5ffae78f050e43513abc86add9f19a97fcbabcdb"
|
||||
integrity sha512-cqEsgic6HH81Pz0IQLeyuoh0O8Y7ECAIdZ0idPQ9P1jZ/kHB9KK0hwqnjVtqTGog15JURkIxvyXm+9pAb6uuSQ==
|
||||
|
||||
flow-parser@^0.121.0:
|
||||
version "0.121.0"
|
||||
|
|
@ -2924,7 +2946,7 @@ mime-db@1.51.0, "mime-db@>= 1.43.0 < 2":
|
|||
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.51.0.tgz#d9ff62451859b18342d960850dc3cfb77e63fb0c"
|
||||
integrity sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g==
|
||||
|
||||
mime-types@^2.1.27, mime-types@~2.1.24:
|
||||
mime-types@^2.1.27, mime-types@~2.1.34:
|
||||
version "2.1.34"
|
||||
resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.34.tgz#5a712f9ec1503511a945803640fafe09d3793c24"
|
||||
integrity sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A==
|
||||
|
|
@ -3005,10 +3027,10 @@ nanomatch@^1.2.9:
|
|||
snapdragon "^0.8.1"
|
||||
to-regex "^3.0.1"
|
||||
|
||||
negotiator@0.6.2:
|
||||
version "0.6.2"
|
||||
resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb"
|
||||
integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==
|
||||
negotiator@0.6.3:
|
||||
version "0.6.3"
|
||||
resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd"
|
||||
integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==
|
||||
|
||||
neo-async@^2.5.0:
|
||||
version "2.6.2"
|
||||
|
|
@ -3270,7 +3292,7 @@ pify@^4.0.1:
|
|||
resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231"
|
||||
integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==
|
||||
|
||||
pirates@^4.0.0:
|
||||
pirates@^4.0.5:
|
||||
version "4.0.5"
|
||||
resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.5.tgz#feec352ea5c3268fb23a37c702ab1699f35a5f3b"
|
||||
integrity sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==
|
||||
|
|
@ -3458,10 +3480,10 @@ recast@^0.20.3:
|
|||
source-map "~0.6.1"
|
||||
tslib "^2.0.1"
|
||||
|
||||
regenerate-unicode-properties@^9.0.0:
|
||||
version "9.0.0"
|
||||
resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-9.0.0.tgz#54d09c7115e1f53dc2314a974b32c1c344efe326"
|
||||
integrity sha512-3E12UeNSPfjrgwjkR81m5J7Aw/T55Tu7nUyZVQYCKEOs+2dkxEY+DpPtZzO4YruuiPb7NkYLVcyJC4+zCbk5pA==
|
||||
regenerate-unicode-properties@^10.0.1:
|
||||
version "10.0.1"
|
||||
resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-10.0.1.tgz#7f442732aa7934a3740c779bb9b3340dccc1fb56"
|
||||
integrity sha512-vn5DU6yg6h8hP/2OkQo3K7uVILvY4iu0oI4t3HFa81UPkhGJwkRwM10JEc3upjdhHjs/k8GJY1sRBhk5sr69Bw==
|
||||
dependencies:
|
||||
regenerate "^1.4.2"
|
||||
|
||||
|
|
@ -3490,27 +3512,27 @@ regex-not@^1.0.0, regex-not@^1.0.2:
|
|||
extend-shallow "^3.0.2"
|
||||
safe-regex "^1.1.0"
|
||||
|
||||
regexpu-core@^4.7.1:
|
||||
version "4.8.0"
|
||||
resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.8.0.tgz#e5605ba361b67b1718478501327502f4479a98f0"
|
||||
integrity sha512-1F6bYsoYiz6is+oz70NWur2Vlh9KWtswuRuzJOfeYUrfPX2o8n74AnUVaOGDbUqVGO9fNHu48/pjJO4sNVwsOg==
|
||||
regexpu-core@^5.0.1:
|
||||
version "5.0.1"
|
||||
resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-5.0.1.tgz#c531122a7840de743dcf9c83e923b5560323ced3"
|
||||
integrity sha512-CriEZlrKK9VJw/xQGJpQM5rY88BtuL8DM+AEwvcThHilbxiTAy8vq4iJnd2tqq8wLmjbGZzP7ZcKFjbGkmEFrw==
|
||||
dependencies:
|
||||
regenerate "^1.4.2"
|
||||
regenerate-unicode-properties "^9.0.0"
|
||||
regjsgen "^0.5.2"
|
||||
regjsparser "^0.7.0"
|
||||
regenerate-unicode-properties "^10.0.1"
|
||||
regjsgen "^0.6.0"
|
||||
regjsparser "^0.8.2"
|
||||
unicode-match-property-ecmascript "^2.0.0"
|
||||
unicode-match-property-value-ecmascript "^2.0.0"
|
||||
|
||||
regjsgen@^0.5.2:
|
||||
version "0.5.2"
|
||||
resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.5.2.tgz#92ff295fb1deecbf6ecdab2543d207e91aa33733"
|
||||
integrity sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A==
|
||||
regjsgen@^0.6.0:
|
||||
version "0.6.0"
|
||||
resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.6.0.tgz#83414c5354afd7d6627b16af5f10f41c4e71808d"
|
||||
integrity sha512-ozE883Uigtqj3bx7OhL1KNbCzGyW2NQZPl6Hs09WTvCuZD5sTI4JY58bkbQWa/Y9hxIsvJ3M8Nbf7j54IqeZbA==
|
||||
|
||||
regjsparser@^0.7.0:
|
||||
version "0.7.0"
|
||||
resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.7.0.tgz#a6b667b54c885e18b52554cb4960ef71187e9968"
|
||||
integrity sha512-A4pcaORqmNMDVwUjWoTzuhwMGpP+NykpfqAsEgI1FSH/EzC7lrN5TMd+kN8YCovX+jMpu8eaqXgXPCa0g8FQNQ==
|
||||
regjsparser@^0.8.2:
|
||||
version "0.8.4"
|
||||
resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.8.4.tgz#8a14285ffcc5de78c5b95d62bbf413b6bc132d5f"
|
||||
integrity sha512-J3LABycON/VNEu3abOviqGHuB/LOtOQj8SKmfP9anY5GfAVw/SPjwzSjxGjbZXIxbGfqTHtJw58C2Li/WkStmA==
|
||||
dependencies:
|
||||
jsesc "~0.5.0"
|
||||
|
||||
|
|
@ -3845,6 +3867,11 @@ source-map@^0.7.3:
|
|||
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383"
|
||||
integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==
|
||||
|
||||
sourcemap-codec@1.4.8:
|
||||
version "1.4.8"
|
||||
resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz#ea804bd94857402e6992d05a38ef1ae35a9ab4c4"
|
||||
integrity sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==
|
||||
|
||||
split-string@^3.0.1, split-string@^3.0.2:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2"
|
||||
|
|
@ -11,7 +11,11 @@ def shared
|
|||
# Comment the next line if you don't want to use dynamic frameworks
|
||||
use_frameworks!
|
||||
|
||||
pod 'onnxruntime-mobile-c', :podspec => '../onnxruntime-mobile-c.podspec'
|
||||
if File.exist?('../local_pods/onnxruntime-mobile-c.zip')
|
||||
pod 'onnxruntime-mobile-c', :podspec => '../onnxruntime-mobile-c.podspec'
|
||||
else
|
||||
pod 'onnxruntime-mobile-c'
|
||||
end
|
||||
|
||||
inherit! :search_paths
|
||||
end
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
"module": "dist/module/index",
|
||||
"jest": {
|
||||
"modulePathIgnorePatterns": [
|
||||
"<rootDir>/example/node_modules",
|
||||
"<rootDir>/e2e/node_modules",
|
||||
"<rootDir>/dist/"
|
||||
],
|
||||
"preset": "react-native"
|
||||
|
|
@ -52,7 +52,11 @@
|
|||
"!dist/module/*.js.map",
|
||||
"!android/.gitignore",
|
||||
"!android/.idea",
|
||||
"!android/build"
|
||||
"!android/build",
|
||||
"!android/gradlew",
|
||||
"!android/gradlew.bat",
|
||||
"!android/gradle/wrapper/*.jar",
|
||||
"!android/libs"
|
||||
],
|
||||
"description": "Onnxruntime bridge for react native",
|
||||
"repository": "https://github.com/Microsoft/onnxruntime.git",
|
||||
|
|
@ -77,11 +81,16 @@
|
|||
"scripts": {
|
||||
"typescript": "tsc --noEmit",
|
||||
"prepare": "bob build",
|
||||
"bootstrap": "yarn example && yarn && yarn pods",
|
||||
"bootstrap": "yarn pack-common && yarn unpack-common && yarn pack-libs && yarn unpack-libs && yarn e2e && yarn pods",
|
||||
"test": "jest",
|
||||
"prepack": "tsc --build ./tsconfig.scripts.json && node ./scripts/prepack",
|
||||
"pods": "cd example && pod-install --quiet",
|
||||
"example": "yarn --cwd example"
|
||||
"pack-common": "cd ../common && npm pack && mv -f onnxruntime-common-*.tgz ../react_native/e2e/onnxruntime-common.tgz",
|
||||
"unpack-common": "cd e2e && yarn add --no-lockfile file:./onnxruntime-common.tgz",
|
||||
"pack-libs": "yarn prepack-e2e && npm pack && mv -f onnxruntime-react-native-*.tgz e2e/onnxruntime-react-native.tgz",
|
||||
"unpack-libs": "cd e2e && yarn add --no-lockfile file:./onnxruntime-react-native.tgz",
|
||||
"prepack-rel": "tsc --build ./tsconfig.scripts.json && node ./scripts/prepack",
|
||||
"prepack-e2e": "tsc --build ./tsconfig.scripts.json && node ./scripts/prepack-e2e",
|
||||
"pods": "cd e2e && pod-install --quiet",
|
||||
"e2e": "yarn --cwd e2e"
|
||||
},
|
||||
"types": "dist/typescript/index.d.ts",
|
||||
"name": "onnxruntime-react-native",
|
||||
|
|
|
|||
17
js/react_native/scripts/prepack-e2e.ts
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import * as fs from 'fs-extra';
|
||||
import * as path from 'path';
|
||||
|
||||
function updatePackageJson() {
|
||||
const selfPackageJsonPath = path.join(__dirname, '..', 'package.json');
|
||||
console.log(`=== start to update package.json: ${selfPackageJsonPath}`);
|
||||
const packageSelf = fs.readJSONSync(selfPackageJsonPath);
|
||||
delete packageSelf.dependencies['onnxruntime-common'];
|
||||
fs.writeJSONSync(selfPackageJsonPath, packageSelf, {spaces: 2});
|
||||
console.log('=== finished updating package.json.');
|
||||
}
|
||||
|
||||
// update version of dependency "onnxruntime-common" before packing
|
||||
updatePackageJson();
|
||||
|
|
@ -11,7 +11,7 @@ function updatePackageJson() {
|
|||
const packageCommon = fs.readJSONSync(commonPackageJsonPath);
|
||||
const packageSelf = fs.readJSONSync(selfPackageJsonPath);
|
||||
const version = packageCommon.version;
|
||||
packageSelf.dependencies['onnxruntime-common'] = `~${version}`;
|
||||
packageSelf.dependencies['onnxruntime-common'] = `^${version}`;
|
||||
fs.writeJSONSync(selfPackageJsonPath, packageSelf, {spaces: 2});
|
||||
console.log('=== finished updating package.json.');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"extends": "./tsconfig",
|
||||
"exclude": ["example", "scripts"]
|
||||
"exclude": ["e2e", "scripts"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,15 @@
|
|||
# yarn lockfile v1
|
||||
|
||||
|
||||
"@ampproject/remapping@^2.0.0":
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.0.1.tgz#9a04a4aba7b8323b65498d9554a1bdd15d960296"
|
||||
integrity sha512-EldHF4Ufj3NL9yCAmYrPzY+3/Yqrzxu24F4Mu4nRjK3w70AKYRmhuLwGZdA9JeoDsbIwkgGkbqUK2INuF582Og==
|
||||
dependencies:
|
||||
"@jridgewell/resolve-uri" "^3.0.3"
|
||||
"@jridgewell/trace-mapping" "^0.2.2"
|
||||
sourcemap-codec "1.4.8"
|
||||
|
||||
"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.16.7":
|
||||
version "7.16.7"
|
||||
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.16.7.tgz#44416b6bd7624b998f5b1af5d470856c40138789"
|
||||
|
|
@ -10,37 +19,37 @@
|
|||
"@babel/highlight" "^7.16.7"
|
||||
|
||||
"@babel/compat-data@^7.13.11", "@babel/compat-data@^7.16.4", "@babel/compat-data@^7.16.8":
|
||||
version "7.16.8"
|
||||
resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.16.8.tgz#31560f9f29fdf1868de8cb55049538a1b9732a60"
|
||||
integrity sha512-m7OkX0IdKLKPpBlJtF561YJal5y/jyI5fNfWbPxh2D/nbzzGI4qRyrD8xO2jB24u7l+5I2a43scCG2IrfjC50Q==
|
||||
version "7.17.0"
|
||||
resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.17.0.tgz#86850b8597ea6962089770952075dcaabb8dba34"
|
||||
integrity sha512-392byTlpGWXMv4FbyWw3sAZ/FrW/DrwqLGXpy0mbyNe9Taqv1mg9yON5/o0cnr8XYCkFTZbC1eV+c+LAROgrng==
|
||||
|
||||
"@babel/core@^7.1.0", "@babel/core@^7.1.6", "@babel/core@^7.12.10", "@babel/core@^7.12.3", "@babel/core@^7.14.0", "@babel/core@^7.7.2", "@babel/core@^7.8.0":
|
||||
version "7.16.12"
|
||||
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.16.12.tgz#5edc53c1b71e54881315923ae2aedea2522bb784"
|
||||
integrity sha512-dK5PtG1uiN2ikk++5OzSYsitZKny4wOCD0nrO4TqnW4BVBTQ2NGS3NgilvT/TEyxTST7LNyWV/T4tXDoD3fOgg==
|
||||
version "7.17.0"
|
||||
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.17.0.tgz#16b8772b0a567f215839f689c5ded6bb20e864d5"
|
||||
integrity sha512-x/5Ea+RO5MvF9ize5DeVICJoVrNv0Mi2RnIABrZEKYvPEpldXwauPkgvYA17cKa6WpU3LoYvYbuEMFtSNFsarA==
|
||||
dependencies:
|
||||
"@ampproject/remapping" "^2.0.0"
|
||||
"@babel/code-frame" "^7.16.7"
|
||||
"@babel/generator" "^7.16.8"
|
||||
"@babel/generator" "^7.17.0"
|
||||
"@babel/helper-compilation-targets" "^7.16.7"
|
||||
"@babel/helper-module-transforms" "^7.16.7"
|
||||
"@babel/helpers" "^7.16.7"
|
||||
"@babel/parser" "^7.16.12"
|
||||
"@babel/helpers" "^7.17.0"
|
||||
"@babel/parser" "^7.17.0"
|
||||
"@babel/template" "^7.16.7"
|
||||
"@babel/traverse" "^7.16.10"
|
||||
"@babel/types" "^7.16.8"
|
||||
"@babel/traverse" "^7.17.0"
|
||||
"@babel/types" "^7.17.0"
|
||||
convert-source-map "^1.7.0"
|
||||
debug "^4.1.0"
|
||||
gensync "^1.0.0-beta.2"
|
||||
json5 "^2.1.2"
|
||||
semver "^6.3.0"
|
||||
source-map "^0.5.0"
|
||||
|
||||
"@babel/generator@^7.14.0", "@babel/generator@^7.16.8", "@babel/generator@^7.7.2":
|
||||
version "7.16.8"
|
||||
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.16.8.tgz#359d44d966b8cd059d543250ce79596f792f2ebe"
|
||||
integrity sha512-1ojZwE9+lOXzcWdWmO6TbUzDfqLD39CmEhN8+2cX9XkDo5yW1OpgfejfliysR2AWLpMamTiOiAp/mtroaymhpw==
|
||||
"@babel/generator@^7.14.0", "@babel/generator@^7.17.0", "@babel/generator@^7.7.2":
|
||||
version "7.17.0"
|
||||
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.17.0.tgz#7bd890ba706cd86d3e2f727322346ffdbf98f65e"
|
||||
integrity sha512-I3Omiv6FGOC29dtlZhkfXO6pgkmukJSlT26QjVvS1DGZe/NzSVCPG41X0tS21oZkJYlovfj9qDWgKP+Cn4bXxw==
|
||||
dependencies:
|
||||
"@babel/types" "^7.16.8"
|
||||
"@babel/types" "^7.17.0"
|
||||
jsesc "^2.5.1"
|
||||
source-map "^0.5.0"
|
||||
|
||||
|
|
@ -70,9 +79,9 @@
|
|||
semver "^6.3.0"
|
||||
|
||||
"@babel/helper-create-class-features-plugin@^7.16.10", "@babel/helper-create-class-features-plugin@^7.16.7":
|
||||
version "7.16.10"
|
||||
resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.16.10.tgz#8a6959b9cc818a88815ba3c5474619e9c0f2c21c"
|
||||
integrity sha512-wDeej0pu3WN/ffTxMNCPW5UCiOav8IcLRxSIyp/9+IF2xJUM9h/OYjg0IJLHaL6F8oU8kqMz9nc1vryXhMsgXg==
|
||||
version "7.17.0"
|
||||
resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.17.0.tgz#3ba0eae83313d4077319d11a768c46adad026433"
|
||||
integrity sha512-S3+IHG72pJFb0RmJgeXg/TjVKt641ZsLla028haXJjdqCf9eccE5r1JsdO//L7nzTDzXjtC+hwV/lrkEb2+t0Q==
|
||||
dependencies:
|
||||
"@babel/helper-annotate-as-pure" "^7.16.7"
|
||||
"@babel/helper-environment-visitor" "^7.16.7"
|
||||
|
|
@ -83,12 +92,12 @@
|
|||
"@babel/helper-split-export-declaration" "^7.16.7"
|
||||
|
||||
"@babel/helper-create-regexp-features-plugin@^7.16.7":
|
||||
version "7.16.7"
|
||||
resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.16.7.tgz#0cb82b9bac358eb73bfbd73985a776bfa6b14d48"
|
||||
integrity sha512-fk5A6ymfp+O5+p2yCkXAu5Kyj6v0xh0RBeNcAkYUMDvvAAoxvSKXn+Jb37t/yWFiQVDFK1ELpUTD8/aLhCPu+g==
|
||||
version "7.17.0"
|
||||
resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.17.0.tgz#1dcc7d40ba0c6b6b25618997c5dbfd310f186fe1"
|
||||
integrity sha512-awO2So99wG6KnlE+TPs6rn83gCz5WlEePJDTnLEqbchMVrBeAujURVphRdigsk094VhvZehFoNOihSlcBjwsXA==
|
||||
dependencies:
|
||||
"@babel/helper-annotate-as-pure" "^7.16.7"
|
||||
regexpu-core "^4.7.1"
|
||||
regexpu-core "^5.0.1"
|
||||
|
||||
"@babel/helper-define-polyfill-provider@^0.3.1":
|
||||
version "0.3.1"
|
||||
|
|
@ -242,14 +251,14 @@
|
|||
"@babel/traverse" "^7.16.8"
|
||||
"@babel/types" "^7.16.8"
|
||||
|
||||
"@babel/helpers@^7.16.7":
|
||||
version "7.16.7"
|
||||
resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.16.7.tgz#7e3504d708d50344112767c3542fc5e357fffefc"
|
||||
integrity sha512-9ZDoqtfY7AuEOt3cxchfii6C7GDyyMBffktR5B2jvWv8u2+efwvpnVKXMWzNehqy68tKgAfSwfdw/lWpthS2bw==
|
||||
"@babel/helpers@^7.17.0":
|
||||
version "7.17.0"
|
||||
resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.17.0.tgz#79cdf6c66a579f3a7b5e739371bc63ca0306886b"
|
||||
integrity sha512-Xe/9NFxjPwELUvW2dsukcMZIp6XwPSbI4ojFBJuX5ramHuVE22SVcZIwqzdWo5uCgeTXW8qV97lMvSOjq+1+nQ==
|
||||
dependencies:
|
||||
"@babel/template" "^7.16.7"
|
||||
"@babel/traverse" "^7.16.7"
|
||||
"@babel/types" "^7.16.7"
|
||||
"@babel/traverse" "^7.17.0"
|
||||
"@babel/types" "^7.17.0"
|
||||
|
||||
"@babel/highlight@^7.16.7":
|
||||
version "7.16.10"
|
||||
|
|
@ -260,10 +269,10 @@
|
|||
chalk "^2.0.0"
|
||||
js-tokens "^4.0.0"
|
||||
|
||||
"@babel/parser@^7.1.0", "@babel/parser@^7.1.6", "@babel/parser@^7.14.0", "@babel/parser@^7.14.7", "@babel/parser@^7.16.10", "@babel/parser@^7.16.12", "@babel/parser@^7.16.7":
|
||||
version "7.16.12"
|
||||
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.16.12.tgz#9474794f9a650cf5e2f892444227f98e28cdf8b6"
|
||||
integrity sha512-VfaV15po8RiZssrkPweyvbGVSe4x2y+aciFCgn0n0/SJMR22cwofRV1mtnJQYcSB1wUTaA/X1LnA3es66MCO5A==
|
||||
"@babel/parser@^7.1.0", "@babel/parser@^7.1.6", "@babel/parser@^7.14.0", "@babel/parser@^7.14.7", "@babel/parser@^7.16.7", "@babel/parser@^7.17.0":
|
||||
version "7.17.0"
|
||||
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.17.0.tgz#f0ac33eddbe214e4105363bb17c3341c5ffcc43c"
|
||||
integrity sha512-VKXSCQx5D8S04ej+Dqsr1CzYvvWgf20jIw2D+YhQCrIlr2UZGaDds23Y0xg75/skOxpLCRpUZvk/1EAVkGoDOw==
|
||||
|
||||
"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.16.7":
|
||||
version "7.16.7"
|
||||
|
|
@ -819,9 +828,9 @@
|
|||
"@babel/helper-plugin-utils" "^7.16.7"
|
||||
|
||||
"@babel/plugin-transform-runtime@^7.0.0":
|
||||
version "7.16.10"
|
||||
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.16.10.tgz#53d9fd3496daedce1dd99639097fa5d14f4c7c2c"
|
||||
integrity sha512-9nwTiqETv2G7xI4RvXHNfpGdr8pAA+Q/YtN3yLK7OoK7n9OibVm/xymJ838a9A6E/IciOLPj82lZk0fW6O4O7w==
|
||||
version "7.17.0"
|
||||
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.17.0.tgz#0a2e08b5e2b2d95c4b1d3b3371a2180617455b70"
|
||||
integrity sha512-fr7zPWnKXNc1xoHfrIU9mN/4XKX4VLZ45Q+oMhfsYIaHvg7mHgmhfOy/ckRWqDK7XF3QDigRpkh5DKq6+clE8A==
|
||||
dependencies:
|
||||
"@babel/helper-module-imports" "^7.16.7"
|
||||
"@babel/helper-plugin-utils" "^7.16.7"
|
||||
|
|
@ -1012,20 +1021,20 @@
|
|||
"@babel/plugin-transform-typescript" "^7.16.7"
|
||||
|
||||
"@babel/register@^7.0.0":
|
||||
version "7.16.9"
|
||||
resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.16.9.tgz#fcfb23cfdd9ad95c9771e58183de83b513857806"
|
||||
integrity sha512-jJ72wcghdRIlENfvALcyODhNoGE5j75cYHdC+aQMh6cU/P86tiiXTp9XYZct1UxUMo/4+BgQRyNZEGx0KWGS+g==
|
||||
version "7.17.0"
|
||||
resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.17.0.tgz#8051e0b7cb71385be4909324f072599723a1f084"
|
||||
integrity sha512-UNZsMAZ7uKoGHo1HlEXfteEOYssf64n/PNLHGqOKq/bgYcu/4LrQWAHJwSCb3BRZK8Hi5gkJdRcwrGTO2wtRCg==
|
||||
dependencies:
|
||||
clone-deep "^4.0.1"
|
||||
find-cache-dir "^2.0.0"
|
||||
make-dir "^2.1.0"
|
||||
pirates "^4.0.0"
|
||||
pirates "^4.0.5"
|
||||
source-map-support "^0.5.16"
|
||||
|
||||
"@babel/runtime@^7.8.4":
|
||||
version "7.16.7"
|
||||
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.16.7.tgz#03ff99f64106588c9c403c6ecb8c3bafbbdff1fa"
|
||||
integrity sha512-9E9FJowqAsytyOY6LG+1KuueckRL+aQW+mKvXRXnuFGyRAyepJPmEo9vgMfXUA6O9u3IeEdv9MAkppFcaQwogQ==
|
||||
version "7.17.0"
|
||||
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.17.0.tgz#b8d142fc0f7664fb3d9b5833fd40dcbab89276c0"
|
||||
integrity sha512-etcO/ohMNaNA2UBdaXBBSX/3aEzFMRrVfaPv8Ptc0k+cWpWW0QFiGZ2XnVqQZI1Cf734LbPGmqBKWESfW4x/dQ==
|
||||
dependencies:
|
||||
regenerator-runtime "^0.13.4"
|
||||
|
||||
|
|
@ -1038,26 +1047,26 @@
|
|||
"@babel/parser" "^7.16.7"
|
||||
"@babel/types" "^7.16.7"
|
||||
|
||||
"@babel/traverse@^7.13.0", "@babel/traverse@^7.14.0", "@babel/traverse@^7.16.10", "@babel/traverse@^7.16.7", "@babel/traverse@^7.16.8", "@babel/traverse@^7.7.2":
|
||||
version "7.16.10"
|
||||
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.16.10.tgz#448f940defbe95b5a8029975b051f75993e8239f"
|
||||
integrity sha512-yzuaYXoRJBGMlBhsMJoUW7G1UmSb/eXr/JHYM/MsOJgavJibLwASijW7oXBdw3NQ6T0bW7Ty5P/VarOs9cHmqw==
|
||||
"@babel/traverse@^7.13.0", "@babel/traverse@^7.14.0", "@babel/traverse@^7.16.7", "@babel/traverse@^7.16.8", "@babel/traverse@^7.17.0", "@babel/traverse@^7.7.2":
|
||||
version "7.17.0"
|
||||
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.17.0.tgz#3143e5066796408ccc880a33ecd3184f3e75cd30"
|
||||
integrity sha512-fpFIXvqD6kC7c7PUNnZ0Z8cQXlarCLtCUpt2S1Dx7PjoRtCFffvOkHHSom+m5HIxMZn5bIBVb71lhabcmjEsqg==
|
||||
dependencies:
|
||||
"@babel/code-frame" "^7.16.7"
|
||||
"@babel/generator" "^7.16.8"
|
||||
"@babel/generator" "^7.17.0"
|
||||
"@babel/helper-environment-visitor" "^7.16.7"
|
||||
"@babel/helper-function-name" "^7.16.7"
|
||||
"@babel/helper-hoist-variables" "^7.16.7"
|
||||
"@babel/helper-split-export-declaration" "^7.16.7"
|
||||
"@babel/parser" "^7.16.10"
|
||||
"@babel/types" "^7.16.8"
|
||||
"@babel/parser" "^7.17.0"
|
||||
"@babel/types" "^7.17.0"
|
||||
debug "^4.1.0"
|
||||
globals "^11.1.0"
|
||||
|
||||
"@babel/types@^7.0.0", "@babel/types@^7.16.0", "@babel/types@^7.16.7", "@babel/types@^7.16.8", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4":
|
||||
version "7.16.8"
|
||||
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.16.8.tgz#0ba5da91dd71e0a4e7781a30f22770831062e3c1"
|
||||
integrity sha512-smN2DQc5s4M7fntyjGtyIPbRJv6wW4rU/94fmYJ7PKQuZkC0qGMHXJbg6sNGt12JmVr4k5YaptI/XtiLJBnmIg==
|
||||
"@babel/types@^7.0.0", "@babel/types@^7.16.0", "@babel/types@^7.16.7", "@babel/types@^7.16.8", "@babel/types@^7.17.0", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4":
|
||||
version "7.17.0"
|
||||
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.17.0.tgz#a826e368bccb6b3d84acd76acad5c0d87342390b"
|
||||
integrity sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw==
|
||||
dependencies:
|
||||
"@babel/helper-validator-identifier" "^7.16.7"
|
||||
to-fast-properties "^2.0.0"
|
||||
|
|
@ -1290,6 +1299,19 @@
|
|||
"@types/yargs" "^16.0.0"
|
||||
chalk "^4.0.0"
|
||||
|
||||
"@jridgewell/resolve-uri@^3.0.3":
|
||||
version "3.0.3"
|
||||
resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.0.3.tgz#b80093f4edbb5490c49746231513669c8f518acb"
|
||||
integrity sha512-fuIOnc81C5iRNevb/XPiM8Khp9bVjreydRQ37rt0C/dY0PAW1DRvEM3WrKX/5rStS5lbgwS0FCgqSndh9tvK5w==
|
||||
|
||||
"@jridgewell/trace-mapping@^0.2.2":
|
||||
version "0.2.2"
|
||||
resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.2.2.tgz#77510cc2f6f3b92e78c78de216d42de631b1d7fb"
|
||||
integrity sha512-I9AGQzMPEzQNJgib2YSqciYWazGsXSyu1rEEeaPeM1764ZtnfNTxA5bofzG/POMI3QcvpBUxwecOPZM6ZhkEpg==
|
||||
dependencies:
|
||||
"@jridgewell/resolve-uri" "^3.0.3"
|
||||
sourcemap-codec "1.4.8"
|
||||
|
||||
"@nodelib/fs.scandir@2.1.5":
|
||||
version "2.1.5"
|
||||
resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5"
|
||||
|
|
@ -1656,12 +1678,12 @@ absolute-path@^0.0.0:
|
|||
integrity sha1-p4di+9rftSl76ZsV01p4Wy8JW/c=
|
||||
|
||||
accepts@^1.3.7, accepts@~1.3.5, accepts@~1.3.7:
|
||||
version "1.3.7"
|
||||
resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd"
|
||||
integrity sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==
|
||||
version "1.3.8"
|
||||
resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e"
|
||||
integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==
|
||||
dependencies:
|
||||
mime-types "~2.1.24"
|
||||
negotiator "0.6.2"
|
||||
mime-types "~2.1.34"
|
||||
negotiator "0.6.3"
|
||||
|
||||
acorn-globals@^6.0.0:
|
||||
version "6.0.0"
|
||||
|
|
@ -2652,9 +2674,9 @@ ee-first@1.1.1:
|
|||
integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=
|
||||
|
||||
electron-to-chromium@^1.4.17:
|
||||
version "1.4.61"
|
||||
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.61.tgz#97689f81b4ac5c996363d9ee7babd3406c44d6c3"
|
||||
integrity sha512-kpzCOOFlx63C9qKRyIDEsKIUgzoe98ump7T4gU+/OLzj8gYkkWf2SIyBjhTSE0keAjMAp3i7C262YtkQOMYrGw==
|
||||
version "1.4.62"
|
||||
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.62.tgz#f97b643d206813b9154f1700b3c5b5b828ddc9ac"
|
||||
integrity sha512-fWc/zAThqZzl7fbuLzar+x6bqZBWHrsBXQOqv//yrgdTLY/G3JGTPOWhPKIhbhynJJhqE9QNzKzlpCINUmUMoA==
|
||||
|
||||
emittery@^0.8.1:
|
||||
version "0.8.1"
|
||||
|
|
@ -2957,9 +2979,9 @@ find-up@^4.0.0, find-up@^4.1.0:
|
|||
path-exists "^4.0.0"
|
||||
|
||||
flow-parser@0.*:
|
||||
version "0.170.0"
|
||||
resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.170.0.tgz#52cac19fd884c41894f39368bdf384183a597b3b"
|
||||
integrity sha512-H1Fu8EM/F6MtOpHYpsFXPyySatowrXMWENxRmmKAfirfBr8kjHrms3YDuv82Nhn0xWaXV7Hhynp2tEaZsLhHLw==
|
||||
version "0.171.0"
|
||||
resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.171.0.tgz#5ffae78f050e43513abc86add9f19a97fcbabcdb"
|
||||
integrity sha512-cqEsgic6HH81Pz0IQLeyuoh0O8Y7ECAIdZ0idPQ9P1jZ/kHB9KK0hwqnjVtqTGog15JURkIxvyXm+9pAb6uuSQ==
|
||||
|
||||
flow-parser@^0.121.0:
|
||||
version "0.121.0"
|
||||
|
|
@ -4679,7 +4701,7 @@ mime-db@1.51.0, "mime-db@>= 1.43.0 < 2":
|
|||
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.51.0.tgz#d9ff62451859b18342d960850dc3cfb77e63fb0c"
|
||||
integrity sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g==
|
||||
|
||||
mime-types@^2.1.12, mime-types@^2.1.27, mime-types@~2.1.24:
|
||||
mime-types@^2.1.12, mime-types@^2.1.27, mime-types@~2.1.34:
|
||||
version "2.1.34"
|
||||
resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.34.tgz#5a712f9ec1503511a945803640fafe09d3793c24"
|
||||
integrity sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A==
|
||||
|
|
@ -4770,10 +4792,10 @@ natural-compare@^1.4.0:
|
|||
resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
|
||||
integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=
|
||||
|
||||
negotiator@0.6.2:
|
||||
version "0.6.2"
|
||||
resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb"
|
||||
integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==
|
||||
negotiator@0.6.3:
|
||||
version "0.6.3"
|
||||
resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd"
|
||||
integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==
|
||||
|
||||
neo-async@^2.5.0:
|
||||
version "2.6.2"
|
||||
|
|
@ -5108,7 +5130,7 @@ pify@^4.0.1:
|
|||
resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231"
|
||||
integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==
|
||||
|
||||
pirates@^4.0.0, pirates@^4.0.4:
|
||||
pirates@^4.0.4, pirates@^4.0.5:
|
||||
version "4.0.5"
|
||||
resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.5.tgz#feec352ea5c3268fb23a37c702ab1699f35a5f3b"
|
||||
integrity sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==
|
||||
|
|
@ -5362,10 +5384,10 @@ recast@^0.20.3:
|
|||
source-map "~0.6.1"
|
||||
tslib "^2.0.1"
|
||||
|
||||
regenerate-unicode-properties@^9.0.0:
|
||||
version "9.0.0"
|
||||
resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-9.0.0.tgz#54d09c7115e1f53dc2314a974b32c1c344efe326"
|
||||
integrity sha512-3E12UeNSPfjrgwjkR81m5J7Aw/T55Tu7nUyZVQYCKEOs+2dkxEY+DpPtZzO4YruuiPb7NkYLVcyJC4+zCbk5pA==
|
||||
regenerate-unicode-properties@^10.0.1:
|
||||
version "10.0.1"
|
||||
resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-10.0.1.tgz#7f442732aa7934a3740c779bb9b3340dccc1fb56"
|
||||
integrity sha512-vn5DU6yg6h8hP/2OkQo3K7uVILvY4iu0oI4t3HFa81UPkhGJwkRwM10JEc3upjdhHjs/k8GJY1sRBhk5sr69Bw==
|
||||
dependencies:
|
||||
regenerate "^1.4.2"
|
||||
|
||||
|
|
@ -5394,27 +5416,27 @@ regex-not@^1.0.0, regex-not@^1.0.2:
|
|||
extend-shallow "^3.0.2"
|
||||
safe-regex "^1.1.0"
|
||||
|
||||
regexpu-core@^4.7.1:
|
||||
version "4.8.0"
|
||||
resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.8.0.tgz#e5605ba361b67b1718478501327502f4479a98f0"
|
||||
integrity sha512-1F6bYsoYiz6is+oz70NWur2Vlh9KWtswuRuzJOfeYUrfPX2o8n74AnUVaOGDbUqVGO9fNHu48/pjJO4sNVwsOg==
|
||||
regexpu-core@^5.0.1:
|
||||
version "5.0.1"
|
||||
resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-5.0.1.tgz#c531122a7840de743dcf9c83e923b5560323ced3"
|
||||
integrity sha512-CriEZlrKK9VJw/xQGJpQM5rY88BtuL8DM+AEwvcThHilbxiTAy8vq4iJnd2tqq8wLmjbGZzP7ZcKFjbGkmEFrw==
|
||||
dependencies:
|
||||
regenerate "^1.4.2"
|
||||
regenerate-unicode-properties "^9.0.0"
|
||||
regjsgen "^0.5.2"
|
||||
regjsparser "^0.7.0"
|
||||
regenerate-unicode-properties "^10.0.1"
|
||||
regjsgen "^0.6.0"
|
||||
regjsparser "^0.8.2"
|
||||
unicode-match-property-ecmascript "^2.0.0"
|
||||
unicode-match-property-value-ecmascript "^2.0.0"
|
||||
|
||||
regjsgen@^0.5.2:
|
||||
version "0.5.2"
|
||||
resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.5.2.tgz#92ff295fb1deecbf6ecdab2543d207e91aa33733"
|
||||
integrity sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A==
|
||||
regjsgen@^0.6.0:
|
||||
version "0.6.0"
|
||||
resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.6.0.tgz#83414c5354afd7d6627b16af5f10f41c4e71808d"
|
||||
integrity sha512-ozE883Uigtqj3bx7OhL1KNbCzGyW2NQZPl6Hs09WTvCuZD5sTI4JY58bkbQWa/Y9hxIsvJ3M8Nbf7j54IqeZbA==
|
||||
|
||||
regjsparser@^0.7.0:
|
||||
version "0.7.0"
|
||||
resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.7.0.tgz#a6b667b54c885e18b52554cb4960ef71187e9968"
|
||||
integrity sha512-A4pcaORqmNMDVwUjWoTzuhwMGpP+NykpfqAsEgI1FSH/EzC7lrN5TMd+kN8YCovX+jMpu8eaqXgXPCa0g8FQNQ==
|
||||
regjsparser@^0.8.2:
|
||||
version "0.8.4"
|
||||
resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.8.4.tgz#8a14285ffcc5de78c5b95d62bbf413b6bc132d5f"
|
||||
integrity sha512-J3LABycON/VNEu3abOviqGHuB/LOtOQj8SKmfP9anY5GfAVw/SPjwzSjxGjbZXIxbGfqTHtJw58C2Li/WkStmA==
|
||||
dependencies:
|
||||
jsesc "~0.5.0"
|
||||
|
||||
|
|
@ -5816,6 +5838,11 @@ source-map@^0.7.3:
|
|||
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383"
|
||||
integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==
|
||||
|
||||
sourcemap-codec@1.4.8:
|
||||
version "1.4.8"
|
||||
resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz#ea804bd94857402e6992d05a38ef1ae35a9ab4c4"
|
||||
integrity sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==
|
||||
|
||||
split-string@^3.0.1, split-string@^3.0.2:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2"
|
||||
|
|
|
|||
|
|
@ -0,0 +1,297 @@
|
|||
parameters:
|
||||
- name: NpmPublish
|
||||
displayName: 'NPM packages publish configuration'
|
||||
type: string
|
||||
values:
|
||||
- 'nightly (@dev)'
|
||||
- 'release candidate (@rc)'
|
||||
- 'production (@latest)'
|
||||
- 'custom'
|
||||
default: 'nightly (@dev)'
|
||||
|
||||
variables:
|
||||
build_config: Release
|
||||
${{ if eq(parameters.NpmPublish, 'nightly (@dev)') }}:
|
||||
# 'dev' will skip generating onnxruntime-common package when it's not updated
|
||||
# since react-native e2e always requires both onnxruntime-common and onnxruntime-react-native packages,
|
||||
# use 'custom' type mode here.
|
||||
npm_packaging_mode: '-dev.$(Get-Date -Format yyyyMMdd)-$(git rev-parse --short HEAD)'
|
||||
${{ if eq(parameters.NpmPublish, 'release candidate (@rc)') }}:
|
||||
npm_packaging_mode: 'rc'
|
||||
${{ if eq(parameters.NpmPublish, 'production (@latest)') }}:
|
||||
npm_packaging_mode: 'release'
|
||||
${{ if eq(parameters.NpmPublish, 'custom') }}:
|
||||
npm_packaging_mode: '$(VersionSuffix)'
|
||||
|
||||
jobs:
|
||||
- template: templates/android-java-api-aar.yml
|
||||
parameters:
|
||||
buildConfig: '${{variables.build_config}}'
|
||||
buildSettings: '$(Build.SourcesDirectory)/tools/ci_build/github/js/react_native_e2e_mobile_aar_build_settings.json'
|
||||
includedOpsConfig: '$(Build.SourcesDirectory)/tools/ci_build/github/android/mobile_package.required_operators.config'
|
||||
artifactName: 'onnxruntime-android-mobile-aar'
|
||||
job_name_suffix: 'For_React_Native'
|
||||
pool_name: 'Linux-CPU-2019'
|
||||
|
||||
- job: ReactNative_CI
|
||||
pool:
|
||||
vmImage: 'macOS-11'
|
||||
dependsOn:
|
||||
- Android_Java_API_AAR_Packaging_For_React_Native
|
||||
timeoutInMinutes: 120
|
||||
steps:
|
||||
# Onnx has no 3.9 python package available yet, need to use python 3.8 to avoid build onnx package
|
||||
# pythonVersion can be updated in Azure pipeline settings
|
||||
# https://dev.azure.com/onnxruntime/onnxruntime/_build?definitionId=188
|
||||
- task: UsePythonVersion@0
|
||||
displayName: Use Python $(pythonVersion)
|
||||
inputs:
|
||||
versionSpec: $(pythonVersion)
|
||||
|
||||
- task: NodeTool@0
|
||||
inputs:
|
||||
versionSpec: '16.x'
|
||||
|
||||
- script:
|
||||
brew install coreutils ninja npm yarn
|
||||
displayName: Install coreutils, ninja, npm, and yarn
|
||||
|
||||
- script:
|
||||
/bin/bash $(Build.SourcesDirectory)/tools/ci_build/github/android/setup_gradle_wrapper.sh $(pwd)
|
||||
displayName: Setup gradle wrapper to use gradle 6.8.3
|
||||
|
||||
- script: |
|
||||
python3 -m pip install -q flatbuffers
|
||||
workingDirectory: '$(Build.BinariesDirectory)'
|
||||
displayName: Install python modules
|
||||
|
||||
- script: |
|
||||
python3 $(Build.SourcesDirectory)/tools/ci_build/github/apple/build_ios_framework.py \
|
||||
--config ${{variables.build_config}} \
|
||||
--build_dir $(Build.BinariesDirectory)/ios_framework \
|
||||
--include_ops_by_config $(Build.SourcesDirectory)/tools/ci_build/github/android/mobile_package.required_operators.config \
|
||||
$(Build.SourcesDirectory)/tools/ci_build/github/js/react_native_e2e_mobile_ios_framework_build_settings.json
|
||||
cd $(Build.BinariesDirectory)/ios_framework/framework_out
|
||||
zip -r onnxruntime-mobile-c.zip .
|
||||
displayName: Build iOS package
|
||||
|
||||
- task: DownloadPipelineArtifact@2
|
||||
inputs:
|
||||
buildType: 'current'
|
||||
artifactName: 'onnxruntime-android-mobile-aar'
|
||||
targetPath: '$(Build.BinariesDirectory)/android-mobile-aar'
|
||||
displayName: Download Android Aar artifacts
|
||||
|
||||
- task: CopyFiles@2
|
||||
inputs:
|
||||
sourceFolder: $(Build.BinariesDirectory)/android-mobile-aar
|
||||
contents: onnxruntime-mobile-*.aar
|
||||
targetFolder: $(Build.SourcesDirectory)/js/react_native/android/libs
|
||||
displayName: Copy Android package to React Native directory
|
||||
|
||||
- task: CopyFiles@2
|
||||
inputs:
|
||||
sourceFolder: $(Build.BinariesDirectory)/ios_framework/framework_out
|
||||
contents: onnxruntime-mobile-c.zip
|
||||
targetFolder: $(Build.SourcesDirectory)/js/react_native/local_pods
|
||||
displayName: Copy iOS package to React Native directory
|
||||
|
||||
- script: |
|
||||
npm ci
|
||||
workingDirectory: '$(Build.SourcesDirectory)/js'
|
||||
displayName: npm ci js
|
||||
|
||||
- script: |
|
||||
npm ci
|
||||
workingDirectory: '$(Build.SourcesDirectory)/js/common'
|
||||
displayName: npm ci js/common
|
||||
|
||||
- script: |
|
||||
yarn
|
||||
workingDirectory: '$(Build.SourcesDirectory)/js/react_native'
|
||||
displayName: yarn js/react_native
|
||||
|
||||
- script: |
|
||||
python3 tools/python/run_android_emulator.py \
|
||||
--android-sdk-root $(ANDROID_SDK_ROOT) \
|
||||
--create-avd --system-image "system-images;android-30;google_apis;x86_64" \
|
||||
--start --emulator-extra-args="-partition-size 4096" \
|
||||
--emulator-pid-file $(Build.BinariesDirectory)/emulator.pid
|
||||
displayName: Start Android Emulator
|
||||
|
||||
- script: |
|
||||
xcrun simctl create iPhoneRNTest com.apple.CoreSimulator.SimDeviceType.iPhone-13
|
||||
workingDirectory: '$(Build.SourcesDirectory)/js/react_native/e2e/ios'
|
||||
displayName: Start iOS Simulator
|
||||
|
||||
- task: Gradle@3
|
||||
inputs:
|
||||
gradleWrapperFile: '$(Build.SourcesDirectory)/js/react_native/android/gradlew'
|
||||
workingDirectory: '$(Build.SourcesDirectory)/js/react_native/android'
|
||||
options: '--stacktrace'
|
||||
tasks: 'connectedDebugAndroidTest'
|
||||
publishJUnitResults: true
|
||||
testResultsFiles: '**/TEST-*.xml'
|
||||
testRunTitle: 'React Native Android Instrumented Test results'
|
||||
javaHomeOption: 'JDKVersion'
|
||||
sonarQubeRunAnalysis: false
|
||||
spotBugsAnalysis: false
|
||||
displayName: Run React Native Android Instrumented Tests
|
||||
continueOnError: false
|
||||
|
||||
- script: |
|
||||
pod install
|
||||
workingDirectory: '$(Build.SourcesDirectory)/js/react_native/ios'
|
||||
displayName: Pod install for onnxruntime react native ios bridge library
|
||||
|
||||
- task: Xcode@5
|
||||
inputs:
|
||||
actions: 'test'
|
||||
configuration: 'Debug'
|
||||
sdk: 'iphonesimulator'
|
||||
xcWorkspacePath: '$(Build.SourcesDirectory)/js/react_native/ios/OnnxruntimeModule.xcworkspace'
|
||||
scheme: 'OnnxruntimeModuleTest'
|
||||
packageApp: false
|
||||
destinationPlatformOption: 'iOS'
|
||||
destinationSimulators: 'iPhone 13,OS=latest'
|
||||
workingDirectory: '$(Build.SourcesDirectory)/js/react_native/ios'
|
||||
xcprettyArgs: '--output build/reports/test-results.xml'
|
||||
publishJUnitResults: true
|
||||
testRunTitle: 'React Native iOS Instrumented Test Results'
|
||||
displayName: Run React Native iOS Instrumented Tests
|
||||
|
||||
- task: PublishTestResults@2
|
||||
inputs:
|
||||
testResultsFiles: '$(Build.SourcesDirectory)/js/react_native/ios/build/reports/test-results.xml'
|
||||
failTaskOnFailedTests: true
|
||||
testRunTitle: 'React Native iOS Instrumented Test results'
|
||||
condition: succeededOrFailed()
|
||||
displayName: Publish React Native iOS Instrumented Test Results
|
||||
|
||||
- script: |
|
||||
yarn prepack-e2e
|
||||
workingDirectory: '$(Build.SourcesDirectory)/js/react_native'
|
||||
displayName: Prepare Android and iOS e2e tests
|
||||
|
||||
- task: PowerShell@2
|
||||
inputs:
|
||||
filePath: '$(Build.SourcesDirectory)/tools/ci_build/github/js/pack-npm-packages.ps1'
|
||||
arguments: '"${{variables.npm_packaging_mode}}" $(Build.SourcesDirectory) react_native'
|
||||
workingDirectory: '$(Build.SourcesDirectory)'
|
||||
errorActionPreference: stop
|
||||
displayName: Pack NPM packages
|
||||
|
||||
- task: CopyFiles@2
|
||||
inputs:
|
||||
sourceFolder: $(Build.SourcesDirectory)/js/common
|
||||
contents: onnxruntime-common*.tgz
|
||||
targetFolder: $(Build.SourcesDirectory)/js/react_native/e2e
|
||||
displayName: Copy onnxruntime-common npm package to React Native e2e directory
|
||||
|
||||
- task: CopyFiles@2
|
||||
inputs:
|
||||
sourceFolder: $(Build.SourcesDirectory)/js/react_native
|
||||
contents: onnxruntime-react-native*.tgz
|
||||
targetFolder: $(Build.SourcesDirectory)/js/react_native/e2e
|
||||
displayName: Copy onnxruntime-react-native npm package to React Native e2e directory
|
||||
|
||||
- script: |
|
||||
mv onnxruntime-common*.tgz onnxruntime-common.tgz
|
||||
yarn add --no-lockfile file:./onnxruntime-common.tgz
|
||||
mv onnxruntime-react-native*.tgz onnxruntime-react-native.tgz
|
||||
yarn add --no-lockfile file:./onnxruntime-react-native.tgz
|
||||
yarn
|
||||
workingDirectory: '$(Build.SourcesDirectory)/js/react_native/e2e'
|
||||
displayName: Bootstrap Android and iOS e2e tests
|
||||
|
||||
- script: |
|
||||
pod install
|
||||
workingDirectory: '$(Build.SourcesDirectory)/js/react_native/e2e/ios'
|
||||
displayName: Pod install for onnxruntime react native ios e2e tests
|
||||
|
||||
- script: |
|
||||
keytool -genkey -v -keystore debug.keystore -alias androiddebugkey -storepass android \
|
||||
-keypass android -keyalg RSA -keysize 2048 -validity 999999 -dname "CN=Android Debug,O=Android,C=US"
|
||||
workingDirectory: '$(Build.SourcesDirectory)/js/react_native/e2e/android'
|
||||
displayName: Generate a debug keystore
|
||||
|
||||
- task: CopyFiles@2
|
||||
inputs:
|
||||
sourceFolder: $(Build.BinariesDirectory)/android-mobile-aar
|
||||
contents: onnxruntime-mobile-*.aar
|
||||
targetFolder: $(Build.SourcesDirectory)/js/react_native/e2e/node_modules/onnxruntime-react-native/android/libs
|
||||
displayName: Copy Android package to React Native e2e directory
|
||||
|
||||
- task: Gradle@3
|
||||
inputs:
|
||||
gradleWrapperFile: '$(Build.SourcesDirectory)/js/react_native/e2e/android/gradlew'
|
||||
workingDirectory: '$(Build.SourcesDirectory)/js/react_native/e2e/android'
|
||||
options: '--stacktrace'
|
||||
tasks: ':app:connectedDebugAndroidTest'
|
||||
publishJUnitResults: true
|
||||
testResultsFiles: '**/TEST-*.xml'
|
||||
testRunTitle: 'React Native Android e2e Test results'
|
||||
javaHomeOption: 'JDKVersion'
|
||||
sonarQubeRunAnalysis: false
|
||||
spotBugsAnalysis: false
|
||||
displayName: Run React Native Android e2e Tests
|
||||
continueOnError: false
|
||||
|
||||
- script: |
|
||||
export FORCE_BUNDLING=1
|
||||
export RCT_NO_LAUNCH_PACKAGER=1
|
||||
export ENTRY_FILE=index.tsx
|
||||
xcrun xcodebuild test -workspace $(Build.SourcesDirectory)/js/react_native/e2e/ios/OnnxruntimeModuleExample.xcworkspace \
|
||||
-scheme OnnxruntimeModuleExample -destination 'platform=iOS Simulator,OS=latest,name=iPhoneRNTest' \
|
||||
-derivedDataPath $(Build.BinariesDirectory)/react_native/ios_e2e_test/derived_data | xcpretty -r junit --no-color \
|
||||
--output $(Build.SourcesDirectory)/js/react_native/e2e/ios/build/reports/test-results.xml
|
||||
workingDirectory: '$(Build.SourcesDirectory)/js/react_native/e2e'
|
||||
displayName: Run React Native iOS e2e tests
|
||||
|
||||
- task: PublishTestResults@2
|
||||
inputs:
|
||||
testResultsFiles: '$(Build.SourcesDirectory)/js/react_native/e2e/ios/build/reports/test-results.xml'
|
||||
failTaskOnFailedTests: true
|
||||
testRunTitle: 'React Native iOS e2e Test results'
|
||||
condition: succeededOrFailed()
|
||||
displayName: Publish React Native iOS e2e Test Results
|
||||
|
||||
- script: |
|
||||
python3 tools/python/run_android_emulator.py \
|
||||
--android-sdk-root $(ANDROID_SDK_ROOT) \
|
||||
--stop \
|
||||
--emulator-pid-file $(Build.BinariesDirectory)/emulator.pid
|
||||
displayName: Stop Android Emulator
|
||||
condition: always()
|
||||
|
||||
- script: |
|
||||
xcrun simctl delete iPhoneRNTest
|
||||
workingDirectory: '$(Build.SourcesDirectory)/js/react_native/e2e/ios'
|
||||
displayName: Stop iOS Simulator
|
||||
condition: always()
|
||||
|
||||
- script: |
|
||||
git restore .
|
||||
workingDirectory: '$(Build.SourcesDirectory)/js/react_native'
|
||||
displayName: Restore git changes for e2e tests
|
||||
|
||||
- task: CopyFiles@2
|
||||
inputs:
|
||||
sourceFolder: $(Build.SourcesDirectory)/js/react_native
|
||||
contents: onnxruntime-react-native*.tgz
|
||||
targetFolder: $(Build.ArtifactStagingDirectory)
|
||||
displayName: Create Artifacts onnxruntime-react-native
|
||||
|
||||
- task: PublishPipelineArtifact@0
|
||||
inputs:
|
||||
artifactName: 'NPM_packages'
|
||||
targetPath: '$(Build.ArtifactStagingDirectory)'
|
||||
displayName: Publish Pipeline Artifact
|
||||
|
||||
- template: templates/component-governance-component-detection-steps.yml
|
||||
parameters :
|
||||
condition : 'succeeded'
|
||||
|
||||
- task: mspremier.PostBuildCleanup.PostBuildCleanup-task.PostBuildCleanup@3
|
||||
displayName: Clean Agent Directories
|
||||
condition: always()
|
||||
|
|
@ -20,7 +20,7 @@ parameters:
|
|||
default: ''
|
||||
|
||||
- name: job_name_suffix
|
||||
displayName: job name
|
||||
displayName: Job name
|
||||
type: string
|
||||
default: ''
|
||||
|
||||
|
|
@ -30,12 +30,17 @@ parameters:
|
|||
type: string
|
||||
default: '0'
|
||||
|
||||
- name: pool_name
|
||||
displayName: Pool name
|
||||
type: string
|
||||
default: 'Linux-CPU'
|
||||
|
||||
jobs:
|
||||
- job: Android_Java_API_AAR_Packaging_${{ parameters.job_name_suffix }}
|
||||
timeoutInMinutes: 120
|
||||
workspace:
|
||||
clean: all
|
||||
pool: Linux-CPU
|
||||
pool: ${{parameters.pool_name}}
|
||||
|
||||
variables:
|
||||
artifacts_directory: $(Build.BinariesDirectory)/.artifacts
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License.
|
||||
|
||||
# This script makes NPM packages for onnxruntime-common and onnxruntime-(node|web)
|
||||
# This script makes NPM packages for onnxruntime-common and onnxruntime-(node|web|react-native)
|
||||
#
|
||||
# Release Mode (release):
|
||||
# Do not update version number. Version number should be matching $(ORT_ROOT)/VERSION_NUMBER
|
||||
# Always generate packages for onnxruntime-common and onnxruntime-(node|web)
|
||||
# Always generate packages for onnxruntime-common and onnxruntime-(node|web|react-native)
|
||||
#
|
||||
# Release Candidate Mode (rc):
|
||||
# Update version number to {VERSION_BASE}-rc.{YYYYMMDD}-{COMMIT}
|
||||
# Always generate packages for onnxruntime-common and onnxruntime-(node|web)
|
||||
# Always generate packages for onnxruntime-common and onnxruntime-(node|web|react-native)
|
||||
#
|
||||
# Dev Mode (dev):
|
||||
# Compare current content with latest @dev package for onnxruntime-common. If no change, we
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
#
|
||||
# Custom Mode:
|
||||
# Use first commandline parameter as version number suffix.
|
||||
# Always generate packages for onnxruntime-common and onnxruntime-(node|web)
|
||||
# Always generate packages for onnxruntime-common and onnxruntime-(node|web|react-native)
|
||||
#
|
||||
|
||||
if ($Args.Count -ne 3) {
|
||||
|
|
@ -27,7 +27,7 @@ if ($Args.Count -ne 3) {
|
|||
}
|
||||
$MODE=$Args[0] # "dev" or "release" or "rc"; otherwise it is considered as a version number
|
||||
$ORT_ROOT=$Args[1] # eg. D:\source\onnxruntime
|
||||
$TARGET=$Args[2] # "node" or "web"
|
||||
$TARGET=$Args[2] # "node" or "web" or "react_native"
|
||||
|
||||
Function Generate-Package-Version-Number {
|
||||
pushd $ORT_ROOT
|
||||
|
|
@ -51,8 +51,8 @@ Function Generate-Package-Version-Number {
|
|||
return @{ version = $version_number; commit = $version_commit }
|
||||
}
|
||||
|
||||
$JS_COMMON_DIR="$ORT_ROOT\js\common"
|
||||
$JS_TARGET_DIR="$ORT_ROOT\js\$TARGET"
|
||||
$JS_COMMON_DIR=Join-Path -Path "$ORT_ROOT" -ChildPath "js\common"
|
||||
$JS_TARGET_DIR=Join-Path -Path "$ORT_ROOT" -ChildPath "js\$TARGET"
|
||||
|
||||
if ($MODE -eq "dev") {
|
||||
# For @dev builds, we compares the following 2 package versions for onnxruntime-common:
|
||||
|
|
@ -60,8 +60,8 @@ if ($MODE -eq "dev") {
|
|||
# - 'latest': the latest @dev version from npm.js repository.
|
||||
#
|
||||
# If the contents of the 2 versions are identical, we don't publish a new version. Instead,
|
||||
# we only publish onnxruntime-node/onnxruntime-web and set its dependency's version to the
|
||||
# 'latest'.
|
||||
# we only publish onnxruntime-node/onnxruntime-web/onnxruntime-react-native and
|
||||
# set its dependency's version to the 'latest'.
|
||||
|
||||
# check latest @dev version
|
||||
Write-Host "Start checking version for onnxruntime-common@dev"
|
||||
|
|
@ -83,12 +83,12 @@ if ($MODE -eq "dev") {
|
|||
|
||||
# make package for latest
|
||||
pushd $JS_COMMON_DIR
|
||||
npm version $ort_common_latest_version
|
||||
npm version --allow-same-version $ort_common_latest_version
|
||||
echo $($version_number.commit) | Out-File -Encoding ascii -NoNewline -FilePath ./__commit.txt
|
||||
npm pack
|
||||
popd
|
||||
|
||||
$current_tgz_compare_only="$JS_COMMON_DIR\onnxruntime-common-$ort_common_latest_version.tgz"
|
||||
$current_tgz_compare_only=Join-Path -Path "$JS_COMMON_DIR" -ChildPath "onnxruntime-common-$ort_common_latest_version.tgz"
|
||||
if (!(Test-Path $current_tgz_compare_only)) {
|
||||
throw "File is not generated: $current_tgz_compare_only"
|
||||
}
|
||||
|
|
@ -114,21 +114,27 @@ if ($MODE -eq "dev") {
|
|||
npm install "dir-compare-cli@1.0.1" "json-diff@0.5.4"
|
||||
|
||||
Write-Host "Compare package.json"
|
||||
npx json-diff ..\latest\package\package.json ..\current\package\package.json
|
||||
$latest_package_json=Join-Path -Path ".." -ChildPath "latest\package\package.json"
|
||||
$current_package_json=Join-Path -Path ".." -ChildPath "current\package\package.json"
|
||||
npx json-diff $latest_package_json $current_package_json
|
||||
$use_latest=$?
|
||||
Write-Host "Result: $use_latest"
|
||||
if ($use_latest) {
|
||||
# package.json matches. now check package contents.
|
||||
|
||||
# do not compare commit number
|
||||
if (test-path ../latest/package/__commit.txt) { rm ../latest/package/__commit.txt }
|
||||
if (test-path ../current/package/__commit.txt) { rm ../current/package/__commit.txt }
|
||||
$latest_package_commit=Join-Path -Path ".." -ChildPath "latest\package\__commit.txt"
|
||||
$current_package_commit=Join-Path -Path ".." -ChildPath "current\package\__commit.txt"
|
||||
if (test-path $latest_package_commit) { rm $latest_package_commit }
|
||||
if (test-path $current_package_commit) { rm $current_package_commit }
|
||||
# skip package.json, we already checked them
|
||||
rm ../latest/package/package.json
|
||||
rm ../current/package/package.json
|
||||
rm $latest_package_json
|
||||
rm $current_package_json
|
||||
|
||||
Write-Host "Compare package contents"
|
||||
npx dircompare -c ../latest/package/ ../current/package/
|
||||
$latest_package_dir=Join-Path -Path ".." -ChildPath "latest\package"
|
||||
$current_package_dir=Join-Path -Path ".." -ChildPath "current\package"
|
||||
npx dircompare -c $latest_package_dir $current_package_dir
|
||||
$use_latest=$?
|
||||
Write-Host "Result: $use_latest"
|
||||
}
|
||||
|
|
@ -139,7 +145,7 @@ if ($MODE -eq "dev") {
|
|||
Write-Host "Need update to onnxruntime-common@dev"
|
||||
# need to publish a new version for onnxruntime-common
|
||||
pushd $JS_COMMON_DIR
|
||||
npm version $($version_number.version)
|
||||
npm version --allow-same-version $($version_number.version)
|
||||
# file __commit.txt is already generated
|
||||
npm pack
|
||||
popd
|
||||
|
|
@ -147,7 +153,7 @@ if ($MODE -eq "dev") {
|
|||
|
||||
# make package for target
|
||||
pushd $JS_TARGET_DIR
|
||||
npm version $($version_number.version)
|
||||
npm version --allow-same-version $($version_number.version)
|
||||
echo $($version_number.commit) | Out-File -Encoding ascii -NoNewline -FilePath ./__commit.txt
|
||||
npm pack
|
||||
popd
|
||||
|
|
@ -164,12 +170,12 @@ if ($MODE -eq "dev") {
|
|||
$version_number=Generate-Package-Version-Number
|
||||
|
||||
pushd $JS_COMMON_DIR
|
||||
npm version $($version_number.version)
|
||||
npm version --allow-same-version $($version_number.version)
|
||||
npm pack
|
||||
popd
|
||||
|
||||
pushd $JS_TARGET_DIR
|
||||
npm version $($version_number.version)
|
||||
npm version --allow-same-version $($version_number.version)
|
||||
npm pack
|
||||
popd
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"build_abis": [
|
||||
"x86_64"
|
||||
],
|
||||
"android_min_sdk_version": 21,
|
||||
"android_target_sdk_version": 24,
|
||||
"build_params": [
|
||||
"--android",
|
||||
"--parallel",
|
||||
"--cmake_generator=Ninja",
|
||||
"--build_java",
|
||||
"--build_shared_lib",
|
||||
"--minimal_build=extended",
|
||||
"--disable_rtti",
|
||||
"--disable_ml_ops",
|
||||
"--disable_exceptions",
|
||||
"--enable_reduced_operator_type_support",
|
||||
"--use_nnapi",
|
||||
"--skip_tests"
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"build_osx_archs": {
|
||||
"iphonesimulator": [
|
||||
"x86_64"
|
||||
]
|
||||
},
|
||||
"build_params": [
|
||||
"--ios",
|
||||
"--parallel",
|
||||
"--use_xcode",
|
||||
"--build_apple_framework",
|
||||
"--minimal_build=extended",
|
||||
"--disable_rtti",
|
||||
"--disable_ml_ops",
|
||||
"--disable_exceptions",
|
||||
"--enable_reduced_operator_type_support",
|
||||
"--use_coreml",
|
||||
"--skip_tests",
|
||||
"--apple_deploy_target=11.0"
|
||||
]
|
||||
}
|
||||