├── .gitignore ├── .idea ├── .gitignore ├── flutter-sdk-bridge.iml ├── libraries │ ├── Dart_SDK.xml │ └── Flutter_Plugins.xml ├── misc.xml ├── modules.xml └── vcs.xml ├── .metadata ├── .vscode └── settings.json ├── ApplePayConfiguration.md ├── CHANGELOG.md ├── LICENSE ├── README.md ├── android ├── .gitignore ├── .idea │ ├── .gitignore │ ├── compiler.xml │ └── vcs.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── settings.gradle └── src │ └── main │ ├── AndroidManifest.xml │ └── java │ └── com │ └── paymentsdk │ └── flutter_paymentsdk_bridge │ └── FlutterPaytabsBridgePlugin.java ├── example ├── .gitignore ├── .metadata ├── README.md ├── android │ ├── .gitignore │ ├── app │ │ ├── build.gradle │ │ ├── proguard-rules.pro │ │ └── src │ │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ │ ├── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── paytabs │ │ │ │ │ └── flutter_paytabs_bridge_example │ │ │ │ │ └── MainActivity.java │ │ │ └── res │ │ │ │ ├── drawable │ │ │ │ └── launch_background.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ └── values │ │ │ │ └── styles.xml │ │ │ └── profile │ │ │ └── AndroidManifest.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ └── gradle-wrapper.properties │ └── settings.gradle ├── assets │ └── logo.png ├── ios │ ├── .gitignore │ ├── Flutter │ │ ├── AppFrameworkInfo.plist │ │ ├── Debug.xcconfig │ │ └── Release.xcconfig │ ├── Podfile │ ├── Podfile.lock │ ├── Runner.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ │ └── WorkspaceSettings.xcsettings │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ ├── Runner.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ ├── Runner │ │ ├── AppDelegate.swift │ │ ├── Assets.xcassets │ │ │ ├── AppIcon.appiconset │ │ │ │ ├── Contents.json │ │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ │ ├── Icon-App-20x20@1x.png │ │ │ │ ├── Icon-App-20x20@2x.png │ │ │ │ ├── Icon-App-20x20@3x.png │ │ │ │ ├── Icon-App-29x29@1x.png │ │ │ │ ├── Icon-App-29x29@2x.png │ │ │ │ ├── Icon-App-29x29@3x.png │ │ │ │ ├── Icon-App-40x40@1x.png │ │ │ │ ├── Icon-App-40x40@2x.png │ │ │ │ ├── Icon-App-40x40@3x.png │ │ │ │ ├── Icon-App-60x60@2x.png │ │ │ │ ├── Icon-App-60x60@3x.png │ │ │ │ ├── Icon-App-76x76@1x.png │ │ │ │ ├── Icon-App-76x76@2x.png │ │ │ │ └── Icon-App-83.5x83.5@2x.png │ │ │ └── LaunchImage.imageset │ │ │ │ ├── Contents.json │ │ │ │ ├── LaunchImage.png │ │ │ │ ├── LaunchImage@2x.png │ │ │ │ ├── LaunchImage@3x.png │ │ │ │ └── README.md │ │ ├── Base.lproj │ │ │ ├── LaunchScreen.storyboard │ │ │ └── Main.storyboard │ │ ├── Info.plist │ │ ├── Runner-Bridging-Header.h │ │ └── Runner.entitlements │ ├── node_modules │ │ ├── .bin │ │ │ └── shjs │ │ ├── .package-lock.json │ │ ├── balanced-match │ │ │ ├── .github │ │ │ │ └── FUNDING.yml │ │ │ ├── LICENSE.md │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── brace-expansion │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── concat-map │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.markdown │ │ │ ├── example │ │ │ │ └── map.js │ │ │ ├── index.js │ │ │ ├── package.json │ │ │ └── test │ │ │ │ └── map.js │ │ ├── fs.realpath │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ ├── old.js │ │ │ └── package.json │ │ ├── function-bind │ │ │ ├── .editorconfig │ │ │ ├── .eslintrc │ │ │ ├── .jscs.json │ │ │ ├── .npmignore │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── implementation.js │ │ │ ├── index.js │ │ │ ├── package.json │ │ │ └── test │ │ │ │ ├── .eslintrc │ │ │ │ └── index.js │ │ ├── glob │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── changelog.md │ │ │ ├── common.js │ │ │ ├── glob.js │ │ │ ├── package.json │ │ │ └── sync.js │ │ ├── has │ │ │ ├── LICENSE-MIT │ │ │ ├── README.md │ │ │ ├── package.json │ │ │ ├── src │ │ │ │ └── index.js │ │ │ └── test │ │ │ │ └── index.js │ │ ├── inflight │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── inflight.js │ │ │ └── package.json │ │ ├── inherits │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── inherits.js │ │ │ ├── inherits_browser.js │ │ │ └── package.json │ │ ├── interpret │ │ │ ├── CHANGELOG │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ ├── mjs-stub.js │ │ │ └── package.json │ │ ├── is-core-module │ │ │ ├── .eslintignore │ │ │ ├── .eslintrc │ │ │ ├── .nycrc │ │ │ ├── CHANGELOG.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── core.json │ │ │ ├── index.js │ │ │ ├── package.json │ │ │ └── test │ │ │ │ └── index.js │ │ ├── minimatch │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── minimatch.js │ │ │ └── package.json │ │ ├── once │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── once.js │ │ │ └── package.json │ │ ├── path-is-absolute │ │ │ ├── index.js │ │ │ ├── license │ │ │ ├── package.json │ │ │ └── readme.md │ │ ├── path-parse │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── rechoir │ │ │ ├── .npmignore │ │ │ ├── .travis.yml │ │ │ ├── CHANGELOG │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ ├── lib │ │ │ │ ├── extension.js │ │ │ │ ├── normalize.js │ │ │ │ └── register.js │ │ │ └── package.json │ │ ├── resolve │ │ │ ├── .editorconfig │ │ │ ├── .eslintignore │ │ │ ├── .eslintrc │ │ │ ├── LICENSE │ │ │ ├── SECURITY.md │ │ │ ├── appveyor.yml │ │ │ ├── example │ │ │ │ ├── async.js │ │ │ │ └── sync.js │ │ │ ├── index.js │ │ │ ├── lib │ │ │ │ ├── async.js │ │ │ │ ├── caller.js │ │ │ │ ├── core.js │ │ │ │ ├── core.json │ │ │ │ ├── is-core.js │ │ │ │ ├── node-modules-paths.js │ │ │ │ ├── normalize-options.js │ │ │ │ └── sync.js │ │ │ ├── package.json │ │ │ ├── readme.markdown │ │ │ └── test │ │ │ │ ├── .eslintrc │ │ │ │ ├── core.js │ │ │ │ ├── dotdot.js │ │ │ │ ├── dotdot │ │ │ │ ├── abc │ │ │ │ │ └── index.js │ │ │ │ └── index.js │ │ │ │ ├── faulty_basedir.js │ │ │ │ ├── filter.js │ │ │ │ ├── filter_sync.js │ │ │ │ ├── mock.js │ │ │ │ ├── mock_sync.js │ │ │ │ ├── module_dir.js │ │ │ │ ├── module_dir │ │ │ │ ├── xmodules │ │ │ │ │ └── aaa │ │ │ │ │ │ └── index.js │ │ │ │ ├── ymodules │ │ │ │ │ └── aaa │ │ │ │ │ │ └── index.js │ │ │ │ └── zmodules │ │ │ │ │ └── bbb │ │ │ │ │ ├── main.js │ │ │ │ │ └── package.json │ │ │ │ ├── node-modules-paths.js │ │ │ │ ├── node_path.js │ │ │ │ ├── node_path │ │ │ │ ├── x │ │ │ │ │ ├── aaa │ │ │ │ │ │ └── index.js │ │ │ │ │ └── ccc │ │ │ │ │ │ └── index.js │ │ │ │ └── y │ │ │ │ │ ├── bbb │ │ │ │ │ └── index.js │ │ │ │ │ └── ccc │ │ │ │ │ └── index.js │ │ │ │ ├── nonstring.js │ │ │ │ ├── pathfilter.js │ │ │ │ ├── pathfilter │ │ │ │ └── deep_ref │ │ │ │ │ └── main.js │ │ │ │ ├── precedence.js │ │ │ │ ├── precedence │ │ │ │ ├── aaa.js │ │ │ │ ├── aaa │ │ │ │ │ ├── index.js │ │ │ │ │ └── main.js │ │ │ │ ├── bbb.js │ │ │ │ └── bbb │ │ │ │ │ └── main.js │ │ │ │ ├── resolver.js │ │ │ │ ├── resolver │ │ │ │ ├── baz │ │ │ │ │ ├── doom.js │ │ │ │ │ ├── package.json │ │ │ │ │ └── quux.js │ │ │ │ ├── browser_field │ │ │ │ │ ├── a.js │ │ │ │ │ ├── b.js │ │ │ │ │ └── package.json │ │ │ │ ├── cup.coffee │ │ │ │ ├── dot_main │ │ │ │ │ ├── index.js │ │ │ │ │ └── package.json │ │ │ │ ├── dot_slash_main │ │ │ │ │ ├── index.js │ │ │ │ │ └── package.json │ │ │ │ ├── foo.js │ │ │ │ ├── incorrect_main │ │ │ │ │ ├── index.js │ │ │ │ │ └── package.json │ │ │ │ ├── invalid_main │ │ │ │ │ └── package.json │ │ │ │ ├── mug.coffee │ │ │ │ ├── mug.js │ │ │ │ ├── multirepo │ │ │ │ │ ├── lerna.json │ │ │ │ │ ├── package.json │ │ │ │ │ └── packages │ │ │ │ │ │ ├── package-a │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ └── package.json │ │ │ │ │ │ └── package-b │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ └── package.json │ │ │ │ ├── nested_symlinks │ │ │ │ │ └── mylib │ │ │ │ │ │ ├── async.js │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ └── sync.js │ │ │ │ ├── other_path │ │ │ │ │ ├── lib │ │ │ │ │ │ └── other-lib.js │ │ │ │ │ └── root.js │ │ │ │ ├── quux │ │ │ │ │ └── foo │ │ │ │ │ │ └── index.js │ │ │ │ ├── same_names │ │ │ │ │ ├── foo.js │ │ │ │ │ └── foo │ │ │ │ │ │ └── index.js │ │ │ │ ├── symlinked │ │ │ │ │ ├── _ │ │ │ │ │ │ ├── node_modules │ │ │ │ │ │ │ └── foo.js │ │ │ │ │ │ └── symlink_target │ │ │ │ │ │ │ └── .gitkeep │ │ │ │ │ └── package │ │ │ │ │ │ ├── bar.js │ │ │ │ │ │ └── package.json │ │ │ │ └── without_basedir │ │ │ │ │ └── main.js │ │ │ │ ├── resolver_sync.js │ │ │ │ ├── shadowed_core.js │ │ │ │ ├── shadowed_core │ │ │ │ └── node_modules │ │ │ │ │ └── util │ │ │ │ │ └── index.js │ │ │ │ ├── subdirs.js │ │ │ │ └── symlinks.js │ │ ├── shelljs │ │ │ ├── CHANGELOG.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── bin │ │ │ │ └── shjs │ │ │ ├── commands.js │ │ │ ├── global.js │ │ │ ├── make.js │ │ │ ├── package.json │ │ │ ├── plugin.js │ │ │ ├── shell.js │ │ │ └── src │ │ │ │ ├── cat.js │ │ │ │ ├── cd.js │ │ │ │ ├── chmod.js │ │ │ │ ├── common.js │ │ │ │ ├── cp.js │ │ │ │ ├── dirs.js │ │ │ │ ├── echo.js │ │ │ │ ├── error.js │ │ │ │ ├── exec-child.js │ │ │ │ ├── exec.js │ │ │ │ ├── find.js │ │ │ │ ├── grep.js │ │ │ │ ├── head.js │ │ │ │ ├── ln.js │ │ │ │ ├── ls.js │ │ │ │ ├── mkdir.js │ │ │ │ ├── mv.js │ │ │ │ ├── popd.js │ │ │ │ ├── pushd.js │ │ │ │ ├── pwd.js │ │ │ │ ├── rm.js │ │ │ │ ├── sed.js │ │ │ │ ├── set.js │ │ │ │ ├── sort.js │ │ │ │ ├── tail.js │ │ │ │ ├── tempdir.js │ │ │ │ ├── test.js │ │ │ │ ├── to.js │ │ │ │ ├── toEnd.js │ │ │ │ ├── touch.js │ │ │ │ ├── uniq.js │ │ │ │ └── which.js │ │ └── wrappy │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── package.json │ │ │ └── wrappy.js │ ├── package-lock.json │ └── package.json ├── lib │ └── main.dart ├── pubspec.lock ├── pubspec.yaml └── test │ └── widget_test.dart ├── flutter_paytabs_bridge.iml ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── ios ├── .gitignore ├── Assets │ └── .gitkeep ├── Classes │ ├── Constants.swift │ ├── FlutterPaymentSDKBridgePlugin.h │ ├── FlutterPaymentSDKBridgePlugin.m │ ├── SwiftFlutterPaytabsBridgePlugin.swift │ └── UIColor.swift └── flutter_paytabs_bridge.podspec ├── lib ├── BaseBillingShippingInfo.dart ├── IOSThemeConfiguration.dart ├── PaymentSDKCardApproval.dart ├── PaymentSDKCardDiscount.dart ├── PaymentSDKNetworks.dart ├── PaymentSDKQueryConfiguration.dart ├── PaymentSDKSavedCardInfo.dart ├── PaymentSdkApms.dart ├── PaymentSdkConfigurationDetails.dart ├── PaymentSdkLocale.dart ├── PaymentSdkTokenFormat.dart ├── PaymentSdkTokeniseType.dart ├── PaymentSdkTransactionClass.dart ├── PaymentSdkTransactionType.dart └── flutter_paytabs_bridge.dart ├── pubspec.lock ├── pubspec.yaml ├── test └── flutter_paytabs_bridge_test.dart └── theme_demo.png /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .dart_tool/ 3 | 4 | .packages 5 | .pub/ 6 | 7 | build/ 8 | android/.idea/.name 9 | android/.idea/gradle.xml 10 | android/.idea/jarRepositories.xml 11 | android/.idea/misc.xml 12 | android/.idea/modules.xml 13 | android/.idea/runConfigurations.xml 14 | android/.idea/caches/build_file_checksums.ser 15 | android/.idea/codeStyles/Project.xml 16 | -------------------------------------------------------------------------------- /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | # GitHub Copilot persisted chat sessions 5 | /copilot/chatSessions 6 | -------------------------------------------------------------------------------- /.idea/libraries/Dart_SDK.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /.idea/libraries/Flutter_Plugins.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 9 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: 216dee60c0cc9449f0b29bcf922974d612263e24 8 | channel: stable 9 | 10 | project_type: plugin 11 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "java.configuration.updateBuildConfiguration": "automatic" 3 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 PayTabs 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | -------------------------------------------------------------------------------- /android/.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | # GitHub Copilot persisted chat sessions 5 | /copilot/chatSessions 6 | -------------------------------------------------------------------------------- /android/.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /android/.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | group 'com.paymentsdk.flutter_paymentsdk_bridge' 2 | version '1.0' 3 | 4 | 5 | buildscript { 6 | repositories { 7 | google() 8 | jcenter() 9 | } 10 | 11 | dependencies { 12 | classpath 'com.android.tools.build:gradle:8.3.0' 13 | } 14 | } 15 | 16 | rootProject.allprojects { 17 | repositories { 18 | google() 19 | jcenter() 20 | maven { url 'https://jitpack.io' } 21 | } 22 | } 23 | 24 | apply plugin: 'com.android.library' 25 | 26 | android { 27 | compileSdk 34 28 | 29 | defaultConfig { 30 | minSdkVersion 21 31 | } 32 | lintOptions { 33 | disable 'InvalidPackage' 34 | } 35 | configurations.configureEach { 36 | resolutionStrategy { 37 | exclude group: "org.jetbrains.kotlinx", module: "kotlinx-coroutines-debug" 38 | } 39 | } 40 | namespace 'com.paymentsdk.flutter_paymentsdk_bridge' 41 | } 42 | 43 | dependencies { 44 | implementation 'com.paytabs:payment-sdk:6.7.0' 45 | } -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paytabscom/flutter-sdk-bridge/51f5d7ab5f6f7eed0ee7b1add9c902091ead5def/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'flutter_paytabs_bridge' 2 | -------------------------------------------------------------------------------- /android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | -------------------------------------------------------------------------------- /example/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | **/ios/Flutter/.last_build_id 26 | .dart_tool/ 27 | .flutter-plugins 28 | .flutter-plugins-dependencies 29 | .packages 30 | .pub-cache/ 31 | .pub/ 32 | /build/ 33 | 34 | # Web related 35 | lib/generated_plugin_registrant.dart 36 | 37 | # Symbolication related 38 | app.*.symbols 39 | 40 | # Obfuscation related 41 | app.*.map.json 42 | -------------------------------------------------------------------------------- /example/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: 78910062997c3a836feee883712c241a5fd22983 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /example/README.md: -------------------------------------------------------------------------------- 1 | # flutter_paytabs_bridge_example 2 | 3 | Demonstrates how to use the flutter_paytabs_bridge plugin. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Flutter application. 8 | 9 | A few resources to get you started if this is your first Flutter project: 10 | 11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) 12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) 13 | 14 | For help getting started with Flutter, view our 15 | [online documentation](https://flutter.dev/docs), which offers tutorials, 16 | samples, guidance on mobile development, and a full API reference. 17 | -------------------------------------------------------------------------------- /example/android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | -------------------------------------------------------------------------------- /example/android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 26 | 27 | android { 28 | compileSdk 34 29 | 30 | 31 | defaultConfig { 32 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 33 | applicationId "com.paytabs.flutter_paytabs_bridge_example" 34 | minSdkVersion 21 35 | targetSdkVersion 34 36 | versionCode flutterVersionCode.toInteger() 37 | versionName flutterVersionName 38 | } 39 | 40 | buildTypes { 41 | release { 42 | // TODO: Add your own signing config for the release build. 43 | // Signing with the debug keys for now, so `flutter run --release` works. 44 | signingConfig signingConfigs.debug 45 | } 46 | } 47 | namespace 'com.paytabs.flutter_paytabs_bridge_example' 48 | lint { 49 | disable 'InvalidPackage' 50 | } 51 | } 52 | 53 | flutter { 54 | source '../..' 55 | } 56 | -------------------------------------------------------------------------------- /example/android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | -keep public class com.payment.paymentsdk.**{ 2 | public protected private *; 3 | } 4 | -dontwarn kotlinx.android.parcel.** 5 | -dontwarn kotlinx.parcelize.** -------------------------------------------------------------------------------- /example/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /example/android/app/src/main/java/com/paytabs/flutter_paytabs_bridge_example/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.paytabs.flutter_paytabs_bridge_example; 2 | 3 | import io.flutter.embedding.android.FlutterActivity; 4 | 5 | public class MainActivity extends FlutterActivity { 6 | } 7 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paytabscom/flutter-sdk-bridge/51f5d7ab5f6f7eed0ee7b1add9c902091ead5def/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paytabscom/flutter-sdk-bridge/51f5d7ab5f6f7eed0ee7b1add9c902091ead5def/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paytabscom/flutter-sdk-bridge/51f5d7ab5f6f7eed0ee7b1add9c902091ead5def/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paytabscom/flutter-sdk-bridge/51f5d7ab5f6f7eed0ee7b1add9c902091ead5def/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paytabscom/flutter-sdk-bridge/51f5d7ab5f6f7eed0ee7b1add9c902091ead5def/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /example/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /example/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.9.24' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:8.4.0' 10 | } 11 | } 12 | 13 | allprojects { 14 | repositories { 15 | google() 16 | mavenCentral() 17 | } 18 | } 19 | 20 | rootProject.buildDir = '../build' 21 | subprojects { 22 | project.buildDir = "${rootProject.buildDir}/${project.name}" 23 | } 24 | subprojects { 25 | project.evaluationDependsOn(':app') 26 | } 27 | 28 | tasks.register("clean", Delete) { 29 | delete rootProject.buildDir 30 | } 31 | -------------------------------------------------------------------------------- /example/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | android.defaults.buildfeatures.buildconfig=true 5 | android.nonTransitiveRClass=false 6 | android.nonFinalResIds=false 7 | -------------------------------------------------------------------------------- /example/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Tue Mar 23 19:26:19 EET 2021 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip 7 | -------------------------------------------------------------------------------- /example/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 3 | def properties = new Properties() 4 | 5 | assert localPropertiesFile.exists() 6 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 7 | 8 | def flutterSdkPath = properties.getProperty("flutter.sdk") 9 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 10 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 11 | -------------------------------------------------------------------------------- /example/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paytabscom/flutter-sdk-bridge/51f5d7ab5f6f7eed0ee7b1add9c902091ead5def/example/assets/logo.png -------------------------------------------------------------------------------- /example/ios/.gitignore: -------------------------------------------------------------------------------- 1 | *.mode1v3 2 | *.mode2v3 3 | *.moved-aside 4 | *.pbxuser 5 | *.perspectivev3 6 | **/*sync/ 7 | .sconsign.dblite 8 | .tags* 9 | **/.vagrant/ 10 | **/DerivedData/ 11 | Icon? 12 | **/Pods/ 13 | **/.symlinks/ 14 | profile 15 | xcuserdata 16 | **/.generated/ 17 | Flutter/App.framework 18 | Flutter/Flutter.framework 19 | Flutter/Flutter.podspec 20 | Flutter/Generated.xcconfig 21 | Flutter/app.flx 22 | Flutter/app.zip 23 | Flutter/flutter_assets/ 24 | Flutter/flutter_export_environment.sh 25 | ServiceDefinitions.json 26 | Runner/GeneratedPluginRegistrant.* 27 | 28 | # Exceptions to above rules. 29 | !default.mode1v3 30 | !default.mode2v3 31 | !default.pbxuser 32 | !default.perspectivev3 33 | -------------------------------------------------------------------------------- /example/ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 12.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /example/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /example/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /example/ios/Podfile: -------------------------------------------------------------------------------- 1 | source 'https://github.com/CocoaPods/Specs' 2 | # Uncomment this line to define a global platform for your project 3 | platform :ios, '12.0' 4 | 5 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 6 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 7 | 8 | project 'Runner', { 9 | 'Debug' => :debug, 10 | 'Profile' => :release, 11 | 'Release' => :release, 12 | } 13 | 14 | def flutter_root 15 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) 16 | unless File.exist?(generated_xcode_build_settings_path) 17 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" 18 | end 19 | 20 | File.foreach(generated_xcode_build_settings_path) do |line| 21 | matches = line.match(/FLUTTER_ROOT\=(.*)/) 22 | return matches[1].strip if matches 23 | end 24 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" 25 | end 26 | 27 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 28 | 29 | flutter_ios_podfile_setup 30 | 31 | target 'Runner' do 32 | use_frameworks! 33 | use_modular_headers! 34 | 35 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) 36 | end 37 | 38 | post_install do |installer| 39 | installer.pods_project.targets.each do |target| 40 | flutter_additional_ios_build_settings(target) 41 | target.build_configurations.each do |config| 42 | config.build_settings['ENABLE_BITCODE'] = 'NO' 43 | end 44 | end 45 | end 46 | -------------------------------------------------------------------------------- /example/ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Flutter (1.0.0) 3 | - flutter_paytabs_bridge (2.4.0): 4 | - Flutter 5 | - PayTabsSDK (= 6.6.20) 6 | - path_provider_foundation (0.0.1): 7 | - Flutter 8 | - FlutterMacOS 9 | - PayTabsSDK (6.6.20) 10 | 11 | DEPENDENCIES: 12 | - Flutter (from `Flutter`) 13 | - flutter_paytabs_bridge (from `.symlinks/plugins/flutter_paytabs_bridge/ios`) 14 | - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`) 15 | 16 | SPEC REPOS: 17 | https://github.com/CocoaPods/Specs: 18 | - PayTabsSDK 19 | 20 | EXTERNAL SOURCES: 21 | Flutter: 22 | :path: Flutter 23 | flutter_paytabs_bridge: 24 | :path: ".symlinks/plugins/flutter_paytabs_bridge/ios" 25 | path_provider_foundation: 26 | :path: ".symlinks/plugins/path_provider_foundation/darwin" 27 | 28 | SPEC CHECKSUMS: 29 | Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 30 | flutter_paytabs_bridge: 88d3bcb3ddc09b0593cd17465d0a9116a3960d40 31 | path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46 32 | PayTabsSDK: da92d5a9804886f3ab9b82f658870a7706de6298 33 | 34 | PODFILE CHECKSUM: 30e530dca029506e89ebfe0cc8965d34306c559c 35 | 36 | COCOAPODS: 1.15.2 37 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paytabscom/flutter-sdk-bridge/51f5d7ab5f6f7eed0ee7b1add9c902091ead5def/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paytabscom/flutter-sdk-bridge/51f5d7ab5f6f7eed0ee7b1add9c902091ead5def/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paytabscom/flutter-sdk-bridge/51f5d7ab5f6f7eed0ee7b1add9c902091ead5def/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paytabscom/flutter-sdk-bridge/51f5d7ab5f6f7eed0ee7b1add9c902091ead5def/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paytabscom/flutter-sdk-bridge/51f5d7ab5f6f7eed0ee7b1add9c902091ead5def/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paytabscom/flutter-sdk-bridge/51f5d7ab5f6f7eed0ee7b1add9c902091ead5def/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paytabscom/flutter-sdk-bridge/51f5d7ab5f6f7eed0ee7b1add9c902091ead5def/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paytabscom/flutter-sdk-bridge/51f5d7ab5f6f7eed0ee7b1add9c902091ead5def/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paytabscom/flutter-sdk-bridge/51f5d7ab5f6f7eed0ee7b1add9c902091ead5def/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paytabscom/flutter-sdk-bridge/51f5d7ab5f6f7eed0ee7b1add9c902091ead5def/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paytabscom/flutter-sdk-bridge/51f5d7ab5f6f7eed0ee7b1add9c902091ead5def/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paytabscom/flutter-sdk-bridge/51f5d7ab5f6f7eed0ee7b1add9c902091ead5def/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paytabscom/flutter-sdk-bridge/51f5d7ab5f6f7eed0ee7b1add9c902091ead5def/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paytabscom/flutter-sdk-bridge/51f5d7ab5f6f7eed0ee7b1add9c902091ead5def/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paytabscom/flutter-sdk-bridge/51f5d7ab5f6f7eed0ee7b1add9c902091ead5def/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paytabscom/flutter-sdk-bridge/51f5d7ab5f6f7eed0ee7b1add9c902091ead5def/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paytabscom/flutter-sdk-bridge/51f5d7ab5f6f7eed0ee7b1add9c902091ead5def/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paytabscom/flutter-sdk-bridge/51f5d7ab5f6f7eed0ee7b1add9c902091ead5def/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /example/ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /example/ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CADisableMinimumFrameDurationOnPhone 6 | 7 | CFBundleDevelopmentRegion 8 | $(DEVELOPMENT_LANGUAGE) 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | flutter_paytabs_bridge_example 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | $(FLUTTER_BUILD_NUMBER) 25 | LSRequiresIPhoneOS 26 | 27 | NSCameraUsageDescription 28 | to scan your cards 29 | NSPhotoLibraryUsageDescription 30 | Get Logo From Assets 31 | UIApplicationSupportsIndirectInputEvents 32 | 33 | UILaunchStoryboardName 34 | LaunchScreen 35 | UIMainStoryboardFile 36 | Main 37 | UISupportedInterfaceOrientations 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationLandscapeLeft 41 | UIInterfaceOrientationLandscapeRight 42 | 43 | UISupportedInterfaceOrientations~ipad 44 | 45 | UIInterfaceOrientationPortrait 46 | UIInterfaceOrientationPortraitUpsideDown 47 | UIInterfaceOrientationLandscapeLeft 48 | UIInterfaceOrientationLandscapeRight 49 | 50 | UIViewControllerBasedStatusBarAppearance 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /example/ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /example/ios/Runner/Runner.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /example/ios/node_modules/.bin/shjs: -------------------------------------------------------------------------------- 1 | ../shelljs/bin/shjs -------------------------------------------------------------------------------- /example/ios/node_modules/balanced-match/.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | tidelift: "npm/balanced-match" 2 | patreon: juliangruber 3 | -------------------------------------------------------------------------------- /example/ios/node_modules/balanced-match/LICENSE.md: -------------------------------------------------------------------------------- 1 | (MIT) 2 | 3 | Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 9 | of the Software, and to permit persons to whom the Software is furnished to do 10 | so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /example/ios/node_modules/balanced-match/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | module.exports = balanced; 3 | function balanced(a, b, str) { 4 | if (a instanceof RegExp) a = maybeMatch(a, str); 5 | if (b instanceof RegExp) b = maybeMatch(b, str); 6 | 7 | var r = range(a, b, str); 8 | 9 | return r && { 10 | start: r[0], 11 | end: r[1], 12 | pre: str.slice(0, r[0]), 13 | body: str.slice(r[0] + a.length, r[1]), 14 | post: str.slice(r[1] + b.length) 15 | }; 16 | } 17 | 18 | function maybeMatch(reg, str) { 19 | var m = str.match(reg); 20 | return m ? m[0] : null; 21 | } 22 | 23 | balanced.range = range; 24 | function range(a, b, str) { 25 | var begs, beg, left, right, result; 26 | var ai = str.indexOf(a); 27 | var bi = str.indexOf(b, ai + 1); 28 | var i = ai; 29 | 30 | if (ai >= 0 && bi > 0) { 31 | if(a===b) { 32 | return [ai, bi]; 33 | } 34 | begs = []; 35 | left = str.length; 36 | 37 | while (i >= 0 && !result) { 38 | if (i == ai) { 39 | begs.push(i); 40 | ai = str.indexOf(a, i + 1); 41 | } else if (begs.length == 1) { 42 | result = [ begs.pop(), bi ]; 43 | } else { 44 | beg = begs.pop(); 45 | if (beg < left) { 46 | left = beg; 47 | right = bi; 48 | } 49 | 50 | bi = str.indexOf(b, i + 1); 51 | } 52 | 53 | i = ai < bi && ai >= 0 ? ai : bi; 54 | } 55 | 56 | if (begs.length) { 57 | result = [ left, right ]; 58 | } 59 | } 60 | 61 | return result; 62 | } 63 | -------------------------------------------------------------------------------- /example/ios/node_modules/balanced-match/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "balanced-match", 3 | "description": "Match balanced character pairs, like \"{\" and \"}\"", 4 | "version": "1.0.2", 5 | "repository": { 6 | "type": "git", 7 | "url": "git://github.com/juliangruber/balanced-match.git" 8 | }, 9 | "homepage": "https://github.com/juliangruber/balanced-match", 10 | "main": "index.js", 11 | "scripts": { 12 | "test": "tape test/test.js", 13 | "bench": "matcha test/bench.js" 14 | }, 15 | "devDependencies": { 16 | "matcha": "^0.7.0", 17 | "tape": "^4.6.0" 18 | }, 19 | "keywords": [ 20 | "match", 21 | "regexp", 22 | "test", 23 | "balanced", 24 | "parse" 25 | ], 26 | "author": { 27 | "name": "Julian Gruber", 28 | "email": "mail@juliangruber.com", 29 | "url": "http://juliangruber.com" 30 | }, 31 | "license": "MIT", 32 | "testling": { 33 | "files": "test/*.js", 34 | "browsers": [ 35 | "ie/8..latest", 36 | "firefox/20..latest", 37 | "firefox/nightly", 38 | "chrome/25..latest", 39 | "chrome/canary", 40 | "opera/12..latest", 41 | "opera/next", 42 | "safari/5.1..latest", 43 | "ipad/6.0..latest", 44 | "iphone/6.0..latest", 45 | "android-browser/4.2..latest" 46 | ] 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /example/ios/node_modules/brace-expansion/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2013 Julian Gruber 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /example/ios/node_modules/brace-expansion/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "brace-expansion", 3 | "description": "Brace expansion as known from sh/bash", 4 | "version": "1.1.11", 5 | "repository": { 6 | "type": "git", 7 | "url": "git://github.com/juliangruber/brace-expansion.git" 8 | }, 9 | "homepage": "https://github.com/juliangruber/brace-expansion", 10 | "main": "index.js", 11 | "scripts": { 12 | "test": "tape test/*.js", 13 | "gentest": "bash test/generate.sh", 14 | "bench": "matcha test/perf/bench.js" 15 | }, 16 | "dependencies": { 17 | "balanced-match": "^1.0.0", 18 | "concat-map": "0.0.1" 19 | }, 20 | "devDependencies": { 21 | "matcha": "^0.7.0", 22 | "tape": "^4.6.0" 23 | }, 24 | "keywords": [], 25 | "author": { 26 | "name": "Julian Gruber", 27 | "email": "mail@juliangruber.com", 28 | "url": "http://juliangruber.com" 29 | }, 30 | "license": "MIT", 31 | "testling": { 32 | "files": "test/*.js", 33 | "browsers": [ 34 | "ie/8..latest", 35 | "firefox/20..latest", 36 | "firefox/nightly", 37 | "chrome/25..latest", 38 | "chrome/canary", 39 | "opera/12..latest", 40 | "opera/next", 41 | "safari/5.1..latest", 42 | "ipad/6.0..latest", 43 | "iphone/6.0..latest", 44 | "android-browser/4.2..latest" 45 | ] 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /example/ios/node_modules/concat-map/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.4 4 | - 0.6 5 | -------------------------------------------------------------------------------- /example/ios/node_modules/concat-map/LICENSE: -------------------------------------------------------------------------------- 1 | This software is released under the MIT license: 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /example/ios/node_modules/concat-map/README.markdown: -------------------------------------------------------------------------------- 1 | concat-map 2 | ========== 3 | 4 | Concatenative mapdashery. 5 | 6 | [![browser support](http://ci.testling.com/substack/node-concat-map.png)](http://ci.testling.com/substack/node-concat-map) 7 | 8 | [![build status](https://secure.travis-ci.org/substack/node-concat-map.png)](http://travis-ci.org/substack/node-concat-map) 9 | 10 | example 11 | ======= 12 | 13 | ``` js 14 | var concatMap = require('concat-map'); 15 | var xs = [ 1, 2, 3, 4, 5, 6 ]; 16 | var ys = concatMap(xs, function (x) { 17 | return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; 18 | }); 19 | console.dir(ys); 20 | ``` 21 | 22 | *** 23 | 24 | ``` 25 | [ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ] 26 | ``` 27 | 28 | methods 29 | ======= 30 | 31 | ``` js 32 | var concatMap = require('concat-map') 33 | ``` 34 | 35 | concatMap(xs, fn) 36 | ----------------- 37 | 38 | Return an array of concatenated elements by calling `fn(x, i)` for each element 39 | `x` and each index `i` in the array `xs`. 40 | 41 | When `fn(x, i)` returns an array, its result will be concatenated with the 42 | result array. If `fn(x, i)` returns anything else, that value will be pushed 43 | onto the end of the result array. 44 | 45 | install 46 | ======= 47 | 48 | With [npm](http://npmjs.org) do: 49 | 50 | ``` 51 | npm install concat-map 52 | ``` 53 | 54 | license 55 | ======= 56 | 57 | MIT 58 | 59 | notes 60 | ===== 61 | 62 | This module was written while sitting high above the ground in a tree. 63 | -------------------------------------------------------------------------------- /example/ios/node_modules/concat-map/example/map.js: -------------------------------------------------------------------------------- 1 | var concatMap = require('../'); 2 | var xs = [ 1, 2, 3, 4, 5, 6 ]; 3 | var ys = concatMap(xs, function (x) { 4 | return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; 5 | }); 6 | console.dir(ys); 7 | -------------------------------------------------------------------------------- /example/ios/node_modules/concat-map/index.js: -------------------------------------------------------------------------------- 1 | module.exports = function (xs, fn) { 2 | var res = []; 3 | for (var i = 0; i < xs.length; i++) { 4 | var x = fn(xs[i], i); 5 | if (isArray(x)) res.push.apply(res, x); 6 | else res.push(x); 7 | } 8 | return res; 9 | }; 10 | 11 | var isArray = Array.isArray || function (xs) { 12 | return Object.prototype.toString.call(xs) === '[object Array]'; 13 | }; 14 | -------------------------------------------------------------------------------- /example/ios/node_modules/concat-map/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "concat-map", 3 | "description" : "concatenative mapdashery", 4 | "version" : "0.0.1", 5 | "repository" : { 6 | "type" : "git", 7 | "url" : "git://github.com/substack/node-concat-map.git" 8 | }, 9 | "main" : "index.js", 10 | "keywords" : [ 11 | "concat", 12 | "concatMap", 13 | "map", 14 | "functional", 15 | "higher-order" 16 | ], 17 | "directories" : { 18 | "example" : "example", 19 | "test" : "test" 20 | }, 21 | "scripts" : { 22 | "test" : "tape test/*.js" 23 | }, 24 | "devDependencies" : { 25 | "tape" : "~2.4.0" 26 | }, 27 | "license" : "MIT", 28 | "author" : { 29 | "name" : "James Halliday", 30 | "email" : "mail@substack.net", 31 | "url" : "http://substack.net" 32 | }, 33 | "testling" : { 34 | "files" : "test/*.js", 35 | "browsers" : { 36 | "ie" : [ 6, 7, 8, 9 ], 37 | "ff" : [ 3.5, 10, 15.0 ], 38 | "chrome" : [ 10, 22 ], 39 | "safari" : [ 5.1 ], 40 | "opera" : [ 12 ] 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /example/ios/node_modules/concat-map/test/map.js: -------------------------------------------------------------------------------- 1 | var concatMap = require('../'); 2 | var test = require('tape'); 3 | 4 | test('empty or not', function (t) { 5 | var xs = [ 1, 2, 3, 4, 5, 6 ]; 6 | var ixes = []; 7 | var ys = concatMap(xs, function (x, ix) { 8 | ixes.push(ix); 9 | return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; 10 | }); 11 | t.same(ys, [ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ]); 12 | t.same(ixes, [ 0, 1, 2, 3, 4, 5 ]); 13 | t.end(); 14 | }); 15 | 16 | test('always something', function (t) { 17 | var xs = [ 'a', 'b', 'c', 'd' ]; 18 | var ys = concatMap(xs, function (x) { 19 | return x === 'b' ? [ 'B', 'B', 'B' ] : [ x ]; 20 | }); 21 | t.same(ys, [ 'a', 'B', 'B', 'B', 'c', 'd' ]); 22 | t.end(); 23 | }); 24 | 25 | test('scalars', function (t) { 26 | var xs = [ 'a', 'b', 'c', 'd' ]; 27 | var ys = concatMap(xs, function (x) { 28 | return x === 'b' ? [ 'B', 'B', 'B' ] : x; 29 | }); 30 | t.same(ys, [ 'a', 'B', 'B', 'B', 'c', 'd' ]); 31 | t.end(); 32 | }); 33 | 34 | test('undefs', function (t) { 35 | var xs = [ 'a', 'b', 'c', 'd' ]; 36 | var ys = concatMap(xs, function () {}); 37 | t.same(ys, [ undefined, undefined, undefined, undefined ]); 38 | t.end(); 39 | }); 40 | -------------------------------------------------------------------------------- /example/ios/node_modules/fs.realpath/README.md: -------------------------------------------------------------------------------- 1 | # fs.realpath 2 | 3 | A backwards-compatible fs.realpath for Node v6 and above 4 | 5 | In Node v6, the JavaScript implementation of fs.realpath was replaced 6 | with a faster (but less resilient) native implementation. That raises 7 | new and platform-specific errors and cannot handle long or excessively 8 | symlink-looping paths. 9 | 10 | This module handles those cases by detecting the new errors and 11 | falling back to the JavaScript implementation. On versions of Node 12 | prior to v6, it has no effect. 13 | 14 | ## USAGE 15 | 16 | ```js 17 | var rp = require('fs.realpath') 18 | 19 | // async version 20 | rp.realpath(someLongAndLoopingPath, function (er, real) { 21 | // the ELOOP was handled, but it was a bit slower 22 | }) 23 | 24 | // sync version 25 | var real = rp.realpathSync(someLongAndLoopingPath) 26 | 27 | // monkeypatch at your own risk! 28 | // This replaces the fs.realpath/fs.realpathSync builtins 29 | rp.monkeypatch() 30 | 31 | // un-do the monkeypatching 32 | rp.unmonkeypatch() 33 | ``` 34 | -------------------------------------------------------------------------------- /example/ios/node_modules/fs.realpath/index.js: -------------------------------------------------------------------------------- 1 | module.exports = realpath 2 | realpath.realpath = realpath 3 | realpath.sync = realpathSync 4 | realpath.realpathSync = realpathSync 5 | realpath.monkeypatch = monkeypatch 6 | realpath.unmonkeypatch = unmonkeypatch 7 | 8 | var fs = require('fs') 9 | var origRealpath = fs.realpath 10 | var origRealpathSync = fs.realpathSync 11 | 12 | var version = process.version 13 | var ok = /^v[0-5]\./.test(version) 14 | var old = require('./old.js') 15 | 16 | function newError (er) { 17 | return er && er.syscall === 'realpath' && ( 18 | er.code === 'ELOOP' || 19 | er.code === 'ENOMEM' || 20 | er.code === 'ENAMETOOLONG' 21 | ) 22 | } 23 | 24 | function realpath (p, cache, cb) { 25 | if (ok) { 26 | return origRealpath(p, cache, cb) 27 | } 28 | 29 | if (typeof cache === 'function') { 30 | cb = cache 31 | cache = null 32 | } 33 | origRealpath(p, cache, function (er, result) { 34 | if (newError(er)) { 35 | old.realpath(p, cache, cb) 36 | } else { 37 | cb(er, result) 38 | } 39 | }) 40 | } 41 | 42 | function realpathSync (p, cache) { 43 | if (ok) { 44 | return origRealpathSync(p, cache) 45 | } 46 | 47 | try { 48 | return origRealpathSync(p, cache) 49 | } catch (er) { 50 | if (newError(er)) { 51 | return old.realpathSync(p, cache) 52 | } else { 53 | throw er 54 | } 55 | } 56 | } 57 | 58 | function monkeypatch () { 59 | fs.realpath = realpath 60 | fs.realpathSync = realpathSync 61 | } 62 | 63 | function unmonkeypatch () { 64 | fs.realpath = origRealpath 65 | fs.realpathSync = origRealpathSync 66 | } 67 | -------------------------------------------------------------------------------- /example/ios/node_modules/fs.realpath/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "fs.realpath", 3 | "version": "1.0.0", 4 | "description": "Use node's fs.realpath, but fall back to the JS implementation if the native one fails", 5 | "main": "index.js", 6 | "dependencies": {}, 7 | "devDependencies": {}, 8 | "scripts": { 9 | "test": "tap test/*.js --cov" 10 | }, 11 | "repository": { 12 | "type": "git", 13 | "url": "git+https://github.com/isaacs/fs.realpath.git" 14 | }, 15 | "keywords": [ 16 | "realpath", 17 | "fs", 18 | "polyfill" 19 | ], 20 | "author": "Isaac Z. Schlueter (http://blog.izs.me/)", 21 | "license": "ISC", 22 | "files": [ 23 | "old.js", 24 | "index.js" 25 | ] 26 | } 27 | -------------------------------------------------------------------------------- /example/ios/node_modules/function-bind/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = tab 5 | indent_size = 4 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | max_line_length = 120 11 | 12 | [CHANGELOG.md] 13 | indent_style = space 14 | indent_size = 2 15 | 16 | [*.json] 17 | max_line_length = off 18 | 19 | [Makefile] 20 | max_line_length = off 21 | -------------------------------------------------------------------------------- /example/ios/node_modules/function-bind/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | 4 | "extends": "@ljharb", 5 | 6 | "rules": { 7 | "func-name-matching": 0, 8 | "indent": [2, 4], 9 | "max-nested-callbacks": [2, 3], 10 | "max-params": [2, 3], 11 | "max-statements": [2, 20], 12 | "no-new-func": [1], 13 | "strict": [0] 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /example/ios/node_modules/function-bind/.npmignore: -------------------------------------------------------------------------------- 1 | # gitignore 2 | .DS_Store 3 | .monitor 4 | .*.swp 5 | .nodemonignore 6 | releases 7 | *.log 8 | *.err 9 | fleet.json 10 | public/browserify 11 | bin/*.json 12 | .bin 13 | build 14 | compile 15 | .lock-wscript 16 | coverage 17 | node_modules 18 | 19 | # Only apps should have lockfiles 20 | npm-shrinkwrap.json 21 | package-lock.json 22 | yarn.lock 23 | -------------------------------------------------------------------------------- /example/ios/node_modules/function-bind/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013 Raynos. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | 21 | -------------------------------------------------------------------------------- /example/ios/node_modules/function-bind/README.md: -------------------------------------------------------------------------------- 1 | # function-bind 2 | 3 | 11 | 12 | 13 | 14 | Implementation of function.prototype.bind 15 | 16 | ## Example 17 | 18 | I mainly do this for unit tests I run on phantomjs. 19 | PhantomJS does not have Function.prototype.bind :( 20 | 21 | ```js 22 | Function.prototype.bind = require("function-bind") 23 | ``` 24 | 25 | ## Installation 26 | 27 | `npm install function-bind` 28 | 29 | ## Contributors 30 | 31 | - Raynos 32 | 33 | ## MIT Licenced 34 | 35 | [travis-svg]: https://travis-ci.org/Raynos/function-bind.svg 36 | [travis-url]: https://travis-ci.org/Raynos/function-bind 37 | [npm-badge-svg]: https://badge.fury.io/js/function-bind.svg 38 | [npm-url]: https://npmjs.org/package/function-bind 39 | [5]: https://coveralls.io/repos/Raynos/function-bind/badge.png 40 | [6]: https://coveralls.io/r/Raynos/function-bind 41 | [7]: https://gemnasium.com/Raynos/function-bind.png 42 | [8]: https://gemnasium.com/Raynos/function-bind 43 | [deps-svg]: https://david-dm.org/Raynos/function-bind.svg 44 | [deps-url]: https://david-dm.org/Raynos/function-bind 45 | [dev-deps-svg]: https://david-dm.org/Raynos/function-bind/dev-status.svg 46 | [dev-deps-url]: https://david-dm.org/Raynos/function-bind#info=devDependencies 47 | [11]: https://ci.testling.com/Raynos/function-bind.png 48 | [12]: https://ci.testling.com/Raynos/function-bind 49 | -------------------------------------------------------------------------------- /example/ios/node_modules/function-bind/implementation.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /* eslint no-invalid-this: 1 */ 4 | 5 | var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; 6 | var slice = Array.prototype.slice; 7 | var toStr = Object.prototype.toString; 8 | var funcType = '[object Function]'; 9 | 10 | module.exports = function bind(that) { 11 | var target = this; 12 | if (typeof target !== 'function' || toStr.call(target) !== funcType) { 13 | throw new TypeError(ERROR_MESSAGE + target); 14 | } 15 | var args = slice.call(arguments, 1); 16 | 17 | var bound; 18 | var binder = function () { 19 | if (this instanceof bound) { 20 | var result = target.apply( 21 | this, 22 | args.concat(slice.call(arguments)) 23 | ); 24 | if (Object(result) === result) { 25 | return result; 26 | } 27 | return this; 28 | } else { 29 | return target.apply( 30 | that, 31 | args.concat(slice.call(arguments)) 32 | ); 33 | } 34 | }; 35 | 36 | var boundLength = Math.max(0, target.length - args.length); 37 | var boundArgs = []; 38 | for (var i = 0; i < boundLength; i++) { 39 | boundArgs.push('$' + i); 40 | } 41 | 42 | bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder); 43 | 44 | if (target.prototype) { 45 | var Empty = function Empty() {}; 46 | Empty.prototype = target.prototype; 47 | bound.prototype = new Empty(); 48 | Empty.prototype = null; 49 | } 50 | 51 | return bound; 52 | }; 53 | -------------------------------------------------------------------------------- /example/ios/node_modules/function-bind/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var implementation = require('./implementation'); 4 | 5 | module.exports = Function.prototype.bind || implementation; 6 | -------------------------------------------------------------------------------- /example/ios/node_modules/function-bind/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "function-bind", 3 | "version": "1.1.1", 4 | "description": "Implementation of Function.prototype.bind", 5 | "keywords": [ 6 | "function", 7 | "bind", 8 | "shim", 9 | "es5" 10 | ], 11 | "author": "Raynos ", 12 | "repository": "git://github.com/Raynos/function-bind.git", 13 | "main": "index", 14 | "homepage": "https://github.com/Raynos/function-bind", 15 | "contributors": [ 16 | { 17 | "name": "Raynos" 18 | }, 19 | { 20 | "name": "Jordan Harband", 21 | "url": "https://github.com/ljharb" 22 | } 23 | ], 24 | "bugs": { 25 | "url": "https://github.com/Raynos/function-bind/issues", 26 | "email": "raynos2@gmail.com" 27 | }, 28 | "dependencies": {}, 29 | "devDependencies": { 30 | "@ljharb/eslint-config": "^12.2.1", 31 | "covert": "^1.1.0", 32 | "eslint": "^4.5.0", 33 | "jscs": "^3.0.7", 34 | "tape": "^4.8.0" 35 | }, 36 | "license": "MIT", 37 | "scripts": { 38 | "pretest": "npm run lint", 39 | "test": "npm run tests-only", 40 | "posttest": "npm run coverage -- --quiet", 41 | "tests-only": "node test", 42 | "coverage": "covert test/*.js", 43 | "lint": "npm run jscs && npm run eslint", 44 | "jscs": "jscs *.js */*.js", 45 | "eslint": "eslint *.js */*.js" 46 | }, 47 | "testling": { 48 | "files": "test/index.js", 49 | "browsers": [ 50 | "ie/8..latest", 51 | "firefox/16..latest", 52 | "firefox/nightly", 53 | "chrome/22..latest", 54 | "chrome/canary", 55 | "opera/12..latest", 56 | "opera/next", 57 | "safari/5.1..latest", 58 | "ipad/6.0..latest", 59 | "iphone/6.0..latest", 60 | "android-browser/4.2..latest" 61 | ] 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /example/ios/node_modules/function-bind/test/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "array-bracket-newline": 0, 4 | "array-element-newline": 0, 5 | "max-statements-per-line": [2, { "max": 2 }], 6 | "no-invalid-this": 0, 7 | "no-magic-numbers": 0, 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /example/ios/node_modules/glob/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) Isaac Z. Schlueter and Contributors 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 15 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | 17 | ## Glob Logo 18 | 19 | Glob's logo created by Tanya Brassie , licensed 20 | under a Creative Commons Attribution-ShareAlike 4.0 International License 21 | https://creativecommons.org/licenses/by-sa/4.0/ 22 | -------------------------------------------------------------------------------- /example/ios/node_modules/glob/changelog.md: -------------------------------------------------------------------------------- 1 | ## 7.0 2 | 3 | - Raise error if `options.cwd` is specified, and not a directory 4 | 5 | ## 6.0 6 | 7 | - Remove comment and negation pattern support 8 | - Ignore patterns are always in `dot:true` mode 9 | 10 | ## 5.0 11 | 12 | - Deprecate comment and negation patterns 13 | - Fix regression in `mark` and `nodir` options from making all cache 14 | keys absolute path. 15 | - Abort if `fs.readdir` returns an error that's unexpected 16 | - Don't emit `match` events for ignored items 17 | - Treat ENOTSUP like ENOTDIR in readdir 18 | 19 | ## 4.5 20 | 21 | - Add `options.follow` to always follow directory symlinks in globstar 22 | - Add `options.realpath` to call `fs.realpath` on all results 23 | - Always cache based on absolute path 24 | 25 | ## 4.4 26 | 27 | - Add `options.ignore` 28 | - Fix handling of broken symlinks 29 | 30 | ## 4.3 31 | 32 | - Bump minimatch to 2.x 33 | - Pass all tests on Windows 34 | 35 | ## 4.2 36 | 37 | - Add `glob.hasMagic` function 38 | - Add `options.nodir` flag 39 | 40 | ## 4.1 41 | 42 | - Refactor sync and async implementations for performance 43 | - Throw if callback provided to sync glob function 44 | - Treat symbolic links in globstar results the same as Bash 4.3 45 | 46 | ## 4.0 47 | 48 | - Use `^` for dependency versions (bumped major because this breaks 49 | older npm versions) 50 | - Ensure callbacks are only ever called once 51 | - switch to ISC license 52 | 53 | ## 3.x 54 | 55 | - Rewrite in JavaScript 56 | - Add support for setting root, cwd, and windows support 57 | - Cache many fs calls 58 | - Add globstar support 59 | - emit match events 60 | 61 | ## 2.x 62 | 63 | - Use `glob.h` and `fnmatch.h` from NetBSD 64 | 65 | ## 1.x 66 | 67 | - `glob.h` static binding. 68 | -------------------------------------------------------------------------------- /example/ios/node_modules/glob/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": "Isaac Z. Schlueter (http://blog.izs.me/)", 3 | "name": "glob", 4 | "description": "a little globber", 5 | "version": "7.1.7", 6 | "repository": { 7 | "type": "git", 8 | "url": "git://github.com/isaacs/node-glob.git" 9 | }, 10 | "main": "glob.js", 11 | "files": [ 12 | "glob.js", 13 | "sync.js", 14 | "common.js" 15 | ], 16 | "engines": { 17 | "node": "*" 18 | }, 19 | "dependencies": { 20 | "fs.realpath": "^1.0.0", 21 | "inflight": "^1.0.4", 22 | "inherits": "2", 23 | "minimatch": "^3.0.4", 24 | "once": "^1.3.0", 25 | "path-is-absolute": "^1.0.0" 26 | }, 27 | "devDependencies": { 28 | "mkdirp": "0", 29 | "rimraf": "^2.2.8", 30 | "tap": "^15.0.6", 31 | "tick": "0.0.6" 32 | }, 33 | "tap": { 34 | "before": "test/00-setup.js", 35 | "after": "test/zz-cleanup.js", 36 | "jobs": 1 37 | }, 38 | "scripts": { 39 | "prepublish": "npm run benchclean", 40 | "profclean": "rm -f v8.log profile.txt", 41 | "test": "tap", 42 | "test-regen": "npm run profclean && TEST_REGEN=1 node test/00-setup.js", 43 | "bench": "bash benchmark.sh", 44 | "prof": "bash prof.sh && cat profile.txt", 45 | "benchclean": "node benchclean.js" 46 | }, 47 | "license": "ISC", 48 | "funding": { 49 | "url": "https://github.com/sponsors/isaacs" 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /example/ios/node_modules/has/LICENSE-MIT: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013 Thiago de Arruda 2 | 3 | Permission is hereby granted, free of charge, to any person 4 | obtaining a copy of this software and associated documentation 5 | files (the "Software"), to deal in the Software without 6 | restriction, including without limitation the rights to use, 7 | copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the 9 | Software is furnished to do so, subject to the following 10 | conditions: 11 | 12 | The above copyright notice and this permission notice shall be 13 | included in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 17 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 19 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 20 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 21 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /example/ios/node_modules/has/README.md: -------------------------------------------------------------------------------- 1 | # has 2 | 3 | > Object.prototype.hasOwnProperty.call shortcut 4 | 5 | ## Installation 6 | 7 | ```sh 8 | npm install --save has 9 | ``` 10 | 11 | ## Usage 12 | 13 | ```js 14 | var has = require('has'); 15 | 16 | has({}, 'hasOwnProperty'); // false 17 | has(Object.prototype, 'hasOwnProperty'); // true 18 | ``` 19 | -------------------------------------------------------------------------------- /example/ios/node_modules/has/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "has", 3 | "description": "Object.prototype.hasOwnProperty.call shortcut", 4 | "version": "1.0.3", 5 | "homepage": "https://github.com/tarruda/has", 6 | "author": { 7 | "name": "Thiago de Arruda", 8 | "email": "tpadilha84@gmail.com" 9 | }, 10 | "contributors": [ 11 | { 12 | "name": "Jordan Harband", 13 | "email": "ljharb@gmail.com", 14 | "url": "http://ljharb.codes" 15 | } 16 | ], 17 | "repository": { 18 | "type": "git", 19 | "url": "git://github.com/tarruda/has.git" 20 | }, 21 | "bugs": { 22 | "url": "https://github.com/tarruda/has/issues" 23 | }, 24 | "license": "MIT", 25 | "licenses": [ 26 | { 27 | "type": "MIT", 28 | "url": "https://github.com/tarruda/has/blob/master/LICENSE-MIT" 29 | } 30 | ], 31 | "main": "./src", 32 | "dependencies": { 33 | "function-bind": "^1.1.1" 34 | }, 35 | "devDependencies": { 36 | "@ljharb/eslint-config": "^12.2.1", 37 | "eslint": "^4.19.1", 38 | "tape": "^4.9.0" 39 | }, 40 | "engines": { 41 | "node": ">= 0.4.0" 42 | }, 43 | "scripts": { 44 | "lint": "eslint .", 45 | "pretest": "npm run lint", 46 | "test": "tape test" 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /example/ios/node_modules/has/src/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var bind = require('function-bind'); 4 | 5 | module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty); 6 | -------------------------------------------------------------------------------- /example/ios/node_modules/has/test/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var test = require('tape'); 4 | var has = require('../'); 5 | 6 | test('has', function (t) { 7 | t.equal(has({}, 'hasOwnProperty'), false, 'object literal does not have own property "hasOwnProperty"'); 8 | t.equal(has(Object.prototype, 'hasOwnProperty'), true, 'Object.prototype has own property "hasOwnProperty"'); 9 | t.end(); 10 | }); 11 | -------------------------------------------------------------------------------- /example/ios/node_modules/inflight/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) Isaac Z. Schlueter 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 15 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /example/ios/node_modules/inflight/README.md: -------------------------------------------------------------------------------- 1 | # inflight 2 | 3 | Add callbacks to requests in flight to avoid async duplication 4 | 5 | ## USAGE 6 | 7 | ```javascript 8 | var inflight = require('inflight') 9 | 10 | // some request that does some stuff 11 | function req(key, callback) { 12 | // key is any random string. like a url or filename or whatever. 13 | // 14 | // will return either a falsey value, indicating that the 15 | // request for this key is already in flight, or a new callback 16 | // which when called will call all callbacks passed to inflightk 17 | // with the same key 18 | callback = inflight(key, callback) 19 | 20 | // If we got a falsey value back, then there's already a req going 21 | if (!callback) return 22 | 23 | // this is where you'd fetch the url or whatever 24 | // callback is also once()-ified, so it can safely be assigned 25 | // to multiple events etc. First call wins. 26 | setTimeout(function() { 27 | callback(null, key) 28 | }, 100) 29 | } 30 | 31 | // only assigns a single setTimeout 32 | // when it dings, all cbs get called 33 | req('foo', cb1) 34 | req('foo', cb2) 35 | req('foo', cb3) 36 | req('foo', cb4) 37 | ``` 38 | -------------------------------------------------------------------------------- /example/ios/node_modules/inflight/inflight.js: -------------------------------------------------------------------------------- 1 | var wrappy = require('wrappy') 2 | var reqs = Object.create(null) 3 | var once = require('once') 4 | 5 | module.exports = wrappy(inflight) 6 | 7 | function inflight (key, cb) { 8 | if (reqs[key]) { 9 | reqs[key].push(cb) 10 | return null 11 | } else { 12 | reqs[key] = [cb] 13 | return makeres(key) 14 | } 15 | } 16 | 17 | function makeres (key) { 18 | return once(function RES () { 19 | var cbs = reqs[key] 20 | var len = cbs.length 21 | var args = slice(arguments) 22 | 23 | // XXX It's somewhat ambiguous whether a new callback added in this 24 | // pass should be queued for later execution if something in the 25 | // list of callbacks throws, or if it should just be discarded. 26 | // However, it's such an edge case that it hardly matters, and either 27 | // choice is likely as surprising as the other. 28 | // As it happens, we do go ahead and schedule it for later execution. 29 | try { 30 | for (var i = 0; i < len; i++) { 31 | cbs[i].apply(null, args) 32 | } 33 | } finally { 34 | if (cbs.length > len) { 35 | // added more in the interim. 36 | // de-zalgo, just in case, but don't call again. 37 | cbs.splice(0, len) 38 | process.nextTick(function () { 39 | RES.apply(null, args) 40 | }) 41 | } else { 42 | delete reqs[key] 43 | } 44 | } 45 | }) 46 | } 47 | 48 | function slice (args) { 49 | var length = args.length 50 | var array = [] 51 | 52 | for (var i = 0; i < length; i++) array[i] = args[i] 53 | return array 54 | } 55 | -------------------------------------------------------------------------------- /example/ios/node_modules/inflight/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "inflight", 3 | "version": "1.0.6", 4 | "description": "Add callbacks to requests in flight to avoid async duplication", 5 | "main": "inflight.js", 6 | "files": [ 7 | "inflight.js" 8 | ], 9 | "dependencies": { 10 | "once": "^1.3.0", 11 | "wrappy": "1" 12 | }, 13 | "devDependencies": { 14 | "tap": "^7.1.2" 15 | }, 16 | "scripts": { 17 | "test": "tap test.js --100" 18 | }, 19 | "repository": { 20 | "type": "git", 21 | "url": "https://github.com/npm/inflight.git" 22 | }, 23 | "author": "Isaac Z. Schlueter (http://blog.izs.me/)", 24 | "bugs": { 25 | "url": "https://github.com/isaacs/inflight/issues" 26 | }, 27 | "homepage": "https://github.com/isaacs/inflight", 28 | "license": "ISC" 29 | } 30 | -------------------------------------------------------------------------------- /example/ios/node_modules/inherits/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) Isaac Z. Schlueter 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 10 | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND 11 | FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 12 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 13 | LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 14 | OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 15 | PERFORMANCE OF THIS SOFTWARE. 16 | 17 | -------------------------------------------------------------------------------- /example/ios/node_modules/inherits/README.md: -------------------------------------------------------------------------------- 1 | Browser-friendly inheritance fully compatible with standard node.js 2 | [inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor). 3 | 4 | This package exports standard `inherits` from node.js `util` module in 5 | node environment, but also provides alternative browser-friendly 6 | implementation through [browser 7 | field](https://gist.github.com/shtylman/4339901). Alternative 8 | implementation is a literal copy of standard one located in standalone 9 | module to avoid requiring of `util`. It also has a shim for old 10 | browsers with no `Object.create` support. 11 | 12 | While keeping you sure you are using standard `inherits` 13 | implementation in node.js environment, it allows bundlers such as 14 | [browserify](https://github.com/substack/node-browserify) to not 15 | include full `util` package to your client code if all you need is 16 | just `inherits` function. It worth, because browser shim for `util` 17 | package is large and `inherits` is often the single function you need 18 | from it. 19 | 20 | It's recommended to use this package instead of 21 | `require('util').inherits` for any code that has chances to be used 22 | not only in node.js but in browser too. 23 | 24 | ## usage 25 | 26 | ```js 27 | var inherits = require('inherits'); 28 | // then use exactly as the standard one 29 | ``` 30 | 31 | ## note on version ~1.0 32 | 33 | Version ~1.0 had completely different motivation and is not compatible 34 | neither with 2.0 nor with standard node.js `inherits`. 35 | 36 | If you are using version ~1.0 and planning to switch to ~2.0, be 37 | careful: 38 | 39 | * new version uses `super_` instead of `super` for referencing 40 | superclass 41 | * new version overwrites current prototype while old one preserves any 42 | existing fields on it 43 | -------------------------------------------------------------------------------- /example/ios/node_modules/inherits/inherits.js: -------------------------------------------------------------------------------- 1 | try { 2 | var util = require('util'); 3 | /* istanbul ignore next */ 4 | if (typeof util.inherits !== 'function') throw ''; 5 | module.exports = util.inherits; 6 | } catch (e) { 7 | /* istanbul ignore next */ 8 | module.exports = require('./inherits_browser.js'); 9 | } 10 | -------------------------------------------------------------------------------- /example/ios/node_modules/inherits/inherits_browser.js: -------------------------------------------------------------------------------- 1 | if (typeof Object.create === 'function') { 2 | // implementation from standard node.js 'util' module 3 | module.exports = function inherits(ctor, superCtor) { 4 | if (superCtor) { 5 | ctor.super_ = superCtor 6 | ctor.prototype = Object.create(superCtor.prototype, { 7 | constructor: { 8 | value: ctor, 9 | enumerable: false, 10 | writable: true, 11 | configurable: true 12 | } 13 | }) 14 | } 15 | }; 16 | } else { 17 | // old school shim for old browsers 18 | module.exports = function inherits(ctor, superCtor) { 19 | if (superCtor) { 20 | ctor.super_ = superCtor 21 | var TempCtor = function () {} 22 | TempCtor.prototype = superCtor.prototype 23 | ctor.prototype = new TempCtor() 24 | ctor.prototype.constructor = ctor 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /example/ios/node_modules/inherits/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "inherits", 3 | "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()", 4 | "version": "2.0.4", 5 | "keywords": [ 6 | "inheritance", 7 | "class", 8 | "klass", 9 | "oop", 10 | "object-oriented", 11 | "inherits", 12 | "browser", 13 | "browserify" 14 | ], 15 | "main": "./inherits.js", 16 | "browser": "./inherits_browser.js", 17 | "repository": "git://github.com/isaacs/inherits", 18 | "license": "ISC", 19 | "scripts": { 20 | "test": "tap" 21 | }, 22 | "devDependencies": { 23 | "tap": "^14.2.4" 24 | }, 25 | "files": [ 26 | "inherits.js", 27 | "inherits_browser.js" 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /example/ios/node_modules/interpret/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014-2018 Tyler Kellen , Blaine Bublitz , and Eric Schoffstall 2 | 3 | Permission is hereby granted, free of charge, to any person 4 | obtaining a copy of this software and associated documentation 5 | files (the "Software"), to deal in the Software without 6 | restriction, including without limitation the rights to use, 7 | copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the 9 | Software is furnished to do so, subject to the following 10 | conditions: 11 | 12 | The above copyright notice and this permission notice shall be 13 | included in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 17 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 19 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 20 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 21 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /example/ios/node_modules/interpret/mjs-stub.js: -------------------------------------------------------------------------------- 1 | require.extensions['.mjs'] = null; 2 | -------------------------------------------------------------------------------- /example/ios/node_modules/interpret/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "interpret", 3 | "version": "1.4.0", 4 | "description": "A dictionary of file extensions and associated module loaders.", 5 | "author": "Gulp Team (http://gulpjs.com/)", 6 | "contributors": [ 7 | "Blaine Bublitz ", 8 | "Tyler Kellen (http://goingslowly.com/)" 9 | ], 10 | "repository": "gulpjs/interpret", 11 | "license": "MIT", 12 | "engines": { 13 | "node": ">= 0.10" 14 | }, 15 | "main": "index.js", 16 | "files": [ 17 | "LICENSE", 18 | "index.js", 19 | "mjs-stub.js" 20 | ], 21 | "scripts": { 22 | "lint": "eslint .", 23 | "pretest": "rm -rf tmp/ && npm run lint", 24 | "test": "mocha --async-only", 25 | "cover": "istanbul cover _mocha --report lcovonly", 26 | "coveralls": "npm run cover && istanbul-coveralls" 27 | }, 28 | "dependencies": {}, 29 | "devDependencies": { 30 | "eslint": "^2.13.0", 31 | "eslint-config-gulp": "^3.0.1", 32 | "expect": "^1.20.2", 33 | "istanbul": "^0.4.3", 34 | "istanbul-coveralls": "^1.0.3", 35 | "mocha": "^3.5.3", 36 | "parse-node-version": "^1.0.0", 37 | "rechoir": "^0.6.2", 38 | "shelljs": "0.7.5", 39 | "trash-cli": "^3.0.0" 40 | }, 41 | "keywords": [ 42 | "cirru-script", 43 | "cjsx", 44 | "co", 45 | "coco", 46 | "coffee", 47 | "coffee-script", 48 | "coffee.md", 49 | "coffeescript", 50 | "csv", 51 | "earlgrey", 52 | "es", 53 | "es6", 54 | "iced", 55 | "iced.md", 56 | "iced-coffee-script", 57 | "ini", 58 | "js", 59 | "json", 60 | "json5", 61 | "jsx", 62 | "react", 63 | "litcoffee", 64 | "liticed", 65 | "ls", 66 | "livescript", 67 | "toml", 68 | "ts", 69 | "typescript", 70 | "wisp", 71 | "xml", 72 | "yaml", 73 | "yml" 74 | ] 75 | } 76 | -------------------------------------------------------------------------------- /example/ios/node_modules/is-core-module/.eslintignore: -------------------------------------------------------------------------------- 1 | coverage/ 2 | -------------------------------------------------------------------------------- /example/ios/node_modules/is-core-module/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@ljharb", 3 | "root": true, 4 | "rules": { 5 | "func-style": 1, 6 | "operator-linebreak": [2, "before"], 7 | }, 8 | "overrides": [ 9 | { 10 | "files": "test/**", 11 | "rules": { 12 | "global-require": 0, 13 | "max-lines-per-function": 0, 14 | "no-negated-condition": 0, 15 | }, 16 | }, 17 | ], 18 | } 19 | -------------------------------------------------------------------------------- /example/ios/node_modules/is-core-module/.nycrc: -------------------------------------------------------------------------------- 1 | { 2 | "all": true, 3 | "check-coverage": false, 4 | "reporter": ["text-summary", "text", "html", "json"], 5 | "exclude": [ 6 | "coverage", 7 | "test" 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /example/ios/node_modules/is-core-module/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Dave Justice 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /example/ios/node_modules/is-core-module/README.md: -------------------------------------------------------------------------------- 1 | # is-core-module [![Version Badge][2]][1] 2 | 3 | [![github actions][actions-image]][actions-url] 4 | [![coverage][codecov-image]][codecov-url] 5 | [![dependency status][5]][6] 6 | [![dev dependency status][7]][8] 7 | [![License][license-image]][license-url] 8 | [![Downloads][downloads-image]][downloads-url] 9 | 10 | [![npm badge][11]][1] 11 | 12 | Is this specifier a node.js core module? Optionally provide a node version to check; defaults to the current node version. 13 | 14 | ## Example 15 | 16 | ```js 17 | var isCore = require('is-core-module'); 18 | var assert = require('assert'); 19 | assert(isCore('fs')); 20 | assert(!isCore('butts')); 21 | ``` 22 | 23 | ## Tests 24 | Clone the repo, `npm install`, and run `npm test` 25 | 26 | [1]: https://npmjs.org/package/is-core-module 27 | [2]: https://versionbadg.es/inspect-js/is-core-module.svg 28 | [5]: https://david-dm.org/inspect-js/is-core-module.svg 29 | [6]: https://david-dm.org/inspect-js/is-core-module 30 | [7]: https://david-dm.org/inspect-js/is-core-module/dev-status.svg 31 | [8]: https://david-dm.org/inspect-js/is-core-module#info=devDependencies 32 | [11]: https://nodei.co/npm/is-core-module.png?downloads=true&stars=true 33 | [license-image]: https://img.shields.io/npm/l/is-core-module.svg 34 | [license-url]: LICENSE 35 | [downloads-image]: https://img.shields.io/npm/dm/is-core-module.svg 36 | [downloads-url]: https://npm-stat.com/charts.html?package=is-core-module 37 | [codecov-image]: https://codecov.io/gh/inspect-js/is-core-module/branch/main/graphs/badge.svg 38 | [codecov-url]: https://app.codecov.io/gh/inspect-js/is-core-module/ 39 | [actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-core-module 40 | [actions-url]: https://github.com/inspect-js/is-core-module/actions 41 | -------------------------------------------------------------------------------- /example/ios/node_modules/is-core-module/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var has = require('has'); 4 | 5 | function specifierIncluded(current, specifier) { 6 | var nodeParts = current.split('.'); 7 | var parts = specifier.split(' '); 8 | var op = parts.length > 1 ? parts[0] : '='; 9 | var versionParts = (parts.length > 1 ? parts[1] : parts[0]).split('.'); 10 | 11 | for (var i = 0; i < 3; ++i) { 12 | var cur = parseInt(nodeParts[i] || 0, 10); 13 | var ver = parseInt(versionParts[i] || 0, 10); 14 | if (cur === ver) { 15 | continue; // eslint-disable-line no-restricted-syntax, no-continue 16 | } 17 | if (op === '<') { 18 | return cur < ver; 19 | } 20 | if (op === '>=') { 21 | return cur >= ver; 22 | } 23 | return false; 24 | } 25 | return op === '>='; 26 | } 27 | 28 | function matchesRange(current, range) { 29 | var specifiers = range.split(/ ?&& ?/); 30 | if (specifiers.length === 0) { 31 | return false; 32 | } 33 | for (var i = 0; i < specifiers.length; ++i) { 34 | if (!specifierIncluded(current, specifiers[i])) { 35 | return false; 36 | } 37 | } 38 | return true; 39 | } 40 | 41 | function versionIncluded(nodeVersion, specifierValue) { 42 | if (typeof specifierValue === 'boolean') { 43 | return specifierValue; 44 | } 45 | 46 | var current = typeof nodeVersion === 'undefined' 47 | ? process.versions && process.versions.node 48 | : nodeVersion; 49 | 50 | if (typeof current !== 'string') { 51 | throw new TypeError(typeof nodeVersion === 'undefined' ? 'Unable to determine current node version' : 'If provided, a valid node version is required'); 52 | } 53 | 54 | if (specifierValue && typeof specifierValue === 'object') { 55 | for (var i = 0; i < specifierValue.length; ++i) { 56 | if (matchesRange(current, specifierValue[i])) { 57 | return true; 58 | } 59 | } 60 | return false; 61 | } 62 | return matchesRange(current, specifierValue); 63 | } 64 | 65 | var data = require('./core.json'); 66 | 67 | module.exports = function isCore(x, nodeVersion) { 68 | return has(data, x) && versionIncluded(nodeVersion, data[x]); 69 | }; 70 | -------------------------------------------------------------------------------- /example/ios/node_modules/is-core-module/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "is-core-module", 3 | "version": "2.6.0", 4 | "description": "Is this specifier a node.js core module?", 5 | "main": "index.js", 6 | "exports": { 7 | ".": [ 8 | { 9 | "default": "./index.js" 10 | }, 11 | "./index.js" 12 | ], 13 | "./package.json": "./package.json" 14 | }, 15 | "scripts": { 16 | "prepublish": "not-in-publish || npm run prepublishOnly", 17 | "prepublishOnly": "safe-publish-latest", 18 | "lint": "eslint .", 19 | "pretest": "npm run lint", 20 | "tests-only": "tape 'test/**/*.js'", 21 | "test": "nyc npm run tests-only", 22 | "posttest": "aud --production", 23 | "version": "auto-changelog && git add CHANGELOG.md", 24 | "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" 25 | }, 26 | "repository": { 27 | "type": "git", 28 | "url": "git+https://github.com/inspect-js/is-core-module.git" 29 | }, 30 | "keywords": [ 31 | "core", 32 | "modules", 33 | "module", 34 | "npm", 35 | "node", 36 | "dependencies" 37 | ], 38 | "author": "Jordan Harband ", 39 | "funding": { 40 | "url": "https://github.com/sponsors/ljharb" 41 | }, 42 | "license": "MIT", 43 | "bugs": { 44 | "url": "https://github.com/inspect-js/is-core-module/issues" 45 | }, 46 | "homepage": "https://github.com/inspect-js/is-core-module", 47 | "dependencies": { 48 | "has": "^1.0.3" 49 | }, 50 | "devDependencies": { 51 | "@ljharb/eslint-config": "^17.6.0", 52 | "aud": "^1.1.5", 53 | "auto-changelog": "^2.3.0", 54 | "eslint": "^7.32.0", 55 | "nyc": "^10.3.2", 56 | "safe-publish-latest": "^1.1.4", 57 | "semver": "^6.3.0", 58 | "tape": "^5.3.1" 59 | }, 60 | "auto-changelog": { 61 | "output": "CHANGELOG.md", 62 | "template": "keepachangelog", 63 | "unreleased": false, 64 | "commitLimit": false, 65 | "backfillLimit": false, 66 | "hideCredit": true 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /example/ios/node_modules/minimatch/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) Isaac Z. Schlueter and Contributors 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 15 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /example/ios/node_modules/minimatch/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": "Isaac Z. Schlueter (http://blog.izs.me)", 3 | "name": "minimatch", 4 | "description": "a glob matcher in javascript", 5 | "version": "3.0.4", 6 | "repository": { 7 | "type": "git", 8 | "url": "git://github.com/isaacs/minimatch.git" 9 | }, 10 | "main": "minimatch.js", 11 | "scripts": { 12 | "test": "tap test/*.js --cov", 13 | "preversion": "npm test", 14 | "postversion": "npm publish", 15 | "postpublish": "git push origin --all; git push origin --tags" 16 | }, 17 | "engines": { 18 | "node": "*" 19 | }, 20 | "dependencies": { 21 | "brace-expansion": "^1.1.7" 22 | }, 23 | "devDependencies": { 24 | "tap": "^10.3.2" 25 | }, 26 | "license": "ISC", 27 | "files": [ 28 | "minimatch.js" 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /example/ios/node_modules/once/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) Isaac Z. Schlueter and Contributors 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 15 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /example/ios/node_modules/once/README.md: -------------------------------------------------------------------------------- 1 | # once 2 | 3 | Only call a function once. 4 | 5 | ## usage 6 | 7 | ```javascript 8 | var once = require('once') 9 | 10 | function load (file, cb) { 11 | cb = once(cb) 12 | loader.load('file') 13 | loader.once('load', cb) 14 | loader.once('error', cb) 15 | } 16 | ``` 17 | 18 | Or add to the Function.prototype in a responsible way: 19 | 20 | ```javascript 21 | // only has to be done once 22 | require('once').proto() 23 | 24 | function load (file, cb) { 25 | cb = cb.once() 26 | loader.load('file') 27 | loader.once('load', cb) 28 | loader.once('error', cb) 29 | } 30 | ``` 31 | 32 | Ironically, the prototype feature makes this module twice as 33 | complicated as necessary. 34 | 35 | To check whether you function has been called, use `fn.called`. Once the 36 | function is called for the first time the return value of the original 37 | function is saved in `fn.value` and subsequent calls will continue to 38 | return this value. 39 | 40 | ```javascript 41 | var once = require('once') 42 | 43 | function load (cb) { 44 | cb = once(cb) 45 | var stream = createStream() 46 | stream.once('data', cb) 47 | stream.once('end', function () { 48 | if (!cb.called) cb(new Error('not found')) 49 | }) 50 | } 51 | ``` 52 | 53 | ## `once.strict(func)` 54 | 55 | Throw an error if the function is called twice. 56 | 57 | Some functions are expected to be called only once. Using `once` for them would 58 | potentially hide logical errors. 59 | 60 | In the example below, the `greet` function has to call the callback only once: 61 | 62 | ```javascript 63 | function greet (name, cb) { 64 | // return is missing from the if statement 65 | // when no name is passed, the callback is called twice 66 | if (!name) cb('Hello anonymous') 67 | cb('Hello ' + name) 68 | } 69 | 70 | function log (msg) { 71 | console.log(msg) 72 | } 73 | 74 | // this will print 'Hello anonymous' but the logical error will be missed 75 | greet(null, once(msg)) 76 | 77 | // once.strict will print 'Hello anonymous' and throw an error when the callback will be called the second time 78 | greet(null, once.strict(msg)) 79 | ``` 80 | -------------------------------------------------------------------------------- /example/ios/node_modules/once/once.js: -------------------------------------------------------------------------------- 1 | var wrappy = require('wrappy') 2 | module.exports = wrappy(once) 3 | module.exports.strict = wrappy(onceStrict) 4 | 5 | once.proto = once(function () { 6 | Object.defineProperty(Function.prototype, 'once', { 7 | value: function () { 8 | return once(this) 9 | }, 10 | configurable: true 11 | }) 12 | 13 | Object.defineProperty(Function.prototype, 'onceStrict', { 14 | value: function () { 15 | return onceStrict(this) 16 | }, 17 | configurable: true 18 | }) 19 | }) 20 | 21 | function once (fn) { 22 | var f = function () { 23 | if (f.called) return f.value 24 | f.called = true 25 | return f.value = fn.apply(this, arguments) 26 | } 27 | f.called = false 28 | return f 29 | } 30 | 31 | function onceStrict (fn) { 32 | var f = function () { 33 | if (f.called) 34 | throw new Error(f.onceError) 35 | f.called = true 36 | return f.value = fn.apply(this, arguments) 37 | } 38 | var name = fn.name || 'Function wrapped with `once`' 39 | f.onceError = name + " shouldn't be called more than once" 40 | f.called = false 41 | return f 42 | } 43 | -------------------------------------------------------------------------------- /example/ios/node_modules/once/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "once", 3 | "version": "1.4.0", 4 | "description": "Run a function exactly one time", 5 | "main": "once.js", 6 | "directories": { 7 | "test": "test" 8 | }, 9 | "dependencies": { 10 | "wrappy": "1" 11 | }, 12 | "devDependencies": { 13 | "tap": "^7.0.1" 14 | }, 15 | "scripts": { 16 | "test": "tap test/*.js" 17 | }, 18 | "files": [ 19 | "once.js" 20 | ], 21 | "repository": { 22 | "type": "git", 23 | "url": "git://github.com/isaacs/once" 24 | }, 25 | "keywords": [ 26 | "once", 27 | "function", 28 | "one", 29 | "single" 30 | ], 31 | "author": "Isaac Z. Schlueter (http://blog.izs.me/)", 32 | "license": "ISC" 33 | } 34 | -------------------------------------------------------------------------------- /example/ios/node_modules/path-is-absolute/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | function posix(path) { 4 | return path.charAt(0) === '/'; 5 | } 6 | 7 | function win32(path) { 8 | // https://github.com/nodejs/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56 9 | var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; 10 | var result = splitDeviceRe.exec(path); 11 | var device = result[1] || ''; 12 | var isUnc = Boolean(device && device.charAt(1) !== ':'); 13 | 14 | // UNC paths are always absolute 15 | return Boolean(result[2] || isUnc); 16 | } 17 | 18 | module.exports = process.platform === 'win32' ? win32 : posix; 19 | module.exports.posix = posix; 20 | module.exports.win32 = win32; 21 | -------------------------------------------------------------------------------- /example/ios/node_modules/path-is-absolute/license: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) Sindre Sorhus (sindresorhus.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /example/ios/node_modules/path-is-absolute/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "path-is-absolute", 3 | "version": "1.0.1", 4 | "description": "Node.js 0.12 path.isAbsolute() ponyfill", 5 | "license": "MIT", 6 | "repository": "sindresorhus/path-is-absolute", 7 | "author": { 8 | "name": "Sindre Sorhus", 9 | "email": "sindresorhus@gmail.com", 10 | "url": "sindresorhus.com" 11 | }, 12 | "engines": { 13 | "node": ">=0.10.0" 14 | }, 15 | "scripts": { 16 | "test": "xo && node test.js" 17 | }, 18 | "files": [ 19 | "index.js" 20 | ], 21 | "keywords": [ 22 | "path", 23 | "paths", 24 | "file", 25 | "dir", 26 | "absolute", 27 | "isabsolute", 28 | "is-absolute", 29 | "built-in", 30 | "util", 31 | "utils", 32 | "core", 33 | "ponyfill", 34 | "polyfill", 35 | "shim", 36 | "is", 37 | "detect", 38 | "check" 39 | ], 40 | "devDependencies": { 41 | "xo": "^0.16.0" 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /example/ios/node_modules/path-is-absolute/readme.md: -------------------------------------------------------------------------------- 1 | # path-is-absolute [![Build Status](https://travis-ci.org/sindresorhus/path-is-absolute.svg?branch=master)](https://travis-ci.org/sindresorhus/path-is-absolute) 2 | 3 | > Node.js 0.12 [`path.isAbsolute()`](http://nodejs.org/api/path.html#path_path_isabsolute_path) [ponyfill](https://ponyfill.com) 4 | 5 | 6 | ## Install 7 | 8 | ``` 9 | $ npm install --save path-is-absolute 10 | ``` 11 | 12 | 13 | ## Usage 14 | 15 | ```js 16 | const pathIsAbsolute = require('path-is-absolute'); 17 | 18 | // Running on Linux 19 | pathIsAbsolute('/home/foo'); 20 | //=> true 21 | pathIsAbsolute('C:/Users/foo'); 22 | //=> false 23 | 24 | // Running on Windows 25 | pathIsAbsolute('C:/Users/foo'); 26 | //=> true 27 | pathIsAbsolute('/home/foo'); 28 | //=> false 29 | 30 | // Running on any OS 31 | pathIsAbsolute.posix('/home/foo'); 32 | //=> true 33 | pathIsAbsolute.posix('C:/Users/foo'); 34 | //=> false 35 | pathIsAbsolute.win32('C:/Users/foo'); 36 | //=> true 37 | pathIsAbsolute.win32('/home/foo'); 38 | //=> false 39 | ``` 40 | 41 | 42 | ## API 43 | 44 | See the [`path.isAbsolute()` docs](http://nodejs.org/api/path.html#path_path_isabsolute_path). 45 | 46 | ### pathIsAbsolute(path) 47 | 48 | ### pathIsAbsolute.posix(path) 49 | 50 | POSIX specific version. 51 | 52 | ### pathIsAbsolute.win32(path) 53 | 54 | Windows specific version. 55 | 56 | 57 | ## License 58 | 59 | MIT © [Sindre Sorhus](https://sindresorhus.com) 60 | -------------------------------------------------------------------------------- /example/ios/node_modules/path-parse/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Javier Blanco 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /example/ios/node_modules/path-parse/README.md: -------------------------------------------------------------------------------- 1 | # path-parse [![Build Status](https://travis-ci.org/jbgutierrez/path-parse.svg?branch=master)](https://travis-ci.org/jbgutierrez/path-parse) 2 | 3 | > Node.js [`path.parse(pathString)`](https://nodejs.org/api/path.html#path_path_parse_pathstring) [ponyfill](https://ponyfill.com). 4 | 5 | ## Install 6 | 7 | ``` 8 | $ npm install --save path-parse 9 | ``` 10 | 11 | ## Usage 12 | 13 | ```js 14 | var pathParse = require('path-parse'); 15 | 16 | pathParse('/home/user/dir/file.txt'); 17 | //=> { 18 | // root : "/", 19 | // dir : "/home/user/dir", 20 | // base : "file.txt", 21 | // ext : ".txt", 22 | // name : "file" 23 | // } 24 | ``` 25 | 26 | ## API 27 | 28 | See [`path.parse(pathString)`](https://nodejs.org/api/path.html#path_path_parse_pathstring) docs. 29 | 30 | ### pathParse(path) 31 | 32 | ### pathParse.posix(path) 33 | 34 | The Posix specific version. 35 | 36 | ### pathParse.win32(path) 37 | 38 | The Windows specific version. 39 | 40 | ## License 41 | 42 | MIT © [Javier Blanco](http://jbgutierrez.info) 43 | -------------------------------------------------------------------------------- /example/ios/node_modules/path-parse/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var isWindows = process.platform === 'win32'; 4 | 5 | // Regex to split a windows path into into [dir, root, basename, name, ext] 6 | var splitWindowsRe = 7 | /^(((?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?[\\\/]?)(?:[^\\\/]*[\\\/])*)((\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))[\\\/]*$/; 8 | 9 | var win32 = {}; 10 | 11 | function win32SplitPath(filename) { 12 | return splitWindowsRe.exec(filename).slice(1); 13 | } 14 | 15 | win32.parse = function(pathString) { 16 | if (typeof pathString !== 'string') { 17 | throw new TypeError( 18 | "Parameter 'pathString' must be a string, not " + typeof pathString 19 | ); 20 | } 21 | var allParts = win32SplitPath(pathString); 22 | if (!allParts || allParts.length !== 5) { 23 | throw new TypeError("Invalid path '" + pathString + "'"); 24 | } 25 | return { 26 | root: allParts[1], 27 | dir: allParts[0] === allParts[1] ? allParts[0] : allParts[0].slice(0, -1), 28 | base: allParts[2], 29 | ext: allParts[4], 30 | name: allParts[3] 31 | }; 32 | }; 33 | 34 | 35 | 36 | // Split a filename into [dir, root, basename, name, ext], unix version 37 | // 'root' is just a slash, or nothing. 38 | var splitPathRe = 39 | /^((\/?)(?:[^\/]*\/)*)((\.{1,2}|[^\/]+?|)(\.[^.\/]*|))[\/]*$/; 40 | var posix = {}; 41 | 42 | 43 | function posixSplitPath(filename) { 44 | return splitPathRe.exec(filename).slice(1); 45 | } 46 | 47 | 48 | posix.parse = function(pathString) { 49 | if (typeof pathString !== 'string') { 50 | throw new TypeError( 51 | "Parameter 'pathString' must be a string, not " + typeof pathString 52 | ); 53 | } 54 | var allParts = posixSplitPath(pathString); 55 | if (!allParts || allParts.length !== 5) { 56 | throw new TypeError("Invalid path '" + pathString + "'"); 57 | } 58 | 59 | return { 60 | root: allParts[1], 61 | dir: allParts[0].slice(0, -1), 62 | base: allParts[2], 63 | ext: allParts[4], 64 | name: allParts[3], 65 | }; 66 | }; 67 | 68 | 69 | if (isWindows) 70 | module.exports = win32.parse; 71 | else /* posix */ 72 | module.exports = posix.parse; 73 | 74 | module.exports.posix = posix.parse; 75 | module.exports.win32 = win32.parse; 76 | -------------------------------------------------------------------------------- /example/ios/node_modules/path-parse/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "path-parse", 3 | "version": "1.0.7", 4 | "description": "Node.js path.parse() ponyfill", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "node test.js" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "https://github.com/jbgutierrez/path-parse.git" 12 | }, 13 | "keywords": [ 14 | "path", 15 | "paths", 16 | "file", 17 | "dir", 18 | "parse", 19 | "built-in", 20 | "util", 21 | "utils", 22 | "core", 23 | "ponyfill", 24 | "polyfill", 25 | "shim" 26 | ], 27 | "author": "Javier Blanco ", 28 | "license": "MIT", 29 | "bugs": { 30 | "url": "https://github.com/jbgutierrez/path-parse/issues" 31 | }, 32 | "homepage": "https://github.com/jbgutierrez/path-parse#readme" 33 | } 34 | -------------------------------------------------------------------------------- /example/ios/node_modules/rechoir/.npmignore: -------------------------------------------------------------------------------- 1 | test 2 | -------------------------------------------------------------------------------- /example/ios/node_modules/rechoir/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: node_js 3 | node_js: 4 | - "0.10" 5 | - "0.12" 6 | env: 7 | global: 8 | - REMOVE_DEPS="" 9 | matrix: 10 | - "CUSTOM_DEPS=coffee-script@~1.3" 11 | - "CUSTOM_DEPS=coffee-script@~1.5" 12 | - "CUSTOM_DEPS=coffee-script@~1.7" 13 | - "CUSTOM_DEPS=coffee-script@latest" 14 | - "CUSTOM_DEPS=iced-coffee-script@1.6.3-j" 15 | - "CUSTOM_DEPS=iced-coffee-script@latest" 16 | - "CUSTOM_DEPS=LiveScript@1.3.1 REMOVE_DEPS=livescript" 17 | - "CUSTOM_DEPS=typescript-require REMOVE_DEPS=typescript-register" 18 | matrix: 19 | fast_finish: true 20 | before_install: 21 | - "npm install -g npm" # needs the newest version of npm 22 | before_script: 23 | - "[ \"${REMOVE_DEPS}\" == \"\" ] || npm rm $REMOVE_DEPS" 24 | - "npm install $CUSTOM_DEPS" # install a specific version of dependencies 25 | -------------------------------------------------------------------------------- /example/ios/node_modules/rechoir/CHANGELOG: -------------------------------------------------------------------------------- 1 | v0.6.2: 2 | date: 2015-07-22 3 | changes: 4 | - Return `undefined` when an unknown extension is provided to prepare and 5 | the `nothrow` option is specified. 6 | v0.6.1: 7 | date: 2015-05-22 8 | changes: 9 | - Add option for not throwing. 10 | v0.6.0: 11 | date: 2015-05-20 12 | changes: 13 | - Include module name when prepare is successful. 14 | v0.5.0: 15 | date: 2015-05-20 16 | changes: 17 | - Overhaul to support interpret 0.6.0. 18 | v0.3.0: 19 | date: 2015-01-10 20 | changes: 21 | - Breaking: `load` method removed. 22 | - Improved extension recognition. 23 | - No longer fails upon dots in filenames. 24 | - Support confuration objects. 25 | - Support and test ES6. 26 | - Support legacy module loading. 27 | v0.2.2: 28 | date: 2014-12-17 29 | changes: 30 | - Expose interpret. 31 | v0.2.0: 32 | date: 2014-04-20 33 | changes: 34 | - Simplify loading of coffee-script and iced-coffee-script. 35 | v0.1.0: 36 | date: 2014-04-20 37 | changes: 38 | - Initial public release. 39 | -------------------------------------------------------------------------------- /example/ios/node_modules/rechoir/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015 Tyler Kellen 2 | 3 | Permission is hereby granted, free of charge, to any person 4 | obtaining a copy of this software and associated documentation 5 | files (the "Software"), to deal in the Software without 6 | restriction, including without limitation the rights to use, 7 | copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the 9 | Software is furnished to do so, subject to the following 10 | conditions: 11 | 12 | The above copyright notice and this permission notice shall be 13 | included in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 17 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 19 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 20 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 21 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /example/ios/node_modules/rechoir/README.md: -------------------------------------------------------------------------------- 1 | # rechoir [![Build Status](https://secure.travis-ci.org/tkellen/js-rechoir.png)](http://travis-ci.org/tkellen/js-rechoir) 2 | > Require any supported file as a node module. 3 | 4 | [![NPM](https://nodei.co/npm/rechoir.png)](https://nodei.co/npm/rechoir/) 5 | 6 | ## What is it? 7 | This module, in conjunction with [interpret]-like objects can register any file type the npm ecosystem has a module loader for. This library is a dependency of [Liftoff]. 8 | 9 | ## API 10 | 11 | ### prepare(config, filepath, requireFrom) 12 | Look for a module loader associated with the provided file and attempt require it. If necessary, run any setup required to inject it into [require.extensions](http://nodejs.org/api/globals.html#globals_require_extensions). 13 | 14 | `config` An [interpret]-like configuration object. 15 | 16 | `filepath` A file whose type you'd like to register a module loader for. 17 | 18 | `requireFrom` An optional path to start searching for the module required to load the requested file. Defaults to the directory of `filepath`. 19 | 20 | If calling this method is successful (aka: it doesn't throw), you can now require files of the type you requested natively. 21 | 22 | An error with a `failures` property will be thrown if the module loader(s) configured for a given extension cannot be registered. 23 | 24 | If a loader is already registered, this will simply return `true`. 25 | 26 | **Note:** While rechoir will automatically load and register transpilers like `coffee-script`, you must provide a local installation. The transpilers are **not** bundled with this module. 27 | 28 | #### Usage 29 | ```js 30 | const config = require('interpret').extensions; 31 | const rechoir = require('rechoir'); 32 | rechoir.prepare(config, './test/fixtures/test.coffee'); 33 | rechoir.prepare(config, './test/fixtures/test.csv'); 34 | rechoir.prepare(config, './test/fixtures/test.toml'); 35 | 36 | console.log(require('./test/fixtures/test.coffee')); 37 | console.log(require('./test/fixtures/test.csv')); 38 | console.log(require('./test/fixtures/test.toml')); 39 | ``` 40 | 41 | [interpret]: http://github.com/tkellen/js-interpret 42 | [Liftoff]: http://github.com/tkellen/js-liftoff 43 | -------------------------------------------------------------------------------- /example/ios/node_modules/rechoir/index.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | 3 | const extension = require('./lib/extension'); 4 | const normalize = require('./lib/normalize'); 5 | const register = require('./lib/register'); 6 | 7 | exports.prepare = function (extensions, filepath, cwd, nothrow) { 8 | var option, attempt; 9 | var attempts = []; 10 | var err; 11 | var onlyErrors = false; 12 | var ext = extension(filepath); 13 | if (Object.keys(require.extensions).indexOf(ext) !== -1) { 14 | return true; 15 | } 16 | var config = normalize(extensions[ext]); 17 | if (!config) { 18 | if (nothrow) { 19 | return; 20 | } else { 21 | throw new Error('No module loader found for "'+ext+'".'); 22 | } 23 | } 24 | if (!cwd) { 25 | cwd = path.dirname(path.resolve(filepath)); 26 | } 27 | if (!Array.isArray(config)) { 28 | config = [config]; 29 | } 30 | for (var i in config) { 31 | option = config[i]; 32 | attempt = register(cwd, option.module, option.register); 33 | error = (attempt instanceof Error) ? attempt : null; 34 | if (error) { 35 | attempt = null; 36 | } 37 | attempts.push({ 38 | moduleName: option.module, 39 | module: attempt, 40 | error: error 41 | }); 42 | if (!error) { 43 | onlyErrors = false; 44 | break; 45 | } else { 46 | onlyErrors = true; 47 | } 48 | } 49 | if (onlyErrors) { 50 | err = new Error('Unable to use specified module loaders for "'+ext+'".'); 51 | err.failures = attempts; 52 | if (nothrow) { 53 | return err; 54 | } else { 55 | throw err; 56 | } 57 | } 58 | return attempts; 59 | }; 60 | -------------------------------------------------------------------------------- /example/ios/node_modules/rechoir/lib/extension.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | 3 | const EXTRE = /^[.]?[^.]+([.].*)$/; 4 | 5 | module.exports = function (input) { 6 | var extension = EXTRE.exec(path.basename(input)); 7 | if (!extension) { 8 | return; 9 | } 10 | return extension[1]; 11 | }; 12 | -------------------------------------------------------------------------------- /example/ios/node_modules/rechoir/lib/normalize.js: -------------------------------------------------------------------------------- 1 | function normalizer (config) { 2 | if (typeof config === 'string') { 3 | return { 4 | module: config 5 | } 6 | } 7 | return config; 8 | }; 9 | 10 | module.exports = function (config) { 11 | if (Array.isArray(config)) { 12 | return config.map(normalizer); 13 | } 14 | return normalizer(config); 15 | }; 16 | -------------------------------------------------------------------------------- /example/ios/node_modules/rechoir/lib/register.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | const resolve = require('resolve'); 3 | 4 | module.exports = function (cwd, moduleName, register) { 5 | try { 6 | var modulePath = resolve.sync(moduleName, {basedir: cwd}); 7 | var result = require(modulePath); 8 | if (typeof register === 'function') { 9 | register(result); 10 | } 11 | } catch (e) { 12 | result = e; 13 | } 14 | return result; 15 | }; 16 | -------------------------------------------------------------------------------- /example/ios/node_modules/rechoir/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "rechoir", 3 | "description": "Require any supported file as a node module.", 4 | "version": "0.6.2", 5 | "homepage": "https://github.com/tkellen/node-rechoir", 6 | "author": { 7 | "name": "Tyler Kellen", 8 | "url": "http://goingslowly.com/" 9 | }, 10 | "repository": { 11 | "type": "git", 12 | "url": "git://github.com/tkellen/node-rechoir.git" 13 | }, 14 | "bugs": { 15 | "url": "https://github.com/tkellen/node-rechoir/issues" 16 | }, 17 | "licenses": [ 18 | { 19 | "type": "MIT", 20 | "url": "https://github.com/tkellen/node-rechoir/blob/master/LICENSE" 21 | } 22 | ], 23 | "main": "index.js", 24 | "engines": { 25 | "node": ">= 0.10" 26 | }, 27 | "scripts": { 28 | "test": "mocha -R spec test/index.js" 29 | }, 30 | "dependencies": { 31 | "resolve": "^1.1.6" 32 | }, 33 | "devDependencies": { 34 | "babel": "^5.4.3", 35 | "chai": "^2.3.0", 36 | "coco": "^0.9.1", 37 | "coffee-script": "^1.9.2", 38 | "earlgrey": "0.0.9", 39 | "iced-coffee-script": "^1.8.0-d", 40 | "interpret": "^0.6.1", 41 | "json5": "^0.4.0", 42 | "livescript": "^1.4.0", 43 | "mocha": "^2.2.5", 44 | "node-jsx": "^0.13.3", 45 | "require-csv": "0.0.1", 46 | "require-ini": "0.0.1", 47 | "require-uncached": "^1.0.2", 48 | "require-xml": "0.0.1", 49 | "require-yaml": "0.0.1", 50 | "rimraf": "^2.3.4", 51 | "semver": "^4.3.4", 52 | "sinon": "^1.14.1", 53 | "toml-require": "^1.0.1", 54 | "typescript-register": "^1.1.0" 55 | }, 56 | "keywords": [ 57 | "require", 58 | "cjsx", 59 | "co", 60 | "coco", 61 | "coffee-script", 62 | "coffee", 63 | "coffee.md", 64 | "csv", 65 | "earlgrey", 66 | "es", 67 | "es6", 68 | "iced", 69 | "iced.md", 70 | "iced-coffee-script", 71 | "ini", 72 | "js", 73 | "json", 74 | "json5", 75 | "jsx", 76 | "react", 77 | "litcoffee", 78 | "liticed", 79 | "ls", 80 | "livescript", 81 | "toml", 82 | "ts", 83 | "typescript", 84 | "xml", 85 | "yaml", 86 | "yml" 87 | ] 88 | } 89 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 2 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | max_line_length = 200 11 | 12 | [*.js] 13 | block_comment_start = /* 14 | block_comment = * 15 | block_comment_end = */ 16 | 17 | [*.yml] 18 | indent_size = 1 19 | 20 | [package.json] 21 | indent_style = tab 22 | 23 | [lib/core.json] 24 | indent_style = tab 25 | 26 | [CHANGELOG.md] 27 | indent_style = space 28 | indent_size = 2 29 | 30 | [{*.json,Makefile}] 31 | max_line_length = off 32 | 33 | [test/{dotdot,resolver,module_dir,multirepo,node_path,pathfilter,precedence}/**/*] 34 | indent_style = off 35 | indent_size = off 36 | max_line_length = off 37 | insert_final_newline = off 38 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@ljharb", 3 | "root": true, 4 | "rules": { 5 | "array-bracket-newline": 0, 6 | "array-element-newline": 0, 7 | "indent": [2, 4], 8 | "strict": 0, 9 | "complexity": 0, 10 | "consistent-return": 0, 11 | "curly": 0, 12 | "dot-notation": [2, { "allowKeywords": true }], 13 | "func-name-matching": 0, 14 | "func-style": 0, 15 | "global-require": 0, 16 | "id-length": [2, { "min": 1, "max": 30 }], 17 | "max-lines-per-function": 0, 18 | "max-nested-callbacks": 0, 19 | "max-params": 0, 20 | "max-statements-per-line": [2, { "max": 2 }], 21 | "max-statements": 0, 22 | "no-magic-numbers": 0, 23 | "no-console": 0, 24 | "no-shadow": 0, 25 | "no-unused-vars": [2, { "vars": "all", "args": "none" }], 26 | "no-use-before-define": 0, 27 | "object-curly-newline": 0, 28 | "operator-linebreak": [2, "before"], 29 | "sort-keys": 0, 30 | }, 31 | "overrides": [ 32 | { 33 | "files": "test/resolver/nested_symlinks/mylib/*.js", 34 | "rules": { 35 | "no-throw-literal": 0, 36 | }, 37 | }, 38 | ], 39 | } 40 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2012 James Halliday 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security 2 | 3 | Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report. 4 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/example/async.js: -------------------------------------------------------------------------------- 1 | var resolve = require('../'); 2 | resolve('tap', { basedir: __dirname }, function (err, res) { 3 | if (err) console.error(err); 4 | else console.log(res); 5 | }); 6 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/example/sync.js: -------------------------------------------------------------------------------- 1 | var resolve = require('../'); 2 | var res = resolve.sync('tap', { basedir: __dirname }); 3 | console.log(res); 4 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/index.js: -------------------------------------------------------------------------------- 1 | var async = require('./lib/async'); 2 | async.core = require('./lib/core'); 3 | async.isCore = require('./lib/is-core'); 4 | async.sync = require('./lib/sync'); 5 | 6 | module.exports = async; 7 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/lib/caller.js: -------------------------------------------------------------------------------- 1 | module.exports = function () { 2 | // see https://code.google.com/p/v8/wiki/JavaScriptStackTraceApi 3 | var origPrepareStackTrace = Error.prepareStackTrace; 4 | Error.prepareStackTrace = function (_, stack) { return stack; }; 5 | var stack = (new Error()).stack; 6 | Error.prepareStackTrace = origPrepareStackTrace; 7 | return stack[2].getFileName(); 8 | }; 9 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/lib/core.js: -------------------------------------------------------------------------------- 1 | var current = (process.versions && process.versions.node && process.versions.node.split('.')) || []; 2 | 3 | function specifierIncluded(specifier) { 4 | var parts = specifier.split(' '); 5 | var op = parts.length > 1 ? parts[0] : '='; 6 | var versionParts = (parts.length > 1 ? parts[1] : parts[0]).split('.'); 7 | 8 | for (var i = 0; i < 3; ++i) { 9 | var cur = parseInt(current[i] || 0, 10); 10 | var ver = parseInt(versionParts[i] || 0, 10); 11 | if (cur === ver) { 12 | continue; // eslint-disable-line no-restricted-syntax, no-continue 13 | } 14 | if (op === '<') { 15 | return cur < ver; 16 | } else if (op === '>=') { 17 | return cur >= ver; 18 | } else { 19 | return false; 20 | } 21 | } 22 | return op === '>='; 23 | } 24 | 25 | function matchesRange(range) { 26 | var specifiers = range.split(/ ?&& ?/); 27 | if (specifiers.length === 0) { return false; } 28 | for (var i = 0; i < specifiers.length; ++i) { 29 | if (!specifierIncluded(specifiers[i])) { return false; } 30 | } 31 | return true; 32 | } 33 | 34 | function versionIncluded(specifierValue) { 35 | if (typeof specifierValue === 'boolean') { return specifierValue; } 36 | if (specifierValue && typeof specifierValue === 'object') { 37 | for (var i = 0; i < specifierValue.length; ++i) { 38 | if (matchesRange(specifierValue[i])) { return true; } 39 | } 40 | return false; 41 | } 42 | return matchesRange(specifierValue); 43 | } 44 | 45 | var data = require('./core.json'); 46 | 47 | var core = {}; 48 | for (var mod in data) { // eslint-disable-line no-restricted-syntax 49 | if (Object.prototype.hasOwnProperty.call(data, mod)) { 50 | core[mod] = versionIncluded(data[mod]); 51 | } 52 | } 53 | module.exports = core; 54 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/lib/is-core.js: -------------------------------------------------------------------------------- 1 | var isCoreModule = require('is-core-module'); 2 | 3 | module.exports = function isCore(x) { 4 | return isCoreModule(x); 5 | }; 6 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/lib/node-modules-paths.js: -------------------------------------------------------------------------------- 1 | var path = require('path'); 2 | var parse = path.parse || require('path-parse'); 3 | 4 | var getNodeModulesDirs = function getNodeModulesDirs(absoluteStart, modules) { 5 | var prefix = '/'; 6 | if ((/^([A-Za-z]:)/).test(absoluteStart)) { 7 | prefix = ''; 8 | } else if ((/^\\\\/).test(absoluteStart)) { 9 | prefix = '\\\\'; 10 | } 11 | 12 | var paths = [absoluteStart]; 13 | var parsed = parse(absoluteStart); 14 | while (parsed.dir !== paths[paths.length - 1]) { 15 | paths.push(parsed.dir); 16 | parsed = parse(parsed.dir); 17 | } 18 | 19 | return paths.reduce(function (dirs, aPath) { 20 | return dirs.concat(modules.map(function (moduleDir) { 21 | return path.resolve(prefix, aPath, moduleDir); 22 | })); 23 | }, []); 24 | }; 25 | 26 | module.exports = function nodeModulesPaths(start, opts, request) { 27 | var modules = opts && opts.moduleDirectory 28 | ? [].concat(opts.moduleDirectory) 29 | : ['node_modules']; 30 | 31 | if (opts && typeof opts.paths === 'function') { 32 | return opts.paths( 33 | request, 34 | start, 35 | function () { return getNodeModulesDirs(start, modules); }, 36 | opts 37 | ); 38 | } 39 | 40 | var dirs = getNodeModulesDirs(start, modules); 41 | return opts && opts.paths ? dirs.concat(opts.paths) : dirs; 42 | }; 43 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/lib/normalize-options.js: -------------------------------------------------------------------------------- 1 | module.exports = function (x, opts) { 2 | /** 3 | * This file is purposefully a passthrough. It's expected that third-party 4 | * environments will override it at runtime in order to inject special logic 5 | * into `resolve` (by manipulating the options). One such example is the PnP 6 | * code path in Yarn. 7 | */ 8 | 9 | return opts || {}; 10 | }; 11 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "resolve", 3 | "description": "resolve like require.resolve() on behalf of files asynchronously and synchronously", 4 | "version": "1.20.0", 5 | "repository": { 6 | "type": "git", 7 | "url": "git://github.com/browserify/resolve.git" 8 | }, 9 | "main": "index.js", 10 | "keywords": [ 11 | "resolve", 12 | "require", 13 | "node", 14 | "module" 15 | ], 16 | "scripts": { 17 | "prepublish": "safe-publish-latest && cp node_modules/is-core-module/core.json ./lib/ ||:", 18 | "prelint": "eclint check '**/*'", 19 | "lint": "eslint --ext=js,mjs .", 20 | "pretests-only": "cd ./test/resolver/nested_symlinks && node mylib/sync && node mylib/async", 21 | "tests-only": "tape test/*.js", 22 | "pretest": "npm run lint", 23 | "test": "npm run --silent tests-only", 24 | "posttest": "npm run test:multirepo && aud --production", 25 | "test:multirepo": "cd ./test/resolver/multirepo && npm install && npm test" 26 | }, 27 | "devDependencies": { 28 | "@ljharb/eslint-config": "^17.5.1", 29 | "array.prototype.map": "^1.0.3", 30 | "aud": "^1.1.4", 31 | "eclint": "^2.8.1", 32 | "eslint": "^7.19.0", 33 | "object-keys": "^1.1.1", 34 | "safe-publish-latest": "^1.1.4", 35 | "tap": "0.4.13", 36 | "tape": "^5.1.1" 37 | }, 38 | "license": "MIT", 39 | "author": { 40 | "name": "James Halliday", 41 | "email": "mail@substack.net", 42 | "url": "http://substack.net" 43 | }, 44 | "funding": { 45 | "url": "https://github.com/sponsors/ljharb" 46 | }, 47 | "dependencies": { 48 | "is-core-module": "^2.2.0", 49 | "path-parse": "^1.0.6" 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "max-lines": 0 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/dotdot.js: -------------------------------------------------------------------------------- 1 | var path = require('path'); 2 | var test = require('tape'); 3 | var resolve = require('../'); 4 | 5 | test('dotdot', function (t) { 6 | t.plan(4); 7 | var dir = path.join(__dirname, '/dotdot/abc'); 8 | 9 | resolve('..', { basedir: dir }, function (err, res, pkg) { 10 | t.ifError(err); 11 | t.equal(res, path.join(__dirname, 'dotdot/index.js')); 12 | }); 13 | 14 | resolve('.', { basedir: dir }, function (err, res, pkg) { 15 | t.ifError(err); 16 | t.equal(res, path.join(dir, 'index.js')); 17 | }); 18 | }); 19 | 20 | test('dotdot sync', function (t) { 21 | t.plan(2); 22 | var dir = path.join(__dirname, '/dotdot/abc'); 23 | 24 | var a = resolve.sync('..', { basedir: dir }); 25 | t.equal(a, path.join(__dirname, 'dotdot/index.js')); 26 | 27 | var b = resolve.sync('.', { basedir: dir }); 28 | t.equal(b, path.join(dir, 'index.js')); 29 | }); 30 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/dotdot/abc/index.js: -------------------------------------------------------------------------------- 1 | var x = require('..'); 2 | console.log(x); 3 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/dotdot/index.js: -------------------------------------------------------------------------------- 1 | module.exports = 'whatever'; 2 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/faulty_basedir.js: -------------------------------------------------------------------------------- 1 | var test = require('tape'); 2 | var path = require('path'); 3 | var resolve = require('../'); 4 | 5 | test('faulty basedir must produce error in windows', { skip: process.platform !== 'win32' }, function (t) { 6 | t.plan(1); 7 | 8 | var resolverDir = 'C:\\a\\b\\c\\d'; 9 | 10 | resolve('tape/lib/test.js', { basedir: resolverDir }, function (err, res, pkg) { 11 | t.equal(!!err, true); 12 | }); 13 | }); 14 | 15 | test('non-existent basedir should not throw when preserveSymlinks is false', function (t) { 16 | t.plan(2); 17 | 18 | var opts = { 19 | basedir: path.join(path.sep, 'unreal', 'path', 'that', 'does', 'not', 'exist'), 20 | preserveSymlinks: false 21 | }; 22 | 23 | var module = './dotdot/abc'; 24 | 25 | resolve(module, opts, function (err, res) { 26 | t.equal(err.code, 'MODULE_NOT_FOUND'); 27 | t.equal(res, undefined); 28 | }); 29 | }); 30 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/filter.js: -------------------------------------------------------------------------------- 1 | var path = require('path'); 2 | var test = require('tape'); 3 | var resolve = require('../'); 4 | 5 | test('filter', function (t) { 6 | t.plan(4); 7 | var dir = path.join(__dirname, 'resolver'); 8 | var packageFilterArgs; 9 | resolve('./baz', { 10 | basedir: dir, 11 | packageFilter: function (pkg, pkgfile) { 12 | pkg.main = 'doom'; // eslint-disable-line no-param-reassign 13 | packageFilterArgs = [pkg, pkgfile]; 14 | return pkg; 15 | } 16 | }, function (err, res, pkg) { 17 | if (err) t.fail(err); 18 | 19 | t.equal(res, path.join(dir, 'baz/doom.js'), 'changing the package "main" works'); 20 | 21 | var packageData = packageFilterArgs[0]; 22 | t.equal(pkg, packageData, 'first packageFilter argument is "pkg"'); 23 | t.equal(packageData.main, 'doom', 'package "main" was altered'); 24 | 25 | var packageFile = packageFilterArgs[1]; 26 | t.equal( 27 | packageFile, 28 | path.join(dir, 'baz/package.json'), 29 | 'second packageFilter argument is "pkgfile"' 30 | ); 31 | 32 | t.end(); 33 | }); 34 | }); 35 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/filter_sync.js: -------------------------------------------------------------------------------- 1 | var path = require('path'); 2 | var test = require('tape'); 3 | var resolve = require('../'); 4 | 5 | test('filter', function (t) { 6 | var dir = path.join(__dirname, 'resolver'); 7 | var packageFilterArgs; 8 | var res = resolve.sync('./baz', { 9 | basedir: dir, 10 | // NOTE: in v2.x, this will be `pkg, pkgfile, dir`, but must remain "broken" here in v1.x for compatibility 11 | packageFilter: function (pkg, /*pkgfile,*/ dir) { // eslint-disable-line spaced-comment 12 | pkg.main = 'doom'; // eslint-disable-line no-param-reassign 13 | packageFilterArgs = 'is 1.x' ? [pkg, dir] : [pkg, pkgfile, dir]; // eslint-disable-line no-constant-condition, no-undef 14 | return pkg; 15 | } 16 | }); 17 | 18 | t.equal(res, path.join(dir, 'baz/doom.js'), 'changing the package "main" works'); 19 | 20 | var packageData = packageFilterArgs[0]; 21 | t.equal(packageData.main, 'doom', 'package "main" was altered'); 22 | 23 | if (!'is 1.x') { // eslint-disable-line no-constant-condition 24 | var packageFile = packageFilterArgs[1]; 25 | t.equal(packageFile, path.join(dir, 'baz', 'package.json'), 'package.json path is correct'); 26 | } 27 | 28 | var packageDir = packageFilterArgs['is 1.x' ? 1 : 2]; // eslint-disable-line no-constant-condition 29 | // eslint-disable-next-line no-constant-condition 30 | t.equal(packageDir, path.join(dir, 'baz'), ('is 1.x' ? 'second' : 'third') + ' packageFilter argument is "dir"'); 31 | 32 | t.end(); 33 | }); 34 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/module_dir.js: -------------------------------------------------------------------------------- 1 | var path = require('path'); 2 | var test = require('tape'); 3 | var resolve = require('../'); 4 | 5 | test('moduleDirectory strings', function (t) { 6 | t.plan(4); 7 | var dir = path.join(__dirname, 'module_dir'); 8 | var xopts = { 9 | basedir: dir, 10 | moduleDirectory: 'xmodules' 11 | }; 12 | resolve('aaa', xopts, function (err, res, pkg) { 13 | t.ifError(err); 14 | t.equal(res, path.join(dir, '/xmodules/aaa/index.js')); 15 | }); 16 | 17 | var yopts = { 18 | basedir: dir, 19 | moduleDirectory: 'ymodules' 20 | }; 21 | resolve('aaa', yopts, function (err, res, pkg) { 22 | t.ifError(err); 23 | t.equal(res, path.join(dir, '/ymodules/aaa/index.js')); 24 | }); 25 | }); 26 | 27 | test('moduleDirectory array', function (t) { 28 | t.plan(6); 29 | var dir = path.join(__dirname, 'module_dir'); 30 | var aopts = { 31 | basedir: dir, 32 | moduleDirectory: ['xmodules', 'ymodules', 'zmodules'] 33 | }; 34 | resolve('aaa', aopts, function (err, res, pkg) { 35 | t.ifError(err); 36 | t.equal(res, path.join(dir, '/xmodules/aaa/index.js')); 37 | }); 38 | 39 | var bopts = { 40 | basedir: dir, 41 | moduleDirectory: ['zmodules', 'ymodules', 'xmodules'] 42 | }; 43 | resolve('aaa', bopts, function (err, res, pkg) { 44 | t.ifError(err); 45 | t.equal(res, path.join(dir, '/ymodules/aaa/index.js')); 46 | }); 47 | 48 | var copts = { 49 | basedir: dir, 50 | moduleDirectory: ['xmodules', 'ymodules', 'zmodules'] 51 | }; 52 | resolve('bbb', copts, function (err, res, pkg) { 53 | t.ifError(err); 54 | t.equal(res, path.join(dir, '/zmodules/bbb/main.js')); 55 | }); 56 | }); 57 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/module_dir/xmodules/aaa/index.js: -------------------------------------------------------------------------------- 1 | module.exports = function (x) { return x * 100; }; 2 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/module_dir/ymodules/aaa/index.js: -------------------------------------------------------------------------------- 1 | module.exports = function (x) { return x + 100; }; 2 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/module_dir/zmodules/bbb/main.js: -------------------------------------------------------------------------------- 1 | module.exports = function (n) { return n * 111; }; 2 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/module_dir/zmodules/bbb/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "main": "main.js" 3 | } 4 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/node_path/x/aaa/index.js: -------------------------------------------------------------------------------- 1 | module.exports = 'A'; 2 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/node_path/x/ccc/index.js: -------------------------------------------------------------------------------- 1 | module.exports = 'C'; 2 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/node_path/y/bbb/index.js: -------------------------------------------------------------------------------- 1 | module.exports = 'B'; 2 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/node_path/y/ccc/index.js: -------------------------------------------------------------------------------- 1 | module.exports = 'CY'; 2 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/nonstring.js: -------------------------------------------------------------------------------- 1 | var test = require('tape'); 2 | var resolve = require('../'); 3 | 4 | test('nonstring', function (t) { 5 | t.plan(1); 6 | resolve(555, function (err, res, pkg) { 7 | t.ok(err); 8 | }); 9 | }); 10 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/pathfilter/deep_ref/main.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paytabscom/flutter-sdk-bridge/51f5d7ab5f6f7eed0ee7b1add9c902091ead5def/example/ios/node_modules/resolve/test/pathfilter/deep_ref/main.js -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/precedence.js: -------------------------------------------------------------------------------- 1 | var path = require('path'); 2 | var test = require('tape'); 3 | var resolve = require('../'); 4 | 5 | test('precedence', function (t) { 6 | t.plan(3); 7 | var dir = path.join(__dirname, 'precedence/aaa'); 8 | 9 | resolve('./', { basedir: dir }, function (err, res, pkg) { 10 | t.ifError(err); 11 | t.equal(res, path.join(dir, 'index.js')); 12 | t.equal(pkg.name, 'resolve'); 13 | }); 14 | }); 15 | 16 | test('./ should not load ${dir}.js', function (t) { // eslint-disable-line no-template-curly-in-string 17 | t.plan(1); 18 | var dir = path.join(__dirname, 'precedence/bbb'); 19 | 20 | resolve('./', { basedir: dir }, function (err, res, pkg) { 21 | t.ok(err); 22 | }); 23 | }); 24 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/precedence/aaa.js: -------------------------------------------------------------------------------- 1 | module.exports = 'wtf'; 2 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/precedence/aaa/index.js: -------------------------------------------------------------------------------- 1 | module.exports = 'okok'; 2 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/precedence/aaa/main.js: -------------------------------------------------------------------------------- 1 | console.log(require('./')); 2 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/precedence/bbb.js: -------------------------------------------------------------------------------- 1 | module.exports = '>_<'; 2 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/precedence/bbb/main.js: -------------------------------------------------------------------------------- 1 | console.log(require('./')); // should throw 2 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/resolver/baz/doom.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paytabscom/flutter-sdk-bridge/51f5d7ab5f6f7eed0ee7b1add9c902091ead5def/example/ios/node_modules/resolve/test/resolver/baz/doom.js -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/resolver/baz/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "baz", 3 | "main": "quux.js" 4 | } 5 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/resolver/baz/quux.js: -------------------------------------------------------------------------------- 1 | module.exports = 1; 2 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/resolver/browser_field/a.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paytabscom/flutter-sdk-bridge/51f5d7ab5f6f7eed0ee7b1add9c902091ead5def/example/ios/node_modules/resolve/test/resolver/browser_field/a.js -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/resolver/browser_field/b.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paytabscom/flutter-sdk-bridge/51f5d7ab5f6f7eed0ee7b1add9c902091ead5def/example/ios/node_modules/resolve/test/resolver/browser_field/b.js -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/resolver/browser_field/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "browser_field", 3 | "main": "a", 4 | "browser": "b" 5 | } 6 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/resolver/cup.coffee: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/resolver/dot_main/index.js: -------------------------------------------------------------------------------- 1 | module.exports = 1; 2 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/resolver/dot_main/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "main": "." 3 | } 4 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/resolver/dot_slash_main/index.js: -------------------------------------------------------------------------------- 1 | module.exports = 1; 2 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/resolver/dot_slash_main/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "main": "./" 3 | } 4 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/resolver/foo.js: -------------------------------------------------------------------------------- 1 | module.exports = 1; 2 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/resolver/incorrect_main/index.js: -------------------------------------------------------------------------------- 1 | // this is the actual main file 'index.js', not 'wrong.js' like the package.json would indicate 2 | module.exports = 1; 3 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/resolver/incorrect_main/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "main": "wrong.js" 3 | } 4 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/resolver/invalid_main/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "invalid main", 3 | "main": [ 4 | "why is this a thing", 5 | "srsly omg wtf" 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/resolver/mug.coffee: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paytabscom/flutter-sdk-bridge/51f5d7ab5f6f7eed0ee7b1add9c902091ead5def/example/ios/node_modules/resolve/test/resolver/mug.coffee -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/resolver/mug.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paytabscom/flutter-sdk-bridge/51f5d7ab5f6f7eed0ee7b1add9c902091ead5def/example/ios/node_modules/resolve/test/resolver/mug.js -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/resolver/multirepo/lerna.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": [ 3 | "packages/*" 4 | ], 5 | "version": "0.0.0" 6 | } 7 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/resolver/multirepo/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "monorepo-symlink-test", 3 | "private": true, 4 | "version": "0.0.0", 5 | "description": "", 6 | "main": "index.js", 7 | "scripts": { 8 | "postinstall": "lerna bootstrap", 9 | "test": "node packages/package-a" 10 | }, 11 | "author": "", 12 | "license": "MIT", 13 | "dependencies": { 14 | "jquery": "^3.3.1", 15 | "resolve": "../../../" 16 | }, 17 | "devDependencies": { 18 | "lerna": "^3.4.3" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/resolver/multirepo/packages/package-a/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var assert = require('assert'); 4 | var path = require('path'); 5 | var resolve = require('resolve'); 6 | 7 | var basedir = __dirname + '/node_modules/@my-scope/package-b'; 8 | 9 | var expected = path.join(__dirname, '../../node_modules/jquery/dist/jquery.js'); 10 | 11 | /* 12 | * preserveSymlinks === false 13 | * will search NPM package from 14 | * - packages/package-b/node_modules 15 | * - packages/node_modules 16 | * - node_modules 17 | */ 18 | assert.equal(resolve.sync('jquery', { basedir: basedir, preserveSymlinks: false }), expected); 19 | assert.equal(resolve.sync('../../node_modules/jquery', { basedir: basedir, preserveSymlinks: false }), expected); 20 | 21 | /* 22 | * preserveSymlinks === true 23 | * will search NPM package from 24 | * - packages/package-a/node_modules/@my-scope/packages/package-b/node_modules 25 | * - packages/package-a/node_modules/@my-scope/packages/node_modules 26 | * - packages/package-a/node_modules/@my-scope/node_modules 27 | * - packages/package-a/node_modules/node_modules 28 | * - packages/package-a/node_modules 29 | * - packages/node_modules 30 | * - node_modules 31 | */ 32 | assert.equal(resolve.sync('jquery', { basedir: basedir, preserveSymlinks: true }), expected); 33 | assert.equal(resolve.sync('../../../../../node_modules/jquery', { basedir: basedir, preserveSymlinks: true }), expected); 34 | 35 | console.log(' * all monorepo paths successfully resolved through symlinks'); 36 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/resolver/multirepo/packages/package-a/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@my-scope/package-a", 3 | "version": "0.0.0", 4 | "private": true, 5 | "description": "", 6 | "license": "MIT", 7 | "main": "index.js", 8 | "scripts": { 9 | "test": "echo \"Error: run tests from root\" && exit 1" 10 | }, 11 | "dependencies": { 12 | "@my-scope/package-b": "^0.0.0" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/resolver/multirepo/packages/package-b/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paytabscom/flutter-sdk-bridge/51f5d7ab5f6f7eed0ee7b1add9c902091ead5def/example/ios/node_modules/resolve/test/resolver/multirepo/packages/package-b/index.js -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/resolver/multirepo/packages/package-b/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@my-scope/package-b", 3 | "private": true, 4 | "version": "0.0.0", 5 | "description": "", 6 | "license": "MIT", 7 | "main": "index.js", 8 | "scripts": { 9 | "test": "echo \"Error: run tests from root\" && exit 1" 10 | }, 11 | "dependencies": { 12 | "@my-scope/package-a": "^0.0.0" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/resolver/nested_symlinks/mylib/async.js: -------------------------------------------------------------------------------- 1 | var a = require.resolve('buffer/').replace(process.cwd(), '$CWD'); 2 | var b; 3 | var c; 4 | 5 | var test = function test() { 6 | console.log(a, ': require.resolve, preserveSymlinks ' + (process.execArgv.indexOf('preserve-symlinks') > -1 ? 'true' : 'false')); 7 | console.log(b, ': preserveSymlinks true'); 8 | console.log(c, ': preserveSymlinks false'); 9 | 10 | if (a !== b && a !== c) { 11 | throw 'async: no match'; 12 | } 13 | console.log('async: success! a matched either b or c\n'); 14 | }; 15 | 16 | require('resolve')('buffer/', { preserveSymlinks: true }, function (err, result) { 17 | if (err) { throw err; } 18 | b = result.replace(process.cwd(), '$CWD'); 19 | if (b && c) { test(); } 20 | }); 21 | require('resolve')('buffer/', { preserveSymlinks: false }, function (err, result) { 22 | if (err) { throw err; } 23 | c = result.replace(process.cwd(), '$CWD'); 24 | if (b && c) { test(); } 25 | }); 26 | 27 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/resolver/nested_symlinks/mylib/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "mylib", 3 | "version": "0.0.0", 4 | "description": "", 5 | "private": true, 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "keywords": [], 10 | "author": "", 11 | "license": "ISC", 12 | "dependencies": { 13 | "buffer": "*" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/resolver/nested_symlinks/mylib/sync.js: -------------------------------------------------------------------------------- 1 | var a = require.resolve('buffer/').replace(process.cwd(), '$CWD'); 2 | var b = require('resolve').sync('buffer/', { preserveSymlinks: true }).replace(process.cwd(), '$CWD'); 3 | var c = require('resolve').sync('buffer/', { preserveSymlinks: false }).replace(process.cwd(), '$CWD'); 4 | 5 | console.log(a, ': require.resolve, preserveSymlinks ' + (process.execArgv.indexOf('preserve-symlinks') > -1 ? 'true' : 'false')); 6 | console.log(b, ': preserveSymlinks true'); 7 | console.log(c, ': preserveSymlinks false'); 8 | 9 | if (a !== b && a !== c) { 10 | throw 'sync: no match'; 11 | } 12 | console.log('sync: success! a matched either b or c\n'); 13 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/resolver/other_path/lib/other-lib.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paytabscom/flutter-sdk-bridge/51f5d7ab5f6f7eed0ee7b1add9c902091ead5def/example/ios/node_modules/resolve/test/resolver/other_path/lib/other-lib.js -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/resolver/other_path/root.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paytabscom/flutter-sdk-bridge/51f5d7ab5f6f7eed0ee7b1add9c902091ead5def/example/ios/node_modules/resolve/test/resolver/other_path/root.js -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/resolver/quux/foo/index.js: -------------------------------------------------------------------------------- 1 | module.exports = 1; 2 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/resolver/same_names/foo.js: -------------------------------------------------------------------------------- 1 | module.exports = 42; 2 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/resolver/same_names/foo/index.js: -------------------------------------------------------------------------------- 1 | module.exports = 1; 2 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/resolver/symlinked/_/node_modules/foo.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paytabscom/flutter-sdk-bridge/51f5d7ab5f6f7eed0ee7b1add9c902091ead5def/example/ios/node_modules/resolve/test/resolver/symlinked/_/node_modules/foo.js -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/resolver/symlinked/_/symlink_target/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paytabscom/flutter-sdk-bridge/51f5d7ab5f6f7eed0ee7b1add9c902091ead5def/example/ios/node_modules/resolve/test/resolver/symlinked/_/symlink_target/.gitkeep -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/resolver/symlinked/package/bar.js: -------------------------------------------------------------------------------- 1 | module.exports = 'bar'; 2 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/resolver/symlinked/package/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "main": "bar.js" 3 | } -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/resolver/without_basedir/main.js: -------------------------------------------------------------------------------- 1 | var resolve = require('../../../'); 2 | 3 | module.exports = function (t, cb) { 4 | resolve('mymodule', null, cb); 5 | }; 6 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/shadowed_core.js: -------------------------------------------------------------------------------- 1 | var test = require('tape'); 2 | var resolve = require('../'); 3 | var path = require('path'); 4 | 5 | test('shadowed core modules still return core module', function (t) { 6 | t.plan(2); 7 | 8 | resolve('util', { basedir: path.join(__dirname, 'shadowed_core') }, function (err, res) { 9 | t.ifError(err); 10 | t.equal(res, 'util'); 11 | }); 12 | }); 13 | 14 | test('shadowed core modules still return core module [sync]', function (t) { 15 | t.plan(1); 16 | 17 | var res = resolve.sync('util', { basedir: path.join(__dirname, 'shadowed_core') }); 18 | 19 | t.equal(res, 'util'); 20 | }); 21 | 22 | test('shadowed core modules return shadow when appending `/`', function (t) { 23 | t.plan(2); 24 | 25 | resolve('util/', { basedir: path.join(__dirname, 'shadowed_core') }, function (err, res) { 26 | t.ifError(err); 27 | t.equal(res, path.join(__dirname, 'shadowed_core/node_modules/util/index.js')); 28 | }); 29 | }); 30 | 31 | test('shadowed core modules return shadow when appending `/` [sync]', function (t) { 32 | t.plan(1); 33 | 34 | var res = resolve.sync('util/', { basedir: path.join(__dirname, 'shadowed_core') }); 35 | 36 | t.equal(res, path.join(__dirname, 'shadowed_core/node_modules/util/index.js')); 37 | }); 38 | 39 | test('shadowed core modules return shadow with `includeCoreModules: false`', function (t) { 40 | t.plan(2); 41 | 42 | resolve('util', { basedir: path.join(__dirname, 'shadowed_core'), includeCoreModules: false }, function (err, res) { 43 | t.ifError(err); 44 | t.equal(res, path.join(__dirname, 'shadowed_core/node_modules/util/index.js')); 45 | }); 46 | }); 47 | 48 | test('shadowed core modules return shadow with `includeCoreModules: false` [sync]', function (t) { 49 | t.plan(1); 50 | 51 | var res = resolve.sync('util', { basedir: path.join(__dirname, 'shadowed_core'), includeCoreModules: false }); 52 | 53 | t.equal(res, path.join(__dirname, 'shadowed_core/node_modules/util/index.js')); 54 | }); 55 | -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/shadowed_core/node_modules/util/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paytabscom/flutter-sdk-bridge/51f5d7ab5f6f7eed0ee7b1add9c902091ead5def/example/ios/node_modules/resolve/test/shadowed_core/node_modules/util/index.js -------------------------------------------------------------------------------- /example/ios/node_modules/resolve/test/subdirs.js: -------------------------------------------------------------------------------- 1 | var test = require('tape'); 2 | var resolve = require('../'); 3 | var path = require('path'); 4 | 5 | test('subdirs', function (t) { 6 | t.plan(2); 7 | 8 | var dir = path.join(__dirname, '/subdirs'); 9 | resolve('a/b/c/x.json', { basedir: dir }, function (err, res) { 10 | t.ifError(err); 11 | t.equal(res, path.join(dir, 'node_modules/a/b/c/x.json')); 12 | }); 13 | }); 14 | -------------------------------------------------------------------------------- /example/ios/node_modules/shelljs/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012, Artur Adib 2 | All rights reserved. 3 | 4 | You may use this project under the terms of the New BSD license as follows: 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | * Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | * Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | * Neither the name of Artur Adib nor the 14 | names of the contributors may be used to endorse or promote products 15 | derived from this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | ARE DISCLAIMED. IN NO EVENT SHALL ARTUR ADIB BE LIABLE FOR ANY 21 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 22 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 23 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 24 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 | THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | -------------------------------------------------------------------------------- /example/ios/node_modules/shelljs/bin/shjs: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | if (require.main !== module) { 4 | throw new Error('Executable-only module should not be required'); 5 | } 6 | 7 | // we must import global ShellJS methods after the require.main check to prevent the global 8 | // namespace from being polluted if the error is caught 9 | require('../global'); 10 | 11 | function exitWithErrorMessage(msg) { 12 | console.log(msg); 13 | console.log(); 14 | process.exit(1); 15 | } 16 | 17 | if (process.argv.length < 3) { 18 | exitWithErrorMessage('ShellJS: missing argument (script name)'); 19 | } 20 | 21 | var args, 22 | scriptName = process.argv[2]; 23 | env['NODE_PATH'] = __dirname + '/../..'; 24 | 25 | if (!scriptName.match(/\.js/) && !scriptName.match(/\.coffee/)) { 26 | if (test('-f', scriptName + '.js')) 27 | scriptName += '.js'; 28 | if (test('-f', scriptName + '.coffee')) 29 | scriptName += '.coffee'; 30 | } 31 | 32 | if (!test('-f', scriptName)) { 33 | exitWithErrorMessage('ShellJS: script not found ('+scriptName+')'); 34 | } 35 | 36 | args = process.argv.slice(3); 37 | 38 | for (var i = 0, l = args.length; i < l; i++) { 39 | if (args[i][0] !== "-"){ 40 | args[i] = '"' + args[i] + '"'; // fixes arguments with multiple words 41 | } 42 | } 43 | 44 | var path = require('path'); 45 | var extensions = require('interpret').extensions; 46 | var rechoir = require('rechoir'); 47 | rechoir.prepare(extensions, scriptName); 48 | require(require.resolve(path.resolve(process.cwd(), scriptName))); 49 | -------------------------------------------------------------------------------- /example/ios/node_modules/shelljs/commands.js: -------------------------------------------------------------------------------- 1 | module.exports = [ 2 | 'cat', 3 | 'cd', 4 | 'chmod', 5 | 'cp', 6 | 'dirs', 7 | 'echo', 8 | 'exec', 9 | 'find', 10 | 'grep', 11 | 'head', 12 | 'ln', 13 | 'ls', 14 | 'mkdir', 15 | 'mv', 16 | 'pwd', 17 | 'rm', 18 | 'sed', 19 | 'set', 20 | 'sort', 21 | 'tail', 22 | 'tempdir', 23 | 'test', 24 | 'to', 25 | 'toEnd', 26 | 'touch', 27 | 'uniq', 28 | 'which', 29 | ]; 30 | -------------------------------------------------------------------------------- /example/ios/node_modules/shelljs/global.js: -------------------------------------------------------------------------------- 1 | /* eslint no-extend-native: 0 */ 2 | var shell = require('./shell.js'); 3 | var common = require('./src/common'); 4 | Object.keys(shell).forEach(function (cmd) { 5 | global[cmd] = shell[cmd]; 6 | }); 7 | 8 | var _to = require('./src/to'); 9 | String.prototype.to = common.wrap('to', _to); 10 | 11 | var _toEnd = require('./src/toEnd'); 12 | String.prototype.toEnd = common.wrap('toEnd', _toEnd); 13 | -------------------------------------------------------------------------------- /example/ios/node_modules/shelljs/make.js: -------------------------------------------------------------------------------- 1 | require('./global'); 2 | 3 | global.config.fatal = true; 4 | global.target = {}; 5 | 6 | var args = process.argv.slice(2), 7 | targetArgs, 8 | dashesLoc = args.indexOf('--'); 9 | 10 | // split args, everything after -- if only for targets 11 | if (dashesLoc > -1) { 12 | targetArgs = args.slice(dashesLoc + 1, args.length); 13 | args = args.slice(0, dashesLoc); 14 | } 15 | 16 | // This ensures we only execute the script targets after the entire script has 17 | // been evaluated 18 | setTimeout(function() { 19 | var t; 20 | 21 | if (args.length === 1 && args[0] === '--help') { 22 | console.log('Available targets:'); 23 | for (t in global.target) 24 | console.log(' ' + t); 25 | return; 26 | } 27 | 28 | // Wrap targets to prevent duplicate execution 29 | for (t in global.target) { 30 | (function(t, oldTarget){ 31 | 32 | // Wrap it 33 | global.target[t] = function() { 34 | if (!oldTarget.done){ 35 | oldTarget.done = true; 36 | oldTarget.result = oldTarget.apply(oldTarget, arguments); 37 | } 38 | return oldTarget.result; 39 | }; 40 | 41 | })(t, global.target[t]); 42 | } 43 | 44 | // Execute desired targets 45 | if (args.length > 0) { 46 | args.forEach(function(arg) { 47 | if (arg in global.target) 48 | global.target[arg](targetArgs); 49 | else { 50 | console.log('no such target: ' + arg); 51 | } 52 | }); 53 | } else if ('all' in global.target) { 54 | global.target.all(targetArgs); 55 | } 56 | 57 | }, 0); 58 | -------------------------------------------------------------------------------- /example/ios/node_modules/shelljs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "shelljs", 3 | "version": "0.8.4", 4 | "description": "Portable Unix shell commands for Node.js", 5 | "keywords": [ 6 | "shelljs", 7 | "bash", 8 | "unix", 9 | "shell", 10 | "makefile", 11 | "make", 12 | "jake", 13 | "synchronous" 14 | ], 15 | "contributors": [ 16 | "Nate Fischer (https://github.com/nfischer)", 17 | "Brandon Freitag (https://github.com/freitagbr)" 18 | ], 19 | "repository": { 20 | "type": "git", 21 | "url": "git://github.com/shelljs/shelljs.git" 22 | }, 23 | "license": "BSD-3-Clause", 24 | "homepage": "http://github.com/shelljs/shelljs", 25 | "main": "./shell.js", 26 | "files": [ 27 | "commands.js", 28 | "global.js", 29 | "make.js", 30 | "plugin.js", 31 | "shell.js", 32 | "bin", 33 | "src" 34 | ], 35 | "scripts": { 36 | "ci-or-install": "node scripts/ci-or-install", 37 | "posttest": "npm run lint", 38 | "test": "nyc --reporter=text --reporter=lcov ava test/*.js", 39 | "test-no-coverage": "ava test/*.js", 40 | "gendocs": "node scripts/generate-docs", 41 | "lint": "eslint .", 42 | "after-travis": "travis-check-changes", 43 | "changelog": "shelljs-changelog", 44 | "codecov": "codecov", 45 | "release:major": "shelljs-release major", 46 | "release:minor": "shelljs-release minor", 47 | "release:patch": "shelljs-release patch" 48 | }, 49 | "bin": { 50 | "shjs": "./bin/shjs" 51 | }, 52 | "dependencies": { 53 | "glob": "^7.0.0", 54 | "interpret": "^1.0.0", 55 | "rechoir": "^0.6.2" 56 | }, 57 | "ava": { 58 | "serial": true, 59 | "powerAssert": false 60 | }, 61 | "devDependencies": { 62 | "ava": "^0.21.0", 63 | "chalk": "^1.1.3", 64 | "codecov": "^3.0.2", 65 | "coffee-script": "^1.10.0", 66 | "eslint": "^2.0.0", 67 | "eslint-config-airbnb-base": "^3.0.0", 68 | "eslint-plugin-import": "^1.11.1", 69 | "nyc": "^11.3.0", 70 | "shelljs-changelog": "^0.2.0", 71 | "shelljs-release": "^0.3.0", 72 | "shx": "^0.2.0", 73 | "travis-check-changes": "^0.2.0" 74 | }, 75 | "optionalDependencies": {}, 76 | "engines": { 77 | "node": ">=4" 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /example/ios/node_modules/shelljs/plugin.js: -------------------------------------------------------------------------------- 1 | // Various utilties exposed to plugins 2 | 3 | require('./shell'); // Create the ShellJS instance (mandatory) 4 | 5 | var common = require('./src/common'); 6 | 7 | var exportedAttributes = [ 8 | 'error', // For signaling errors from within commands 9 | 'parseOptions', // For custom option parsing 10 | 'readFromPipe', // For commands with the .canReceivePipe attribute 11 | 'register', // For registering plugins 12 | ]; 13 | 14 | exportedAttributes.forEach(function (attr) { 15 | exports[attr] = common[attr]; 16 | }); 17 | -------------------------------------------------------------------------------- /example/ios/node_modules/shelljs/src/cat.js: -------------------------------------------------------------------------------- 1 | var common = require('./common'); 2 | var fs = require('fs'); 3 | 4 | common.register('cat', _cat, { 5 | canReceivePipe: true, 6 | cmdOptions: { 7 | 'n': 'number', 8 | }, 9 | }); 10 | 11 | //@ 12 | //@ ### cat([options,] file [, file ...]) 13 | //@ ### cat([options,] file_array) 14 | //@ 15 | //@ Available options: 16 | //@ 17 | //@ + `-n`: number all output lines 18 | //@ 19 | //@ Examples: 20 | //@ 21 | //@ ```javascript 22 | //@ var str = cat('file*.txt'); 23 | //@ var str = cat('file1', 'file2'); 24 | //@ var str = cat(['file1', 'file2']); // same as above 25 | //@ ``` 26 | //@ 27 | //@ Returns a string containing the given file, or a concatenated string 28 | //@ containing the files if more than one file is given (a new line character is 29 | //@ introduced between each file). 30 | function _cat(options, files) { 31 | var cat = common.readFromPipe(); 32 | 33 | if (!files && !cat) common.error('no paths given'); 34 | 35 | files = [].slice.call(arguments, 1); 36 | 37 | files.forEach(function (file) { 38 | if (!fs.existsSync(file)) { 39 | common.error('no such file or directory: ' + file); 40 | } else if (common.statFollowLinks(file).isDirectory()) { 41 | common.error(file + ': Is a directory'); 42 | } 43 | 44 | cat += fs.readFileSync(file, 'utf8'); 45 | }); 46 | 47 | if (options.number) { 48 | cat = addNumbers(cat); 49 | } 50 | 51 | return cat; 52 | } 53 | module.exports = _cat; 54 | 55 | function addNumbers(cat) { 56 | var lines = cat.split('\n'); 57 | var lastLine = lines.pop(); 58 | 59 | lines = lines.map(function (line, i) { 60 | return numberedLine(i + 1, line); 61 | }); 62 | 63 | if (lastLine.length) { 64 | lastLine = numberedLine(lines.length + 1, lastLine); 65 | } 66 | lines.push(lastLine); 67 | 68 | return lines.join('\n'); 69 | } 70 | 71 | function numberedLine(n, line) { 72 | // GNU cat use six pad start number + tab. See http://lingrok.org/xref/coreutils/src/cat.c#57 73 | // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padStart 74 | var number = (' ' + n).slice(-6) + '\t'; 75 | return number + line; 76 | } 77 | -------------------------------------------------------------------------------- /example/ios/node_modules/shelljs/src/cd.js: -------------------------------------------------------------------------------- 1 | var os = require('os'); 2 | var common = require('./common'); 3 | 4 | common.register('cd', _cd, {}); 5 | 6 | //@ 7 | //@ ### cd([dir]) 8 | //@ 9 | //@ Changes to directory `dir` for the duration of the script. Changes to home 10 | //@ directory if no argument is supplied. 11 | function _cd(options, dir) { 12 | if (!dir) dir = os.homedir(); 13 | 14 | if (dir === '-') { 15 | if (!process.env.OLDPWD) { 16 | common.error('could not find previous directory'); 17 | } else { 18 | dir = process.env.OLDPWD; 19 | } 20 | } 21 | 22 | try { 23 | var curDir = process.cwd(); 24 | process.chdir(dir); 25 | process.env.OLDPWD = curDir; 26 | } catch (e) { 27 | // something went wrong, let's figure out the error 28 | var err; 29 | try { 30 | common.statFollowLinks(dir); // if this succeeds, it must be some sort of file 31 | err = 'not a directory: ' + dir; 32 | } catch (e2) { 33 | err = 'no such file or directory: ' + dir; 34 | } 35 | if (err) common.error(err); 36 | } 37 | return ''; 38 | } 39 | module.exports = _cd; 40 | -------------------------------------------------------------------------------- /example/ios/node_modules/shelljs/src/echo.js: -------------------------------------------------------------------------------- 1 | var format = require('util').format; 2 | 3 | var common = require('./common'); 4 | 5 | common.register('echo', _echo, { 6 | allowGlobbing: false, 7 | }); 8 | 9 | //@ 10 | //@ ### echo([options,] string [, string ...]) 11 | //@ 12 | //@ Available options: 13 | //@ 14 | //@ + `-e`: interpret backslash escapes (default) 15 | //@ + `-n`: remove trailing newline from output 16 | //@ 17 | //@ Examples: 18 | //@ 19 | //@ ```javascript 20 | //@ echo('hello world'); 21 | //@ var str = echo('hello world'); 22 | //@ echo('-n', 'no newline at end'); 23 | //@ ``` 24 | //@ 25 | //@ Prints `string` to stdout, and returns string with additional utility methods 26 | //@ like `.to()`. 27 | function _echo(opts) { 28 | // allow strings starting with '-', see issue #20 29 | var messages = [].slice.call(arguments, opts ? 0 : 1); 30 | var options = {}; 31 | 32 | // If the first argument starts with '-', parse it as options string. 33 | // If parseOptions throws, it wasn't an options string. 34 | try { 35 | options = common.parseOptions(messages[0], { 36 | 'e': 'escapes', 37 | 'n': 'no_newline', 38 | }, { 39 | silent: true, 40 | }); 41 | 42 | // Allow null to be echoed 43 | if (messages[0]) { 44 | messages.shift(); 45 | } 46 | } catch (_) { 47 | // Clear out error if an error occurred 48 | common.state.error = null; 49 | } 50 | 51 | var output = format.apply(null, messages); 52 | 53 | // Add newline if -n is not passed. 54 | if (!options.no_newline) { 55 | output += '\n'; 56 | } 57 | 58 | process.stdout.write(output); 59 | 60 | return output; 61 | } 62 | 63 | module.exports = _echo; 64 | -------------------------------------------------------------------------------- /example/ios/node_modules/shelljs/src/error.js: -------------------------------------------------------------------------------- 1 | var common = require('./common'); 2 | 3 | //@ 4 | //@ ### error() 5 | //@ 6 | //@ Tests if error occurred in the last command. Returns a truthy value if an 7 | //@ error returned, or a falsy value otherwise. 8 | //@ 9 | //@ **Note**: do not rely on the 10 | //@ return value to be an error message. If you need the last error message, use 11 | //@ the `.stderr` attribute from the last command's return value instead. 12 | function error() { 13 | return common.state.error; 14 | } 15 | module.exports = error; 16 | -------------------------------------------------------------------------------- /example/ios/node_modules/shelljs/src/exec-child.js: -------------------------------------------------------------------------------- 1 | if (require.main !== module) { 2 | throw new Error('This file should not be required'); 3 | } 4 | 5 | var childProcess = require('child_process'); 6 | var fs = require('fs'); 7 | 8 | var paramFilePath = process.argv[2]; 9 | 10 | var serializedParams = fs.readFileSync(paramFilePath, 'utf8'); 11 | var params = JSON.parse(serializedParams); 12 | 13 | var cmd = params.command; 14 | var execOptions = params.execOptions; 15 | var pipe = params.pipe; 16 | var stdoutFile = params.stdoutFile; 17 | var stderrFile = params.stderrFile; 18 | 19 | var c = childProcess.exec(cmd, execOptions, function (err) { 20 | if (!err) { 21 | process.exitCode = 0; 22 | } else if (err.code === undefined) { 23 | process.exitCode = 1; 24 | } else { 25 | process.exitCode = err.code; 26 | } 27 | }); 28 | 29 | var stdoutStream = fs.createWriteStream(stdoutFile); 30 | var stderrStream = fs.createWriteStream(stderrFile); 31 | 32 | c.stdout.pipe(stdoutStream); 33 | c.stderr.pipe(stderrStream); 34 | c.stdout.pipe(process.stdout); 35 | c.stderr.pipe(process.stderr); 36 | 37 | if (pipe) { 38 | c.stdin.end(pipe); 39 | } 40 | -------------------------------------------------------------------------------- /example/ios/node_modules/shelljs/src/find.js: -------------------------------------------------------------------------------- 1 | var path = require('path'); 2 | var common = require('./common'); 3 | var _ls = require('./ls'); 4 | 5 | common.register('find', _find, {}); 6 | 7 | //@ 8 | //@ ### find(path [, path ...]) 9 | //@ ### find(path_array) 10 | //@ 11 | //@ Examples: 12 | //@ 13 | //@ ```javascript 14 | //@ find('src', 'lib'); 15 | //@ find(['src', 'lib']); // same as above 16 | //@ find('.').filter(function(file) { return file.match(/\.js$/); }); 17 | //@ ``` 18 | //@ 19 | //@ Returns array of all files (however deep) in the given paths. 20 | //@ 21 | //@ The main difference from `ls('-R', path)` is that the resulting file names 22 | //@ include the base directories (e.g., `lib/resources/file1` instead of just `file1`). 23 | function _find(options, paths) { 24 | if (!paths) { 25 | common.error('no path specified'); 26 | } else if (typeof paths === 'string') { 27 | paths = [].slice.call(arguments, 1); 28 | } 29 | 30 | var list = []; 31 | 32 | function pushFile(file) { 33 | if (process.platform === 'win32') { 34 | file = file.replace(/\\/g, '/'); 35 | } 36 | list.push(file); 37 | } 38 | 39 | // why not simply do `ls('-R', paths)`? because the output wouldn't give the base dirs 40 | // to get the base dir in the output, we need instead `ls('-R', 'dir/*')` for every directory 41 | 42 | paths.forEach(function (file) { 43 | var stat; 44 | try { 45 | stat = common.statFollowLinks(file); 46 | } catch (e) { 47 | common.error('no such file or directory: ' + file); 48 | } 49 | 50 | pushFile(file); 51 | 52 | if (stat.isDirectory()) { 53 | _ls({ recursive: true, all: true }, file).forEach(function (subfile) { 54 | pushFile(path.join(file, subfile)); 55 | }); 56 | } 57 | }); 58 | 59 | return list; 60 | } 61 | module.exports = _find; 62 | -------------------------------------------------------------------------------- /example/ios/node_modules/shelljs/src/grep.js: -------------------------------------------------------------------------------- 1 | var common = require('./common'); 2 | var fs = require('fs'); 3 | 4 | common.register('grep', _grep, { 5 | globStart: 2, // don't glob-expand the regex 6 | canReceivePipe: true, 7 | cmdOptions: { 8 | 'v': 'inverse', 9 | 'l': 'nameOnly', 10 | 'i': 'ignoreCase', 11 | }, 12 | }); 13 | 14 | //@ 15 | //@ ### grep([options,] regex_filter, file [, file ...]) 16 | //@ ### grep([options,] regex_filter, file_array) 17 | //@ 18 | //@ Available options: 19 | //@ 20 | //@ + `-v`: Invert `regex_filter` (only print non-matching lines). 21 | //@ + `-l`: Print only filenames of matching files. 22 | //@ + `-i`: Ignore case. 23 | //@ 24 | //@ Examples: 25 | //@ 26 | //@ ```javascript 27 | //@ grep('-v', 'GLOBAL_VARIABLE', '*.js'); 28 | //@ grep('GLOBAL_VARIABLE', '*.js'); 29 | //@ ``` 30 | //@ 31 | //@ Reads input string from given files and returns a string containing all lines of the 32 | //@ file that match the given `regex_filter`. 33 | function _grep(options, regex, files) { 34 | // Check if this is coming from a pipe 35 | var pipe = common.readFromPipe(); 36 | 37 | if (!files && !pipe) common.error('no paths given', 2); 38 | 39 | files = [].slice.call(arguments, 2); 40 | 41 | if (pipe) { 42 | files.unshift('-'); 43 | } 44 | 45 | var grep = []; 46 | if (options.ignoreCase) { 47 | regex = new RegExp(regex, 'i'); 48 | } 49 | files.forEach(function (file) { 50 | if (!fs.existsSync(file) && file !== '-') { 51 | common.error('no such file or directory: ' + file, 2, { continue: true }); 52 | return; 53 | } 54 | 55 | var contents = file === '-' ? pipe : fs.readFileSync(file, 'utf8'); 56 | if (options.nameOnly) { 57 | if (contents.match(regex)) { 58 | grep.push(file); 59 | } 60 | } else { 61 | var lines = contents.split('\n'); 62 | lines.forEach(function (line) { 63 | var matched = line.match(regex); 64 | if ((options.inverse && !matched) || (!options.inverse && matched)) { 65 | grep.push(line); 66 | } 67 | }); 68 | } 69 | }); 70 | 71 | return grep.join('\n') + '\n'; 72 | } 73 | module.exports = _grep; 74 | -------------------------------------------------------------------------------- /example/ios/node_modules/shelljs/src/ln.js: -------------------------------------------------------------------------------- 1 | var fs = require('fs'); 2 | var path = require('path'); 3 | var common = require('./common'); 4 | 5 | common.register('ln', _ln, { 6 | cmdOptions: { 7 | 's': 'symlink', 8 | 'f': 'force', 9 | }, 10 | }); 11 | 12 | //@ 13 | //@ ### ln([options,] source, dest) 14 | //@ 15 | //@ Available options: 16 | //@ 17 | //@ + `-s`: symlink 18 | //@ + `-f`: force 19 | //@ 20 | //@ Examples: 21 | //@ 22 | //@ ```javascript 23 | //@ ln('file', 'newlink'); 24 | //@ ln('-sf', 'file', 'existing'); 25 | //@ ``` 26 | //@ 27 | //@ Links `source` to `dest`. Use `-f` to force the link, should `dest` already exist. 28 | function _ln(options, source, dest) { 29 | if (!source || !dest) { 30 | common.error('Missing and/or '); 31 | } 32 | 33 | source = String(source); 34 | var sourcePath = path.normalize(source).replace(RegExp(path.sep + '$'), ''); 35 | var isAbsolute = (path.resolve(source) === sourcePath); 36 | dest = path.resolve(process.cwd(), String(dest)); 37 | 38 | if (fs.existsSync(dest)) { 39 | if (!options.force) { 40 | common.error('Destination file exists', { continue: true }); 41 | } 42 | 43 | fs.unlinkSync(dest); 44 | } 45 | 46 | if (options.symlink) { 47 | var isWindows = process.platform === 'win32'; 48 | var linkType = isWindows ? 'file' : null; 49 | var resolvedSourcePath = isAbsolute ? sourcePath : path.resolve(process.cwd(), path.dirname(dest), source); 50 | if (!fs.existsSync(resolvedSourcePath)) { 51 | common.error('Source file does not exist', { continue: true }); 52 | } else if (isWindows && common.statFollowLinks(resolvedSourcePath).isDirectory()) { 53 | linkType = 'junction'; 54 | } 55 | 56 | try { 57 | fs.symlinkSync(linkType === 'junction' ? resolvedSourcePath : source, dest, linkType); 58 | } catch (err) { 59 | common.error(err.message); 60 | } 61 | } else { 62 | if (!fs.existsSync(source)) { 63 | common.error('Source file does not exist', { continue: true }); 64 | } 65 | try { 66 | fs.linkSync(source, dest); 67 | } catch (err) { 68 | common.error(err.message); 69 | } 70 | } 71 | return ''; 72 | } 73 | module.exports = _ln; 74 | -------------------------------------------------------------------------------- /example/ios/node_modules/shelljs/src/popd.js: -------------------------------------------------------------------------------- 1 | // see dirs.js 2 | -------------------------------------------------------------------------------- /example/ios/node_modules/shelljs/src/pushd.js: -------------------------------------------------------------------------------- 1 | // see dirs.js 2 | -------------------------------------------------------------------------------- /example/ios/node_modules/shelljs/src/pwd.js: -------------------------------------------------------------------------------- 1 | var path = require('path'); 2 | var common = require('./common'); 3 | 4 | common.register('pwd', _pwd, { 5 | allowGlobbing: false, 6 | }); 7 | 8 | //@ 9 | //@ ### pwd() 10 | //@ 11 | //@ Returns the current directory. 12 | function _pwd() { 13 | var pwd = path.resolve(process.cwd()); 14 | return pwd; 15 | } 16 | module.exports = _pwd; 17 | -------------------------------------------------------------------------------- /example/ios/node_modules/shelljs/src/set.js: -------------------------------------------------------------------------------- 1 | var common = require('./common'); 2 | 3 | common.register('set', _set, { 4 | allowGlobbing: false, 5 | wrapOutput: false, 6 | }); 7 | 8 | //@ 9 | //@ ### set(options) 10 | //@ 11 | //@ Available options: 12 | //@ 13 | //@ + `+/-e`: exit upon error (`config.fatal`) 14 | //@ + `+/-v`: verbose: show all commands (`config.verbose`) 15 | //@ + `+/-f`: disable filename expansion (globbing) 16 | //@ 17 | //@ Examples: 18 | //@ 19 | //@ ```javascript 20 | //@ set('-e'); // exit upon first error 21 | //@ set('+e'); // this undoes a "set('-e')" 22 | //@ ``` 23 | //@ 24 | //@ Sets global configuration variables. 25 | function _set(options) { 26 | if (!options) { 27 | var args = [].slice.call(arguments, 0); 28 | if (args.length < 2) common.error('must provide an argument'); 29 | options = args[1]; 30 | } 31 | var negate = (options[0] === '+'); 32 | if (negate) { 33 | options = '-' + options.slice(1); // parseOptions needs a '-' prefix 34 | } 35 | options = common.parseOptions(options, { 36 | 'e': 'fatal', 37 | 'v': 'verbose', 38 | 'f': 'noglob', 39 | }); 40 | 41 | if (negate) { 42 | Object.keys(options).forEach(function (key) { 43 | options[key] = !options[key]; 44 | }); 45 | } 46 | 47 | Object.keys(options).forEach(function (key) { 48 | // Only change the global config if `negate` is false and the option is true 49 | // or if `negate` is true and the option is false (aka negate !== option) 50 | if (negate !== options[key]) { 51 | common.config[key] = options[key]; 52 | } 53 | }); 54 | return; 55 | } 56 | module.exports = _set; 57 | -------------------------------------------------------------------------------- /example/ios/node_modules/shelljs/src/to.js: -------------------------------------------------------------------------------- 1 | var common = require('./common'); 2 | var fs = require('fs'); 3 | var path = require('path'); 4 | 5 | common.register('to', _to, { 6 | pipeOnly: true, 7 | wrapOutput: false, 8 | }); 9 | 10 | //@ 11 | //@ ### ShellString.prototype.to(file) 12 | //@ 13 | //@ Examples: 14 | //@ 15 | //@ ```javascript 16 | //@ cat('input.txt').to('output.txt'); 17 | //@ ``` 18 | //@ 19 | //@ Analogous to the redirection operator `>` in Unix, but works with 20 | //@ `ShellStrings` (such as those returned by `cat`, `grep`, etc.). _Like Unix 21 | //@ redirections, `to()` will overwrite any existing file!_ 22 | function _to(options, file) { 23 | if (!file) common.error('wrong arguments'); 24 | 25 | if (!fs.existsSync(path.dirname(file))) { 26 | common.error('no such file or directory: ' + path.dirname(file)); 27 | } 28 | 29 | try { 30 | fs.writeFileSync(file, this.stdout || this.toString(), 'utf8'); 31 | return this; 32 | } catch (e) { 33 | /* istanbul ignore next */ 34 | common.error('could not write to file (code ' + e.code + '): ' + file, { continue: true }); 35 | } 36 | } 37 | module.exports = _to; 38 | -------------------------------------------------------------------------------- /example/ios/node_modules/shelljs/src/toEnd.js: -------------------------------------------------------------------------------- 1 | var common = require('./common'); 2 | var fs = require('fs'); 3 | var path = require('path'); 4 | 5 | common.register('toEnd', _toEnd, { 6 | pipeOnly: true, 7 | wrapOutput: false, 8 | }); 9 | 10 | //@ 11 | //@ ### ShellString.prototype.toEnd(file) 12 | //@ 13 | //@ Examples: 14 | //@ 15 | //@ ```javascript 16 | //@ cat('input.txt').toEnd('output.txt'); 17 | //@ ``` 18 | //@ 19 | //@ Analogous to the redirect-and-append operator `>>` in Unix, but works with 20 | //@ `ShellStrings` (such as those returned by `cat`, `grep`, etc.). 21 | function _toEnd(options, file) { 22 | if (!file) common.error('wrong arguments'); 23 | 24 | if (!fs.existsSync(path.dirname(file))) { 25 | common.error('no such file or directory: ' + path.dirname(file)); 26 | } 27 | 28 | try { 29 | fs.appendFileSync(file, this.stdout || this.toString(), 'utf8'); 30 | return this; 31 | } catch (e) { 32 | /* istanbul ignore next */ 33 | common.error('could not append to file (code ' + e.code + '): ' + file, { continue: true }); 34 | } 35 | } 36 | module.exports = _toEnd; 37 | -------------------------------------------------------------------------------- /example/ios/node_modules/wrappy/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) Isaac Z. Schlueter and Contributors 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 15 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /example/ios/node_modules/wrappy/README.md: -------------------------------------------------------------------------------- 1 | # wrappy 2 | 3 | Callback wrapping utility 4 | 5 | ## USAGE 6 | 7 | ```javascript 8 | var wrappy = require("wrappy") 9 | 10 | // var wrapper = wrappy(wrapperFunction) 11 | 12 | // make sure a cb is called only once 13 | // See also: http://npm.im/once for this specific use case 14 | var once = wrappy(function (cb) { 15 | var called = false 16 | return function () { 17 | if (called) return 18 | called = true 19 | return cb.apply(this, arguments) 20 | } 21 | }) 22 | 23 | function printBoo () { 24 | console.log('boo') 25 | } 26 | // has some rando property 27 | printBoo.iAmBooPrinter = true 28 | 29 | var onlyPrintOnce = once(printBoo) 30 | 31 | onlyPrintOnce() // prints 'boo' 32 | onlyPrintOnce() // does nothing 33 | 34 | // random property is retained! 35 | assert.equal(onlyPrintOnce.iAmBooPrinter, true) 36 | ``` 37 | -------------------------------------------------------------------------------- /example/ios/node_modules/wrappy/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "wrappy", 3 | "version": "1.0.2", 4 | "description": "Callback wrapping utility", 5 | "main": "wrappy.js", 6 | "files": [ 7 | "wrappy.js" 8 | ], 9 | "directories": { 10 | "test": "test" 11 | }, 12 | "dependencies": {}, 13 | "devDependencies": { 14 | "tap": "^2.3.1" 15 | }, 16 | "scripts": { 17 | "test": "tap --coverage test/*.js" 18 | }, 19 | "repository": { 20 | "type": "git", 21 | "url": "https://github.com/npm/wrappy" 22 | }, 23 | "author": "Isaac Z. Schlueter (http://blog.izs.me/)", 24 | "license": "ISC", 25 | "bugs": { 26 | "url": "https://github.com/npm/wrappy/issues" 27 | }, 28 | "homepage": "https://github.com/npm/wrappy" 29 | } 30 | -------------------------------------------------------------------------------- /example/ios/node_modules/wrappy/wrappy.js: -------------------------------------------------------------------------------- 1 | // Returns a wrapper function that returns a wrapped callback 2 | // The wrapper function should do some stuff, and return a 3 | // presumably different callback function. 4 | // This makes sure that own properties are retained, so that 5 | // decorations and such are not lost along the way. 6 | module.exports = wrappy 7 | function wrappy (fn, cb) { 8 | if (fn && cb) return wrappy(fn)(cb) 9 | 10 | if (typeof fn !== 'function') 11 | throw new TypeError('need wrapper function') 12 | 13 | Object.keys(fn).forEach(function (k) { 14 | wrapper[k] = fn[k] 15 | }) 16 | 17 | return wrapper 18 | 19 | function wrapper() { 20 | var args = new Array(arguments.length) 21 | for (var i = 0; i < args.length; i++) { 22 | args[i] = arguments[i] 23 | } 24 | var ret = fn.apply(this, args) 25 | var cb = args[args.length-1] 26 | if (typeof ret === 'function' && ret !== cb) { 27 | Object.keys(cb).forEach(function (k) { 28 | ret[k] = cb[k] 29 | }) 30 | } 31 | return ret 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /example/ios/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "shelljs": "^0.8.4" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /example/test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility that Flutter provides. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | 11 | import 'package:flutter_paytabs_bridge_example/main.dart'; 12 | 13 | void main() { 14 | testWidgets('Verify Platform version', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | await tester.pumpWidget(MyApp()); 17 | 18 | // Verify that platform version is retrieved. 19 | expect( 20 | find.byWidgetPredicate( 21 | (Widget widget) => widget is Text && 22 | widget.data!.startsWith('Running on:'), 23 | ), 24 | findsOneWidget, 25 | ); 26 | }); 27 | } 28 | -------------------------------------------------------------------------------- /flutter_paytabs_bridge.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paytabscom/flutter-sdk-bridge/51f5d7ab5f6f7eed0ee7b1add9c902091ead5def/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Sun Mar 10 16:13:20 EET 2024 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip 5 | zipStoreBase=GRADLE_USER_HOME 6 | zipStorePath=wrapper/dists 7 | -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .vagrant/ 3 | .sconsign.dblite 4 | .svn/ 5 | 6 | .DS_Store 7 | *.swp 8 | profile 9 | 10 | DerivedData/ 11 | build/ 12 | GeneratedPluginRegistrant.h 13 | GeneratedPluginRegistrant.m 14 | 15 | .generated/ 16 | 17 | *.pbxuser 18 | *.mode1v3 19 | *.mode2v3 20 | *.perspectivev3 21 | 22 | !default.pbxuser 23 | !default.mode1v3 24 | !default.mode2v3 25 | !default.perspectivev3 26 | 27 | xcuserdata 28 | 29 | *.moved-aside 30 | 31 | *.pyc 32 | *sync/ 33 | Icon? 34 | .tags* 35 | 36 | /Flutter/Generated.xcconfig 37 | /Flutter/flutter_export_environment.sh -------------------------------------------------------------------------------- /ios/Assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paytabscom/flutter-sdk-bridge/51f5d7ab5f6f7eed0ee7b1add9c902091ead5def/ios/Assets/.gitkeep -------------------------------------------------------------------------------- /ios/Classes/FlutterPaymentSDKBridgePlugin.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface FlutterPaymentSDKBridgePlugin : NSObject 4 | @end 5 | -------------------------------------------------------------------------------- /ios/Classes/FlutterPaymentSDKBridgePlugin.m: -------------------------------------------------------------------------------- 1 | #import "FlutterPaymentSDKBridgePlugin.h" 2 | #if __has_include() 3 | #import 4 | #else 5 | // Support project import fallback if the generated compatibility header 6 | // is not copied when this plugin is created as a library. 7 | // https://forums.swift.org/t/swift-static-libraries-dont-copy-generated-objective-c-header/19816 8 | #import "flutter_paytabs_bridge-Swift.h" 9 | #endif 10 | 11 | @implementation FlutterPaymentSDKBridgePlugin 12 | + (void)registerWithRegistrar:(NSObject*)registrar { 13 | [SwiftFlutterPaymentSDKBridgePlugin registerWithRegistrar:registrar]; 14 | } 15 | @end 16 | -------------------------------------------------------------------------------- /ios/Classes/UIColor.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIColor.swift 3 | // react-native-paytabs-emulator 4 | // 5 | // Created by Mohamed Adly on 18/03/2021. 6 | // 7 | 8 | import UIKit 9 | 10 | extension UIColor { 11 | convenience init(hex:String, alpha:CGFloat = 1.0) { 12 | var cString:String = hex.trimmingCharacters(in: .whitespacesAndNewlines).uppercased() 13 | var rgbValue:UInt32 = 10066329 //color #999999 if string has wrong format 14 | 15 | if (cString.hasPrefix("#")) { 16 | cString.remove(at: cString.startIndex) 17 | } 18 | 19 | if ((cString.count) == 6) { 20 | Scanner(string: cString).scanHexInt32(&rgbValue) 21 | } 22 | 23 | self.init( 24 | red: CGFloat((rgbValue & 0xFF0000) >> 16) / 255.0, 25 | green: CGFloat((rgbValue & 0x00FF00) >> 8) / 255.0, 26 | blue: CGFloat(rgbValue & 0x0000FF) / 255.0, 27 | alpha: alpha 28 | ) 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /ios/flutter_paytabs_bridge.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html. 3 | # Run pod lib lint flutter_paytabs_bridge.podspec' to validate before publishing. 4 | # 5 | Pod::Spec.new do |s| 6 | s.name = 'flutter_paytabs_bridge' 7 | s.version = '2.7.0' 8 | s.summary = 'A new flutter plugin project.' 9 | s.description = <<-DESC 10 | A new flutter plugin project. 11 | DESC 12 | s.homepage = 'http://example.com' 13 | s.license = { :file => '../LICENSE' } 14 | s.author = { 'Your Company' => 'email@example.com' } 15 | s.source = { :path => '.' } 16 | s.source_files = 'Classes/**/*' 17 | s.dependency 'Flutter' 18 | s.platform = :ios, '11.0' 19 | s.dependency "PayTabsSDK", "6.6.32" 20 | s.static_framework = true 21 | # Flutter.framework does not contain a i386 slice. 22 | s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' } 23 | s.swift_version = '5.0' 24 | end 25 | -------------------------------------------------------------------------------- /lib/BaseBillingShippingInfo.dart: -------------------------------------------------------------------------------- 1 | import 'flutter_paytabs_bridge.dart'; 2 | 3 | class BillingDetails { 4 | String name, email, phone, addressLine, country, city, state, zipCode; 5 | 6 | BillingDetails( 7 | this.name, 8 | this.email, 9 | this.phone, 10 | this.addressLine, 11 | this.country, 12 | this.city, 13 | this.state, 14 | this.zipCode, 15 | ); 16 | } 17 | 18 | extension BillingDetailsExtension on BillingDetails { 19 | Map get map { 20 | return { 21 | pt_name_billing: this.name, 22 | pt_email_billing: this.email, 23 | pt_phone_billing: this.phone, 24 | pt_address_billing: this.addressLine, 25 | pt_country_billing: this.country, 26 | pt_city_billing: this.city, 27 | pt_state_billing: this.state, 28 | pt_zip_billing: this.zipCode 29 | }; 30 | } 31 | } 32 | 33 | class ShippingDetails { 34 | String name; 35 | String email; 36 | String phone; 37 | String addressLine; 38 | String country; 39 | String city, state, zipCode; 40 | 41 | ShippingDetails( 42 | this.name, 43 | this.email, 44 | this.phone, 45 | this.addressLine, 46 | this.country, 47 | this.city, 48 | this.state, 49 | this.zipCode, 50 | ); 51 | } 52 | 53 | extension ShippingDetailsExtension on ShippingDetails { 54 | Map get map { 55 | return { 56 | pt_name_shipping: this.name, 57 | pt_email_shipping: this.email, 58 | pt_phone_shipping: this.phone, 59 | pt_address_shipping: this.addressLine, 60 | pt_country_shipping: this.country, 61 | pt_city_shipping: this.city, 62 | pt_state_shipping: this.state, 63 | pt_zip_shipping: this.zipCode 64 | }; 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /lib/PaymentSDKCardApproval.dart: -------------------------------------------------------------------------------- 1 | import 'flutter_paytabs_bridge.dart'; 2 | 3 | /// A class representing the approval of a payment SDK card. 4 | class PaymentSDKCardApproval { 5 | /// The URL used for validation. 6 | String validationUrl; 7 | 8 | /// The length of the BIN (Bank Identification Number). 9 | int binLength; 10 | 11 | /// A flag indicating whether to block if there is no response. 12 | bool blockIfNoResponse; 13 | 14 | /// Constructs a [PaymentSDKCardApproval] instance. 15 | /// 16 | /// * [validationUrl]: The URL used for validation. 17 | /// * [binLength]: The length of the BIN. 18 | /// * [blockIfNoResponse]: A flag indicating whether to block if there is no response. 19 | PaymentSDKCardApproval({ 20 | required this.validationUrl, 21 | required this.binLength, 22 | required this.blockIfNoResponse, 23 | }); 24 | 25 | /// Converts the [PaymentSDKCardApproval] instance to a map. 26 | /// 27 | /// Returns a map representation of the instance. 28 | Map get map { 29 | return { 30 | pt_validation_url: validationUrl, 31 | pt_bin_length: binLength, 32 | pt_block_if_no_response: blockIfNoResponse, 33 | }; 34 | } 35 | } -------------------------------------------------------------------------------- /lib/PaymentSDKCardDiscount.dart: -------------------------------------------------------------------------------- 1 | // Importing the 'flutter_paytabs_bridge.dart' file. 2 | import 'flutter_paytabs_bridge.dart'; 3 | 4 | /// `PaymentSDKCardDiscount` is a class that represents a discount card. 5 | /// 6 | /// It has four properties: `discountCards`, `discountValue`, `discountTitle`, and `isPercentage`. 7 | class PaymentSDKCardDiscount { 8 | /// A list of strings representing the discount cards. 9 | List discountCards; 10 | 11 | /// A double representing the value of the discount. 12 | double discountValue; 13 | 14 | /// A string representing the title of the discount. 15 | String discountTitle; 16 | 17 | /// A boolean indicating whether the discount is a percentage or not. 18 | bool isPercentage; 19 | 20 | /// The constructor for the `PaymentSDKCardDiscount` class. 21 | /// 22 | /// It requires all four properties to be initialized. 23 | PaymentSDKCardDiscount({ 24 | required this.discountCards, 25 | required this.discountValue, 26 | required this.discountTitle, 27 | required this.isPercentage, 28 | }); 29 | } 30 | 31 | /// An extension on the `PaymentSDKCardDiscount` class. 32 | /// 33 | /// It adds a getter `map` that converts the `PaymentSDKCardDiscount` object's data into a map. 34 | extension PaymentSDKCardDiscountExtension on PaymentSDKCardDiscount { 35 | /// A getter that converts the `PaymentSDKCardDiscount` object's data into a map. 36 | /// 37 | /// It returns a map with the keys `pt_discount_cards`, `pt_discount_value`, `pt_discount_title`, and `pt_is_percentage`. 38 | Map get map { 39 | return { 40 | pt_discount_cards: this.discountCards, 41 | pt_discount_value: this.discountValue, 42 | pt_discount_title: this.discountTitle, 43 | pt_is_percentage: this.isPercentage, 44 | }; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /lib/PaymentSDKQueryConfiguration.dart: -------------------------------------------------------------------------------- 1 | import 'flutter_paytabs_bridge.dart'; 2 | 3 | class PaymentSDKQueryConfiguration { 4 | String? serverKey; 5 | String? clientKey; 6 | String? merchantCountryCode; 7 | String? profileID; 8 | String? transactionReference; 9 | 10 | PaymentSDKQueryConfiguration( 11 | String serverKey, 12 | String clientKey, 13 | String merchantCountryCode, 14 | String profileID, 15 | String transactionReference) { 16 | this.clientKey = clientKey; 17 | this.merchantCountryCode = merchantCountryCode; 18 | this.profileID = profileID; 19 | this.serverKey = serverKey; 20 | this.transactionReference = transactionReference; 21 | } 22 | } 23 | 24 | extension PaymentSDKQueryConfigurationExtension on PaymentSDKQueryConfiguration { 25 | Map get map { 26 | return { 27 | pt_client_key: this.clientKey, 28 | pt_server_key: this.serverKey, 29 | pt_merchant_country_code: this.merchantCountryCode, 30 | pt_profile_id: this.profileID, 31 | pt_transaction_reference: this.transactionReference, 32 | }; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /lib/PaymentSDKSavedCardInfo.dart: -------------------------------------------------------------------------------- 1 | import 'flutter_paytabs_bridge.dart'; 2 | 3 | class PaymentSDKSavedCardInfo { 4 | String? maskedCard; 5 | String? cardType; 6 | 7 | PaymentSDKSavedCardInfo(String maskedCard, String cardType) { 8 | this.cardType = cardType; 9 | this.maskedCard = maskedCard; 10 | } 11 | } 12 | extension PaymentSDKSavedCardInfoExtension 13 | on PaymentSDKSavedCardInfo { 14 | Map get map { 15 | return { 16 | pt_masked_card: this.maskedCard, 17 | pt_card_type: this.cardType, 18 | }; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /lib/PaymentSdkApms.dart: -------------------------------------------------------------------------------- 1 | enum PaymentSdkAPms { 2 | UNION_PAY, 3 | STC_PAY, 4 | VALU, 5 | MEEZA_QR, 6 | OMAN_NET, 7 | KNET_CREDIT, 8 | FAWRY, 9 | KNET_DEBIT, 10 | URPAY, 11 | AMAN, 12 | SAMSUNG_PAY, 13 | APPLE_PAY, 14 | SOUHOOLA, 15 | TABBY, 16 | HALAN 17 | } 18 | 19 | extension PaymentSdkTokenFormatExtension on PaymentSdkAPms { 20 | String? get name { 21 | switch (this) { 22 | case PaymentSdkAPms.UNION_PAY: 23 | return 'unionpay'; 24 | case PaymentSdkAPms.STC_PAY: 25 | return 'stcpay'; 26 | case PaymentSdkAPms.VALU: 27 | return 'valu'; 28 | case PaymentSdkAPms.MEEZA_QR: 29 | return 'meezaqr'; 30 | case PaymentSdkAPms.OMAN_NET: 31 | return 'omannet'; 32 | case PaymentSdkAPms.KNET_CREDIT: 33 | return 'knetcredit'; 34 | case PaymentSdkAPms.FAWRY: 35 | return 'fawry'; 36 | case PaymentSdkAPms.KNET_DEBIT: 37 | return 'knetdebit'; 38 | case PaymentSdkAPms.URPAY: 39 | return 'urpay'; 40 | case PaymentSdkAPms.AMAN: 41 | return 'aman'; 42 | case PaymentSdkAPms.SAMSUNG_PAY: 43 | return 'samsungpay'; 44 | case PaymentSdkAPms.APPLE_PAY: 45 | return 'applePay'; 46 | case PaymentSdkAPms.SOUHOOLA: 47 | return 'souhoola'; 48 | case PaymentSdkAPms.TABBY: 49 | return 'tabby'; 50 | case PaymentSdkAPms.HALAN: 51 | return 'halan'; 52 | default: 53 | return null; 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /lib/PaymentSdkLocale.dart: -------------------------------------------------------------------------------- 1 | enum PaymentSdkLocale { 2 | AR, 3 | EN, 4 | FR, 5 | TR, 6 | UR, 7 | DEFAULT, 8 | } 9 | 10 | extension PaymentSdkLocaleExtension on PaymentSdkLocale { 11 | String get name { 12 | switch (this) { 13 | case PaymentSdkLocale.AR: 14 | return "ar"; 15 | case PaymentSdkLocale.EN: 16 | return "en"; 17 | case PaymentSdkLocale.FR: 18 | return "fr"; 19 | case PaymentSdkLocale.TR: 20 | return "tr"; 21 | case PaymentSdkLocale.UR: 22 | return "ur"; 23 | case PaymentSdkLocale.DEFAULT: 24 | return "default"; 25 | default: 26 | return "default"; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /lib/PaymentSdkTokenFormat.dart: -------------------------------------------------------------------------------- 1 | enum PaymentSdkTokenFormat { 2 | Hex32Format, 3 | NoneFormat, 4 | AlphaNum20Format, 5 | Digit22Format, 6 | Digit16Format, 7 | AlphaNum32Format 8 | } 9 | 10 | extension PaymentSdkTokenFormatExtension on PaymentSdkTokenFormat { 11 | String? get name { 12 | switch (this) { 13 | case PaymentSdkTokenFormat.NoneFormat: 14 | return '1'; 15 | case PaymentSdkTokenFormat.Hex32Format: 16 | return '2'; 17 | case PaymentSdkTokenFormat.AlphaNum20Format: 18 | return '3'; 19 | case PaymentSdkTokenFormat.Digit22Format: 20 | return '4'; 21 | case PaymentSdkTokenFormat.Digit16Format: 22 | return '5'; 23 | case PaymentSdkTokenFormat.AlphaNum32Format: 24 | return '6'; 25 | default: 26 | return null; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /lib/PaymentSdkTokeniseType.dart: -------------------------------------------------------------------------------- 1 | enum PaymentSdkTokeniseType { 2 | NONE, 3 | USER_OPTIONAL, 4 | USER_MANDATORY, 5 | MERCHANT_MANDATORY, 6 | USER_OPTIONAL_DEFAULT_ON 7 | } 8 | 9 | extension PaymentSdkTokeniseTypeExtension on PaymentSdkTokeniseType { 10 | String get name { 11 | switch (this) { 12 | case PaymentSdkTokeniseType.NONE: 13 | return "none"; 14 | case PaymentSdkTokeniseType.USER_OPTIONAL: 15 | return "userOptional"; 16 | case PaymentSdkTokeniseType.USER_MANDATORY: 17 | return "userMandatory"; 18 | case PaymentSdkTokeniseType.MERCHANT_MANDATORY: 19 | return "merchantMandatory"; 20 | case PaymentSdkTokeniseType.USER_OPTIONAL_DEFAULT_ON: 21 | return "userOptionalDefaultOn"; 22 | default: 23 | return "none"; 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /lib/PaymentSdkTransactionClass.dart: -------------------------------------------------------------------------------- 1 | enum PaymentSdkTransactionClass { ECOM, RECURRING } 2 | 3 | extension PaymentSdkTransactionClassExtension on PaymentSdkTransactionClass { 4 | String get name { 5 | switch (this) { 6 | case PaymentSdkTransactionClass.RECURRING: 7 | return "recurring"; 8 | default: 9 | return "ecom"; 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /lib/PaymentSdkTransactionType.dart: -------------------------------------------------------------------------------- 1 | /// Enum representing different types of payment transactions. 2 | enum PaymentSdkTransactionType { 3 | /// Represents a sale transaction. 4 | SALE, 5 | 6 | /// Represents an authorization transaction. 7 | AUTH, 8 | 9 | /// Represents a register transaction. 10 | REGISTER 11 | } 12 | 13 | /// Extension on [PaymentSdkTransactionType] to provide additional functionality. 14 | extension PaymentSdkTransactionTypeExtension on PaymentSdkTransactionType { 15 | /// Gets the name of the transaction type as a string. 16 | /// 17 | /// Returns: 18 | /// - "auth" for [PaymentSdkTransactionType.AUTH] 19 | /// - "register" for [PaymentSdkTransactionType.REGISTER] 20 | /// - "sale" for [PaymentSdkTransactionType.SALE] (default) 21 | String get name { 22 | switch (this) { 23 | case PaymentSdkTransactionType.AUTH: 24 | return "auth"; 25 | case PaymentSdkTransactionType.REGISTER: 26 | return "register"; 27 | default: 28 | return "sale"; 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /test/flutter_paytabs_bridge_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/services.dart'; 2 | import 'package:flutter_test/flutter_test.dart'; 3 | 4 | void main() { 5 | const MethodChannel channel = MethodChannel('flutter_paytabs_bridge'); 6 | 7 | TestWidgetsFlutterBinding.ensureInitialized(); 8 | 9 | setUp(() { 10 | channel.setMockMethodCallHandler((MethodCall methodCall) async { 11 | return '42'; 12 | }); 13 | }); 14 | 15 | tearDown(() { 16 | channel.setMockMethodCallHandler(null); 17 | }); 18 | } 19 | -------------------------------------------------------------------------------- /theme_demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paytabscom/flutter-sdk-bridge/51f5d7ab5f6f7eed0ee7b1add9c902091ead5def/theme_demo.png --------------------------------------------------------------------------------