diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..30f4f71
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+.DS_Store
+cogservPlugin/node_modules/
+cogservPlugin/.gradle/
+cogservPlugin/platforms/
+cogservPlugin/src/ios/MicrosoftCognitiveServicesSpeech.framework/
+cogservPlugin/aar
diff --git a/README.md b/README.md
index dd3466e..65d1430 100644
--- a/README.md
+++ b/README.md
@@ -1,2 +1,192 @@
-# cordova-plugin-cogsvcsspeech
-Cordova plugin for Microsoft Cognitive Services speech services.
+# Ionic Application
+
+The Ionic application was build with the
+[Ionic framework](https://ionicframework.com/), an open-source front-end
+development kit for building cross-platform mobile apps with HTML5 and Javascript.
+
+## Getting started
+
+First, install [Node.js](https://nodejs.org/en/). The cognitive services plugin supports Node version 10.9 or greater.
+
+Next, install Ionic using the following command:
+
+```bash
+npm install -g ionic
+```
+
+Note: Visual Studio Code was used for development and ionic was installed
+through VS Code.
+
+## Dependencies
+
+### Create a Speech resource in Azure
+
+To add a Speech Services resource to your Azure account:
+
+1. Sign in to the [Azure portal](https://portal.azure.com/) using your Microsoft
+account.
+
+1. Select **Create a resource** at the top left of the portal.
+
+ ![Create a resource](https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/media/index/try-speech-api-create-speech1.png)
+
+1. In the **New** window, search for **speech**.
+
+1. In the search results, select **Speech**.
+
+ ![Select Speech](https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/media//index/try-speech-api-create-speech2.png)
+
+1. Under **Speech**, select the **Create** button.
+
+ ![Select the Create button](https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/media//index/try-speech-api-create-speech3.png)
+
+1. Under **Create**, enter:
+
+ * A name for the new resource. The name helps you distinguish among multiple
+ subscriptions to the same service.
+ * Choose the Azure subscription that the new resource is associated with to
+ determine how the fees are billed.
+ * Choose the region where the resource will be used.
+ * Choose either a free or paid pricing tier.
+ * Create a new resource group for this Speech subscription or assign the
+ subscription to an existing resource group. Resource groups help you keep your
+ various Azure subscriptions organized.
+ * Select **Create.**
+
+ ![Select the Create button](https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/media/index/try-speech-api-create-speech4.png)
+
+ It takes a moment to create and deploy your new Speech resource. Select
+ **Quickstart** to see information about your new resource.
+
+ ![Quickstart panel](https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/media//index/try-speech-api-create-speech5.png)
+
+1. Under **Quickstart**, select the **Keys** link under step 1 to display your
+subscription keys. Each subscription has two keys; you can use either key in your
+application. Select the button next to each key to copy it to the clipboard for
+pasting into the [Environment.ts](\src\environments\environment.ts) file.
+1. Copy the name of the Speech Service and the region of the service into the
+Environments.ts file.
+
+## Install packages using NPM
+
+In the folder of the Ionic Application (ie examples/ionic-angular), run the following steps.
+
+Run the following command to install all packages within the app. In a terminal
+window, browse to the speecthtoText folder
+and run the following:
+
+```bash
+npm install
+```
+
+Install Native-Run so that the application can run the cordova native platforms (android, ios, or browser)
+
+```bash
+npm i -g native-run
+```
+
+Install Cordova
+
+```bash
+npm i -g cordova
+```
+
+To include the wrapper for the Cognitive Services plugin as an observable, run the following command:
+
+```bash
+cp -r ../cogservicesNative ../examples/ionic-angular/node_modules/@ionic-native/
+```
+
+While this should install all components, there have been a few changes to
+cordova recently and errors were being generated while devloping on the Mac.
+If you get errors, specifically using toLowerCase, the run the following commands:
+
+```bash
+npm uninstall cordova
+npm install cordova@latest
+cordova platform remove ios
+cordova platform add ios
+```
+
+## Run it Application
+
+### Run on Browser
+
+To run the application, in a terminal window, browse to the speecthtoText folder
+and run the following:
+
+```bash
+ionic cordova run browser
+```
+
+### Run in Android Emulator
+
+#### Setting up Android environment
+
+These steps are to set up your SDK environment to build, test, and deploy
+Android apps.
+
+1. Install [Java Development Kit (JDK) 8](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html)
+ or later.
+1. Install [Gradle](https://gradle.org/). Go through each steps on the
+[Gradle Installation](https://gradle.org/install/) page.
+1. Install [Android Studio](https://developer.android.com/studio/index.html).
+1. After installing Android Studio, run the Android Studio Setup Wizard to
+download some standard components that are required for development.
+
+#### Creating an emulator
+
+1. In Android Studio, click the AVD Manager in the Toolbar.
+
+ ![AVD Manager](img/avdmanager.png)
+
+1. In the Select Deployment Target window, click Create New Virtual Device.
+
+ ![Create Virtual Device](img/createvirtualdevice.png)
+
+1. Select a device configuration of your choice and press Next.
+
+ ![Device Configuration](img/deviceconfiguration.png)
+
+1. Download and select a system image. Press next.
+
+ ![System Image](img/systemimage.png)
+
+1. Verify configuration and press finish.
+
+ ![Verify](img/verifyinstallation.png)
+
+1. In the Virtual Device Manager, select the run button to start the emulator.
+
+ ![Run](img/verifyinstallation.png)
+
+#### Run Android Application
+
+To run the application, in a terminal window, browse to the speecthtoText folder
+and run the following:
+
+```bash
+ionic cordova run android
+```
+
+### Run in iOS Emulator
+
+#### Setting up iOS environment
+
+These steps are to set up your SDK environment to build, test, and deploy
+iOS apps. This will only work on a Mac.
+
+1. Install [XCode](https://developer.apple.com/download/) with Apple Developer
+account, or download from the App Store.
+
+#### Run iOS Application
+
+To run the application, in a terminal window, browse to the speecthtoText folder
+and run the following:
+
+```bash
+ionic cordova run ios
+```
+
+By participating in this project, you
+agree to abide by the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/)
diff --git a/cogservPlugin/.idea/codeStyles/Project.xml b/cogservPlugin/.idea/codeStyles/Project.xml
new file mode 100644
index 0000000..681f41a
--- /dev/null
+++ b/cogservPlugin/.idea/codeStyles/Project.xml
@@ -0,0 +1,116 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ xmlns:android
+
+ ^$
+
+
+
+
+
+
+
+
+ xmlns:.*
+
+ ^$
+
+
+ BY_NAME
+
+
+
+
+
+
+ .*:id
+
+ http://schemas.android.com/apk/res/android
+
+
+
+
+
+
+
+
+ .*:name
+
+ http://schemas.android.com/apk/res/android
+
+
+
+
+
+
+
+
+ name
+
+ ^$
+
+
+
+
+
+
+
+
+ style
+
+ ^$
+
+
+
+
+
+
+
+
+ .*
+
+ ^$
+
+
+ BY_NAME
+
+
+
+
+
+
+ .*
+
+ http://schemas.android.com/apk/res/android
+
+
+ ANDROID_ATTRIBUTE_ORDER
+
+
+
+
+
+
+ .*
+
+ .*
+
+
+ BY_NAME
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/cogservPlugin/.idea/gradle.xml b/cogservPlugin/.idea/gradle.xml
new file mode 100644
index 0000000..f885d59
--- /dev/null
+++ b/cogservPlugin/.idea/gradle.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/cogservPlugin/.idea/misc.xml b/cogservPlugin/.idea/misc.xml
new file mode 100644
index 0000000..aecc280
--- /dev/null
+++ b/cogservPlugin/.idea/misc.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/cogservPlugin/.idea/vcs.xml b/cogservPlugin/.idea/vcs.xml
new file mode 100644
index 0000000..b2bdec2
--- /dev/null
+++ b/cogservPlugin/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/cogservPlugin/.idea/workspace.xml b/cogservPlugin/.idea/workspace.xml
new file mode 100644
index 0000000..ab2a7e6
--- /dev/null
+++ b/cogservPlugin/.idea/workspace.xml
@@ -0,0 +1,335 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+ 1573761170956
+
+
+ 1573761170956
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Android
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1.8
+
+
+
+
+
+
+
+
+
+
+
+ Android|cognitiveservicesPlugin
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/cogservPlugin/README.md b/cogservPlugin/README.md
new file mode 100644
index 0000000..35c1993
--- /dev/null
+++ b/cogservPlugin/README.md
@@ -0,0 +1,315 @@
+
+# Cognitive Services Cordova Plugin
+
+A [Cordova
+Plugin](https://cordova.apache.org/docs/en/latest/guide/hybrid/plugins/)
+for Speech to Text and Text to Speech using Microsoft's Cognitive
+Services
+
+## Installation
+
+```bash
+cordova plugin add /CognitiveServicesPlugin
+```
+
+## Uninstall
+
+```bash
+cordova plugin rm microsoft-plugin-cognitiveservices
+```
+
+## Supported Platforms
+
+- Android
+
+- iOS
+
+## Usage
+
+This plugin requires internet connection and an Azure Speech Resource.
+To create a Speech Resource, follow the instructions in the Azure
+documentation: [Try the Speech service for
+free](https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/get-started#create-a-speech-resource-in-azure).
+
+### SetSubscription (string speechSubscriptionKey, string serviceRegion)
+
+```js
+microsoft.plugin.cognitiveservices.SetSubscription(string speechSubscriptionKey,
+string serviceRegion, Function successCallback, Function errorCallback)
+```
+
+**Speech Subscription Key**: Speech API subscription key obtained by
+following instructions in [Microsoft Cognitive Services
+subscription](https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/get-started)
+
+**Service Region**: The Azure region the speech resource was created.
+For more information read [About
+regions](https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/get-started#about-regions)
+
+SetSubscription creates the Cognitive Services speech configuration and
+requires the subscription and region of the Azure Speech resource.
+
+SetSubscription must be called before the plugin can be used by other
+method. Recommended to call the SetSubscription method in the
+InitializingApp method.
+
+### SpeakText (string speechText)
+
+**Speech Text**: The text that will be spoken by the audio player.
+
+```js
+microsoft.plugin.cognitiveservices.SpeakText(string speechText, Function
+successCallback, Function errorCallback)
+```
+
+SpeakText uses the Speech SDK to playback the text that is sent to the
+function.
+
+### SpeakSsml (string speechText)
+
+```js
+microsoft.plugin.cognitiveservices.SpeakSsml(string speechText, Function
+successCallback, Function errorCallback)
+```
+
+**Speech Text**: The SSML Xml string that is used to specify the text
+spoken as well as the voice, language, and other variables of the
+playback.
+
+SpeakSsml uses the Speech SDK to playback the text that is sent to the
+function. Speech Synthesis Markup Language (SSML) is an XML-based markup
+language that lets developers specify how input text is converted into
+synthesized speech using the text-to-speech service. Compared to plain
+text, SSML allows developers to fine-tune the pitch, pronunciation,
+speaking rate, volume, and more of the text-to-speech output.
+
+### RecognizeFromMicrophone ()
+
+```js
+microsoft.plugin.cognitiveservices.RecognizeFromMicrophone (Function
+successCallback, Function errorCallback)
+```
+
+Starts the recognition process by listening to the spoken words through
+the microphone and sending the results back as a series of text strings.
+
+The function uses the
+[SpeechRecognizer](https://docs.microsoft.com/en-us/javascript/api/microsoft-cognitiveservices-speech-sdk/speechrecognizer?view=azure-node-latest)
+object to the Speech SDK. The
+[recognizing](https://docs.microsoft.com/en-us/javascript/api/microsoft-cognitiveservices-speech-sdk/speechrecognizer?view=azure-node-latest#recognizing)
+event is used to gather and return the text as the Speech SDK is
+processing the spoken words.
+
+The return value is a set of string values.
+
+iOS Only.
+
+### StopListening()
+
+```js
+microsoft.plugin.cognitiveservices.stopListening(Function successCallback,
+Function errorCallback)
+```
+
+Stop the recognition process. No return value.
+
+iOS Only.
+
+### SpeakStop()
+
+```js
+microsoft.plugin.cognitiveservices.speakStop(Function successCallback, Function errorCallback)
+```
+
+Stops the AVPlayer from playing. No return value.
+
+iOS Only.
+
+## Plugin Files
+
+The following files are found under the cognitiveServicesPlugin/src/
+directory. For details on the configuration files, please select the
+link:
+
+- [**Config.xml**](https://cordova.apache.org/docs/en/latest/config_ref/index.html)
+-- Name and Description of plugin.
+
+- [**Plugin.xml**](https://cordova.apache.org/docs/en/latest/plugin_ref/spec.html)
+-- Plugin.xml file defines the structure and settings required for your
+plugin. The file includes the configuration values of the iOS and
+Android sections.
+
+The following files are found under the cognitiveServicesPlugin/www/
+directory:
+
+- **cognitiveservices.js** -- The javascript file used to execute the
+functions.
+
+For an example of how to build a plugin and the use of the www directory
+refer to the following walkthrough: [How to write Cordova
+Plugin](https://medium.com/ionic-and-the-mobile-web/how-to-write-cordova-plugins-864e40025f2).
+
+The plugin was created using the [create
+command](https://cordova.apache.org/docs/en/latest/guide/cli/index.html#create-the-app).
+Additional files were added during the create process, but were not
+changed.
+
+## Ionic Usage
+
+## app.component.ts
+
+```typescript
+import { CognitiveServices } from '@ionic-native/cognitiveservices/ngx';
+
+constructor(private cognitiveServices: CognitiveServices) { }
+…
+// Set the subscription information
+initializeApp() {
+ this.platform.ready().then(() => {
+ this.cognitiveServices.SetSubscription(
+ environment.subscriptionKey,
+ environment.cogServices.serviceRegion).then(
+ () => { },
+ (error: any) => { alert(error); });
+ });
+}
+```
+
+## Page.ts
+
+```typescript
+import { CognitiveServices } from '@ionic-native/cognitiveservices/ngx';
+
+constructor(private cognitiveServices: CognitiveServices) { }
+
+...
+
+// Start the recognition process (iOS only)
+ this.cognitiveServices.RecognizeFromMicrophone().subscribe(
+ results => {
+ if (!results.isFinal) {
+ matches = results.result;
+ console.log(results.result);
+ });
+ } else {
+ match = results.result;
+ console.log(results.result);
+ }
+ },
+ (error: any) => { alert(error); }
+ );
+
+
+// Stop the recognition process (iOS only)
+this.cognitiveServices.StopListening();
+
+// Speak the text in the speakText variable
+this.cognitiveServices.SpeakText(speakText).then(
+ () => {},
+ (error: any) => {alert(error);}
+ );
+
+// Speak using the SSML xml values
+this.cognitiveServices.SpeakSsml(speakSsml).then(
+ () => {},
+ (error: any) => {alert(error); }
+ );
+
+// Stop the speaking process (iOS only)
+this.cognitiveServices.SpeakStop();
+```
+
+## Ionic Native
+
+The for iOS to work in an ionic application, the plugin must use an
+ionic-native wrapper. Ionic Native is a TypeScript wrapper for
+Cordova/PhoneGap plugins. Ionic Native wraps plugin callbacks in a
+Promise or an Observable, providing a common interface for all plugins
+and ensuring that native events trigger change detection in Angular.
+
+The ionic-native wrapper is included in the cognitiveservices folder. To
+add the ionic native code to the project, the following command must be
+ran in the project folder.
+
+```bash
+cp -r /cognitiveservices /node_modules/@ionic-native/
+```
+
+See [Ionic Native
+documentation](https://ionicframework.com/docs/v3/native/)
+and [Ionic Native
+Development](https://github.com/ionic-team/ionic-native).
+
+## Android
+
+### Requirements
+
+- [RECORD\_AUDIO](https://developer.android.com/reference/android/Manifest.permission.html#RECORD_AUDIO)
+permission
+
+- [INTERNET](https://developer.android.com/reference/android/Manifest.permission.html#INTERNET)
+ permission
+
+- The Cognitive Services plugin supports Node version 10.9 or greater.
+
+### How it works
+
+The Java SDK for Android is packaged as an AAR (Android Library), which
+includes the necessary libraries and required Android permissions. The
+Speech AAR is included with the plugin code.
+
+### Files
+
+The following files are found under the
+cognitiveServicesPlugin/src/android directory:
+
+- **CognitiveServices.gradle** -- The build file used to import the
+client-sdk-1.8.0 AAR dependency
+
+- **CognitiveServices.java** -- The Android plugin implementation
+
+The following file is found under the cognitiveServicesPlugin/aar
+directory:
+
+- **client-sdk-1.8.0.aar** -- The Cognitive Services Android Library
+
+### Further readings
+
+-
+
+-
+
+## iOS
+
+### Requirements
+
+- The target set to iOS version 9.3 or later
+- The Cognitive Services plugin supports Node version 10.9 or greater.
+
+### How it works
+
+The Cognitive Services Speech SDK for iOS is currently distributed as a
+Cocoa Framework. The SDK was downloaded
+from and linked manually.
+
+The plugin works
+in [AVAudioSessionCategoryMultiRoute](https://developer.apple.com/documentation/avfoundation/avaudiosessioncategorymultiroute?language=objc)
+mode
+to enable playing audio.
+
+### Files
+
+The following files are found under the cognitiveServicesPlugin/src/ios
+directory:
+
+- **CDVCognitiveServices.h** -- The iOS header file that defines the
+public functions that can be called.
+
+- **CDVCognitiveServices.m** -- The iOS plugin implementation
+
+**MicrosoftCognitiveServicesSpeech.framework** -- The iOS Speech SDK
+that is contained in the zip file.
+
+### Further readings
+
+-
diff --git a/cogservPlugin/cognitiveservicesPlugin.iml b/cogservPlugin/cognitiveservicesPlugin.iml
new file mode 100644
index 0000000..6fc4c1d
--- /dev/null
+++ b/cogservPlugin/cognitiveservicesPlugin.iml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/cogservPlugin/config.xml b/cogservPlugin/config.xml
new file mode 100644
index 0000000..09ad13f
--- /dev/null
+++ b/cogservPlugin/config.xml
@@ -0,0 +1,28 @@
+
+
+ Cognitive Services
+
+ An Android Cordova plugin that uses the Cognitive Services Android Library
+
+
+ Microsoft CSE team
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/cogservPlugin/gradle/wrapper/gradle-wrapper.jar b/cogservPlugin/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 0000000..94336fc
Binary files /dev/null and b/cogservPlugin/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/cogservPlugin/gradle/wrapper/gradle-wrapper.properties b/cogservPlugin/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..290541c
--- /dev/null
+++ b/cogservPlugin/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,5 @@
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-bin.zip
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
diff --git a/cogservPlugin/gradlew b/cogservPlugin/gradlew
new file mode 100644
index 0000000..cccdd3d
--- /dev/null
+++ b/cogservPlugin/gradlew
@@ -0,0 +1,172 @@
+#!/usr/bin/env sh
+
+##############################################################################
+##
+## 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=""
+
+# 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, switch paths to Windows format before running java
+if $cygwin ; 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=$((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"
+
+# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
+if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
+ cd "$(dirname "$0")"
+fi
+
+exec "$JAVACMD" "$@"
diff --git a/cogservPlugin/gradlew.bat b/cogservPlugin/gradlew.bat
new file mode 100644
index 0000000..f955316
--- /dev/null
+++ b/cogservPlugin/gradlew.bat
@@ -0,0 +1,84 @@
+@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 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=
+
+@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
diff --git a/cogservPlugin/package-lock.json b/cogservPlugin/package-lock.json
new file mode 100644
index 0000000..aea2de0
--- /dev/null
+++ b/cogservPlugin/package-lock.json
@@ -0,0 +1,1309 @@
+{
+ "name": "microsoft-plugin-cognitiveservices",
+ "version": "1.0.0",
+ "lockfileVersion": 1,
+ "requires": true,
+ "dependencies": {
+ "abbrev": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
+ "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q=="
+ },
+ "ansi": {
+ "version": "0.3.1",
+ "resolved": "https://registry.npmjs.org/ansi/-/ansi-0.3.1.tgz",
+ "integrity": "sha1-DELU+xcWDVqa8eSEus4cZpIsGyE="
+ },
+ "balanced-match": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
+ "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
+ },
+ "base64-js": {
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz",
+ "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g=="
+ },
+ "big-integer": {
+ "version": "1.6.48",
+ "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.48.tgz",
+ "integrity": "sha512-j51egjPa7/i+RdiRuJbPdJ2FIUYYPhvYLjzoYbcMMm62ooO6F94fETG4MTs46zPAF9Brs04OajboA/qTGuz78w=="
+ },
+ "bplist-creator": {
+ "version": "0.0.8",
+ "resolved": "https://registry.npmjs.org/bplist-creator/-/bplist-creator-0.0.8.tgz",
+ "integrity": "sha512-Za9JKzD6fjLC16oX2wsXfc+qBEhJBJB1YPInoAQpMLhDuj5aVOv1baGeIQSq1Fr3OCqzvsoQcSBSwGId/Ja2PA==",
+ "requires": {
+ "stream-buffers": "~2.2.0"
+ }
+ },
+ "bplist-parser": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.1.1.tgz",
+ "integrity": "sha1-1g1dzCDLptx+HymbNdPh+V2vuuY=",
+ "requires": {
+ "big-integer": "^1.6.7"
+ }
+ },
+ "brace-expansion": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "requires": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "concat-map": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
+ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
+ },
+ "cordova-browser": {
+ "version": "5.0.4",
+ "resolved": "https://registry.npmjs.org/cordova-browser/-/cordova-browser-5.0.4.tgz",
+ "integrity": "sha512-EDuG+9NGsaYpNSY6wF0kR34m1m38V+nRglGXxQ609fgMYrMHEYR2lg38nDr1Os4qeF0LJz8UQ7nq7Y+idg6Aig==",
+ "requires": {
+ "abbrev": "*",
+ "accepts": "*",
+ "ansi": "*",
+ "ansi-regex": "2.1.1",
+ "ansi-styles": "2.2.1",
+ "array-flatten": "1.1.1",
+ "balanced-match": "*",
+ "base64-js": "1.2.0",
+ "big-integer": "*",
+ "body-parser": "1.18.2",
+ "bplist-parser": "*",
+ "brace-expansion": "*",
+ "bytes": "*",
+ "chalk": "1.1.3",
+ "compressible": "*",
+ "compression": "1.7.2",
+ "concat-map": "*",
+ "content-disposition": "*",
+ "content-type": "*",
+ "cookie": "*",
+ "cookie-signature": "1.0.6",
+ "cordova-common": "2.2.5",
+ "cordova-registry-mapper": "*",
+ "cordova-serve": "2.0.1",
+ "debug": "2.6.9",
+ "depd": "*",
+ "destroy": "*",
+ "ee-first": "*",
+ "elementtree": "0.1.6",
+ "encodeurl": "*",
+ "escape-html": "*",
+ "escape-string-regexp": "*",
+ "etag": "*",
+ "express": "*",
+ "finalhandler": "*",
+ "forwarded": "*",
+ "fresh": "*",
+ "glob": "5.0.15",
+ "has-ansi": "2.0.0",
+ "http-errors": "1.6.3",
+ "iconv-lite": "0.4.19",
+ "inflight": "*",
+ "inherits": "*",
+ "ipaddr.js": "1.6.0",
+ "is-wsl": "*",
+ "media-typer": "*",
+ "merge-descriptors": "*",
+ "methods": "*",
+ "mime": "1.4.1",
+ "mime-db": "1.33.0",
+ "mime-types": "2.1.18",
+ "minimatch": "*",
+ "ms": "2.0.0",
+ "negotiator": "*",
+ "nopt": "3.0.6",
+ "on-finished": "*",
+ "on-headers": "*",
+ "once": "*",
+ "opn": "*",
+ "parseurl": "*",
+ "path-is-absolute": "*",
+ "path-to-regexp": "0.1.7",
+ "plist": "2.1.0",
+ "proxy-addr": "2.0.3",
+ "q": "*",
+ "qs": "6.5.1",
+ "range-parser": "*",
+ "raw-body": "2.3.2",
+ "safe-buffer": "5.1.1",
+ "sax": "0.3.5",
+ "send": "*",
+ "serve-static": "*",
+ "setprototypeof": "*",
+ "shelljs": "0.5.3",
+ "statuses": "1.4.0",
+ "strip-ansi": "3.0.1",
+ "supports-color": "2.0.0",
+ "type-is": "*",
+ "underscore": "*",
+ "unorm": "*",
+ "unpipe": "*",
+ "utils-merge": "*",
+ "vary": "*",
+ "wrappy": "*",
+ "xmlbuilder": "8.2.2",
+ "xmldom": "*"
+ },
+ "dependencies": {
+ "abbrev": {
+ "version": "1.1.1",
+ "bundled": true
+ },
+ "accepts": {
+ "version": "1.3.5",
+ "bundled": true,
+ "requires": {
+ "mime-types": "~2.1.18",
+ "negotiator": "0.6.1"
+ }
+ },
+ "ansi": {
+ "version": "0.3.1",
+ "bundled": true
+ },
+ "ansi-regex": {
+ "version": "2.1.1",
+ "bundled": true
+ },
+ "ansi-styles": {
+ "version": "2.2.1",
+ "bundled": true
+ },
+ "array-flatten": {
+ "version": "1.1.1",
+ "bundled": true
+ },
+ "balanced-match": {
+ "version": "1.0.0",
+ "bundled": true
+ },
+ "base64-js": {
+ "version": "1.2.0",
+ "bundled": true
+ },
+ "big-integer": {
+ "version": "1.6.32",
+ "bundled": true
+ },
+ "body-parser": {
+ "version": "1.18.2",
+ "bundled": true,
+ "requires": {
+ "bytes": "3.0.0",
+ "content-type": "~1.0.4",
+ "debug": "2.6.9",
+ "depd": "~1.1.1",
+ "http-errors": "~1.6.2",
+ "iconv-lite": "0.4.19",
+ "on-finished": "~2.3.0",
+ "qs": "6.5.1",
+ "raw-body": "2.3.2",
+ "type-is": "~1.6.15"
+ }
+ },
+ "bplist-parser": {
+ "version": "0.1.1",
+ "bundled": true,
+ "requires": {
+ "big-integer": "^1.6.7"
+ }
+ },
+ "brace-expansion": {
+ "version": "1.1.11",
+ "bundled": true,
+ "requires": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "bytes": {
+ "version": "3.0.0",
+ "bundled": true
+ },
+ "chalk": {
+ "version": "1.1.3",
+ "bundled": true,
+ "requires": {
+ "ansi-styles": "^2.2.1",
+ "escape-string-regexp": "^1.0.2",
+ "has-ansi": "^2.0.0",
+ "strip-ansi": "^3.0.0",
+ "supports-color": "^2.0.0"
+ }
+ },
+ "compressible": {
+ "version": "2.0.14",
+ "bundled": true,
+ "requires": {
+ "mime-db": ">= 1.34.0 < 2"
+ },
+ "dependencies": {
+ "mime-db": {
+ "version": "1.34.0",
+ "bundled": true
+ }
+ }
+ },
+ "compression": {
+ "version": "1.7.2",
+ "bundled": true,
+ "requires": {
+ "accepts": "~1.3.4",
+ "bytes": "3.0.0",
+ "compressible": "~2.0.13",
+ "debug": "2.6.9",
+ "on-headers": "~1.0.1",
+ "safe-buffer": "5.1.1",
+ "vary": "~1.1.2"
+ }
+ },
+ "concat-map": {
+ "version": "0.0.1",
+ "bundled": true
+ },
+ "content-disposition": {
+ "version": "0.5.2",
+ "bundled": true
+ },
+ "content-type": {
+ "version": "1.0.4",
+ "bundled": true
+ },
+ "cookie": {
+ "version": "0.3.1",
+ "bundled": true
+ },
+ "cookie-signature": {
+ "version": "1.0.6",
+ "bundled": true
+ },
+ "cordova-common": {
+ "version": "2.2.5",
+ "bundled": true,
+ "requires": {
+ "ansi": "^0.3.1",
+ "bplist-parser": "^0.1.0",
+ "cordova-registry-mapper": "^1.1.8",
+ "elementtree": "0.1.6",
+ "glob": "^5.0.13",
+ "minimatch": "^3.0.0",
+ "plist": "^2.1.0",
+ "q": "^1.4.1",
+ "shelljs": "^0.5.3",
+ "underscore": "^1.8.3",
+ "unorm": "^1.3.3"
+ }
+ },
+ "cordova-registry-mapper": {
+ "version": "1.1.15",
+ "bundled": true
+ },
+ "cordova-serve": {
+ "version": "2.0.1",
+ "bundled": true,
+ "requires": {
+ "chalk": "^1.1.1",
+ "compression": "^1.6.0",
+ "express": "^4.13.3",
+ "opn": "^5.3.0",
+ "shelljs": "^0.5.3"
+ }
+ },
+ "debug": {
+ "version": "2.6.9",
+ "bundled": true,
+ "requires": {
+ "ms": "2.0.0"
+ }
+ },
+ "depd": {
+ "version": "1.1.2",
+ "bundled": true
+ },
+ "destroy": {
+ "version": "1.0.4",
+ "bundled": true
+ },
+ "ee-first": {
+ "version": "1.1.1",
+ "bundled": true
+ },
+ "elementtree": {
+ "version": "0.1.6",
+ "bundled": true,
+ "requires": {
+ "sax": "0.3.5"
+ }
+ },
+ "encodeurl": {
+ "version": "1.0.2",
+ "bundled": true
+ },
+ "escape-html": {
+ "version": "1.0.3",
+ "bundled": true
+ },
+ "escape-string-regexp": {
+ "version": "1.0.5",
+ "bundled": true
+ },
+ "etag": {
+ "version": "1.8.1",
+ "bundled": true
+ },
+ "express": {
+ "version": "4.16.3",
+ "bundled": true,
+ "requires": {
+ "accepts": "~1.3.5",
+ "array-flatten": "1.1.1",
+ "body-parser": "1.18.2",
+ "content-disposition": "0.5.2",
+ "content-type": "~1.0.4",
+ "cookie": "0.3.1",
+ "cookie-signature": "1.0.6",
+ "debug": "2.6.9",
+ "depd": "~1.1.2",
+ "encodeurl": "~1.0.2",
+ "escape-html": "~1.0.3",
+ "etag": "~1.8.1",
+ "finalhandler": "1.1.1",
+ "fresh": "0.5.2",
+ "merge-descriptors": "1.0.1",
+ "methods": "~1.1.2",
+ "on-finished": "~2.3.0",
+ "parseurl": "~1.3.2",
+ "path-to-regexp": "0.1.7",
+ "proxy-addr": "~2.0.3",
+ "qs": "6.5.1",
+ "range-parser": "~1.2.0",
+ "safe-buffer": "5.1.1",
+ "send": "0.16.2",
+ "serve-static": "1.13.2",
+ "setprototypeof": "1.1.0",
+ "statuses": "~1.4.0",
+ "type-is": "~1.6.16",
+ "utils-merge": "1.0.1",
+ "vary": "~1.1.2"
+ }
+ },
+ "finalhandler": {
+ "version": "1.1.1",
+ "bundled": true,
+ "requires": {
+ "debug": "2.6.9",
+ "encodeurl": "~1.0.2",
+ "escape-html": "~1.0.3",
+ "on-finished": "~2.3.0",
+ "parseurl": "~1.3.2",
+ "statuses": "~1.4.0",
+ "unpipe": "~1.0.0"
+ }
+ },
+ "forwarded": {
+ "version": "0.1.2",
+ "bundled": true
+ },
+ "fresh": {
+ "version": "0.5.2",
+ "bundled": true
+ },
+ "glob": {
+ "version": "5.0.15",
+ "bundled": true,
+ "requires": {
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "2 || 3",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ }
+ },
+ "has-ansi": {
+ "version": "2.0.0",
+ "bundled": true,
+ "requires": {
+ "ansi-regex": "^2.0.0"
+ }
+ },
+ "http-errors": {
+ "version": "1.6.3",
+ "bundled": true,
+ "requires": {
+ "depd": "~1.1.2",
+ "inherits": "2.0.3",
+ "setprototypeof": "1.1.0",
+ "statuses": ">= 1.4.0 < 2"
+ }
+ },
+ "iconv-lite": {
+ "version": "0.4.19",
+ "bundled": true
+ },
+ "inflight": {
+ "version": "1.0.6",
+ "bundled": true,
+ "requires": {
+ "once": "^1.3.0",
+ "wrappy": "1"
+ }
+ },
+ "inherits": {
+ "version": "2.0.3",
+ "bundled": true
+ },
+ "ipaddr.js": {
+ "version": "1.6.0",
+ "bundled": true
+ },
+ "is-wsl": {
+ "version": "1.1.0",
+ "bundled": true
+ },
+ "media-typer": {
+ "version": "0.3.0",
+ "bundled": true
+ },
+ "merge-descriptors": {
+ "version": "1.0.1",
+ "bundled": true
+ },
+ "methods": {
+ "version": "1.1.2",
+ "bundled": true
+ },
+ "mime": {
+ "version": "1.4.1",
+ "bundled": true
+ },
+ "mime-db": {
+ "version": "1.33.0",
+ "bundled": true
+ },
+ "mime-types": {
+ "version": "2.1.18",
+ "bundled": true,
+ "requires": {
+ "mime-db": "~1.33.0"
+ }
+ },
+ "minimatch": {
+ "version": "3.0.4",
+ "bundled": true,
+ "requires": {
+ "brace-expansion": "^1.1.7"
+ }
+ },
+ "ms": {
+ "version": "2.0.0",
+ "bundled": true
+ },
+ "negotiator": {
+ "version": "0.6.1",
+ "bundled": true
+ },
+ "nopt": {
+ "version": "3.0.6",
+ "bundled": true,
+ "requires": {
+ "abbrev": "1"
+ }
+ },
+ "on-finished": {
+ "version": "2.3.0",
+ "bundled": true,
+ "requires": {
+ "ee-first": "1.1.1"
+ }
+ },
+ "on-headers": {
+ "version": "1.0.1",
+ "bundled": true
+ },
+ "once": {
+ "version": "1.4.0",
+ "bundled": true,
+ "requires": {
+ "wrappy": "1"
+ }
+ },
+ "opn": {
+ "version": "5.3.0",
+ "bundled": true,
+ "requires": {
+ "is-wsl": "^1.1.0"
+ }
+ },
+ "parseurl": {
+ "version": "1.3.2",
+ "bundled": true
+ },
+ "path-is-absolute": {
+ "version": "1.0.1",
+ "bundled": true
+ },
+ "path-to-regexp": {
+ "version": "0.1.7",
+ "bundled": true
+ },
+ "plist": {
+ "version": "2.1.0",
+ "bundled": true,
+ "requires": {
+ "base64-js": "1.2.0",
+ "xmlbuilder": "8.2.2",
+ "xmldom": "0.1.x"
+ }
+ },
+ "proxy-addr": {
+ "version": "2.0.3",
+ "bundled": true,
+ "requires": {
+ "forwarded": "~0.1.2",
+ "ipaddr.js": "1.6.0"
+ }
+ },
+ "q": {
+ "version": "1.5.1",
+ "bundled": true
+ },
+ "qs": {
+ "version": "6.5.1",
+ "bundled": true
+ },
+ "range-parser": {
+ "version": "1.2.0",
+ "bundled": true
+ },
+ "raw-body": {
+ "version": "2.3.2",
+ "bundled": true,
+ "requires": {
+ "bytes": "3.0.0",
+ "http-errors": "1.6.2",
+ "iconv-lite": "0.4.19",
+ "unpipe": "1.0.0"
+ },
+ "dependencies": {
+ "depd": {
+ "version": "1.1.1",
+ "bundled": true
+ },
+ "http-errors": {
+ "version": "1.6.2",
+ "bundled": true,
+ "requires": {
+ "depd": "1.1.1",
+ "inherits": "2.0.3",
+ "setprototypeof": "1.0.3",
+ "statuses": ">= 1.3.1 < 2"
+ }
+ },
+ "setprototypeof": {
+ "version": "1.0.3",
+ "bundled": true
+ }
+ }
+ },
+ "safe-buffer": {
+ "version": "5.1.1",
+ "bundled": true
+ },
+ "sax": {
+ "version": "0.3.5",
+ "bundled": true
+ },
+ "send": {
+ "version": "0.16.2",
+ "bundled": true,
+ "requires": {
+ "debug": "2.6.9",
+ "depd": "~1.1.2",
+ "destroy": "~1.0.4",
+ "encodeurl": "~1.0.2",
+ "escape-html": "~1.0.3",
+ "etag": "~1.8.1",
+ "fresh": "0.5.2",
+ "http-errors": "~1.6.2",
+ "mime": "1.4.1",
+ "ms": "2.0.0",
+ "on-finished": "~2.3.0",
+ "range-parser": "~1.2.0",
+ "statuses": "~1.4.0"
+ }
+ },
+ "serve-static": {
+ "version": "1.13.2",
+ "bundled": true,
+ "requires": {
+ "encodeurl": "~1.0.2",
+ "escape-html": "~1.0.3",
+ "parseurl": "~1.3.2",
+ "send": "0.16.2"
+ }
+ },
+ "setprototypeof": {
+ "version": "1.1.0",
+ "bundled": true
+ },
+ "shelljs": {
+ "version": "0.5.3",
+ "bundled": true
+ },
+ "statuses": {
+ "version": "1.4.0",
+ "bundled": true
+ },
+ "strip-ansi": {
+ "version": "3.0.1",
+ "bundled": true,
+ "requires": {
+ "ansi-regex": "^2.0.0"
+ }
+ },
+ "supports-color": {
+ "version": "2.0.0",
+ "bundled": true
+ },
+ "type-is": {
+ "version": "1.6.16",
+ "bundled": true,
+ "requires": {
+ "media-typer": "0.3.0",
+ "mime-types": "~2.1.18"
+ }
+ },
+ "underscore": {
+ "version": "1.9.1",
+ "bundled": true
+ },
+ "unorm": {
+ "version": "1.4.1",
+ "bundled": true
+ },
+ "unpipe": {
+ "version": "1.0.0",
+ "bundled": true
+ },
+ "utils-merge": {
+ "version": "1.0.1",
+ "bundled": true
+ },
+ "vary": {
+ "version": "1.1.2",
+ "bundled": true
+ },
+ "wrappy": {
+ "version": "1.0.2",
+ "bundled": true
+ },
+ "xmlbuilder": {
+ "version": "8.2.2",
+ "bundled": true
+ },
+ "xmldom": {
+ "version": "0.1.27",
+ "bundled": true
+ }
+ }
+ },
+ "cordova-common": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/cordova-common/-/cordova-common-3.2.1.tgz",
+ "integrity": "sha512-xg0EnjnA6EipxXG8cupdlYQYeDA6+ghbN+Pjq88xN1LInwP6Bo7IyGBdSV5QnfjOvzShF9BBwSxBAv0FOO0C2Q==",
+ "requires": {
+ "ansi": "^0.3.1",
+ "bplist-parser": "^0.1.0",
+ "cross-spawn": "^6.0.5",
+ "elementtree": "0.1.7",
+ "endent": "^1.1.1",
+ "fs-extra": "^8.0.0",
+ "glob": "^7.1.2",
+ "minimatch": "^3.0.0",
+ "plist": "^3.0.1",
+ "q": "^1.4.1",
+ "strip-bom": "^3.0.0",
+ "underscore": "^1.8.3",
+ "which": "^1.3.0"
+ }
+ },
+ "cordova-ios": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/cordova-ios/-/cordova-ios-5.1.1.tgz",
+ "integrity": "sha512-asZMCj44JMe/PMrDIRC97GStPCH+GpaMNVe8hdmu8WWXJzMzRNRRJ339YYU89jitWf9ZKMdyBgrnSnQi5bJ/ZQ==",
+ "requires": {
+ "cordova-common": "^3.1.0",
+ "ios-sim": "^8.0.1",
+ "nopt": "^4.0.1",
+ "plist": "^3.0.1",
+ "q": "^1.5.1",
+ "semver": "^6.3.0",
+ "shelljs": "^0.5.3",
+ "unorm": "^1.4.1",
+ "xcode": "^2.0.0",
+ "xml-escape": "^1.1.0"
+ }
+ },
+ "cordova-plugin-whitelist": {
+ "version": "1.3.4",
+ "resolved": "https://registry.npmjs.org/cordova-plugin-whitelist/-/cordova-plugin-whitelist-1.3.4.tgz",
+ "integrity": "sha512-EYC5eQFVkoYXq39l7tYKE6lEjHJ04mvTmKXxGL7quHLdFPfJMNzru/UYpn92AOfpl3PQaZmou78C7EgmFOwFQQ=="
+ },
+ "cross-spawn": {
+ "version": "6.0.5",
+ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
+ "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
+ "requires": {
+ "nice-try": "^1.0.4",
+ "path-key": "^2.0.1",
+ "semver": "^5.5.0",
+ "shebang-command": "^1.2.0",
+ "which": "^1.2.9"
+ },
+ "dependencies": {
+ "semver": {
+ "version": "5.7.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
+ "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ=="
+ }
+ }
+ },
+ "dedent": {
+ "version": "0.7.0",
+ "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz",
+ "integrity": "sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw="
+ },
+ "deep-equal": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz",
+ "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU="
+ },
+ "define-properties": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz",
+ "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==",
+ "requires": {
+ "object-keys": "^1.0.12"
+ }
+ },
+ "defined": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz",
+ "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM="
+ },
+ "elementtree": {
+ "version": "0.1.7",
+ "resolved": "https://registry.npmjs.org/elementtree/-/elementtree-0.1.7.tgz",
+ "integrity": "sha1-mskb5uUvtuYkTE5UpKw+2K6OKcA=",
+ "requires": {
+ "sax": "1.1.4"
+ }
+ },
+ "endent": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/endent/-/endent-1.3.0.tgz",
+ "integrity": "sha512-C8AryqPPwtydqcpO5AF6k9Bd1EpFkQtvsefJqS3y3n8TG13Jy63MascDxTOULZYqrUde+dK6BjNc6LIMr3iI2A==",
+ "requires": {
+ "dedent": "^0.7.0",
+ "fast-json-parse": "^1.0.3",
+ "objectorarray": "^1.0.3"
+ }
+ },
+ "es-abstract": {
+ "version": "1.16.3",
+ "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.16.3.tgz",
+ "integrity": "sha512-WtY7Fx5LiOnSYgF5eg/1T+GONaGmpvpPdCpSnYij+U2gDTL0UPfWrhDw7b2IYb+9NQJsYpCA0wOQvZfsd6YwRw==",
+ "requires": {
+ "es-to-primitive": "^1.2.1",
+ "function-bind": "^1.1.1",
+ "has": "^1.0.3",
+ "has-symbols": "^1.0.1",
+ "is-callable": "^1.1.4",
+ "is-regex": "^1.0.4",
+ "object-inspect": "^1.7.0",
+ "object-keys": "^1.1.1",
+ "string.prototype.trimleft": "^2.1.0",
+ "string.prototype.trimright": "^2.1.0"
+ },
+ "dependencies": {
+ "object-inspect": {
+ "version": "1.7.0",
+ "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz",
+ "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw=="
+ }
+ }
+ },
+ "es-to-primitive": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz",
+ "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==",
+ "requires": {
+ "is-callable": "^1.1.4",
+ "is-date-object": "^1.0.1",
+ "is-symbol": "^1.0.2"
+ }
+ },
+ "fast-json-parse": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/fast-json-parse/-/fast-json-parse-1.0.3.tgz",
+ "integrity": "sha512-FRWsaZRWEJ1ESVNbDWmsAlqDk96gPQezzLghafp5J4GUKjbCz3OkAHuZs5TuPEtkbVQERysLp9xv6c24fBm8Aw=="
+ },
+ "for-each": {
+ "version": "0.3.3",
+ "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz",
+ "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==",
+ "requires": {
+ "is-callable": "^1.1.3"
+ }
+ },
+ "fs-extra": {
+ "version": "8.1.0",
+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz",
+ "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==",
+ "requires": {
+ "graceful-fs": "^4.2.0",
+ "jsonfile": "^4.0.0",
+ "universalify": "^0.1.0"
+ }
+ },
+ "fs.realpath": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
+ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
+ },
+ "function-bind": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
+ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
+ },
+ "glob": {
+ "version": "7.1.6",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
+ "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
+ "requires": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.0.4",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ }
+ },
+ "graceful-fs": {
+ "version": "4.2.3",
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz",
+ "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ=="
+ },
+ "has": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
+ "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
+ "requires": {
+ "function-bind": "^1.1.1"
+ }
+ },
+ "has-symbols": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz",
+ "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg=="
+ },
+ "inflight": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
+ "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
+ "requires": {
+ "once": "^1.3.0",
+ "wrappy": "1"
+ }
+ },
+ "inherits": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
+ },
+ "ios-sim": {
+ "version": "8.0.2",
+ "resolved": "https://registry.npmjs.org/ios-sim/-/ios-sim-8.0.2.tgz",
+ "integrity": "sha512-P7nEG771bfd+JoMRjnis1gpZOkjTUUxu+4Ek1Z+eoaEEoT9byllU9pxfQ8Df7hL3gSkIQxNwTSLhos2I8tWUQA==",
+ "requires": {
+ "bplist-parser": "^0.0.6",
+ "nopt": "1.0.9",
+ "plist": "^3.0.1",
+ "simctl": "^2"
+ },
+ "dependencies": {
+ "bplist-parser": {
+ "version": "0.0.6",
+ "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.0.6.tgz",
+ "integrity": "sha1-ONo0cYF9+dRKs4kuJ3B7u9daEbk="
+ },
+ "nopt": {
+ "version": "1.0.9",
+ "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.9.tgz",
+ "integrity": "sha1-O8DXy6e/sNWmdtvtfA6+SKT9RU4=",
+ "requires": {
+ "abbrev": "1"
+ }
+ }
+ }
+ },
+ "is-callable": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz",
+ "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA=="
+ },
+ "is-date-object": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz",
+ "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY="
+ },
+ "is-regex": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz",
+ "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=",
+ "requires": {
+ "has": "^1.0.1"
+ }
+ },
+ "is-symbol": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz",
+ "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==",
+ "requires": {
+ "has-symbols": "^1.0.1"
+ }
+ },
+ "isexe": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
+ "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA="
+ },
+ "jsonfile": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
+ "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=",
+ "requires": {
+ "graceful-fs": "^4.1.6"
+ }
+ },
+ "minimatch": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
+ "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
+ "requires": {
+ "brace-expansion": "^1.1.7"
+ }
+ },
+ "minimist": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
+ "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ="
+ },
+ "nice-try": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
+ "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ=="
+ },
+ "nopt": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz",
+ "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=",
+ "requires": {
+ "abbrev": "1",
+ "osenv": "^0.1.4"
+ }
+ },
+ "object-inspect": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.6.0.tgz",
+ "integrity": "sha512-GJzfBZ6DgDAmnuaM3104jR4s1Myxr3Y3zfIyN4z3UdqN69oSRacNK8UhnobDdC+7J2AHCjGwxQubNJfE70SXXQ=="
+ },
+ "object-keys": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
+ "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA=="
+ },
+ "objectorarray": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/objectorarray/-/objectorarray-1.0.3.tgz",
+ "integrity": "sha512-kPoflSYkAf/Onvjr4ZLaq37vDuOXjVzfwLCRuORRzYGdXkHa/vacPT0RgR+KmtkwOYFcxTMM62BRrZk8GGKHjw==",
+ "requires": {
+ "tape": "^4.8.0"
+ }
+ },
+ "once": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
+ "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
+ "requires": {
+ "wrappy": "1"
+ }
+ },
+ "os-homedir": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
+ "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M="
+ },
+ "os-tmpdir": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
+ "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ="
+ },
+ "osenv": {
+ "version": "0.1.5",
+ "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz",
+ "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==",
+ "requires": {
+ "os-homedir": "^1.0.0",
+ "os-tmpdir": "^1.0.0"
+ }
+ },
+ "path-is-absolute": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
+ "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
+ },
+ "path-key": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
+ "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A="
+ },
+ "path-parse": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
+ "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw=="
+ },
+ "plist": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/plist/-/plist-3.0.1.tgz",
+ "integrity": "sha512-GpgvHHocGRyQm74b6FWEZZVRroHKE1I0/BTjAmySaohK+cUn+hZpbqXkc3KWgW3gQYkqcQej35FohcT0FRlkRQ==",
+ "requires": {
+ "base64-js": "^1.2.3",
+ "xmlbuilder": "^9.0.7",
+ "xmldom": "0.1.x"
+ }
+ },
+ "q": {
+ "version": "1.5.1",
+ "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz",
+ "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc="
+ },
+ "resolve": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.1.tgz",
+ "integrity": "sha512-vIpgF6wfuJOZI7KKKSP+HmiKggadPQAdsp5HiC1mvqnfp0gF1vdwgBWZIdrVft9pgqoMFQN+R7BSWZiBxx+BBw==",
+ "requires": {
+ "path-parse": "^1.0.6"
+ }
+ },
+ "resumer": {
+ "version": "0.0.0",
+ "resolved": "https://registry.npmjs.org/resumer/-/resumer-0.0.0.tgz",
+ "integrity": "sha1-8ej0YeQGS6Oegq883CqMiT0HZ1k=",
+ "requires": {
+ "through": "~2.3.4"
+ }
+ },
+ "sax": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/sax/-/sax-1.1.4.tgz",
+ "integrity": "sha1-dLbTPJrh4AFRDxeakRaFiPGu2qk="
+ },
+ "semver": {
+ "version": "6.3.0",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
+ "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw=="
+ },
+ "shebang-command": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
+ "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=",
+ "requires": {
+ "shebang-regex": "^1.0.0"
+ }
+ },
+ "shebang-regex": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
+ "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM="
+ },
+ "shelljs": {
+ "version": "0.5.3",
+ "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.5.3.tgz",
+ "integrity": "sha1-xUmCuZbHbvDB5rWfvcWCX1txMRM="
+ },
+ "simctl": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/simctl/-/simctl-2.0.0.tgz",
+ "integrity": "sha512-5rB7rN4N3b0z0nFdy9eczVssXqrv2aAgdVRksPVqVoiDtvXmfzNvebp3EMdId2sAUzXIflarQlx4P0hjVQEzKQ==",
+ "requires": {
+ "shelljs": "^0.2.6",
+ "tail": "^0.4.0"
+ },
+ "dependencies": {
+ "shelljs": {
+ "version": "0.2.6",
+ "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.2.6.tgz",
+ "integrity": "sha1-kEktcv/MgVmXa6umL7D2iE8MM3g="
+ }
+ }
+ },
+ "simple-plist": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/simple-plist/-/simple-plist-1.1.0.tgz",
+ "integrity": "sha512-2i5Tc0BYAqppM7jVzmNrI+aEUntPolIq4fDgji6WuNNn1D/qYdn2KwoLhZdzQkE04lu9L5tUoeJsjuJAvd+lFg==",
+ "requires": {
+ "bplist-creator": "0.0.8",
+ "bplist-parser": "0.2.0",
+ "plist": "^3.0.1"
+ },
+ "dependencies": {
+ "bplist-parser": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.2.0.tgz",
+ "integrity": "sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw==",
+ "requires": {
+ "big-integer": "^1.6.44"
+ }
+ }
+ }
+ },
+ "stream-buffers": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/stream-buffers/-/stream-buffers-2.2.0.tgz",
+ "integrity": "sha1-kdX1Ew0c75bc+n9yaUUYh0HQnuQ="
+ },
+ "string.prototype.trim": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.1.2.tgz",
+ "integrity": "sha1-0E3iyJ4Tf019IG8Ia17S+ua+jOo=",
+ "requires": {
+ "define-properties": "^1.1.2",
+ "es-abstract": "^1.5.0",
+ "function-bind": "^1.0.2"
+ }
+ },
+ "string.prototype.trimleft": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.0.tgz",
+ "integrity": "sha512-FJ6b7EgdKxxbDxc79cOlok6Afd++TTs5szo+zJTUyow3ycrRfJVE2pq3vcN53XexvKZu/DJMDfeI/qMiZTrjTw==",
+ "requires": {
+ "define-properties": "^1.1.3",
+ "function-bind": "^1.1.1"
+ }
+ },
+ "string.prototype.trimright": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.0.tgz",
+ "integrity": "sha512-fXZTSV55dNBwv16uw+hh5jkghxSnc5oHq+5K/gXgizHwAvMetdAJlHqqoFC1FSDVPYWLkAKl2cxpUT41sV7nSg==",
+ "requires": {
+ "define-properties": "^1.1.3",
+ "function-bind": "^1.1.1"
+ }
+ },
+ "strip-bom": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
+ "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM="
+ },
+ "tail": {
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/tail/-/tail-0.4.0.tgz",
+ "integrity": "sha1-0p3nJ1DMmdseBTr/E8NZ7PtxMAI="
+ },
+ "tape": {
+ "version": "4.11.0",
+ "resolved": "https://registry.npmjs.org/tape/-/tape-4.11.0.tgz",
+ "integrity": "sha512-yixvDMX7q7JIs/omJSzSZrqulOV51EC9dK8dM0TzImTIkHWfe2/kFyL5v+d9C+SrCMaICk59ujsqFAVidDqDaA==",
+ "requires": {
+ "deep-equal": "~1.0.1",
+ "defined": "~1.0.0",
+ "for-each": "~0.3.3",
+ "function-bind": "~1.1.1",
+ "glob": "~7.1.4",
+ "has": "~1.0.3",
+ "inherits": "~2.0.4",
+ "minimist": "~1.2.0",
+ "object-inspect": "~1.6.0",
+ "resolve": "~1.11.1",
+ "resumer": "~0.0.0",
+ "string.prototype.trim": "~1.1.2",
+ "through": "~2.3.8"
+ }
+ },
+ "through": {
+ "version": "2.3.8",
+ "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
+ "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU="
+ },
+ "underscore": {
+ "version": "1.9.1",
+ "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.9.1.tgz",
+ "integrity": "sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg=="
+ },
+ "universalify": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
+ "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg=="
+ },
+ "unorm": {
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/unorm/-/unorm-1.6.0.tgz",
+ "integrity": "sha512-b2/KCUlYZUeA7JFUuRJZPUtr4gZvBh7tavtv4fvk4+KV9pfGiR6CQAQAWl49ZpR3ts2dk4FYkP7EIgDJoiOLDA=="
+ },
+ "uuid": {
+ "version": "3.3.3",
+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.3.tgz",
+ "integrity": "sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ=="
+ },
+ "which": {
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
+ "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
+ "requires": {
+ "isexe": "^2.0.0"
+ }
+ },
+ "wrappy": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
+ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
+ },
+ "xcode": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/xcode/-/xcode-2.0.0.tgz",
+ "integrity": "sha512-5xF6RCjAdDEiEsbbZaS/gBRt3jZ/177otZcpoLCjGN/u1LrfgH7/Sgeeavpr/jELpyDqN2im3AKosl2G2W8hfw==",
+ "requires": {
+ "simple-plist": "^1.0.0",
+ "uuid": "^3.3.2"
+ }
+ },
+ "xml-escape": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/xml-escape/-/xml-escape-1.1.0.tgz",
+ "integrity": "sha1-OQTBQ/qOs6ADDsZG0pAqLxtwbEQ="
+ },
+ "xml-writer": {
+ "version": "1.7.0",
+ "resolved": "https://registry.npmjs.org/xml-writer/-/xml-writer-1.7.0.tgz",
+ "integrity": "sha1-t28dWRwWomNOvbcDx729D9aBkGU="
+ },
+ "xmlbuilder": {
+ "version": "9.0.7",
+ "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz",
+ "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0="
+ },
+ "xmldom": {
+ "version": "0.1.27",
+ "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.1.27.tgz",
+ "integrity": "sha1-1QH5ezvbQDr4757MIFcxh6rawOk="
+ }
+ }
+}
diff --git a/cogservPlugin/package.json b/cogservPlugin/package.json
new file mode 100644
index 0000000..6967c73
--- /dev/null
+++ b/cogservPlugin/package.json
@@ -0,0 +1,31 @@
+{
+ "name": "microsoft-plugin-cognitiveservices",
+ "displayName": "Cognitive Services",
+ "version": "1.0.0",
+ "description": "An Android Cordova plugin that uses the Cognitive Services Android Library",
+ "cordova": {
+ "id": "microsoft-plugin-cognitiveservices",
+ "platforms": [
+ "browser",
+ "ios"
+ ],
+ "plugins": {
+ "cordova-plugin-whitelist": {}
+ }
+ },
+ "engines": {
+ "name": "cordova",
+ "version": ">=3.0.0"
+ },
+ "author": "Elizabeht Graham",
+ "license": "MIT",
+ "devDependencies": {
+ "cordova-plugin-whitelist": "^1.3.4"
+ },
+ "dependencies": {
+ "cordova-browser": "^5.0.4",
+ "cordova-ios": "^5.1.1",
+ "cordova-plugin-whitelist": "1",
+ "xml-writer": "^1.7.0"
+ }
+}
\ No newline at end of file
diff --git a/cogservPlugin/plugin.xml b/cogservPlugin/plugin.xml
new file mode 100644
index 0000000..e4c3946
--- /dev/null
+++ b/cogservPlugin/plugin.xml
@@ -0,0 +1,57 @@
+
+
+
+ Cognitive Services
+
+ Android support library for Cognitive Services
+
+ Elizabeth Graham
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ >
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/cogservPlugin/plugins/android.json b/cogservPlugin/plugins/android.json
new file mode 100644
index 0000000..67395da
--- /dev/null
+++ b/cogservPlugin/plugins/android.json
@@ -0,0 +1,15 @@
+{
+ "prepare_queue": {
+ "installed": [],
+ "uninstalled": []
+ },
+ "config_munge": {
+ "files": {}
+ },
+ "installed_plugins": {
+ "cordova-plugin-whitelist": {
+ "PACKAGE_NAME": "com.microsoft.cogitiveservicesplugin"
+ }
+ },
+ "dependent_plugins": {}
+}
diff --git a/cogservPlugin/plugins/browser.json b/cogservPlugin/plugins/browser.json
new file mode 100644
index 0000000..67395da
--- /dev/null
+++ b/cogservPlugin/plugins/browser.json
@@ -0,0 +1,15 @@
+{
+ "prepare_queue": {
+ "installed": [],
+ "uninstalled": []
+ },
+ "config_munge": {
+ "files": {}
+ },
+ "installed_plugins": {
+ "cordova-plugin-whitelist": {
+ "PACKAGE_NAME": "com.microsoft.cogitiveservicesplugin"
+ }
+ },
+ "dependent_plugins": {}
+}
diff --git a/cogservPlugin/plugins/cordova-plugin-whitelist/CONTRIBUTING.md b/cogservPlugin/plugins/cordova-plugin-whitelist/CONTRIBUTING.md
new file mode 100644
index 0000000..7de4c64
--- /dev/null
+++ b/cogservPlugin/plugins/cordova-plugin-whitelist/CONTRIBUTING.md
@@ -0,0 +1,37 @@
+
+
+# Contributing to Apache Cordova
+
+Anyone can contribute to Cordova. And we need your contributions.
+
+There are multiple ways to contribute: report bugs, improve the docs, and
+contribute code.
+
+For instructions on this, start with the
+[contribution overview](http://cordova.apache.org/contribute/).
+
+The details are explained there, but the important items are:
+ - Sign and submit an Apache ICLA (Contributor License Agreement).
+ - Have a Jira issue open that corresponds to your contribution.
+ - Run the tests so your patch doesn't break existing functionality.
+
+We look forward to your contributions!
diff --git a/cogservPlugin/plugins/cordova-plugin-whitelist/LICENSE b/cogservPlugin/plugins/cordova-plugin-whitelist/LICENSE
new file mode 100644
index 0000000..7a4a3ea
--- /dev/null
+++ b/cogservPlugin/plugins/cordova-plugin-whitelist/LICENSE
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ 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
+
+ http://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.
\ No newline at end of file
diff --git a/cogservPlugin/plugins/cordova-plugin-whitelist/NOTICE b/cogservPlugin/plugins/cordova-plugin-whitelist/NOTICE
new file mode 100644
index 0000000..8ec56a5
--- /dev/null
+++ b/cogservPlugin/plugins/cordova-plugin-whitelist/NOTICE
@@ -0,0 +1,5 @@
+Apache Cordova
+Copyright 2012 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
diff --git a/cogservPlugin/plugins/cordova-plugin-whitelist/README.md b/cogservPlugin/plugins/cordova-plugin-whitelist/README.md
new file mode 100644
index 0000000..25a5130
--- /dev/null
+++ b/cogservPlugin/plugins/cordova-plugin-whitelist/README.md
@@ -0,0 +1,167 @@
+---
+title: Whitelist
+description: Whitelist external content accessible by your app.
+---
+
+
+# cordova-plugin-whitelist
+
+This plugin implements a whitelist policy for navigating the application webview on Cordova 4.0
+
+## Installation
+
+You can install whitelist plugin with Cordova CLI, from npm:
+
+```
+$ cordova plugin add cordova-plugin-whitelist
+$ cordova prepare
+```
+
+## Supported Cordova Platforms
+
+* Android 4.0.0 or above
+
+## Navigation Whitelist
+
+Controls which URLs the WebView itself can be navigated to. Applies to
+top-level navigations only.
+
+By default navigations are only allowed to `file://` URLs. To allow others URLs, you must add `` tags to your `config.xml`:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Quirks: on Android it also applies to iframes for non-http(s) schemes.
+
+## Intent Whitelist
+
+Controls which URLs the app is allowed to ask the system to open.
+
+In `config.xml`, add `` tags, like this:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Without any `` tags, no requests to external URLs are allowed. However, the default Cordova application includes a quite liberal set of `allow-intent` entries by default. It is advised to narrow this down based on each app's needs.
+
+On Android, this equates to sending an intent of type BROWSEABLE.
+
+This whitelist does not apply to plugins, only hyperlinks and calls to `window.open()`.
+
+Note: `allow-navigation` takes precedence over `allow-intent`. Allowing navigation to all URLs with ` ` for example has the side effect of "capturing" all intents, so the webview navigates to them instead of triggering e.g. external apps.
+
+## Network Request Whitelist
+
+Controls which network requests (images, XHRs, etc) are allowed to be made (via cordova native hooks).
+
+Note: We suggest you use a Content Security Policy (see below), which is more secure. This whitelist is mostly historical for webviews which do not support CSP.
+
+In `config.xml`, add `` tags, like this:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Without any `` tags, only requests to `file://` URLs are allowed. However, the default Cordova application includes `` by default.
+
+Note: Whitelist cannot block network redirects from a whitelisted remote website (i.e. http or https) to a non-whitelisted website. Use CSP rules to mitigate redirects to non-whitelisted websites for webviews that support CSP.
+
+Quirk: Android also allows requests to https://ssl.gstatic.com/accessibility/javascript/android/ by default, since this is required for TalkBack to function properly.
+
+### Content Security Policy
+
+Controls which network requests (images, XHRs, etc) are allowed to be made (via webview directly).
+
+On Android and iOS, the network request whitelist (see above) is not able to filter all types of requests (e.g. `` & WebSockets are not blocked). So, in addition to the whitelist, you should use a [Content Security Policy](http://content-security-policy.com/) ` ` tag on all of your pages.
+
+On Android, support for CSP within the system webview starts with KitKat (but is available on all versions using Crosswalk WebView).
+
+Here are some example CSP declarations for your `.html` pages:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/cogservPlugin/plugins/cordova-plugin-whitelist/RELEASENOTES.md b/cogservPlugin/plugins/cordova-plugin-whitelist/RELEASENOTES.md
new file mode 100644
index 0000000..31a58c8
--- /dev/null
+++ b/cogservPlugin/plugins/cordova-plugin-whitelist/RELEASENOTES.md
@@ -0,0 +1,87 @@
+
+# Release Notes
+
+### 1.3.4 (Jun 19, 2019)
+
+- chore: manually fix lines breaks to LF ([`d804ef2`](https://github.com/apache/cordova-plugin-whitelist/commit/d804ef2))
+- build: add `.gitattributes` to force LF (instead of possible CRLF on Windows) ([`ed0206b`](https://github.com/apache/cordova-plugin-whitelist/commit/ed0206b))
+- build: add `.npmignore` to remove unneeded files from npm package ([`bf8fea5`](https://github.com/apache/cordova-plugin-whitelist/commit/bf8fea5))
+- test,ci(travis): Tests (extracted from cordova-mobile-spec) ([#38](https://github.com/apache/cordova-plugin-whitelist/issues/38)) ([`e4f17b0`](https://github.com/apache/cordova-plugin-whitelist/commit/e4f17b0))
+- docs: Added information on allow-navigation preceding allow-intent ([#41](https://github.com/apache/cordova-plugin-whitelist/issues/41)) ([`7725fed`](https://github.com/apache/cordova-plugin-whitelist/commit/7725fed))
+- chore(github): Add or update GitHub pull request and issue template ([`86b3ee1`](https://github.com/apache/cordova-plugin-whitelist/commit/86b3ee1))
+- fix: Remove information about cordova-android ([#27](https://github.com/apache/cordova-plugin-whitelist/issues/27)) ([`34ed9d0`](https://github.com/apache/cordova-plugin-whitelist/commit/34ed9d0))
+- docs: remove JIRA link ([`fa78675`](https://github.com/apache/cordova-plugin-whitelist/commit/fa78675))
+- docs: Clarify unconfigured Intent Whitelist behaviour ([#26](https://github.com/apache/cordova-plugin-whitelist/issues/26)) ([`8d3f86b`](https://github.com/apache/cordova-plugin-whitelist/commit/8d3f86b))
+
+### 1.3.3 (Nov 06, 2017)
+* [CB-12847](https://issues.apache.org/jira/browse/CB-12847) added `bugs` entry to `package.json`.
+
+### 1.3.2 (Feb 28, 2017)
+* [CB-12236](https://issues.apache.org/jira/browse/CB-12236) Fixed `RELEASENOTES` for `cordova-plugin-whitelist`
+
+### 1.3.1 (Dec 07, 2016)
+* [CB-12224](https://issues.apache.org/jira/browse/CB-12224) Updated version and RELEASENOTES.md for release 1.3.1
+* [CB-11917](https://issues.apache.org/jira/browse/CB-11917) - Remove pull request template checklist item: "iCLA has been submitted…"
+* Edit package.json license to match SPDX id
+* [CB-11832](https://issues.apache.org/jira/browse/CB-11832) Incremented plugin version.
+
+### 1.3.0 (Sep 08, 2016)
+* [CB-11795](https://issues.apache.org/jira/browse/CB-11795) Add 'protective' entry to cordovaDependencies
+* Updated installation section
+* Plugin uses `Android Log class` and not `Cordova LOG class`
+* Add pull request template.
+* [CB-10866](https://issues.apache.org/jira/browse/CB-10866) Adding engine info to `package.json`
+* [CB-10996](https://issues.apache.org/jira/browse/CB-10996) Adding front matter to README.md
+
+### 1.2.2 (Apr 15, 2016)
+* add note about redirects
+* [CB-10624](https://issues.apache.org/jira/browse/CB-10624) remove error message from `whitelist.js`, which leaves it empty
+
+### 1.2.1 (Jan 15, 2016)
+* [CB-10194](https://issues.apache.org/jira/browse/CB-10194) info tag prints for ios when not applicable
+
+### 1.2.0 (Nov 18, 2015)
+* removed **iOS** engine check from `plugin.xml`
+* [CB-10035](https://issues.apache.org/jira/browse/CB-10035) Updated `RELEASENOTES` to be newest to oldest
+* [CB-9972](https://issues.apache.org/jira/browse/CB-9972) - Remove **iOS** whitelist
+* Updated the text, it should read 4.0.x and greater, since this plugin will be required for `cordova-android 5.0`
+* Fixing contribute link.
+* Updated `plugin.xml ` tag to remove warning about not needing this plugin if you are using the **iOS 9 SDK**
+* [CB-9738](https://issues.apache.org/jira/browse/CB-9738) - Disable whitelist use when runtime environment is **iOS 9**
+* [CB-9740](https://issues.apache.org/jira/browse/CB-9740) - Add `` tag describing whitelist plugin not needed on `cordova-ios` and cordova-android 3.x`
+* [CB-9568](https://issues.apache.org/jira/browse/CB-9568) - Update whitelist plugin to allow all network access by default
+* [CB-9337](https://issues.apache.org/jira/browse/CB-9337) - enable use of `` tags for native code network requests
+
+### 1.1.0 (Jun 17, 2015)
+* [CB-9128](https://issues.apache.org/jira/browse/CB-9128) cordova-plugin-whitelist documentation translation: cordova-plugin-whitelist
+* fix npm md issue
+* Usage of CDVURLRequestFilter protocol.
+* [CB-9089](https://issues.apache.org/jira/browse/CB-9089) - iOS whitelist plugin does not compile
+* [CB-9090](https://issues.apache.org/jira/browse/CB-9090) - Enable whitelist plugin for cordova-ios 4.0.0
+* Fixed error in Content-Security-Policy example
+
+### 1.0.0 (Mar 25, 2015)
+* [CB-8739](https://issues.apache.org/jira/browse/CB-8739) added missing license headers
+* Add @Override to CustomConfigXmlParser methods
+* Change ID to cordova-plugin-whitelist rather than reverse-DNS-style
+* Tweak CSP examples in README
+* [CB-8660](https://issues.apache.org/jira/browse/CB-8660) remove extra commas from package.json
diff --git a/cogservPlugin/plugins/cordova-plugin-whitelist/package.json b/cogservPlugin/plugins/cordova-plugin-whitelist/package.json
new file mode 100644
index 0000000..66dd62a
--- /dev/null
+++ b/cogservPlugin/plugins/cordova-plugin-whitelist/package.json
@@ -0,0 +1,67 @@
+{
+ "_from": "cordova-plugin-whitelist@1",
+ "_id": "cordova-plugin-whitelist@1.3.4",
+ "_inBundle": false,
+ "_integrity": "sha512-EYC5eQFVkoYXq39l7tYKE6lEjHJ04mvTmKXxGL7quHLdFPfJMNzru/UYpn92AOfpl3PQaZmou78C7EgmFOwFQQ==",
+ "_location": "/cordova-plugin-whitelist",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "cordova-plugin-whitelist@1",
+ "name": "cordova-plugin-whitelist",
+ "escapedName": "cordova-plugin-whitelist",
+ "rawSpec": "1",
+ "saveSpec": null,
+ "fetchSpec": "1"
+ },
+ "_requiredBy": [
+ "#DEV:/",
+ "#USER"
+ ],
+ "_resolved": "https://registry.npmjs.org/cordova-plugin-whitelist/-/cordova-plugin-whitelist-1.3.4.tgz",
+ "_shasum": "31938545c7c3e7de35c20ab08c2c3afa06e8a3f9",
+ "_spec": "cordova-plugin-whitelist@1",
+ "_where": "C:\\Users\\elizagr\\Source\\Repos\\CSE\\PwC\\AstroPrep\\ionicapp\\cognitiveservicesPlugin",
+ "author": {
+ "name": "Apache Software Foundation"
+ },
+ "bugs": {
+ "url": "https://github.com/apache/cordova-plugin-whitelist/issues"
+ },
+ "bundleDependencies": false,
+ "cordova": {
+ "platforms": [
+ "android"
+ ]
+ },
+ "deprecated": false,
+ "description": "Cordova Whitelist Plugin",
+ "engines": {
+ "cordovaDependencies": {
+ "0.0.0": {
+ "cordova-android": ">=4.0.0"
+ },
+ "2.0.0": {
+ "cordova": ">100"
+ }
+ }
+ },
+ "homepage": "https://github.com/apache/cordova-plugin-whitelist#readme",
+ "keywords": [
+ "cordova",
+ "whitelist",
+ "ecosystem:cordova",
+ "cordova-android"
+ ],
+ "license": "Apache-2.0",
+ "name": "cordova-plugin-whitelist",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/apache/cordova-plugin-whitelist.git"
+ },
+ "scripts": {
+ "test": "echo \"no tests implemented for this plugin\""
+ },
+ "version": "1.3.4"
+}
diff --git a/cogservPlugin/plugins/cordova-plugin-whitelist/plugin.xml b/cogservPlugin/plugins/cordova-plugin-whitelist/plugin.xml
new file mode 100644
index 0000000..1fce219
--- /dev/null
+++ b/cogservPlugin/plugins/cordova-plugin-whitelist/plugin.xml
@@ -0,0 +1,44 @@
+
+
+
+
+ Whitelist
+ Cordova Network Whitelist Plugin
+ Apache 2.0
+ cordova,whitelist,policy
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/cogservPlugin/plugins/cordova-plugin-whitelist/src/android/WhitelistPlugin.java b/cogservPlugin/plugins/cordova-plugin-whitelist/src/android/WhitelistPlugin.java
new file mode 100644
index 0000000..3656788
--- /dev/null
+++ b/cogservPlugin/plugins/cordova-plugin-whitelist/src/android/WhitelistPlugin.java
@@ -0,0 +1,161 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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
+
+ http://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.
+*/
+
+package org.apache.cordova.whitelist;
+
+import org.apache.cordova.CordovaPlugin;
+import org.apache.cordova.ConfigXmlParser;
+import org.apache.cordova.LOG;
+import org.apache.cordova.Whitelist;
+import org.xmlpull.v1.XmlPullParser;
+
+import android.content.Context;
+
+public class WhitelistPlugin extends CordovaPlugin {
+ private static final String LOG_TAG = "WhitelistPlugin";
+ private Whitelist allowedNavigations;
+ private Whitelist allowedIntents;
+ private Whitelist allowedRequests;
+
+ // Used when instantiated via reflection by PluginManager
+ public WhitelistPlugin() {
+ }
+ // These can be used by embedders to allow Java-configuration of whitelists.
+ public WhitelistPlugin(Context context) {
+ this(new Whitelist(), new Whitelist(), null);
+ new CustomConfigXmlParser().parse(context);
+ }
+ public WhitelistPlugin(XmlPullParser xmlParser) {
+ this(new Whitelist(), new Whitelist(), null);
+ new CustomConfigXmlParser().parse(xmlParser);
+ }
+ public WhitelistPlugin(Whitelist allowedNavigations, Whitelist allowedIntents, Whitelist allowedRequests) {
+ if (allowedRequests == null) {
+ allowedRequests = new Whitelist();
+ allowedRequests.addWhiteListEntry("file:///*", false);
+ allowedRequests.addWhiteListEntry("data:*", false);
+ }
+ this.allowedNavigations = allowedNavigations;
+ this.allowedIntents = allowedIntents;
+ this.allowedRequests = allowedRequests;
+ }
+ @Override
+ public void pluginInitialize() {
+ if (allowedNavigations == null) {
+ allowedNavigations = new Whitelist();
+ allowedIntents = new Whitelist();
+ allowedRequests = new Whitelist();
+ new CustomConfigXmlParser().parse(webView.getContext());
+ }
+ }
+
+ private class CustomConfigXmlParser extends ConfigXmlParser {
+ @Override
+ public void handleStartTag(XmlPullParser xml) {
+ String strNode = xml.getName();
+ if (strNode.equals("content")) {
+ String startPage = xml.getAttributeValue(null, "src");
+ allowedNavigations.addWhiteListEntry(startPage, false);
+ } else if (strNode.equals("allow-navigation")) {
+ String origin = xml.getAttributeValue(null, "href");
+ if ("*".equals(origin)) {
+ allowedNavigations.addWhiteListEntry("http://*/*", false);
+ allowedNavigations.addWhiteListEntry("https://*/*", false);
+ allowedNavigations.addWhiteListEntry("data:*", false);
+ } else {
+ allowedNavigations.addWhiteListEntry(origin, false);
+ }
+ } else if (strNode.equals("allow-intent")) {
+ String origin = xml.getAttributeValue(null, "href");
+ allowedIntents.addWhiteListEntry(origin, false);
+ } else if (strNode.equals("access")) {
+ String origin = xml.getAttributeValue(null, "origin");
+ String subdomains = xml.getAttributeValue(null, "subdomains");
+ boolean external = (xml.getAttributeValue(null, "launch-external") != null);
+ if (origin != null) {
+ if (external) {
+ LOG.w(LOG_TAG, "Found within config.xml. Please use instead.");
+ allowedIntents.addWhiteListEntry(origin, (subdomains != null) && (subdomains.compareToIgnoreCase("true") == 0));
+ } else {
+ if ("*".equals(origin)) {
+ allowedRequests.addWhiteListEntry("http://*/*", false);
+ allowedRequests.addWhiteListEntry("https://*/*", false);
+ } else {
+ allowedRequests.addWhiteListEntry(origin, (subdomains != null) && (subdomains.compareToIgnoreCase("true") == 0));
+ }
+ }
+ }
+ }
+ }
+ @Override
+ public void handleEndTag(XmlPullParser xml) {
+ }
+ }
+
+ @Override
+ public Boolean shouldAllowNavigation(String url) {
+ if (allowedNavigations.isUrlWhiteListed(url)) {
+ return true;
+ }
+ return null; // Default policy
+ }
+
+ @Override
+ public Boolean shouldAllowRequest(String url) {
+ if (Boolean.TRUE == shouldAllowNavigation(url)) {
+ return true;
+ }
+ if (allowedRequests.isUrlWhiteListed(url)) {
+ return true;
+ }
+ return null; // Default policy
+ }
+
+ @Override
+ public Boolean shouldOpenExternalUrl(String url) {
+ if (allowedIntents.isUrlWhiteListed(url)) {
+ return true;
+ }
+ return null; // Default policy
+ }
+
+ public Whitelist getAllowedNavigations() {
+ return allowedNavigations;
+ }
+
+ public void setAllowedNavigations(Whitelist allowedNavigations) {
+ this.allowedNavigations = allowedNavigations;
+ }
+
+ public Whitelist getAllowedIntents() {
+ return allowedIntents;
+ }
+
+ public void setAllowedIntents(Whitelist allowedIntents) {
+ this.allowedIntents = allowedIntents;
+ }
+
+ public Whitelist getAllowedRequests() {
+ return allowedRequests;
+ }
+
+ public void setAllowedRequests(Whitelist allowedRequests) {
+ this.allowedRequests = allowedRequests;
+ }
+}
diff --git a/cogservPlugin/plugins/cordova-plugin-whitelist/tests/README.md b/cogservPlugin/plugins/cordova-plugin-whitelist/tests/README.md
new file mode 100644
index 0000000..cbd65d6
--- /dev/null
+++ b/cogservPlugin/plugins/cordova-plugin-whitelist/tests/README.md
@@ -0,0 +1,53 @@
+---
+ license: Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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
+
+ http://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.
+---
+
+# cordova-plugin-whitelist-tests
+
+This are an [optional JavaScript interface](#whitelist) to the core Cordova Whitelist functionality and the test plugin that uses it to test cordova-plugin-whitelist.
+
+## Whitelist
+
+> The `whitelist` object provides an interface for testing whether arbitrary
+> URLs are allowed by the currently active configuration, or would be allowed
+> by a given set of whitelist patterns.
+
+### Methods
+
+- cordova.whitelist.match
+- cordova.whitelist.test
+
+#### cordova.whitelist.match
+
+Indicates whether a given URL would be allowed by a set of Whitelist URL
+patterns.
+
+ cordova.whitelist.match(url, patterns, callback);
+
+`callback` will be invoked with a boolean argument indicating whether the
+url matches the set of patterns.
+
+#### cordova.whitelist.test
+
+Indicates whether a given URL would be allowed by the current application
+configuration.
+
+ cordova.whitelist.test(url, callback);
+
+`callback` will be invoked with a boolean argument indicating whether the
+url is currently whitelisted.
diff --git a/cogservPlugin/plugins/cordova-plugin-whitelist/tests/package.json b/cogservPlugin/plugins/cordova-plugin-whitelist/tests/package.json
new file mode 100644
index 0000000..bf18bc1
--- /dev/null
+++ b/cogservPlugin/plugins/cordova-plugin-whitelist/tests/package.json
@@ -0,0 +1,15 @@
+{
+ "name": "cordova-plugin-whitelist-tests",
+ "version": "1.3.4",
+ "description": "",
+ "cordova": {
+ "id": "cordova-plugin-whitelist-tests",
+ "platforms": []
+ },
+ "keywords": [
+ "ecosystem:cordova"
+ ],
+ "author": "",
+ "license": "Apache 2.0"
+}
+
diff --git a/cogservPlugin/plugins/cordova-plugin-whitelist/tests/plugin.xml b/cogservPlugin/plugins/cordova-plugin-whitelist/tests/plugin.xml
new file mode 100644
index 0000000..dbb33b6
--- /dev/null
+++ b/cogservPlugin/plugins/cordova-plugin-whitelist/tests/plugin.xml
@@ -0,0 +1,56 @@
+
+
+
+
+
+ Cordova Plugin Whitelist Tests
+ Apache 2.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/cogservPlugin/plugins/cordova-plugin-whitelist/tests/scripts/remove-access.js b/cogservPlugin/plugins/cordova-plugin-whitelist/tests/scripts/remove-access.js
new file mode 100644
index 0000000..4d0d4ed
--- /dev/null
+++ b/cogservPlugin/plugins/cordova-plugin-whitelist/tests/scripts/remove-access.js
@@ -0,0 +1,19 @@
+var fs = require('fs');
+var path = require('path');
+var rootdir = "";
+var file = path.join(rootdir, "platforms/android/app/src/main/res/xml/config.xml");
+
+fs.readFile( file, "utf8", function( err, data )
+{
+ if (err)
+ return console.log( err );
+
+ var result = data;
+ result = result.replace( " ", "" );
+
+ fs.writeFile( file, result, "utf8", function( err )
+ {
+ if (err)
+ return console.log( err );
+ } );
+} );
\ No newline at end of file
diff --git a/cogservPlugin/plugins/cordova-plugin-whitelist/tests/src/android/WhitelistAPI.java b/cogservPlugin/plugins/cordova-plugin-whitelist/tests/src/android/WhitelistAPI.java
new file mode 100644
index 0000000..934ffb9
--- /dev/null
+++ b/cogservPlugin/plugins/cordova-plugin-whitelist/tests/src/android/WhitelistAPI.java
@@ -0,0 +1,90 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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
+
+ http://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.
+*/
+package org.apache.cordova.test;
+
+import org.apache.cordova.Whitelist;
+import org.apache.cordova.Config;
+
+import org.apache.cordova.CallbackContext;
+import org.apache.cordova.CordovaPlugin;
+import org.apache.cordova.PluginResult;
+import org.json.JSONArray;
+import org.json.JSONException;
+
+import org.apache.cordova.PluginManager;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+public class WhitelistAPI extends CordovaPlugin {
+ /**
+ * Executes the request and returns PluginResult.
+ *
+ * @param action The action to execute.
+ * @param args JSONArry of arguments for the plugin.
+ * @param callbackContext The callback id used when calling back into JavaScript.
+ * @return True if the action was valid, false if not.
+ */
+ public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException {
+ if (action.equals("URLMatchesPatterns")) {
+ String url = args.getString(0);
+ JSONArray patterns = args.getJSONArray(1);
+ Whitelist whitelist = new Whitelist();
+ for (int i=0; i < patterns.length(); i++) {
+ String pattern = patterns.getString(i);
+ whitelist.addWhiteListEntry(pattern, false);
+ }
+ boolean isAllowed = whitelist.isUrlWhiteListed(url);
+ callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK, isAllowed));
+ return true;
+ } else if (action.equals("URLIsAllowed")) {
+ String url = args.getString(0);
+ /* This code exists for compatibility between 3.x and 4.x versions of Cordova.
+ * Previously the CordovaWebView class had a method, getWhitelist, which would
+ * return a Whitelist object. Since the fixed whitelist is removed in Cordova 4.x,
+ * the correct call now is to shouldAllowRequest from the plugin manager.
+ */
+ Boolean isAllowed = null;
+ try {
+ Method isUrlWhiteListed = Config.class.getDeclaredMethod("isUrlWhitelisted", String.class);
+ isAllowed = (Boolean)isUrlWhiteListed.invoke(url);
+ } catch (NoSuchMethodException e) {
+ } catch (IllegalAccessException e) {
+ } catch (InvocationTargetException e) {
+ }
+ if (isAllowed == null) {
+ try {
+ Method gpm = webView.getClass().getMethod("getPluginManager");
+ PluginManager pm = (PluginManager)gpm.invoke(webView);
+ Method isAllowedMethod = pm.getClass().getMethod("shouldAllowRequest", String.class);
+ isAllowed = (Boolean)isAllowedMethod.invoke(pm, url);
+ if (isAllowed == null) {
+ isAllowed = false;
+ }
+ } catch (NoSuchMethodException e) {
+ } catch (IllegalAccessException e) {
+ } catch (InvocationTargetException e) {
+ }
+ }
+
+ callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK, isAllowed));
+ return true;
+ }
+ return false;
+ }
+}
diff --git a/cogservPlugin/plugins/cordova-plugin-whitelist/tests/tests.js b/cogservPlugin/plugins/cordova-plugin-whitelist/tests/tests.js
new file mode 100644
index 0000000..b8d0b51
--- /dev/null
+++ b/cogservPlugin/plugins/cordova-plugin-whitelist/tests/tests.js
@@ -0,0 +1,214 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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
+ *
+ * http://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.
+ *
+ */
+
+exports.defineAutoTests = function () {
+
+ var isAndroid = (cordova.platformId === "android");
+
+ describe('Whitelist API (cordova.whitelist)', function () {
+
+ it("should exist", function () {
+ expect(cordova.whitelist).toBeDefined();
+ });
+
+ describe("Match function (cordova.whitelist.match) that checks URLs against patterns", function () {
+ function expectMatchWithResult(result) {
+ return (function (url, patterns, description) {
+ description = description || ((result ? "should accept " : "should reject ") + url + " for " + JSON.stringify(patterns));
+ this.result = result;
+
+ describe("Match function", function () {
+ if (!isAndroid) {
+ pending("Whitelist Plugin only exists for Android");
+ }
+
+ // Timeout is 7.5 seconds to allow physical devices enough
+ // time to query the response. This is important for some
+ // Android devices.
+ var originalTimeout,
+ cb;
+
+ beforeEach(function (done) {
+ originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL;
+ jasmine.DEFAULT_TIMEOUT_INTERVAL = 7500;
+
+ cb = jasmine.createSpy('spy').and.callFake(function () {
+ done();
+ });
+ cordova.whitelist.match(url, patterns, cb);
+ });
+
+ afterEach(function () {
+ jasmine.DEFAULT_TIMEOUT_INTERVAL = originalTimeout;
+ });
+
+ it(description, function () {
+ expect(cb).toHaveBeenCalledWith(result);
+ });
+ });
+ });
+ }
+
+ var itShouldMatch = expectMatchWithResult(true);
+ var itShouldNotMatch = expectMatchWithResult(false);
+
+ it("should exist", function () {
+ expect(cordova.whitelist.match).toBeDefined();
+ expect(typeof cordova.whitelist.match).toBe("function");
+ });
+
+ itShouldMatch('http://www.apache.org/', ['*'], "should accept any domain for *");
+ itShouldNotMatch('http://www.apache.org/', [], "should not accept any domain for []");
+
+ itShouldMatch('http://apache.org/', ['http://*.apache.org']);
+ itShouldMatch('http://www.apache.org/', ['http://*.apache.org']);
+ itShouldMatch('http://www.apache.org/some/path', ['http://*.apache.org']);
+ itShouldMatch('http://some.domain.under.apache.org/', ['http://*.apache.org']);
+ itShouldMatch('http://user:pass@apache.org/', ['http://*.apache.org']);
+ itShouldMatch('http://user:pass@www.apache.org/', ['http://*.apache.org']);
+ itShouldMatch('http://www.apache.org/?some=params', ['http://*.apache.org']);
+ itShouldNotMatch('http://apache.com/', ['http://*.apache.org']);
+ itShouldNotMatch('http://www.evil.com/?url=www.apache.org', ['http://*.apache.org']);
+ itShouldNotMatch('http://www.evil.com/?url=http://www.apache.org', ['http://*.apache.org']);
+ itShouldNotMatch('http://www.evil.com/?url=http%3A%2F%2Fwww%2Eapache%2Eorg', ['http://*.apache.org']);
+ itShouldNotMatch('https://apache.org/', ['http://*.apache.org']);
+ itShouldNotMatch('http://www.apache.org:pass@evil.com/', ['http://*.apache.org']);
+ itShouldNotMatch('http://www.apache.org.evil.com/', ['http://*.apache.org']);
+
+ itShouldMatch('http://www.apache.org/', ['http://*.apache.org', 'https://*.apache.org']);
+ itShouldMatch('https://www.apache.org/', ['http://*.apache.org', 'https://*.apache.org']);
+ itShouldNotMatch('ftp://www.apache.org/', ['http://*.apache.org', 'https://*.apache.org']);
+ itShouldNotMatch('http://www.apache.com/', ['http://*.apache.org', 'https://*.apache.org']);
+
+ itShouldMatch('http://www.apache.org/', ['http://www.apache.org']);
+ itShouldNotMatch('http://build.apache.org/', ['http://www.apache.org']);
+ itShouldNotMatch('http://apache.org/', ['http://www.apache.org']);
+
+ itShouldMatch('http://www.apache.org/', ['http://*/*']);
+ itShouldMatch('http://www.apache.org/foo/bar.html', ['http://*/*']);
+
+ itShouldMatch('http://www.apache.org/foo', ['http://*/foo*']);
+ itShouldMatch('http://www.apache.org/foo/bar.html', ['http://*/foo*']);
+ itShouldNotMatch('http://www.apache.org/', ['http://*/foo*']);
+
+ itShouldMatch('file:///foo', ['file:///*']);
+
+ itShouldMatch('file:///foo', ['file:///foo*']);
+ itShouldMatch('file:///foo/bar.html', ['file:///foo*']);
+ itShouldNotMatch('file:///foo.html', []);
+ itShouldNotMatch('http://www.apache.org/etc/foo', ['http://www.apache.org/foo*']);
+ itShouldNotMatch('http://www.apache.org/foo', ['file:///foo*']);
+
+ itShouldMatch('http://www.apache.org/', ['*://www.apache.org/*']);
+ itShouldMatch('https://www.apache.org/', ['*://www.apache.org/*']);
+ itShouldMatch('ftp://www.apache.org/', ['*://www.apache.org/*']);
+ itShouldMatch('file://www.apache.org/', ['*://www.apache.org/*']);
+ if (cordova.platformId == 'android')
+ itShouldMatch('content://www.apache.org/', ['*://www.apache.org/*']);
+ itShouldMatch('foo://www.apache.org/', ['*://www.apache.org/*']);
+ itShouldNotMatch('http://www.apache.com/', ['*://www.apache.org/*']);
+
+ itShouldMatch('http://www.apache.org/', ['*.apache.org']);
+ itShouldMatch('https://www.apache.org/', ['*.apache.org']);
+ itShouldNotMatch('ftp://www.apache.org/', ['*.apache.org']);
+
+ itShouldMatch('http://www.apache.org:81/', ['http://www.apache.org:81/*']);
+ itShouldMatch('http://user:pass@www.apache.org:81/foo/bar.html', ['http://www.apache.org:81/*']);
+ itShouldNotMatch('http://www.apache.org:80/', ['http://www.apache.org:81/*']);
+ itShouldNotMatch('http://www.apache.org/', ['http://www.apache.org:81/*']);
+ itShouldNotMatch('http://www.apache.org:foo/', ['http://www.apache.org:81/*']);
+ itShouldNotMatch('http://www.apache.org:81@www.apache.org/', ['http://www.apache.org:81/*']);
+ itShouldNotMatch('http://www.apache.org:81@www.evil.com/', ['http://www.apache.org:81/*']);
+
+ itShouldMatch('http://www.APAche.org/', ['*.apache.org']);
+ itShouldMatch('http://WWw.apache.org/', ['*.apache.org']);
+ itShouldMatch('http://www.apache.org/', ['*.APACHE.ORG']);
+ itShouldMatch('HTTP://www.apache.org/', ['*.apache.org']);
+ itShouldMatch('HTTP://www.apache.org/', ['http://*.apache.org']);
+ itShouldMatch('http://www.apache.org/', ['HTTP://*.apache.org']);
+
+ itShouldMatch('http://www.apache.org/foo/', ['*://*.apache.org/foo/*']);
+ itShouldMatch('http://www.apache.org/foo/bar', ['*://*.apache.org/foo/*']);
+ itShouldNotMatch('http://www.apache.org/bar/foo/', ['*://*.apache.org/foo/*']);
+ itShouldNotMatch('http://www.apache.org/Foo/', ['*://*.apache.org/foo/*']);
+ itShouldNotMatch('http://www.apache.org/Foo/bar', ['*://*.apache.org/foo/*']);
+ });
+
+ describe("Test function (cordova.whitelist.test) that checks against config.xml", function () {
+ function expectTestWithResult(result) {
+ return (function (url, description) {
+ description = description || ((result ? "should accept " : "should reject ") + url);
+
+ describe("Test function", function () {
+ if (!isAndroid) {
+ pending("Whitelist Plugin only exists for Android");
+ }
+
+ var cb,
+ originalTimeout;
+
+ beforeEach(function (done) {
+ originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL;
+ jasmine.DEFAULT_TIMEOUT_INTERVAL = 7500;
+ cb = jasmine.createSpy('spy').and.callFake(function (){
+ done();
+ });
+ cordova.whitelist.test(url, cb);
+ });
+
+ afterEach(function () {
+ jasmine.DEFAULT_TIMEOUT_INTERVAL = originalTimeout;
+ });
+
+ it(description, function () {
+ expect(cb).toHaveBeenCalledWith(result);
+ });
+ });
+ });
+ }
+
+ var itShouldAccept = expectTestWithResult(true);
+ var itShouldReject = expectTestWithResult(false);
+
+ it("should exist", function () {
+ expect(cordova.whitelist.test).toBeDefined();
+ expect(typeof cordova.whitelist.test).toBe("function");
+ });
+
+ itShouldAccept('http://apache.org');
+ itShouldAccept('http://apache.org/');
+ itShouldAccept('http://www.apache.org/');
+ itShouldAccept('http://www.apache.org/some/path');
+ itShouldAccept('http://some.domain.under.apache.org/');
+ itShouldAccept('http://user:pass@apache.org/');
+ itShouldAccept('http://user:pass@www.apache.org/');
+ itShouldAccept('https://www.apache.org/');
+
+ itShouldReject('ftp://www.apache.org/');
+ itShouldReject('http://www.apache.com/');
+ itShouldReject('http://www.apache.org:pass@evil.com/');
+ itShouldReject('http://www.apache.org.evil.com/');
+
+ itShouldAccept('file:///foo');
+ if (cordova.platformId == 'android')
+ itShouldReject('content:///foo');
+ });
+ });
+}
\ No newline at end of file
diff --git a/cogservPlugin/plugins/cordova-plugin-whitelist/tests/www/whitelist.js b/cogservPlugin/plugins/cordova-plugin-whitelist/tests/www/whitelist.js
new file mode 100644
index 0000000..b342c0f
--- /dev/null
+++ b/cogservPlugin/plugins/cordova-plugin-whitelist/tests/www/whitelist.js
@@ -0,0 +1,34 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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
+ *
+ * http://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.
+ *
+*/
+
+var argscheck = require('cordova/argscheck'),
+ exec = require('cordova/exec');
+
+module.exports = {
+ match: function(url, patterns, callback) {
+ //argscheck.checkArgs('fF', 'Whitelist.match', arguments);
+ exec(callback, callback, "WhitelistAPI", "URLMatchesPatterns", [url, patterns]);
+ },
+ test: function(url, callback) {
+ //argscheck.checkArgs('fF', 'Whitelist.test', arguments);
+ exec(callback, callback, "WhitelistAPI", "URLIsAllowed", [url]);
+ }
+}
diff --git a/cogservPlugin/plugins/fetch.json b/cogservPlugin/plugins/fetch.json
new file mode 100644
index 0000000..e5f339c
--- /dev/null
+++ b/cogservPlugin/plugins/fetch.json
@@ -0,0 +1,10 @@
+{
+ "cordova-plugin-whitelist": {
+ "source": {
+ "type": "registry",
+ "id": "cordova-plugin-whitelist@1"
+ },
+ "is_top_level": true,
+ "variables": {}
+ }
+}
\ No newline at end of file
diff --git a/cogservPlugin/src/.DS_Store b/cogservPlugin/src/.DS_Store
new file mode 100644
index 0000000..c239a75
Binary files /dev/null and b/cogservPlugin/src/.DS_Store differ
diff --git a/cogservPlugin/src/android/CognitiveServices.gradle b/cogservPlugin/src/android/CognitiveServices.gradle
new file mode 100644
index 0000000..000784d
--- /dev/null
+++ b/cogservPlugin/src/android/CognitiveServices.gradle
@@ -0,0 +1,17 @@
+repositories{
+ jcenter()
+ flatDir {
+ dirs 'src/main/libs'
+ }
+}
+
+dependencies {
+ implementation(name:'client-sdk-1.8.0', ext:'aar')
+}
+
+android {
+ packagingOptions {
+ exclude 'META-INF/NOTICE'
+ exclude 'META-INF/LICENSE'
+ }
+}
\ No newline at end of file
diff --git a/cogservPlugin/src/android/CognitiveServices.java b/cogservPlugin/src/android/CognitiveServices.java
new file mode 100644
index 0000000..c99f528
--- /dev/null
+++ b/cogservPlugin/src/android/CognitiveServices.java
@@ -0,0 +1,174 @@
+package com.microsoft.cognitiveservices.speech.plugin;
+
+import android.Manifest;
+import android.util.Log;
+
+import org.json.JSONArray;
+
+import java.util.concurrent.Future;
+
+import org.apache.cordova.CallbackContext;
+import org.apache.cordova.CordovaPlugin;
+import org.apache.cordova.PluginResult;
+import org.apache.cordova.PluginResult.Status;
+
+import com.microsoft.cognitiveservices.speech.ResultReason;
+import com.microsoft.cognitiveservices.speech.SpeechConfig;
+import com.microsoft.cognitiveservices.speech.SpeechSynthesisCancellationDetails;
+import com.microsoft.cognitiveservices.speech.SpeechSynthesisResult;
+import com.microsoft.cognitiveservices.speech.SpeechSynthesizer;
+
+public class CognitiveServices extends CordovaPlugin {
+
+ private SpeechConfig speechConfig;
+ private SpeechSynthesizer synthesizer;
+
+ private static final String LOGTAG = "CognitiveServices";
+
+ private static final String subscriptionError = "Please run SetSubscription with the Cognitive Services subscription key and region.";
+
+ private static final String INTERNET = Manifest.permission.INTERNET;
+ private static final int INTERNET_REQ_CODE = 5;
+
+ @Override
+ public boolean execute(final String action, final JSONArray data, final CallbackContext callbackContext) {
+ Log.d(LOGTAG, "Plugin Called: " + action);
+
+ switch(action) {
+ case "SpeakText":
+ getPermission(INTERNET, INTERNET_REQ_CODE);
+ cordova.getThreadPool().execute(new Runnable() {
+ public void run() {
+ callbackContext.sendPluginResult(SpeakText(data));
+ }
+ });
+ break;
+ case "SpeakTextAsync":
+ getPermission(INTERNET, INTERNET_REQ_CODE);
+ callbackContext.sendPluginResult(SpeakTextAsync(data));
+ break;
+ case "SpeakSsml":
+ getPermission(INTERNET, INTERNET_REQ_CODE);
+ cordova.getThreadPool().execute(new Runnable() {
+ public void run() {
+ callbackContext.sendPluginResult(SpeakSsml(data));
+ }
+ });
+ break;
+ case "SpeakSsmlAsync":
+ getPermission(INTERNET, INTERNET_REQ_CODE);
+ callbackContext.sendPluginResult(SpeakSsmlAsync(data));
+ break;
+ case "SetSubscription":
+ callbackContext.sendPluginResult(setSubscription(data));
+ break;
+ default:
+ callbackContext.sendPluginResult(new PluginResult(Status.ERROR, "Unexpected error calling Cognitive Services plugin"));
+ }
+
+ return true;
+ }
+
+ private PluginResult setSubscription(final JSONArray data) {
+
+ // Initialize speech synthesizer and its dependencies
+ try {
+ final String speechSubscriptionKey = data.getString(0);
+ final String serviceRegion = data.getString(1);
+ speechConfig = SpeechConfig.fromSubscription(speechSubscriptionKey, serviceRegion);
+ }
+ catch (final Exception ex) {
+ return new PluginResult(Status.ERROR, "Error setting cognitive services subscription. Error detail: " + System.lineSeparator()
+ + ex.getMessage());
+ }
+
+ try {
+ synthesizer = new SpeechSynthesizer(speechConfig);
+ }
+ catch (final Exception err) {
+ return new PluginResult(Status.ERROR, "Error setting creating speech synthesizer. Error detail: " + System.lineSeparator()
+ + err.getMessage());
+ }
+
+ return new PluginResult(Status.OK);
+ }
+
+ private PluginResult SpeakText(final JSONArray data) {
+ if (synthesizer == null) {
+ return new PluginResult(Status.ERROR, subscriptionError);
+ }
+
+ try {
+ final SpeechSynthesisResult result = synthesizer.SpeakText(data.getString(0));
+ return setResult(result);
+ } catch (final Exception ex) {
+ return new PluginResult(Status.ERROR, "Speak Text error " + ex.getMessage());
+ }
+ }
+
+ private PluginResult SpeakTextAsync(final JSONArray data) {
+ if (synthesizer == null) {
+ return new PluginResult(Status.ERROR, subscriptionError);
+ }
+
+ try {
+ final Future result = synthesizer.SpeakTextAsync(data.getString(0));
+ return setResult(result.get());
+ } catch (final Exception ex) {
+ return new PluginResult(Status.ERROR, "Speak Text error " + ex.getMessage());
+ }
+ }
+
+ private PluginResult SpeakSsml(final JSONArray data) {
+ if (synthesizer == null) {
+ return new PluginResult(Status.ERROR, subscriptionError);
+ }
+
+ try {
+
+ final SpeechSynthesisResult result = synthesizer.SpeakSsml(data.getString(0));
+ return setResult(result);
+ } catch (final Exception ex) {
+ return new PluginResult(Status.ERROR, "Speak SSML error " + ex.getMessage());
+ }
+ }
+
+ private PluginResult SpeakSsmlAsync(final JSONArray data) {
+ if (synthesizer == null) {
+ return new PluginResult(Status.ERROR, subscriptionError);
+ }
+
+ try {
+ final Future result = synthesizer.SpeakSsmlAsync(data.getString(0));
+ return setResult(result.get());
+ } catch (final Exception ex) {
+ return new PluginResult(Status.ERROR, "Speak Text error " + ex.getMessage());
+ }
+ }
+
+ private PluginResult setResult(final SpeechSynthesisResult result) {
+ if (result.getReason() == ResultReason.Canceled) {
+ final String cancellationDetails = SpeechSynthesisCancellationDetails.fromResult(result).toString();
+ return new PluginResult(Status.ERROR, "Error synthesizing. Error detail: " + System.lineSeparator()
+ + cancellationDetails);
+ }
+
+ result.close();
+
+ return new PluginResult(Status.OK);
+ }
+
+ protected void getPermission(final String strCode, final int requestCode) {
+ if (!cordova.hasPermission(strCode)) {
+ cordova.requestPermission(this, requestCode, strCode);
+ }
+ }
+
+
+ @Override
+ public void onDestroy() {
+ // Release speech synthesizer and its dependencies
+ synthesizer.close();
+ speechConfig.close();
+ }
+}
diff --git a/cogservPlugin/src/ios/.DS_Store b/cogservPlugin/src/ios/.DS_Store
new file mode 100644
index 0000000..4cc03ec
Binary files /dev/null and b/cogservPlugin/src/ios/.DS_Store differ
diff --git a/cogservPlugin/src/ios/CDVCognitiveServices.h b/cogservPlugin/src/ios/CDVCognitiveServices.h
new file mode 100644
index 0000000..5a20553
--- /dev/null
+++ b/cogservPlugin/src/ios/CDVCognitiveServices.h
@@ -0,0 +1,21 @@
+#import
+#import
+#import
+
+@interface CDVCognitiveServices : CDVPlugin {
+
+AVAudioPlayer *player;
+SPXSpeechConfiguration *speechConfig;
+NSString *listenerCallbackId;
+SPXSpeechRecognizer* speechRecognizer;
+
+}
+
+- (void)SetSubscription: (CDVInvokedUrlCommand*)command;
+- (void)RecognizeFromMicrophone: (CDVInvokedUrlCommand*)command;
+- (void)SpeakSsml: (CDVInvokedUrlCommand*)command;
+- (void)SpeakText: (CDVInvokedUrlCommand*)command;
+- (void)StopListening: (CDVInvokedUrlCommand*)command;
+- (void)SpeakStop: (CDVInvokedUrlCommand*)command;
+
+@end
\ No newline at end of file
diff --git a/cogservPlugin/src/ios/CDVCognitiveServices.m b/cogservPlugin/src/ios/CDVCognitiveServices.m
new file mode 100644
index 0000000..52580a0
--- /dev/null
+++ b/cogservPlugin/src/ios/CDVCognitiveServices.m
@@ -0,0 +1,185 @@
+#import "CDVCognitiveServices.h"
+#import
+#import
+#import
+
+@implementation CDVCognitiveServices
+
+- (void)SetSubscription: (CDVInvokedUrlCommand*)command {
+
+ CDVPluginResult* pluginResult = nil;
+ NSString* speechSubscriptionKey = [command.arguments objectAtIndex:0];
+ NSString* serviceRegion = [command.arguments objectAtIndex:1];
+
+ speechConfig = [[SPXSpeechConfiguration alloc] initWithSubscription:speechSubscriptionKey region:serviceRegion];
+
+ if (!speechConfig) {
+ pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:@"Could not load speech config"];
+ NSLog(@"Could not load speech config");
+ }
+ else {
+ pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK];
+ }
+
+ [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
+}
+
+- (void)StopListening:(CDVInvokedUrlCommand*)command {
+ [self.commandDelegate runInBackground:^{
+
+ if (speechRecognizer) {
+ [speechRecognizer stopContinuousRecognition];
+ }
+
+ CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK];
+ [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
+ }];
+}
+
+- (void)RecognizeFromMicrophone: (CDVInvokedUrlCommand*)command {
+
+ CDVPluginResult* pluginResult = nil;
+
+ listenerCallbackId = command.callbackId;
+
+ AVAudioSession *audioSession = [AVAudioSession sharedInstance];
+ [audioSession setCategory:AVAudioSessionCategoryMultiRoute error:nil];
+
+ NSLog(@"Recognizing...");
+
+ speechRecognizer = [[SPXSpeechRecognizer alloc] init:speechConfig];
+
+ if (!speechRecognizer) {
+ NSLog(@"Could not create speech recognizer");
+ pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:(@"Could not create speech recognizer, please make sure to run SetSubscription")];
+ [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
+ return;
+ }
+
+ NSMutableDictionary *resultsDict = [[NSMutableDictionary alloc] init];
+
+ // connect callback
+ [speechRecognizer addRecognizingEventHandler: ^ (SPXSpeechRecognizer *recognizer, SPXSpeechRecognitionEventArgs *eventArgs) {
+ [resultsDict setValue:[NSNumber numberWithBool:NO] forKey:@"isFinal"];
+ [resultsDict setValue:eventArgs.result.text forKey:@"result"];
+ [resultsDict setValue:listenerCallbackId forKey:@"id"];
+
+ CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:resultsDict];
+ [pluginResult setKeepCallbackAsBool:YES];
+ [self.commandDelegate sendPluginResult:pluginResult callbackId:listenerCallbackId];
+ return;
+ }];
+
+ //SPXSpeechRecognitionResult *speechResult = [speechRecognizer recognizeOnce];
+ [self.commandDelegate runInBackground:^{
+ [speechRecognizer recognizeOnceAsync: ^ (SPXSpeechRecognitionResult * speechResult){
+ CDVPluginResult* pluginResult = nil;
+ if (SPXResultReason_Canceled == speechResult.reason) {
+ SPXCancellationDetails *details = [[SPXCancellationDetails alloc] initFromCanceledRecognitionResult:speechResult];
+ NSLog(@"Speech recognition was canceled: %@.", details.errorDetails);
+ pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:([NSString stringWithFormat:@"Canceled: %@", details.errorDetails ])];
+ } else if (SPXResultReason_RecognizedSpeech == speechResult.reason) {
+ [resultsDict setValue:[NSNumber numberWithBool:YES] forKey:@"isFinal"];
+ [resultsDict setValue:speechResult.text forKey:@"result"];
+ [resultsDict setValue:command.callbackId forKey:@"id"];
+ pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:resultsDict];
+ } else if (!speechResult.reason) {
+ //Nothing was detected
+ [resultsDict setValue:[NSNumber numberWithBool:YES] forKey:@"isFinal"];
+ [resultsDict setValue:speechResult.text forKey:@"result"];
+ pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:resultsDict];
+ } else {
+ NSLog(@"There was an error.");
+ pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:([NSString stringWithFormat:@"Speech Recognition Error: %@", speechResult.reason ])];
+ }
+ [pluginResult setKeepCallbackAsBool:NO];
+ [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
+ }];
+ }];
+
+}
+
+- (void)SpeakStop: (CDVInvokedUrlCommand*)command {
+ if (player)
+ {
+ //player is playing
+ if ([player rate]) {
+ [player stop];
+ }
+ }
+
+ CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK];
+
+}
+
+- (void)SpeakSsml: (CDVInvokedUrlCommand*)command {
+
+ CDVPluginResult* pluginResult = nil;
+
+ [speechConfig setSpeechSynthesisOutputFormat:SPXSpeechSynthesisOutputFormat_Audio16Khz32KBitRateMonoMp3];
+ SPXSpeechSynthesizer *speechSynthesizer = [[SPXSpeechSynthesizer alloc] initWithSpeechConfiguration:speechConfig audioConfiguration:nil];
+
+ NSString* inputText = [command.arguments objectAtIndex:0];
+
+ NSLog(@"Start synthesizing...");
+
+ SPXSpeechSynthesisResult *speechResult = [speechSynthesizer speakSsml:inputText];
+
+ // Checks result.
+ if (SPXResultReason_Canceled == speechResult.reason) {
+ SPXSpeechSynthesisCancellationDetails *details = [[SPXSpeechSynthesisCancellationDetails alloc] initFromCanceledSynthesisResult:speechResult];
+ NSLog(@"Speech synthesis was canceled: %@. Did you pass the correct key/region combination?", details.errorDetails);
+ pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:([NSString stringWithFormat:@"Canceled: %@", details.errorDetails ])];
+ } else if (SPXResultReason_SynthesizingAudioCompleted == speechResult.reason) {
+ NSLog(@"Speech synthesis was completed");
+ // Play audio.
+ player = [[AVAudioPlayer alloc] initWithData:[speechResult audioData] error:nil];
+ [player prepareToPlay];
+ [player play];
+ NSLog(@"The synthesis is completed.");
+ pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK];
+ } else {
+ NSLog(@"There was an error.");
+ pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:(@"Synthesis error")];
+ }
+
+ [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
+}
+
+
+- (void)SpeakText: (CDVInvokedUrlCommand*)command {
+
+ CDVPluginResult* pluginResult = nil;
+
+ [speechConfig setSpeechSynthesisOutputFormat:SPXSpeechSynthesisOutputFormat_Audio16Khz32KBitRateMonoMp3];
+ SPXSpeechSynthesizer *speechSynthesizer = [[SPXSpeechSynthesizer alloc] initWithSpeechConfiguration:speechConfig audioConfiguration:nil];
+
+ NSString* inputText = [command.arguments objectAtIndex:0];
+
+ NSLog(@"Start synthesizing...");
+
+ SPXSpeechSynthesisResult *speechResult = [speechSynthesizer speakText:inputText];
+
+ // Checks result.
+ if (SPXResultReason_Canceled == speechResult.reason) {
+ SPXSpeechSynthesisCancellationDetails *details = [[SPXSpeechSynthesisCancellationDetails alloc] initFromCanceledSynthesisResult:speechResult];
+ NSLog(@"Speech synthesis was canceled: %@. Did you pass the correct key/region combination?", details.errorDetails);
+ pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:([NSString stringWithFormat:@"Canceled: %@", details.errorDetails ])];
+ } else if (SPXResultReason_SynthesizingAudioCompleted == speechResult.reason) {
+ NSLog(@"Speech synthesis was completed");
+ // Play audio.
+ player = [[AVAudioPlayer alloc] initWithData:[speechResult audioData] error:nil];
+ [player prepareToPlay];
+ [player play];
+ NSLog(@"The synthesis is completed.");
+ pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK];
+ } else {
+ NSLog(@"There was an error.");
+ pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:(@"Synthesis error")];
+ }
+
+ [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
+
+}
+
+@end
\ No newline at end of file
diff --git a/cogservPlugin/www/cognitiveservices.js b/cogservPlugin/www/cognitiveservices.js
new file mode 100644
index 0000000..b462353
--- /dev/null
+++ b/cogservPlugin/www/cognitiveservices.js
@@ -0,0 +1,37 @@
+
+var exec = require('cordova/exec');
+
+module.exports = {
+ SetSubscription: function(speechSubscriptionKey, serviceRegion, successCallback, errorCallback) {
+ return cordova.exec(successCallback, errorCallback, 'CognitiveServices', 'SetSubscription', [speechSubscriptionKey, serviceRegion]);
+ },
+
+ SpeakText: function(speechText, successCallback, errorCallback) {
+ return cordova.exec(successCallback, errorCallback, 'CognitiveServices', 'SpeakText', [speechText]);
+ },
+
+ SpeakTextAsync: function(speechText, successCallback, errorCallback) {
+ return cordova.exec(successCallback, errorCallback, 'CognitiveServices', 'SpeakTextAsync', [speechText]);
+ },
+
+ SpeakSsml: function(speechText, successCallback, errorCallback) {
+ return cordova.exec(successCallback, errorCallback, 'CognitiveServices', 'SpeakSsml', [speechText]);
+ },
+
+ SpeakSsmlAsync: function(speechText, successCallback, errorCallback) {
+ return cordova.exec(successCallback, errorCallback, 'CognitiveServices', 'SpeakSsmlAsync', [speechText]);
+ },
+
+ RecognizeFromMicrophone: function(successCallback, errorCallback) {
+ return cordova.exec(successCallback, errorCallback, 'CognitiveServices', 'RecognizeFromMicrophone' );
+ },
+
+ StopListening: function(successCallback, errorCallback) {
+ return cordova.exec(successCallback, errorCallback, 'CognitiveServices', 'StopListening' );
+ },
+
+ SpeakStop: function(successCallback, errorCallback) {
+ return cordova.exec(successCallback, errorCallback, 'CognitiveServices', 'SpeakStop' );
+ }
+
+}
diff --git a/cogservicesNative/index.d.ts b/cogservicesNative/index.d.ts
new file mode 100644
index 0000000..86bc5dc
--- /dev/null
+++ b/cogservicesNative/index.d.ts
@@ -0,0 +1,47 @@
+import { IonicNativePlugin } from '@ionic-native/core';
+import { Observable } from 'rxjs';
+/**
+ * @name cognitiveservices
+ * @description
+ * This plugin does something
+ *
+ * @usage
+ * ```typescript
+ * import { cognitiveservices } from '@ionic-native/cognitiveservices';
+ *
+ *
+ * constructor(private cognitiveservices: cognitiveservices) { }
+ *
+ * ...
+ *
+ *
+ * this.cognitiveservices.functionName('Hello', 123)
+ * .then((res: any) => console.log(res))
+ * .catch((error: any) => console.error(error));
+ *
+ * ```
+ */
+export interface SpeechVoiceOptions {
+ language?: string;
+ pitch?: string;
+ voice?: string;
+}
+export declare class CognitiveServicesOriginal extends IonicNativePlugin {
+ /**
+ * This function does something
+ * @param arg1 {string} Some param to configure something
+ * @param arg2 {number} Another param to configure something
+ * @return {Promise} Returns a promise that resolves when something happens
+ */
+ SetSubscription(speechSubscriptionKey: string, serviceRegion: string): Promise;
+ RecognizeFromMicrophone(): Observable>;
+ SpeakSsml(speechText: string): Promise;
+ SpeakSsmlAsync(speechText: string): Promise;
+ SpeakText(speechText: string): Promise;
+ SpeakTextAsync(speechText: string): Promise;
+ StopListening(): Promise;
+ SpeakWithVoiceOptions(speechText: string, options?: SpeechVoiceOptions): Promise;
+ SpeakStop(): Promise;
+}
+
+export declare const CognitiveServices: CognitiveServicesOriginal;
\ No newline at end of file
diff --git a/cogservicesNative/index.js b/cogservicesNative/index.js
new file mode 100644
index 0000000..df8894f
--- /dev/null
+++ b/cogservicesNative/index.js
@@ -0,0 +1,39 @@
+var __extends = (this && this.__extends) || (function () {
+ var extendStatics = function (d, b) {
+ extendStatics = Object.setPrototypeOf ||
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
+ return extendStatics(d, b);
+ };
+ return function (d, b) {
+ extendStatics(d, b);
+ function __() { this.constructor = d; }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+ };
+})();
+import { IonicNativePlugin, cordova } from '@ionic-native/core';
+import { Observable } from 'rxjs';
+var CognitiveServicesOriginal = /** @class */ (function (_super) {
+ __extends(CognitiveServicesOriginal, _super);
+ function CognitiveServicesOriginal() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ CognitiveServicesOriginal.prototype.SetSubscription = function (speechSubscriptionKey, serviceRegion) { return cordova(this, "SetSubscription", {}, arguments); };
+ CognitiveServicesOriginal.prototype.RecognizeFromMicrophone = function () { return cordova(this, "RecognizeFromMicrophone", { "callbackOrder": "reverse", "observable": true }, arguments); };
+ CognitiveServicesOriginal.prototype.SpeakSsml = function (speechText) { return cordova(this, "SpeakSsml", {}, arguments); };
+ CognitiveServicesOriginal.prototype.SpeakSsmlAsync = function (speechText) { return cordova(this, "SpeakSsmlAsync", {}, arguments); };
+ CognitiveServicesOriginal.prototype.SpeakText = function (speechText) { return cordova(this, "SpeakText", {}, arguments); };
+ CognitiveServicesOriginal.prototype.SpeakTextAsync = function (speechText) { return cordova(this, "SpeakTextAsync", {}, arguments); };
+ CognitiveServicesOriginal.prototype.StopListening = function () { return cordova(this, "StopListening", {}, arguments); };
+ CognitiveServicesOriginal.prototype.SpeakWithVoiceOptions = function (speechText, options) { return cordova(this, "SpeakWithVoiceOptions", {}, arguments); };
+ CognitiveServicesOriginal.prototype.SpeakStop = function () { return cordova(this, "SpeakStop", {}, arguments); };
+ CognitiveServicesOriginal.pluginName = "Cognitive Services";
+ CognitiveServicesOriginal.plugin = "microsoft-plugin-cognitiveservices";
+ CognitiveServicesOriginal.pluginRef = "microsoft.plugin.cognitiveservices";
+ CognitiveServicesOriginal.repo = "";
+ CognitiveServicesOriginal.platforms = ["iOS", "android"];
+ return CognitiveServicesOriginal;
+}(IonicNativePlugin));
+var CognitiveServices = new CognitiveServicesOriginal();
+export { CognitiveServices };
+//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvQGlvbmljLW5hdGl2ZS9wbHVnaW5zL2NvZ25pdGl2ZXNlcnZpY2VzL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7QUFDQSxPQUFPLDhCQUEwRixNQUFNLG9CQUFvQixDQUFDO0FBQzVILE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxNQUFNLENBQUM7O0lBc0NLLHFDQUFpQjs7OztJQVN0RCwyQ0FBZSxhQUFDLHFCQUE2QixFQUFFLGFBQXFCO0lBTXBFLG1EQUF1QjtJQUd2QixxQ0FBUyxhQUFDLFVBQWtCO0lBRzVCLDBDQUFjLGFBQUMsVUFBa0I7SUFHakMscUNBQVMsYUFBQyxVQUFrQjtJQUc1QiwwQ0FBYyxhQUFDLFVBQWtCO0lBR2pDLHlDQUFhO0lBR2IsaURBQXFCLGFBQUMsVUFBa0IsRUFBRSxPQUE0Qjs7Ozs7OzRCQXpFeEU7RUF3Q3VDLGlCQUFpQjtTQUEzQyxpQkFBaUIiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBJbmplY3RhYmxlIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5pbXBvcnQgeyBQbHVnaW4sIENvcmRvdmEsIENvcmRvdmFQcm9wZXJ0eSwgQ29yZG92YUluc3RhbmNlLCBJbnN0YW5jZVByb3BlcnR5LCBJb25pY05hdGl2ZVBsdWdpbiB9IGZyb20gJ0Bpb25pYy1uYXRpdmUvY29yZSc7XG5pbXBvcnQgeyBPYnNlcnZhYmxlIH0gZnJvbSAncnhqcyc7XG5cbi8qKlxuICogQG5hbWUgY29nbml0aXZlc2VydmljZXNcbiAqIEBkZXNjcmlwdGlvblxuICogVGhpcyBwbHVnaW4gZG9lcyBzb21ldGhpbmdcbiAqXG4gKiBAdXNhZ2VcbiAqIGBgYHR5cGVzY3JpcHRcbiAqIGltcG9ydCB7IGNvZ25pdGl2ZXNlcnZpY2VzIH0gZnJvbSAnQGlvbmljLW5hdGl2ZS9jb2duaXRpdmVzZXJ2aWNlcyc7XG4gKlxuICpcbiAqIGNvbnN0cnVjdG9yKHByaXZhdGUgY29nbml0aXZlc2VydmljZXM6IGNvZ25pdGl2ZXNlcnZpY2VzKSB7IH1cbiAqXG4gKiAuLi5cbiAqXG4gKlxuICogdGhpcy5jb2duaXRpdmVzZXJ2aWNlcy5mdW5jdGlvbk5hbWUoJ0hlbGxvJywgMTIzKVxuICogICAudGhlbigocmVzOiBhbnkpID0+IGNvbnNvbGUubG9nKHJlcykpXG4gKiAgIC5jYXRjaCgoZXJyb3I6IGFueSkgPT4gY29uc29sZS5lcnJvcihlcnJvcikpO1xuICpcbiAqIGBgYFxuICovXG5leHBvcnQgaW50ZXJmYWNlIFNwZWVjaFZvaWNlT3B0aW9ucyB7XG4gIGxhbmd1YWdlPzogc3RyaW5nO1xuICBwaXRjaD86IHN0cmluZztcbiAgdm9pY2U/OiBzdHJpbmc7XG59XG5AUGx1Z2luKFxuICB7XG4gICAgcGx1Z2luTmFtZTogXCJDb2duaXRpdmUgU2VydmljZXNcIixcbiAgICBwbHVnaW46IFwibWljcm9zb2Z0LXBsdWdpbi1jb2duaXRpdmVzZXJ2aWNlc1wiLFxuICAgIHBsdWdpblJlZjogXCJtaWNyb3NvZnQucGx1Z2luLmNvZ25pdGl2ZXNlcnZpY2VzXCIsXG4gICAgcmVwbzogJycsXG4gICAgcGxhdGZvcm1zOiBbJ2lPUycsICdhbmRyb2lkJ11cbiAgfVxuKSBcbkBJbmplY3RhYmxlKClcbmV4cG9ydCBjbGFzcyBDb2duaXRpdmVTZXJ2aWNlcyBleHRlbmRzIElvbmljTmF0aXZlUGx1Z2luIHtcblxuICAvKipcbiAgICogVGhpcyBmdW5jdGlvbiBkb2VzIHNvbWV0aGluZ1xuICAgKiBAcGFyYW0gYXJnMSB7c3RyaW5nfSBTb21lIHBhcmFtIHRvIGNvbmZpZ3VyZSBzb21ldGhpbmdcbiAgICogQHBhcmFtIGFyZzIge251bWJlcn0gQW5vdGhlciBwYXJhbSB0byBjb25maWd1cmUgc29tZXRoaW5nXG4gICAqIEByZXR1cm4ge1Byb21pc2U8YW55Pn0gUmV0dXJucyBhIHByb21pc2UgdGhhdCByZXNvbHZlcyB3aGVuIHNvbWV0aGluZyBoYXBwZW5zXG4gICAqL1xuICBAQ29yZG92YSgpXG4gIFNldFN1YnNjcmlwdGlvbihzcGVlY2hTdWJzY3JpcHRpb25LZXk6IHN0cmluZywgc2VydmljZVJlZ2lvbjogc3RyaW5nKTogUHJvbWlzZTx2b2lkPiB7IHJldHVybiB9XG5cbiAgQENvcmRvdmEoe1xuICAgIGNhbGxiYWNrT3JkZXI6ICdyZXZlcnNlJyxcbiAgICBvYnNlcnZhYmxlOiB0cnVlLFxuICB9KVxuICBSZWNvZ25pemVGcm9tTWljcm9waG9uZSgpOiBPYnNlcnZhYmxlPEFycmF5PE9iamVjdD4+IHsgcmV0dXJuIH1cblxuICBAQ29yZG92YSgpXG4gIFNwZWFrU3NtbChzcGVlY2hUZXh0OiBzdHJpbmcpOiBQcm9taXNlPHN0cmluZz4geyByZXR1cm4gfVxuXG4gIEBDb3Jkb3ZhKClcbiAgU3BlYWtTc21sQXN5bmMoc3BlZWNoVGV4dDogc3RyaW5nKTogUHJvbWlzZTxzdHJpbmc+IHsgcmV0dXJuIH1cblxuICBAQ29yZG92YSgpXG4gIFNwZWFrVGV4dChzcGVlY2hUZXh0OiBzdHJpbmcpOiBQcm9taXNlPHN0cmluZz4geyByZXR1cm4gfVxuXG4gIEBDb3Jkb3ZhKClcbiAgU3BlYWtUZXh0QXN5bmMoc3BlZWNoVGV4dDogc3RyaW5nKTogUHJvbWlzZTxzdHJpbmc+IHsgcmV0dXJuIH1cblxuICBAQ29yZG92YSgpXG4gIFN0b3BMaXN0ZW5pbmcoKTogUHJvbWlzZTx2b2lkPiB7IHJldHVybiB9XG5cbiAgQENvcmRvdmEoKVxuICBTcGVha1dpdGhWb2ljZU9wdGlvbnMoc3BlZWNoVGV4dDogc3RyaW5nLCBvcHRpb25zPzogU3BlZWNoVm9pY2VPcHRpb25zKTogUHJvbWlzZTx2b2lkPiB7IHJldHVybiB9XG4gICBcbn0iXX0=
\ No newline at end of file
diff --git a/cogservicesNative/ngx/index.d.ts b/cogservicesNative/ngx/index.d.ts
new file mode 100644
index 0000000..4a403e5
--- /dev/null
+++ b/cogservicesNative/ngx/index.d.ts
@@ -0,0 +1,45 @@
+import { IonicNativePlugin } from '@ionic-native/core';
+import { Observable } from 'rxjs';
+/**
+ * @name cognitiveservices
+ * @description
+ * This plugin does something
+ *
+ * @usage
+ * ```typescript
+ * import { cognitiveservices } from '@ionic-native/cognitiveservices';
+ *
+ *
+ * constructor(private cognitiveservices: cognitiveservices) { }
+ *
+ * ...
+ *
+ *
+ * this.cognitiveservices.functionName('Hello', 123)
+ * .then((res: any) => console.log(res))
+ * .catch((error: any) => console.error(error));
+ *
+ * ```
+ */
+export interface SpeechVoiceOptions {
+ language?: string;
+ pitch?: string;
+ voice?: string;
+}
+export declare class CognitiveServices extends IonicNativePlugin {
+ /**
+ * This function does something
+ * @param arg1 {string} Some param to configure something
+ * @param arg2 {number} Another param to configure something
+ * @return {Promise} Returns a promise that resolves when something happens
+ */
+ SetSubscription(speechSubscriptionKey: string, serviceRegion: string): Promise;
+ RecognizeFromMicrophone(): Observable>;
+ SpeakSsml(speechText: string): Promise;
+ SpeakSsmlAsync(speechText: string): Promise;
+ SpeakText(speechText: string): Promise;
+ SpeakTextAsync(speechText: string): Promise;
+ StopListening(): Promise;
+ SpeakWithVoiceOptions(speechText: string, options?: SpeechVoiceOptions): Promise;
+ SpeakStop(): Promise;
+}
diff --git a/cogservicesNative/ngx/index.js b/cogservicesNative/ngx/index.js
new file mode 100644
index 0000000..32b4529
--- /dev/null
+++ b/cogservicesNative/ngx/index.js
@@ -0,0 +1,48 @@
+var __extends = (this && this.__extends) || (function () {
+ var extendStatics = function (d, b) {
+ extendStatics = Object.setPrototypeOf ||
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
+ return extendStatics(d, b);
+ };
+ return function (d, b) {
+ extendStatics(d, b);
+ function __() { this.constructor = d; }
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+ };
+})();
+var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
+};
+import { Injectable } from '@angular/core';
+import { IonicNativePlugin, cordova } from '@ionic-native/core';
+import { Observable } from 'rxjs';
+var CognitiveServices = /** @class */ (function (_super) {
+ __extends(CognitiveServices, _super);
+ function CognitiveServices() {
+ return _super !== null && _super.apply(this, arguments) || this;
+ }
+ CognitiveServices.prototype.SetSubscription = function (speechSubscriptionKey, serviceRegion) { return cordova(this, "SetSubscription", {}, arguments); };
+ CognitiveServices.prototype.RecognizeFromMicrophone = function () { return cordova(this, "RecognizeFromMicrophone", { "callbackOrder": "reverse", "observable": true }, arguments); };
+ CognitiveServices.prototype.SpeakSsml = function (speechText) { return cordova(this, "SpeakSsml", {}, arguments); };
+ CognitiveServices.prototype.SpeakSsmlAsync = function (speechText) { return cordova(this, "SpeakSsmlAsync", {}, arguments); };
+ CognitiveServices.prototype.SpeakText = function (speechText) { return cordova(this, "SpeakText", {}, arguments); };
+ CognitiveServices.prototype.SpeakTextAsync = function (speechText) { return cordova(this, "SpeakTextAsync", {}, arguments); };
+ CognitiveServices.prototype.StopListening = function () { return cordova(this, "StopListening", {}, arguments); };
+ CognitiveServices.prototype.SpeakWithVoiceOptions = function (speechText, options) { return cordova(this, "SpeakWithVoiceOptions", {}, arguments); };
+ CognitiveServices.prototype.SpeakStop = function () { return cordova(this, "SpeakStop", {}, arguments); };
+ CognitiveServices.pluginName = "Cognitive Services";
+ CognitiveServices.plugin = "microsoft-plugin-cognitiveservices";
+ CognitiveServices.pluginRef = "microsoft.plugin.cognitiveservices";
+ CognitiveServices.repo = "";
+ CognitiveServices.platforms = ["iOS", "android"];
+ CognitiveServices = __decorate([
+ Injectable()
+ ], CognitiveServices);
+ return CognitiveServices;
+}(IonicNativePlugin));
+export { CognitiveServices };
+//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvQGlvbmljLW5hdGl2ZS9wbHVnaW5zL2NvZ25pdGl2ZXNlcnZpY2VzL25neC9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUMzQyxPQUFPLDhCQUEwRixNQUFNLG9CQUFvQixDQUFDO0FBQzVILE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxNQUFNLENBQUM7O0lBc0NLLHFDQUFpQjs7OztJQVN0RCwyQ0FBZSxhQUFDLHFCQUE2QixFQUFFLGFBQXFCO0lBTXBFLG1EQUF1QjtJQUd2QixxQ0FBUyxhQUFDLFVBQWtCO0lBRzVCLDBDQUFjLGFBQUMsVUFBa0I7SUFHakMscUNBQVMsYUFBQyxVQUFrQjtJQUc1QiwwQ0FBYyxhQUFDLFVBQWtCO0lBR2pDLHlDQUFhO0lBR2IsaURBQXFCLGFBQUMsVUFBa0IsRUFBRSxPQUE0Qjs7Ozs7O0lBakMzRCxpQkFBaUI7UUFEN0IsVUFBVSxFQUFFO09BQ0EsaUJBQWlCOzRCQXhDOUI7RUF3Q3VDLGlCQUFpQjtTQUEzQyxpQkFBaUIiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBJbmplY3RhYmxlIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5pbXBvcnQgeyBQbHVnaW4sIENvcmRvdmEsIENvcmRvdmFQcm9wZXJ0eSwgQ29yZG92YUluc3RhbmNlLCBJbnN0YW5jZVByb3BlcnR5LCBJb25pY05hdGl2ZVBsdWdpbiB9IGZyb20gJ0Bpb25pYy1uYXRpdmUvY29yZSc7XG5pbXBvcnQgeyBPYnNlcnZhYmxlIH0gZnJvbSAncnhqcyc7XG5cbi8qKlxuICogQG5hbWUgY29nbml0aXZlc2VydmljZXNcbiAqIEBkZXNjcmlwdGlvblxuICogVGhpcyBwbHVnaW4gZG9lcyBzb21ldGhpbmdcbiAqXG4gKiBAdXNhZ2VcbiAqIGBgYHR5cGVzY3JpcHRcbiAqIGltcG9ydCB7IGNvZ25pdGl2ZXNlcnZpY2VzIH0gZnJvbSAnQGlvbmljLW5hdGl2ZS9jb2duaXRpdmVzZXJ2aWNlcyc7XG4gKlxuICpcbiAqIGNvbnN0cnVjdG9yKHByaXZhdGUgY29nbml0aXZlc2VydmljZXM6IGNvZ25pdGl2ZXNlcnZpY2VzKSB7IH1cbiAqXG4gKiAuLi5cbiAqXG4gKlxuICogdGhpcy5jb2duaXRpdmVzZXJ2aWNlcy5mdW5jdGlvbk5hbWUoJ0hlbGxvJywgMTIzKVxuICogICAudGhlbigocmVzOiBhbnkpID0+IGNvbnNvbGUubG9nKHJlcykpXG4gKiAgIC5jYXRjaCgoZXJyb3I6IGFueSkgPT4gY29uc29sZS5lcnJvcihlcnJvcikpO1xuICpcbiAqIGBgYFxuICovXG5leHBvcnQgaW50ZXJmYWNlIFNwZWVjaFZvaWNlT3B0aW9ucyB7XG4gIGxhbmd1YWdlPzogc3RyaW5nO1xuICBwaXRjaD86IHN0cmluZztcbiAgdm9pY2U/OiBzdHJpbmc7XG59XG5AUGx1Z2luKFxuICB7XG4gICAgcGx1Z2luTmFtZTogXCJDb2duaXRpdmUgU2VydmljZXNcIixcbiAgICBwbHVnaW46IFwibWljcm9zb2Z0LXBsdWdpbi1jb2duaXRpdmVzZXJ2aWNlc1wiLFxuICAgIHBsdWdpblJlZjogXCJtaWNyb3NvZnQucGx1Z2luLmNvZ25pdGl2ZXNlcnZpY2VzXCIsXG4gICAgcmVwbzogJycsXG4gICAgcGxhdGZvcm1zOiBbJ2lPUycsICdhbmRyb2lkJ11cbiAgfVxuKSBcbkBJbmplY3RhYmxlKClcbmV4cG9ydCBjbGFzcyBDb2duaXRpdmVTZXJ2aWNlcyBleHRlbmRzIElvbmljTmF0aXZlUGx1Z2luIHtcblxuICAvKipcbiAgICogVGhpcyBmdW5jdGlvbiBkb2VzIHNvbWV0aGluZ1xuICAgKiBAcGFyYW0gYXJnMSB7c3RyaW5nfSBTb21lIHBhcmFtIHRvIGNvbmZpZ3VyZSBzb21ldGhpbmdcbiAgICogQHBhcmFtIGFyZzIge251bWJlcn0gQW5vdGhlciBwYXJhbSB0byBjb25maWd1cmUgc29tZXRoaW5nXG4gICAqIEByZXR1cm4ge1Byb21pc2U8YW55Pn0gUmV0dXJucyBhIHByb21pc2UgdGhhdCByZXNvbHZlcyB3aGVuIHNvbWV0aGluZyBoYXBwZW5zXG4gICAqL1xuICBAQ29yZG92YSgpXG4gIFNldFN1YnNjcmlwdGlvbihzcGVlY2hTdWJzY3JpcHRpb25LZXk6IHN0cmluZywgc2VydmljZVJlZ2lvbjogc3RyaW5nKTogUHJvbWlzZTx2b2lkPiB7IHJldHVybiB9XG5cbiAgQENvcmRvdmEoe1xuICAgIGNhbGxiYWNrT3JkZXI6ICdyZXZlcnNlJyxcbiAgICBvYnNlcnZhYmxlOiB0cnVlLFxuICB9KVxuICBSZWNvZ25pemVGcm9tTWljcm9waG9uZSgpOiBPYnNlcnZhYmxlPEFycmF5PE9iamVjdD4+IHsgcmV0dXJuIH1cblxuICBAQ29yZG92YSgpXG4gIFNwZWFrU3NtbChzcGVlY2hUZXh0OiBzdHJpbmcpOiBQcm9taXNlPHN0cmluZz4geyByZXR1cm4gfVxuXG4gIEBDb3Jkb3ZhKClcbiAgU3BlYWtTc21sQXN5bmMoc3BlZWNoVGV4dDogc3RyaW5nKTogUHJvbWlzZTxzdHJpbmc+IHsgcmV0dXJuIH1cblxuICBAQ29yZG92YSgpXG4gIFNwZWFrVGV4dChzcGVlY2hUZXh0OiBzdHJpbmcpOiBQcm9taXNlPHN0cmluZz4geyByZXR1cm4gfVxuXG4gIEBDb3Jkb3ZhKClcbiAgU3BlYWtUZXh0QXN5bmMoc3BlZWNoVGV4dDogc3RyaW5nKTogUHJvbWlzZTxzdHJpbmc+IHsgcmV0dXJuIH1cblxuICBAQ29yZG92YSgpXG4gIFN0b3BMaXN0ZW5pbmcoKTogUHJvbWlzZTx2b2lkPiB7IHJldHVybiB9XG5cbiAgQENvcmRvdmEoKVxuICBTcGVha1dpdGhWb2ljZU9wdGlvbnMoc3BlZWNoVGV4dDogc3RyaW5nLCBvcHRpb25zPzogU3BlZWNoVm9pY2VPcHRpb25zKTogUHJvbWlzZTx2b2lkPiB7IHJldHVybiB9XG4gICBcbn0iXX0=
\ No newline at end of file
diff --git a/cogservicesNative/ngx/index.metadata.json b/cogservicesNative/ngx/index.metadata.json
new file mode 100644
index 0000000..7bd32e5
--- /dev/null
+++ b/cogservicesNative/ngx/index.metadata.json
@@ -0,0 +1,42 @@
+[
+ {
+ "__symbolic": "module",
+ "version": 4,
+ "metadata": {
+ "SpeechVoiceOptions": { "__symbolic": "interface" },
+ "CognitiveServices": {
+ "__symbolic": "class",
+ "extends": {
+ "__symbolic": "reference",
+ "module": "@ionic-native/core",
+ "name": "IonicNativePlugin",
+ "line": 40,
+ "character": 39
+ },
+ "decorators": [
+ {
+ "__symbolic": "call",
+ "expression": {
+ "__symbolic": "reference",
+ "module": "@angular/core",
+ "name": "Injectable",
+ "line": 39,
+ "character": 1
+ }
+ }
+ ],
+ "members": {
+ "SetSubscription": [{ "__symbolic": "method" }],
+ "RecognizeFromMicrophone": [{ "__symbolic": "method" }],
+ "SpeakSsml": [{ "__symbolic": "method" }],
+ "SpeakSsmlAsync": [{ "__symbolic": "method" }],
+ "SpeakText": [{ "__symbolic": "method" }],
+ "SpeakTextAsync": [{ "__symbolic": "method" }],
+ "StopListening": [{ "__symbolic": "method" }],
+ "SpeakWithVoiceOptions": [{ "__symbolic": "method" }],
+ "SpeakStop": [{ "__symbolic": "method" }]
+ }
+ }
+ }
+ }
+]