├── .eslintrc ├── .flowconfig ├── .gitattributes ├── .gitignore ├── .npmignore ├── LICENSE ├── README.md ├── RNNetworkState.podspec ├── android ├── build.gradle └── src │ └── main │ ├── AndroidManifest.xml │ └── java │ └── com │ └── reactnativevietnam │ ├── RNNetworkModule.java │ └── RNNetworkStatePackage.java ├── example ├── .babelrc ├── .buckconfig ├── .flowconfig ├── .gitattributes ├── .gitignore ├── .watchmanconfig ├── App.js ├── android │ ├── app │ │ ├── BUCK │ │ ├── build.gradle │ │ ├── proguard-rules.pro │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── java │ │ │ └── com │ │ │ │ └── example │ │ │ │ ├── MainActivity.java │ │ │ │ └── MainApplication.java │ │ │ └── res │ │ │ ├── mipmap-hdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ └── values │ │ │ ├── strings.xml │ │ │ └── styles.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ ├── keystores │ │ ├── BUCK │ │ └── debug.keystore.properties │ └── settings.gradle ├── app.json ├── index.js ├── ios │ ├── Podfile │ ├── example-tvOS │ │ └── Info.plist │ ├── example-tvOSTests │ │ └── Info.plist │ ├── example.xcodeproj │ │ ├── project.pbxproj │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ ├── example-tvOS.xcscheme │ │ │ └── example.xcscheme │ ├── example │ │ ├── AppDelegate.h │ │ ├── AppDelegate.m │ │ ├── Base.lproj │ │ │ └── LaunchScreen.xib │ │ ├── Images.xcassets │ │ │ ├── AppIcon.appiconset │ │ │ │ └── Contents.json │ │ │ └── Contents.json │ │ ├── Info.plist │ │ └── main.m │ └── exampleTests │ │ ├── Info.plist │ │ └── exampleTests.m ├── package.json └── yarn.lock ├── fixAndroid.js ├── index.d.ts ├── index.js ├── ios ├── RNNetworkState.h ├── RNNetworkState.m ├── RNNetworkState.xcodeproj │ ├── project.pbxproj │ └── xcshareddata │ │ └── xcschemes │ │ └── RNNetworkState.xcscheme ├── RNNetworkState.xcworkspace │ └── contents.xcworkspacedata ├── Reachability.h └── Reachability.m ├── package.json └── yarn.lock /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "parser": "babel-eslint", 3 | "plugins": ["react", "react-native"], 4 | "parserOptions": { 5 | "ecmaFeatures": { 6 | "jsx": true, 7 | "modules": true 8 | } 9 | }, 10 | "extends": ["eslint:recommended", "plugin:react/recommended", "airbnb-base"], 11 | "rules": { 12 | "arrow-body-style": "warn" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /.flowconfig: -------------------------------------------------------------------------------- 1 | [ignore] 2 | ; We fork some components by platform 3 | .*/*[.]android.js 4 | 5 | ; Ignore "BUCK" generated dirs 6 | /\.buckd/ 7 | 8 | ; Ignore unexpected extra "@providesModule" 9 | .*/node_modules/.*/node_modules/fbjs/.* 10 | 11 | ; Ignore duplicate module providers 12 | ; For RN Apps installed via npm, "Libraries" folder is inside 13 | ; "node_modules/react-native" but in the source repo it is in the root 14 | .*/Libraries/react-native/React.js 15 | 16 | ; Ignore polyfills 17 | .*/Libraries/polyfills/.* 18 | 19 | ; Ignore metro 20 | .*/node_modules/metro/.* 21 | 22 | # Ignore dist folder 23 | .*/dist/.* 24 | 25 | # Ignore bridge project 26 | .*/bridge/.* 27 | 28 | [include] 29 | 30 | [libs] 31 | node_modules/react-native/Libraries/react-native/react-native-interface.js 32 | node_modules/react-native/flow/ 33 | node_modules/react-native/flow-github/ 34 | 35 | [options] 36 | emoji=true 37 | 38 | # Taken from: https://github.com/facebook/react-native/issues/19766 39 | module.system=haste 40 | module.system.haste.use_name_reducers=true 41 | # keep the following in sync with server/haste/hasteImpl.js 42 | # get basename 43 | module.system.haste.name_reducers='^.*/\([a-zA-Z0-9$_.-]+\.js\(\.flow\)?\)$' -> '\1' 44 | # strip .js or .js.flow suffix 45 | module.system.haste.name_reducers='^\(.*\)\.js\(\.flow\)?$' -> '\1' 46 | # strip .ios suffix 47 | module.system.haste.name_reducers='^\(.*\)\.ios$' -> '\1' 48 | module.system.haste.name_reducers='^\(.*\)\.android$' -> '\1' 49 | module.system.haste.name_reducers='^\(.*\)\.native$' -> '\1' 50 | module.system.haste.paths.blacklist=.*/__tests__/.* 51 | module.system.haste.paths.blacklist=.*/__mocks__/.* 52 | module.system.haste.paths.blacklist=/node_modules/react-native/Libraries/Animated/src/polyfills/.* 53 | module.system.haste.paths.whitelist=/node_modules/react-native/Libraries/.* 54 | 55 | munge_underscores=true 56 | 57 | module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub' 58 | 59 | module.file_ext=.js 60 | module.file_ext=.jsx 61 | module.file_ext=.json 62 | module.file_ext=.native.js 63 | 64 | suppress_type=$FlowIssue 65 | suppress_type=$FlowFixMe 66 | suppress_type=$FlowFixMeProps 67 | suppress_type=$FlowFixMeState 68 | 69 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) 70 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+ 71 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy 72 | suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError 73 | 74 | esproposal.decorators=ignore 75 | esproposal.optional_chaining=enable 76 | [version] 77 | ^0.78.0 -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.pbxproj -text -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # OSX 3 | # 4 | .DS_Store 5 | 6 | # node.js 7 | # 8 | node_modules/ 9 | npm-debug.log 10 | yarn-error.log 11 | package-lock.json 12 | 13 | 14 | # Xcode 15 | # 16 | build/ 17 | *.pbxuser 18 | !default.pbxuser 19 | *.mode1v3 20 | !default.mode1v3 21 | *.mode2v3 22 | !default.mode2v3 23 | *.perspectivev3 24 | !default.perspectivev3 25 | xcuserdata 26 | *.xccheckout 27 | *.moved-aside 28 | DerivedData 29 | *.hmap 30 | *.ipa 31 | *.xcuserstate 32 | project.xcworkspace 33 | 34 | 35 | # Android/IntelliJ 36 | # 37 | build/ 38 | .idea 39 | .vscode 40 | .gradle 41 | local.properties 42 | *.iml 43 | 44 | # BUCK 45 | buck-out/ 46 | \.buckd/ 47 | # *.keystore 48 | dev/ 49 | .vscode 50 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | example 2 | local_example 3 | .vscode 4 | .gitignore 5 | .gitattributes 6 | dev 7 | *.keystore 8 | package-lock.json -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | MIT License 3 | 4 | Copyright (c) 2018-present, ReactNativeVietnam. 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # react-native-network-state 2 | 3 | [![NPM](https://nodei.co/npm/react-native-network-state.png)](https://nodei.co/npm/react-native-network-state/) 4 | 5 | ## Features 6 | 7 | - [x] Detect network connection instantly 8 | - [x] Support `onConnected`, `onDisconnected` callback 9 | - [x] Highly customizable UI 10 | - [x] Open Wifi setting 11 | - [x] Android 8+ supported 12 | 13 | ## Demo 14 | 15 | - 16 | 17 | ## Getting started 18 | 19 | `$ npm install react-native-network-state --save` 20 | 21 | or 22 | 23 | `$ yarn add react-native-network-state` 24 | 25 | ### Automatic installation 26 | 27 | `$ react-native link react-native-network-state` 28 | 29 | ### Manual installation 30 | 31 | #### iOS (Install via Cocoapods is not supported righ now) 32 | 33 | 1. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]` 34 | 2. Go to `node_modules` ➜ `react-native-network-state` and add `RNNetworkState.xcodeproj` 35 | 3. In XCode, in the project navigator, select your project. Add `libRNNetworkState.a` to your project's `Build Phases` ➜ `Link Binary With Libraries` 36 | 4. Run your project (`Cmd+R`)< 37 | 38 | #### Android 39 | 40 | 1. Open up `android/app/src/main/java/[...]/MainActivity.java` 41 | 42 | - Add `import com.reactnativevietnam.RNNetworkStatePackage;` to the imports at the top of the file 43 | - Add `new RNNetworkStatePackage()` to the list returned by the `getPackages()` method 44 | 45 | 2. Append the following lines to `android/settings.gradle`: 46 | ``` 47 | include ':react-native-network-state' 48 | project(':react-native-network-state').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-network-state/android') 49 | ``` 50 | 3. Insert the following lines inside the dependencies block in `android/app/build.gradle`: 51 | 52 | ``` 53 | compile project(':react-native-network-state') 54 | ``` 55 | 56 | ### Extra setup (Very important) 57 | 58 | #### iOS 59 | 60 | 1. Add `SystemConfiguration.framework` to your `Linked Frameworks and Libraries`, see images below: 61 | 62 |

1.1

63 | 64 |
65 | 66 |

1.2

67 | 68 | 69 | #### Android 70 | 71 | 1. Insert these lines to `AndroidManifest.xml` 72 | 73 | ``` 74 | // add this permissions 75 | 76 | ``` 77 | 78 | ## Usage 79 | 80 | Please see `example` project 81 | 82 | ```javascript 83 | import React from 'react' 84 | import NetworkState, { Settings } from 'react-native-network-state' 85 | import { View, Text } from 'react-native' 86 | 87 | export default class YourView extends React.PureComponent { 88 | render() { 89 | return ( 90 | 91 | This is Your View 92 | console.log('connected')} 95 | onDisconnected={() => Settings.openWifi()} 96 | /> 97 | 98 | ) 99 | } 100 | } 101 | ``` 102 | 103 | ## Props 104 | 105 | ```javascript 106 | type Props = { 107 | debound?: number, 108 | txtConnected?: string, 109 | txtDisconnected?: string, 110 | styleConnected?: Object | Number, 111 | styleDisconnected?: Object | Number, 112 | onConnected?: Function, 113 | onDisconnected?: Function, 114 | ...ViewProperties 115 | } 116 | ``` 117 | 118 | ## Settings Utils (iOS below 10 can open Wifi setting, equal or greater than 10 will open general settings) 119 | 120 | | Functions | iOS | Android | 121 | | --------- | :-: | :-----: | 122 | | openWifi | [x] | [x] | 123 | 124 | ```javascript 125 | //Example: Open wifi setting 126 | 127 | import NetworkState, { Settings } from 'react-native-network-state' 128 | 129 | Settings.openWifi() 130 | ``` 131 | 132 | ## LICENSE 133 | 134 | MIT License 135 | 136 | Copyright (c) 2018-present, ReactNativeVietnam. 137 | 138 | Permission is hereby granted, free of charge, to any person obtaining a copy 139 | of this software and associated documentation files (the "Software"), to deal 140 | in the Software without restriction, including without limitation the rights 141 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 142 | copies of the Software, and to permit persons to whom the Software is 143 | furnished to do so, subject to the following conditions: 144 | 145 | The above copyright notice and this permission notice shall be included in all 146 | copies or substantial portions of the Software. 147 | 148 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 149 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 150 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 151 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 152 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 153 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 154 | SOFTWARE. 155 | -------------------------------------------------------------------------------- /RNNetworkState.podspec: -------------------------------------------------------------------------------- 1 | require 'json' 2 | 3 | package = JSON.parse(File.read(File.join(__dir__, 'package.json'))) 4 | 5 | Pod::Spec.new do |s| 6 | s.name = "RNNetworkState" 7 | s.version = package['version'] 8 | s.summary = "RNNetworkState" 9 | s.description = package['description'] 10 | s.homepage = "https://github.com/react-native-vietnam/react-native-network-state#readme" 11 | s.license = "MIT" 12 | s.license = { :type => "MIT", :file => "LICENSE" } 13 | s.author = { "author" => package['author']['name'] } 14 | s.platform = :ios, "9.0" 15 | s.source = { :git => "https://github.com/react-native-vietnam/react-native-network-state.git", :tag => package['version']} 16 | s.source_files = "ios/**/*.{h,m}" 17 | s.framework = 'SystemConfiguration' 18 | 19 | s.dependency 'React' 20 | 21 | end 22 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | def DEFAULT_COMPILE_SDK_VERSION = 26 2 | def DEFAULT_BUILD_TOOLS_VERSION = "26.0.3" 3 | def DEFAULT_TARGET_SDK_VERSION = 26 4 | def DEFAULT_MIN_SDK_VERSION = 16 5 | 6 | buildscript { 7 | repositories { 8 | google() 9 | jcenter() 10 | } 11 | 12 | dependencies { 13 | classpath "com.android.tools.build:gradle:2.2.3" 14 | } 15 | } 16 | 17 | apply plugin: 'com.android.library' 18 | 19 | android { 20 | compileSdkVersion rootProject.hasProperty('compileSdkVersion') ? rootProject.compileSdkVersion : DEFAULT_COMPILE_SDK_VERSION 21 | buildToolsVersion rootProject.hasProperty('buildToolsVersion') ? rootProject.buildToolsVersion : DEFAULT_BUILD_TOOLS_VERSION 22 | 23 | defaultConfig { 24 | minSdkVersion rootProject.hasProperty('minSdkVersion') ? rootProject.minSdkVersion : DEFAULT_MIN_SDK_VERSION 25 | targetSdkVersion rootProject.hasProperty('targetSdkVersion') ? rootProject.targetSdkVersion : DEFAULT_TARGET_SDK_VERSION 26 | versionCode 1 27 | versionName "1.0" 28 | } 29 | lintOptions { 30 | abortOnError false 31 | disable 'GradleCompatible' 32 | } 33 | } 34 | 35 | repositories { 36 | mavenCentral() 37 | } 38 | 39 | dependencies { 40 | compile 'com.github.pwittchen:reactivenetwork-rx2:2.1.0' 41 | compile 'com.facebook.react:react-native:+' 42 | } 43 | -------------------------------------------------------------------------------- /android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /android/src/main/java/com/reactnativevietnam/RNNetworkModule.java: -------------------------------------------------------------------------------- 1 | package com.reactnativevietnam; 2 | 3 | import android.content.Context; 4 | import android.content.Intent; 5 | import android.net.ConnectivityManager; 6 | import android.net.NetworkInfo; 7 | import android.provider.Settings; 8 | import android.support.annotation.Nullable; 9 | import android.telephony.TelephonyManager; 10 | 11 | import com.facebook.react.ReactApplication; 12 | import com.facebook.react.bridge.Arguments; 13 | import com.facebook.react.bridge.ReactApplicationContext; 14 | import com.facebook.react.bridge.ReactContextBaseJavaModule; 15 | import com.facebook.react.bridge.ReactMethod; 16 | import com.facebook.react.bridge.UiThreadUtil; 17 | import com.facebook.react.bridge.WritableMap; 18 | import com.facebook.react.modules.core.DeviceEventManagerModule; 19 | import com.github.pwittchen.reactivenetwork.library.rx2.ReactiveNetwork; 20 | 21 | import java.util.HashMap; 22 | import java.util.Map; 23 | 24 | import io.reactivex.android.schedulers.AndroidSchedulers; 25 | import io.reactivex.functions.Consumer; 26 | import io.reactivex.schedulers.Schedulers; 27 | 28 | /** 29 | * @author Anh Tuan Nguyen 30 | * @created 8/8/2018 31 | */ 32 | public class RNNetworkModule extends ReactContextBaseJavaModule { 33 | private Boolean isConnected = false; 34 | private ReactApplicationContext mContext = null; 35 | public RNNetworkModule(ReactApplicationContext reactContext) { 36 | super(reactContext); 37 | mContext = reactContext; 38 | ReactiveNetwork 39 | .observeInternetConnectivity() 40 | .subscribeOn(Schedulers.io()) 41 | .observeOn(AndroidSchedulers.mainThread()) 42 | .subscribe(new Consumer() { 43 | @Override 44 | public void accept(Boolean mIsConnected) throws Exception { 45 | if(isConnected == mIsConnected) { 46 | return; 47 | } 48 | isConnected = mIsConnected; 49 | ConnectivityManager manager = (ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE); 50 | NetworkInfo netInfo = manager.getActiveNetworkInfo(); 51 | Boolean isFast = netInfo != null ? RNNetworkModule.isConnectionFast(netInfo.getType(), netInfo.getSubtype()) : false; 52 | String type = netInfo != null ? netInfo.getTypeName() : "unkown"; 53 | 54 | WritableMap params = Arguments.createMap(); 55 | params.putBoolean("isConnected", mIsConnected); 56 | params.putString("type", type); 57 | params.putBoolean("isFast", isFast); 58 | sendEvent("networkChanged", params); 59 | } 60 | }); 61 | } 62 | 63 | @Override 64 | public String getName() { 65 | return "RNNetworkState"; 66 | } 67 | 68 | @ReactMethod 69 | public void openWifi() { 70 | Intent intent = new Intent(Settings.ACTION_WIFI_SETTINGS); 71 | intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); 72 | intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY); 73 | if (intent.resolveActivity(mContext.getPackageManager()) != null) { 74 | mContext.startActivity(intent); 75 | } 76 | } 77 | 78 | @ReactMethod 79 | public void reload() { 80 | UiThreadUtil.runOnUiThread(new Runnable() { 81 | @Override 82 | public void run() { 83 | ReactApplication app = (ReactApplication)mContext.getCurrentActivity().getApplication(); 84 | app.getReactNativeHost().getReactInstanceManager().recreateReactContextInBackground(); 85 | } 86 | }); 87 | } 88 | 89 | @Override 90 | public Map getConstants() { 91 | final Map constants = new HashMap<>(); 92 | try { 93 | ConnectivityManager manager = (ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE); 94 | NetworkInfo netInfo = manager.getActiveNetworkInfo(); 95 | Boolean isFast = netInfo != null ? RNNetworkModule.isConnectionFast(netInfo.getType(), netInfo.getSubtype()) : false; 96 | if (netInfo != null && netInfo.isConnected() && netInfo.isAvailable()) { 97 | constants.put("isConnected", true); 98 | constants.put("type", netInfo.getTypeName()); 99 | constants.put("isFast", isFast); 100 | } else { 101 | constants.put("isConnected", false); 102 | constants.put("type", netInfo != null ? netInfo.getTypeName() : "unknown"); 103 | constants.put("isFast", isFast); 104 | } 105 | } catch (Exception e) { 106 | e.printStackTrace(); 107 | } 108 | return constants; 109 | } 110 | 111 | private void sendEvent(String eventName, @Nullable WritableMap params) { 112 | if (mContext == null || !mContext.hasActiveCatalystInstance()) { 113 | return; 114 | } 115 | mContext.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class).emit(eventName, params); 116 | } 117 | 118 | public static boolean isConnectionFast(int type, int subType) { 119 | if (type == ConnectivityManager.TYPE_WIFI) { 120 | return true; 121 | } 122 | if (type == ConnectivityManager.TYPE_MOBILE) { 123 | switch (subType) { 124 | case TelephonyManager.NETWORK_TYPE_1xRTT: 125 | return false; // ~ 50-100 kbps 126 | case TelephonyManager.NETWORK_TYPE_CDMA: 127 | return false; // ~ 14-64 kbps 128 | case TelephonyManager.NETWORK_TYPE_EDGE: 129 | return false; // ~ 50-100 kbps 130 | case TelephonyManager.NETWORK_TYPE_EVDO_0: 131 | return true; // ~ 400-1000 kbps 132 | case TelephonyManager.NETWORK_TYPE_EVDO_A: 133 | return true; // ~ 600-1400 kbps 134 | case TelephonyManager.NETWORK_TYPE_GPRS: 135 | return false; // ~ 100 kbps 136 | case TelephonyManager.NETWORK_TYPE_HSDPA: 137 | return true; // ~ 2-14 Mbps 138 | case TelephonyManager.NETWORK_TYPE_HSPA: 139 | return true; // ~ 700-1700 kbps 140 | case TelephonyManager.NETWORK_TYPE_HSUPA: 141 | return true; // ~ 1-23 Mbps 142 | case TelephonyManager.NETWORK_TYPE_UMTS: 143 | return true; // ~ 400-7000 kbps 144 | /* 145 | * Above API level 7, make sure to set android:targetSdkVersion 146 | * to appropriate level to use these 147 | */ 148 | case TelephonyManager.NETWORK_TYPE_EHRPD: // API level 11 149 | return true; // ~ 1-2 Mbps 150 | case TelephonyManager.NETWORK_TYPE_EVDO_B: // API level 9 151 | return true; // ~ 5 Mbps 152 | case TelephonyManager.NETWORK_TYPE_HSPAP: // API level 13 153 | return true; // ~ 10-20 Mbps 154 | case TelephonyManager.NETWORK_TYPE_IDEN: // API level 8 155 | return false; // ~25 kbps 156 | case TelephonyManager.NETWORK_TYPE_LTE: // API level 11 157 | return true; // ~ 10+ Mbps 158 | // Unknown 159 | case TelephonyManager.NETWORK_TYPE_UNKNOWN: 160 | default: 161 | return false; 162 | } 163 | } 164 | return false; 165 | } 166 | } -------------------------------------------------------------------------------- /android/src/main/java/com/reactnativevietnam/RNNetworkStatePackage.java: -------------------------------------------------------------------------------- 1 | package com.reactnativevietnam; 2 | 3 | import com.facebook.react.ReactPackage; 4 | import com.facebook.react.bridge.JavaScriptModule; 5 | import com.facebook.react.bridge.NativeModule; 6 | import com.facebook.react.bridge.ReactApplicationContext; 7 | import com.facebook.react.uimanager.ViewManager; 8 | 9 | import java.util.Arrays; 10 | import java.util.Collections; 11 | import java.util.List; 12 | 13 | /** 14 | * @author Anh Tuan Nguyen 15 | * @created 8/8/2018 16 | */ 17 | public class RNNetworkStatePackage implements ReactPackage { 18 | @Override 19 | public List createNativeModules(ReactApplicationContext reactContext) { 20 | return Arrays.asList(new RNNetworkModule(reactContext)); 21 | } 22 | 23 | @Override 24 | public List createViewManagers(ReactApplicationContext reactContext) { 25 | return Collections.emptyList(); 26 | } 27 | 28 | // Deprecated from RN 0.47 29 | public List> createJSModules() { 30 | return Collections.emptyList(); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /example/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["module:metro-react-native-babel-preset"] 3 | } 4 | -------------------------------------------------------------------------------- /example/.buckconfig: -------------------------------------------------------------------------------- 1 | 2 | [android] 3 | target = Google Inc.:Google APIs:23 4 | 5 | [maven_repositories] 6 | central = https://repo1.maven.org/maven2 7 | -------------------------------------------------------------------------------- /example/.flowconfig: -------------------------------------------------------------------------------- 1 | [ignore] 2 | ; We fork some components by platform 3 | .*/*[.]android.js 4 | 5 | ; Ignore "BUCK" generated dirs 6 | /\.buckd/ 7 | 8 | ; Ignore unexpected extra "@providesModule" 9 | .*/node_modules/.*/node_modules/fbjs/.* 10 | 11 | ; Ignore duplicate module providers 12 | ; For RN Apps installed via npm, "Libraries" folder is inside 13 | ; "node_modules/react-native" but in the source repo it is in the root 14 | .*/Libraries/react-native/React.js 15 | 16 | ; Ignore polyfills 17 | .*/Libraries/polyfills/.* 18 | 19 | ; Ignore metro 20 | .*/node_modules/metro/.* 21 | 22 | [include] 23 | 24 | [libs] 25 | node_modules/react-native/Libraries/react-native/react-native-interface.js 26 | node_modules/react-native/flow/ 27 | node_modules/react-native/flow-github/ 28 | 29 | [options] 30 | emoji=true 31 | 32 | esproposal.optional_chaining=enable 33 | esproposal.nullish_coalescing=enable 34 | 35 | module.system=haste 36 | module.system.haste.use_name_reducers=true 37 | # get basename 38 | module.system.haste.name_reducers='^.*/\([a-zA-Z0-9$_.-]+\.js\(\.flow\)?\)$' -> '\1' 39 | # strip .js or .js.flow suffix 40 | module.system.haste.name_reducers='^\(.*\)\.js\(\.flow\)?$' -> '\1' 41 | # strip .ios suffix 42 | module.system.haste.name_reducers='^\(.*\)\.ios$' -> '\1' 43 | module.system.haste.name_reducers='^\(.*\)\.android$' -> '\1' 44 | module.system.haste.name_reducers='^\(.*\)\.native$' -> '\1' 45 | module.system.haste.paths.blacklist=.*/__tests__/.* 46 | module.system.haste.paths.blacklist=.*/__mocks__/.* 47 | module.system.haste.paths.blacklist=/node_modules/react-native/Libraries/Animated/src/polyfills/.* 48 | module.system.haste.paths.whitelist=/node_modules/react-native/Libraries/.* 49 | 50 | munge_underscores=true 51 | 52 | module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub' 53 | 54 | module.file_ext=.js 55 | module.file_ext=.jsx 56 | module.file_ext=.json 57 | module.file_ext=.native.js 58 | 59 | suppress_type=$FlowIssue 60 | suppress_type=$FlowFixMe 61 | suppress_type=$FlowFixMeProps 62 | suppress_type=$FlowFixMeState 63 | 64 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) 65 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+ 66 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy 67 | suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError 68 | 69 | [version] 70 | ^0.78.0 71 | -------------------------------------------------------------------------------- /example/.gitattributes: -------------------------------------------------------------------------------- 1 | *.pbxproj -text 2 | -------------------------------------------------------------------------------- /example/.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # Xcode 6 | # 7 | build/ 8 | *.pbxuser 9 | !default.pbxuser 10 | *.mode1v3 11 | !default.mode1v3 12 | *.mode2v3 13 | !default.mode2v3 14 | *.perspectivev3 15 | !default.perspectivev3 16 | xcuserdata 17 | *.xccheckout 18 | *.moved-aside 19 | DerivedData 20 | *.hmap 21 | *.ipa 22 | *.xcuserstate 23 | project.xcworkspace 24 | 25 | # Android/IntelliJ 26 | # 27 | build/ 28 | .idea 29 | .gradle 30 | local.properties 31 | *.iml 32 | 33 | # node.js 34 | # 35 | node_modules/ 36 | npm-debug.log 37 | yarn-error.log 38 | 39 | # BUCK 40 | buck-out/ 41 | \.buckd/ 42 | *.keystore 43 | 44 | # fastlane 45 | # 46 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 47 | # screenshots whenever they are needed. 48 | # For more information about the recommended setup visit: 49 | # https://docs.fastlane.tools/best-practices/source-control/ 50 | 51 | */fastlane/report.xml 52 | */fastlane/Preview.html 53 | */fastlane/screenshots 54 | 55 | # Bundle artifact 56 | *.jsbundle 57 | -------------------------------------------------------------------------------- /example/.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /example/App.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Sample React Native App 3 | * https://github.com/facebook/react-native 4 | * 5 | * @format 6 | * @flow 7 | */ 8 | 9 | import React, { Component } from 'react' 10 | import { Platform, StyleSheet, Text, View } from 'react-native' 11 | import NetworkState, { Settings } from 'react-native-network-state' 12 | 13 | const instructions = Platform.select({ 14 | ios: 'Press Cmd+R to reload,\n' + 'Cmd+D or shake for dev menu', 15 | android: 16 | 'Double tap R on your keyboard to reload,\n' + 17 | 'Shake or press menu button for dev menu' 18 | }) 19 | 20 | type Props = {} 21 | export default class App extends Component { 22 | render() { 23 | return ( 24 | 25 | alert('disconnected')} /> 26 | Welcome to React Native! 27 | To get started, edit App.js 28 | {instructions} 29 | 30 | ) 31 | } 32 | } 33 | 34 | const styles = StyleSheet.create({ 35 | container: { 36 | flex: 1, 37 | justifyContent: 'center', 38 | alignItems: 'center', 39 | backgroundColor: '#F5FCFF' 40 | }, 41 | welcome: { 42 | fontSize: 20, 43 | textAlign: 'center', 44 | margin: 10 45 | }, 46 | instructions: { 47 | textAlign: 'center', 48 | color: '#333333', 49 | marginBottom: 5 50 | } 51 | }) 52 | -------------------------------------------------------------------------------- /example/android/app/BUCK: -------------------------------------------------------------------------------- 1 | # To learn about Buck see [Docs](https://buckbuild.com/). 2 | # To run your application with Buck: 3 | # - install Buck 4 | # - `npm start` - to start the packager 5 | # - `cd android` 6 | # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"` 7 | # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck 8 | # - `buck install -r android/app` - compile, install and run application 9 | # 10 | 11 | lib_deps = [] 12 | 13 | for jarfile in glob(['libs/*.jar']): 14 | name = 'jars__' + jarfile[jarfile.rindex('/') + 1: jarfile.rindex('.jar')] 15 | lib_deps.append(':' + name) 16 | prebuilt_jar( 17 | name = name, 18 | binary_jar = jarfile, 19 | ) 20 | 21 | for aarfile in glob(['libs/*.aar']): 22 | name = 'aars__' + aarfile[aarfile.rindex('/') + 1: aarfile.rindex('.aar')] 23 | lib_deps.append(':' + name) 24 | android_prebuilt_aar( 25 | name = name, 26 | aar = aarfile, 27 | ) 28 | 29 | android_library( 30 | name = "all-libs", 31 | exported_deps = lib_deps, 32 | ) 33 | 34 | android_library( 35 | name = "app-code", 36 | srcs = glob([ 37 | "src/main/java/**/*.java", 38 | ]), 39 | deps = [ 40 | ":all-libs", 41 | ":build_config", 42 | ":res", 43 | ], 44 | ) 45 | 46 | android_build_config( 47 | name = "build_config", 48 | package = "com.example", 49 | ) 50 | 51 | android_resource( 52 | name = "res", 53 | package = "com.example", 54 | res = "src/main/res", 55 | ) 56 | 57 | android_binary( 58 | name = "app", 59 | keystore = "//android/keystores:debug", 60 | manifest = "src/main/AndroidManifest.xml", 61 | package_type = "debug", 62 | deps = [ 63 | ":app-code", 64 | ], 65 | ) 66 | -------------------------------------------------------------------------------- /example/android/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: "com.android.application" 2 | 3 | import com.android.build.OutputFile 4 | 5 | /** 6 | * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets 7 | * and bundleReleaseJsAndAssets). 8 | * These basically call `react-native bundle` with the correct arguments during the Android build 9 | * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the 10 | * bundle directly from the development server. Below you can see all the possible configurations 11 | * and their defaults. If you decide to add a configuration block, make sure to add it before the 12 | * `apply from: "../../node_modules/react-native/react.gradle"` line. 13 | * 14 | * project.ext.react = [ 15 | * // the name of the generated asset file containing your JS bundle 16 | * bundleAssetName: "index.android.bundle", 17 | * 18 | * // the entry file for bundle generation 19 | * entryFile: "index.android.js", 20 | * 21 | * // whether to bundle JS and assets in debug mode 22 | * bundleInDebug: false, 23 | * 24 | * // whether to bundle JS and assets in release mode 25 | * bundleInRelease: true, 26 | * 27 | * // whether to bundle JS and assets in another build variant (if configured). 28 | * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants 29 | * // The configuration property can be in the following formats 30 | * // 'bundleIn${productFlavor}${buildType}' 31 | * // 'bundleIn${buildType}' 32 | * // bundleInFreeDebug: true, 33 | * // bundleInPaidRelease: true, 34 | * // bundleInBeta: true, 35 | * 36 | * // whether to disable dev mode in custom build variants (by default only disabled in release) 37 | * // for example: to disable dev mode in the staging build type (if configured) 38 | * devDisabledInStaging: true, 39 | * // The configuration property can be in the following formats 40 | * // 'devDisabledIn${productFlavor}${buildType}' 41 | * // 'devDisabledIn${buildType}' 42 | * 43 | * // the root of your project, i.e. where "package.json" lives 44 | * root: "../../", 45 | * 46 | * // where to put the JS bundle asset in debug mode 47 | * jsBundleDirDebug: "$buildDir/intermediates/assets/debug", 48 | * 49 | * // where to put the JS bundle asset in release mode 50 | * jsBundleDirRelease: "$buildDir/intermediates/assets/release", 51 | * 52 | * // where to put drawable resources / React Native assets, e.g. the ones you use via 53 | * // require('./image.png')), in debug mode 54 | * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug", 55 | * 56 | * // where to put drawable resources / React Native assets, e.g. the ones you use via 57 | * // require('./image.png')), in release mode 58 | * resourcesDirRelease: "$buildDir/intermediates/res/merged/release", 59 | * 60 | * // by default the gradle tasks are skipped if none of the JS files or assets change; this means 61 | * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to 62 | * // date; if you have any other folders that you want to ignore for performance reasons (gradle 63 | * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/ 64 | * // for example, you might want to remove it from here. 65 | * inputExcludes: ["android/**", "ios/**"], 66 | * 67 | * // override which node gets called and with what additional arguments 68 | * nodeExecutableAndArgs: ["node"], 69 | * 70 | * // supply additional arguments to the packager 71 | * extraPackagerArgs: [] 72 | * ] 73 | */ 74 | 75 | project.ext.react = [ 76 | entryFile: "index.js" 77 | ] 78 | 79 | apply from: "../../node_modules/react-native/react.gradle" 80 | 81 | /** 82 | * Set this to true to create two separate APKs instead of one: 83 | * - An APK that only works on ARM devices 84 | * - An APK that only works on x86 devices 85 | * The advantage is the size of the APK is reduced by about 4MB. 86 | * Upload all the APKs to the Play Store and people will download 87 | * the correct one based on the CPU architecture of their device. 88 | */ 89 | def enableSeparateBuildPerCPUArchitecture = true 90 | 91 | /** 92 | * Run Proguard to shrink the Java bytecode in release builds. 93 | */ 94 | def enableProguardInReleaseBuilds = true 95 | 96 | android { 97 | compileSdkVersion rootProject.ext.compileSdkVersion 98 | buildToolsVersion rootProject.ext.buildToolsVersion 99 | 100 | defaultConfig { 101 | applicationId "com.example" 102 | minSdkVersion rootProject.ext.minSdkVersion 103 | targetSdkVersion rootProject.ext.targetSdkVersion 104 | versionCode 1 105 | versionName "1.0" 106 | ndk { 107 | abiFilters "armeabi-v7a", "x86" 108 | } 109 | } 110 | splits { 111 | abi { 112 | reset() 113 | enable enableSeparateBuildPerCPUArchitecture 114 | universalApk false // If true, also generate a universal APK 115 | include "armeabi-v7a", "x86" 116 | } 117 | } 118 | buildTypes { 119 | release { 120 | minifyEnabled enableProguardInReleaseBuilds 121 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" 122 | } 123 | } 124 | // applicationVariants are e.g. debug, release 125 | applicationVariants.all { variant -> 126 | variant.outputs.each { output -> 127 | // For each separate APK per architecture, set a unique version code as described here: 128 | // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits 129 | def versionCodes = ["armeabi-v7a":1, "x86":2] 130 | def abi = output.getFilter(OutputFile.ABI) 131 | if (abi != null) { // null for the universal-debug, universal-release variants 132 | output.versionCodeOverride = 133 | versionCodes.get(abi) * 1048576 + defaultConfig.versionCode 134 | } 135 | } 136 | } 137 | } 138 | 139 | dependencies { 140 | implementation project(':react-native-network-state') 141 | implementation fileTree(dir: "libs", include: ["*.jar"]) 142 | implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}" 143 | implementation "com.facebook.react:react-native:+" // From node_modules 144 | } 145 | 146 | // Run this once to be able to run the application with BUCK 147 | // puts all compile dependencies into folder libs for BUCK to use 148 | task copyDownloadableDepsToLibs(type: Copy) { 149 | from configurations.compile 150 | into 'libs' 151 | } 152 | -------------------------------------------------------------------------------- /example/android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /example/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 14 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /example/android/app/src/main/java/com/example/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.example; 2 | 3 | import com.facebook.react.ReactActivity; 4 | 5 | public class MainActivity extends ReactActivity { 6 | 7 | /** 8 | * Returns the name of the main component registered from JavaScript. 9 | * This is used to schedule rendering of the component. 10 | */ 11 | @Override 12 | protected String getMainComponentName() { 13 | return "example"; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /example/android/app/src/main/java/com/example/MainApplication.java: -------------------------------------------------------------------------------- 1 | package com.example; 2 | 3 | import android.app.Application; 4 | 5 | import com.facebook.react.ReactApplication; 6 | import com.reactnativevietnam.RNNetworkStatePackage; 7 | import com.facebook.react.ReactNativeHost; 8 | import com.facebook.react.ReactPackage; 9 | import com.facebook.react.shell.MainReactPackage; 10 | import com.facebook.soloader.SoLoader; 11 | 12 | import java.util.Arrays; 13 | import java.util.List; 14 | 15 | public class MainApplication extends Application implements ReactApplication { 16 | 17 | private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) { 18 | @Override 19 | public boolean getUseDeveloperSupport() { 20 | return BuildConfig.DEBUG; 21 | } 22 | 23 | @Override 24 | protected List getPackages() { 25 | return Arrays.asList( 26 | new MainReactPackage(), 27 | new RNNetworkStatePackage() 28 | ); 29 | } 30 | 31 | @Override 32 | protected String getJSMainModuleName() { 33 | return "index"; 34 | } 35 | }; 36 | 37 | @Override 38 | public ReactNativeHost getReactNativeHost() { 39 | return mReactNativeHost; 40 | } 41 | 42 | @Override 43 | public void onCreate() { 44 | super.onCreate(); 45 | SoLoader.init(this, /* native exopackage */ false); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-vietnam/react-native-network-state/3526914747f81f9e1b101ba30c92993e687ea4d8/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-vietnam/react-native-network-state/3526914747f81f9e1b101ba30c92993e687ea4d8/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-vietnam/react-native-network-state/3526914747f81f9e1b101ba30c92993e687ea4d8/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-vietnam/react-native-network-state/3526914747f81f9e1b101ba30c92993e687ea4d8/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-vietnam/react-native-network-state/3526914747f81f9e1b101ba30c92993e687ea4d8/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-vietnam/react-native-network-state/3526914747f81f9e1b101ba30c92993e687ea4d8/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-vietnam/react-native-network-state/3526914747f81f9e1b101ba30c92993e687ea4d8/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-vietnam/react-native-network-state/3526914747f81f9e1b101ba30c92993e687ea4d8/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-vietnam/react-native-network-state/3526914747f81f9e1b101ba30c92993e687ea4d8/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-vietnam/react-native-network-state/3526914747f81f9e1b101ba30c92993e687ea4d8/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | example 3 | 4 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | ext { 5 | buildToolsVersion = "27.0.3" 6 | minSdkVersion = 16 7 | compileSdkVersion = 27 8 | targetSdkVersion = 26 9 | supportLibVersion = "27.1.1" 10 | } 11 | repositories { 12 | google() 13 | jcenter() 14 | } 15 | dependencies { 16 | classpath 'com.android.tools.build:gradle:3.1.4' 17 | 18 | // NOTE: Do not place your application dependencies here; they belong 19 | // in the individual module build.gradle files 20 | } 21 | } 22 | 23 | allprojects { 24 | repositories { 25 | google() 26 | mavenLocal() 27 | jcenter() 28 | maven { 29 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm 30 | url "$rootDir/../node_modules/react-native/android" 31 | } 32 | } 33 | } 34 | 35 | 36 | task wrapper(type: Wrapper) { 37 | gradleVersion = '4.4' 38 | distributionUrl = distributionUrl.replace("bin", "all") 39 | } 40 | -------------------------------------------------------------------------------- /example/android/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true 19 | -------------------------------------------------------------------------------- /example/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/react-native-vietnam/react-native-network-state/3526914747f81f9e1b101ba30c92993e687ea4d8/example/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /example/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip 6 | -------------------------------------------------------------------------------- /example/android/gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Attempt to set APP_HOME 10 | # Resolve links: $0 may be a link 11 | PRG="$0" 12 | # Need this for relative symlinks. 13 | while [ -h "$PRG" ] ; do 14 | ls=`ls -ld "$PRG"` 15 | link=`expr "$ls" : '.*-> \(.*\)$'` 16 | if expr "$link" : '/.*' > /dev/null; then 17 | PRG="$link" 18 | else 19 | PRG=`dirname "$PRG"`"/$link" 20 | fi 21 | done 22 | SAVED="`pwd`" 23 | cd "`dirname \"$PRG\"`/" >/dev/null 24 | APP_HOME="`pwd -P`" 25 | cd "$SAVED" >/dev/null 26 | 27 | APP_NAME="Gradle" 28 | APP_BASE_NAME=`basename "$0"` 29 | 30 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 31 | DEFAULT_JVM_OPTS="" 32 | 33 | # Use the maximum available, or set MAX_FD != -1 to use that value. 34 | MAX_FD="maximum" 35 | 36 | warn () { 37 | echo "$*" 38 | } 39 | 40 | die () { 41 | echo 42 | echo "$*" 43 | echo 44 | exit 1 45 | } 46 | 47 | # OS specific support (must be 'true' or 'false'). 48 | cygwin=false 49 | msys=false 50 | darwin=false 51 | nonstop=false 52 | case "`uname`" in 53 | CYGWIN* ) 54 | cygwin=true 55 | ;; 56 | Darwin* ) 57 | darwin=true 58 | ;; 59 | MINGW* ) 60 | msys=true 61 | ;; 62 | NONSTOP* ) 63 | nonstop=true 64 | ;; 65 | esac 66 | 67 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 68 | 69 | # Determine the Java command to use to start the JVM. 70 | if [ -n "$JAVA_HOME" ] ; then 71 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 72 | # IBM's JDK on AIX uses strange locations for the executables 73 | JAVACMD="$JAVA_HOME/jre/sh/java" 74 | else 75 | JAVACMD="$JAVA_HOME/bin/java" 76 | fi 77 | if [ ! -x "$JAVACMD" ] ; then 78 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 79 | 80 | Please set the JAVA_HOME variable in your environment to match the 81 | location of your Java installation." 82 | fi 83 | else 84 | JAVACMD="java" 85 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 86 | 87 | Please set the JAVA_HOME variable in your environment to match the 88 | location of your Java installation." 89 | fi 90 | 91 | # Increase the maximum file descriptors if we can. 92 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then 93 | MAX_FD_LIMIT=`ulimit -H -n` 94 | if [ $? -eq 0 ] ; then 95 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 96 | MAX_FD="$MAX_FD_LIMIT" 97 | fi 98 | ulimit -n $MAX_FD 99 | if [ $? -ne 0 ] ; then 100 | warn "Could not set maximum file descriptor limit: $MAX_FD" 101 | fi 102 | else 103 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 104 | fi 105 | fi 106 | 107 | # For Darwin, add options to specify how the application appears in the dock 108 | if $darwin; then 109 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 110 | fi 111 | 112 | # For Cygwin, switch paths to Windows format before running java 113 | if $cygwin ; then 114 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 115 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 116 | JAVACMD=`cygpath --unix "$JAVACMD"` 117 | 118 | # We build the pattern for arguments to be converted via cygpath 119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 120 | SEP="" 121 | for dir in $ROOTDIRSRAW ; do 122 | ROOTDIRS="$ROOTDIRS$SEP$dir" 123 | SEP="|" 124 | done 125 | OURCYGPATTERN="(^($ROOTDIRS))" 126 | # Add a user-defined pattern to the cygpath arguments 127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 129 | fi 130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 131 | i=0 132 | for arg in "$@" ; do 133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 135 | 136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 138 | else 139 | eval `echo args$i`="\"$arg\"" 140 | fi 141 | i=$((i+1)) 142 | done 143 | case $i in 144 | (0) set -- ;; 145 | (1) set -- "$args0" ;; 146 | (2) set -- "$args0" "$args1" ;; 147 | (3) set -- "$args0" "$args1" "$args2" ;; 148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 154 | esac 155 | fi 156 | 157 | # Escape application args 158 | save () { 159 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done 160 | echo " " 161 | } 162 | APP_ARGS=$(save "$@") 163 | 164 | # Collect all arguments for the java command, following the shell quoting and substitution rules 165 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" 166 | 167 | # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong 168 | if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then 169 | cd "$(dirname "$0")" 170 | fi 171 | 172 | exec "$JAVACMD" "$@" 173 | -------------------------------------------------------------------------------- /example/android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | set DIRNAME=%~dp0 12 | if "%DIRNAME%" == "" set DIRNAME=. 13 | set APP_BASE_NAME=%~n0 14 | set APP_HOME=%DIRNAME% 15 | 16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 17 | set DEFAULT_JVM_OPTS= 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windows variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | 53 | :win9xME_args 54 | @rem Slurp the command line arguments. 55 | set CMD_LINE_ARGS= 56 | set _SKIP=2 57 | 58 | :win9xME_args_slurp 59 | if "x%~1" == "x" goto execute 60 | 61 | set CMD_LINE_ARGS=%* 62 | 63 | :execute 64 | @rem Setup the command line 65 | 66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 67 | 68 | @rem Execute Gradle 69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 70 | 71 | :end 72 | @rem End local scope for the variables with windows NT shell 73 | if "%ERRORLEVEL%"=="0" goto mainEnd 74 | 75 | :fail 76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 77 | rem the _cmd.exe /c_ return code! 78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 79 | exit /b 1 80 | 81 | :mainEnd 82 | if "%OS%"=="Windows_NT" endlocal 83 | 84 | :omega 85 | -------------------------------------------------------------------------------- /example/android/keystores/BUCK: -------------------------------------------------------------------------------- 1 | keystore( 2 | name = "debug", 3 | properties = "debug.keystore.properties", 4 | store = "debug.keystore", 5 | visibility = [ 6 | "PUBLIC", 7 | ], 8 | ) 9 | -------------------------------------------------------------------------------- /example/android/keystores/debug.keystore.properties: -------------------------------------------------------------------------------- 1 | key.store=debug.keystore 2 | key.alias=androiddebugkey 3 | key.store.password=android 4 | key.alias.password=android 5 | -------------------------------------------------------------------------------- /example/android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'example' 2 | include ':react-native-network-state' 3 | project(':react-native-network-state').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-network-state/android') 4 | 5 | include ':app' 6 | -------------------------------------------------------------------------------- /example/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "example", 3 | "displayName": "example" 4 | } -------------------------------------------------------------------------------- /example/index.js: -------------------------------------------------------------------------------- 1 | /** @format */ 2 | 3 | import {AppRegistry} from 'react-native'; 4 | import App from './App'; 5 | import {name as appName} from './app.json'; 6 | 7 | AppRegistry.registerComponent(appName, () => App); 8 | -------------------------------------------------------------------------------- /example/ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment the next line to define a global platform for your project 2 | platform :ios, '9.0' 3 | 4 | target 'example' do 5 | # Uncomment the next line if you're using Swift or would like to use dynamic frameworks 6 | # use_frameworks! 7 | 8 | pod 'RNNetwokState', :path => 'https://github.com/react-native-vietnam/react-native-network-state.git' 9 | 10 | # Pods for example 11 | target 'exampleTests' do 12 | inherit! :search_paths 13 | # Pods for testing 14 | end 15 | 16 | end 17 | 18 | target 'example-tvOS' do 19 | # Uncomment the next line if you're using Swift or would like to use dynamic frameworks 20 | # use_frameworks! 21 | 22 | # Pods for example-tvOS 23 | 24 | target 'example-tvOSTests' do 25 | inherit! :search_paths 26 | # Pods for testing 27 | end 28 | 29 | end 30 | -------------------------------------------------------------------------------- /example/ios/example-tvOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UIViewControllerBasedStatusBarAppearance 38 | 39 | NSLocationWhenInUseUsageDescription 40 | 41 | NSAppTransportSecurity 42 | 43 | 44 | NSExceptionDomains 45 | 46 | localhost 47 | 48 | NSExceptionAllowsInsecureHTTPLoads 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /example/ios/example-tvOSTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /example/ios/example.xcodeproj/xcshareddata/xcschemes/example-tvOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 43 | 49 | 50 | 51 | 52 | 53 | 58 | 59 | 61 | 67 | 68 | 69 | 70 | 71 | 77 | 78 | 79 | 80 | 81 | 82 | 92 | 94 | 100 | 101 | 102 | 103 | 104 | 105 | 111 | 113 | 119 | 120 | 121 | 122 | 124 | 125 | 128 | 129 | 130 | -------------------------------------------------------------------------------- /example/ios/example.xcodeproj/xcshareddata/xcschemes/example.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 43 | 49 | 50 | 51 | 52 | 53 | 58 | 59 | 61 | 67 | 68 | 69 | 70 | 71 | 77 | 78 | 79 | 80 | 81 | 82 | 92 | 94 | 100 | 101 | 102 | 103 | 104 | 105 | 111 | 113 | 119 | 120 | 121 | 122 | 124 | 125 | 128 | 129 | 130 | -------------------------------------------------------------------------------- /example/ios/example/AppDelegate.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | #import 9 | 10 | @interface AppDelegate : UIResponder 11 | 12 | @property (nonatomic, strong) UIWindow *window; 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /example/ios/example/AppDelegate.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | #import "AppDelegate.h" 9 | 10 | #import 11 | #import 12 | 13 | @implementation AppDelegate 14 | 15 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 16 | { 17 | NSURL *jsCodeLocation; 18 | 19 | jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil]; 20 | 21 | RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation 22 | moduleName:@"example" 23 | initialProperties:nil 24 | launchOptions:launchOptions]; 25 | rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1]; 26 | 27 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; 28 | UIViewController *rootViewController = [UIViewController new]; 29 | rootViewController.view = rootView; 30 | self.window.rootViewController = rootViewController; 31 | [self.window makeKeyAndVisible]; 32 | return YES; 33 | } 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /example/ios/example/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 21 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /example/ios/example/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /example/ios/example/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /example/ios/example/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | example 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSRequiresIPhoneOS 26 | 27 | NSLocationWhenInUseUsageDescription 28 | 29 | UILaunchStoryboardName 30 | LaunchScreen 31 | UIRequiredDeviceCapabilities 32 | 33 | armv7 34 | 35 | UISupportedInterfaceOrientations 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationLandscapeLeft 39 | UIInterfaceOrientationLandscapeRight 40 | 41 | UIViewControllerBasedStatusBarAppearance 42 | 43 | NSLocationWhenInUseUsageDescription 44 | 45 | NSAppTransportSecurity 46 | 47 | 48 | NSAllowsArbitraryLoads 49 | 50 | NSExceptionDomains 51 | 52 | localhost 53 | 54 | NSExceptionAllowsInsecureHTTPLoads 55 | 56 | 57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /example/ios/example/main.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | #import 9 | 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /example/ios/exampleTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /example/ios/exampleTests/exampleTests.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | #import 9 | #import 10 | 11 | #import 12 | #import 13 | 14 | #define TIMEOUT_SECONDS 600 15 | #define TEXT_TO_LOOK_FOR @"Welcome to React Native!" 16 | 17 | @interface exampleTests : XCTestCase 18 | 19 | @end 20 | 21 | @implementation exampleTests 22 | 23 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test 24 | { 25 | if (test(view)) { 26 | return YES; 27 | } 28 | for (UIView *subview in [view subviews]) { 29 | if ([self findSubviewInView:subview matching:test]) { 30 | return YES; 31 | } 32 | } 33 | return NO; 34 | } 35 | 36 | - (void)testRendersWelcomeScreen 37 | { 38 | UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController]; 39 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; 40 | BOOL foundElement = NO; 41 | 42 | __block NSString *redboxError = nil; 43 | RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) { 44 | if (level >= RCTLogLevelError) { 45 | redboxError = message; 46 | } 47 | }); 48 | 49 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { 50 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 51 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 52 | 53 | foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) { 54 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { 55 | return YES; 56 | } 57 | return NO; 58 | }]; 59 | } 60 | 61 | RCTSetLogFunction(RCTDefaultLogFunction); 62 | 63 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); 64 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); 65 | } 66 | 67 | 68 | @end 69 | -------------------------------------------------------------------------------- /example/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "example", 3 | "version": "0.0.1", 4 | "private": true, 5 | "scripts": { 6 | "start": "node node_modules/react-native/local-cli/cli.js start", 7 | "test": "jest" 8 | }, 9 | "dependencies": { 10 | "react": "16.6.0-alpha.8af6728", 11 | "react-native": "0.57.4", 12 | "react-native-network-state": "^1.1.2" 13 | }, 14 | "devDependencies": { 15 | "babel-jest": "23.6.0", 16 | "jest": "23.6.0", 17 | "metro-react-native-babel-preset": "0.49.0", 18 | "react-test-renderer": "16.6.0-alpha.8af6728" 19 | }, 20 | "jest": { 21 | "preset": "react-native" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /fixAndroid.js: -------------------------------------------------------------------------------- 1 | //@flow 2 | 3 | 'use strict' 4 | 5 | const chalk = require('chalk') 6 | const fs = require('fs') 7 | 8 | function replaceKeyword(content) { 9 | content = content.split(/compile\s/).join('implementation ') 10 | content = content.split('compile("').join('implementation("') 11 | content = content.split('compile(').join('implementation(') 12 | content = content 13 | .split(/androidTestCompile\s/) 14 | .join('androidTestImplementation ') 15 | content = content.split(/testCompile\s/).join('testImplementation ') 16 | content = content.split(/debugCompile\s/).join('debugImplementation ') 17 | content = content.split(/testApi\s/).join('testImplementation ') 18 | content = content.split(/provided\s/).join('compileOnly ') 19 | return content 20 | } 21 | 22 | function processGradle() { 23 | console.log(chalk.green.bold('####################################')) 24 | console.log( 25 | chalk.green.bold('#') + 26 | chalk.black.bold(' Upgrade All Android build.gradle ') + 27 | chalk.green.bold('#') 28 | ) 29 | console.log(chalk.green.bold('####################################\n')) 30 | if (!fs.existsSync('./node_modules')) { 31 | console.log(chalk.red.bold('node_modules directory does not exists')) 32 | return 33 | } 34 | const dirs = fs.readdirSync('./node_modules') 35 | const subDirs = [] 36 | dirs.forEach(dir => { 37 | let exists = fs.existsSync(`./node_modules/${dir}/android/build.gradle`) 38 | if (exists) { 39 | subDirs.push(`./node_modules/${dir}/android/build.gradle`) 40 | } 41 | exists = fs.existsSync(`./node_modules/${dir}/ReactAndroid/build.gradle`) 42 | if (exists) { 43 | subDirs.push(`./node_modules/${dir}/ReactAndroid/build.gradle`) 44 | } 45 | exists = fs.existsSync(`./node_modules/${dir}/src/android/build.gradle`) 46 | if (exists) { 47 | subDirs.push(`./node_modules/${dir}/src/android/build.gradle`) 48 | } 49 | exists = fs.existsSync(`./node_modules/${dir}/lib/android/build.gradle`) 50 | if (exists) { 51 | subDirs.push(`./node_modules/${dir}/lib/android/build.gradle`) 52 | } 53 | exists = fs.existsSync(`./node_modules/${dir}/android/app/build.gradle`) 54 | if (exists) { 55 | subDirs.push(`./node_modules/${dir}/android/app/build.gradle`) 56 | } 57 | }) 58 | subDirs.forEach(gradle => { 59 | fs.writeFileSync(gradle, replaceKeyword(fs.readFileSync(gradle).toString())) 60 | console.log(chalk.green.bold('Processed file: ') + gradle) 61 | }) 62 | } 63 | 64 | setImmediate(() => { 65 | processGradle() 66 | }) 67 | -------------------------------------------------------------------------------- /index.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'react-native-network-state' { 2 | import * as React from 'react'; 3 | import * as ReactNative from 'react-native'; 4 | 5 | export interface NetworkStateProps extends ReactNative.ViewProps { 6 | visible?: boolean, 7 | debound?: number, 8 | txtConnected?: string, 9 | txtDisconnected?: string, 10 | styleConnected?: Object | Number, 11 | styleDisconnected?: Object | Number, 12 | onConnected?: Function, 13 | onDisconnected?: Function, 14 | style?: number | Object | Array 15 | } 16 | 17 | export interface Settings { 18 | openWifi(): void; 19 | } 20 | export class NetworkState extends React.PureComponent { } 21 | 22 | export default NetworkState; 23 | } 24 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | //@flow 2 | 3 | import React from 'react' 4 | import { 5 | View, 6 | Text, 7 | StyleSheet, 8 | NativeModules, 9 | NativeEventEmitter 10 | } from 'react-native' 11 | 12 | type Props = { 13 | visible?: boolean, 14 | debound?: number, 15 | txtConnected?: string, 16 | txtDisconnected?: string, 17 | styleConnected?: Object | Number, 18 | styleDisconnected?: Object | Number, 19 | onConnected?: Function, 20 | onDisconnected?: Function, 21 | style?: number | Object | Array 22 | } 23 | 24 | type State = { 25 | isConnected: boolean, 26 | type: string, 27 | isFast: boolean, 28 | shouldVisible: boolean 29 | } 30 | type NetworkData = { 31 | isConnected: boolean, 32 | type: string, 33 | isFast: boolean 34 | } 35 | export const Settings = NativeModules.RNNetworkState 36 | const RNNetworkStateEventEmitter = new NativeEventEmitter(Settings) 37 | 38 | export default class NetworkState extends React.PureComponent { 39 | static defaultProps = { 40 | visible: true, 41 | debound: 1500, 42 | txtConnected: 'Connected', 43 | txtDisconnected: 'No Internet Connection', 44 | onConnected: () => {}, 45 | onDisconnected: () => {} 46 | } 47 | 48 | state = { 49 | shouldVisible: !Settings.isConnected, 50 | isConnected: Settings.isConnected, 51 | type: Settings.type, 52 | isFast: Settings.isFast 53 | } 54 | 55 | _TIMEOUT = null 56 | _listener: any = null 57 | 58 | constructor(props: Props) { 59 | super(props) 60 | 61 | const { onConnected, onDisconnected } = this.props 62 | const { isConnected, type, isFast } = Settings 63 | isConnected 64 | ? onConnected({ isConnected, type, isFast }) 65 | : onDisconnected({ isConnected, type, isFast }) 66 | 67 | this._listener = RNNetworkStateEventEmitter.addListener( 68 | 'networkChanged', 69 | (data: NetworkData) => { 70 | if (this.state.isConnected !== data.isConnected) { 71 | data.isConnected ? onConnected(data) : onDisconnected(data) 72 | this.setState({ ...data, shouldVisible: true }) 73 | } 74 | } 75 | ) 76 | } 77 | 78 | componentWillUnmount() { 79 | this._TIMEOUT && clearTimeout(this._TIMEOUT) 80 | this._listener.remove() 81 | } 82 | 83 | render() { 84 | const { 85 | txtConnected, 86 | txtDisconnected, 87 | styleConnected, 88 | styleDisconnected, 89 | debound, 90 | visible, 91 | ...viewProps 92 | } = this.props 93 | 94 | if (this.state.shouldVisible && this.state.isConnected) { 95 | this._TIMEOUT && clearTimeout(this._TIMEOUT) 96 | this._TIMEOUT = setTimeout(() => { 97 | this.setState({ shouldVisible: false }) 98 | }, debound) 99 | } 100 | if (!this.state.shouldVisible || !visible) { 101 | return 102 | } 103 | return ( 104 | 105 | 112 | {this.state.isConnected ? txtConnected : txtDisconnected} 113 | 114 | 115 | ) 116 | } 117 | } 118 | 119 | const styles = StyleSheet.create({ 120 | txtSuccess: { 121 | paddingVertical: 5, 122 | color: '#fff', 123 | backgroundColor: '#4caf50', 124 | textAlign: 'center' 125 | }, 126 | txtError: { 127 | paddingVertical: 5, 128 | color: '#fff', 129 | backgroundColor: '#f44336', 130 | textAlign: 'center' 131 | } 132 | }) 133 | -------------------------------------------------------------------------------- /ios/RNNetworkState.h: -------------------------------------------------------------------------------- 1 | // 2 | // RCTNetworkStatus.h 3 | // 4 | // Created by Anh Tuan Nguyen on 8/8/18. 5 | // Copyright © 2018 ReactNativeVietnam. All rights reserved. 6 | // 7 | 8 | #import 9 | #import 10 | 11 | @interface RNNetworkState : RCTEventEmitter 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /ios/RNNetworkState.m: -------------------------------------------------------------------------------- 1 | // 2 | // RCTNetworkStatus.m 3 | // 4 | // Created by Anh Tuan Nguyen on 8/8/18. 5 | // Copyright © 2018 ReactNativeVietnam. All rights reserved. 6 | // 7 | 8 | #import "RNNetworkState.h" 9 | #import "Reachability.h" 10 | 11 | @implementation RNNetworkState { 12 | Reachability* reach; 13 | BOOL hasListener; 14 | NetworkStatus prevStatus; 15 | NSTimer *timer; 16 | } 17 | @synthesize bridge = _bridge; 18 | - (dispatch_queue_t)methodQueue 19 | { 20 | return dispatch_get_main_queue(); 21 | } 22 | + (BOOL)requiresMainQueueSetup { 23 | return YES; 24 | } 25 | - (void)startObserving { 26 | hasListener = @YES; 27 | timer = [NSTimer scheduledTimerWithTimeInterval: 1 target: self selector:@selector(monitorNetwork:) userInfo:nil repeats:YES]; 28 | } 29 | - (void)stopObserving { 30 | hasListener = @NO; 31 | if([timer isValid]) { 32 | [timer invalidate]; 33 | } 34 | timer = nil; 35 | } 36 | - (NSArray *)supportedEvents { 37 | return @[@"networkChanged"]; 38 | } 39 | - (instancetype)init 40 | { 41 | self = [super init]; 42 | if (self) { 43 | reach = [Reachability reachabilityWithHostname:@"www.google.com"]; 44 | prevStatus = [reach currentReachabilityStatus]; 45 | } 46 | return self; 47 | } 48 | 49 | - (void) monitorNetwork:(NSTimer *) monitorNetwork { 50 | NetworkStatus status = [reach currentReachabilityStatus]; 51 | if(prevStatus == status) { 52 | return; 53 | } 54 | prevStatus = status; 55 | BOOL isConnected = (status == ReachableViaWWAN || status == ReachableViaWiFi); 56 | NSString *type = [reach currentReachabilityString]; 57 | NSDictionary *data = @{@"isConnected": isConnected ? @YES : @NO, 58 | @"type": type, 59 | @"isFast": isConnected ? @YES : @NO 60 | }; 61 | if(!hasListener) { 62 | return; 63 | } 64 | [self sendEventWithName:@"networkChanged" body:data]; 65 | } 66 | RCT_EXPORT_MODULE(); 67 | RCT_EXPORT_METHOD(openWifi) { 68 | NSURL *url = [NSURL URLWithString:UIApplicationOpenSettingsURLString]; 69 | if ([[UIApplication sharedApplication] canOpenURL:url]) { 70 | [[UIApplication sharedApplication] openURL:url]; 71 | } 72 | } 73 | - (NSDictionary *)constantsToExport { 74 | NetworkStatus status = [reach currentReachabilityStatus]; 75 | BOOL isConnected = (status == ReachableViaWWAN || status == ReachableViaWiFi); 76 | NSString *type = [reach currentReachabilityString]; 77 | return @{@"isConnected": isConnected ? @YES : @NO, 78 | @"type": type, 79 | @"isFast": isConnected ? @YES : @NO 80 | }; 81 | } 82 | RCT_EXPORT_METHOD(reload){ 83 | [_bridge reload]; 84 | } 85 | @end 86 | -------------------------------------------------------------------------------- /ios/RNNetworkState.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 3A4F23AB211ADC5600DC451F /* Reachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 3A4F23A9211ADC5600DC451F /* Reachability.m */; }; 11 | B3E7B58A1CC2AC0600A0062D /* RNNetworkState.m in Sources */ = {isa = PBXBuildFile; fileRef = B3E7B5891CC2AC0600A0062D /* RNNetworkState.m */; }; 12 | /* End PBXBuildFile section */ 13 | 14 | /* Begin PBXCopyFilesBuildPhase section */ 15 | 58B511D91A9E6C8500147676 /* CopyFiles */ = { 16 | isa = PBXCopyFilesBuildPhase; 17 | buildActionMask = 2147483647; 18 | dstPath = "include/$(PRODUCT_NAME)"; 19 | dstSubfolderSpec = 16; 20 | files = ( 21 | ); 22 | runOnlyForDeploymentPostprocessing = 0; 23 | }; 24 | /* End PBXCopyFilesBuildPhase section */ 25 | 26 | /* Begin PBXFileReference section */ 27 | 134814201AA4EA6300B7C361 /* libRNNetworkState.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRNNetworkState.a; sourceTree = BUILT_PRODUCTS_DIR; }; 28 | 3A4F23A9211ADC5600DC451F /* Reachability.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Reachability.m; sourceTree = ""; }; 29 | 3A4F23AA211ADC5600DC451F /* Reachability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Reachability.h; sourceTree = ""; }; 30 | B3E7B5881CC2AC0600A0062D /* RNNetworkState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNNetworkState.h; sourceTree = ""; }; 31 | B3E7B5891CC2AC0600A0062D /* RNNetworkState.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNNetworkState.m; sourceTree = ""; }; 32 | /* End PBXFileReference section */ 33 | 34 | /* Begin PBXFrameworksBuildPhase section */ 35 | 58B511D81A9E6C8500147676 /* Frameworks */ = { 36 | isa = PBXFrameworksBuildPhase; 37 | buildActionMask = 2147483647; 38 | files = ( 39 | ); 40 | runOnlyForDeploymentPostprocessing = 0; 41 | }; 42 | /* End PBXFrameworksBuildPhase section */ 43 | 44 | /* Begin PBXGroup section */ 45 | 134814211AA4EA7D00B7C361 /* Products */ = { 46 | isa = PBXGroup; 47 | children = ( 48 | 134814201AA4EA6300B7C361 /* libRNNetworkState.a */, 49 | ); 50 | name = Products; 51 | sourceTree = ""; 52 | }; 53 | 58B511D21A9E6C8500147676 = { 54 | isa = PBXGroup; 55 | children = ( 56 | 3A4F23AA211ADC5600DC451F /* Reachability.h */, 57 | 3A4F23A9211ADC5600DC451F /* Reachability.m */, 58 | B3E7B5881CC2AC0600A0062D /* RNNetworkState.h */, 59 | B3E7B5891CC2AC0600A0062D /* RNNetworkState.m */, 60 | 134814211AA4EA7D00B7C361 /* Products */, 61 | ); 62 | sourceTree = ""; 63 | }; 64 | /* End PBXGroup section */ 65 | 66 | /* Begin PBXNativeTarget section */ 67 | 58B511DA1A9E6C8500147676 /* RNNetworkState */ = { 68 | isa = PBXNativeTarget; 69 | buildConfigurationList = 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "RNNetworkState" */; 70 | buildPhases = ( 71 | 58B511D71A9E6C8500147676 /* Sources */, 72 | 58B511D81A9E6C8500147676 /* Frameworks */, 73 | 58B511D91A9E6C8500147676 /* CopyFiles */, 74 | ); 75 | buildRules = ( 76 | ); 77 | dependencies = ( 78 | ); 79 | name = RNNetworkState; 80 | productName = RCTDataManager; 81 | productReference = 134814201AA4EA6300B7C361 /* libRNNetworkState.a */; 82 | productType = "com.apple.product-type.library.static"; 83 | }; 84 | /* End PBXNativeTarget section */ 85 | 86 | /* Begin PBXProject section */ 87 | 58B511D31A9E6C8500147676 /* Project object */ = { 88 | isa = PBXProject; 89 | attributes = { 90 | LastUpgradeCheck = 0830; 91 | ORGANIZATIONNAME = Facebook; 92 | TargetAttributes = { 93 | 58B511DA1A9E6C8500147676 = { 94 | CreatedOnToolsVersion = 6.1.1; 95 | }; 96 | }; 97 | }; 98 | buildConfigurationList = 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "RNNetworkState" */; 99 | compatibilityVersion = "Xcode 3.2"; 100 | developmentRegion = English; 101 | hasScannedForEncodings = 0; 102 | knownRegions = ( 103 | English, 104 | en, 105 | ); 106 | mainGroup = 58B511D21A9E6C8500147676; 107 | productRefGroup = 58B511D21A9E6C8500147676; 108 | projectDirPath = ""; 109 | projectRoot = ""; 110 | targets = ( 111 | 58B511DA1A9E6C8500147676 /* RNNetworkState */, 112 | ); 113 | }; 114 | /* End PBXProject section */ 115 | 116 | /* Begin PBXSourcesBuildPhase section */ 117 | 58B511D71A9E6C8500147676 /* Sources */ = { 118 | isa = PBXSourcesBuildPhase; 119 | buildActionMask = 2147483647; 120 | files = ( 121 | 3A4F23AB211ADC5600DC451F /* Reachability.m in Sources */, 122 | B3E7B58A1CC2AC0600A0062D /* RNNetworkState.m in Sources */, 123 | ); 124 | runOnlyForDeploymentPostprocessing = 0; 125 | }; 126 | /* End PBXSourcesBuildPhase section */ 127 | 128 | /* Begin XCBuildConfiguration section */ 129 | 58B511ED1A9E6C8500147676 /* Debug */ = { 130 | isa = XCBuildConfiguration; 131 | buildSettings = { 132 | ALWAYS_SEARCH_USER_PATHS = NO; 133 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 134 | CLANG_CXX_LIBRARY = "libc++"; 135 | CLANG_ENABLE_MODULES = YES; 136 | CLANG_ENABLE_OBJC_ARC = YES; 137 | CLANG_WARN_BOOL_CONVERSION = YES; 138 | CLANG_WARN_CONSTANT_CONVERSION = YES; 139 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 140 | CLANG_WARN_EMPTY_BODY = YES; 141 | CLANG_WARN_ENUM_CONVERSION = YES; 142 | CLANG_WARN_INFINITE_RECURSION = YES; 143 | CLANG_WARN_INT_CONVERSION = YES; 144 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 145 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 146 | CLANG_WARN_UNREACHABLE_CODE = YES; 147 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 148 | COPY_PHASE_STRIP = NO; 149 | ENABLE_STRICT_OBJC_MSGSEND = YES; 150 | ENABLE_TESTABILITY = YES; 151 | GCC_C_LANGUAGE_STANDARD = gnu99; 152 | GCC_DYNAMIC_NO_PIC = NO; 153 | GCC_NO_COMMON_BLOCKS = YES; 154 | GCC_OPTIMIZATION_LEVEL = 0; 155 | GCC_PREPROCESSOR_DEFINITIONS = ( 156 | "DEBUG=1", 157 | "$(inherited)", 158 | ); 159 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 160 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 161 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 162 | GCC_WARN_UNDECLARED_SELECTOR = YES; 163 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 164 | GCC_WARN_UNUSED_FUNCTION = YES; 165 | GCC_WARN_UNUSED_VARIABLE = YES; 166 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 167 | MTL_ENABLE_DEBUG_INFO = YES; 168 | ONLY_ACTIVE_ARCH = YES; 169 | SDKROOT = iphoneos; 170 | }; 171 | name = Debug; 172 | }; 173 | 58B511EE1A9E6C8500147676 /* Release */ = { 174 | isa = XCBuildConfiguration; 175 | buildSettings = { 176 | ALWAYS_SEARCH_USER_PATHS = NO; 177 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 178 | CLANG_CXX_LIBRARY = "libc++"; 179 | CLANG_ENABLE_MODULES = YES; 180 | CLANG_ENABLE_OBJC_ARC = YES; 181 | CLANG_WARN_BOOL_CONVERSION = YES; 182 | CLANG_WARN_CONSTANT_CONVERSION = YES; 183 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 184 | CLANG_WARN_EMPTY_BODY = YES; 185 | CLANG_WARN_ENUM_CONVERSION = YES; 186 | CLANG_WARN_INFINITE_RECURSION = YES; 187 | CLANG_WARN_INT_CONVERSION = YES; 188 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 189 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 190 | CLANG_WARN_UNREACHABLE_CODE = YES; 191 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 192 | COPY_PHASE_STRIP = YES; 193 | ENABLE_NS_ASSERTIONS = NO; 194 | ENABLE_STRICT_OBJC_MSGSEND = YES; 195 | GCC_C_LANGUAGE_STANDARD = gnu99; 196 | GCC_NO_COMMON_BLOCKS = YES; 197 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 198 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 199 | GCC_WARN_UNDECLARED_SELECTOR = YES; 200 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 201 | GCC_WARN_UNUSED_FUNCTION = YES; 202 | GCC_WARN_UNUSED_VARIABLE = YES; 203 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 204 | MTL_ENABLE_DEBUG_INFO = NO; 205 | SDKROOT = iphoneos; 206 | VALIDATE_PRODUCT = YES; 207 | }; 208 | name = Release; 209 | }; 210 | 58B511F01A9E6C8500147676 /* Debug */ = { 211 | isa = XCBuildConfiguration; 212 | buildSettings = { 213 | HEADER_SEARCH_PATHS = ( 214 | "$(inherited)", 215 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 216 | "$(SRCROOT)/../../../React/**", 217 | "$(SRCROOT)/../../react-native/React/**", 218 | ); 219 | LIBRARY_SEARCH_PATHS = "$(inherited)"; 220 | OTHER_LDFLAGS = "-ObjC"; 221 | PRODUCT_NAME = RNNetworkState; 222 | SKIP_INSTALL = YES; 223 | }; 224 | name = Debug; 225 | }; 226 | 58B511F11A9E6C8500147676 /* Release */ = { 227 | isa = XCBuildConfiguration; 228 | buildSettings = { 229 | HEADER_SEARCH_PATHS = ( 230 | "$(inherited)", 231 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 232 | "$(SRCROOT)/../../../React/**", 233 | "$(SRCROOT)/../../react-native/React/**", 234 | ); 235 | LIBRARY_SEARCH_PATHS = "$(inherited)"; 236 | OTHER_LDFLAGS = "-ObjC"; 237 | PRODUCT_NAME = RNNetworkState; 238 | SKIP_INSTALL = YES; 239 | }; 240 | name = Release; 241 | }; 242 | /* End XCBuildConfiguration section */ 243 | 244 | /* Begin XCConfigurationList section */ 245 | 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "RNNetworkState" */ = { 246 | isa = XCConfigurationList; 247 | buildConfigurations = ( 248 | 58B511ED1A9E6C8500147676 /* Debug */, 249 | 58B511EE1A9E6C8500147676 /* Release */, 250 | ); 251 | defaultConfigurationIsVisible = 0; 252 | defaultConfigurationName = Release; 253 | }; 254 | 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "RNNetworkState" */ = { 255 | isa = XCConfigurationList; 256 | buildConfigurations = ( 257 | 58B511F01A9E6C8500147676 /* Debug */, 258 | 58B511F11A9E6C8500147676 /* Release */, 259 | ); 260 | defaultConfigurationIsVisible = 0; 261 | defaultConfigurationName = Release; 262 | }; 263 | /* End XCConfigurationList section */ 264 | }; 265 | rootObject = 58B511D31A9E6C8500147676 /* Project object */; 266 | } 267 | -------------------------------------------------------------------------------- /ios/RNNetworkState.xcodeproj/xcshareddata/xcschemes/RNNetworkState.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 57 | 58 | 59 | 60 | 62 | 63 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /ios/RNNetworkState.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | 3 | 5 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Reachability.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2011, Tony Million. 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | 8 | 1. Redistributions of source code must retain the above copyright notice, this 9 | list of conditions and the following disclaimer. 10 | 11 | 2. Redistributions in binary form must reproduce the above copyright notice, 12 | this list of conditions and the following disclaimer in the documentation 13 | and/or other materials provided with the distribution. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 19 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 | POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #import 29 | #import 30 | 31 | //! Project version number for MacOSReachability. 32 | FOUNDATION_EXPORT double ReachabilityVersionNumber; 33 | 34 | //! Project version string for MacOSReachability. 35 | FOUNDATION_EXPORT const unsigned char ReachabilityVersionString[]; 36 | 37 | /** 38 | * Create NS_ENUM macro if it does not exist on the targeted version of iOS or OS X. 39 | * 40 | * @see http://nshipster.com/ns_enum-ns_options/ 41 | **/ 42 | #ifndef NS_ENUM 43 | #define NS_ENUM(_type, _name) enum _name : _type _name; enum _name : _type 44 | #endif 45 | 46 | extern NSString *const kReachabilityChangedNotification; 47 | 48 | typedef NS_ENUM(NSInteger, NetworkStatus) { 49 | // Apple NetworkStatus Compatible Names. 50 | NotReachable = 0, 51 | ReachableViaWiFi = 2, 52 | ReachableViaWWAN = 1 53 | }; 54 | 55 | @class Reachability; 56 | 57 | typedef void (^NetworkReachable)(Reachability * reachability); 58 | typedef void (^NetworkUnreachable)(Reachability * reachability); 59 | typedef void (^NetworkReachability)(Reachability * reachability, SCNetworkConnectionFlags flags); 60 | 61 | 62 | @interface Reachability : NSObject 63 | 64 | @property (nonatomic, copy) NetworkReachable reachableBlock; 65 | @property (nonatomic, copy) NetworkUnreachable unreachableBlock; 66 | @property (nonatomic, copy) NetworkReachability reachabilityBlock; 67 | 68 | @property (nonatomic, assign) BOOL reachableOnWWAN; 69 | 70 | 71 | +(instancetype)reachabilityWithHostname:(NSString*)hostname; 72 | // This is identical to the function above, but is here to maintain 73 | //compatibility with Apples original code. (see .m) 74 | +(instancetype)reachabilityWithHostName:(NSString*)hostname; 75 | +(instancetype)reachabilityForInternetConnection; 76 | +(instancetype)reachabilityWithAddress:(void *)hostAddress; 77 | +(instancetype)reachabilityForLocalWiFi; 78 | 79 | -(instancetype)initWithReachabilityRef:(SCNetworkReachabilityRef)ref; 80 | 81 | -(BOOL)startNotifier; 82 | -(void)stopNotifier; 83 | 84 | -(BOOL)isReachable; 85 | -(BOOL)isReachableViaWWAN; 86 | -(BOOL)isReachableViaWiFi; 87 | 88 | // WWAN may be available, but not active until a connection has been established. 89 | // WiFi may require a connection for VPN on Demand. 90 | -(BOOL)isConnectionRequired; // Identical DDG variant. 91 | -(BOOL)connectionRequired; // Apple's routine. 92 | // Dynamic, on demand connection? 93 | -(BOOL)isConnectionOnDemand; 94 | // Is user intervention required? 95 | -(BOOL)isInterventionRequired; 96 | 97 | -(NetworkStatus)currentReachabilityStatus; 98 | -(SCNetworkReachabilityFlags)reachabilityFlags; 99 | -(NSString*)currentReachabilityString; 100 | -(NSString*)currentReachabilityFlags; 101 | 102 | @end 103 | -------------------------------------------------------------------------------- /ios/Reachability.m: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2011, Tony Million. 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | 8 | 1. Redistributions of source code must retain the above copyright notice, this 9 | list of conditions and the following disclaimer. 10 | 11 | 2. Redistributions in binary form must reproduce the above copyright notice, 12 | this list of conditions and the following disclaimer in the documentation 13 | and/or other materials provided with the distribution. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 19 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 | POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #import "Reachability.h" 29 | 30 | #import 31 | #import 32 | #import 33 | #import 34 | #import 35 | #import 36 | 37 | 38 | NSString *const kReachabilityChangedNotification = @"kReachabilityChangedNotification"; 39 | 40 | 41 | @interface Reachability () 42 | 43 | @property (nonatomic, assign) SCNetworkReachabilityRef reachabilityRef; 44 | @property (nonatomic, strong) dispatch_queue_t reachabilitySerialQueue; 45 | @property (nonatomic, strong) id reachabilityObject; 46 | 47 | -(void)reachabilityChanged:(SCNetworkReachabilityFlags)flags; 48 | -(BOOL)isReachableWithFlags:(SCNetworkReachabilityFlags)flags; 49 | 50 | @end 51 | 52 | 53 | static NSString *reachabilityFlags(SCNetworkReachabilityFlags flags) 54 | { 55 | return [NSString stringWithFormat:@"%c%c %c%c%c%c%c%c%c", 56 | #if TARGET_OS_IPHONE 57 | (flags & kSCNetworkReachabilityFlagsIsWWAN) ? 'W' : '-', 58 | #else 59 | 'X', 60 | #endif 61 | (flags & kSCNetworkReachabilityFlagsReachable) ? 'R' : '-', 62 | (flags & kSCNetworkReachabilityFlagsConnectionRequired) ? 'c' : '-', 63 | (flags & kSCNetworkReachabilityFlagsTransientConnection) ? 't' : '-', 64 | (flags & kSCNetworkReachabilityFlagsInterventionRequired) ? 'i' : '-', 65 | (flags & kSCNetworkReachabilityFlagsConnectionOnTraffic) ? 'C' : '-', 66 | (flags & kSCNetworkReachabilityFlagsConnectionOnDemand) ? 'D' : '-', 67 | (flags & kSCNetworkReachabilityFlagsIsLocalAddress) ? 'l' : '-', 68 | (flags & kSCNetworkReachabilityFlagsIsDirect) ? 'd' : '-']; 69 | } 70 | 71 | // Start listening for reachability notifications on the current run loop 72 | static void TMReachabilityCallback(SCNetworkReachabilityRef target, SCNetworkReachabilityFlags flags, void* info) 73 | { 74 | #pragma unused (target) 75 | 76 | Reachability *reachability = ((__bridge Reachability*)info); 77 | 78 | // We probably don't need an autoreleasepool here, as GCD docs state each queue has its own autorelease pool, 79 | // but what the heck eh? 80 | @autoreleasepool 81 | { 82 | [reachability reachabilityChanged:flags]; 83 | } 84 | } 85 | 86 | 87 | @implementation Reachability 88 | 89 | #pragma mark - Class Constructor Methods 90 | 91 | +(instancetype)reachabilityWithHostName:(NSString*)hostname 92 | { 93 | return [Reachability reachabilityWithHostname:hostname]; 94 | } 95 | 96 | +(instancetype)reachabilityWithHostname:(NSString*)hostname 97 | { 98 | SCNetworkReachabilityRef ref = SCNetworkReachabilityCreateWithName(NULL, [hostname UTF8String]); 99 | if (ref) 100 | { 101 | id reachability = [[self alloc] initWithReachabilityRef:ref]; 102 | 103 | return reachability; 104 | } 105 | 106 | return nil; 107 | } 108 | 109 | +(instancetype)reachabilityWithAddress:(void *)hostAddress 110 | { 111 | SCNetworkReachabilityRef ref = SCNetworkReachabilityCreateWithAddress(kCFAllocatorDefault, (const struct sockaddr*)hostAddress); 112 | if (ref) 113 | { 114 | id reachability = [[self alloc] initWithReachabilityRef:ref]; 115 | 116 | return reachability; 117 | } 118 | 119 | return nil; 120 | } 121 | 122 | +(instancetype)reachabilityForInternetConnection 123 | { 124 | struct sockaddr_in zeroAddress; 125 | bzero(&zeroAddress, sizeof(zeroAddress)); 126 | zeroAddress.sin_len = sizeof(zeroAddress); 127 | zeroAddress.sin_family = AF_INET; 128 | 129 | return [self reachabilityWithAddress:&zeroAddress]; 130 | } 131 | 132 | +(instancetype)reachabilityForLocalWiFi 133 | { 134 | struct sockaddr_in localWifiAddress; 135 | bzero(&localWifiAddress, sizeof(localWifiAddress)); 136 | localWifiAddress.sin_len = sizeof(localWifiAddress); 137 | localWifiAddress.sin_family = AF_INET; 138 | // IN_LINKLOCALNETNUM is defined in as 169.254.0.0 139 | localWifiAddress.sin_addr.s_addr = htonl(IN_LINKLOCALNETNUM); 140 | 141 | return [self reachabilityWithAddress:&localWifiAddress]; 142 | } 143 | 144 | 145 | // Initialization methods 146 | 147 | -(instancetype)initWithReachabilityRef:(SCNetworkReachabilityRef)ref 148 | { 149 | self = [super init]; 150 | if (self != nil) 151 | { 152 | self.reachableOnWWAN = YES; 153 | self.reachabilityRef = ref; 154 | 155 | // We need to create a serial queue. 156 | // We allocate this once for the lifetime of the notifier. 157 | 158 | self.reachabilitySerialQueue = dispatch_queue_create("com.tonymillion.reachability", NULL); 159 | } 160 | 161 | return self; 162 | } 163 | 164 | -(void)dealloc 165 | { 166 | [self stopNotifier]; 167 | 168 | if(self.reachabilityRef) 169 | { 170 | CFRelease(self.reachabilityRef); 171 | self.reachabilityRef = nil; 172 | } 173 | 174 | self.reachableBlock = nil; 175 | self.unreachableBlock = nil; 176 | self.reachabilityBlock = nil; 177 | self.reachabilitySerialQueue = nil; 178 | } 179 | 180 | #pragma mark - Notifier Methods 181 | 182 | // Notifier 183 | // NOTE: This uses GCD to trigger the blocks - they *WILL NOT* be called on THE MAIN THREAD 184 | // - In other words DO NOT DO ANY UI UPDATES IN THE BLOCKS. 185 | // INSTEAD USE dispatch_async(dispatch_get_main_queue(), ^{UISTUFF}) (or dispatch_sync if you want) 186 | 187 | -(BOOL)startNotifier 188 | { 189 | // allow start notifier to be called multiple times 190 | if(self.reachabilityObject && (self.reachabilityObject == self)) 191 | { 192 | return YES; 193 | } 194 | 195 | 196 | SCNetworkReachabilityContext context = { 0, NULL, NULL, NULL, NULL }; 197 | context.info = (__bridge void *)self; 198 | 199 | if(SCNetworkReachabilitySetCallback(self.reachabilityRef, TMReachabilityCallback, &context)) 200 | { 201 | // Set it as our reachability queue, which will retain the queue 202 | if(SCNetworkReachabilitySetDispatchQueue(self.reachabilityRef, self.reachabilitySerialQueue)) 203 | { 204 | // this should do a retain on ourself, so as long as we're in notifier mode we shouldn't disappear out from under ourselves 205 | // woah 206 | self.reachabilityObject = self; 207 | return YES; 208 | } 209 | else 210 | { 211 | #ifdef DEBUG 212 | NSLog(@"SCNetworkReachabilitySetDispatchQueue() failed: %s", SCErrorString(SCError())); 213 | #endif 214 | 215 | // UH OH - FAILURE - stop any callbacks! 216 | SCNetworkReachabilitySetCallback(self.reachabilityRef, NULL, NULL); 217 | } 218 | } 219 | else 220 | { 221 | #ifdef DEBUG 222 | NSLog(@"SCNetworkReachabilitySetCallback() failed: %s", SCErrorString(SCError())); 223 | #endif 224 | } 225 | 226 | // if we get here we fail at the internet 227 | self.reachabilityObject = nil; 228 | return NO; 229 | } 230 | 231 | -(void)stopNotifier 232 | { 233 | // First stop, any callbacks! 234 | SCNetworkReachabilitySetCallback(self.reachabilityRef, NULL, NULL); 235 | 236 | // Unregister target from the GCD serial dispatch queue. 237 | SCNetworkReachabilitySetDispatchQueue(self.reachabilityRef, NULL); 238 | 239 | self.reachabilityObject = nil; 240 | } 241 | 242 | #pragma mark - reachability tests 243 | 244 | // This is for the case where you flick the airplane mode; 245 | // you end up getting something like this: 246 | //Reachability: WR ct----- 247 | //Reachability: -- ------- 248 | //Reachability: WR ct----- 249 | //Reachability: -- ------- 250 | // We treat this as 4 UNREACHABLE triggers - really apple should do better than this 251 | 252 | #define testcase (kSCNetworkReachabilityFlagsConnectionRequired | kSCNetworkReachabilityFlagsTransientConnection) 253 | 254 | -(BOOL)isReachableWithFlags:(SCNetworkReachabilityFlags)flags 255 | { 256 | BOOL connectionUP = YES; 257 | 258 | if(!(flags & kSCNetworkReachabilityFlagsReachable)) 259 | connectionUP = NO; 260 | 261 | if( (flags & testcase) == testcase ) 262 | connectionUP = NO; 263 | 264 | #if TARGET_OS_IPHONE 265 | if(flags & kSCNetworkReachabilityFlagsIsWWAN) 266 | { 267 | // We're on 3G. 268 | if(!self.reachableOnWWAN) 269 | { 270 | // We don't want to connect when on 3G. 271 | connectionUP = NO; 272 | } 273 | } 274 | #endif 275 | 276 | return connectionUP; 277 | } 278 | 279 | -(BOOL)isReachable 280 | { 281 | SCNetworkReachabilityFlags flags; 282 | 283 | if(!SCNetworkReachabilityGetFlags(self.reachabilityRef, &flags)) 284 | return NO; 285 | 286 | return [self isReachableWithFlags:flags]; 287 | } 288 | 289 | -(BOOL)isReachableViaWWAN 290 | { 291 | #if TARGET_OS_IPHONE 292 | 293 | SCNetworkReachabilityFlags flags = 0; 294 | 295 | if(SCNetworkReachabilityGetFlags(self.reachabilityRef, &flags)) 296 | { 297 | // Check we're REACHABLE 298 | if(flags & kSCNetworkReachabilityFlagsReachable) 299 | { 300 | // Now, check we're on WWAN 301 | if(flags & kSCNetworkReachabilityFlagsIsWWAN) 302 | { 303 | return YES; 304 | } 305 | } 306 | } 307 | #endif 308 | 309 | return NO; 310 | } 311 | 312 | -(BOOL)isReachableViaWiFi 313 | { 314 | SCNetworkReachabilityFlags flags = 0; 315 | 316 | if(SCNetworkReachabilityGetFlags(self.reachabilityRef, &flags)) 317 | { 318 | // Check we're reachable 319 | if((flags & kSCNetworkReachabilityFlagsReachable)) 320 | { 321 | #if TARGET_OS_IPHONE 322 | // Check we're NOT on WWAN 323 | if((flags & kSCNetworkReachabilityFlagsIsWWAN)) 324 | { 325 | return NO; 326 | } 327 | #endif 328 | return YES; 329 | } 330 | } 331 | 332 | return NO; 333 | } 334 | 335 | 336 | // WWAN may be available, but not active until a connection has been established. 337 | // WiFi may require a connection for VPN on Demand. 338 | -(BOOL)isConnectionRequired 339 | { 340 | return [self connectionRequired]; 341 | } 342 | 343 | -(BOOL)connectionRequired 344 | { 345 | SCNetworkReachabilityFlags flags; 346 | 347 | if(SCNetworkReachabilityGetFlags(self.reachabilityRef, &flags)) 348 | { 349 | return (flags & kSCNetworkReachabilityFlagsConnectionRequired); 350 | } 351 | 352 | return NO; 353 | } 354 | 355 | // Dynamic, on demand connection? 356 | -(BOOL)isConnectionOnDemand 357 | { 358 | SCNetworkReachabilityFlags flags; 359 | 360 | if (SCNetworkReachabilityGetFlags(self.reachabilityRef, &flags)) 361 | { 362 | return ((flags & kSCNetworkReachabilityFlagsConnectionRequired) && 363 | (flags & (kSCNetworkReachabilityFlagsConnectionOnTraffic | kSCNetworkReachabilityFlagsConnectionOnDemand))); 364 | } 365 | 366 | return NO; 367 | } 368 | 369 | // Is user intervention required? 370 | -(BOOL)isInterventionRequired 371 | { 372 | SCNetworkReachabilityFlags flags; 373 | 374 | if (SCNetworkReachabilityGetFlags(self.reachabilityRef, &flags)) 375 | { 376 | return ((flags & kSCNetworkReachabilityFlagsConnectionRequired) && 377 | (flags & kSCNetworkReachabilityFlagsInterventionRequired)); 378 | } 379 | 380 | return NO; 381 | } 382 | 383 | 384 | #pragma mark - reachability status stuff 385 | 386 | -(NetworkStatus)currentReachabilityStatus 387 | { 388 | if([self isReachable]) 389 | { 390 | if([self isReachableViaWiFi]) 391 | return ReachableViaWiFi; 392 | 393 | #if TARGET_OS_IPHONE 394 | return ReachableViaWWAN; 395 | #endif 396 | } 397 | 398 | return NotReachable; 399 | } 400 | 401 | -(SCNetworkReachabilityFlags)reachabilityFlags 402 | { 403 | SCNetworkReachabilityFlags flags = 0; 404 | 405 | if(SCNetworkReachabilityGetFlags(self.reachabilityRef, &flags)) 406 | { 407 | return flags; 408 | } 409 | 410 | return 0; 411 | } 412 | 413 | -(NSString*)currentReachabilityString 414 | { 415 | NetworkStatus temp = [self currentReachabilityStatus]; 416 | 417 | if(temp == ReachableViaWWAN) 418 | { 419 | // Updated for the fact that we have CDMA phones now! 420 | return NSLocalizedString(@"Cellular", @""); 421 | } 422 | if (temp == ReachableViaWiFi) 423 | { 424 | return NSLocalizedString(@"WiFi", @""); 425 | } 426 | 427 | return NSLocalizedString(@"No Connection", @""); 428 | } 429 | 430 | -(NSString*)currentReachabilityFlags 431 | { 432 | return reachabilityFlags([self reachabilityFlags]); 433 | } 434 | 435 | #pragma mark - Callback function calls this method 436 | 437 | -(void)reachabilityChanged:(SCNetworkReachabilityFlags)flags 438 | { 439 | if([self isReachableWithFlags:flags]) 440 | { 441 | if(self.reachableBlock) 442 | { 443 | self.reachableBlock(self); 444 | } 445 | } 446 | else 447 | { 448 | if(self.unreachableBlock) 449 | { 450 | self.unreachableBlock(self); 451 | } 452 | } 453 | 454 | if(self.reachabilityBlock) 455 | { 456 | self.reachabilityBlock(self, flags); 457 | } 458 | 459 | // this makes sure the change notification happens on the MAIN THREAD 460 | dispatch_async(dispatch_get_main_queue(), ^{ 461 | [[NSNotificationCenter defaultCenter] postNotificationName:kReachabilityChangedNotification 462 | object:self]; 463 | }); 464 | } 465 | 466 | #pragma mark - Debug Description 467 | 468 | - (NSString *) description 469 | { 470 | NSString *description = [NSString stringWithFormat:@"<%@: %#x (%@)>", 471 | NSStringFromClass([self class]), (unsigned int) self, [self currentReachabilityFlags]]; 472 | return description; 473 | } 474 | 475 | @end 476 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-native-network-state", 3 | "version": "1.1.5", 4 | "description": "Network Reachability instantly module for React Native", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "keywords": [ 10 | "react-native", 11 | "react-native-vietnam", 12 | "react-native-network-state", 13 | "ctlabvn", 14 | "anhtuank7c" 15 | ], 16 | "author": "anhtuank7c@hotmail.com (Anh Tuan Nguyen)", 17 | "license": "MIT", 18 | "peerDependencies": { 19 | "react": ">= 16.8", 20 | "react-native": ">= 0.59" 21 | }, 22 | "devDependencies": { 23 | "babel-eslint": "^9.0.0", 24 | "eslint-config-airbnb-base": "^13.1.0", 25 | "eslint-config-rallycoding": "^3.2.0", 26 | "eslint-plugin-react": "^7.11.1", 27 | "eslint-plugin-react-native": "^3.3.0", 28 | "flow-bin": "^0.78.0" 29 | }, 30 | "dependencies": { 31 | "use-subscription": "^1.3.0" 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | "@babel/code-frame@^7.0.0": 6 | version "7.0.0" 7 | resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0.tgz#06e2ab19bdb535385559aabb5ba59729482800f8" 8 | integrity sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA== 9 | dependencies: 10 | "@babel/highlight" "^7.0.0" 11 | 12 | "@babel/generator@^7.0.0": 13 | version "7.0.0" 14 | resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.0.0.tgz#1efd58bffa951dc846449e58ce3a1d7f02d393aa" 15 | integrity sha512-/BM2vupkpbZXq22l1ALO7MqXJZH2k8bKVv8Y+pABFnzWdztDB/ZLveP5At21vLz5c2YtSE6p7j2FZEsqafMz5Q== 16 | dependencies: 17 | "@babel/types" "^7.0.0" 18 | jsesc "^2.5.1" 19 | lodash "^4.17.10" 20 | source-map "^0.5.0" 21 | trim-right "^1.0.1" 22 | 23 | "@babel/helper-function-name@^7.0.0": 24 | version "7.0.0" 25 | resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.0.0.tgz#a68cc8d04420ccc663dd258f9cc41b8261efa2d4" 26 | integrity sha512-Zo+LGvfYp4rMtz84BLF3bavFTdf8y4rJtMPTe2J+rxYmnDOIeH8le++VFI/pRJU+rQhjqiXxE4LMaIau28Tv1Q== 27 | dependencies: 28 | "@babel/helper-get-function-arity" "^7.0.0" 29 | "@babel/template" "^7.0.0" 30 | "@babel/types" "^7.0.0" 31 | 32 | "@babel/helper-get-function-arity@^7.0.0": 33 | version "7.0.0" 34 | resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz#83572d4320e2a4657263734113c42868b64e49c3" 35 | integrity sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ== 36 | dependencies: 37 | "@babel/types" "^7.0.0" 38 | 39 | "@babel/helper-split-export-declaration@^7.0.0": 40 | version "7.0.0" 41 | resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0.tgz#3aae285c0311c2ab095d997b8c9a94cad547d813" 42 | integrity sha512-MXkOJqva62dfC0w85mEf/LucPPS/1+04nmmRMPEBUB++hiiThQ2zPtX/mEWQ3mtzCEjIJvPY8nuwxXtQeQwUag== 43 | dependencies: 44 | "@babel/types" "^7.0.0" 45 | 46 | "@babel/highlight@^7.0.0": 47 | version "7.0.0" 48 | resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0.tgz#f710c38c8d458e6dd9a201afb637fcb781ce99e4" 49 | integrity sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw== 50 | dependencies: 51 | chalk "^2.0.0" 52 | esutils "^2.0.2" 53 | js-tokens "^4.0.0" 54 | 55 | "@babel/parser@^7.0.0": 56 | version "7.0.0" 57 | resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.0.0.tgz#697655183394facffb063437ddf52c0277698775" 58 | integrity sha512-RgJhNdRinpO8zibnoHbzTTexNs4c8ROkXFBanNDZTLHjwbdLk8J5cJSKulx/bycWTLYmKVNCkxRtVCoJnqPk+g== 59 | 60 | "@babel/template@^7.0.0": 61 | version "7.0.0" 62 | resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.0.0.tgz#c2bc9870405959c89a9c814376a2ecb247838c80" 63 | integrity sha512-VLQZik/G5mjYJ6u19U3W2u7eM+rA/NGzH+GtHDFFkLTKLW66OasFrxZ/yK7hkyQcswrmvugFyZpDFRW0DjcjCw== 64 | dependencies: 65 | "@babel/code-frame" "^7.0.0" 66 | "@babel/parser" "^7.0.0" 67 | "@babel/types" "^7.0.0" 68 | 69 | "@babel/traverse@^7.0.0": 70 | version "7.0.0" 71 | resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.0.0.tgz#b1fe9b6567fdf3ab542cfad6f3b31f854d799a61" 72 | integrity sha512-ka/lwaonJZTlJyn97C4g5FYjPOx+Oxd3ab05hbDr1Mx9aP1FclJ+SUHyLx3Tx40sGmOVJApDxE6puJhd3ld2kw== 73 | dependencies: 74 | "@babel/code-frame" "^7.0.0" 75 | "@babel/generator" "^7.0.0" 76 | "@babel/helper-function-name" "^7.0.0" 77 | "@babel/helper-split-export-declaration" "^7.0.0" 78 | "@babel/parser" "^7.0.0" 79 | "@babel/types" "^7.0.0" 80 | debug "^3.1.0" 81 | globals "^11.1.0" 82 | lodash "^4.17.10" 83 | 84 | "@babel/types@^7.0.0": 85 | version "7.0.0" 86 | resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.0.0.tgz#6e191793d3c854d19c6749989e3bc55f0e962118" 87 | integrity sha512-5tPDap4bGKTLPtci2SUl/B7Gv8RnuJFuQoWx26RJobS0fFrz4reUA3JnwIM+HVHEmWE0C1mzKhDtTp8NsWY02Q== 88 | dependencies: 89 | esutils "^2.0.2" 90 | lodash "^4.17.10" 91 | to-fast-properties "^2.0.0" 92 | 93 | acorn-jsx@^3.0.0: 94 | version "3.0.1" 95 | resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b" 96 | integrity sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s= 97 | dependencies: 98 | acorn "^3.0.4" 99 | 100 | acorn@^3.0.4: 101 | version "3.3.0" 102 | resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" 103 | integrity sha1-ReN/s56No/JbruP/U2niu18iAXo= 104 | 105 | acorn@^5.5.0: 106 | version "5.7.3" 107 | resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.3.tgz#67aa231bf8812974b85235a96771eb6bd07ea279" 108 | integrity sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw== 109 | 110 | ajv-keywords@^1.0.0: 111 | version "1.5.1" 112 | resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.5.1.tgz#314dd0a4b3368fad3dfcdc54ede6171b886daf3c" 113 | integrity sha1-MU3QpLM2j609/NxU7eYXG4htrzw= 114 | 115 | ajv@^4.7.0: 116 | version "4.11.8" 117 | resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536" 118 | integrity sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY= 119 | dependencies: 120 | co "^4.6.0" 121 | json-stable-stringify "^1.0.1" 122 | 123 | ansi-escapes@^1.1.0: 124 | version "1.4.0" 125 | resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" 126 | integrity sha1-06ioOzGapneTZisT52HHkRQiMG4= 127 | 128 | ansi-regex@^2.0.0: 129 | version "2.1.1" 130 | resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" 131 | integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= 132 | 133 | ansi-regex@^3.0.0: 134 | version "3.0.0" 135 | resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" 136 | integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= 137 | 138 | ansi-styles@^2.2.1: 139 | version "2.2.1" 140 | resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" 141 | integrity sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4= 142 | 143 | ansi-styles@^3.2.1: 144 | version "3.2.1" 145 | resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" 146 | integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== 147 | dependencies: 148 | color-convert "^1.9.0" 149 | 150 | argparse@^1.0.7: 151 | version "1.0.10" 152 | resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" 153 | integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== 154 | dependencies: 155 | sprintf-js "~1.0.2" 156 | 157 | array-includes@^3.0.3: 158 | version "3.0.3" 159 | resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.0.3.tgz#184b48f62d92d7452bb31b323165c7f8bd02266d" 160 | integrity sha1-GEtI9i2S10UrsxsyMWXH+L0CJm0= 161 | dependencies: 162 | define-properties "^1.1.2" 163 | es-abstract "^1.7.0" 164 | 165 | array-union@^1.0.1: 166 | version "1.0.2" 167 | resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" 168 | integrity sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk= 169 | dependencies: 170 | array-uniq "^1.0.1" 171 | 172 | array-uniq@^1.0.1: 173 | version "1.0.3" 174 | resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" 175 | integrity sha1-r2rId6Jcx/dOBYiUdThY39sk/bY= 176 | 177 | array.prototype.find@^2.0.1: 178 | version "2.0.4" 179 | resolved "https://registry.yarnpkg.com/array.prototype.find/-/array.prototype.find-2.0.4.tgz#556a5c5362c08648323ddaeb9de9d14bc1864c90" 180 | integrity sha1-VWpcU2LAhkgyPdrrnenRS8GGTJA= 181 | dependencies: 182 | define-properties "^1.1.2" 183 | es-abstract "^1.7.0" 184 | 185 | arrify@^1.0.0: 186 | version "1.0.1" 187 | resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" 188 | integrity sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0= 189 | 190 | babel-code-frame@^6.16.0, babel-code-frame@^6.26.0: 191 | version "6.26.0" 192 | resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" 193 | integrity sha1-Y/1D99weO7fONZR9uP42mj9Yx0s= 194 | dependencies: 195 | chalk "^1.1.3" 196 | esutils "^2.0.2" 197 | js-tokens "^3.0.2" 198 | 199 | babel-eslint@^6.1.2: 200 | version "6.1.2" 201 | resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-6.1.2.tgz#5293419fe3672d66598d327da9694567ba6a5f2f" 202 | integrity sha1-UpNBn+NnLWZZjTJ9qWlFZ7pqXy8= 203 | dependencies: 204 | babel-traverse "^6.0.20" 205 | babel-types "^6.0.19" 206 | babylon "^6.0.18" 207 | lodash.assign "^4.0.0" 208 | lodash.pickby "^4.0.0" 209 | 210 | babel-eslint@^9.0.0: 211 | version "9.0.0" 212 | resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-9.0.0.tgz#7d9445f81ed9f60aff38115f838970df9f2b6220" 213 | integrity sha512-itv1MwE3TMbY0QtNfeL7wzak1mV47Uy+n6HtSOO4Xd7rvmO+tsGQSgyOEEgo6Y2vHZKZphaoelNeSVj4vkLA1g== 214 | dependencies: 215 | "@babel/code-frame" "^7.0.0" 216 | "@babel/parser" "^7.0.0" 217 | "@babel/traverse" "^7.0.0" 218 | "@babel/types" "^7.0.0" 219 | eslint-scope "3.7.1" 220 | eslint-visitor-keys "^1.0.0" 221 | 222 | babel-messages@^6.23.0: 223 | version "6.23.0" 224 | resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" 225 | integrity sha1-8830cDhYA1sqKVHG7F7fbGLyYw4= 226 | dependencies: 227 | babel-runtime "^6.22.0" 228 | 229 | babel-runtime@^6.22.0, babel-runtime@^6.26.0: 230 | version "6.26.0" 231 | resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" 232 | integrity sha1-llxwWGaOgrVde/4E/yM3vItWR/4= 233 | dependencies: 234 | core-js "^2.4.0" 235 | regenerator-runtime "^0.11.0" 236 | 237 | babel-traverse@^6.0.20: 238 | version "6.26.0" 239 | resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" 240 | integrity sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4= 241 | dependencies: 242 | babel-code-frame "^6.26.0" 243 | babel-messages "^6.23.0" 244 | babel-runtime "^6.26.0" 245 | babel-types "^6.26.0" 246 | babylon "^6.18.0" 247 | debug "^2.6.8" 248 | globals "^9.18.0" 249 | invariant "^2.2.2" 250 | lodash "^4.17.4" 251 | 252 | babel-types@^6.0.19, babel-types@^6.26.0: 253 | version "6.26.0" 254 | resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" 255 | integrity sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc= 256 | dependencies: 257 | babel-runtime "^6.26.0" 258 | esutils "^2.0.2" 259 | lodash "^4.17.4" 260 | to-fast-properties "^1.0.3" 261 | 262 | babylon@^6.0.18, babylon@^6.18.0: 263 | version "6.18.0" 264 | resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" 265 | integrity sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ== 266 | 267 | balanced-match@^1.0.0: 268 | version "1.0.0" 269 | resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" 270 | integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= 271 | 272 | brace-expansion@^1.1.7: 273 | version "1.1.11" 274 | resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" 275 | integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== 276 | dependencies: 277 | balanced-match "^1.0.0" 278 | concat-map "0.0.1" 279 | 280 | buffer-from@^1.0.0: 281 | version "1.1.1" 282 | resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" 283 | integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== 284 | 285 | builtin-modules@^1.1.1: 286 | version "1.1.1" 287 | resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" 288 | integrity sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8= 289 | 290 | caller-path@^0.1.0: 291 | version "0.1.0" 292 | resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f" 293 | integrity sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8= 294 | dependencies: 295 | callsites "^0.2.0" 296 | 297 | callsites@^0.2.0: 298 | version "0.2.0" 299 | resolved "https://registry.yarnpkg.com/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca" 300 | integrity sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo= 301 | 302 | chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3: 303 | version "1.1.3" 304 | resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" 305 | integrity sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg= 306 | dependencies: 307 | ansi-styles "^2.2.1" 308 | escape-string-regexp "^1.0.2" 309 | has-ansi "^2.0.0" 310 | strip-ansi "^3.0.0" 311 | supports-color "^2.0.0" 312 | 313 | chalk@^2.0.0: 314 | version "2.4.1" 315 | resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" 316 | integrity sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ== 317 | dependencies: 318 | ansi-styles "^3.2.1" 319 | escape-string-regexp "^1.0.5" 320 | supports-color "^5.3.0" 321 | 322 | circular-json@^0.3.1: 323 | version "0.3.3" 324 | resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.3.tgz#815c99ea84f6809529d2f45791bdf82711352d66" 325 | integrity sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A== 326 | 327 | cli-cursor@^1.0.1: 328 | version "1.0.2" 329 | resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-1.0.2.tgz#64da3f7d56a54412e59794bd62dc35295e8f2987" 330 | integrity sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc= 331 | dependencies: 332 | restore-cursor "^1.0.1" 333 | 334 | cli-width@^2.0.0: 335 | version "2.2.0" 336 | resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639" 337 | integrity sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk= 338 | 339 | co@^4.6.0: 340 | version "4.6.0" 341 | resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" 342 | integrity sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ= 343 | 344 | code-point-at@^1.0.0: 345 | version "1.1.0" 346 | resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" 347 | integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= 348 | 349 | color-convert@^1.9.0: 350 | version "1.9.3" 351 | resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" 352 | integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== 353 | dependencies: 354 | color-name "1.1.3" 355 | 356 | color-name@1.1.3: 357 | version "1.1.3" 358 | resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" 359 | integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= 360 | 361 | concat-map@0.0.1: 362 | version "0.0.1" 363 | resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" 364 | integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= 365 | 366 | concat-stream@^1.5.2: 367 | version "1.6.2" 368 | resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" 369 | integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== 370 | dependencies: 371 | buffer-from "^1.0.0" 372 | inherits "^2.0.3" 373 | readable-stream "^2.2.2" 374 | typedarray "^0.0.6" 375 | 376 | contains-path@^0.1.0: 377 | version "0.1.0" 378 | resolved "https://registry.yarnpkg.com/contains-path/-/contains-path-0.1.0.tgz#fe8cf184ff6670b6baef01a9d4861a5cbec4120a" 379 | integrity sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo= 380 | 381 | core-js@^2.4.0: 382 | version "2.5.7" 383 | resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.7.tgz#f972608ff0cead68b841a16a932d0b183791814e" 384 | integrity sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw== 385 | 386 | core-util-is@~1.0.0: 387 | version "1.0.2" 388 | resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" 389 | integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= 390 | 391 | d@1: 392 | version "1.0.0" 393 | resolved "https://registry.yarnpkg.com/d/-/d-1.0.0.tgz#754bb5bfe55451da69a58b94d45f4c5b0462d58f" 394 | integrity sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8= 395 | dependencies: 396 | es5-ext "^0.10.9" 397 | 398 | damerau-levenshtein@^1.0.0: 399 | version "1.0.4" 400 | resolved "https://registry.yarnpkg.com/damerau-levenshtein/-/damerau-levenshtein-1.0.4.tgz#03191c432cb6eea168bb77f3a55ffdccb8978514" 401 | integrity sha1-AxkcQyy27qFou3fzpV/9zLiXhRQ= 402 | 403 | debug@^2.1.1, debug@^2.2.0, debug@^2.6.8: 404 | version "2.6.9" 405 | resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" 406 | integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== 407 | dependencies: 408 | ms "2.0.0" 409 | 410 | debug@^3.1.0: 411 | version "3.2.5" 412 | resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.5.tgz#c2418fbfd7a29f4d4f70ff4cea604d4b64c46407" 413 | integrity sha512-D61LaDQPQkxJ5AUM2mbSJRbPkNs/TmdmOeLAi1hgDkpDfIfetSrjmWhccwtuResSwMbACjx/xXQofvM9CE/aeg== 414 | dependencies: 415 | ms "^2.1.1" 416 | 417 | deep-is@~0.1.3: 418 | version "0.1.3" 419 | resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" 420 | integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= 421 | 422 | define-properties@^1.1.2: 423 | version "1.1.3" 424 | resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" 425 | integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== 426 | dependencies: 427 | object-keys "^1.0.12" 428 | 429 | del@^2.0.2: 430 | version "2.2.2" 431 | resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8" 432 | integrity sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag= 433 | dependencies: 434 | globby "^5.0.0" 435 | is-path-cwd "^1.0.0" 436 | is-path-in-cwd "^1.0.0" 437 | object-assign "^4.0.1" 438 | pify "^2.0.0" 439 | pinkie-promise "^2.0.0" 440 | rimraf "^2.2.8" 441 | 442 | doctrine@1.3.x: 443 | version "1.3.0" 444 | resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.3.0.tgz#13e75682b55518424276f7c173783456ef913d26" 445 | integrity sha1-E+dWgrVVGEJCdvfBc3g0Vu+RPSY= 446 | dependencies: 447 | esutils "^2.0.2" 448 | isarray "^1.0.0" 449 | 450 | doctrine@^1.2.2: 451 | version "1.5.0" 452 | resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa" 453 | integrity sha1-N53Ocw9hZvds76TmcHoVmwLFpvo= 454 | dependencies: 455 | esutils "^2.0.2" 456 | isarray "^1.0.0" 457 | 458 | doctrine@^2.0.0, doctrine@^2.1.0: 459 | version "2.1.0" 460 | resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" 461 | integrity sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw== 462 | dependencies: 463 | esutils "^2.0.2" 464 | 465 | es-abstract@^1.6.1, es-abstract@^1.7.0: 466 | version "1.12.0" 467 | resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.12.0.tgz#9dbbdd27c6856f0001421ca18782d786bf8a6165" 468 | integrity sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA== 469 | dependencies: 470 | es-to-primitive "^1.1.1" 471 | function-bind "^1.1.1" 472 | has "^1.0.1" 473 | is-callable "^1.1.3" 474 | is-regex "^1.0.4" 475 | 476 | es-to-primitive@^1.1.1: 477 | version "1.1.1" 478 | resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.1.1.tgz#45355248a88979034b6792e19bb81f2b7975dd0d" 479 | integrity sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0= 480 | dependencies: 481 | is-callable "^1.1.1" 482 | is-date-object "^1.0.1" 483 | is-symbol "^1.0.1" 484 | 485 | es5-ext@^0.10.14, es5-ext@^0.10.35, es5-ext@^0.10.9, es5-ext@~0.10.14: 486 | version "0.10.46" 487 | resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.46.tgz#efd99f67c5a7ec789baa3daa7f79870388f7f572" 488 | integrity sha512-24XxRvJXNFwEMpJb3nOkiRJKRoupmjYmOPVlI65Qy2SrtxwOTB+g6ODjBKOtwEHbYrhWRty9xxOWLNdClT2djw== 489 | dependencies: 490 | es6-iterator "~2.0.3" 491 | es6-symbol "~3.1.1" 492 | next-tick "1" 493 | 494 | es6-iterator@^2.0.1, es6-iterator@~2.0.1, es6-iterator@~2.0.3: 495 | version "2.0.3" 496 | resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7" 497 | integrity sha1-p96IkUGgWpSwhUQDstCg+/qY87c= 498 | dependencies: 499 | d "1" 500 | es5-ext "^0.10.35" 501 | es6-symbol "^3.1.1" 502 | 503 | es6-map@^0.1.3: 504 | version "0.1.5" 505 | resolved "https://registry.yarnpkg.com/es6-map/-/es6-map-0.1.5.tgz#9136e0503dcc06a301690f0bb14ff4e364e949f0" 506 | integrity sha1-kTbgUD3MBqMBaQ8LsU/042TpSfA= 507 | dependencies: 508 | d "1" 509 | es5-ext "~0.10.14" 510 | es6-iterator "~2.0.1" 511 | es6-set "~0.1.5" 512 | es6-symbol "~3.1.1" 513 | event-emitter "~0.3.5" 514 | 515 | es6-set@^0.1.4, es6-set@~0.1.5: 516 | version "0.1.5" 517 | resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.5.tgz#d2b3ec5d4d800ced818db538d28974db0a73ccb1" 518 | integrity sha1-0rPsXU2ADO2BjbU40ol02wpzzLE= 519 | dependencies: 520 | d "1" 521 | es5-ext "~0.10.14" 522 | es6-iterator "~2.0.1" 523 | es6-symbol "3.1.1" 524 | event-emitter "~0.3.5" 525 | 526 | es6-symbol@3.1.1, es6-symbol@^3.1.1, es6-symbol@~3.1.1: 527 | version "3.1.1" 528 | resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77" 529 | integrity sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc= 530 | dependencies: 531 | d "1" 532 | es5-ext "~0.10.14" 533 | 534 | es6-weak-map@^2.0.1: 535 | version "2.0.2" 536 | resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.2.tgz#5e3ab32251ffd1538a1f8e5ffa1357772f92d96f" 537 | integrity sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8= 538 | dependencies: 539 | d "1" 540 | es5-ext "^0.10.14" 541 | es6-iterator "^2.0.1" 542 | es6-symbol "^3.1.1" 543 | 544 | escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: 545 | version "1.0.5" 546 | resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" 547 | integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= 548 | 549 | escope@^3.6.0: 550 | version "3.6.0" 551 | resolved "https://registry.yarnpkg.com/escope/-/escope-3.6.0.tgz#e01975e812781a163a6dadfdd80398dc64c889c3" 552 | integrity sha1-4Bl16BJ4GhY6ba392AOY3GTIicM= 553 | dependencies: 554 | es6-map "^0.1.3" 555 | es6-weak-map "^2.0.1" 556 | esrecurse "^4.1.0" 557 | estraverse "^4.1.1" 558 | 559 | eslint-config-airbnb-base@^13.1.0: 560 | version "13.1.0" 561 | resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-13.1.0.tgz#b5a1b480b80dfad16433d6c4ad84e6605052c05c" 562 | integrity sha512-XWwQtf3U3zIoKO1BbHh6aUhJZQweOwSt4c2JrPDg9FP3Ltv3+YfEv7jIDB8275tVnO/qOHbfuYg3kzw6Je7uWw== 563 | dependencies: 564 | eslint-restricted-globals "^0.1.1" 565 | object.assign "^4.1.0" 566 | object.entries "^1.0.4" 567 | 568 | eslint-config-rallycoding@^3.2.0: 569 | version "3.2.0" 570 | resolved "https://registry.yarnpkg.com/eslint-config-rallycoding/-/eslint-config-rallycoding-3.2.0.tgz#1256f801742ba0e95757680e81fd14ff1dbeff86" 571 | integrity sha1-Elb4AXQroOlXV2gOgf0U/x2+/4Y= 572 | dependencies: 573 | babel-eslint "^6.1.2" 574 | eslint "^3.2.2" 575 | eslint-plugin-class-property "^1.0.1" 576 | eslint-plugin-import "^1.13.0" 577 | eslint-plugin-jsx-a11y "^2.1.0" 578 | eslint-plugin-react "^6.0.0" 579 | 580 | eslint-import-resolver-node@^0.2.0: 581 | version "0.2.3" 582 | resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.2.3.tgz#5add8106e8c928db2cba232bcd9efa846e3da16c" 583 | integrity sha1-Wt2BBujJKNssuiMrzZ76hG49oWw= 584 | dependencies: 585 | debug "^2.2.0" 586 | object-assign "^4.0.1" 587 | resolve "^1.1.6" 588 | 589 | eslint-plugin-class-property@^1.0.1: 590 | version "1.1.0" 591 | resolved "https://registry.yarnpkg.com/eslint-plugin-class-property/-/eslint-plugin-class-property-1.1.0.tgz#355784133d4852b8870bd1cb429a1b0403cc7aef" 592 | integrity sha512-JHczwQvWPTs+JjP+6dkaGfweklMdEda7dv2hyw0d1+5luWW4lEADW/v7Os+0dl0ZoYwU0RDCdEZIH9o5ig1GJg== 593 | dependencies: 594 | eslint "^3.19.0" 595 | 596 | eslint-plugin-import@^1.13.0: 597 | version "1.16.0" 598 | resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-1.16.0.tgz#b2fa07ebcc53504d0f2a4477582ec8bff1871b9f" 599 | integrity sha1-svoH68xTUE0PKkR3WC7Iv/GHG58= 600 | dependencies: 601 | builtin-modules "^1.1.1" 602 | contains-path "^0.1.0" 603 | debug "^2.2.0" 604 | doctrine "1.3.x" 605 | es6-map "^0.1.3" 606 | es6-set "^0.1.4" 607 | eslint-import-resolver-node "^0.2.0" 608 | has "^1.0.1" 609 | lodash.cond "^4.3.0" 610 | lodash.endswith "^4.0.1" 611 | lodash.find "^4.3.0" 612 | lodash.findindex "^4.3.0" 613 | minimatch "^3.0.3" 614 | object-assign "^4.0.1" 615 | pkg-dir "^1.0.0" 616 | pkg-up "^1.0.0" 617 | 618 | eslint-plugin-jsx-a11y@^2.1.0: 619 | version "2.2.3" 620 | resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-2.2.3.tgz#4e35cb71b8a7db702ac415c806eb8e8d9ea6c65d" 621 | integrity sha1-TjXLcbin23AqxBXIBuuOjZ6mxl0= 622 | dependencies: 623 | damerau-levenshtein "^1.0.0" 624 | jsx-ast-utils "^1.0.0" 625 | object-assign "^4.0.1" 626 | 627 | eslint-plugin-react-native-globals@^0.1.1: 628 | version "0.1.2" 629 | resolved "https://registry.yarnpkg.com/eslint-plugin-react-native-globals/-/eslint-plugin-react-native-globals-0.1.2.tgz#ee1348bc2ceb912303ce6bdbd22e2f045ea86ea2" 630 | integrity sha512-9aEPf1JEpiTjcFAmmyw8eiIXmcNZOqaZyHO77wgm0/dWfT/oxC1SrIq8ET38pMxHYrcB6Uew+TzUVsBeczF88g== 631 | 632 | eslint-plugin-react-native@^3.3.0: 633 | version "3.3.0" 634 | resolved "https://registry.yarnpkg.com/eslint-plugin-react-native/-/eslint-plugin-react-native-3.3.0.tgz#77135f1b9d69058c5612777aac90d9cd6d35af33" 635 | integrity sha512-+Td4JX9POuhNDQdIxlzgcD0RDBmA1kB6dTnOCORtN/cDa2vUyIpGLuVkVvgrnUOizsgD7uhniomTpynRcjIvFQ== 636 | dependencies: 637 | eslint-plugin-react-native-globals "^0.1.1" 638 | 639 | eslint-plugin-react@^6.0.0: 640 | version "6.10.3" 641 | resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-6.10.3.tgz#c5435beb06774e12c7db2f6abaddcbf900cd3f78" 642 | integrity sha1-xUNb6wZ3ThLH2y9qut3L+QDNP3g= 643 | dependencies: 644 | array.prototype.find "^2.0.1" 645 | doctrine "^1.2.2" 646 | has "^1.0.1" 647 | jsx-ast-utils "^1.3.4" 648 | object.assign "^4.0.4" 649 | 650 | eslint-plugin-react@^7.11.1: 651 | version "7.11.1" 652 | resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.11.1.tgz#c01a7af6f17519457d6116aa94fc6d2ccad5443c" 653 | integrity sha512-cVVyMadRyW7qsIUh3FHp3u6QHNhOgVrLQYdQEB1bPWBsgbNCHdFAeNMquBMCcZJu59eNthX053L70l7gRt4SCw== 654 | dependencies: 655 | array-includes "^3.0.3" 656 | doctrine "^2.1.0" 657 | has "^1.0.3" 658 | jsx-ast-utils "^2.0.1" 659 | prop-types "^15.6.2" 660 | 661 | eslint-restricted-globals@^0.1.1: 662 | version "0.1.1" 663 | resolved "https://registry.yarnpkg.com/eslint-restricted-globals/-/eslint-restricted-globals-0.1.1.tgz#35f0d5cbc64c2e3ed62e93b4b1a7af05ba7ed4d7" 664 | integrity sha1-NfDVy8ZMLj7WLpO0saevBbp+1Nc= 665 | 666 | eslint-scope@3.7.1: 667 | version "3.7.1" 668 | resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-3.7.1.tgz#3d63c3edfda02e06e01a452ad88caacc7cdcb6e8" 669 | integrity sha1-PWPD7f2gLgbgGkUq2IyqzHzctug= 670 | dependencies: 671 | esrecurse "^4.1.0" 672 | estraverse "^4.1.1" 673 | 674 | eslint-visitor-keys@^1.0.0: 675 | version "1.0.0" 676 | resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d" 677 | integrity sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ== 678 | 679 | eslint@^3.19.0, eslint@^3.2.2: 680 | version "3.19.0" 681 | resolved "https://registry.yarnpkg.com/eslint/-/eslint-3.19.0.tgz#c8fc6201c7f40dd08941b87c085767386a679acc" 682 | integrity sha1-yPxiAcf0DdCJQbh8CFdnOGpnmsw= 683 | dependencies: 684 | babel-code-frame "^6.16.0" 685 | chalk "^1.1.3" 686 | concat-stream "^1.5.2" 687 | debug "^2.1.1" 688 | doctrine "^2.0.0" 689 | escope "^3.6.0" 690 | espree "^3.4.0" 691 | esquery "^1.0.0" 692 | estraverse "^4.2.0" 693 | esutils "^2.0.2" 694 | file-entry-cache "^2.0.0" 695 | glob "^7.0.3" 696 | globals "^9.14.0" 697 | ignore "^3.2.0" 698 | imurmurhash "^0.1.4" 699 | inquirer "^0.12.0" 700 | is-my-json-valid "^2.10.0" 701 | is-resolvable "^1.0.0" 702 | js-yaml "^3.5.1" 703 | json-stable-stringify "^1.0.0" 704 | levn "^0.3.0" 705 | lodash "^4.0.0" 706 | mkdirp "^0.5.0" 707 | natural-compare "^1.4.0" 708 | optionator "^0.8.2" 709 | path-is-inside "^1.0.1" 710 | pluralize "^1.2.1" 711 | progress "^1.1.8" 712 | require-uncached "^1.0.2" 713 | shelljs "^0.7.5" 714 | strip-bom "^3.0.0" 715 | strip-json-comments "~2.0.1" 716 | table "^3.7.8" 717 | text-table "~0.2.0" 718 | user-home "^2.0.0" 719 | 720 | espree@^3.4.0: 721 | version "3.5.4" 722 | resolved "https://registry.yarnpkg.com/espree/-/espree-3.5.4.tgz#b0f447187c8a8bed944b815a660bddf5deb5d1a7" 723 | integrity sha512-yAcIQxtmMiB/jL32dzEp2enBeidsB7xWPLNiw3IIkpVds1P+h7qF9YwJq1yUNzp2OKXgAprs4F61ih66UsoD1A== 724 | dependencies: 725 | acorn "^5.5.0" 726 | acorn-jsx "^3.0.0" 727 | 728 | esprima@^4.0.0: 729 | version "4.0.1" 730 | resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" 731 | integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== 732 | 733 | esquery@^1.0.0: 734 | version "1.0.1" 735 | resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.1.tgz#406c51658b1f5991a5f9b62b1dc25b00e3e5c708" 736 | integrity sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA== 737 | dependencies: 738 | estraverse "^4.0.0" 739 | 740 | esrecurse@^4.1.0: 741 | version "4.2.1" 742 | resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.1.tgz#007a3b9fdbc2b3bb87e4879ea19c92fdbd3942cf" 743 | integrity sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ== 744 | dependencies: 745 | estraverse "^4.1.0" 746 | 747 | estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1, estraverse@^4.2.0: 748 | version "4.2.0" 749 | resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" 750 | integrity sha1-De4/7TH81GlhjOc0IJn8GvoL2xM= 751 | 752 | esutils@^2.0.2: 753 | version "2.0.2" 754 | resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" 755 | integrity sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs= 756 | 757 | event-emitter@~0.3.5: 758 | version "0.3.5" 759 | resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39" 760 | integrity sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk= 761 | dependencies: 762 | d "1" 763 | es5-ext "~0.10.14" 764 | 765 | exit-hook@^1.0.0: 766 | version "1.1.1" 767 | resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-1.1.1.tgz#f05ca233b48c05d54fff07765df8507e95c02ff8" 768 | integrity sha1-8FyiM7SMBdVP/wd2XfhQfpXAL/g= 769 | 770 | fast-levenshtein@~2.0.4: 771 | version "2.0.6" 772 | resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" 773 | integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= 774 | 775 | figures@^1.3.5: 776 | version "1.7.0" 777 | resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" 778 | integrity sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4= 779 | dependencies: 780 | escape-string-regexp "^1.0.5" 781 | object-assign "^4.1.0" 782 | 783 | file-entry-cache@^2.0.0: 784 | version "2.0.0" 785 | resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-2.0.0.tgz#c392990c3e684783d838b8c84a45d8a048458361" 786 | integrity sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E= 787 | dependencies: 788 | flat-cache "^1.2.1" 789 | object-assign "^4.0.1" 790 | 791 | find-up@^1.0.0: 792 | version "1.1.2" 793 | resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" 794 | integrity sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8= 795 | dependencies: 796 | path-exists "^2.0.0" 797 | pinkie-promise "^2.0.0" 798 | 799 | flat-cache@^1.2.1: 800 | version "1.3.0" 801 | resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.3.0.tgz#d3030b32b38154f4e3b7e9c709f490f7ef97c481" 802 | integrity sha1-0wMLMrOBVPTjt+nHCfSQ9++XxIE= 803 | dependencies: 804 | circular-json "^0.3.1" 805 | del "^2.0.2" 806 | graceful-fs "^4.1.2" 807 | write "^0.2.1" 808 | 809 | flow-bin@^0.78.0: 810 | version "0.78.0" 811 | resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.78.0.tgz#df9fe7f9c9a2dfaff39083949fe2d831b41627b7" 812 | integrity sha512-LV55tE+ItkC9HQAbEK+VxpBe54Ryp/dj4q9KmqDIfhV7mtP+hbvc/1AUf/AaWFIve3eURO0cxoGN4ZQQ3o2HTg== 813 | 814 | fs.realpath@^1.0.0: 815 | version "1.0.0" 816 | resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" 817 | integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= 818 | 819 | function-bind@^1.1.0, function-bind@^1.1.1: 820 | version "1.1.1" 821 | resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" 822 | integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== 823 | 824 | generate-function@^2.0.0: 825 | version "2.3.1" 826 | resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.3.1.tgz#f069617690c10c868e73b8465746764f97c3479f" 827 | integrity sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ== 828 | dependencies: 829 | is-property "^1.0.2" 830 | 831 | generate-object-property@^1.1.0: 832 | version "1.2.0" 833 | resolved "https://registry.yarnpkg.com/generate-object-property/-/generate-object-property-1.2.0.tgz#9c0e1c40308ce804f4783618b937fa88f99d50d0" 834 | integrity sha1-nA4cQDCM6AT0eDYYuTf6iPmdUNA= 835 | dependencies: 836 | is-property "^1.0.0" 837 | 838 | glob@^7.0.0, glob@^7.0.3, glob@^7.0.5: 839 | version "7.1.3" 840 | resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" 841 | integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ== 842 | dependencies: 843 | fs.realpath "^1.0.0" 844 | inflight "^1.0.4" 845 | inherits "2" 846 | minimatch "^3.0.4" 847 | once "^1.3.0" 848 | path-is-absolute "^1.0.0" 849 | 850 | globals@^11.1.0: 851 | version "11.7.0" 852 | resolved "https://registry.yarnpkg.com/globals/-/globals-11.7.0.tgz#a583faa43055b1aca771914bf68258e2fc125673" 853 | integrity sha512-K8BNSPySfeShBQXsahYB/AbbWruVOTyVpgoIDnl8odPpeSfP2J5QO2oLFFdl2j7GfDCtZj2bMKar2T49itTPCg== 854 | 855 | globals@^9.14.0, globals@^9.18.0: 856 | version "9.18.0" 857 | resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" 858 | integrity sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ== 859 | 860 | globby@^5.0.0: 861 | version "5.0.0" 862 | resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d" 863 | integrity sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0= 864 | dependencies: 865 | array-union "^1.0.1" 866 | arrify "^1.0.0" 867 | glob "^7.0.3" 868 | object-assign "^4.0.1" 869 | pify "^2.0.0" 870 | pinkie-promise "^2.0.0" 871 | 872 | graceful-fs@^4.1.2: 873 | version "4.1.11" 874 | resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" 875 | integrity sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg= 876 | 877 | has-ansi@^2.0.0: 878 | version "2.0.0" 879 | resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" 880 | integrity sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE= 881 | dependencies: 882 | ansi-regex "^2.0.0" 883 | 884 | has-flag@^3.0.0: 885 | version "3.0.0" 886 | resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" 887 | integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= 888 | 889 | has-symbols@^1.0.0: 890 | version "1.0.0" 891 | resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.0.tgz#ba1a8f1af2a0fc39650f5c850367704122063b44" 892 | integrity sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q= 893 | 894 | has@^1.0.1, has@^1.0.3: 895 | version "1.0.3" 896 | resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" 897 | integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== 898 | dependencies: 899 | function-bind "^1.1.1" 900 | 901 | ignore@^3.2.0: 902 | version "3.3.10" 903 | resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.10.tgz#0a97fb876986e8081c631160f8f9f389157f0043" 904 | integrity sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug== 905 | 906 | imurmurhash@^0.1.4: 907 | version "0.1.4" 908 | resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" 909 | integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= 910 | 911 | inflight@^1.0.4: 912 | version "1.0.6" 913 | resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" 914 | integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= 915 | dependencies: 916 | once "^1.3.0" 917 | wrappy "1" 918 | 919 | inherits@2, inherits@^2.0.3, inherits@~2.0.3: 920 | version "2.0.3" 921 | resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" 922 | integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= 923 | 924 | inquirer@^0.12.0: 925 | version "0.12.0" 926 | resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-0.12.0.tgz#1ef2bfd63504df0bc75785fff8c2c41df12f077e" 927 | integrity sha1-HvK/1jUE3wvHV4X/+MLEHfEvB34= 928 | dependencies: 929 | ansi-escapes "^1.1.0" 930 | ansi-regex "^2.0.0" 931 | chalk "^1.0.0" 932 | cli-cursor "^1.0.1" 933 | cli-width "^2.0.0" 934 | figures "^1.3.5" 935 | lodash "^4.3.0" 936 | readline2 "^1.0.1" 937 | run-async "^0.1.0" 938 | rx-lite "^3.1.2" 939 | string-width "^1.0.1" 940 | strip-ansi "^3.0.0" 941 | through "^2.3.6" 942 | 943 | interpret@^1.0.0: 944 | version "1.1.0" 945 | resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.1.0.tgz#7ed1b1410c6a0e0f78cf95d3b8440c63f78b8614" 946 | integrity sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ= 947 | 948 | invariant@^2.2.2: 949 | version "2.2.4" 950 | resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" 951 | integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== 952 | dependencies: 953 | loose-envify "^1.0.0" 954 | 955 | is-callable@^1.1.1, is-callable@^1.1.3: 956 | version "1.1.4" 957 | resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.4.tgz#1e1adf219e1eeb684d691f9d6a05ff0d30a24d75" 958 | integrity sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA== 959 | 960 | is-date-object@^1.0.1: 961 | version "1.0.1" 962 | resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16" 963 | integrity sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY= 964 | 965 | is-fullwidth-code-point@^1.0.0: 966 | version "1.0.0" 967 | resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" 968 | integrity sha1-754xOG8DGn8NZDr4L95QxFfvAMs= 969 | dependencies: 970 | number-is-nan "^1.0.0" 971 | 972 | is-fullwidth-code-point@^2.0.0: 973 | version "2.0.0" 974 | resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" 975 | integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= 976 | 977 | is-my-ip-valid@^1.0.0: 978 | version "1.0.0" 979 | resolved "https://registry.yarnpkg.com/is-my-ip-valid/-/is-my-ip-valid-1.0.0.tgz#7b351b8e8edd4d3995d4d066680e664d94696824" 980 | integrity sha512-gmh/eWXROncUzRnIa1Ubrt5b8ep/MGSnfAUI3aRp+sqTCs1tv1Isl8d8F6JmkN3dXKc3ehZMrtiPN9eL03NuaQ== 981 | 982 | is-my-json-valid@^2.10.0: 983 | version "2.19.0" 984 | resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.19.0.tgz#8fd6e40363cd06b963fa877d444bfb5eddc62175" 985 | integrity sha512-mG0f/unGX1HZ5ep4uhRaPOS8EkAY8/j6mDRMJrutq4CqhoJWYp7qAlonIPy3TV7p3ju4TK9fo/PbnoksWmsp5Q== 986 | dependencies: 987 | generate-function "^2.0.0" 988 | generate-object-property "^1.1.0" 989 | is-my-ip-valid "^1.0.0" 990 | jsonpointer "^4.0.0" 991 | xtend "^4.0.0" 992 | 993 | is-path-cwd@^1.0.0: 994 | version "1.0.0" 995 | resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" 996 | integrity sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0= 997 | 998 | is-path-in-cwd@^1.0.0: 999 | version "1.0.1" 1000 | resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz#5ac48b345ef675339bd6c7a48a912110b241cf52" 1001 | integrity sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ== 1002 | dependencies: 1003 | is-path-inside "^1.0.0" 1004 | 1005 | is-path-inside@^1.0.0: 1006 | version "1.0.1" 1007 | resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.1.tgz#8ef5b7de50437a3fdca6b4e865ef7aa55cb48036" 1008 | integrity sha1-jvW33lBDej/cprToZe96pVy0gDY= 1009 | dependencies: 1010 | path-is-inside "^1.0.1" 1011 | 1012 | is-property@^1.0.0, is-property@^1.0.2: 1013 | version "1.0.2" 1014 | resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" 1015 | integrity sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ= 1016 | 1017 | is-regex@^1.0.4: 1018 | version "1.0.4" 1019 | resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491" 1020 | integrity sha1-VRdIm1RwkbCTDglWVM7SXul+lJE= 1021 | dependencies: 1022 | has "^1.0.1" 1023 | 1024 | is-resolvable@^1.0.0: 1025 | version "1.1.0" 1026 | resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88" 1027 | integrity sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg== 1028 | 1029 | is-symbol@^1.0.1: 1030 | version "1.0.1" 1031 | resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.1.tgz#3cc59f00025194b6ab2e38dbae6689256b660572" 1032 | integrity sha1-PMWfAAJRlLarLjjbrmaJJWtmBXI= 1033 | 1034 | isarray@^1.0.0, isarray@~1.0.0: 1035 | version "1.0.0" 1036 | resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" 1037 | integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= 1038 | 1039 | "js-tokens@^3.0.0 || ^4.0.0", js-tokens@^3.0.2: 1040 | version "3.0.2" 1041 | resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" 1042 | integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls= 1043 | 1044 | js-tokens@^4.0.0: 1045 | version "4.0.0" 1046 | resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" 1047 | integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== 1048 | 1049 | js-yaml@^3.5.1: 1050 | version "3.12.0" 1051 | resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.12.0.tgz#eaed656ec8344f10f527c6bfa1b6e2244de167d1" 1052 | integrity sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A== 1053 | dependencies: 1054 | argparse "^1.0.7" 1055 | esprima "^4.0.0" 1056 | 1057 | jsesc@^2.5.1: 1058 | version "2.5.1" 1059 | resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.1.tgz#e421a2a8e20d6b0819df28908f782526b96dd1fe" 1060 | integrity sha1-5CGiqOINawgZ3yiQj3glJrlt0f4= 1061 | 1062 | json-stable-stringify@^1.0.0, json-stable-stringify@^1.0.1: 1063 | version "1.0.1" 1064 | resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" 1065 | integrity sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8= 1066 | dependencies: 1067 | jsonify "~0.0.0" 1068 | 1069 | jsonify@~0.0.0: 1070 | version "0.0.0" 1071 | resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" 1072 | integrity sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM= 1073 | 1074 | jsonpointer@^4.0.0: 1075 | version "4.0.1" 1076 | resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-4.0.1.tgz#4fd92cb34e0e9db3c89c8622ecf51f9b978c6cb9" 1077 | integrity sha1-T9kss04OnbPInIYi7PUfm5eMbLk= 1078 | 1079 | jsx-ast-utils@^1.0.0, jsx-ast-utils@^1.3.4: 1080 | version "1.4.1" 1081 | resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-1.4.1.tgz#3867213e8dd79bf1e8f2300c0cfc1efb182c0df1" 1082 | integrity sha1-OGchPo3Xm/Ho8jAMDPwe+xgsDfE= 1083 | 1084 | jsx-ast-utils@^2.0.1: 1085 | version "2.0.1" 1086 | resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-2.0.1.tgz#e801b1b39985e20fffc87b40e3748080e2dcac7f" 1087 | integrity sha1-6AGxs5mF4g//yHtA43SAgOLcrH8= 1088 | dependencies: 1089 | array-includes "^3.0.3" 1090 | 1091 | levn@^0.3.0, levn@~0.3.0: 1092 | version "0.3.0" 1093 | resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" 1094 | integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= 1095 | dependencies: 1096 | prelude-ls "~1.1.2" 1097 | type-check "~0.3.2" 1098 | 1099 | lodash.assign@^4.0.0: 1100 | version "4.2.0" 1101 | resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-4.2.0.tgz#0d99f3ccd7a6d261d19bdaeb9245005d285808e7" 1102 | integrity sha1-DZnzzNem0mHRm9rrkkUAXShYCOc= 1103 | 1104 | lodash.cond@^4.3.0: 1105 | version "4.5.2" 1106 | resolved "https://registry.yarnpkg.com/lodash.cond/-/lodash.cond-4.5.2.tgz#f471a1da486be60f6ab955d17115523dd1d255d5" 1107 | integrity sha1-9HGh2khr5g9quVXRcRVSPdHSVdU= 1108 | 1109 | lodash.endswith@^4.0.1: 1110 | version "4.2.1" 1111 | resolved "https://registry.yarnpkg.com/lodash.endswith/-/lodash.endswith-4.2.1.tgz#fed59ac1738ed3e236edd7064ec456448b37bc09" 1112 | integrity sha1-/tWawXOO0+I27dcGTsRWRIs3vAk= 1113 | 1114 | lodash.find@^4.3.0: 1115 | version "4.6.0" 1116 | resolved "https://registry.yarnpkg.com/lodash.find/-/lodash.find-4.6.0.tgz#cb0704d47ab71789ffa0de8b97dd926fb88b13b1" 1117 | integrity sha1-ywcE1Hq3F4n/oN6Ll92Sb7iLE7E= 1118 | 1119 | lodash.findindex@^4.3.0: 1120 | version "4.6.0" 1121 | resolved "https://registry.yarnpkg.com/lodash.findindex/-/lodash.findindex-4.6.0.tgz#a3245dee61fb9b6e0624b535125624bb69c11106" 1122 | integrity sha1-oyRd7mH7m24GJLU1ElYku2nBEQY= 1123 | 1124 | lodash.pickby@^4.0.0: 1125 | version "4.6.0" 1126 | resolved "https://registry.yarnpkg.com/lodash.pickby/-/lodash.pickby-4.6.0.tgz#7dea21d8c18d7703a27c704c15d3b84a67e33aff" 1127 | integrity sha1-feoh2MGNdwOifHBMFdO4SmfjOv8= 1128 | 1129 | lodash@^4.0.0, lodash@^4.17.10, lodash@^4.17.4, lodash@^4.3.0: 1130 | version "4.17.10" 1131 | resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7" 1132 | integrity sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg== 1133 | 1134 | loose-envify@^1.0.0, loose-envify@^1.3.1: 1135 | version "1.4.0" 1136 | resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" 1137 | integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== 1138 | dependencies: 1139 | js-tokens "^3.0.0 || ^4.0.0" 1140 | 1141 | minimatch@^3.0.3, minimatch@^3.0.4: 1142 | version "3.0.4" 1143 | resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" 1144 | integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== 1145 | dependencies: 1146 | brace-expansion "^1.1.7" 1147 | 1148 | minimist@0.0.8: 1149 | version "0.0.8" 1150 | resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" 1151 | integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= 1152 | 1153 | mkdirp@^0.5.0, mkdirp@^0.5.1: 1154 | version "0.5.1" 1155 | resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" 1156 | integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= 1157 | dependencies: 1158 | minimist "0.0.8" 1159 | 1160 | ms@2.0.0: 1161 | version "2.0.0" 1162 | resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" 1163 | integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= 1164 | 1165 | ms@^2.1.1: 1166 | version "2.1.1" 1167 | resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" 1168 | integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== 1169 | 1170 | mute-stream@0.0.5: 1171 | version "0.0.5" 1172 | resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.5.tgz#8fbfabb0a98a253d3184331f9e8deb7372fac6c0" 1173 | integrity sha1-j7+rsKmKJT0xhDMfno3rc3L6xsA= 1174 | 1175 | natural-compare@^1.4.0: 1176 | version "1.4.0" 1177 | resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" 1178 | integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= 1179 | 1180 | next-tick@1: 1181 | version "1.0.0" 1182 | resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.0.0.tgz#ca86d1fe8828169b0120208e3dc8424b9db8342c" 1183 | integrity sha1-yobR/ogoFpsBICCOPchCS524NCw= 1184 | 1185 | number-is-nan@^1.0.0: 1186 | version "1.0.1" 1187 | resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" 1188 | integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= 1189 | 1190 | object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: 1191 | version "4.1.1" 1192 | resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" 1193 | integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= 1194 | 1195 | object-keys@^1.0.11, object-keys@^1.0.12: 1196 | version "1.0.12" 1197 | resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.12.tgz#09c53855377575310cca62f55bb334abff7b3ed2" 1198 | integrity sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag== 1199 | 1200 | object.assign@^4.0.4, object.assign@^4.1.0: 1201 | version "4.1.0" 1202 | resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" 1203 | integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w== 1204 | dependencies: 1205 | define-properties "^1.1.2" 1206 | function-bind "^1.1.1" 1207 | has-symbols "^1.0.0" 1208 | object-keys "^1.0.11" 1209 | 1210 | object.entries@^1.0.4: 1211 | version "1.0.4" 1212 | resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.0.4.tgz#1bf9a4dd2288f5b33f3a993d257661f05d161a5f" 1213 | integrity sha1-G/mk3SKI9bM/Opk9JXZh8F0WGl8= 1214 | dependencies: 1215 | define-properties "^1.1.2" 1216 | es-abstract "^1.6.1" 1217 | function-bind "^1.1.0" 1218 | has "^1.0.1" 1219 | 1220 | once@^1.3.0: 1221 | version "1.4.0" 1222 | resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" 1223 | integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= 1224 | dependencies: 1225 | wrappy "1" 1226 | 1227 | onetime@^1.0.0: 1228 | version "1.1.0" 1229 | resolved "https://registry.yarnpkg.com/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789" 1230 | integrity sha1-ofeDj4MUxRbwXs78vEzP4EtO14k= 1231 | 1232 | optionator@^0.8.2: 1233 | version "0.8.2" 1234 | resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" 1235 | integrity sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q= 1236 | dependencies: 1237 | deep-is "~0.1.3" 1238 | fast-levenshtein "~2.0.4" 1239 | levn "~0.3.0" 1240 | prelude-ls "~1.1.2" 1241 | type-check "~0.3.2" 1242 | wordwrap "~1.0.0" 1243 | 1244 | os-homedir@^1.0.0: 1245 | version "1.0.2" 1246 | resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" 1247 | integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= 1248 | 1249 | path-exists@^2.0.0: 1250 | version "2.1.0" 1251 | resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" 1252 | integrity sha1-D+tsZPD8UY2adU3V77YscCJ2H0s= 1253 | dependencies: 1254 | pinkie-promise "^2.0.0" 1255 | 1256 | path-is-absolute@^1.0.0: 1257 | version "1.0.1" 1258 | resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" 1259 | integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= 1260 | 1261 | path-is-inside@^1.0.1: 1262 | version "1.0.2" 1263 | resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" 1264 | integrity sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM= 1265 | 1266 | path-parse@^1.0.5: 1267 | version "1.0.6" 1268 | resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" 1269 | integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== 1270 | 1271 | pify@^2.0.0: 1272 | version "2.3.0" 1273 | resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" 1274 | integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= 1275 | 1276 | pinkie-promise@^2.0.0: 1277 | version "2.0.1" 1278 | resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" 1279 | integrity sha1-ITXW36ejWMBprJsXh3YogihFD/o= 1280 | dependencies: 1281 | pinkie "^2.0.0" 1282 | 1283 | pinkie@^2.0.0: 1284 | version "2.0.4" 1285 | resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" 1286 | integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA= 1287 | 1288 | pkg-dir@^1.0.0: 1289 | version "1.0.0" 1290 | resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-1.0.0.tgz#7a4b508a8d5bb2d629d447056ff4e9c9314cf3d4" 1291 | integrity sha1-ektQio1bstYp1EcFb/TpyTFM89Q= 1292 | dependencies: 1293 | find-up "^1.0.0" 1294 | 1295 | pkg-up@^1.0.0: 1296 | version "1.0.0" 1297 | resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-1.0.0.tgz#3e08fb461525c4421624a33b9f7e6d0af5b05a26" 1298 | integrity sha1-Pgj7RhUlxEIWJKM7n35tCvWwWiY= 1299 | dependencies: 1300 | find-up "^1.0.0" 1301 | 1302 | pluralize@^1.2.1: 1303 | version "1.2.1" 1304 | resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-1.2.1.tgz#d1a21483fd22bb41e58a12fa3421823140897c45" 1305 | integrity sha1-0aIUg/0iu0HlihL6NCGCMUCJfEU= 1306 | 1307 | prelude-ls@~1.1.2: 1308 | version "1.1.2" 1309 | resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" 1310 | integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= 1311 | 1312 | process-nextick-args@~2.0.0: 1313 | version "2.0.0" 1314 | resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa" 1315 | integrity sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw== 1316 | 1317 | progress@^1.1.8: 1318 | version "1.1.8" 1319 | resolved "https://registry.yarnpkg.com/progress/-/progress-1.1.8.tgz#e260c78f6161cdd9b0e56cc3e0a85de17c7a57be" 1320 | integrity sha1-4mDHj2Fhzdmw5WzD4Khd4Xx6V74= 1321 | 1322 | prop-types@^15.6.2: 1323 | version "15.6.2" 1324 | resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.6.2.tgz#05d5ca77b4453e985d60fc7ff8c859094a497102" 1325 | integrity sha512-3pboPvLiWD7dkI3qf3KbUe6hKFKa52w+AE0VCqECtf+QHAKgOL37tTaNCnuX1nAAQ4ZhyP+kYVKf8rLmJ/feDQ== 1326 | dependencies: 1327 | loose-envify "^1.3.1" 1328 | object-assign "^4.1.1" 1329 | 1330 | readable-stream@^2.2.2: 1331 | version "2.3.6" 1332 | resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" 1333 | integrity sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw== 1334 | dependencies: 1335 | core-util-is "~1.0.0" 1336 | inherits "~2.0.3" 1337 | isarray "~1.0.0" 1338 | process-nextick-args "~2.0.0" 1339 | safe-buffer "~5.1.1" 1340 | string_decoder "~1.1.1" 1341 | util-deprecate "~1.0.1" 1342 | 1343 | readline2@^1.0.1: 1344 | version "1.0.1" 1345 | resolved "https://registry.yarnpkg.com/readline2/-/readline2-1.0.1.tgz#41059608ffc154757b715d9989d199ffbf372e35" 1346 | integrity sha1-QQWWCP/BVHV7cV2ZidGZ/783LjU= 1347 | dependencies: 1348 | code-point-at "^1.0.0" 1349 | is-fullwidth-code-point "^1.0.0" 1350 | mute-stream "0.0.5" 1351 | 1352 | rechoir@^0.6.2: 1353 | version "0.6.2" 1354 | resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" 1355 | integrity sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q= 1356 | dependencies: 1357 | resolve "^1.1.6" 1358 | 1359 | regenerator-runtime@^0.11.0: 1360 | version "0.11.1" 1361 | resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" 1362 | integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg== 1363 | 1364 | require-uncached@^1.0.2: 1365 | version "1.0.3" 1366 | resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3" 1367 | integrity sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM= 1368 | dependencies: 1369 | caller-path "^0.1.0" 1370 | resolve-from "^1.0.0" 1371 | 1372 | resolve-from@^1.0.0: 1373 | version "1.0.1" 1374 | resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226" 1375 | integrity sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY= 1376 | 1377 | resolve@^1.1.6: 1378 | version "1.8.1" 1379 | resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.8.1.tgz#82f1ec19a423ac1fbd080b0bab06ba36e84a7a26" 1380 | integrity sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA== 1381 | dependencies: 1382 | path-parse "^1.0.5" 1383 | 1384 | restore-cursor@^1.0.1: 1385 | version "1.0.1" 1386 | resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-1.0.1.tgz#34661f46886327fed2991479152252df92daa541" 1387 | integrity sha1-NGYfRohjJ/7SmRR5FSJS35LapUE= 1388 | dependencies: 1389 | exit-hook "^1.0.0" 1390 | onetime "^1.0.0" 1391 | 1392 | rimraf@^2.2.8: 1393 | version "2.6.2" 1394 | resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" 1395 | integrity sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w== 1396 | dependencies: 1397 | glob "^7.0.5" 1398 | 1399 | run-async@^0.1.0: 1400 | version "0.1.0" 1401 | resolved "https://registry.yarnpkg.com/run-async/-/run-async-0.1.0.tgz#c8ad4a5e110661e402a7d21b530e009f25f8e389" 1402 | integrity sha1-yK1KXhEGYeQCp9IbUw4AnyX444k= 1403 | dependencies: 1404 | once "^1.3.0" 1405 | 1406 | rx-lite@^3.1.2: 1407 | version "3.1.2" 1408 | resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-3.1.2.tgz#19ce502ca572665f3b647b10939f97fd1615f102" 1409 | integrity sha1-Gc5QLKVyZl87ZHsQk5+X/RYV8QI= 1410 | 1411 | safe-buffer@~5.1.0, safe-buffer@~5.1.1: 1412 | version "5.1.2" 1413 | resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" 1414 | integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== 1415 | 1416 | shelljs@^0.7.5: 1417 | version "0.7.8" 1418 | resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.8.tgz#decbcf874b0d1e5fb72e14b164a9683048e9acb3" 1419 | integrity sha1-3svPh0sNHl+3LhSxZKloMEjprLM= 1420 | dependencies: 1421 | glob "^7.0.0" 1422 | interpret "^1.0.0" 1423 | rechoir "^0.6.2" 1424 | 1425 | slice-ansi@0.0.4: 1426 | version "0.0.4" 1427 | resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35" 1428 | integrity sha1-7b+JA/ZvfOL46v1s7tZeJkyDGzU= 1429 | 1430 | source-map@^0.5.0: 1431 | version "0.5.7" 1432 | resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" 1433 | integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= 1434 | 1435 | sprintf-js@~1.0.2: 1436 | version "1.0.3" 1437 | resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" 1438 | integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= 1439 | 1440 | string-width@^1.0.1: 1441 | version "1.0.2" 1442 | resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" 1443 | integrity sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M= 1444 | dependencies: 1445 | code-point-at "^1.0.0" 1446 | is-fullwidth-code-point "^1.0.0" 1447 | strip-ansi "^3.0.0" 1448 | 1449 | string-width@^2.0.0: 1450 | version "2.1.1" 1451 | resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" 1452 | integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== 1453 | dependencies: 1454 | is-fullwidth-code-point "^2.0.0" 1455 | strip-ansi "^4.0.0" 1456 | 1457 | string_decoder@~1.1.1: 1458 | version "1.1.1" 1459 | resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" 1460 | integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== 1461 | dependencies: 1462 | safe-buffer "~5.1.0" 1463 | 1464 | strip-ansi@^3.0.0: 1465 | version "3.0.1" 1466 | resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" 1467 | integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= 1468 | dependencies: 1469 | ansi-regex "^2.0.0" 1470 | 1471 | strip-ansi@^4.0.0: 1472 | version "4.0.0" 1473 | resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" 1474 | integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= 1475 | dependencies: 1476 | ansi-regex "^3.0.0" 1477 | 1478 | strip-bom@^3.0.0: 1479 | version "3.0.0" 1480 | resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" 1481 | integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM= 1482 | 1483 | strip-json-comments@~2.0.1: 1484 | version "2.0.1" 1485 | resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" 1486 | integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= 1487 | 1488 | supports-color@^2.0.0: 1489 | version "2.0.0" 1490 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" 1491 | integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= 1492 | 1493 | supports-color@^5.3.0: 1494 | version "5.5.0" 1495 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" 1496 | integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== 1497 | dependencies: 1498 | has-flag "^3.0.0" 1499 | 1500 | table@^3.7.8: 1501 | version "3.8.3" 1502 | resolved "https://registry.yarnpkg.com/table/-/table-3.8.3.tgz#2bbc542f0fda9861a755d3947fefd8b3f513855f" 1503 | integrity sha1-K7xULw/amGGnVdOUf+/Ys/UThV8= 1504 | dependencies: 1505 | ajv "^4.7.0" 1506 | ajv-keywords "^1.0.0" 1507 | chalk "^1.1.1" 1508 | lodash "^4.0.0" 1509 | slice-ansi "0.0.4" 1510 | string-width "^2.0.0" 1511 | 1512 | text-table@~0.2.0: 1513 | version "0.2.0" 1514 | resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" 1515 | integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= 1516 | 1517 | through@^2.3.6: 1518 | version "2.3.8" 1519 | resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" 1520 | integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= 1521 | 1522 | to-fast-properties@^1.0.3: 1523 | version "1.0.3" 1524 | resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" 1525 | integrity sha1-uDVx+k2MJbguIxsG46MFXeTKGkc= 1526 | 1527 | to-fast-properties@^2.0.0: 1528 | version "2.0.0" 1529 | resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" 1530 | integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= 1531 | 1532 | trim-right@^1.0.1: 1533 | version "1.0.1" 1534 | resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" 1535 | integrity sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM= 1536 | 1537 | type-check@~0.3.2: 1538 | version "0.3.2" 1539 | resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" 1540 | integrity sha1-WITKtRLPHTVeP7eE8wgEsrUg23I= 1541 | dependencies: 1542 | prelude-ls "~1.1.2" 1543 | 1544 | typedarray@^0.0.6: 1545 | version "0.0.6" 1546 | resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" 1547 | integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= 1548 | 1549 | use-subscription@^1.3.0: 1550 | version "1.3.0" 1551 | resolved "https://registry.yarnpkg.com/use-subscription/-/use-subscription-1.3.0.tgz#3df13a798e826c8d462899423293289a3362e4e6" 1552 | integrity sha512-buZV7FUtnbOr+65dN7PHK7chHhQGfk/yjgqfpRLoWuHIAc4klAD/rdot2FsPNtFthN1ZydvA8tR/mWBMQ+/fDQ== 1553 | dependencies: 1554 | object-assign "^4.1.1" 1555 | 1556 | user-home@^2.0.0: 1557 | version "2.0.0" 1558 | resolved "https://registry.yarnpkg.com/user-home/-/user-home-2.0.0.tgz#9c70bfd8169bc1dcbf48604e0f04b8b49cde9e9f" 1559 | integrity sha1-nHC/2Babwdy/SGBODwS4tJzenp8= 1560 | dependencies: 1561 | os-homedir "^1.0.0" 1562 | 1563 | util-deprecate@~1.0.1: 1564 | version "1.0.2" 1565 | resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" 1566 | integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= 1567 | 1568 | wordwrap@~1.0.0: 1569 | version "1.0.0" 1570 | resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" 1571 | integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus= 1572 | 1573 | wrappy@1: 1574 | version "1.0.2" 1575 | resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" 1576 | integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= 1577 | 1578 | write@^0.2.1: 1579 | version "0.2.1" 1580 | resolved "https://registry.yarnpkg.com/write/-/write-0.2.1.tgz#5fc03828e264cea3fe91455476f7a3c566cb0757" 1581 | integrity sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c= 1582 | dependencies: 1583 | mkdirp "^0.5.1" 1584 | 1585 | xtend@^4.0.0: 1586 | version "4.0.1" 1587 | resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" 1588 | integrity sha1-pcbVMr5lbiPbgg77lDofBJmNY68= 1589 | --------------------------------------------------------------------------------