diff --git a/README.md b/README.md index e0749c1..6eccdd4 100644 --- a/README.md +++ b/README.md @@ -5,25 +5,29 @@

-React Native TCP socket API for Android, iOS & macOS with **client SSL/TLS support**. It allows you to create TCP client and server sockets, imitating Node's [net](https://nodejs.org/api/net.html) API functionalities (check the available [API](#api) for more information). +React Native TCP socket API for Android, iOS & macOS with **SSL/TLS support**. It allows you to create TCP client and server sockets, imitating Node's [net](https://nodejs.org/api/net.html) and Node's [tls](https://nodejs.org/api/tls.html) API functionalities (check the available [API](#api) for more information). ## Table of Contents - [Getting started](#getting-started) - [Overriding `net`](#overriding-net) + - [Overriding `tls`](#overriding-tls) - [Using React Native >= 0.60](#using-react-native--060) - [Self-Signed SSL (only available for React Native > 0.60)](#self-signed-ssl-only-available-for-react-native--060) - [Using React Native < 0.60](#using-react-native--060-1) - [React Native Compatibility](#react-native-compatibility) - [Usage](#usage) - - [Client](#client) - - [Server](#server) - - [SSL Client](#ssl-client) + - [Client example](#client-example) + - [Server example](#server-example) + - [TLS Client example](#tls-client-example) + - [TLS Server example](#tls-server-example) - [API](#api) - - [Socket](#socket) - - [`createConnection()`](#createconnection) - - [Server](#server-1) - - [`listen()`](#listen) + - [net](#net) + - [Socket](#socket) + - [Server](#server) + - [tls](#tls) + - [TLSSocket](#tlssocket) + - [TLSServer](#tlsserver) - [Maintainers](#maintainers) - [Acknowledgments](#acknowledgments) - [License](#license) @@ -66,6 +70,26 @@ If you want to avoid duplicated `net` types, make sure not to use the default `n _Check the [example app](./examples/tcpsockets/) provided for a working example._ +#### Overriding `tls` +The same applies to `tls` module. However, you should be aware of the following: + +* The `Server` class exported by default is non-TLS. In order to use the TLS server, you must use the `TLSServer` class. You may override the default `Server` class (`tls.Server = tls.TLSServer`). The same goes with the `createServer()` and `connect()`. In order to use the TLS methods, you must use the `createTLSServer()` and `connectTLS()` methods respectively. You may override the default methods (`tls.createServer = tls.createTLSServer` and `tls.connect = tls.connectTLS`). +* Node's `tls` module requires the keys and certificates to be provided as a string. However, the `react-native-tcp-socket` module requires them to be imported with `require()`. + +In addition, in order to obtain the TS types (or autocompletion) provided by this module, you must also add the following to your custom declarations file. + +```ts +... +declare module 'tls' { + import TcpSockets from 'react-native-tcp-socket'; + export const Server = TcpSockets.TLSServer; + export const TLSSocket = TcpSockets.TLSSocket; + export const connect = TcpSockets.connectTLS; + export const createServer = TcpSockets.createTLSServer; +} +``` + +_Check the [example app](./examples/tcpsockets/) provided for a working example._ #### Using React Native >= 0.60 Linking the package manually is not required anymore with [Autolinking](https://github.com/react-native-community/cli/blob/master/docs/autolinking.md). @@ -87,23 +111,31 @@ Linking the package manually is not required anymore with [Autolinking](https:// ``` #### Self-Signed SSL (only available for React Native > 0.60) +In order to generate the required files (keys and certificates) for self-signed SSL, you can use the following command: +``` +openssl genrsa -out server-key.pem 4096 +openssl req -new -key server-key.pem -out server-csr.pem +openssl x509 -req -in server-csr.pem -signkey server-key.pem -out server-cert.pem +openssl pkcs12 -export -out server-keystore.p12 -inkey server-key.pem -in server-cert.pem +``` +__Note:__ The `server-keystore.p12` must not have a password. + You will need a [metro.config.js](https://facebook.github.io/metro/docs/en/configuration.html) file in order to use a self-signed SSL certificate. You should already have this file in your root project directory, but if you don't, create it. Inside a `module.exports` object, create a key called `resolver` with another object called `assetExts`. The value of `assetExts` should be an array of the resource file extensions you want to support. -If you want to support `.pem` files (plus all the already supported files), your `metro.config.js` would like like this: +If you want to be able to use `.pem` and `.p12` files (plus all the already supported files), your `metro.config.js` should look like this: ```javascript const {getDefaultConfig} = require('metro-config'); const defaultConfig = getDefaultConfig.getDefaultValues(__dirname); module.exports = { resolver: { - assetExts: [...defaultConfig.resolver.assetExts, 'pem'], + assetExts: [...defaultConfig.resolver.assetExts, 'pem', 'p12'], }, // ... }; ``` - #### Using React Native < 0.60 You then need to link the native parts of the library for the platforms you are using. The easiest way to link the library is using the CLI tool by running this command from the root of your project: @@ -139,21 +171,31 @@ If you can't or don't want to use the CLI tool, you can also manually link the l ## React Native Compatibility -To use this library you need to ensure you are using the correct version of React Native. If you are using a version of React Native that is lower than `0.60` you will need to upgrade before attempting to use this library latest version. +To use this library you need to ensure you are using the correct version of React Native. If you are using a version of React Native that is lower than `0.60` you will need to upgrade before attempting to use the latest version. -| `react-native-tcp-socket` version | Required React Native Version | -| ----------------------------------------- | --------------------------------------------------------------------------------- | -| `5.X.X`, `4.X.X`, `3.X.X` | `>= 0.60.0` | -| `1.4.0` | `>= Unknown` | +| `react-native-tcp-socket` version | Required React Native Version | +| ---------------------------------- | ----------------------------- | +| `6.X.X`, `5.X.X`, `4.X.X`, `3.X.X` | `>= 0.60.0` | +| `1.4.0` | `>= Unknown` | ## Usage Import the library: ```javascript import TcpSocket from 'react-native-tcp-socket'; // const net = require('react-native-tcp-socket'); +// const tls = require('react-native-tcp-socket'); ``` -### Client +### Client example ```javascript +const options = { + port: port, + host: '127.0.0.1', + localAddress: '127.0.0.1', + reuseAddress: true, + // localPort: 20000, + // interface: "wifi", +}; + // Create socket const client = TcpSocket.createConnection(options, () => { // Write on the socket @@ -176,7 +218,7 @@ client.on('close', function(){ }); ``` -### Server +### Server example ```javascript const server = TcpSocket.createServer(function(socket) { socket.on('data', (data) => { @@ -201,26 +243,86 @@ server.on('close', () => { }); ``` -### SSL Client +### TLS Client example +```javascript +const options = { + port: port, + host: '127.0.0.1', + localAddress: '127.0.0.1', + reuseAddress: true, + // localPort: 20000, + // interface: "wifi", + ca: require('server-cert.pem'), +}; + +// Create socket +const client = TcpSocket.connectTLS(options, () => { + // Write on the socket + client.write('Hello server!'); + + // Close socket + client.destroy(); +}); + +client.on('data', function(data) { + console.log('message was received', data); +}); + +client.on('error', function(error) { + console.log(error); +}); + +client.on('close', function(){ + console.log('Connection closed!'); +}); + +``` + +### TLS Server example ```javascript -const client = TcpSocket.createConnection({ - port: 8443, - host: "example.com", - tls: true, - // tlsCheckValidity: false, // Disable validity checking - // tlsCert: require('./selfmade.pem') // Self-signed certificate +const options = { + keystore: require('server-keystore.p12'), +}; + + +const server = TcpSocket.createTLSServer(options, function(socket) { + socket.on('data', (data) => { + socket.write('Echo server ' + data); + }); + + socket.on('error', (error) => { + console.log('An error ocurred with SSL client socket ', error); + }); + + socket.on('close', (error) => { + console.log('SSL closed connection with ', socket.address()); + }); +}).listen({ port: 12345, host: '0.0.0.0' }); + +server.on('error', (error) => { + console.log('An error ocurred with the server', error); }); -// ... +server.on('close', () => { + console.log('Server closed connection'); +}); ``` + _Note: In order to use self-signed certificates make sure to [update your metro.config.js configuration](#self-signed-ssl-only-available-for-react-native--060)._ ## API -Here are listed all methods implemented in `react-native-tcp-socket`, their functionalities are equivalent to those provided by Node's [net](https://nodejs.org/api/net.html) (more info on [#41](https://github.com/Rapsssito/react-native-tcp-socket/issues/41)). However, the **methods whose interface differs from Node are marked in bold**. +### net +Here are listed all methods implemented in `react-native-tcp-socket` that imitate Node's [net](https://nodejs.org/api/net.html) API, their functionalities are equivalent to those provided by Node's [net](https://nodejs.org/api/net.html) (more info on [#41](https://github.com/Rapsssito/react-native-tcp-socket/issues/41)). However, the **methods whose interface differs from Node are marked in bold**. + +* **[`net.connect(options[, callback])`](#netcreateconnection----omit-in-toc)** +* **[`net.createConnection(options[, callback])`](#netcreateconnection----omit-in-toc)** +* [`net.createServer(connectionListener)`](https://nodejs.org/api/net.html#net_net_createserver_options_connectionlistener) +* [`net.isIP(input)`](https://nodejs.org/api/net.html#netisipinput) +* [`net.isIPv4(input)`](https://nodejs.org/api/net.html#netisipv4input) +* [`net.isIPv6(input)`](https://nodejs.org/api/net.html#netisipv6input) -### Socket +#### Socket * **Methods:** - * **[`TcpSocket.createConnection(options[, callback])`](#createconnection)** * [`address()`](https://nodejs.org/api/net.html#net_socket_address) * [`destroy([error])`](https://nodejs.org/api/net.html#net_socket_destroy_error) * [`end([data][, encoding][, callback])`](https://nodejs.org/api/net.html#net_socket_end_data_encoding_callback) @@ -259,31 +361,25 @@ Here are listed all methods implemented in `react-native-tcp-socket`, their func * [`'error'`](https://nodejs.org/api/net.html#net_event_error_1) * [`'timeout'`](https://nodejs.org/api/net.html#net_event_timeout) -#### `createConnection()` -`createConnection(options[, callback])` creates a TCP connection using the given [`options`](#createconnection-options). -##### `createConnection: options` -**Required**. Available options for creating a socket. It must be an `object` with the following properties: - -| Property | Type | iOS/macOS | Android |Description | -| --------------------- | ------ | :--: | :-----: |-------------------------------------------------------------------------------------------------- | -| **`port`** | `` | ✅ | ✅ | **Required**. Port the socket should connect to. | -| `host` | `` | ✅ | ✅ | Host the socket should connect to. IP address in IPv4 format or `'localhost'`. **Default**: `'localhost'`. | -| `timeout` | `` | ✅ | ✅ | If set, will be used to call [`setTimeout(timeout)`](https://nodejs.org/api/net.html#net_socket_settimeout_timeout_callback) after the socket is created, but before it starts the connection. | -| `localAddress` | `` | ✅ | ✅ | Local address the socket should connect from. If not specified, the OS will decide. It is **highly recommended** to specify a `localAddress` to prevent overload errors and improve performance. | -| `localPort` | `` | ✅ | ✅ | Local port the socket should connect from. If not specified, the OS will decide. | -| `interface`| `` | ❌ | ✅ | Interface the socket should connect from. If not specified, it will use the current active connection. The options are: `'wifi', 'ethernet', 'cellular'`. | -| `reuseAddress`| `` | ❌ | ✅ | Enable/disable the reuseAddress socket option. **Default**: `true`. | -| `tls`| `` | ✅ | ✅ | Enable/disable SSL/TLS socket creation. **Default**: `false`. | -| `tlsCheckValidity`| `` | ✅ | ✅ | Enable/disable SSL/TLS certificate validity check. **Default**: `true`. | -| `tlsCert`| `` | ✅ | ✅ | CA file (.pem format) to trust. If `null`, it will use the device's default SSL trusted list. Useful for self-signed certificates. _See [example](#ssl-client) for more info_. **Default**: `null`. | +##### `net.createConnection()` +`net.createConnection(options[, callback])` creates a TCP connection using the given `options`. The `options` parameter must be an `object` with the following properties: + +| Property | Type | iOS/macOS | Android | Description | +| -------------- | ----------- | :-------: | :-----: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| **`port`** | `` | ✅ | ✅ | **Required**. Port the socket should connect to. | +| `host` | `` | ✅ | ✅ | Host the socket should connect to. IP address in IPv4 format or `'localhost'`. **Default**: `'localhost'`. | +| `timeout` | `` | ✅ | ✅ | If set, will be used to call [`setTimeout(timeout)`](https://nodejs.org/api/net.html#net_socket_settimeout_timeout_callback) after the socket is created, but before it starts the connection. | +| `localAddress` | `` | ✅ | ✅ | Local address the socket should connect from. If not specified, the OS will decide. It is **highly recommended** to specify a `localAddress` to prevent overload errors and improve performance. | +| `localPort` | `` | ✅ | ✅ | Local port the socket should connect from. If not specified, the OS will decide. | +| `interface` | `` | ❌ | ✅ | Interface the socket should connect from. If not specified, it will use the current active connection. The options are: `'wifi', 'ethernet', 'cellular'`. | +| `reuseAddress` | `` | ❌ | ✅ | Enable/disable the reuseAddress socket option. **Default**: `true`. | **Note**: The platforms marked as ❌ use the default value. -### Server +#### Server * **Methods:** - * [`TcpSocket.createServer(connectionListener)`](https://nodejs.org/api/net.html#net_net_createserver_options_connectionlistener) * [`address()`](https://nodejs.org/api/net.html#net_server_address) - * **[`listen(options[, callback])`](#listen)** + * **[`listen(options[, callback])`](#serverlisten----omit-in-toc)** * [`close([callback])`](https://nodejs.org/api/net.html#net_server_close_callback) * [`getConnections(callback)`](https://nodejs.org/api/net.html#net_server_getconnections_callback) * **Properties:** @@ -294,20 +390,58 @@ Here are listed all methods implemented in `react-native-tcp-socket`, their func * [`'error'`](https://nodejs.org/api/net.html#net_event_error) * [`'listening'`](https://nodejs.org/api/net.html#net_event_listening) -#### `listen()` -`listen(options[, callback])` creates a TCP server socket using the given [`options`](#listen-options). - -##### `listen: options` -**Required**. Available options for creating a server socket. It must be an `object` with the following properties: +##### `Server.listen()` +`Server.listen(options[, callback])` creates a TCP server socket using the given `options`. The `options` parameter must be an `object` with the following properties: -| Property | Type | iOS/macOS | Android |Description | -| --------------------- | ------ | :--: | :-----: |-------------------------------------------------------------------------------------------------- | -| **`port`** | `` | ✅ | ✅ | **Required**. Port the socket should listen to. | -| `host` | `` | ✅ | ✅ | Host the socket should listen to. IP address in IPv4 format or `'localhost'`. **Default**: `'0.0.0.0'`. | -| `reuseAddress`| `` | ❌ | ✅ | Enable/disable the reuseAddress socket option. **Default**: `true`. | +| Property | Type | iOS/macOS | Android | Description | +| -------------- | ----------- | :-------: | :-----: | ------------------------------------------------------------------------------------------------------- | +| **`port`** | `` | ✅ | ✅ | **Required**. Port the socket should listen to. | +| `host` | `` | ✅ | ✅ | Host the socket should listen to. IP address in IPv4 format or `'localhost'`. **Default**: `'0.0.0.0'`. | +| `reuseAddress` | `` | ❌ | ✅ | Enable/disable the reuseAddress socket option. **Default**: `true`. | **Note**: The platforms marked as ❌ use the default value. +### tls +Here are listed all methods implemented in `react-native-tcp-socket` that imitate Node's [tls](https://nodejs.org/api/tls.html) API, their functionalities are equivalent to those provided by Node's [tls](https://nodejs.org/api/tls.html). However, the **methods whose interface differs from Node are marked in bold**. + +* **[`tls.connectTLS(options[, callback])`](#tlsconnecttls----omit-in-toc)** +* **[`tls.createTLSServer([options][, secureConnectionListener])`](#tlscreatetlsserver----omit-in-toc)** + +#### TLSSocket +* **Methods:** + * All methods from [`Socket`](#socket) +* **Properties:** + * All properties from [`Socket`](#socket) +* **Events:** + * All events from [`Socket`](#socket) + * [`'secureConnect'`](https://nodejs.org/api/tls.html#event-secureconnect) + +##### `tls.connectTLS()` +`tls.connectTLS(options[, callback])` creates a TLS socket connection using the given `options`. The `options` parameter must be an `object` with the following properties: + +| Property | Type | iOS/macOS | Android | Description | +| -------- | ---------- | :-------: | :-----: | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `ca` | `` | ✅ | ✅ | CA file (.pem format) to trust. If `null`, it will use the device's default SSL trusted list. Useful for self-signed certificates. _Check the [documentation](#self-signed-ssl-only-available-for-react-native--060) for generating such file_. **Default**: `null`. | +| `...` | `` | ✅ | ✅ | Any other [`socket.connect()`](#netcreateconnection----omit-in-toc) options not already listed. | + +#### TLSServer +__Note__: The TLS server is named `Server` in Node's tls, but it is named `TLSServer` in `react-native-tcp-socket` in order to avoid confusion with the [`Server`](#server) class. +* **Methods:** + * All methods from [`Server`](#server) + * **[`setSecureContext(options)`](#tlscreatetlsserver----omit-in-toc)** +* **Properties:** + * All properties from [`Server`](#server) +* **Events:** + * All events from [`Server`](#server) + * [`'secureConnection'`](https://nodejs.org/api/tls.html#event-secureconnection) + +##### `tls.createTLSServer()` +`tls.createTLSServer([options][, secureConnectionListener])` creates a new `tls.TLSServer`. The `secureConnectionListener`, if provided, is automatically set as a listener for the `'secureConnection'` event. The `options` parameter must be an `object` with the following properties: + +| Property | Type | iOS/macOS | Android | Description | +| -------------- | ---------- | :-------: | :-----: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| **`keystore`** | `` | ✅ | ✅ | **Required**. Key store in PKCS#12 format with the server certificate and private key. _Check the [documentation](#self-signed-ssl-only-available-for-react-native--060) for generating such file_. | + ## Maintainers * [Rapsssito](https://github.com/rapsssito) diff --git a/android/src/main/java/com/asterinet/react/tcpsocket/SSLCertificateHelper.java b/android/src/main/java/com/asterinet/react/tcpsocket/SSLCertificateHelper.java index b938d75..20bc9f8 100644 --- a/android/src/main/java/com/asterinet/react/tcpsocket/SSLCertificateHelper.java +++ b/android/src/main/java/com/asterinet/react/tcpsocket/SSLCertificateHelper.java @@ -3,6 +3,9 @@ import android.annotation.SuppressLint; import android.content.Context; +import androidx.annotation.NonNull; +import androidx.annotation.RawRes; + import java.io.IOException; import java.io.InputStream; import java.net.URI; @@ -13,14 +16,16 @@ import java.security.cert.CertificateFactory; import java.security.cert.X509Certificate; +import javax.net.ssl.KeyManagerFactory; import javax.net.ssl.SSLContext; +import javax.net.ssl.SSLServerSocketFactory; +import javax.net.ssl.SSLSocket; import javax.net.ssl.SSLSocketFactory; import javax.net.ssl.TrustManager; import javax.net.ssl.TrustManagerFactory; +import javax.net.ssl.X509ExtendedKeyManager; import javax.net.ssl.X509TrustManager; -import androidx.annotation.NonNull; -import androidx.annotation.RawRes; final class SSLCertificateHelper { /** @@ -34,6 +39,23 @@ static SSLSocketFactory createBlindSocketFactory() throws GeneralSecurityExcepti return ctx.getSocketFactory(); } + static SSLServerSocketFactory createServerSocketFactory(Context context, @NonNull final String keyStoreResourceUri) throws GeneralSecurityException, IOException { + char[] password = "".toCharArray(); + + InputStream keyStoreInput = getRawResourceStream(context, keyStoreResourceUri); + KeyStore keyStore = KeyStore.getInstance("PKCS12"); + keyStore.load(keyStoreInput, password); + keyStoreInput.close(); + + KeyManagerFactory keyManagerFactory = KeyManagerFactory.getInstance("X509"); + keyManagerFactory.init(keyStore, password); + + SSLContext sslContext = SSLContext.getInstance("TLS"); + sslContext.init(keyManagerFactory.getKeyManagers(), new TrustManager[]{new BlindTrustManager()}, null); + + return sslContext.getServerSocketFactory(); + } + /** * Creates an SSLSocketFactory instance for use with the CA provided in the resource file. * diff --git a/android/src/main/java/com/asterinet/react/tcpsocket/TcpEventListener.java b/android/src/main/java/com/asterinet/react/tcpsocket/TcpEventListener.java index dc28a1d..aed1561 100644 --- a/android/src/main/java/com/asterinet/react/tcpsocket/TcpEventListener.java +++ b/android/src/main/java/com/asterinet/react/tcpsocket/TcpEventListener.java @@ -1,6 +1,7 @@ package com.asterinet.react.tcpsocket; import android.util.Base64; +import android.util.Log; import com.facebook.react.bridge.Arguments; import com.facebook.react.bridge.ReactContext; @@ -24,6 +25,14 @@ public TcpEventListener(final ReactContext reactContext) { } public void onConnection(int serverId, int clientId, Socket socket) { + onSocketConnection("connection", serverId, clientId, socket); + } + + public void onSecureConnection(int serverId, int clientId, Socket socket) { + onSocketConnection("secureConnection", serverId, clientId, socket); + } + + private void onSocketConnection(String connectionType, int serverId, int clientId, Socket socket) { WritableMap eventParams = Arguments.createMap(); eventParams.putInt("id", serverId); @@ -42,7 +51,7 @@ public void onConnection(int serverId, int clientId, Socket socket) { infoParams.putMap("connection", connectionParams); eventParams.putMap("info", infoParams); - sendEvent("connection", eventParams); + sendEvent(connectionType, eventParams); } public void onConnect(int id, TcpSocketClient client) { @@ -83,7 +92,12 @@ public void onData(int id, byte[] data) { sendEvent("data", eventParams); } - public void onWritten(int id, int msgId, @Nullable String error) { + public void onWritten(int id, int msgId, @Nullable Exception e) { + String error = null; + if (e != null) { + Log.e(TcpSocketModule.TAG, "Exception on socket " + id, e); + error = e.getMessage(); + } WritableMap eventParams = Arguments.createMap(); eventParams.putInt("id", id); eventParams.putInt("msgId", msgId); @@ -92,18 +106,20 @@ public void onWritten(int id, int msgId, @Nullable String error) { sendEvent("written", eventParams); } - public void onClose(int id, String error) { - if (error != null) { - onError(id, error); + public void onClose(int id, Exception e) { + if (e != null) { + onError(id, e); } WritableMap eventParams = Arguments.createMap(); eventParams.putInt("id", id); - eventParams.putBoolean("hadError", error != null); + eventParams.putBoolean("hadError", e != null); sendEvent("close", eventParams); } - public void onError(int id, String error) { + public void onError(int id, Exception e) { + Log.e(TcpSocketModule.TAG, "Exception on socket " + id, e); + String error = e.getMessage(); WritableMap eventParams = Arguments.createMap(); eventParams.putInt("id", id); eventParams.putString("error", error); diff --git a/android/src/main/java/com/asterinet/react/tcpsocket/TcpSocketClient.java b/android/src/main/java/com/asterinet/react/tcpsocket/TcpSocketClient.java index 816726d..5c245bb 100644 --- a/android/src/main/java/com/asterinet/react/tcpsocket/TcpSocketClient.java +++ b/android/src/main/java/com/asterinet/react/tcpsocket/TcpSocketClient.java @@ -15,7 +15,6 @@ import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; -import javax.net.SocketFactory; import javax.net.ssl.SSLSocket; import javax.net.ssl.SSLSocketFactory; @@ -25,6 +24,7 @@ class TcpSocketClient extends TcpSocket { private final TcpEventListener receiverListener; private TcpReceiverTask receiverTask; private Socket socket; + private boolean closed = true; TcpSocketClient(TcpEventListener receiverListener, Integer id, Socket socket) { super(id); @@ -38,20 +38,12 @@ public Socket getSocket() { return socket; } - public void connect(Context context, String address, final Integer port, ReadableMap options, Network network) throws IOException, GeneralSecurityException { + public void connect(Context context, String address, final Integer port, ReadableMap options, Network network, ReadableMap tlsOptions) throws IOException, GeneralSecurityException { if (socket != null) throw new IOException("Already connected"); - final boolean isTls = options.hasKey("tls") && options.getBoolean("tls"); - if (isTls) { - SocketFactory sf; - if (options.hasKey("tlsCheckValidity") && !options.getBoolean("tlsCheckValidity")) { - sf = SSLCertificateHelper.createBlindSocketFactory(); - } else { - final String customTlsCert = options.hasKey("tlsCert") ? options.getString("tlsCert") : null; - sf = customTlsCert != null ? SSLCertificateHelper.createCustomTrustedSocketFactory(context, customTlsCert) : SSLSocketFactory.getDefault(); - } - final SSLSocket sslSocket = (SSLSocket) sf.createSocket(); - sslSocket.setUseClientMode(true); - socket = sslSocket; + if (tlsOptions != null) { + SSLSocketFactory ssf = getSSLSocketFactory(context, tlsOptions); + socket = ssf.createSocket(); + ((SSLSocket) socket).setUseClientMode(true); } else { socket = new Socket(); } @@ -73,10 +65,30 @@ public void connect(Context context, String address, final Integer port, Readabl // bind socket.bind(new InetSocketAddress(localInetAddress, localPort)); socket.connect(new InetSocketAddress(remoteInetAddress, port)); - if (isTls) ((SSLSocket) socket).startHandshake(); + if (socket instanceof SSLSocket) ((SSLSocket) socket).startHandshake(); startListening(); } + public void startTLS(Context context, ReadableMap tlsOptions) throws IOException, GeneralSecurityException { + if (socket instanceof SSLSocket) return; + SSLSocketFactory ssf = getSSLSocketFactory(context, tlsOptions); + SSLSocket sslSocket = (SSLSocket) ssf.createSocket(socket, socket.getInetAddress().getHostAddress(), socket.getPort(), true); + sslSocket.setUseClientMode(true); + sslSocket.startHandshake(); + socket = sslSocket; + } + + private SSLSocketFactory getSSLSocketFactory(Context context, ReadableMap tlsOptions) throws GeneralSecurityException, IOException { + SSLSocketFactory ssf; + if (tlsOptions.hasKey("rejectUnauthorized") && !tlsOptions.getBoolean("rejectUnauthorized")) { + ssf = SSLCertificateHelper.createBlindSocketFactory(); + } else { + final String customTlsCert = tlsOptions.hasKey("ca") ? tlsOptions.getString("ca") : null; + ssf = customTlsCert != null ? SSLCertificateHelper.createCustomTrustedSocketFactory(context, customTlsCert) : (SSLSocketFactory) SSLSocketFactory.getDefault(); + } + return ssf; + } + public void startListening() { receiverTask = new TcpReceiverTask(this, receiverListener); listenExecutor.execute(receiverTask); @@ -95,8 +107,8 @@ public void run() { socket.getOutputStream().write(data); receiverListener.onWritten(getId(), msgId, null); } catch (IOException e) { - receiverListener.onWritten(getId(), msgId, e.toString()); - receiverListener.onError(getId(), e.toString()); + receiverListener.onWritten(getId(), msgId, e); + receiverListener.onError(getId(), e); } } }); @@ -109,12 +121,13 @@ public void destroy() { try { // close the socket if (socket != null && !socket.isClosed()) { + closed = true; socket.close(); receiverListener.onClose(getId(), null); socket = null; } } catch (IOException e) { - receiverListener.onClose(getId(), e.getMessage()); + receiverListener.onClose(getId(), e); } } @@ -183,8 +196,8 @@ public void run() { } } } catch (IOException | InterruptedException ioe) { - if (receiverListener != null && !socket.isClosed()) { - receiverListener.onError(socketId, ioe.getMessage()); + if (receiverListener != null && !socket.isClosed() && !clientSocket.closed) { + receiverListener.onError(socketId, ioe); } } } diff --git a/android/src/main/java/com/asterinet/react/tcpsocket/TcpSocketModule.java b/android/src/main/java/com/asterinet/react/tcpsocket/TcpSocketModule.java index 297da65..5aa5ca6 100644 --- a/android/src/main/java/com/asterinet/react/tcpsocket/TcpSocketModule.java +++ b/android/src/main/java/com/asterinet/react/tcpsocket/TcpSocketModule.java @@ -4,10 +4,13 @@ import android.annotation.SuppressLint; import android.content.Context; import android.net.ConnectivityManager; +import android.net.Network; import android.net.NetworkCapabilities; import android.net.NetworkRequest; import android.util.Base64; -import android.net.Network; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import com.facebook.react.bridge.ReactApplicationContext; import com.facebook.react.bridge.ReactContextBaseJavaModule; @@ -22,14 +25,12 @@ import java.util.concurrent.ScheduledThreadPoolExecutor; import java.util.concurrent.TimeUnit; -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; - public class TcpSocketModule extends ReactContextBaseJavaModule { - private static final String TAG = "TcpSockets"; + public static final String TAG = "TcpSockets"; private static final int N_THREADS = 2; private final ReactApplicationContext mReactContext; private final ConcurrentHashMap socketMap = new ConcurrentHashMap<>(); + private final ConcurrentHashMap pendingTLS = new ConcurrentHashMap<>(); private final ConcurrentHashMap mNetworkMap = new ConcurrentHashMap<>(); private final CurrentNetwork currentNetwork = new CurrentNetwork(); private final ExecutorService executorService = Executors.newFixedThreadPool(N_THREADS); @@ -68,7 +69,7 @@ public void connect(@NonNull final Integer cId, @NonNull final String host, @Non @Override public void run() { if (socketMap.get(cId) != null) { - tcpEvtListener.onError(cId, TAG + "createSocket called twice with the same id."); + tcpEvtListener.onError(cId, new Exception("connect() called twice with the same id.")); return; } try { @@ -78,15 +79,33 @@ public void run() { selectNetwork(iface, localAddress); TcpSocketClient client = new TcpSocketClient(tcpEvtListener, cId, null); socketMap.put(cId, client); - client.connect(mReactContext, host, port, options, currentNetwork.getNetwork()); + ReadableMap tlsOptions = pendingTLS.get(cId); + client.connect(mReactContext, host, port, options, currentNetwork.getNetwork(), tlsOptions); tcpEvtListener.onConnect(cId, client); } catch (Exception e) { - tcpEvtListener.onError(cId, e.getMessage()); + tcpEvtListener.onError(cId, e); } } }); } + @SuppressLint("StaticFieldLeak") + @SuppressWarnings("unused") + @ReactMethod + public void startTLS(final int cId, @NonNull final ReadableMap tlsOptions) { + TcpSocketClient socketClient = (TcpSocketClient) socketMap.get(cId); + // Not yet connected + if (socketClient == null) { + pendingTLS.put(cId, tlsOptions); + } else { + try { + socketClient.startTLS(mReactContext, tlsOptions); + } catch (Exception e) { + tcpEvtListener.onError(cId, e); + } + } + } + @SuppressLint("StaticFieldLeak") @SuppressWarnings("unused") @ReactMethod @@ -137,11 +156,11 @@ public void listen(final Integer cId, final ReadableMap options) { @Override public void run() { try { - TcpSocketServer server = new TcpSocketServer(socketMap, tcpEvtListener, cId, options); + TcpSocketServer server = new TcpSocketServer(mReactContext, socketMap, tcpEvtListener, cId, options); socketMap.put(cId, server); tcpEvtListener.onListen(cId, server); } catch (Exception uhe) { - tcpEvtListener.onError(cId, uhe.getMessage()); + tcpEvtListener.onError(cId, uhe); } } }); @@ -154,7 +173,7 @@ public void setNoDelay(@NonNull final Integer cId, final boolean noDelay) { try { client.setNoDelay(noDelay); } catch (IOException e) { - tcpEvtListener.onError(cId, e.getMessage()); + tcpEvtListener.onError(cId, e); } } @@ -165,7 +184,7 @@ public void setKeepAlive(@NonNull final Integer cId, final boolean enable, final try { client.setKeepAlive(enable, initialDelay); } catch (IOException e) { - tcpEvtListener.onError(cId, e.getMessage()); + tcpEvtListener.onError(cId, e); } } @@ -182,7 +201,7 @@ public void resume(final int cId) { TcpSocketClient client = getTcpClient(cId); client.resume(); } - + @SuppressWarnings("unused") @ReactMethod public void addListener(String eventName) { @@ -260,10 +279,10 @@ private void selectNetwork(@Nullable final String iface, @Nullable final String private TcpSocketClient getTcpClient(final int id) { TcpSocket socket = socketMap.get(id); if (socket == null) { - throw new IllegalArgumentException(TAG + "No socket with id " + id); + throw new IllegalArgumentException("No socket with id " + id); } if (!(socket instanceof TcpSocketClient)) { - throw new IllegalArgumentException(TAG + "Socket with id " + id + " is not a client"); + throw new IllegalArgumentException("Socket with id " + id + " is not a client"); } return (TcpSocketClient) socket; } @@ -271,10 +290,10 @@ private TcpSocketClient getTcpClient(final int id) { private TcpSocketServer getTcpServer(final int id) { TcpSocket socket = socketMap.get(id); if (socket == null) { - throw new IllegalArgumentException(TAG + "No socket with id " + id); + throw new IllegalArgumentException("No server socket with id " + id); } if (!(socket instanceof TcpSocketServer)) { - throw new IllegalArgumentException(TAG + "Socket with id " + id + " is not a server"); + throw new IllegalArgumentException("Server socket with id " + id + " is not a server"); } return (TcpSocketServer) socket; } diff --git a/android/src/main/java/com/asterinet/react/tcpsocket/TcpSocketServer.java b/android/src/main/java/com/asterinet/react/tcpsocket/TcpSocketServer.java index 51fa5a9..2f13fdf 100644 --- a/android/src/main/java/com/asterinet/react/tcpsocket/TcpSocketServer.java +++ b/android/src/main/java/com/asterinet/react/tcpsocket/TcpSocketServer.java @@ -1,24 +1,30 @@ package com.asterinet.react.tcpsocket; +import android.content.Context; + import com.facebook.react.bridge.ReadableMap; import java.io.IOException; import java.net.InetAddress; import java.net.ServerSocket; import java.net.Socket; +import java.security.GeneralSecurityException; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; +import javax.net.ssl.SSLServerSocketFactory; + public final class TcpSocketServer extends TcpSocket { private final TcpEventListener mReceiverListener; private final ExecutorService listenExecutor; private final ConcurrentHashMap socketClients; + private final boolean isTLS; private ServerSocket serverSocket; private int clientSocketIds; - public TcpSocketServer(final ConcurrentHashMap socketClients, final TcpEventListener receiverListener, final Integer id, - final ReadableMap options) throws IOException { + public TcpSocketServer(final Context context, final ConcurrentHashMap socketClients, final TcpEventListener receiverListener, final Integer id, + final ReadableMap options) throws IOException, GeneralSecurityException { super(id); listenExecutor = Executors.newSingleThreadExecutor(); // Get data from options @@ -29,7 +35,20 @@ public TcpSocketServer(final ConcurrentHashMap socketClients // Get the addresses InetAddress localInetAddress = InetAddress.getByName(address); // Create the socket - serverSocket = new ServerSocket(port, 50, localInetAddress); + // Check if TLS + ReadableMap tlsOptions = options.getMap("tls"); + if (tlsOptions != null) { + String keystoreResourceUri = tlsOptions.getString("keystore"); + assert keystoreResourceUri != null; + + SSLServerSocketFactory ssf = SSLCertificateHelper.createServerSocketFactory(context, keystoreResourceUri); + serverSocket = ssf.createServerSocket(port, 50, localInetAddress); + isTLS = true; + // ((SSLServerSocket) serverSocket).setNeedClientAuth(true); + } else { + serverSocket = new ServerSocket(port, 50, localInetAddress); + isTLS = false; + } // setReuseAddress try { @@ -51,7 +70,11 @@ private void addClient(Socket socket) { int clientId = getClientId(); TcpSocketClient socketClient = new TcpSocketClient(mReceiverListener, clientId, socket); socketClients.put(clientId, socketClient); - mReceiverListener.onConnection(getId(), clientId, socket); + if (isTLS) { + mReceiverListener.onSecureConnection(getId(), clientId, socket); + } else { + mReceiverListener.onConnection(getId(), clientId, socket); + } socketClient.startListening(); } @@ -78,7 +101,7 @@ public void close() { serverSocket = null; } } catch (IOException e) { - mReceiverListener.onClose(getId(), e.getMessage()); + mReceiverListener.onClose(getId(), e); } } @@ -101,7 +124,7 @@ public void run() { } } catch (IOException e) { if (!serverSocket.isClosed()) { - receiverListener.onError(server.getId(), e.getMessage()); + receiverListener.onError(server.getId(), e); } } } diff --git a/coverage/coverage-final.json b/coverage/coverage-final.json deleted file mode 100644 index 51a27ca..0000000 --- a/coverage/coverage-final.json +++ /dev/null @@ -1,5 +0,0 @@ -{"/home/runner/work/react-native-tcp-socket/react-native-tcp-socket/src/Globals.js": {"path":"/home/runner/work/react-native-tcp-socket/react-native-tcp-socket/src/Globals.js","statementMap":{"0":{"start":{"line":2,"column":16},"end":{"line":2,"column":40}},"1":{"start":{"line":4,"column":21},"end":{"line":4,"column":22}},"2":{"start":{"line":7,"column":4},"end":{"line":7,"column":28}},"3":{"start":{"line":10,"column":27},"end":{"line":10,"column":58}}},"fnMap":{"0":{"name":"getNextId","decl":{"start":{"line":6,"column":9},"end":{"line":6,"column":18}},"loc":{"start":{"line":6,"column":21},"end":{"line":8,"column":1}},"line":6}},"branchMap":{},"s":{"0":1,"1":1,"2":2,"3":1},"f":{"0":2},"b":{},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"8cb15bee01bf57f8ac938fbc20fc9feb7945c83c"} -,"/home/runner/work/react-native-tcp-socket/react-native-tcp-socket/src/Server.js": {"path":"/home/runner/work/react-native-tcp-socket/react-native-tcp-socket/src/Server.js","statementMap":{"0":{"start":{"line":5,"column":16},"end":{"line":5,"column":40}},"1":{"start":{"line":23,"column":8},"end":{"line":23,"column":16}},"2":{"start":{"line":25,"column":8},"end":{"line":25,"column":31}},"3":{"start":{"line":27,"column":8},"end":{"line":27,"column":48}},"4":{"start":{"line":29,"column":8},"end":{"line":29,"column":38}},"5":{"start":{"line":31,"column":8},"end":{"line":31,"column":39}},"6":{"start":{"line":33,"column":8},"end":{"line":33,"column":36}},"7":{"start":{"line":35,"column":8},"end":{"line":35,"column":38}},"8":{"start":{"line":36,"column":8},"end":{"line":36,"column":31}},"9":{"start":{"line":37,"column":8},"end":{"line":37,"column":31}},"10":{"start":{"line":38,"column":8},"end":{"line":38,"column":74}},"11":{"start":{"line":38,"column":32},"end":{"line":38,"column":74}},"12":{"start":{"line":39,"column":8},"end":{"line":39,"column":54}},"13":{"start":{"line":57,"column":8},"end":{"line":57,"column":91}},"14":{"start":{"line":57,"column":46},"end":{"line":57,"column":91}},"15":{"start":{"line":58,"column":27},"end":{"line":58,"column":41}},"16":{"start":{"line":59,"column":8},"end":{"line":59,"column":55}},"17":{"start":{"line":60,"column":8},"end":{"line":63,"column":11}},"18":{"start":{"line":61,"column":12},"end":{"line":61,"column":34}},"19":{"start":{"line":62,"column":12},"end":{"line":62,"column":37}},"20":{"start":{"line":62,"column":26},"end":{"line":62,"column":37}},"21":{"start":{"line":64,"column":8},"end":{"line":64,"column":45}},"22":{"start":{"line":65,"column":8},"end":{"line":65,"column":20}},"23":{"start":{"line":77,"column":8},"end":{"line":77,"column":47}},"24":{"start":{"line":78,"column":8},"end":{"line":78,"column":20}},"25":{"start":{"line":91,"column":8},"end":{"line":94,"column":9}},"26":{"start":{"line":92,"column":12},"end":{"line":92,"column":60}},"27":{"start":{"line":93,"column":12},"end":{"line":93,"column":24}},"28":{"start":{"line":95,"column":8},"end":{"line":95,"column":51}},"29":{"start":{"line":95,"column":22},"end":{"line":95,"column":51}},"30":{"start":{"line":96,"column":8},"end":{"line":96,"column":31}},"31":{"start":{"line":97,"column":8},"end":{"line":97,"column":32}},"32":{"start":{"line":98,"column":8},"end":{"line":98,"column":20}},"33":{"start":{"line":109,"column":8},"end":{"line":109,"column":45}},"34":{"start":{"line":109,"column":33},"end":{"line":109,"column":45}},"35":{"start":{"line":110,"column":8},"end":{"line":110,"column":97}},"36":{"start":{"line":114,"column":8},"end":{"line":114,"column":90}},"37":{"start":{"line":115,"column":8},"end":{"line":115,"column":20}},"38":{"start":{"line":119,"column":8},"end":{"line":119,"column":92}},"39":{"start":{"line":120,"column":8},"end":{"line":120,"column":20}},"40":{"start":{"line":127,"column":8},"end":{"line":133,"column":11}},"41":{"start":{"line":128,"column":12},"end":{"line":128,"column":44}},"42":{"start":{"line":128,"column":37},"end":{"line":128,"column":44}},"43":{"start":{"line":129,"column":12},"end":{"line":129,"column":61}},"44":{"start":{"line":130,"column":12},"end":{"line":130,"column":55}},"45":{"start":{"line":131,"column":12},"end":{"line":131,"column":59}},"46":{"start":{"line":132,"column":12},"end":{"line":132,"column":35}},"47":{"start":{"line":134,"column":8},"end":{"line":138,"column":11}},"48":{"start":{"line":135,"column":12},"end":{"line":135,"column":44}},"49":{"start":{"line":135,"column":37},"end":{"line":135,"column":44}},"50":{"start":{"line":136,"column":12},"end":{"line":136,"column":25}},"51":{"start":{"line":137,"column":12},"end":{"line":137,"column":42}},"52":{"start":{"line":139,"column":8},"end":{"line":149,"column":11}},"53":{"start":{"line":140,"column":12},"end":{"line":140,"column":44}},"54":{"start":{"line":140,"column":37},"end":{"line":140,"column":44}},"55":{"start":{"line":141,"column":30},"end":{"line":141,"column":57}},"56":{"start":{"line":143,"column":12},"end":{"line":146,"column":15}},"57":{"start":{"line":144,"column":16},"end":{"line":144,"column":52}},"58":{"start":{"line":145,"column":16},"end":{"line":145,"column":88}},"59":{"start":{"line":145,"column":69},"end":{"line":145,"column":88}},"60":{"start":{"line":147,"column":12},"end":{"line":147,"column":45}},"61":{"start":{"line":148,"column":12},"end":{"line":148,"column":47}},"62":{"start":{"line":156,"column":8},"end":{"line":156,"column":39}},"63":{"start":{"line":157,"column":8},"end":{"line":157,"column":36}},"64":{"start":{"line":158,"column":8},"end":{"line":158,"column":38}},"65":{"start":{"line":167,"column":26},"end":{"line":167,"column":38}},"66":{"start":{"line":168,"column":8},"end":{"line":168,"column":34}},"67":{"start":{"line":169,"column":8},"end":{"line":169,"column":49}},"68":{"start":{"line":170,"column":8},"end":{"line":170,"column":25}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":22,"column":4},"end":{"line":22,"column":5}},"loc":{"start":{"line":22,"column":36},"end":{"line":40,"column":5}},"line":22},"1":{"name":"(anonymous_1)","decl":{"start":{"line":56,"column":4},"end":{"line":56,"column":5}},"loc":{"start":{"line":56,"column":30},"end":{"line":66,"column":5}},"line":56},"2":{"name":"(anonymous_2)","decl":{"start":{"line":60,"column":31},"end":{"line":60,"column":32}},"loc":{"start":{"line":60,"column":37},"end":{"line":63,"column":9}},"line":60},"3":{"name":"(anonymous_3)","decl":{"start":{"line":76,"column":4},"end":{"line":76,"column":5}},"loc":{"start":{"line":76,"column":29},"end":{"line":79,"column":5}},"line":76},"4":{"name":"(anonymous_4)","decl":{"start":{"line":90,"column":4},"end":{"line":90,"column":5}},"loc":{"start":{"line":90,"column":20},"end":{"line":99,"column":5}},"line":90},"5":{"name":"(anonymous_5)","decl":{"start":{"line":108,"column":4},"end":{"line":108,"column":5}},"loc":{"start":{"line":108,"column":14},"end":{"line":111,"column":5}},"line":108},"6":{"name":"(anonymous_6)","decl":{"start":{"line":113,"column":4},"end":{"line":113,"column":5}},"loc":{"start":{"line":113,"column":10},"end":{"line":116,"column":5}},"line":113},"7":{"name":"(anonymous_7)","decl":{"start":{"line":118,"column":4},"end":{"line":118,"column":5}},"loc":{"start":{"line":118,"column":12},"end":{"line":121,"column":5}},"line":118},"8":{"name":"(anonymous_8)","decl":{"start":{"line":126,"column":4},"end":{"line":126,"column":5}},"loc":{"start":{"line":126,"column":22},"end":{"line":150,"column":5}},"line":126},"9":{"name":"(anonymous_9)","decl":{"start":{"line":127,"column":74},"end":{"line":127,"column":75}},"loc":{"start":{"line":127,"column":83},"end":{"line":133,"column":9}},"line":127},"10":{"name":"(anonymous_10)","decl":{"start":{"line":134,"column":70},"end":{"line":134,"column":71}},"loc":{"start":{"line":134,"column":79},"end":{"line":138,"column":9}},"line":134},"11":{"name":"(anonymous_11)","decl":{"start":{"line":139,"column":81},"end":{"line":139,"column":82}},"loc":{"start":{"line":139,"column":90},"end":{"line":149,"column":9}},"line":139},"12":{"name":"(anonymous_12)","decl":{"start":{"line":143,"column":34},"end":{"line":143,"column":35}},"loc":{"start":{"line":143,"column":40},"end":{"line":146,"column":13}},"line":143},"13":{"name":"(anonymous_13)","decl":{"start":{"line":155,"column":4},"end":{"line":155,"column":5}},"loc":{"start":{"line":155,"column":23},"end":{"line":159,"column":5}},"line":155},"14":{"name":"(anonymous_14)","decl":{"start":{"line":166,"column":4},"end":{"line":166,"column":5}},"loc":{"start":{"line":166,"column":23},"end":{"line":171,"column":5}},"line":166}},"branchMap":{"0":{"loc":{"start":{"line":38,"column":8},"end":{"line":38,"column":74}},"type":"if","locations":[{"start":{"line":38,"column":8},"end":{"line":38,"column":74}},{"start":{"line":38,"column":8},"end":{"line":38,"column":74}}],"line":38},"1":{"loc":{"start":{"line":57,"column":8},"end":{"line":57,"column":91}},"type":"if","locations":[{"start":{"line":57,"column":8},"end":{"line":57,"column":91}},{"start":{"line":57,"column":8},"end":{"line":57,"column":91}}],"line":57},"2":{"loc":{"start":{"line":59,"column":26},"end":{"line":59,"column":54}},"type":"binary-expr","locations":[{"start":{"line":59,"column":26},"end":{"line":59,"column":41}},{"start":{"line":59,"column":45},"end":{"line":59,"column":54}}],"line":59},"3":{"loc":{"start":{"line":62,"column":12},"end":{"line":62,"column":37}},"type":"if","locations":[{"start":{"line":62,"column":12},"end":{"line":62,"column":37}},{"start":{"line":62,"column":12},"end":{"line":62,"column":37}}],"line":62},"4":{"loc":{"start":{"line":91,"column":8},"end":{"line":94,"column":9}},"type":"if","locations":[{"start":{"line":91,"column":8},"end":{"line":94,"column":9}},{"start":{"line":91,"column":8},"end":{"line":94,"column":9}}],"line":91},"5":{"loc":{"start":{"line":95,"column":8},"end":{"line":95,"column":51}},"type":"if","locations":[{"start":{"line":95,"column":8},"end":{"line":95,"column":51}},{"start":{"line":95,"column":8},"end":{"line":95,"column":51}}],"line":95},"6":{"loc":{"start":{"line":109,"column":8},"end":{"line":109,"column":45}},"type":"if","locations":[{"start":{"line":109,"column":8},"end":{"line":109,"column":45}},{"start":{"line":109,"column":8},"end":{"line":109,"column":45}}],"line":109},"7":{"loc":{"start":{"line":128,"column":12},"end":{"line":128,"column":44}},"type":"if","locations":[{"start":{"line":128,"column":12},"end":{"line":128,"column":44}},{"start":{"line":128,"column":12},"end":{"line":128,"column":44}}],"line":128},"8":{"loc":{"start":{"line":135,"column":12},"end":{"line":135,"column":44}},"type":"if","locations":[{"start":{"line":135,"column":12},"end":{"line":135,"column":44}},{"start":{"line":135,"column":12},"end":{"line":135,"column":44}}],"line":135},"9":{"loc":{"start":{"line":140,"column":12},"end":{"line":140,"column":44}},"type":"if","locations":[{"start":{"line":140,"column":12},"end":{"line":140,"column":44}},{"start":{"line":140,"column":12},"end":{"line":140,"column":44}}],"line":140},"10":{"loc":{"start":{"line":145,"column":16},"end":{"line":145,"column":88}},"type":"if","locations":[{"start":{"line":145,"column":16},"end":{"line":145,"column":88}},{"start":{"line":145,"column":16},"end":{"line":145,"column":88}}],"line":145},"11":{"loc":{"start":{"line":145,"column":20},"end":{"line":145,"column":67}},"type":"binary-expr","locations":[{"start":{"line":145,"column":20},"end":{"line":145,"column":35}},{"start":{"line":145,"column":39},"end":{"line":145,"column":67}}],"line":145}},"s":{"0":1,"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":1,"9":1,"10":1,"11":1,"12":1,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":1,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":1,"48":0,"49":0,"50":0,"51":0,"52":1,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0},"f":{"0":1,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":1,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0},"b":{"0":[1,0],"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0,0]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"034397c5b323b5807e1f32b4d3934ee205618832"} -,"/home/runner/work/react-native-tcp-socket/react-native-tcp-socket/src/Socket.js": {"path":"/home/runner/work/react-native-tcp-socket/react-native-tcp-socket/src/Socket.js","statementMap":{"0":{"start":{"line":6,"column":16},"end":{"line":6,"column":40}},"1":{"start":{"line":50,"column":8},"end":{"line":50,"column":16}},"2":{"start":{"line":52,"column":8},"end":{"line":52,"column":29}},"3":{"start":{"line":54,"column":8},"end":{"line":54,"column":48}},"4":{"start":{"line":56,"column":8},"end":{"line":56,"column":49}},"5":{"start":{"line":58,"column":8},"end":{"line":58,"column":31}},"6":{"start":{"line":60,"column":8},"end":{"line":60,"column":34}},"7":{"start":{"line":62,"column":8},"end":{"line":62,"column":35}},"8":{"start":{"line":64,"column":8},"end":{"line":64,"column":24}},"9":{"start":{"line":66,"column":8},"end":{"line":66,"column":57}},"10":{"start":{"line":68,"column":8},"end":{"line":68,"column":32}},"11":{"start":{"line":70,"column":8},"end":{"line":70,"column":29}},"12":{"start":{"line":72,"column":8},"end":{"line":72,"column":31}},"13":{"start":{"line":74,"column":8},"end":{"line":74,"column":34}},"14":{"start":{"line":76,"column":8},"end":{"line":76,"column":28}},"15":{"start":{"line":78,"column":8},"end":{"line":78,"column":31}},"16":{"start":{"line":80,"column":8},"end":{"line":80,"column":33}},"17":{"start":{"line":82,"column":8},"end":{"line":82,"column":29}},"18":{"start":{"line":84,"column":8},"end":{"line":84,"column":32}},"19":{"start":{"line":87,"column":8},"end":{"line":87,"column":34}},"20":{"start":{"line":89,"column":8},"end":{"line":89,"column":36}},"21":{"start":{"line":90,"column":8},"end":{"line":90,"column":43}},"22":{"start":{"line":91,"column":8},"end":{"line":91,"column":43}},"23":{"start":{"line":92,"column":8},"end":{"line":92,"column":39}},"24":{"start":{"line":93,"column":8},"end":{"line":93,"column":38}},"25":{"start":{"line":94,"column":8},"end":{"line":94,"column":35}},"26":{"start":{"line":95,"column":8},"end":{"line":95,"column":39}},"27":{"start":{"line":96,"column":8},"end":{"line":96,"column":36}},"28":{"start":{"line":97,"column":8},"end":{"line":97,"column":38}},"29":{"start":{"line":98,"column":8},"end":{"line":98,"column":31}},"30":{"start":{"line":102,"column":8},"end":{"line":102,"column":32}},"31":{"start":{"line":106,"column":8},"end":{"line":106,"column":31}},"32":{"start":{"line":110,"column":8},"end":{"line":110,"column":29}},"33":{"start":{"line":114,"column":8},"end":{"line":114,"column":32}},"34":{"start":{"line":118,"column":8},"end":{"line":118,"column":34}},"35":{"start":{"line":122,"column":8},"end":{"line":122,"column":31}},"36":{"start":{"line":126,"column":8},"end":{"line":126,"column":29}},"37":{"start":{"line":134,"column":8},"end":{"line":134,"column":22}},"38":{"start":{"line":135,"column":8},"end":{"line":135,"column":31}},"39":{"start":{"line":143,"column":8},"end":{"line":143,"column":33}},"40":{"start":{"line":144,"column":8},"end":{"line":144,"column":34}},"41":{"start":{"line":145,"column":8},"end":{"line":145,"column":30}},"42":{"start":{"line":146,"column":8},"end":{"line":146,"column":56}},"43":{"start":{"line":147,"column":8},"end":{"line":147,"column":50}},"44":{"start":{"line":148,"column":8},"end":{"line":148,"column":58}},"45":{"start":{"line":149,"column":8},"end":{"line":149,"column":56}},"46":{"start":{"line":150,"column":8},"end":{"line":150,"column":52}},"47":{"start":{"line":158,"column":8},"end":{"line":158,"column":61}},"48":{"start":{"line":158,"column":36},"end":{"line":158,"column":61}},"49":{"start":{"line":160,"column":30},"end":{"line":160,"column":44}},"50":{"start":{"line":162,"column":8},"end":{"line":162,"column":63}},"51":{"start":{"line":163,"column":8},"end":{"line":163,"column":61}},"52":{"start":{"line":164,"column":8},"end":{"line":166,"column":11}},"53":{"start":{"line":165,"column":12},"end":{"line":165,"column":37}},"54":{"start":{"line":165,"column":26},"end":{"line":165,"column":37}},"55":{"start":{"line":168,"column":8},"end":{"line":169,"column":54}},"56":{"start":{"line":168,"column":35},"end":{"line":168,"column":74}},"57":{"start":{"line":169,"column":13},"end":{"line":169,"column":54}},"58":{"start":{"line":169,"column":32},"end":{"line":169,"column":54}},"59":{"start":{"line":171,"column":8},"end":{"line":173,"column":9}},"60":{"start":{"line":172,"column":12},"end":{"line":172,"column":88}},"61":{"start":{"line":174,"column":8},"end":{"line":174,"column":32}},"62":{"start":{"line":175,"column":8},"end":{"line":175,"column":37}},"63":{"start":{"line":176,"column":8},"end":{"line":176,"column":89}},"64":{"start":{"line":177,"column":8},"end":{"line":177,"column":20}},"65":{"start":{"line":194,"column":8},"end":{"line":198,"column":9}},"66":{"start":{"line":195,"column":12},"end":{"line":195,"column":33}},"67":{"start":{"line":197,"column":12},"end":{"line":197,"column":41}},"68":{"start":{"line":199,"column":8},"end":{"line":199,"column":53}},"69":{"start":{"line":199,"column":22},"end":{"line":199,"column":53}},"70":{"start":{"line":200,"column":8},"end":{"line":200,"column":20}},"71":{"start":{"line":208,"column":8},"end":{"line":208,"column":64}},"72":{"start":{"line":208,"column":35},"end":{"line":208,"column":64}},"73":{"start":{"line":209,"column":8},"end":{"line":209,"column":29}},"74":{"start":{"line":210,"column":8},"end":{"line":213,"column":31}},"75":{"start":{"line":211,"column":12},"end":{"line":211,"column":33}},"76":{"start":{"line":212,"column":12},"end":{"line":212,"column":33}},"77":{"start":{"line":220,"column":8},"end":{"line":223,"column":9}},"78":{"start":{"line":221,"column":12},"end":{"line":221,"column":40}},"79":{"start":{"line":222,"column":12},"end":{"line":222,"column":38}},"80":{"start":{"line":236,"column":8},"end":{"line":236,"column":34}},"81":{"start":{"line":237,"column":8},"end":{"line":237,"column":20}},"82":{"start":{"line":250,"column":8},"end":{"line":253,"column":9}},"83":{"start":{"line":251,"column":12},"end":{"line":251,"column":65}},"84":{"start":{"line":251,"column":39},"end":{"line":251,"column":63}},"85":{"start":{"line":252,"column":12},"end":{"line":252,"column":24}},"86":{"start":{"line":254,"column":8},"end":{"line":254,"column":46}},"87":{"start":{"line":255,"column":8},"end":{"line":255,"column":20}},"88":{"start":{"line":267,"column":8},"end":{"line":270,"column":9}},"89":{"start":{"line":268,"column":12},"end":{"line":268,"column":80}},"90":{"start":{"line":268,"column":39},"end":{"line":268,"column":78}},"91":{"start":{"line":269,"column":12},"end":{"line":269,"column":24}},"92":{"start":{"line":272,"column":8},"end":{"line":276,"column":9}},"93":{"start":{"line":273,"column":12},"end":{"line":275,"column":14}},"94":{"start":{"line":278,"column":8},"end":{"line":278,"column":73}},"95":{"start":{"line":279,"column":8},"end":{"line":279,"column":20}},"96":{"start":{"line":289,"column":8},"end":{"line":289,"column":42}},"97":{"start":{"line":289,"column":32},"end":{"line":289,"column":42}},"98":{"start":{"line":290,"column":8},"end":{"line":290,"column":95}},"99":{"start":{"line":300,"column":8},"end":{"line":305,"column":9}},"100":{"start":{"line":301,"column":12},"end":{"line":303,"column":15}},"101":{"start":{"line":302,"column":16},"end":{"line":302,"column":38}},"102":{"start":{"line":304,"column":12},"end":{"line":304,"column":24}},"103":{"start":{"line":306,"column":8},"end":{"line":306,"column":58}},"104":{"start":{"line":306,"column":46},"end":{"line":306,"column":58}},"105":{"start":{"line":308,"column":8},"end":{"line":308,"column":29}},"106":{"start":{"line":309,"column":8},"end":{"line":309,"column":30}},"107":{"start":{"line":310,"column":8},"end":{"line":310,"column":20}},"108":{"start":{"line":317,"column":8},"end":{"line":317,"column":58}},"109":{"start":{"line":317,"column":46},"end":{"line":317,"column":58}},"110":{"start":{"line":318,"column":8},"end":{"line":318,"column":31}},"111":{"start":{"line":319,"column":8},"end":{"line":319,"column":29}},"112":{"start":{"line":320,"column":8},"end":{"line":320,"column":34}},"113":{"start":{"line":321,"column":8},"end":{"line":321,"column":20}},"114":{"start":{"line":339,"column":21},"end":{"line":339,"column":25}},"115":{"start":{"line":340,"column":8},"end":{"line":340,"column":83}},"116":{"start":{"line":340,"column":46},"end":{"line":340,"column":83}},"117":{"start":{"line":342,"column":32},"end":{"line":342,"column":74}},"118":{"start":{"line":343,"column":8},"end":{"line":343,"column":60}},"119":{"start":{"line":344,"column":29},"end":{"line":344,"column":40}},"120":{"start":{"line":345,"column":8},"end":{"line":345,"column":66}},"121":{"start":{"line":346,"column":30},"end":{"line":362,"column":9}},"122":{"start":{"line":347,"column":35},"end":{"line":347,"column":38}},"123":{"start":{"line":348,"column":12},"end":{"line":361,"column":13}},"124":{"start":{"line":349,"column":16},"end":{"line":349,"column":77}},"125":{"start":{"line":350,"column":16},"end":{"line":350,"column":68}},"126":{"start":{"line":351,"column":16},"end":{"line":351,"column":43}},"127":{"start":{"line":352,"column":16},"end":{"line":352,"column":57}},"128":{"start":{"line":352,"column":35},"end":{"line":352,"column":57}},"129":{"start":{"line":353,"column":16},"end":{"line":356,"column":17}},"130":{"start":{"line":354,"column":20},"end":{"line":354,"column":51}},"131":{"start":{"line":355,"column":20},"end":{"line":355,"column":39}},"132":{"start":{"line":357,"column":16},"end":{"line":360,"column":17}},"133":{"start":{"line":358,"column":20},"end":{"line":359,"column":30}},"134":{"start":{"line":358,"column":29},"end":{"line":358,"column":48}},"135":{"start":{"line":359,"column":25},"end":{"line":359,"column":30}},"136":{"start":{"line":364,"column":8},"end":{"line":364,"column":63}},"137":{"start":{"line":365,"column":19},"end":{"line":365,"column":69}},"138":{"start":{"line":366,"column":8},"end":{"line":366,"column":47}},"139":{"start":{"line":366,"column":17},"end":{"line":366,"column":47}},"140":{"start":{"line":367,"column":8},"end":{"line":367,"column":43}},"141":{"start":{"line":368,"column":8},"end":{"line":368,"column":57}},"142":{"start":{"line":369,"column":8},"end":{"line":369,"column":82}},"143":{"start":{"line":370,"column":8},"end":{"line":370,"column":18}},"144":{"start":{"line":377,"column":8},"end":{"line":377,"column":33}},"145":{"start":{"line":377,"column":26},"end":{"line":377,"column":33}},"146":{"start":{"line":378,"column":8},"end":{"line":378,"column":28}},"147":{"start":{"line":379,"column":8},"end":{"line":379,"column":32}},"148":{"start":{"line":380,"column":8},"end":{"line":380,"column":27}},"149":{"start":{"line":387,"column":8},"end":{"line":387,"column":34}},"150":{"start":{"line":387,"column":27},"end":{"line":387,"column":34}},"151":{"start":{"line":388,"column":8},"end":{"line":388,"column":29}},"152":{"start":{"line":389,"column":8},"end":{"line":389,"column":28}},"153":{"start":{"line":390,"column":8},"end":{"line":390,"column":44}},"154":{"start":{"line":394,"column":8},"end":{"line":394,"column":90}},"155":{"start":{"line":398,"column":8},"end":{"line":398,"column":92}},"156":{"start":{"line":405,"column":8},"end":{"line":405,"column":35}},"157":{"start":{"line":405,"column":28},"end":{"line":405,"column":35}},"158":{"start":{"line":406,"column":8},"end":{"line":406,"column":30}},"159":{"start":{"line":407,"column":8},"end":{"line":436,"column":9}},"160":{"start":{"line":409,"column":30},"end":{"line":409,"column":32}},"161":{"start":{"line":410,"column":28},"end":{"line":410,"column":29}},"162":{"start":{"line":411,"column":20},"end":{"line":411,"column":21}},"163":{"start":{"line":412,"column":12},"end":{"line":423,"column":13}},"164":{"start":{"line":413,"column":32},"end":{"line":413,"column":85}},"165":{"start":{"line":414,"column":16},"end":{"line":414,"column":48}},"166":{"start":{"line":415,"column":16},"end":{"line":422,"column":17}},"167":{"start":{"line":416,"column":20},"end":{"line":416,"column":44}},"168":{"start":{"line":418,"column":39},"end":{"line":418,"column":77}},"169":{"start":{"line":419,"column":20},"end":{"line":419,"column":65}},"170":{"start":{"line":420,"column":20},"end":{"line":420,"column":98}},"171":{"start":{"line":421,"column":20},"end":{"line":421,"column":26}},"172":{"start":{"line":425,"column":24},"end":{"line":428,"column":13}},"173":{"start":{"line":430,"column":12},"end":{"line":430,"column":69}},"174":{"start":{"line":431,"column":12},"end":{"line":431,"column":39}},"175":{"start":{"line":432,"column":12},"end":{"line":435,"column":13}},"176":{"start":{"line":433,"column":16},"end":{"line":433,"column":39}},"177":{"start":{"line":434,"column":16},"end":{"line":434,"column":23}},"178":{"start":{"line":437,"column":8},"end":{"line":437,"column":31}},"179":{"start":{"line":438,"column":8},"end":{"line":438,"column":33}},"180":{"start":{"line":444,"column":23},"end":{"line":455,"column":5}},"181":{"start":{"line":445,"column":8},"end":{"line":445,"column":40}},"182":{"start":{"line":445,"column":33},"end":{"line":445,"column":40}},"183":{"start":{"line":446,"column":8},"end":{"line":454,"column":9}},"184":{"start":{"line":447,"column":31},"end":{"line":447,"column":62}},"185":{"start":{"line":448,"column":12},"end":{"line":448,"column":53}},"186":{"start":{"line":449,"column":30},"end":{"line":449,"column":95}},"187":{"start":{"line":450,"column":12},"end":{"line":450,"column":41}},"188":{"start":{"line":453,"column":12},"end":{"line":453,"column":45}},"189":{"start":{"line":461,"column":8},"end":{"line":461,"column":33}},"190":{"start":{"line":462,"column":8},"end":{"line":462,"column":91}},"191":{"start":{"line":463,"column":8},"end":{"line":467,"column":11}},"192":{"start":{"line":464,"column":12},"end":{"line":464,"column":44}},"193":{"start":{"line":464,"column":37},"end":{"line":464,"column":44}},"194":{"start":{"line":465,"column":12},"end":{"line":465,"column":27}},"195":{"start":{"line":466,"column":12},"end":{"line":466,"column":42}},"196":{"start":{"line":468,"column":8},"end":{"line":472,"column":11}},"197":{"start":{"line":469,"column":12},"end":{"line":469,"column":44}},"198":{"start":{"line":469,"column":37},"end":{"line":469,"column":44}},"199":{"start":{"line":470,"column":12},"end":{"line":470,"column":36}},"200":{"start":{"line":471,"column":12},"end":{"line":471,"column":42}},"201":{"start":{"line":473,"column":8},"end":{"line":477,"column":11}},"202":{"start":{"line":474,"column":12},"end":{"line":474,"column":44}},"203":{"start":{"line":474,"column":37},"end":{"line":474,"column":44}},"204":{"start":{"line":475,"column":12},"end":{"line":475,"column":47}},"205":{"start":{"line":476,"column":12},"end":{"line":476,"column":33}},"206":{"start":{"line":478,"column":8},"end":{"line":481,"column":11}},"207":{"start":{"line":479,"column":12},"end":{"line":479,"column":44}},"208":{"start":{"line":479,"column":37},"end":{"line":479,"column":44}},"209":{"start":{"line":480,"column":12},"end":{"line":480,"column":53}},"210":{"start":{"line":488,"column":8},"end":{"line":488,"column":37}},"211":{"start":{"line":489,"column":8},"end":{"line":489,"column":38}},"212":{"start":{"line":490,"column":8},"end":{"line":490,"column":38}},"213":{"start":{"line":491,"column":8},"end":{"line":491,"column":40}},"214":{"start":{"line":492,"column":8},"end":{"line":492,"column":40}},"215":{"start":{"line":501,"column":8},"end":{"line":511,"column":9}},"216":{"start":{"line":502,"column":12},"end":{"line":502,"column":49}},"217":{"start":{"line":503,"column":15},"end":{"line":511,"column":9}},"218":{"start":{"line":504,"column":12},"end":{"line":504,"column":26}},"219":{"start":{"line":505,"column":15},"end":{"line":511,"column":9}},"220":{"start":{"line":506,"column":12},"end":{"line":506,"column":39}},"221":{"start":{"line":508,"column":12},"end":{"line":510,"column":14}},"222":{"start":{"line":518,"column":8},"end":{"line":518,"column":33}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":49,"column":4},"end":{"line":49,"column":5}},"loc":{"start":{"line":49,"column":18},"end":{"line":99,"column":5}},"line":49},"1":{"name":"(anonymous_1)","decl":{"start":{"line":101,"column":4},"end":{"line":101,"column":5}},"loc":{"start":{"line":101,"column":21},"end":{"line":103,"column":5}},"line":101},"2":{"name":"(anonymous_2)","decl":{"start":{"line":105,"column":4},"end":{"line":105,"column":5}},"loc":{"start":{"line":105,"column":20},"end":{"line":107,"column":5}},"line":105},"3":{"name":"(anonymous_3)","decl":{"start":{"line":109,"column":4},"end":{"line":109,"column":5}},"loc":{"start":{"line":109,"column":18},"end":{"line":111,"column":5}},"line":109},"4":{"name":"(anonymous_4)","decl":{"start":{"line":113,"column":4},"end":{"line":113,"column":5}},"loc":{"start":{"line":113,"column":21},"end":{"line":115,"column":5}},"line":113},"5":{"name":"(anonymous_5)","decl":{"start":{"line":117,"column":4},"end":{"line":117,"column":5}},"loc":{"start":{"line":117,"column":23},"end":{"line":119,"column":5}},"line":117},"6":{"name":"(anonymous_6)","decl":{"start":{"line":121,"column":4},"end":{"line":121,"column":5}},"loc":{"start":{"line":121,"column":20},"end":{"line":123,"column":5}},"line":121},"7":{"name":"(anonymous_7)","decl":{"start":{"line":125,"column":4},"end":{"line":125,"column":5}},"loc":{"start":{"line":125,"column":18},"end":{"line":127,"column":5}},"line":125},"8":{"name":"(anonymous_8)","decl":{"start":{"line":133,"column":4},"end":{"line":133,"column":5}},"loc":{"start":{"line":133,"column":15},"end":{"line":136,"column":5}},"line":133},"9":{"name":"(anonymous_9)","decl":{"start":{"line":142,"column":4},"end":{"line":142,"column":5}},"loc":{"start":{"line":142,"column":34},"end":{"line":151,"column":5}},"line":142},"10":{"name":"(anonymous_10)","decl":{"start":{"line":157,"column":4},"end":{"line":157,"column":5}},"loc":{"start":{"line":157,"column":31},"end":{"line":178,"column":5}},"line":157},"11":{"name":"(anonymous_11)","decl":{"start":{"line":164,"column":29},"end":{"line":164,"column":30}},"loc":{"start":{"line":164,"column":35},"end":{"line":166,"column":9}},"line":164},"12":{"name":"(anonymous_12)","decl":{"start":{"line":193,"column":4},"end":{"line":193,"column":5}},"loc":{"start":{"line":193,"column":34},"end":{"line":201,"column":5}},"line":193},"13":{"name":"(anonymous_13)","decl":{"start":{"line":207,"column":4},"end":{"line":207,"column":5}},"loc":{"start":{"line":207,"column":28},"end":{"line":214,"column":5}},"line":207},"14":{"name":"(anonymous_14)","decl":{"start":{"line":210,"column":35},"end":{"line":210,"column":36}},"loc":{"start":{"line":210,"column":41},"end":{"line":213,"column":9}},"line":210},"15":{"name":"(anonymous_15)","decl":{"start":{"line":219,"column":4},"end":{"line":219,"column":5}},"loc":{"start":{"line":219,"column":20},"end":{"line":224,"column":5}},"line":219},"16":{"name":"(anonymous_16)","decl":{"start":{"line":235,"column":4},"end":{"line":235,"column":5}},"loc":{"start":{"line":235,"column":26},"end":{"line":238,"column":5}},"line":235},"17":{"name":"(anonymous_17)","decl":{"start":{"line":249,"column":4},"end":{"line":249,"column":5}},"loc":{"start":{"line":249,"column":31},"end":{"line":256,"column":5}},"line":249},"18":{"name":"(anonymous_18)","decl":{"start":{"line":251,"column":33},"end":{"line":251,"column":34}},"loc":{"start":{"line":251,"column":39},"end":{"line":251,"column":63}},"line":251},"19":{"name":"(anonymous_19)","decl":{"start":{"line":266,"column":4},"end":{"line":266,"column":5}},"loc":{"start":{"line":266,"column":51},"end":{"line":280,"column":5}},"line":266},"20":{"name":"(anonymous_20)","decl":{"start":{"line":268,"column":33},"end":{"line":268,"column":34}},"loc":{"start":{"line":268,"column":39},"end":{"line":268,"column":78}},"line":268},"21":{"name":"(anonymous_21)","decl":{"start":{"line":288,"column":4},"end":{"line":288,"column":5}},"loc":{"start":{"line":288,"column":14},"end":{"line":291,"column":5}},"line":288},"22":{"name":"(anonymous_22)","decl":{"start":{"line":299,"column":4},"end":{"line":299,"column":5}},"loc":{"start":{"line":299,"column":24},"end":{"line":311,"column":5}},"line":299},"23":{"name":"(anonymous_23)","decl":{"start":{"line":301,"column":39},"end":{"line":301,"column":40}},"loc":{"start":{"line":301,"column":45},"end":{"line":303,"column":13}},"line":301},"24":{"name":"(anonymous_24)","decl":{"start":{"line":316,"column":4},"end":{"line":316,"column":5}},"loc":{"start":{"line":316,"column":14},"end":{"line":322,"column":5}},"line":316},"25":{"name":"(anonymous_25)","decl":{"start":{"line":338,"column":4},"end":{"line":338,"column":5}},"loc":{"start":{"line":338,"column":32},"end":{"line":371,"column":5}},"line":338},"26":{"name":"(anonymous_26)","decl":{"start":{"line":346,"column":30},"end":{"line":346,"column":31}},"loc":{"start":{"line":346,"column":96},"end":{"line":362,"column":9}},"line":346},"27":{"name":"(anonymous_27)","decl":{"start":{"line":376,"column":4},"end":{"line":376,"column":5}},"loc":{"start":{"line":376,"column":12},"end":{"line":381,"column":5}},"line":376},"28":{"name":"(anonymous_28)","decl":{"start":{"line":386,"column":4},"end":{"line":386,"column":5}},"loc":{"start":{"line":386,"column":13},"end":{"line":391,"column":5}},"line":386},"29":{"name":"(anonymous_29)","decl":{"start":{"line":393,"column":4},"end":{"line":393,"column":5}},"loc":{"start":{"line":393,"column":10},"end":{"line":395,"column":5}},"line":393},"30":{"name":"(anonymous_30)","decl":{"start":{"line":397,"column":4},"end":{"line":397,"column":5}},"loc":{"start":{"line":397,"column":12},"end":{"line":399,"column":5}},"line":397},"31":{"name":"(anonymous_31)","decl":{"start":{"line":404,"column":4},"end":{"line":404,"column":5}},"loc":{"start":{"line":404,"column":41},"end":{"line":439,"column":5}},"line":404},"32":{"name":"(anonymous_32)","decl":{"start":{"line":444,"column":23},"end":{"line":444,"column":24}},"loc":{"start":{"line":444,"column":77},"end":{"line":455,"column":5}},"line":444},"33":{"name":"(anonymous_33)","decl":{"start":{"line":460,"column":4},"end":{"line":460,"column":5}},"loc":{"start":{"line":460,"column":22},"end":{"line":482,"column":5}},"line":460},"34":{"name":"(anonymous_34)","decl":{"start":{"line":463,"column":70},"end":{"line":463,"column":71}},"loc":{"start":{"line":463,"column":79},"end":{"line":467,"column":9}},"line":463},"35":{"name":"(anonymous_35)","decl":{"start":{"line":468,"column":70},"end":{"line":468,"column":71}},"loc":{"start":{"line":468,"column":79},"end":{"line":472,"column":9}},"line":468},"36":{"name":"(anonymous_36)","decl":{"start":{"line":473,"column":74},"end":{"line":473,"column":75}},"loc":{"start":{"line":473,"column":83},"end":{"line":477,"column":9}},"line":473},"37":{"name":"(anonymous_37)","decl":{"start":{"line":478,"column":74},"end":{"line":478,"column":75}},"loc":{"start":{"line":478,"column":83},"end":{"line":481,"column":9}},"line":478},"38":{"name":"(anonymous_38)","decl":{"start":{"line":487,"column":4},"end":{"line":487,"column":5}},"loc":{"start":{"line":487,"column":24},"end":{"line":493,"column":5}},"line":487},"39":{"name":"(anonymous_39)","decl":{"start":{"line":500,"column":4},"end":{"line":500,"column":5}},"loc":{"start":{"line":500,"column":42},"end":{"line":512,"column":5}},"line":500},"40":{"name":"(anonymous_40)","decl":{"start":{"line":517,"column":4},"end":{"line":517,"column":5}},"loc":{"start":{"line":517,"column":23},"end":{"line":519,"column":5}},"line":517}},"branchMap":{"0":{"loc":{"start":{"line":158,"column":8},"end":{"line":158,"column":61}},"type":"if","locations":[{"start":{"line":158,"column":8},"end":{"line":158,"column":61}},{"start":{"line":158,"column":8},"end":{"line":158,"column":61}}],"line":158},"1":{"loc":{"start":{"line":162,"column":29},"end":{"line":162,"column":62}},"type":"binary-expr","locations":[{"start":{"line":162,"column":29},"end":{"line":162,"column":47}},{"start":{"line":162,"column":51},"end":{"line":162,"column":62}}],"line":162},"2":{"loc":{"start":{"line":163,"column":29},"end":{"line":163,"column":60}},"type":"binary-expr","locations":[{"start":{"line":163,"column":29},"end":{"line":163,"column":55}},{"start":{"line":163,"column":59},"end":{"line":163,"column":60}}],"line":163},"3":{"loc":{"start":{"line":165,"column":12},"end":{"line":165,"column":37}},"type":"if","locations":[{"start":{"line":165,"column":12},"end":{"line":165,"column":37}},{"start":{"line":165,"column":12},"end":{"line":165,"column":37}}],"line":165},"4":{"loc":{"start":{"line":168,"column":8},"end":{"line":169,"column":54}},"type":"if","locations":[{"start":{"line":168,"column":8},"end":{"line":169,"column":54}},{"start":{"line":168,"column":8},"end":{"line":169,"column":54}}],"line":168},"5":{"loc":{"start":{"line":169,"column":13},"end":{"line":169,"column":54}},"type":"if","locations":[{"start":{"line":169,"column":13},"end":{"line":169,"column":54}},{"start":{"line":169,"column":13},"end":{"line":169,"column":54}}],"line":169},"6":{"loc":{"start":{"line":171,"column":8},"end":{"line":173,"column":9}},"type":"if","locations":[{"start":{"line":171,"column":8},"end":{"line":173,"column":9}},{"start":{"line":171,"column":8},"end":{"line":173,"column":9}}],"line":171},"7":{"loc":{"start":{"line":194,"column":8},"end":{"line":198,"column":9}},"type":"if","locations":[{"start":{"line":194,"column":8},"end":{"line":198,"column":9}},{"start":{"line":194,"column":8},"end":{"line":198,"column":9}}],"line":194},"8":{"loc":{"start":{"line":199,"column":8},"end":{"line":199,"column":53}},"type":"if","locations":[{"start":{"line":199,"column":8},"end":{"line":199,"column":53}},{"start":{"line":199,"column":8},"end":{"line":199,"column":53}}],"line":199},"9":{"loc":{"start":{"line":208,"column":8},"end":{"line":208,"column":64}},"type":"if","locations":[{"start":{"line":208,"column":8},"end":{"line":208,"column":64}},{"start":{"line":208,"column":8},"end":{"line":208,"column":64}}],"line":208},"10":{"loc":{"start":{"line":220,"column":8},"end":{"line":223,"column":9}},"type":"if","locations":[{"start":{"line":220,"column":8},"end":{"line":223,"column":9}},{"start":{"line":220,"column":8},"end":{"line":223,"column":9}}],"line":220},"11":{"loc":{"start":{"line":249,"column":15},"end":{"line":249,"column":29}},"type":"default-arg","locations":[{"start":{"line":249,"column":25},"end":{"line":249,"column":29}}],"line":249},"12":{"loc":{"start":{"line":250,"column":8},"end":{"line":253,"column":9}},"type":"if","locations":[{"start":{"line":250,"column":8},"end":{"line":253,"column":9}},{"start":{"line":250,"column":8},"end":{"line":253,"column":9}}],"line":250},"13":{"loc":{"start":{"line":266,"column":17},"end":{"line":266,"column":31}},"type":"default-arg","locations":[{"start":{"line":266,"column":26},"end":{"line":266,"column":31}}],"line":266},"14":{"loc":{"start":{"line":266,"column":33},"end":{"line":266,"column":49}},"type":"default-arg","locations":[{"start":{"line":266,"column":48},"end":{"line":266,"column":49}}],"line":266},"15":{"loc":{"start":{"line":267,"column":8},"end":{"line":270,"column":9}},"type":"if","locations":[{"start":{"line":267,"column":8},"end":{"line":270,"column":9}},{"start":{"line":267,"column":8},"end":{"line":270,"column":9}}],"line":267},"16":{"loc":{"start":{"line":272,"column":8},"end":{"line":276,"column":9}},"type":"if","locations":[{"start":{"line":272,"column":8},"end":{"line":276,"column":9}},{"start":{"line":272,"column":8},"end":{"line":276,"column":9}}],"line":272},"17":{"loc":{"start":{"line":289,"column":8},"end":{"line":289,"column":42}},"type":"if","locations":[{"start":{"line":289,"column":8},"end":{"line":289,"column":42}},{"start":{"line":289,"column":8},"end":{"line":289,"column":42}}],"line":289},"18":{"loc":{"start":{"line":300,"column":8},"end":{"line":305,"column":9}},"type":"if","locations":[{"start":{"line":300,"column":8},"end":{"line":305,"column":9}},{"start":{"line":300,"column":8},"end":{"line":305,"column":9}}],"line":300},"19":{"loc":{"start":{"line":306,"column":8},"end":{"line":306,"column":58}},"type":"if","locations":[{"start":{"line":306,"column":8},"end":{"line":306,"column":58}},{"start":{"line":306,"column":8},"end":{"line":306,"column":58}}],"line":306},"20":{"loc":{"start":{"line":306,"column":12},"end":{"line":306,"column":44}},"type":"binary-expr","locations":[{"start":{"line":306,"column":12},"end":{"line":306,"column":25}},{"start":{"line":306,"column":29},"end":{"line":306,"column":44}}],"line":306},"21":{"loc":{"start":{"line":317,"column":8},"end":{"line":317,"column":58}},"type":"if","locations":[{"start":{"line":317,"column":8},"end":{"line":317,"column":58}},{"start":{"line":317,"column":8},"end":{"line":317,"column":58}}],"line":317},"22":{"loc":{"start":{"line":317,"column":12},"end":{"line":317,"column":44}},"type":"binary-expr","locations":[{"start":{"line":317,"column":12},"end":{"line":317,"column":25}},{"start":{"line":317,"column":29},"end":{"line":317,"column":44}}],"line":317},"23":{"loc":{"start":{"line":340,"column":8},"end":{"line":340,"column":83}},"type":"if","locations":[{"start":{"line":340,"column":8},"end":{"line":340,"column":83}},{"start":{"line":340,"column":8},"end":{"line":340,"column":83}}],"line":340},"24":{"loc":{"start":{"line":340,"column":12},"end":{"line":340,"column":44}},"type":"binary-expr","locations":[{"start":{"line":340,"column":12},"end":{"line":340,"column":25}},{"start":{"line":340,"column":29},"end":{"line":340,"column":44}}],"line":340},"25":{"loc":{"start":{"line":348,"column":12},"end":{"line":361,"column":13}},"type":"if","locations":[{"start":{"line":348,"column":12},"end":{"line":361,"column":13}},{"start":{"line":348,"column":12},"end":{"line":361,"column":13}}],"line":348},"26":{"loc":{"start":{"line":352,"column":16},"end":{"line":352,"column":57}},"type":"if","locations":[{"start":{"line":352,"column":16},"end":{"line":352,"column":57}},{"start":{"line":352,"column":16},"end":{"line":352,"column":57}}],"line":352},"27":{"loc":{"start":{"line":353,"column":16},"end":{"line":356,"column":17}},"type":"if","locations":[{"start":{"line":353,"column":16},"end":{"line":356,"column":17}},{"start":{"line":353,"column":16},"end":{"line":356,"column":17}}],"line":353},"28":{"loc":{"start":{"line":353,"column":20},"end":{"line":353,"column":75}},"type":"binary-expr","locations":[{"start":{"line":353,"column":20},"end":{"line":353,"column":42}},{"start":{"line":353,"column":46},"end":{"line":353,"column":75}}],"line":353},"29":{"loc":{"start":{"line":357,"column":16},"end":{"line":360,"column":17}},"type":"if","locations":[{"start":{"line":357,"column":16},"end":{"line":360,"column":17}},{"start":{"line":357,"column":16},"end":{"line":360,"column":17}}],"line":357},"30":{"loc":{"start":{"line":358,"column":20},"end":{"line":359,"column":30}},"type":"if","locations":[{"start":{"line":358,"column":20},"end":{"line":359,"column":30}},{"start":{"line":358,"column":20},"end":{"line":359,"column":30}}],"line":358},"31":{"loc":{"start":{"line":366,"column":8},"end":{"line":366,"column":47}},"type":"if","locations":[{"start":{"line":366,"column":8},"end":{"line":366,"column":47}},{"start":{"line":366,"column":8},"end":{"line":366,"column":47}}],"line":366},"32":{"loc":{"start":{"line":377,"column":8},"end":{"line":377,"column":33}},"type":"if","locations":[{"start":{"line":377,"column":8},"end":{"line":377,"column":33}},{"start":{"line":377,"column":8},"end":{"line":377,"column":33}}],"line":377},"33":{"loc":{"start":{"line":387,"column":8},"end":{"line":387,"column":34}},"type":"if","locations":[{"start":{"line":387,"column":8},"end":{"line":387,"column":34}},{"start":{"line":387,"column":8},"end":{"line":387,"column":34}}],"line":387},"34":{"loc":{"start":{"line":405,"column":8},"end":{"line":405,"column":35}},"type":"if","locations":[{"start":{"line":405,"column":8},"end":{"line":405,"column":35}},{"start":{"line":405,"column":8},"end":{"line":405,"column":35}}],"line":405},"35":{"loc":{"start":{"line":415,"column":16},"end":{"line":422,"column":17}},"type":"if","locations":[{"start":{"line":415,"column":16},"end":{"line":422,"column":17}},{"start":{"line":415,"column":16},"end":{"line":422,"column":17}}],"line":415},"36":{"loc":{"start":{"line":432,"column":12},"end":{"line":435,"column":13}},"type":"if","locations":[{"start":{"line":432,"column":12},"end":{"line":435,"column":13}},{"start":{"line":432,"column":12},"end":{"line":435,"column":13}}],"line":432},"37":{"loc":{"start":{"line":445,"column":8},"end":{"line":445,"column":40}},"type":"if","locations":[{"start":{"line":445,"column":8},"end":{"line":445,"column":40}},{"start":{"line":445,"column":8},"end":{"line":445,"column":40}}],"line":445},"38":{"loc":{"start":{"line":446,"column":8},"end":{"line":454,"column":9}},"type":"if","locations":[{"start":{"line":446,"column":8},"end":{"line":454,"column":9}},{"start":{"line":446,"column":8},"end":{"line":454,"column":9}}],"line":446},"39":{"loc":{"start":{"line":449,"column":30},"end":{"line":449,"column":95}},"type":"cond-expr","locations":[{"start":{"line":449,"column":47},"end":{"line":449,"column":82}},{"start":{"line":449,"column":85},"end":{"line":449,"column":95}}],"line":449},"40":{"loc":{"start":{"line":464,"column":12},"end":{"line":464,"column":44}},"type":"if","locations":[{"start":{"line":464,"column":12},"end":{"line":464,"column":44}},{"start":{"line":464,"column":12},"end":{"line":464,"column":44}}],"line":464},"41":{"loc":{"start":{"line":469,"column":12},"end":{"line":469,"column":44}},"type":"if","locations":[{"start":{"line":469,"column":12},"end":{"line":469,"column":44}},{"start":{"line":469,"column":12},"end":{"line":469,"column":44}}],"line":469},"42":{"loc":{"start":{"line":474,"column":12},"end":{"line":474,"column":44}},"type":"if","locations":[{"start":{"line":474,"column":12},"end":{"line":474,"column":44}},{"start":{"line":474,"column":12},"end":{"line":474,"column":44}}],"line":474},"43":{"loc":{"start":{"line":479,"column":12},"end":{"line":479,"column":44}},"type":"if","locations":[{"start":{"line":479,"column":12},"end":{"line":479,"column":44}},{"start":{"line":479,"column":12},"end":{"line":479,"column":44}}],"line":479},"44":{"loc":{"start":{"line":501,"column":8},"end":{"line":511,"column":9}},"type":"if","locations":[{"start":{"line":501,"column":8},"end":{"line":511,"column":9}},{"start":{"line":501,"column":8},"end":{"line":511,"column":9}}],"line":501},"45":{"loc":{"start":{"line":503,"column":15},"end":{"line":511,"column":9}},"type":"if","locations":[{"start":{"line":503,"column":15},"end":{"line":511,"column":9}},{"start":{"line":503,"column":15},"end":{"line":511,"column":9}}],"line":503},"46":{"loc":{"start":{"line":505,"column":15},"end":{"line":511,"column":9}},"type":"if","locations":[{"start":{"line":505,"column":15},"end":{"line":511,"column":9}},{"start":{"line":505,"column":15},"end":{"line":511,"column":9}}],"line":505},"47":{"loc":{"start":{"line":505,"column":19},"end":{"line":505,"column":72}},"type":"binary-expr","locations":[{"start":{"line":505,"column":19},"end":{"line":505,"column":47}},{"start":{"line":505,"column":51},"end":{"line":505,"column":72}}],"line":505}},"s":{"0":1,"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":1,"9":1,"10":1,"11":1,"12":1,"13":1,"14":1,"15":1,"16":1,"17":1,"18":1,"19":1,"20":1,"21":1,"22":1,"23":1,"24":1,"25":1,"26":1,"27":1,"28":1,"29":1,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":1,"38":1,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":1,"48":1,"49":1,"50":1,"51":1,"52":1,"53":0,"54":0,"55":1,"56":0,"57":1,"58":0,"59":1,"60":0,"61":1,"62":1,"63":1,"64":1,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0,"103":0,"104":0,"105":0,"106":0,"107":0,"108":0,"109":0,"110":0,"111":0,"112":0,"113":0,"114":0,"115":0,"116":0,"117":0,"118":0,"119":0,"120":0,"121":0,"122":0,"123":0,"124":0,"125":0,"126":0,"127":0,"128":0,"129":0,"130":0,"131":0,"132":0,"133":0,"134":0,"135":0,"136":0,"137":0,"138":0,"139":0,"140":0,"141":0,"142":0,"143":0,"144":0,"145":0,"146":0,"147":0,"148":0,"149":0,"150":0,"151":0,"152":0,"153":0,"154":0,"155":0,"156":0,"157":0,"158":0,"159":0,"160":0,"161":0,"162":0,"163":0,"164":0,"165":0,"166":0,"167":0,"168":0,"169":0,"170":0,"171":0,"172":0,"173":0,"174":0,"175":0,"176":0,"177":0,"178":0,"179":0,"180":1,"181":0,"182":0,"183":0,"184":0,"185":0,"186":0,"187":0,"188":0,"189":2,"190":2,"191":2,"192":0,"193":0,"194":0,"195":0,"196":2,"197":0,"198":0,"199":0,"200":0,"201":2,"202":0,"203":0,"204":0,"205":0,"206":2,"207":0,"208":0,"209":0,"210":2,"211":2,"212":2,"213":2,"214":2,"215":0,"216":0,"217":0,"218":0,"219":0,"220":0,"221":0,"222":0},"f":{"0":1,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":1,"9":0,"10":1,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":2,"34":0,"35":0,"36":0,"37":0,"38":2,"39":0,"40":0},"b":{"0":[1,0],"1":[1,0],"2":[1,0],"3":[0,0],"4":[0,1],"5":[0,1],"6":[0,1],"7":[0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0],"12":[0,0],"13":[0],"14":[0],"15":[0,0],"16":[0,0],"17":[0,0],"18":[0,0],"19":[0,0],"20":[0,0],"21":[0,0],"22":[0,0],"23":[0,0],"24":[0,0],"25":[0,0],"26":[0,0],"27":[0,0],"28":[0,0],"29":[0,0],"30":[0,0],"31":[0,0],"32":[0,0],"33":[0,0],"34":[0,0],"35":[0,0],"36":[0,0],"37":[0,0],"38":[0,0],"39":[0,0],"40":[0,0],"41":[0,0],"42":[0,0],"43":[0,0],"44":[0,0],"45":[0,0],"46":[0,0],"47":[0,0]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"28dc1b9c2c3d5d9a58c624760e8adceeaba3d348"} -,"/home/runner/work/react-native-tcp-socket/react-native-tcp-socket/src/index.js": {"path":"/home/runner/work/react-native-tcp-socket/react-native-tcp-socket/src/index.js","statementMap":{"0":{"start":{"line":11,"column":4},"end":{"line":11,"column":42}},"1":{"start":{"line":20,"column":22},"end":{"line":20,"column":34}},"2":{"start":{"line":21,"column":4},"end":{"line":21,"column":48}},"3":{"start":{"line":25,"column":14},"end":{"line":25,"column":68}},"4":{"start":{"line":26,"column":14},"end":{"line":26,"column":40}},"5":{"start":{"line":27,"column":16},"end":{"line":27,"column":40}},"6":{"start":{"line":30,"column":14},"end":{"line":30,"column":36}},"7":{"start":{"line":31,"column":16},"end":{"line":42,"column":1}},"8":{"start":{"line":50,"column":4},"end":{"line":50,"column":31}},"9":{"start":{"line":59,"column":4},"end":{"line":59,"column":31}},"10":{"start":{"line":68,"column":4},"end":{"line":69,"column":37}},"11":{"start":{"line":68,"column":23},"end":{"line":68,"column":32}},"12":{"start":{"line":69,"column":9},"end":{"line":69,"column":37}},"13":{"start":{"line":69,"column":28},"end":{"line":69,"column":37}},"14":{"start":{"line":70,"column":4},"end":{"line":70,"column":13}},"15":{"start":{"line":76,"column":0},"end":{"line":76,"column":90}}},"fnMap":{"0":{"name":"createServer","decl":{"start":{"line":10,"column":9},"end":{"line":10,"column":21}},"loc":{"start":{"line":10,"column":42},"end":{"line":12,"column":1}},"line":10},"1":{"name":"createConnection","decl":{"start":{"line":19,"column":9},"end":{"line":19,"column":25}},"loc":{"start":{"line":19,"column":45},"end":{"line":22,"column":1}},"line":19},"2":{"name":"isIPv4","decl":{"start":{"line":49,"column":9},"end":{"line":49,"column":15}},"loc":{"start":{"line":49,"column":23},"end":{"line":51,"column":1}},"line":49},"3":{"name":"isIPv6","decl":{"start":{"line":58,"column":9},"end":{"line":58,"column":15}},"loc":{"start":{"line":58,"column":23},"end":{"line":60,"column":1}},"line":58},"4":{"name":"isIP","decl":{"start":{"line":67,"column":9},"end":{"line":67,"column":13}},"loc":{"start":{"line":67,"column":21},"end":{"line":71,"column":1}},"line":67}},"branchMap":{"0":{"loc":{"start":{"line":68,"column":4},"end":{"line":69,"column":37}},"type":"if","locations":[{"start":{"line":68,"column":4},"end":{"line":69,"column":37}},{"start":{"line":68,"column":4},"end":{"line":69,"column":37}}],"line":68},"1":{"loc":{"start":{"line":69,"column":9},"end":{"line":69,"column":37}},"type":"if","locations":[{"start":{"line":69,"column":9},"end":{"line":69,"column":37}},{"start":{"line":69,"column":9},"end":{"line":69,"column":37}}],"line":69}},"s":{"0":1,"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":5,"9":4,"10":3,"11":1,"12":2,"13":1,"14":1,"15":1},"f":{"0":1,"1":1,"2":5,"3":4,"4":3},"b":{"0":[1,2],"1":[1,1]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"facfad44d735682413c3ed1b860d7949b0bb48d9"} -} diff --git a/examples/tcpsockets/App.js b/examples/tcpsockets/App.js index 3314cf4..1f5c282 100644 --- a/examples/tcpsockets/App.js +++ b/examples/tcpsockets/App.js @@ -7,7 +7,7 @@ import React from 'react'; import { ScrollView, StyleSheet, Text, View } from 'react-native'; -import { init, server, client } from './examples/echo'; +import { init, server, client } from './examples/echo-ssl'; class App extends React.Component { /** @@ -32,6 +32,22 @@ class App extends React.Component { } componentDidMount() { + server.on('secureConnection', (socket) => { + this.updateChatter('SSL Client connected to server on ' + JSON.stringify(socket.address())); + + socket.on('data', (data) => { + this.updateChatter('SSL Server client received: ' + (data.length < 500 ? data : data.length + ' bytes')); + }); + + socket.on('error', (error) => { + this.updateChatter('SSL Server client error ' + error); + }); + + socket.on('close', (error) => { + this.updateChatter('SSL Server client closed ' + (error ? error : '')); + }); + }); + server.on('connection', (socket) => { this.updateChatter('Client connected to server on ' + JSON.stringify(socket.address())); @@ -48,8 +64,11 @@ class App extends React.Component { }); }); + client.on('secureConnect', () => { + console.log('Opened SSL client on ' + JSON.stringify(client.address())); + }); + server.on('error', (error) => { - this.updateChatter(error); this.updateChatter('Server error ' + error); }); diff --git a/examples/tcpsockets/declaration.d.ts b/examples/tcpsockets/declaration.d.ts index d3f5a4c..7e5388f 100644 --- a/examples/tcpsockets/declaration.d.ts +++ b/examples/tcpsockets/declaration.d.ts @@ -2,3 +2,11 @@ declare module 'net' { import TcpSockets from 'react-native-tcp-socket'; export = TcpSockets; } + +declare module 'tls' { + import TcpSockets from 'react-native-tcp-socket'; + export const Server = TcpSockets.TLSServer; + export const TLSSocket = TcpSockets.TLSSocket; + export const connect = TcpSockets.connectTLS; + export const createServer = TcpSockets.createTLSServer; +} diff --git a/examples/tcpsockets/examples/README.md b/examples/tcpsockets/examples/README.md index 0b6e4ca..815f497 100644 --- a/examples/tcpsockets/examples/README.md +++ b/examples/tcpsockets/examples/README.md @@ -9,6 +9,10 @@ Let us know if you find any issues. If you want to contribute or add a new examp ## Table of Contents - [Echo server](#echo-server) - [Pause/Resume - Backpressure](#pauseresume---backpressure) +- [Long data](#long-data) +- [Client SSL](#client-ssl) +- [Server SSL](#server-ssl) +- [Echo SSL](#echo-ssl) ### [Echo server](echo.js) @@ -19,3 +23,19 @@ An echo server just reflects a message received from a client to the same client There is a general problem that occurs during data handling called **backpressure** and describes a buildup of data behind a buffer during data transfer. When the receiving end of the transfer has complex operations, or is slower for whatever reason, there is a tendency for data from the incoming source to accumulate, like a clog. To solve this problem, there must be a delegation system in place to ensure a smooth flow of data from one source to another and is often times referred to as flow control. In Node.js, streams have been the adopted solution and `react-native-tcp-socket` mimics the same functionality. If a call to `socket.write(chunk)` returns `false`, the `'drain'` event will be emitted when it is appropriate to resume writing data to the stream. + +### [Long data](long-data.js) + +A long data example that shows how large amounts of data are handled by listening to the `'drain'` event. + +### [Client SSL](client-ssl.js) + +An SSL client. + +### [Server SSL](server-ssl.js) + +An SSL server. + +### [Echo SSL](echo-ssl.js) + +Same as the [echo example](#echo-server), but with SSL. diff --git a/examples/tcpsockets/examples/client-ssl.js b/examples/tcpsockets/examples/client-ssl.js new file mode 100644 index 0000000..8bb10c6 --- /dev/null +++ b/examples/tcpsockets/examples/client-ssl.js @@ -0,0 +1,47 @@ +const tls = require('tls'); +const net = require('net'); +// @ts-ignore +const fs = require('fs'); + +// @ts-ignore +const runningNode = typeof process !== 'undefined' && process.release?.name === 'node'; +if (!runningNode) { + // @ts-ignore + tls.Server = tls.TLSServer; + fs.readFileSync = () => {}; +} + +const ca = !runningNode + ? // @ts-ignore + require('../tls/server-cert.pem') + : fs.readFileSync('tls/server-cert.pem'); + +const server = new tls.Server(); +const clientSocket = new net.Socket(); +const client = new tls.TLSSocket(clientSocket, { ca }); + +function init() { + const port = 9999; + + clientSocket.on('error', (error) => { + console.log('Client extra error', error); + }); + + clientSocket.on('close', (hadError) => { + console.log('Client extra close ' + hadError); + }); + + clientSocket.connect( + { + port: port, + host: '127.0.0.1', + reuseAddress: true, + }, + () => { + console.log('Connected client'); + client.write('GET / HTTP/1.1\r\nHost:www.google.com\r\n\r\n'); + } + ); +} + +module.exports = { init, server, client }; diff --git a/examples/tcpsockets/examples/echo-ssl.js b/examples/tcpsockets/examples/echo-ssl.js new file mode 100644 index 0000000..b11a871 --- /dev/null +++ b/examples/tcpsockets/examples/echo-ssl.js @@ -0,0 +1,81 @@ +const tls = require('tls'); +const net = require('net'); +// @ts-ignore +const fs = require('fs'); + +// @ts-ignore +const runningNode = typeof process !== 'undefined' && process.release?.name === 'node'; +if (!runningNode) { + // @ts-ignore + tls.Server = tls.TLSServer; + fs.readFileSync = () => {}; +} +const ca = !runningNode + ? // @ts-ignore + require('../tls/server-cert.pem') + : fs.readFileSync('tls/server-cert.pem'); +const serverKey = !runningNode + ? // @ts-ignore + require('../tls/server-key.pem') + : fs.readFileSync('tls/server-key.pem'); +// @ts-ignore +const keystore = !runningNode ? require('../tls/server-keystore.p12') : undefined; + +const server = new tls.Server(); +const clientSocket = new net.Socket(); +const client = new tls.TLSSocket(clientSocket, { ca }); + +function init() { + server.setSecureContext({ + // @ts-ignore + key: serverKey, + cert: ca, + keystore: keystore, + }); + + server.on('secureConnection', (socket) => { + socket.on('data', () => { + socket.write('Echo server\r\n'); + }); + }); + + client.on('data', () => { + client.destroy(); // kill client after server's response + }); + + server.listen({ port: 0, host: '127.0.0.1', reuseAddress: true }, () => { + const port = server.address()?.port; + if (!port) throw new Error('Server port not found'); + + clientSocket.on('data', (data) => { + console.log('AUX socket data ' + data); + }); + + clientSocket + .on('error', (error) => { + console.log('AUX socket error ' + error); + }) + .on('close', (error) => { + console.log('AUX socket closed ' + (error ? error : '')); + }) + .on('connect', () => { + console.log('AUX socket connected'); + }); + + clientSocket.connect( + { + port: port, + host: '127.0.0.1', + localAddress: '127.0.0.1', + reuseAddress: true, + // localPort: 20000, + // interface: "wifi", + }, + () => { + client.write('Hello, server! Love, Client.'); + } + ); + }); +} + +module.exports = { init, server, client }; diff --git a/examples/tcpsockets/examples/echo.js b/examples/tcpsockets/examples/echo.js index 09c8671..1851b10 100644 --- a/examples/tcpsockets/examples/echo.js +++ b/examples/tcpsockets/examples/echo.js @@ -5,7 +5,9 @@ const client = new net.Socket(); function init() { server.on('connection', (socket) => { - socket.write('Echo server\r\n'); + socket.on('data', () => { + socket.write('Echo server\r\n'); + }) }); server.listen({ port: 0, host: '127.0.0.1', reuseAddress: true }, () => { @@ -18,8 +20,7 @@ function init() { localAddress: '127.0.0.1', reuseAddress: true, // localPort: 20000, - // interface: "wifi", - // tls: true + // interface: "wifi" }, () => { client.write('Hello, server! Love, Client.'); diff --git a/examples/tcpsockets/examples/main.js b/examples/tcpsockets/examples/main.js index 2ecb95c..a289248 100644 --- a/examples/tcpsockets/examples/main.js +++ b/examples/tcpsockets/examples/main.js @@ -1,5 +1,21 @@ // Execute this file using NodeJS -const { init, server, client } = require('./echo'); +const { init, server, client } = require('./client-ssl'); + +server.on('secureConnection', (socket) => { + console.log('SSL Client connected to server on ' + JSON.stringify(socket.address())); + + socket.on('data', (data) => { + console.log('SSL Server client received: ' + (data.length < 500 ? data : data.length + ' bytes')); + }); + + socket.on('error', (error) => { + console.log('SSL Server client error ' + error); + }); + + socket.on('close', (error) => { + console.log('SSL Server client closed ' + (error ? error : '')); + }); +}); server.on('connection', (socket) => { console.log('Client connected to server on ' + JSON.stringify(socket.address())); @@ -25,6 +41,10 @@ server.on('close', () => { console.log('Server closed'); }); +client.on('secureConnect', () => { + console.log('Opened SSL client on ' + JSON.stringify(client.address())); +}); + client.on('connect', () => { console.log('Opened client on ' + JSON.stringify(client.address())); }); diff --git a/examples/tcpsockets/examples/server-ssl.js b/examples/tcpsockets/examples/server-ssl.js new file mode 100644 index 0000000..3d7c119 --- /dev/null +++ b/examples/tcpsockets/examples/server-ssl.js @@ -0,0 +1,46 @@ +const tls = require('tls'); +const net = require('net'); +// @ts-ignore +const fs = require('fs'); + +// @ts-ignore +const runningNode = typeof process !== 'undefined' && process.release?.name === 'node'; +if (!runningNode) { + // @ts-ignore + tls.Server = tls.TLSServer; + fs.readFileSync = () => {}; +} + +const ca = !runningNode + ? // @ts-ignore + require('../tls/server-cert.pem') + : fs.readFileSync('tls/server-cert.pem'); +const serverKey = !runningNode + ? // @ts-ignore + require('../tls/server-key.pem') + : fs.readFileSync('tls/server-key.pem'); +// @ts-ignore +const keystore = !runningNode ? require('../tls/server-keystore.p12') : undefined; + +const server = new tls.Server(); +const clientSocket = new net.Socket(); +const client = new tls.TLSSocket(clientSocket); + +function init() { + server.setSecureContext({ + // @ts-ignore + key: serverKey, + cert: ca, + keystore: keystore, + }); + + server.on('secureConnection', (socket) => { + socket.on('data', () => { + socket.write('Echo server\r\n'); + }); + }); + + server.listen({ port: 9999, host: '127.0.0.1', reuseAddress: true }); +} + +module.exports = { init, server, client }; diff --git a/examples/tcpsockets/metro.config.js b/examples/tcpsockets/metro.config.js index dfbdef1..26343c4 100644 --- a/examples/tcpsockets/metro.config.js +++ b/examples/tcpsockets/metro.config.js @@ -22,7 +22,7 @@ module.exports = { projectRoot: __dirname, watchFolders: [root], resolver: { - assetExts: [...defaultConfig.resolver.assetExts, 'pem'], + assetExts: [...defaultConfig.resolver.assetExts, 'pem', 'p12'], blacklistRE: blacklist([ new RegExp(`^${escape(path.join(root, 'node_modules'))}\\/.*$`), ]), diff --git a/examples/tcpsockets/package.json b/examples/tcpsockets/package.json index 07045c0..93f249a 100644 --- a/examples/tcpsockets/package.json +++ b/examples/tcpsockets/package.json @@ -13,8 +13,8 @@ "checkjs": "tsc" }, "dependencies": { - "react": "16.13.1", - "react-native": "0.63.2", + "react": "17.0.1", + "react-native": "0.64.0", "react-native-tcp-socket": "link:../../" }, "devDependencies": { @@ -33,6 +33,8 @@ "preset": "react-native" }, "react-native": { - "net": "react-native-tcp-socket" + "net": "react-native-tcp-socket", + "tls": "react-native-tcp-socket", + "fs": "react-native-tcp-socket" } } diff --git a/examples/tcpsockets/tls/server-cert.pem b/examples/tcpsockets/tls/server-cert.pem new file mode 100644 index 0000000..d227aad --- /dev/null +++ b/examples/tcpsockets/tls/server-cert.pem @@ -0,0 +1,30 @@ +-----BEGIN CERTIFICATE----- +MIIFETCCAvkCFDqKClCQ3jIYgsbDS62ylBenT3nCMA0GCSqGSIb3DQEBCwUAMEUx +CzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJbnRl +cm5ldCBXaWRnaXRzIFB0eSBMdGQwHhcNMjIwODA5MTQ0MzM1WhcNMjIwOTA4MTQ0 +MzM1WjBFMQswCQYDVQQGEwJBVTETMBEGA1UECAwKU29tZS1TdGF0ZTEhMB8GA1UE +CgwYSW50ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIICIjANBgkqhkiG9w0BAQEFAAOC +Ag8AMIICCgKCAgEAx+Q8463wz1zSoBweU1/1Ts8Qz/Z1kKS5kbshA6F6tiInMdw9 +KShpCif8LDA70Ewa4Y/JfZ46q6F8QMmqzfBvt/+JJB6V5eNdKOyaPEvOeHr/FazY +yAh0E3PMZbzrVWzDxnRczUepP6FGbSZA9JYYir6nqQsQOoeXmydeR97SCJVbtwVi +JuKy2OhlawweC+t7Q27S/wZAkNBPJfg4LcOsB+4hVlLE4c7Dp0tbETj9Jv1zMh8Z +IP3ey+h+A3DjfkJyfsiDaZaqGqs29oXNXzApPwYSglcCyt2lyADZdlol182J9uB6 +3eCPWCHP7IAsOzzT28ULgVCvxmZL+Gbu6f1NoUFyGhxpqKEq5lf8qw5/pw2IqLfo +0RU+dDGIAoF4GgTX2i1ZSPZhedz/OGB86GdEWastGnO977SUnTIDYZkOu18xB0g5 +jKxOth0XyZE8QEAX0vJXDMogC+3vNl9fpqNIKjqdbhmxtAN5wExZ62l90rubO9ae +9Fe5HZFJfJ2acytGnfXrXElBCFG0F6P5xYdVf9e0gznbU9CGxgvDO70XQaS4T7Cu +JtzcLf8vtiUI2RuG9WPTJUlNIKPb9HfN9QtOd47kwLvkXdavqFGdedP+53IcanPJ +7Mnw+pnMhqkUkg9i9X2sGwB3vRW3Nio4coB+poY+V04e378vclQvELiN4EcCAwEA +ATANBgkqhkiG9w0BAQsFAAOCAgEAhq0fKDlKvFcuGDitNc+tCjGQO6a4CT7FYqYN +PZUGG8lhMDFv+YM5n3rQZpxHxhomKA4Mw3VPc/IFMGzS+XAY1a/aSIKbMqAi2pkf +JMjBJHIw76XoOA7NUSH/VLyoyLlkYfaH58QskEkNZvu9KcLgPMY8z5KtnrO0NhmP +M/+ILDzEQH4ulQcF7U01hg9KTivSdXsPnfAg+qg0Sy/B3NimUhX0WZ9u+CjT1cST +lFcKroo/ragbA0jcoyiWnj+WZKq0b10P9KZcx7RQzmKrJPDB+7oAqPtWMePQaaDv +BLc73VJPTAjO8pLVU+5jnt6bDvLUUhO2VW3zmJdHALBV3sF+6lFuNMt5utEhFxtD +40wFza7G2vws4Og+B/phI4l0u3cAiqvyALNr6S2Qhin5ZwdLDeOEzEbzwI9sy1vD +3pgjQ7WIA3Yu/KwJyJVfcBgQTK1xKvKDMpHTRltysrg0/c7LbRNF1MV3MhPHhzni +io8uUKFIIFzq4zhzE32PKjI5aJF5lN7TtZpdd2ajWBoYNQrOZxSJOVR+dMJyvLCU +aRfocRCeKiBCK67HuIEzSdfESVwCFm4nlS0lAjRcr4KZWzB9I+l9y56c1j2ymX6q +HwYhKo0phcgY9Hs2wtMYlnLCBV1CkNJWNnxYl2lhFBMP3sW79qFzUsqgHiaJfEIU +IeAT3d0= +-----END CERTIFICATE----- diff --git a/examples/tcpsockets/tls/server-csr.pem b/examples/tcpsockets/tls/server-csr.pem new file mode 100644 index 0000000..c845132 --- /dev/null +++ b/examples/tcpsockets/tls/server-csr.pem @@ -0,0 +1,27 @@ +-----BEGIN CERTIFICATE REQUEST----- +MIIEijCCAnICAQAwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUx +ITAfBgNVBAoMGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDCCAiIwDQYJKoZIhvcN +AQEBBQADggIPADCCAgoCggIBAMfkPOOt8M9c0qAcHlNf9U7PEM/2dZCkuZG7IQOh +erYiJzHcPSkoaQon/CwwO9BMGuGPyX2eOquhfEDJqs3wb7f/iSQeleXjXSjsmjxL +znh6/xWs2MgIdBNzzGW861Vsw8Z0XM1HqT+hRm0mQPSWGIq+p6kLEDqHl5snXkfe +0giVW7cFYibistjoZWsMHgvre0Nu0v8GQJDQTyX4OC3DrAfuIVZSxOHOw6dLWxE4 +/Sb9czIfGSD93svofgNw435Ccn7Ig2mWqhqrNvaFzV8wKT8GEoJXAsrdpcgA2XZa +JdfNifbget3gj1ghz+yALDs809vFC4FQr8ZmS/hm7un9TaFBchocaaihKuZX/KsO +f6cNiKi36NEVPnQxiAKBeBoE19otWUj2YXnc/zhgfOhnRFmrLRpzve+0lJ0yA2GZ +DrtfMQdIOYysTrYdF8mRPEBAF9LyVwzKIAvt7zZfX6ajSCo6nW4ZsbQDecBMWetp +fdK7mzvWnvRXuR2RSXydmnMrRp3161xJQQhRtBej+cWHVX/XtIM521PQhsYLwzu9 +F0GkuE+wribc3C3/L7YlCNkbhvVj0yVJTSCj2/R3zfULTneO5MC75F3Wr6hRnXnT +/udyHGpzyezJ8PqZzIapFJIPYvV9rBsAd70VtzYqOHKAfqaGPldOHt+/L3JULxC4 +jeBHAgMBAAGgADANBgkqhkiG9w0BAQsFAAOCAgEANS2TUesAY9UQmBG47A0wrNO0 +x5Tp9EzOaDRNBAx7wwEbby8pMr9sBfjkiPwzND6Rwcc2P3sYczz4y86sBkg8I55I +oGmaUA6PGxxo/WdfUnpjaVM4WAnBWzm1ivaUFAQ1d/bq6Ii2BkAVvWXCRl6ZGAsa +IFEtv3ho9fLQmM+YO3Z4o5vdNqzBeajBzedxN4ZF+p5rzwu0VhGnu777XSGO1OkH +9QeJCtiNXg5Yokm/JOC1M/JUXEEelujjuynK6dybtBHcQw1NPW9+00YBvngHRvpX +Wg4XPV6LLJPLf4iaSDy21bpXJfJw7/287gEULpQWM9nIDQ/GJkCQXsW/mI+LwaEH +zm544wVtLqCBwo637S/q2Ng/Ve6P0d72pSRxozVdgQxPvtI8FXFOzC3zcmxl88mY +/oEaXO87NcX/Q9UZnJ1qjTve0vnVqhcobG3KQX3TOpMLlHNWLSdC3AKj/apqh8wi +fmo1QLmSLGAVGTy99wBTwvEeHQ1uUdBvEb88SIhNwB5GiJIIhgC50MioKmnRJRh/ +OkFySwJOF6u9/TVvDjIUVdz5RvGcMM9KsDGEkErPpFYmVTQbUP0rVUqygVCbFNQG +oXShSQdGO55WYeMHYt50JWStnMkjFu5kEbgwpwKCunjmnQpNmwq4qfaguqieYIGb +dHsEsREyoZ8PhKn20hA= +-----END CERTIFICATE REQUEST----- diff --git a/examples/tcpsockets/tls/server-key.pem b/examples/tcpsockets/tls/server-key.pem new file mode 100644 index 0000000..fe53170 --- /dev/null +++ b/examples/tcpsockets/tls/server-key.pem @@ -0,0 +1,51 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIJKQIBAAKCAgEAx+Q8463wz1zSoBweU1/1Ts8Qz/Z1kKS5kbshA6F6tiInMdw9 +KShpCif8LDA70Ewa4Y/JfZ46q6F8QMmqzfBvt/+JJB6V5eNdKOyaPEvOeHr/FazY +yAh0E3PMZbzrVWzDxnRczUepP6FGbSZA9JYYir6nqQsQOoeXmydeR97SCJVbtwVi +JuKy2OhlawweC+t7Q27S/wZAkNBPJfg4LcOsB+4hVlLE4c7Dp0tbETj9Jv1zMh8Z +IP3ey+h+A3DjfkJyfsiDaZaqGqs29oXNXzApPwYSglcCyt2lyADZdlol182J9uB6 +3eCPWCHP7IAsOzzT28ULgVCvxmZL+Gbu6f1NoUFyGhxpqKEq5lf8qw5/pw2IqLfo +0RU+dDGIAoF4GgTX2i1ZSPZhedz/OGB86GdEWastGnO977SUnTIDYZkOu18xB0g5 +jKxOth0XyZE8QEAX0vJXDMogC+3vNl9fpqNIKjqdbhmxtAN5wExZ62l90rubO9ae +9Fe5HZFJfJ2acytGnfXrXElBCFG0F6P5xYdVf9e0gznbU9CGxgvDO70XQaS4T7Cu +JtzcLf8vtiUI2RuG9WPTJUlNIKPb9HfN9QtOd47kwLvkXdavqFGdedP+53IcanPJ +7Mnw+pnMhqkUkg9i9X2sGwB3vRW3Nio4coB+poY+V04e378vclQvELiN4EcCAwEA +AQKCAgB/iomvXFTCep+JuWdAG4IR/tzjVIY+/FvLOHMgNfBuNex8S+JaWIZtDIZC +S6Rei7C7K1uM42DcEfWOAR8St88Qv+NpQHq0bBYM/qqKvnPHO/N2iQro1zv5DXHl +mF0v7G4eOjDcalT7XJPrIPVhGkQegvfHTF/WeJ2rSbtGcE3jXClg5fZyiUNEU0Qi +wWCKin3j0NqgDgU0YTWfLHnr+WXSyYZL5hPpYFxGajZ5Dru4HQ9bc6w8+L8nq/h7 +iZQeA5e6fYYb4R44VfaD5WvcyIYIyH8W2x3VAwe8TY5zjaGHyIW3GBRNbfMIcMqS +RFX0liM3nspwgGMnXC4tGMBoXE8i7EPGBBB+lN2DL7VaGnH96iFXrpp+tAStZp4i +nL8hd30GOKFGLt0u0WO/juXIp2UZBgT4e+6G8Rs2B5u4zv9avC9ELdocS3KuSK9F +4xkkTlfeTxcLB6SY49JF5I2rDpogHy6VSvGVpRhFqJ6QhMPTbmu7RuSjlAg+N/hf +/+z+/vOSiQ7to3lCWCOWdzCO2JqFG2PEWy2DsaXSZA09sEJRCd1XD61RwOIYvihu +/+2i1LuCecpSioEBofB7clsTFyZiwKWx2rzQho3T9gWzVPJ9EptqBDHzMPvYj3zI +ftEl0FlvriOgD7oMAgJHONoAUg8ruZm4zjwbrXUkJ8nxnZcogQKCAQEA5T7Kymfr +FNFV8XrioOim/OPJdZmgRKfRLtA0S8ANbRXesMouzzYq/z2nitDV6M9w/TuufNo2 +e4Y05ovZgEUZOIQKC1jSzqxVzN5nCspAC4zhJFLubqd44ASj0HAYN4uYBz0KHSfM +sEgnLloZE+mcWspzLNnR+o+yY84Vt20R5TUYBH8IyhGnUBNEC4X9dpsDDHEy6trX +IRgBpI7xSoJX4fFQ8H9/uZjSUMcMVnZ/hztqGuMsFN1u5zrqk48xBK8yg3fN8sCZ +9yWfTjP9rmqS79uUuM06ozoNCbsLngeRl3GYoIul1sRoJ3l7ai9AcXDVZlLKSM4M +6xGmpAlTrdctKQKCAQEA3zhwO8fVg47ZoyL0ET5/YOvHaGZS9eNGuAHZs6B0Fqo+ +KGumhMqkiOnFBwH6zn98OfqjcwCBDJKNG5svFwYCwo460aE9SNmcb5WEsjx5IZy+ +VjxhK1RUHfYSS9Dyy+UIkZ18Xg7F7l0rmbAhQ5P3YXUW6VePCeDe6GKFp44EY+Eg +F7a6uXlMO1XNmndean500tlUhuvsgPHaPDSGaPt2P61f8DOKsYQk4APKB/4hVvyZ +TwezVbf1TmtHSmtNDGRv9DU/L7RfZt8K/29OCzHG74RL0KjNj2IXXkaFsq/rDoBG +oY0ZNqqXUWFHZDKSz7sC4Ut7JQW7HUg/lc9JUDTf7wKCAQEAhhDl2d9SPNd70oBS +P1YwKl8wt0TD1MLr89uxaceEUpJirLNhEq+UD7dH30fogYGni4E2ty+Kg0zmbRnG +dlxytnmJwj8M8e8ZMnmyez3ynI6kMHELncz1RNWR09lqYDmUDE+nNYvMCh/4QgRQ +/DM3zGTvXIB6a3VUF0gzrRTtTUVyqVZ9lmcimRLbTX3r0EwxSTp+U5juDR2UAF/U +PwXhTXKqKiv2T11PSgxOa9ZbGIQntle6tO0W6cWr3+Xy/dFT0kzjNZ9rq3zmIH8J +UdJj4kBhRn5HV6QgcdtgnOfCPnYhk2p37xTn8IX8JgpCPtWFB5VNVayjI2osMWx+ +8oCPmQKCAQBehv74QdrIOHEvpXin6Mh2WcJ7EoHlQNbMy3POno8qnfNumI/OwiXF +GQHnws3cLp6DywD2jWsY0OLSovfhDxmSHDsKVPan6AdYNYAZHoTJWCA+UplviOmK +Oo9q7dQzxgzH5WIqTqVBGNGC5tRfUsS6z6PhMsQPEdwzmq0w1HJFfatif245ZwWC +RwaneA9Sl7SPKZui+zuPK1wYjMGyqXJc6uWqyZjdLbGT7+bZVaP2u0eM8RzfmuRV +zhZFjIT3T30ddIMKh56y6Jc2roLlOLIe8e5NMX7DTm3I7aJmlhq7bFT8ysy3mqwz +uTdLViNXtsE0eQtwFSo070iF/17ziUCfAoIBAQC1lPj44j4m4EPtph7JWRPG48TG +B6EVBz20P53P3Q8TvcU8vQeLQK2d6EoaVSZ6QLD06Mw2d4joTWI/cVL00c5UbI+O +A2J3fciIp15wUytpI8BMpHsZhIDyQU7Z5Zyos2WlDakuE8MkhrTKF1GVxorxL9/w +M6oLKXyT5vX3ojx1CZIZagbyJwHBqtdcOWf9cTohCtN7AInCaOhMK4AP8tHU0NUM +yJ0fRJwBeywkc1mg0rQQ/s24S6LWpNcXYK0iGIQ7/hNNYPkVtRo/B9I5s8aPs2r7 +/usu4AtGthulW6UtmGpK6+y3ijmoaTfz3Gkjn/spH1mcUw00Q8XQUmqR73uw +-----END RSA PRIVATE KEY----- diff --git a/examples/tcpsockets/tls/server-keystore.p12 b/examples/tcpsockets/tls/server-keystore.p12 new file mode 100644 index 0000000..e7c498d Binary files /dev/null and b/examples/tcpsockets/tls/server-keystore.p12 differ diff --git a/examples/tcpsockets/yarn.lock b/examples/tcpsockets/yarn.lock index ffd7d8f..c045ecc 100644 --- a/examples/tcpsockets/yarn.lock +++ b/examples/tcpsockets/yarn.lock @@ -2,6 +2,14 @@ # yarn lockfile v1 +"@ampproject/remapping@^2.1.0": + version "2.2.0" + resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.2.0.tgz#56c133824780de3174aed5ab6834f3026790154d" + integrity sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w== + dependencies: + "@jridgewell/gen-mapping" "^0.1.0" + "@jridgewell/trace-mapping" "^0.3.9" + "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.10.4.tgz#168da1a36e90da68ae8d49c0f1b48c7c6249213a" @@ -9,6 +17,18 @@ dependencies: "@babel/highlight" "^7.10.4" +"@babel/code-frame@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.18.6.tgz#3b25d38c89600baa2dcc219edfa88a74eb2c427a" + integrity sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q== + dependencies: + "@babel/highlight" "^7.18.6" + +"@babel/compat-data@^7.18.8": + version "7.18.8" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.18.8.tgz#2483f565faca607b8535590e84e7de323f27764d" + integrity sha512-HSmX4WZPPK3FUxYp7g2T6EyO8j96HlZJlxmKPSh6KAcqwyDrfx7hKjXpAW/0FhFfTJsR0Yt4lAjLI2coMptIHQ== + "@babel/core@^7.0.0", "@babel/core@^7.1.0", "@babel/core@^7.7.5", "@babel/core@^7.8.4": version "7.11.4" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.11.4.tgz#4301dfdfafa01eeb97f1896c5501a3f0655d4229" @@ -31,6 +51,27 @@ semver "^5.4.1" source-map "^0.5.0" +"@babel/core@^7.1.6": + version "7.18.10" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.18.10.tgz#39ad504991d77f1f3da91be0b8b949a5bc466fb8" + integrity sha512-JQM6k6ENcBFKVtWvLavlvi/mPcpYZ3+R+2EySDEMSMbp7Mn4FexlbbJVrx2R7Ijhr01T8gyqrOaABWIOgxeUyw== + dependencies: + "@ampproject/remapping" "^2.1.0" + "@babel/code-frame" "^7.18.6" + "@babel/generator" "^7.18.10" + "@babel/helper-compilation-targets" "^7.18.9" + "@babel/helper-module-transforms" "^7.18.9" + "@babel/helpers" "^7.18.9" + "@babel/parser" "^7.18.10" + "@babel/template" "^7.18.10" + "@babel/traverse" "^7.18.10" + "@babel/types" "^7.18.10" + convert-source-map "^1.7.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.2.1" + semver "^6.3.0" + "@babel/generator@^7.11.0", "@babel/generator@^7.11.4", "@babel/generator@^7.5.0": version "7.11.4" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.11.4.tgz#1ec7eec00defba5d6f83e50e3ee72ae2fee482be" @@ -40,6 +81,15 @@ jsesc "^2.5.1" source-map "^0.5.0" +"@babel/generator@^7.18.10": + version "7.18.12" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.18.12.tgz#fa58daa303757bd6f5e4bbca91b342040463d9f4" + integrity sha512-dfQ8ebCN98SvyL7IxNMCUtZQSq5R7kxgN+r8qYTGDmmSion1hX2C0zq2yo1bsCDhXixokv1SAWTZUMYbO/V5zg== + dependencies: + "@babel/types" "^7.18.10" + "@jridgewell/gen-mapping" "^0.3.2" + jsesc "^2.5.1" + "@babel/helper-annotate-as-pure@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.10.4.tgz#5bf0d495a3f757ac3bda48b5bf3b3ba309c72ba3" @@ -47,6 +97,13 @@ dependencies: "@babel/types" "^7.10.4" +"@babel/helper-annotate-as-pure@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz#eaa49f6f80d5a33f9a5dd2276e6d6e451be0a6bb" + integrity sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA== + dependencies: + "@babel/types" "^7.18.6" + "@babel/helper-builder-binary-assignment-operator-visitor@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.10.4.tgz#bb0b75f31bf98cbf9ff143c1ae578b87274ae1a3" @@ -72,6 +129,16 @@ "@babel/helper-annotate-as-pure" "^7.10.4" "@babel/types" "^7.10.4" +"@babel/helper-compilation-targets@^7.18.9": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.18.9.tgz#69e64f57b524cde3e5ff6cc5a9f4a387ee5563bf" + integrity sha512-tzLCyVmqUiFlcFoAPLA/gL9TeYrF61VLNtb+hvkuVaB5SUjW7jcfrglBIX1vUIoT7CLP3bBlIMeyEsIl2eFQNg== + dependencies: + "@babel/compat-data" "^7.18.8" + "@babel/helper-validator-option" "^7.18.6" + browserslist "^4.20.2" + semver "^6.3.0" + "@babel/helper-create-class-features-plugin@^7.10.4", "@babel/helper-create-class-features-plugin@^7.10.5": version "7.10.5" resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.10.5.tgz#9f61446ba80e8240b0a5c85c6fdac8459d6f259d" @@ -84,6 +151,19 @@ "@babel/helper-replace-supers" "^7.10.4" "@babel/helper-split-export-declaration" "^7.10.4" +"@babel/helper-create-class-features-plugin@^7.18.6", "@babel/helper-create-class-features-plugin@^7.18.9": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.18.9.tgz#d802ee16a64a9e824fcbf0a2ffc92f19d58550ce" + integrity sha512-WvypNAYaVh23QcjpMR24CwZY2Nz6hqdOcFdPbNpV56hL5H6KiFheO7Xm1aPdlLQ7d5emYZX7VZwPp9x3z+2opw== + dependencies: + "@babel/helper-annotate-as-pure" "^7.18.6" + "@babel/helper-environment-visitor" "^7.18.9" + "@babel/helper-function-name" "^7.18.9" + "@babel/helper-member-expression-to-functions" "^7.18.9" + "@babel/helper-optimise-call-expression" "^7.18.6" + "@babel/helper-replace-supers" "^7.18.9" + "@babel/helper-split-export-declaration" "^7.18.6" + "@babel/helper-create-regexp-features-plugin@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.10.4.tgz#fdd60d88524659a0b6959c0579925e425714f3b8" @@ -102,6 +182,11 @@ "@babel/types" "^7.10.5" lodash "^4.17.19" +"@babel/helper-environment-visitor@^7.18.9": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz#0c0cee9b35d2ca190478756865bb3528422f51be" + integrity sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg== + "@babel/helper-explode-assignable-expression@^7.10.4": version "7.11.4" resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.11.4.tgz#2d8e3470252cc17aba917ede7803d4a7a276a41b" @@ -118,6 +203,14 @@ "@babel/template" "^7.10.4" "@babel/types" "^7.10.4" +"@babel/helper-function-name@^7.18.9": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.18.9.tgz#940e6084a55dee867d33b4e487da2676365e86b0" + integrity sha512-fJgWlZt7nxGksJS9a0XdSaI4XvpExnNIgRP+rVefWh5U7BL8pPuir6SJUmFKRfjWQ51OtWSzwOxhaH/EBWWc0A== + dependencies: + "@babel/template" "^7.18.6" + "@babel/types" "^7.18.9" + "@babel/helper-get-function-arity@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz#98c1cbea0e2332f33f9a4661b8ce1505b2c19ba2" @@ -125,6 +218,13 @@ dependencies: "@babel/types" "^7.10.4" +"@babel/helper-hoist-variables@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz#d4d2c8fb4baeaa5c68b99cc8245c56554f926678" + integrity sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q== + dependencies: + "@babel/types" "^7.18.6" + "@babel/helper-member-expression-to-functions@^7.10.4", "@babel/helper-member-expression-to-functions@^7.10.5": version "7.11.0" resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.11.0.tgz#ae69c83d84ee82f4b42f96e2a09410935a8f26df" @@ -132,6 +232,13 @@ dependencies: "@babel/types" "^7.11.0" +"@babel/helper-member-expression-to-functions@^7.18.9": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.18.9.tgz#1531661e8375af843ad37ac692c132841e2fd815" + integrity sha512-RxifAh2ZoVU67PyKIO4AMi1wTenGfMR/O/ae0CCRqwgBAt5v7xjdtRw7UoSbsreKrQn5t7r89eruK/9JjYHuDg== + dependencies: + "@babel/types" "^7.18.9" + "@babel/helper-module-imports@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.10.4.tgz#4c5c54be04bd31670a7382797d75b9fa2e5b5620" @@ -139,6 +246,13 @@ dependencies: "@babel/types" "^7.10.4" +"@babel/helper-module-imports@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz#1e3ebdbbd08aad1437b428c50204db13c5a3ca6e" + integrity sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA== + dependencies: + "@babel/types" "^7.18.6" + "@babel/helper-module-transforms@^7.10.4", "@babel/helper-module-transforms@^7.11.0": version "7.11.0" resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.11.0.tgz#b16f250229e47211abdd84b34b64737c2ab2d359" @@ -152,6 +266,20 @@ "@babel/types" "^7.11.0" lodash "^4.17.19" +"@babel/helper-module-transforms@^7.18.6", "@babel/helper-module-transforms@^7.18.9": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.18.9.tgz#5a1079c005135ed627442df31a42887e80fcb712" + integrity sha512-KYNqY0ICwfv19b31XzvmI/mfcylOzbLtowkw+mfvGPAQ3kfCnMLYbED3YecL5tPd8nAYFQFAd6JHp2LxZk/J1g== + dependencies: + "@babel/helper-environment-visitor" "^7.18.9" + "@babel/helper-module-imports" "^7.18.6" + "@babel/helper-simple-access" "^7.18.6" + "@babel/helper-split-export-declaration" "^7.18.6" + "@babel/helper-validator-identifier" "^7.18.6" + "@babel/template" "^7.18.6" + "@babel/traverse" "^7.18.9" + "@babel/types" "^7.18.9" + "@babel/helper-optimise-call-expression@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.10.4.tgz#50dc96413d594f995a77905905b05893cd779673" @@ -159,11 +287,23 @@ dependencies: "@babel/types" "^7.10.4" +"@babel/helper-optimise-call-expression@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz#9369aa943ee7da47edab2cb4e838acf09d290ffe" + integrity sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA== + dependencies: + "@babel/types" "^7.18.6" + "@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.8.0": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz#2f75a831269d4f677de49986dff59927533cf375" integrity sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg== +"@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.18.9": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.18.9.tgz#4b8aea3b069d8cb8a72cdfe28ddf5ceca695ef2f" + integrity sha512-aBXPT3bmtLryXaoJLyYPXPlSD4p1ld9aYeR+sJNOZjJJGiOpb+fKfh3NkcCu7J54nUJwCERPBExCCpyCOHnu/w== + "@babel/helper-regex@^7.10.4": version "7.10.5" resolved "https://registry.yarnpkg.com/@babel/helper-regex/-/helper-regex-7.10.5.tgz#32dfbb79899073c415557053a19bd055aae50ae0" @@ -171,16 +311,6 @@ dependencies: lodash "^4.17.19" -"@babel/helper-remap-async-to-generator@^7.10.4": - version "7.11.4" - resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.11.4.tgz#4474ea9f7438f18575e30b0cac784045b402a12d" - integrity sha512-tR5vJ/vBa9wFy3m5LLv2faapJLnDFxNWff2SAYkSE4rLUdbp7CdObYFgI7wK4T/Mj4UzpjPwzR8Pzmr5m7MHGA== - dependencies: - "@babel/helper-annotate-as-pure" "^7.10.4" - "@babel/helper-wrap-function" "^7.10.4" - "@babel/template" "^7.10.4" - "@babel/types" "^7.10.4" - "@babel/helper-replace-supers@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.10.4.tgz#d585cd9388ea06e6031e4cd44b6713cbead9e6cf" @@ -191,6 +321,17 @@ "@babel/traverse" "^7.10.4" "@babel/types" "^7.10.4" +"@babel/helper-replace-supers@^7.18.9": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.18.9.tgz#1092e002feca980fbbb0bd4d51b74a65c6a500e6" + integrity sha512-dNsWibVI4lNT6HiuOIBr1oyxo40HvIVmbwPUm3XZ7wMh4k2WxrxTqZwSqw/eEmXDS9np0ey5M2bz9tBmO9c+YQ== + dependencies: + "@babel/helper-environment-visitor" "^7.18.9" + "@babel/helper-member-expression-to-functions" "^7.18.9" + "@babel/helper-optimise-call-expression" "^7.18.6" + "@babel/traverse" "^7.18.9" + "@babel/types" "^7.18.9" + "@babel/helper-simple-access@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.10.4.tgz#0f5ccda2945277a2a7a2d3a821e15395edcf3461" @@ -199,6 +340,13 @@ "@babel/template" "^7.10.4" "@babel/types" "^7.10.4" +"@babel/helper-simple-access@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.18.6.tgz#d6d8f51f4ac2978068df934b569f08f29788c7ea" + integrity sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g== + dependencies: + "@babel/types" "^7.18.6" + "@babel/helper-skip-transparent-expression-wrappers@^7.11.0": version "7.11.0" resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.11.0.tgz#eec162f112c2f58d3af0af125e3bb57665146729" @@ -206,6 +354,13 @@ dependencies: "@babel/types" "^7.11.0" +"@babel/helper-skip-transparent-expression-wrappers@^7.18.9": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.18.9.tgz#778d87b3a758d90b471e7b9918f34a9a02eb5818" + integrity sha512-imytd2gHi3cJPsybLRbmFrF7u5BIEuI2cNheyKi3/iOBC63kNn3q8Crn2xVuESli0aM4KYsyEqKyS7lFL8YVtw== + dependencies: + "@babel/types" "^7.18.9" + "@babel/helper-split-export-declaration@^7.10.4", "@babel/helper-split-export-declaration@^7.11.0": version "7.11.0" resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz#f8a491244acf6a676158ac42072911ba83ad099f" @@ -213,20 +368,32 @@ dependencies: "@babel/types" "^7.11.0" +"@babel/helper-split-export-declaration@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz#7367949bc75b20c6d5a5d4a97bba2824ae8ef075" + integrity sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA== + dependencies: + "@babel/types" "^7.18.6" + +"@babel/helper-string-parser@^7.18.10": + version "7.18.10" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.18.10.tgz#181f22d28ebe1b3857fa575f5c290b1aaf659b56" + integrity sha512-XtIfWmeNY3i4t7t4D2t02q50HvqHybPqW2ki1kosnvWCwuCMeo81Jf0gwr85jy/neUdg5XDdeFE/80DXiO+njw== + "@babel/helper-validator-identifier@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz#a78c7a7251e01f616512d31b10adcf52ada5e0d2" integrity sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw== -"@babel/helper-wrap-function@^7.10.4": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.10.4.tgz#8a6f701eab0ff39f765b5a1cfef409990e624b87" - integrity sha512-6py45WvEF0MhiLrdxtRjKjufwLL1/ob2qDJgg5JgNdojBAZSAKnAjkyOCNug6n+OBl4VW76XjvgSFTdaMcW0Ug== - dependencies: - "@babel/helper-function-name" "^7.10.4" - "@babel/template" "^7.10.4" - "@babel/traverse" "^7.10.4" - "@babel/types" "^7.10.4" +"@babel/helper-validator-identifier@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz#9c97e30d31b2b8c72a1d08984f2ca9b574d7a076" + integrity sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g== + +"@babel/helper-validator-option@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz#bf0d2b5a509b1f336099e4ff36e1a63aa5db4db8" + integrity sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw== "@babel/helpers@^7.10.4": version "7.10.4" @@ -237,6 +404,15 @@ "@babel/traverse" "^7.10.4" "@babel/types" "^7.10.4" +"@babel/helpers@^7.18.9": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.18.9.tgz#4bef3b893f253a1eced04516824ede94dcfe7ff9" + integrity sha512-Jf5a+rbrLoR4eNdUmnFu8cN5eNJT6qdTdOg5IHIzq87WwyRw9PwguLFOWYgktN/60IP4fgDUawJvs7PjQIzELQ== + dependencies: + "@babel/template" "^7.18.6" + "@babel/traverse" "^7.18.9" + "@babel/types" "^7.18.9" + "@babel/highlight@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.10.4.tgz#7d1bdfd65753538fabe6c38596cdb76d9ac60143" @@ -246,17 +422,24 @@ chalk "^2.0.0" js-tokens "^4.0.0" +"@babel/highlight@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.18.6.tgz#81158601e93e2563795adcbfbdf5d64be3f2ecdf" + integrity sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g== + dependencies: + "@babel/helper-validator-identifier" "^7.18.6" + chalk "^2.0.0" + js-tokens "^4.0.0" + "@babel/parser@^7.0.0", "@babel/parser@^7.1.0", "@babel/parser@^7.10.4", "@babel/parser@^7.11.0", "@babel/parser@^7.11.4", "@babel/parser@^7.7.0": version "7.11.4" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.11.4.tgz#6fa1a118b8b0d80d0267b719213dc947e88cc0ca" integrity sha512-MggwidiH+E9j5Sh8pbrX5sJvMcsqS5o+7iB42M9/k0CD63MjYbdP4nhSh7uB5wnv2/RVzTZFTxzF/kIa5mrCqA== -"@babel/plugin-external-helpers@^7.0.0": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-external-helpers/-/plugin-external-helpers-7.10.4.tgz#40d38e8e48a1fa3766ab43496253266ca26783ce" - integrity sha512-5mASqSthmRNYVXOphYzlqmR3Y8yp5SZMZhtKDh2DGV3R2PWGLEmP7qOahw66//6m4hjhlpV1bVM7xIJHt1F77Q== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" +"@babel/parser@^7.1.6", "@babel/parser@^7.18.10", "@babel/parser@^7.18.11": + version "7.18.11" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.11.tgz#68bb07ab3d380affa9a3f96728df07969645d2d9" + integrity sha512-9JKn5vN+hDt0Hdqn1PiJ2guflwP+B6Ga8qbDuoF0PzzVhrzsKIJo8yGqVk6CmMHiMei9w1C1Bp9IMJSIK+HPIQ== "@babel/plugin-proposal-class-properties@^7.0.0": version "7.10.4" @@ -266,6 +449,14 @@ "@babel/helper-create-class-features-plugin" "^7.10.4" "@babel/helper-plugin-utils" "^7.10.4" +"@babel/plugin-proposal-class-properties@^7.1.0": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.18.6.tgz#b110f59741895f7ec21a6fff696ec46265c446a3" + integrity sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" + "@babel/plugin-proposal-export-default-from@^7.0.0": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-default-from/-/plugin-proposal-export-default-from-7.10.4.tgz#08f66eef0067cbf6a7bc036977dcdccecaf0c6c5" @@ -282,6 +473,14 @@ "@babel/helper-plugin-utils" "^7.10.4" "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.0" +"@babel/plugin-proposal-nullish-coalescing-operator@^7.1.0": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.18.6.tgz#fdd940a99a740e577d6c753ab6fbb43fdb9467e1" + integrity sha512-wQxQzxYeJqHcfppzBDnm1yAY0jSRkUXR2z8RePZYrKwMKgMlE8+Z6LUno+bd6LvbGh8Gltvy74+9pIYkr+XkKA== + dependencies: + "@babel/helper-plugin-utils" "^7.18.6" + "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" + "@babel/plugin-proposal-object-rest-spread@^7.0.0": version "7.11.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.11.0.tgz#bd81f95a1f746760ea43b6c2d3d62b11790ad0af" @@ -308,6 +507,15 @@ "@babel/helper-skip-transparent-expression-wrappers" "^7.11.0" "@babel/plugin-syntax-optional-chaining" "^7.8.0" +"@babel/plugin-proposal-optional-chaining@^7.1.0": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.18.9.tgz#e8e8fe0723f2563960e4bf5e9690933691915993" + integrity sha512-v5nwt4IqBXihxGsW2QmCWMDS3B3bzGIk/EQVZz2ei7f3NJl8NzAJVvUmpDW5q1CRNY+Beb/k58UAH1Km1N411w== + dependencies: + "@babel/helper-plugin-utils" "^7.18.9" + "@babel/helper-skip-transparent-expression-wrappers" "^7.18.9" + "@babel/plugin-syntax-optional-chaining" "^7.8.3" + "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz#a983fb1aeb2ec3f6ed042a210f640e90e786fe0d" @@ -350,6 +558,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.10.4" +"@babel/plugin-syntax-flow@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.18.6.tgz#774d825256f2379d06139be0c723c4dd444f3ca1" + integrity sha512-LUbR+KNTBWCUAqRG9ex5Gnzu2IOkt8jRJbHHXFT9q+L9zm7M/QQbEqXyw1n1pohYvOyWC8CjeyjrSaIwiYjK7A== + dependencies: + "@babel/helper-plugin-utils" "^7.18.6" + "@babel/plugin-syntax-import-meta@^7.8.3": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz#ee601348c370fa334d2207be158777496521fd51" @@ -420,6 +635,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.10.4" +"@babel/plugin-syntax-typescript@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.18.6.tgz#1c09cd25795c7c2b8a4ba9ae49394576d4133285" + integrity sha512-mAWAuq4rvOepWCBid55JuRNvpTNf2UGVgoz4JV0fXEKolsVZDzsa4NqCef758WZJj/GDu0gVGItjKFiClTAmZA== + dependencies: + "@babel/helper-plugin-utils" "^7.18.6" + "@babel/plugin-transform-arrow-functions@^7.0.0": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.10.4.tgz#e22960d77e697c74f41c501d44d73dbf8a6a64cd" @@ -427,15 +649,6 @@ dependencies: "@babel/helper-plugin-utils" "^7.10.4" -"@babel/plugin-transform-async-to-generator@^7.0.0": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.10.4.tgz#41a5017e49eb6f3cda9392a51eef29405b245a37" - integrity sha512-F6nREOan7J5UXTLsDsZG3DXmZSVofr2tGNwfdrVwkDWHfQckbQXnXSPfD7iO+c/2HGqycwyLST3DnZ16n+cBJQ== - dependencies: - "@babel/helper-module-imports" "^7.10.4" - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/helper-remap-async-to-generator" "^7.10.4" - "@babel/plugin-transform-block-scoped-functions@^7.0.0": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.10.4.tgz#1afa595744f75e43a91af73b0d998ecfe4ebc2e8" @@ -494,6 +707,14 @@ "@babel/helper-plugin-utils" "^7.10.4" "@babel/plugin-syntax-flow" "^7.10.4" +"@babel/plugin-transform-flow-strip-types@^7.18.6": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.18.9.tgz#5b4cc521426263b5ce08893a2db41097ceba35bf" + integrity sha512-+G6rp2zRuOAInY5wcggsx4+QVao1qPM0osC9fTUVlAV3zOrzTCnrMAFVnR6+a3T8wz1wFIH7KhYMcMB3u1n80A== + dependencies: + "@babel/helper-plugin-utils" "^7.18.9" + "@babel/plugin-syntax-flow" "^7.18.6" + "@babel/plugin-transform-for-of@^7.0.0": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.10.4.tgz#c08892e8819d3a5db29031b115af511dbbfebae9" @@ -533,6 +754,16 @@ "@babel/helper-simple-access" "^7.10.4" babel-plugin-dynamic-import-node "^2.3.3" +"@babel/plugin-transform-modules-commonjs@^7.1.0": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.18.6.tgz#afd243afba166cca69892e24a8fd8c9f2ca87883" + integrity sha512-Qfv2ZOWikpvmedXQJDSbxNqy7Xr/j2Y8/KfijM0iJyKkBTmWuvCA1yeH1yDM7NJhBW/2aXxeucLj6i80/LAJ/Q== + dependencies: + "@babel/helper-module-transforms" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-simple-access" "^7.18.6" + babel-plugin-dynamic-import-node "^2.3.3" + "@babel/plugin-transform-object-assign@^7.0.0": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-assign/-/plugin-transform-object-assign-7.10.4.tgz#f7c8f54ce8052ccd8b9da9b3358848423221c338" @@ -644,6 +875,15 @@ "@babel/helper-annotate-as-pure" "^7.10.4" "@babel/helper-plugin-utils" "^7.10.4" +"@babel/plugin-transform-typescript@^7.18.6": + version "7.18.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.18.12.tgz#712e9a71b9e00fde9f8c0238e0cceee86ab2f8fd" + integrity sha512-2vjjam0cum0miPkenUbQswKowuxs/NjMwIKEq0zwegRxXk12C9YOF9STXnaUptITOtOJHKHpzvvWYOjbm6tc0w== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.18.9" + "@babel/helper-plugin-utils" "^7.18.9" + "@babel/plugin-syntax-typescript" "^7.18.6" + "@babel/plugin-transform-typescript@^7.5.0": version "7.11.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.11.0.tgz#2b4879676af37342ebb278216dd090ac67f13abb" @@ -661,6 +901,24 @@ "@babel/helper-create-regexp-features-plugin" "^7.10.4" "@babel/helper-plugin-utils" "^7.10.4" +"@babel/preset-flow@^7.0.0": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/preset-flow/-/preset-flow-7.18.6.tgz#83f7602ba566e72a9918beefafef8ef16d2810cb" + integrity sha512-E7BDhL64W6OUqpuyHnSroLnqyRTcG6ZdOBl1OKI/QK/HJfplqK/S3sq1Cckx7oTodJ5yOXyfw7rEADJ6UjoQDQ== + dependencies: + "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-validator-option" "^7.18.6" + "@babel/plugin-transform-flow-strip-types" "^7.18.6" + +"@babel/preset-typescript@^7.1.0": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.18.6.tgz#ce64be3e63eddc44240c6358daefac17b3186399" + integrity sha512-s9ik86kXBAnD760aybBucdpnLsAt0jK1xqJn2juOn9lkOvSHV60os5hxoVJsPzMQxvnUJFAlkont2DvvaYEBtQ== + dependencies: + "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-validator-option" "^7.18.6" + "@babel/plugin-transform-typescript" "^7.18.6" + "@babel/register@^7.0.0": version "7.10.5" resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.10.5.tgz#354f3574895f1307f79efe37a51525e52fd38d89" @@ -680,7 +938,7 @@ core-js-pure "^3.0.0" regenerator-runtime "^0.13.4" -"@babel/runtime@^7.0.0", "@babel/runtime@^7.8.4": +"@babel/runtime@^7.8.4": version "7.11.2" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.11.2.tgz#f549c13c754cc40b87644b9fa9f09a6a95fe0736" integrity sha512-TeWkU52so0mPtDcaCTxNBI/IHiz0pZgr8VEFqXFtZWpYD08ZB6FaSwVAS8MKRQAP3bYKiVjwysOJgMFY28o6Tw== @@ -696,6 +954,15 @@ "@babel/parser" "^7.10.4" "@babel/types" "^7.10.4" +"@babel/template@^7.18.10", "@babel/template@^7.18.6": + version "7.18.10" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.18.10.tgz#6f9134835970d1dbf0835c0d100c9f38de0c5e71" + integrity sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA== + dependencies: + "@babel/code-frame" "^7.18.6" + "@babel/parser" "^7.18.10" + "@babel/types" "^7.18.10" + "@babel/traverse@^7.0.0", "@babel/traverse@^7.1.0", "@babel/traverse@^7.10.4", "@babel/traverse@^7.11.0", "@babel/traverse@^7.7.0": version "7.11.0" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.11.0.tgz#9b996ce1b98f53f7c3e4175115605d56ed07dd24" @@ -711,6 +978,22 @@ globals "^11.1.0" lodash "^4.17.19" +"@babel/traverse@^7.18.10", "@babel/traverse@^7.18.9": + version "7.18.11" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.18.11.tgz#3d51f2afbd83ecf9912bcbb5c4d94e3d2ddaa16f" + integrity sha512-TG9PiM2R/cWCAy6BPJKeHzNbu4lPzOSZpeMfeNErskGpTJx6trEvFaVCbDvpcxwy49BKWmEPwiW8mrysNiDvIQ== + dependencies: + "@babel/code-frame" "^7.18.6" + "@babel/generator" "^7.18.10" + "@babel/helper-environment-visitor" "^7.18.9" + "@babel/helper-function-name" "^7.18.9" + "@babel/helper-hoist-variables" "^7.18.6" + "@babel/helper-split-export-declaration" "^7.18.6" + "@babel/parser" "^7.18.11" + "@babel/types" "^7.18.10" + debug "^4.1.0" + globals "^11.1.0" + "@babel/types@^7.0.0", "@babel/types@^7.10.4", "@babel/types@^7.10.5", "@babel/types@^7.11.0", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.7.0": version "7.11.0" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.11.0.tgz#2ae6bf1ba9ae8c3c43824e5861269871b206e90d" @@ -720,6 +1003,15 @@ lodash "^4.17.19" to-fast-properties "^2.0.0" +"@babel/types@^7.18.10", "@babel/types@^7.18.6", "@babel/types@^7.18.9": + version "7.18.10" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.18.10.tgz#4908e81b6b339ca7c6b7a555a5fc29446f26dde6" + integrity sha512-MJvnbEiiNkpjo+LknnmRrqbY1GPUUggjv+wQVjetM/AONoupqRALB7I6jGqNUAZsKcRIEu2J6FRFvsczljjsaQ== + dependencies: + "@babel/helper-string-parser" "^7.18.10" + "@babel/helper-validator-identifier" "^7.18.6" + to-fast-properties "^2.0.0" + "@bcoe/v8-coverage@^0.2.3": version "0.2.3" resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" @@ -733,37 +1025,17 @@ exec-sh "^0.3.2" minimist "^1.2.0" -"@hapi/address@2.x.x": - version "2.1.4" - resolved "https://registry.yarnpkg.com/@hapi/address/-/address-2.1.4.tgz#5d67ed43f3fd41a69d4b9ff7b56e7c0d1d0a81e5" - integrity sha512-QD1PhQk+s31P1ixsX0H0Suoupp3VMXzIVMSwobR3F3MSUO2YCV0B7xqLcUw/Bh8yuvd3LhpyqLQWTNcRmp6IdQ== - -"@hapi/bourne@1.x.x": - version "1.3.2" - resolved "https://registry.yarnpkg.com/@hapi/bourne/-/bourne-1.3.2.tgz#0a7095adea067243ce3283e1b56b8a8f453b242a" - integrity sha512-1dVNHT76Uu5N3eJNTYcvxee+jzX4Z9lfciqRRHCU27ihbUcYi+iSc2iml5Ke1LXe1SyJCLA0+14Jh4tXJgOppA== +"@hapi/hoek@^9.0.0": + version "9.3.0" + resolved "https://registry.yarnpkg.com/@hapi/hoek/-/hoek-9.3.0.tgz#8368869dcb735be2e7f5cb7647de78e167a251fb" + integrity sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ== -"@hapi/hoek@8.x.x", "@hapi/hoek@^8.3.0": - version "8.5.1" - resolved "https://registry.yarnpkg.com/@hapi/hoek/-/hoek-8.5.1.tgz#fde96064ca446dec8c55a8c2f130957b070c6e06" - integrity sha512-yN7kbciD87WzLGc5539Tn0sApjyiGHAJgKvG9W8C7O+6c7qmoQMfVs0W4bX17eqz6C78QJqqFrtgdK5EWf6Qow== - -"@hapi/joi@^15.0.3": - version "15.1.1" - resolved "https://registry.yarnpkg.com/@hapi/joi/-/joi-15.1.1.tgz#c675b8a71296f02833f8d6d243b34c57b8ce19d7" - integrity sha512-entf8ZMOK8sc+8YfeOlM8pCfg3b5+WZIKBfUaaJT8UsjAAPjartzxIYm3TIbjvA4u+u++KbcXD38k682nVHDAQ== - dependencies: - "@hapi/address" "2.x.x" - "@hapi/bourne" "1.x.x" - "@hapi/hoek" "8.x.x" - "@hapi/topo" "3.x.x" - -"@hapi/topo@3.x.x": - version "3.1.6" - resolved "https://registry.yarnpkg.com/@hapi/topo/-/topo-3.1.6.tgz#68d935fa3eae7fdd5ab0d7f953f3205d8b2bfc29" - integrity sha512-tAag0jEcjwH+P2quUfipd7liWCNX2F8NvYjQp2wtInsZxnMlypdw0FtAOLxtvvkO+GSRRbmNi8m/5y42PQJYCQ== +"@hapi/topo@^5.0.0": + version "5.1.0" + resolved "https://registry.yarnpkg.com/@hapi/topo/-/topo-5.1.0.tgz#dc448e332c6c6e37a4dc02fd84ba8d44b9afb012" + integrity sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg== dependencies: - "@hapi/hoek" "^8.3.0" + "@hapi/hoek" "^9.0.0" "@istanbuljs/load-nyc-config@^1.0.0": version "1.1.0" @@ -781,15 +1053,6 @@ resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.2.tgz#26520bf09abe4a5644cd5414e37125a8954241dd" integrity sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw== -"@jest/console@^24.9.0": - version "24.9.0" - resolved "https://registry.yarnpkg.com/@jest/console/-/console-24.9.0.tgz#79b1bc06fb74a8cfb01cbdedf945584b1b9707f0" - integrity sha512-Zuj6b8TnKXi3q4ymac8EQfc3ea/uhLeCGThFqXeC8H9/raaH8ARPUTdId+XyGd03Z4In0/VjD2OYFcBF09fNLQ== - dependencies: - "@jest/source-map" "^24.9.0" - chalk "^2.0.1" - slash "^2.0.0" - "@jest/console@^25.5.0": version "25.5.0" resolved "https://registry.yarnpkg.com/@jest/console/-/console-25.5.0.tgz#770800799d510f37329c508a9edd0b7b447d9abb" @@ -835,6 +1098,13 @@ slash "^3.0.0" strip-ansi "^6.0.0" +"@jest/create-cache-key-function@^26.5.0": + version "26.6.2" + resolved "https://registry.yarnpkg.com/@jest/create-cache-key-function/-/create-cache-key-function-26.6.2.tgz#04cf439207a4fd12418d8aee551cddc86f9ac5f5" + integrity sha512-LgEuqU1f/7WEIPYqwLPIvvHuc1sB6gMVbT6zWhin3txYUNYK/kGQrC1F2WR4gR34YlI9bBtViTm5z98RqVZAaw== + dependencies: + "@jest/types" "^26.6.2" + "@jest/environment@^25.5.0": version "25.5.0" resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-25.5.0.tgz#aa33b0c21a716c65686638e7ef816c0e3a0c7b37" @@ -844,15 +1114,6 @@ "@jest/types" "^25.5.0" jest-mock "^25.5.0" -"@jest/fake-timers@^24.9.0": - version "24.9.0" - resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-24.9.0.tgz#ba3e6bf0eecd09a636049896434d306636540c93" - integrity sha512-eWQcNa2YSwzXWIMC5KufBh3oWRIijrQFROsIqt6v/NS9Io/gknw1jsAC9c+ih/RQX4A3O7SeWAhQeN0goKhT9A== - dependencies: - "@jest/types" "^24.9.0" - jest-message-util "^24.9.0" - jest-mock "^24.9.0" - "@jest/fake-timers@^25.5.0": version "25.5.0" resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-25.5.0.tgz#46352e00533c024c90c2bc2ad9f2959f7f114185" @@ -905,15 +1166,6 @@ optionalDependencies: node-notifier "^6.0.0" -"@jest/source-map@^24.9.0": - version "24.9.0" - resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-24.9.0.tgz#0e263a94430be4b41da683ccc1e6bffe2a191714" - integrity sha512-/Xw7xGlsZb4MJzNDgB7PW5crou5JqWiBQaz6xyPd3ArOg2nfn/PunV8+olXbbEZzNl591o5rWKE9BRDaFAuIBg== - dependencies: - callsites "^3.0.0" - graceful-fs "^4.1.15" - source-map "^0.6.0" - "@jest/source-map@^25.5.0": version "25.5.0" resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-25.5.0.tgz#df5c20d6050aa292c2c6d3f0d2c7606af315bd1b" @@ -923,15 +1175,6 @@ graceful-fs "^4.2.4" source-map "^0.6.0" -"@jest/test-result@^24.9.0": - version "24.9.0" - resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-24.9.0.tgz#11796e8aa9dbf88ea025757b3152595ad06ba0ca" - integrity sha512-XEFrHbBonBJ8dGp2JmF8kP/nQI/ImPpygKHwQ/SY+es59Z3L5PI4Qb9TQQMAEeYsThG1xF0k6tmG0tIKATNiiA== - dependencies: - "@jest/console" "^24.9.0" - "@jest/types" "^24.9.0" - "@types/istanbul-lib-coverage" "^2.0.0" - "@jest/test-result@^25.5.0": version "25.5.0" resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-25.5.0.tgz#139a043230cdeffe9ba2d8341b27f2efc77ce87c" @@ -975,15 +1218,6 @@ source-map "^0.6.1" write-file-atomic "^3.0.0" -"@jest/types@^24.9.0": - version "24.9.0" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-24.9.0.tgz#63cb26cb7500d069e5a389441a7c6ab5e909fc59" - integrity sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw== - dependencies: - "@types/istanbul-lib-coverage" "^2.0.0" - "@types/istanbul-reports" "^1.1.1" - "@types/yargs" "^13.0.0" - "@jest/types@^25.5.0": version "25.5.0" resolved "https://registry.yarnpkg.com/@jest/types/-/types-25.5.0.tgz#4d6a4793f7b9599fc3680877b856a97dbccf2a9d" @@ -994,19 +1228,81 @@ "@types/yargs" "^15.0.0" chalk "^3.0.0" -"@react-native-community/cli-debugger-ui@^4.9.0": - version "4.9.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-debugger-ui/-/cli-debugger-ui-4.9.0.tgz#4177764ba69243c97aa26829d59d9501acb2bd71" - integrity sha512-fBFGamHm4VUrDqkBGnsrwQL8OC6Om7K6EBQb4xj0nWekpXt1HSa3ScylYHTTWwYcpRf9htGMRGiv4dQDY/odAw== +"@jest/types@^26.6.2": + version "26.6.2" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-26.6.2.tgz#bef5a532030e1d88a2f5a6d933f84e97226ed48e" + integrity sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ== + dependencies: + "@types/istanbul-lib-coverage" "^2.0.0" + "@types/istanbul-reports" "^3.0.0" + "@types/node" "*" + "@types/yargs" "^15.0.0" + chalk "^4.0.0" + +"@jridgewell/gen-mapping@^0.1.0": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz#e5d2e450306a9491e3bd77e323e38d7aff315996" + integrity sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w== + dependencies: + "@jridgewell/set-array" "^1.0.0" + "@jridgewell/sourcemap-codec" "^1.4.10" + +"@jridgewell/gen-mapping@^0.3.2": + version "0.3.2" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz#c1aedc61e853f2bb9f5dfe6d4442d3b565b253b9" + integrity sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A== + dependencies: + "@jridgewell/set-array" "^1.0.1" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/trace-mapping" "^0.3.9" + +"@jridgewell/resolve-uri@^3.0.3": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78" + integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== + +"@jridgewell/set-array@^1.0.0", "@jridgewell/set-array@^1.0.1": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" + integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== + +"@jridgewell/sourcemap-codec@^1.4.10": + version "1.4.14" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" + integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== + +"@jridgewell/trace-mapping@^0.3.9": + version "0.3.14" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.14.tgz#b231a081d8f66796e475ad588a1ef473112701ed" + integrity sha512-bJWEfQ9lPTvm3SneWwRFVLzrh6nhjwqw7TUFFBEMzwvg7t7PCDenf2lDwqo4NQXzdpgBXyFgDWnQA+2vkruksQ== + dependencies: + "@jridgewell/resolve-uri" "^3.0.3" + "@jridgewell/sourcemap-codec" "^1.4.10" + +"@react-native-community/cli-debugger-ui@^5.0.1": + version "5.0.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-debugger-ui/-/cli-debugger-ui-5.0.1.tgz#6b1f3367b8e5211e899983065ea2e72c1901d75f" + integrity sha512-5gGKaaXYOVE423BUqxIfvfAVSj5Cg1cU/TpGbeg/iqpy2CfqyWqJB3tTuVUbOOiOvR5wbU8tti6pIi1pchJ+oA== dependencies: serve-static "^1.13.1" -"@react-native-community/cli-platform-android@^4.7.0": - version "4.11.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-android/-/cli-platform-android-4.11.0.tgz#0ce9b88ed8b6b0ef962af49d980eb53433c17a84" - integrity sha512-BzqocGjOCjpDW0bM/LUrHMXw4nBvOhDXnHWxaoRp3eeUVsD2oSegoRn52kZo9yhPb9cCPkZJ3b+Web71Ue4j9w== +"@react-native-community/cli-hermes@^5.0.1": + version "5.0.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-hermes/-/cli-hermes-5.0.1.tgz#039d064bf2dcd5043beb7dcd6cdf5f5cdd51e7fc" + integrity sha512-nD+ZOFvu5MfjLB18eDJ01MNiFrzj8SDtENjGpf0ZRFndOWASDAmU54/UlU/wj8OzTToK1+S1KY7j2P2M1gleww== dependencies: - "@react-native-community/cli-tools" "^4.11.0" + "@react-native-community/cli-platform-android" "^5.0.1" + "@react-native-community/cli-tools" "^5.0.1" + chalk "^3.0.0" + hermes-profile-transformer "^0.0.6" + ip "^1.1.5" + +"@react-native-community/cli-platform-android@^5.0.1", "@react-native-community/cli-platform-android@^5.0.1-alpha.0": + version "5.0.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-android/-/cli-platform-android-5.0.1.tgz#7f761e1818e5a099877ec59a1b739553fd6a6905" + integrity sha512-qv9GJX6BJ+Y4qvV34vgxKwwN1cnveXUdP6y2YmTW7XoAYs5YUzKqHajpY58EyucAL2y++6+573t5y4U/9IIoww== + dependencies: + "@react-native-community/cli-tools" "^5.0.1" chalk "^3.0.0" execa "^1.0.0" fs-extra "^8.1.0" @@ -1017,12 +1313,12 @@ slash "^3.0.0" xmldoc "^1.1.2" -"@react-native-community/cli-platform-ios@^4.7.0": - version "4.11.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-ios/-/cli-platform-ios-4.11.0.tgz#5870bf5f2b3c01a0aa672a7c1f7f0fe13337c6b5" - integrity sha512-/qkjnhhJ7BGBTNkHSS8a+z8UgWUQbU6YZOTuYxjNywGUzMiTsb/wlm2cWCY1VEAvWtY97c4plAZ5OferPJHaVA== +"@react-native-community/cli-platform-ios@^5.0.1-alpha.0": + version "5.0.2" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-ios/-/cli-platform-ios-5.0.2.tgz#62485534053c0dad28a67de188248de177f4b0fb" + integrity sha512-IAJ2B3j2BTsQUJZ4R6cVvnTbPq0Vza7+dOgP81ISz2BKRtQ0VqNFv+VOALH2jLaDzf4t7NFlskzIXFqWqy2BLg== dependencies: - "@react-native-community/cli-tools" "^4.11.0" + "@react-native-community/cli-tools" "^5.0.1" chalk "^3.0.0" glob "^7.1.3" js-yaml "^3.13.1" @@ -1030,24 +1326,25 @@ plist "^3.0.1" xcode "^2.0.0" -"@react-native-community/cli-server-api@^4.11.0": - version "4.11.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-server-api/-/cli-server-api-4.11.0.tgz#93887ab8496c9d89b53817297974670184be1191" - integrity sha512-vrRaGq7ezsxyyUsFhAboEtA1CHLDa2UpJygOWHip30LaAluM+vopAJbau2NtHVX54vgQzXo438Tx8TXiRacPhA== +"@react-native-community/cli-server-api@^5.0.1": + version "5.0.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-server-api/-/cli-server-api-5.0.1.tgz#3cf92dac766fab766afedf77df3fe4d5f51e4d2b" + integrity sha512-OOxL+y9AOZayQzmSW+h5T54wQe+QBc/f67Y9QlWzzJhkKJdYx+S4VOooHoD5PFJzGbYaxhu2YF17p517pcEIIA== dependencies: - "@react-native-community/cli-debugger-ui" "^4.9.0" - "@react-native-community/cli-tools" "^4.11.0" + "@react-native-community/cli-debugger-ui" "^5.0.1" + "@react-native-community/cli-tools" "^5.0.1" compression "^1.7.1" connect "^3.6.5" errorhandler "^1.5.0" - pretty-format "^25.1.0" + nocache "^2.1.0" + pretty-format "^26.6.2" serve-static "^1.13.1" ws "^1.1.0" -"@react-native-community/cli-tools@^4.11.0": - version "4.11.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-tools/-/cli-tools-4.11.0.tgz#a53a51da76468a37f89ef7db808acc1d3c5f9cea" - integrity sha512-o2dh9q/778lIYBJxgIvTXkcxi9bSozjt8lv3tpyVmLZNA/PAPmQ7CafT37jWWwdmaSgP7nWyp4DtuE/gRsrXkA== +"@react-native-community/cli-tools@^5.0.1": + version "5.0.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-tools/-/cli-tools-5.0.1.tgz#9ee564dbe20448becd6bce9fbea1b59aa5797919" + integrity sha512-XOX5w98oSE8+KnkMZZPMRT7I5TaP8fLbDl0tCu40S7Epz+Zz924n80fmdu6nUDIfPT1nV6yH1hmHmWAWTDOR+Q== dependencies: chalk "^3.0.0" lodash "^4.17.15" @@ -1056,21 +1353,24 @@ open "^6.2.0" shell-quote "1.6.1" -"@react-native-community/cli-types@^4.10.1": - version "4.10.1" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-types/-/cli-types-4.10.1.tgz#d68a2dcd1649d3b3774823c64e5e9ce55bfbe1c9" - integrity sha512-ael2f1onoPF3vF7YqHGWy7NnafzGu+yp88BbFbP0ydoCP2xGSUzmZVw0zakPTC040Id+JQ9WeFczujMkDy6jYQ== - -"@react-native-community/cli@^4.7.0": - version "4.12.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli/-/cli-4.12.0.tgz#42ca3eacd4b4ba2bd5126aba6a032952e66835b5" - integrity sha512-zIrKxgHsQ5EUGjZ+oIW54+qY2XqVwDJbGV3hzsVsCFXleos2QUAQWskR0BG9zf06P1HT8kfwuDuHs/p1Ywe0rg== - dependencies: - "@hapi/joi" "^15.0.3" - "@react-native-community/cli-debugger-ui" "^4.9.0" - "@react-native-community/cli-server-api" "^4.11.0" - "@react-native-community/cli-tools" "^4.11.0" - "@react-native-community/cli-types" "^4.10.1" +"@react-native-community/cli-types@^5.0.1": + version "5.0.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-types/-/cli-types-5.0.1.tgz#8c5db4011988b0836d27a5efe230cb34890915dc" + integrity sha512-BesXnuFFlU/d1F3+sHhvKt8fUxbQlAbZ3hhMEImp9A6sopl8TEtryUGJ1dbazGjRXcADutxvjwT/i3LJVTIQug== + dependencies: + ora "^3.4.0" + +"@react-native-community/cli@^5.0.1-alpha.0": + version "5.0.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli/-/cli-5.0.1.tgz#1f7a66d813d5daf102e593f3c550650fa0cc8314" + integrity sha512-9VzSYUYSEqxEH5Ib2UNSdn2eyPiYZ4T7Y79o9DKtRBuSaUIwbCUdZtIm+UUjBpLS1XYBkW26FqL8/UdZDmQvXw== + dependencies: + "@react-native-community/cli-debugger-ui" "^5.0.1" + "@react-native-community/cli-hermes" "^5.0.1" + "@react-native-community/cli-server-api" "^5.0.1" + "@react-native-community/cli-tools" "^5.0.1" + "@react-native-community/cli-types" "^5.0.1" + appdirsjs "^1.2.4" chalk "^3.0.0" command-exists "^1.2.8" commander "^2.19.0" @@ -1082,19 +1382,21 @@ fs-extra "^8.1.0" glob "^7.1.3" graceful-fs "^4.1.3" - inquirer "^3.0.6" + joi "^17.2.1" leven "^3.1.0" lodash "^4.17.15" - metro "^0.58.0" - metro-config "^0.58.0" - metro-core "^0.58.0" - metro-react-native-babel-transformer "^0.58.0" - metro-resolver "^0.58.0" + metro "^0.64.0" + metro-config "^0.64.0" + metro-core "^0.64.0" + metro-react-native-babel-transformer "^0.64.0" + metro-resolver "^0.64.0" + metro-runtime "^0.64.0" minimist "^1.2.0" mkdirp "^0.5.1" node-stream-zip "^1.9.1" ora "^3.4.0" - pretty-format "^25.2.0" + pretty-format "^26.6.2" + prompts "^2.4.0" semver "^6.3.0" serve-static "^1.13.1" strip-ansi "^5.2.0" @@ -1125,6 +1427,38 @@ resolved "https://registry.yarnpkg.com/@react-native-community/eslint-plugin/-/eslint-plugin-1.1.0.tgz#e42b1bef12d2415411519fd528e64b593b1363dc" integrity sha512-W/J0fNYVO01tioHjvYWQ9m6RgndVtbElzYozBq1ZPrHO/iCzlqoySHl4gO/fpCl9QEFjvJfjPgtPMTMlsoq5DQ== +"@react-native/assets@1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@react-native/assets/-/assets-1.0.0.tgz#c6f9bf63d274bafc8e970628de24986b30a55c8e" + integrity sha512-KrwSpS1tKI70wuKl68DwJZYEvXktDHdZMG0k2AXD/rJVSlB23/X2CB2cutVR0HwNMJIal9HOUOBB2rVfa6UGtQ== + +"@react-native/normalize-color@1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@react-native/normalize-color/-/normalize-color-1.0.0.tgz#c52a99d4fe01049102d47dc45d40cbde4f720ab6" + integrity sha512-xUNRvNmCl3UGCPbbHvfyFMnpvLPoOjDCcp5bT9m2k+TF/ZBklEQwhPZlkrxRx2NhgFh1X3a5uL7mJ7ZR+8G7Qg== + +"@react-native/polyfills@1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@react-native/polyfills/-/polyfills-1.0.0.tgz#05bb0031533598f9458cf65a502b8df0eecae780" + integrity sha512-0jbp4RxjYopTsIdLl+/Fy2TiwVYHy4mgeu07DG4b/LyM0OS/+lPP5c9sbnt/AMlnF6qz2JRZpPpGw1eMNS6A4w== + +"@sideway/address@^4.1.3": + version "4.1.4" + resolved "https://registry.yarnpkg.com/@sideway/address/-/address-4.1.4.tgz#03dccebc6ea47fdc226f7d3d1ad512955d4783f0" + integrity sha512-7vwq+rOHVWjyXxVlR76Agnvhy8I9rpzjosTESvmhNeXOXdZZB15Fl+TI9x1SiHZH5Jv2wTGduSxFDIaq0m3DUw== + dependencies: + "@hapi/hoek" "^9.0.0" + +"@sideway/formula@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@sideway/formula/-/formula-3.0.0.tgz#fe158aee32e6bd5de85044be615bc08478a0a13c" + integrity sha512-vHe7wZ4NOXVfkoRb8T5otiENVlT7a3IAiw7H5M2+GO+9CDgcVUUsX1zalAztCmwyOr2RUTGJdgB+ZvSVqmdHmg== + +"@sideway/pinpoint@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@sideway/pinpoint/-/pinpoint-2.0.0.tgz#cff8ffadc372ad29fd3f78277aeb29e632cc70df" + integrity sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ== + "@sinonjs/commons@^1.7.0": version "1.8.1" resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.1.tgz#e7df00f98a203324f6dc7cc606cad9d4a8ab2217" @@ -1202,6 +1536,13 @@ "@types/istanbul-lib-coverage" "*" "@types/istanbul-lib-report" "*" +"@types/istanbul-reports@^3.0.0": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz#9153fe98bba2bd565a63add9436d6f0d7f8468ff" + integrity sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw== + dependencies: + "@types/istanbul-lib-report" "*" + "@types/json-schema@^7.0.3": version "7.0.5" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.5.tgz#dcce4430e64b443ba8945f0290fb564ad5bac6dd" @@ -1232,13 +1573,6 @@ resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-15.0.0.tgz#cb3f9f741869e20cce330ffbeb9271590483882d" integrity sha512-FA/BWv8t8ZWJ+gEOnLLd8ygxH/2UFbAvgEonyfN6yWGLKc7zVjbpl2Y4CTjid9h2RfgPP6SEt6uHwEOply00yw== -"@types/yargs@^13.0.0": - version "13.0.10" - resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-13.0.10.tgz#e77bf3fc73c781d48c2eb541f87c453e321e5f4b" - integrity sha512-MU10TSgzNABgdzKvQVW1nuuT+sgBMWeXNc3XOs5YXV5SDAK+PPja2eUuBNB9iqElu03xyEDqlnGw0jgl4nbqGQ== - dependencies: - "@types/yargs-parser" "*" - "@types/yargs@^15.0.0": version "15.0.5" resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-15.0.5.tgz#947e9a6561483bdee9adffc983e91a6902af8b79" @@ -1306,6 +1640,14 @@ absolute-path@^0.0.0: resolved "https://registry.yarnpkg.com/absolute-path/-/absolute-path-0.0.0.tgz#a78762fbdadfb5297be99b15d35a785b2f095bf7" integrity sha1-p4di+9rftSl76ZsV01p4Wy8JW/c= +accepts@^1.3.7: + version "1.3.8" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e" + integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw== + dependencies: + mime-types "~2.1.34" + negotiator "0.6.3" + accepts@~1.3.5, accepts@~1.3.7: version "1.3.7" resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" @@ -1357,25 +1699,6 @@ anser@^1.4.9: resolved "https://registry.yarnpkg.com/anser/-/anser-1.4.10.tgz#befa3eddf282684bd03b63dcda3927aef8c2e35b" integrity sha512-hCv9AqTQ8ycjpSd3upOJd7vFwW1JaoYQ7tpham03GJ1ca8/65rqn0RpaWpItOAd6ylW9wAw6luXYPJIyPFVOww== -ansi-colors@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-1.1.0.tgz#6374b4dd5d4718ff3ce27a671a3b1cad077132a9" - integrity sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA== - dependencies: - ansi-wrap "^0.1.0" - -ansi-cyan@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/ansi-cyan/-/ansi-cyan-0.1.1.tgz#538ae528af8982f28ae30d86f2f17456d2609873" - integrity sha1-U4rlKK+JgvKK4w2G8vF0VtJgmHM= - dependencies: - ansi-wrap "0.1.0" - -ansi-escapes@^3.0.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b" - integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ== - ansi-escapes@^4.2.1: version "4.3.1" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.1.tgz#a5c47cc43181f1f38ffd7076837700d395522a61" @@ -1392,26 +1715,7 @@ ansi-fragments@^0.2.1: slice-ansi "^2.0.0" strip-ansi "^5.0.0" -ansi-gray@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/ansi-gray/-/ansi-gray-0.1.1.tgz#2962cf54ec9792c48510a3deb524436861ef7251" - integrity sha1-KWLPVOyXksSFEKPetSRDaGHvclE= - dependencies: - ansi-wrap "0.1.0" - -ansi-red@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/ansi-red/-/ansi-red-0.1.1.tgz#8c638f9d1080800a353c9c28c8a81ca4705d946c" - integrity sha1-jGOPnRCAgAo1PJwoyKgcpHBdlGw= - dependencies: - ansi-wrap "0.1.0" - -ansi-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" - integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= - -ansi-regex@^4.0.0, ansi-regex@^4.1.0: +ansi-regex@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== @@ -1436,11 +1740,6 @@ ansi-styles@^4.0.0, ansi-styles@^4.1.0: "@types/color-name" "^1.1.1" color-convert "^2.0.1" -ansi-wrap@0.1.0, ansi-wrap@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/ansi-wrap/-/ansi-wrap-0.1.0.tgz#a82250ddb0015e9a27ca82e82ea603bbfa45efaf" - integrity sha1-qCJQ3bABXponyoLoLqYDu/pF768= - anymatch@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" @@ -1457,6 +1756,11 @@ anymatch@^3.0.3: normalize-path "^3.0.0" picomatch "^2.0.4" +appdirsjs@^1.2.4: + version "1.2.7" + resolved "https://registry.yarnpkg.com/appdirsjs/-/appdirsjs-1.2.7.tgz#50b4b7948a26ba6090d4aede2ae2dc2b051be3b3" + integrity sha512-Quji6+8kLBC3NnBeo14nPDq0+2jUs5s3/xEye+udFHumHhRk4M7aAMXp/PBJqkKYGuuyR9M/6Dq7d2AViiGmhw== + argparse@^1.0.7: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" @@ -1464,29 +1768,16 @@ argparse@^1.0.7: dependencies: sprintf-js "~1.0.2" -arr-diff@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-1.1.0.tgz#687c32758163588fef7de7b36fabe495eb1a399a" - integrity sha1-aHwydYFjWI/vfeezb6vklesaOZo= - dependencies: - arr-flatten "^1.0.1" - array-slice "^0.2.3" - arr-diff@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" integrity sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA= -arr-flatten@^1.0.1, arr-flatten@^1.1.0: +arr-flatten@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg== -arr-union@^2.0.1: - version "2.1.0" - resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-2.1.0.tgz#20f9eab5ec70f5c7d215b1077b1c39161d292c7d" - integrity sha1-IPnqtexw9cfSFbEHexw5Fh0pLH0= - arr-union@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" @@ -1521,17 +1812,12 @@ array-reduce@~0.0.0: resolved "https://registry.yarnpkg.com/array-reduce/-/array-reduce-0.0.0.tgz#173899d3ffd1c7d9383e4479525dbe278cab5f2b" integrity sha1-FziZ0//Rx9k4PkR5Ul2+J4yrXys= -array-slice@^0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/array-slice/-/array-slice-0.2.3.tgz#dd3cfb80ed7973a75117cdac69b0b99ec86186f5" - integrity sha1-3Tz7gO15c6dRF82sabC5nshhhvU= - array-unique@^0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= -asap@~2.0.3, asap@~2.0.6: +asap@~2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" integrity sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY= @@ -1553,11 +1839,23 @@ assign-symbols@^1.0.0: resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= +ast-types@0.14.2: + version "0.14.2" + resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.14.2.tgz#600b882df8583e3cd4f2df5fa20fa83759d4bdfd" + integrity sha512-O0yuUDnZeQDL+ncNGlJ78BiO4jnYI3bvMsD5prT0/nsgijG/LpNBIr63gTjVTNsiGkgQhiyCShTgxt8oXOrklA== + dependencies: + tslib "^2.0.1" + astral-regex@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" integrity sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg== +async-limiter@~1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd" + integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ== + async@^2.4.0: version "2.6.3" resolved "https://registry.yarnpkg.com/async/-/async-2.6.3.tgz#d72625e2344a3656e3a3ad4fa749fa83299d82ff" @@ -1585,6 +1883,11 @@ aws4@^1.8.0: resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.10.1.tgz#e1e82e4f3e999e2cfd61b161280d16a111f86428" integrity sha512-zg7Hz2k5lI8kb7U32998pRRFin7zJlkfezGJjUc2heaD4Pw2wObakCDVzkKztTm/Ln7eiVvYsjqak0Ed4LkMDA== +babel-core@^7.0.0-bridge.0: + version "7.0.0-bridge.0" + resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-7.0.0-bridge.0.tgz#95a492ddd90f9b4e9a4a1da14eb335b87b634ece" + integrity sha512-poPX9mZH/5CSanm50Q+1toVci6pv5KSRv/5TWCwtzQS5XEwn40BcCrgIeMFWP9CKKIniKXNxoIOnOq4VVlGXhg== + babel-eslint@10.1.0: version "10.1.0" resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-10.1.0.tgz#6968e568a910b78fb3779cdd8b6ac2f479943232" @@ -1660,7 +1963,7 @@ babel-preset-current-node-syntax@^0.1.2: "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" "@babel/plugin-syntax-optional-chaining" "^7.8.3" -babel-preset-fbjs@^3.2.0, babel-preset-fbjs@^3.3.0: +babel-preset-fbjs@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/babel-preset-fbjs/-/babel-preset-fbjs-3.3.0.tgz#a6024764ea86c8e06a22d794ca8b69534d263541" integrity sha512-7QTLTCd2gwB2qGoi5epSULMHugSVgpcVt5YAeiFO9ABLrutDQzKfGwzxgZHLpugq8qMdg/DhRZDZ5CLKxBkEbw== @@ -1741,13 +2044,6 @@ big-integer@^1.6.44: resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.48.tgz#8fd88bd1632cba4a1c8c3e3d7159f08bb95b4b9e" integrity sha512-j51egjPa7/i+RdiRuJbPdJ2FIUYYPhvYLjzoYbcMMm62ooO6F94fETG4MTs46zPAF9Brs04OajboA/qTGuz78w== -bindings@^1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" - integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== - dependencies: - file-uri-to-path "1.0.0" - bplist-creator@0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/bplist-creator/-/bplist-creator-0.0.8.tgz#56b2a6e79e9aec3fc33bf831d09347d73794e79c" @@ -1805,6 +2101,16 @@ browser-resolve@^1.11.3: dependencies: resolve "1.1.7" +browserslist@^4.20.2: + version "4.21.3" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.3.tgz#5df277694eb3c48bc5c4b05af3e8b7e09c5a6d1a" + integrity sha512-898rgRXLAyRkM1GryrrBHGkqA5hlpkV5MhtZwg9QXeiyLUYs2k00Un05aX5l2/yJIOObYKOpS2JNo8nJDE7fWQ== + dependencies: + caniuse-lite "^1.0.30001370" + electron-to-chromium "^1.4.202" + node-releases "^2.0.6" + update-browserslist-db "^1.0.5" + bser@2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/bser/-/bser-2.1.1.tgz#e6787da20ece9d07998533cfd9de6f5c38f4bc05" @@ -1812,11 +2118,6 @@ bser@2.1.1: dependencies: node-int64 "^0.4.0" -buffer-crc32@^0.2.13: - version "0.2.13" - resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" - integrity sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI= - buffer-from@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" @@ -1879,6 +2180,16 @@ camelcase@^5.0.0, camelcase@^5.3.1: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== +camelcase@^6.0.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" + integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== + +caniuse-lite@^1.0.30001370: + version "1.0.30001374" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001374.tgz#3dab138e3f5485ba2e74bd13eca7fe1037ce6f57" + integrity sha512-mWvzatRx3w+j5wx/mpFN5v5twlPrabG8NqX2c6e45LCpymdoGqNvRkRutFUqpRTXKFQFNQJasvK0YT7suW6/Hw== + capture-exit@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/capture-exit/-/capture-exit-2.0.0.tgz#fb953bfaebeb781f62898239dabb426d08a509a4" @@ -1891,7 +2202,7 @@ caseless@~0.12.0: resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= -chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.4.1, chalk@^2.4.2: +chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -1908,6 +2219,14 @@ chalk@^3.0.0: ansi-styles "^4.1.0" supports-color "^7.1.0" +chalk@^4.0.0: + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + chalk@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a" @@ -1916,11 +2235,6 @@ chalk@^4.1.0: ansi-styles "^4.1.0" supports-color "^7.1.0" -chardet@^0.4.0: - version "0.4.2" - resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.4.2.tgz#b5473b33dc97c424e5d98dc87d55d4d8a29c8bf2" - integrity sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I= - chardet@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" @@ -1960,25 +2274,11 @@ cli-spinners@^2.0.0: resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.4.0.tgz#c6256db216b878cfba4720e719cec7cf72685d7f" integrity sha512-sJAofoarcm76ZGpuooaO0eDy8saEy+YoZBLjC4h8srt4jeBnkYeOgqxgsJQTpyt2LjI5PTfLJHSL+41Yu4fEJA== -cli-width@^2.0.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.1.tgz#b0433d0b4e9c847ef18868a4ef16fd5fc8271c48" - integrity sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw== - cli-width@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-3.0.0.tgz#a2f48437a2caa9a22436e794bf071ec9e61cedf6" integrity sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw== -cliui@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" - integrity sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA== - dependencies: - string-width "^3.1.0" - strip-ansi "^5.2.0" - wrap-ansi "^5.1.0" - cliui@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-6.0.0.tgz#511d702c0c4e41ca156d7d0e96021f23e13225b1" @@ -2035,16 +2335,16 @@ color-name@~1.1.4: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== -color-support@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2" - integrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg== - colorette@^1.0.7: version "1.2.1" resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.1.tgz#4d0b921325c14faf92633086a536db6e89564b1b" integrity sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw== +colors@^1.1.2: + version "1.4.0" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" + integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== + combined-stream@^1.0.6, combined-stream@~1.0.6: version "1.0.8" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" @@ -2102,16 +2402,6 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= -concat-stream@^1.6.0: - version "1.6.2" - resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" - integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== - dependencies: - buffer-from "^1.0.0" - inherits "^2.0.3" - readable-stream "^2.2.2" - typedarray "^0.0.6" - connect@^3.6.5: version "3.7.0" resolved "https://registry.yarnpkg.com/connect/-/connect-3.7.0.tgz#5d49348910caa5e07a01800b030d0c35f20484f8" @@ -2139,11 +2429,6 @@ core-js-pure@^3.0.0: resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.6.5.tgz#c79e75f5e38dbc85a662d91eea52b8256d53b813" integrity sha512-lacdXOimsiD0QyNf9BC/mxivNJ/ybBGJXQFKzRekp1WTHoVUWsUHEn+2T8GJAzzIhyOuXA+gOxCVN3l+5PLPUA== -core-js@^2.2.2, core-js@^2.4.1: - version "2.6.11" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.11.tgz#38831469f9922bded8ee21c9dc46985e0399308c" - integrity sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg== - core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" @@ -2159,15 +2444,6 @@ cosmiconfig@^5.0.5, cosmiconfig@^5.1.0: js-yaml "^3.13.1" parse-json "^4.0.0" -cross-spawn@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" - integrity sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk= - dependencies: - lru-cache "^4.0.1" - shebang-command "^1.2.0" - which "^1.2.9" - cross-spawn@^6.0.0, cross-spawn@^6.0.5: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" @@ -2365,6 +2641,11 @@ ee-first@1.1.1: resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= +electron-to-chromium@^1.4.202: + version "1.4.212" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.212.tgz#20cd48e88288fd2428138c108804edb1961bf559" + integrity sha512-LjQUg1SpLj2GfyaPDVBUHdhmlDU1vDB4f0mJWSGkISoXQrn5/lH3ECPCuo2Bkvf6Y30wO+b69te+rZK/llZmjg== + emoji-regex@^7.0.1: version "7.0.3" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" @@ -2380,13 +2661,6 @@ encodeurl@~1.0.2: resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= -encoding@^0.1.11: - version "0.1.13" - resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.13.tgz#56574afdd791f54a8e9b2785c0582a2d26210fa9" - integrity sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A== - dependencies: - iconv-lite "^0.6.2" - end-of-stream@^1.1.0: version "1.4.4" resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" @@ -2406,6 +2680,13 @@ error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" +error-stack-parser@^2.0.6: + version "2.1.4" + resolved "https://registry.yarnpkg.com/error-stack-parser/-/error-stack-parser-2.1.4.tgz#229cb01cdbfa84440bfa91876285b94680188286" + integrity sha512-Sk5V6wVazPhq5MhpO+AUxJn5x7XSXGl1R93Vn7i+zS15KDVxQijejNCrz8340/2bgLBjR9GtEG8ZVKONDjcqGQ== + dependencies: + stackframe "^1.3.4" + errorhandler@^1.5.0: version "1.5.1" resolved "https://registry.yarnpkg.com/errorhandler/-/errorhandler-1.5.1.tgz#b9ba5d17cf90744cd1e851357a6e75bf806a9a91" @@ -2458,6 +2739,11 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" +escalade@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" + integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== + escape-html@~1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" @@ -2633,7 +2919,7 @@ espree@^6.1.2: acorn-jsx "^5.2.0" eslint-visitor-keys "^1.1.0" -esprima@^4.0.0, esprima@^4.0.1: +esprima@^4.0.0, esprima@^4.0.1, esprima@~4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== @@ -2677,11 +2963,6 @@ event-target-shim@^5.0.0, event-target-shim@^5.0.1: resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== -eventemitter3@^3.0.0: - version "3.1.2" - resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.2.tgz#2d3d48f9c346698fce83a85d7d664e98535df6e7" - integrity sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q== - eventemitter3@^4.0.7: version "4.0.7" resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" @@ -2751,13 +3032,6 @@ expect@^25.5.0: jest-message-util "^25.5.0" jest-regex-util "^25.2.6" -extend-shallow@^1.1.2: - version "1.1.4" - resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-1.1.4.tgz#19d6bf94dfc09d76ba711f39b872d21ff4dd9071" - integrity sha1-Gda/lN/AnXa6cR85uHLSH/TdkHE= - dependencies: - kind-of "^1.1.0" - extend-shallow@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" @@ -2778,15 +3052,6 @@ extend@~3.0.2: resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== -external-editor@^2.0.4: - version "2.2.0" - resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.2.0.tgz#045511cfd8d133f3846673d1047c154e214ad3d5" - integrity sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A== - dependencies: - chardet "^0.4.0" - iconv-lite "^0.4.17" - tmp "^0.0.33" - external-editor@^3.0.3: version "3.1.0" resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495" @@ -2820,16 +3085,6 @@ extsprintf@^1.2.0: resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= -fancy-log@^1.3.2: - version "1.3.3" - resolved "https://registry.yarnpkg.com/fancy-log/-/fancy-log-1.3.3.tgz#dbc19154f558690150a23953a0adbd035be45fc7" - integrity sha512-k9oEhlyc0FrVh25qYuSELjr8oxsCoc4/LEZfg2iJJrfEk/tZL9bCoJE47gqAvI2m/AUjluCS4+3I0eTx8n3AEw== - dependencies: - ansi-gray "^0.1.1" - color-support "^1.1.3" - parse-node-version "^1.0.0" - time-stamp "^1.0.0" - fast-deep-equal@^3.1.1: version "3.1.3" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" @@ -2857,48 +3112,6 @@ fb-watchman@^2.0.0: dependencies: bser "2.1.1" -fbjs-css-vars@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/fbjs-css-vars/-/fbjs-css-vars-1.0.2.tgz#216551136ae02fe255932c3ec8775f18e2c078b8" - integrity sha512-b2XGFAFdWZWg0phtAWLHCk836A1Xann+I+Dgd3Gk64MHKZO44FfoD1KxyvbSh0qZsIoXQGGlVztIY+oitJPpRQ== - -fbjs-scripts@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/fbjs-scripts/-/fbjs-scripts-1.2.0.tgz#069a0c0634242d10031c6460ef1fccefcdae8b27" - integrity sha512-5krZ8T0Bf8uky0abPoCLrfa7Orxd8UH4Qq8hRUF2RZYNMu+FmEOrBc7Ib3YVONmxTXTlLAvyrrdrVmksDb2OqQ== - dependencies: - "@babel/core" "^7.0.0" - ansi-colors "^1.0.1" - babel-preset-fbjs "^3.2.0" - core-js "^2.4.1" - cross-spawn "^5.1.0" - fancy-log "^1.3.2" - object-assign "^4.0.1" - plugin-error "^0.1.2" - semver "^5.1.0" - through2 "^2.0.0" - -fbjs@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-1.0.0.tgz#52c215e0883a3c86af2a7a776ed51525ae8e0a5a" - integrity sha512-MUgcMEJaFhCaF1QtWGnmq9ZDRAzECTCRAF7O6UZIlAlkTs1SasiX9aP0Iw7wfD2mJ7wDTNfg2w7u5fSCwJk1OA== - dependencies: - core-js "^2.4.1" - fbjs-css-vars "^1.0.0" - isomorphic-fetch "^2.1.1" - loose-envify "^1.0.0" - object-assign "^4.1.0" - promise "^7.1.1" - setimmediate "^1.0.5" - ua-parser-js "^0.7.18" - -figures@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" - integrity sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI= - dependencies: - escape-string-regexp "^1.0.5" - figures@^3.0.0: version "3.2.0" resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" @@ -2913,11 +3126,6 @@ file-entry-cache@^5.0.1: dependencies: flat-cache "^2.0.1" -file-uri-to-path@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" - integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== - fill-range@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" @@ -2986,6 +3194,16 @@ flatted@^2.0.0: resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.2.tgz#4575b21e2bcee7434aa9be662f4b7b5f9c2b5138" integrity sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA== +flow-parser@0.*: + version "0.184.0" + resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.184.0.tgz#45faed0a40fa554d24550c35ec7889b86b360c9b" + integrity sha512-+RAHizWmCnfnAWX1yD3fSdWRYCMhGiiqZSbHNU38MQxYc8XdTBoFB3ZpL1MEPG6yy/Yb3hg9w9eIf0DNlU8epQ== + +flow-parser@^0.121.0: + version "0.121.0" + resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.121.0.tgz#9f9898eaec91a9f7c323e9e992d81ab5c58e618f" + integrity sha512-1gIBiWJNR0tKUNv8gZuk7l9rVX06OuLzY9AoGio7y/JT4V1IZErEMEq2TJS+PFcw/y0RshZ1J/27VfK1UQzYVg== + for-in@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" @@ -3040,14 +3258,6 @@ fs.realpath@^1.0.0: resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= -fsevents@^1.2.7: - version "1.2.13" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.13.tgz#f325cb0455592428bcf11b383370ef70e3bfcc38" - integrity sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw== - dependencies: - bindings "^1.5.0" - nan "^2.12.1" - fsevents@^2.1.2: version "2.1.3" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e" @@ -3068,6 +3278,11 @@ gensync@^1.0.0-beta.1: resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.1.tgz#58f4361ff987e5ff6e1e7a210827aa371eaac269" integrity sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg== +gensync@^1.0.0-beta.2: + version "1.0.0-beta.2" + resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" + integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== + get-caller-file@^2.0.1: version "2.0.5" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" @@ -3116,6 +3331,18 @@ glob-parent@^5.0.0: dependencies: is-glob "^4.0.1" +glob@^7.0.0: + version "7.2.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.1.1" + once "^1.3.0" + path-is-absolute "^1.0.0" + glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: version "7.1.6" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" @@ -3140,7 +3367,7 @@ globals@^12.1.0: dependencies: type-fest "^0.8.1" -graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.3, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0, graceful-fs@^4.2.4: +graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.3, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0, graceful-fs@^4.2.4: version "4.2.4" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== @@ -3216,10 +3443,17 @@ has@^1.0.3: dependencies: function-bind "^1.1.1" -hermes-engine@~0.5.0: - version "0.5.1" - resolved "https://registry.yarnpkg.com/hermes-engine/-/hermes-engine-0.5.1.tgz#601115e4b1e0a17d9aa91243b96277de4e926e09" - integrity sha512-hLwqh8dejHayjlpvZY40e1aDCDvyP98cWx/L5DhAjSJLH8g4z9Tp08D7y4+3vErDsncPOdf1bxm+zUWpx0/Fxg== +hermes-engine@~0.7.0: + version "0.7.2" + resolved "https://registry.yarnpkg.com/hermes-engine/-/hermes-engine-0.7.2.tgz#303cd99d23f68e708b223aec2d49d5872985388b" + integrity sha512-E2DkRaO97gwL98LPhgfkMqhHiNsrAjIfEk3wWYn2Y31xdkdWn0572H7RnVcGujMJVqZNJvtknxlpsUb8Wzc3KA== + +hermes-profile-transformer@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/hermes-profile-transformer/-/hermes-profile-transformer-0.0.6.tgz#bd0f5ecceda80dd0ddaae443469ab26fb38fc27b" + integrity sha512-cnN7bQUm65UWOy6cbGcCcZ3rpwW8Q/j4OP5aWRhEry4Z2t2aR1cjrbp0BS+KiBN0smvP1caBgAuxutvyvJILzQ== + dependencies: + source-map "^0.7.3" hosted-git-info@^2.1.4: version "2.8.8" @@ -3263,20 +3497,13 @@ human-signals@^1.1.1: resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3" integrity sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw== -iconv-lite@0.4.24, iconv-lite@^0.4.17, iconv-lite@^0.4.24: +iconv-lite@0.4.24, iconv-lite@^0.4.24: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== dependencies: safer-buffer ">= 2.1.2 < 3" -iconv-lite@^0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.2.tgz#ce13d1875b0c3a674bd6a04b7f76b01b1b6ded01" - integrity sha512-2y91h5OpQlolefMPmUlivelittSWy0rP+oYVpn6A7GwVHNE8AWzoYOBNmlwks3LobaJxgHCYZAnyNo2GgpNRNQ== - dependencies: - safer-buffer ">= 2.1.2 < 3.0.0" - ieee754@^1.1.13: version "1.2.1" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" @@ -3334,31 +3561,11 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@2.0.4, inherits@^2.0.3, inherits@~2.0.3: +inherits@2, inherits@2.0.4, inherits@~2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== -inquirer@^3.0.6: - version "3.3.0" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.3.0.tgz#9dd2f2ad765dcab1ff0443b491442a20ba227dc9" - integrity sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ== - dependencies: - ansi-escapes "^3.0.0" - chalk "^2.0.0" - cli-cursor "^2.1.0" - cli-width "^2.0.0" - external-editor "^2.0.4" - figures "^2.0.0" - lodash "^4.3.0" - mute-stream "0.0.7" - run-async "^2.2.0" - rx-lite "^4.0.8" - rx-lite-aggregates "^4.0.8" - string-width "^2.1.0" - strip-ansi "^4.0.0" - through "^2.3.6" - inquirer@^7.0.0: version "7.3.3" resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-7.3.3.tgz#04d176b2af04afc157a83fd7c100e98ee0aad003" @@ -3387,6 +3594,11 @@ internal-slot@^1.0.2: has "^1.0.3" side-channel "^1.0.2" +interpret@^1.0.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" + integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA== + invariant@^2.2.4: version "2.2.4" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" @@ -3399,6 +3611,11 @@ ip-regex@^2.1.0: resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-2.1.0.tgz#fa78bf5d2e6913c911ce9f819ee5146bb6d844e9" integrity sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk= +ip@^1.1.5: + version "1.1.8" + resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.8.tgz#ae05948f6b075435ed3307acce04629da8cdbf48" + integrity sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg== + is-accessor-descriptor@^0.1.6: version "0.1.6" resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" @@ -3435,6 +3652,13 @@ is-ci@^2.0.0: dependencies: ci-info "^2.0.0" +is-core-module@^2.9.0: + version "2.10.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.10.0.tgz#9012ede0a91c69587e647514e1d5277019e728ed" + integrity sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg== + dependencies: + has "^1.0.3" + is-data-descriptor@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" @@ -3552,7 +3776,7 @@ is-regex@^1.1.0, is-regex@^1.1.1: dependencies: has-symbols "^1.0.1" -is-stream@^1.0.1, is-stream@^1.1.0: +is-stream@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= @@ -3618,14 +3842,6 @@ isobject@^3.0.0, isobject@^3.0.1: resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= -isomorphic-fetch@^2.1.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz#611ae1acf14f5e81f729507472819fe9733558a9" - integrity sha1-YRrhrPFPXoH3KVB0coGf6XM1WKk= - dependencies: - node-fetch "^1.0.1" - whatwg-fetch ">=0.10.0" - isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" @@ -3778,34 +3994,15 @@ jest-environment-node@^25.5.0: jest-util "^25.5.0" semver "^6.3.0" -jest-get-type@^24.9.0: - version "24.9.0" - resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-24.9.0.tgz#1684a0c8a50f2e4901b6644ae861f579eed2ef0e" - integrity sha512-lUseMzAley4LhIcpSP9Jf+fTrQ4a1yHQwLNeeVa2cEmbCGeoZAtYPOIv8JaxLD/sUpKxetKGP+gsHl8f8TSj8Q== - jest-get-type@^25.2.6: version "25.2.6" resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-25.2.6.tgz#0b0a32fab8908b44d508be81681487dbabb8d877" integrity sha512-DxjtyzOHjObRM+sM1knti6or+eOgcGU4xVSb2HNP1TqO4ahsT+rqZg+nyqHWJSvWgKC5cG3QjGFBqxLghiF/Ig== -jest-haste-map@^24.7.1: - version "24.9.0" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-24.9.0.tgz#b38a5d64274934e21fa417ae9a9fbeb77ceaac7d" - integrity sha512-kfVFmsuWui2Sj1Rp1AJ4D9HqJwE4uwTlS/vO+eRUaMmd54BFpli2XhMQnPC2k4cHFVbB2Q2C+jtI1AGLgEnCjQ== - dependencies: - "@jest/types" "^24.9.0" - anymatch "^2.0.0" - fb-watchman "^2.0.0" - graceful-fs "^4.1.15" - invariant "^2.2.4" - jest-serializer "^24.9.0" - jest-util "^24.9.0" - jest-worker "^24.9.0" - micromatch "^3.1.10" - sane "^4.0.3" - walker "^1.0.7" - optionalDependencies: - fsevents "^1.2.7" +jest-get-type@^26.3.0: + version "26.3.0" + resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-26.3.0.tgz#e97dc3c3f53c2b406ca7afaed4493b1d099199e0" + integrity sha512-TpfaviN1R2pQWkIihlfEanwOXK0zcxrKEE4MlU6Tn7keoXdN6/3gK/xl0yEh8DOunn5pOVGKf8hB4R9gVh04ig== jest-haste-map@^25.5.1: version "25.5.1" @@ -3827,6 +4024,27 @@ jest-haste-map@^25.5.1: optionalDependencies: fsevents "^2.1.2" +jest-haste-map@^26.5.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-26.6.2.tgz#dd7e60fe7dc0e9f911a23d79c5ff7fb5c2cafeaa" + integrity sha512-easWIJXIw71B2RdR8kgqpjQrbMRWQBgiBwXYEhtGUTaX+doCjBheluShdDMeR8IMfJiTqH4+zfhtg29apJf/8w== + dependencies: + "@jest/types" "^26.6.2" + "@types/graceful-fs" "^4.1.2" + "@types/node" "*" + anymatch "^3.0.3" + fb-watchman "^2.0.0" + graceful-fs "^4.2.4" + jest-regex-util "^26.0.0" + jest-serializer "^26.6.2" + jest-util "^26.6.2" + jest-worker "^26.6.2" + micromatch "^4.0.2" + sane "^4.0.3" + walker "^1.0.7" + optionalDependencies: + fsevents "^2.1.2" + jest-jasmine2@^25.5.4: version "25.5.4" resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-25.5.4.tgz#66ca8b328fb1a3c5364816f8958f6970a8526968" @@ -3863,24 +4081,10 @@ jest-matcher-utils@^25.5.0: resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-25.5.0.tgz#fbc98a12d730e5d2453d7f1ed4a4d948e34b7867" integrity sha512-VWI269+9JS5cpndnpCwm7dy7JtGQT30UHfrnM3mXl22gHGt/b7NkjBqXfbhZ8V4B7ANUsjK18PlSBmG0YH7gjw== dependencies: - chalk "^3.0.0" - jest-diff "^25.5.0" - jest-get-type "^25.2.6" - pretty-format "^25.5.0" - -jest-message-util@^24.9.0: - version "24.9.0" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-24.9.0.tgz#527f54a1e380f5e202a8d1149b0ec872f43119e3" - integrity sha512-oCj8FiZ3U0hTP4aSui87P4L4jC37BtQwUMqk+zk/b11FR19BJDeZsZAvIHutWnmtw7r85UmR3CEWZ0HWU2mAlw== - dependencies: - "@babel/code-frame" "^7.0.0" - "@jest/test-result" "^24.9.0" - "@jest/types" "^24.9.0" - "@types/stack-utils" "^1.0.1" - chalk "^2.0.1" - micromatch "^3.1.10" - slash "^2.0.0" - stack-utils "^1.0.1" + chalk "^3.0.0" + jest-diff "^25.5.0" + jest-get-type "^25.2.6" + pretty-format "^25.5.0" jest-message-util@^25.5.0: version "25.5.0" @@ -3896,13 +4100,6 @@ jest-message-util@^25.5.0: slash "^3.0.0" stack-utils "^1.0.1" -jest-mock@^24.9.0: - version "24.9.0" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-24.9.0.tgz#c22835541ee379b908673ad51087a2185c13f1c6" - integrity sha512-3BEYN5WbSq9wd+SyLDES7AHnjH9A/ROBwmz7l2y+ol+NtSFO8DYiEBzoO1CeFc9a8DYy10EO4dDFVv/wN3zl1w== - dependencies: - "@jest/types" "^24.9.0" - jest-mock@^25.5.0: version "25.5.0" resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-25.5.0.tgz#a91a54dabd14e37ecd61665d6b6e06360a55387a" @@ -3920,6 +4117,11 @@ jest-regex-util@^25.2.6: resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-25.2.6.tgz#d847d38ba15d2118d3b06390056028d0f2fd3964" integrity sha512-KQqf7a0NrtCkYmZZzodPftn7fL1cq3GQAFVMn5Hg8uKx/fIenLEobNanUxb7abQ1sjADHBseG/2FGpsv/wr+Qw== +jest-regex-util@^26.0.0: + version "26.0.0" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-26.0.0.tgz#d25e7184b36e39fd466c3bc41be0971e821fee28" + integrity sha512-Gv3ZIs/nA48/Zvjrl34bf+oD76JHiGDUxNOVgUjh3j890sblXryjY4rss71fPtD/njchl6PSE2hIhvyWa1eT0A== + jest-resolve-dependencies@^25.5.4: version "25.5.4" resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-25.5.4.tgz#85501f53957c8e3be446e863a74777b5a17397a7" @@ -4001,11 +4203,6 @@ jest-runtime@^25.5.4: strip-bom "^4.0.0" yargs "^15.3.1" -jest-serializer@^24.4.0, jest-serializer@^24.9.0: - version "24.9.0" - resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-24.9.0.tgz#e6d7d7ef96d31e8b9079a714754c5d5c58288e73" - integrity sha512-DxYipDr8OvfrKH3Kel6NdED3OXxjvxXZ1uIY2I9OFbGg+vUkkg7AGvi65qbhbWNPvDckXmzMPbK3u3HaDO49bQ== - jest-serializer@^25.5.0: version "25.5.0" resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-25.5.0.tgz#a993f484e769b4ed54e70e0efdb74007f503072b" @@ -4013,6 +4210,14 @@ jest-serializer@^25.5.0: dependencies: graceful-fs "^4.2.4" +jest-serializer@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-26.6.2.tgz#d139aafd46957d3a448f3a6cdabe2919ba0742d1" + integrity sha512-S5wqyz0DXnNJPd/xfIzZ5Xnp1HrJWBczg8mMfMpN78OJ5eDxXyf+Ygld9wX1DnUWbIbhM1YDY95NjR4CBXkb2g== + dependencies: + "@types/node" "*" + graceful-fs "^4.2.4" + jest-snapshot@^25.5.1: version "25.5.1" resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-25.5.1.tgz#1a2a576491f9961eb8d00c2e5fd479bc28e5ff7f" @@ -4034,24 +4239,6 @@ jest-snapshot@^25.5.1: pretty-format "^25.5.0" semver "^6.3.0" -jest-util@^24.9.0: - version "24.9.0" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-24.9.0.tgz#7396814e48536d2e85a37de3e4c431d7cb140162" - integrity sha512-x+cZU8VRmOJxbA1K5oDBdxQmdq0OIdADarLxk0Mq+3XS4jgvhG/oKGWcIDCtPG0HgjxOYvF+ilPJQsAyXfbNOg== - dependencies: - "@jest/console" "^24.9.0" - "@jest/fake-timers" "^24.9.0" - "@jest/source-map" "^24.9.0" - "@jest/test-result" "^24.9.0" - "@jest/types" "^24.9.0" - callsites "^3.0.0" - chalk "^2.0.1" - graceful-fs "^4.1.15" - is-ci "^2.0.0" - mkdirp "^0.5.1" - slash "^2.0.0" - source-map "^0.6.0" - jest-util@^25.5.0: version "25.5.0" resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-25.5.0.tgz#31c63b5d6e901274d264a4fec849230aa3fa35b0" @@ -4063,17 +4250,17 @@ jest-util@^25.5.0: is-ci "^2.0.0" make-dir "^3.0.0" -jest-validate@^24.7.0: - version "24.9.0" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-24.9.0.tgz#0775c55360d173cd854e40180756d4ff52def8ab" - integrity sha512-HPIt6C5ACwiqSiwi+OfSSHbK8sG7akG8eATl+IPKaeIjtPOeBUd/g3J7DghugzxrGjI93qS/+RPKe1H6PqvhRQ== +jest-util@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-26.6.2.tgz#907535dbe4d5a6cb4c47ac9b926f6af29576cbc1" + integrity sha512-MDW0fKfsn0OI7MS7Euz6h8HNDXVQ0gaM9uW6RjfDmd1DAFcaxX9OqIakHIqhbnmF08Cf2DLDG+ulq8YQQ0Lp0Q== dependencies: - "@jest/types" "^24.9.0" - camelcase "^5.3.1" - chalk "^2.0.1" - jest-get-type "^24.9.0" - leven "^3.1.0" - pretty-format "^24.9.0" + "@jest/types" "^26.6.2" + "@types/node" "*" + chalk "^4.0.0" + graceful-fs "^4.2.4" + is-ci "^2.0.0" + micromatch "^4.0.2" jest-validate@^25.5.0: version "25.5.0" @@ -4087,6 +4274,18 @@ jest-validate@^25.5.0: leven "^3.1.0" pretty-format "^25.5.0" +jest-validate@^26.5.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-26.6.2.tgz#23d380971587150467342911c3d7b4ac57ab20ec" + integrity sha512-NEYZ9Aeyj0i5rQqbq+tpIOom0YS1u2MVu6+euBsvpgIme+FOfRmoC4R5p0JiAUpaFvFy24xgrpMknarR/93XjQ== + dependencies: + "@jest/types" "^26.6.2" + camelcase "^6.0.0" + chalk "^4.0.0" + jest-get-type "^26.3.0" + leven "^3.1.0" + pretty-format "^26.6.2" + jest-watcher@^25.5.0: version "25.5.0" resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-25.5.0.tgz#d6110d101df98badebe435003956fd4a465e8456" @@ -4099,14 +4298,6 @@ jest-watcher@^25.5.0: jest-util "^25.5.0" string-length "^3.1.0" -jest-worker@^24.6.0, jest-worker@^24.9.0: - version "24.9.0" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-24.9.0.tgz#5dbfdb5b2d322e98567898238a9697bcce67b3e5" - integrity sha512-51PE4haMSXcHohnSMdM42anbvZANYTqMrr52tVKPqqsPJMzoP6FYYDVqahX/HrAoKEKz3uUPzSvKs9A3qR4iVw== - dependencies: - merge-stream "^2.0.0" - supports-color "^6.1.0" - jest-worker@^25.5.0: version "25.5.0" resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-25.5.0.tgz#2611d071b79cea0f43ee57a3d118593ac1547db1" @@ -4115,6 +4306,15 @@ jest-worker@^25.5.0: merge-stream "^2.0.0" supports-color "^7.0.0" +jest-worker@^26.0.0, jest-worker@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-26.6.2.tgz#7f72cbc4d643c365e27b9fd775f9d0eaa9c7a8ed" + integrity sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ== + dependencies: + "@types/node" "*" + merge-stream "^2.0.0" + supports-color "^7.0.0" + jest@^25.1.0: version "25.5.4" resolved "https://registry.yarnpkg.com/jest/-/jest-25.5.4.tgz#f21107b6489cfe32b076ce2adcadee3587acb9db" @@ -4129,6 +4329,17 @@ jetifier@^1.6.2: resolved "https://registry.yarnpkg.com/jetifier/-/jetifier-1.6.6.tgz#fec8bff76121444c12dc38d2dad6767c421dab68" integrity sha512-JNAkmPeB/GS2tCRqUzRPsTOHpGDah7xP18vGJfIjZC+W2sxEHbxgJxetIjIqhjQ3yYbYNEELkM/spKLtwoOSUQ== +joi@^17.2.1: + version "17.6.0" + resolved "https://registry.yarnpkg.com/joi/-/joi-17.6.0.tgz#0bb54f2f006c09a96e75ce687957bd04290054b2" + integrity sha512-OX5dG6DTbcr/kbMFj0KGYxuew69HPcAE3K/sZpEV2nP6e/j/C0HV+HNiBPCASxdx5T7DMoa0s8UeHWMnb6n2zw== + dependencies: + "@hapi/hoek" "^9.0.0" + "@hapi/topo" "^5.0.0" + "@sideway/address" "^4.1.3" + "@sideway/formula" "^3.0.0" + "@sideway/pinpoint" "^2.0.0" + "js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" @@ -4152,6 +4363,31 @@ jsc-android@^245459.0.0: resolved "https://registry.yarnpkg.com/jsc-android/-/jsc-android-245459.0.0.tgz#e584258dd0b04c9159a27fb104cd5d491fd202c9" integrity sha512-wkjURqwaB1daNkDi2OYYbsLnIdC/lUM2nPXQKRs5pqEU9chDg435bjvo+LSaHotDENygHQDHe+ntUkkw2gwMtg== +jscodeshift@^0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/jscodeshift/-/jscodeshift-0.11.0.tgz#4f95039408f3f06b0e39bb4d53bc3139f5330e2f" + integrity sha512-SdRK2C7jjs4k/kT2mwtO07KJN9RnjxtKn03d9JVj6c3j9WwaLcFYsICYDnLAzY0hp+wG2nxl+Cm2jWLiNVYb8g== + dependencies: + "@babel/core" "^7.1.6" + "@babel/parser" "^7.1.6" + "@babel/plugin-proposal-class-properties" "^7.1.0" + "@babel/plugin-proposal-nullish-coalescing-operator" "^7.1.0" + "@babel/plugin-proposal-optional-chaining" "^7.1.0" + "@babel/plugin-transform-modules-commonjs" "^7.1.0" + "@babel/preset-flow" "^7.0.0" + "@babel/preset-typescript" "^7.1.0" + "@babel/register" "^7.0.0" + babel-core "^7.0.0-bridge.0" + colors "^1.1.2" + flow-parser "0.*" + graceful-fs "^4.2.4" + micromatch "^3.1.10" + neo-async "^2.5.0" + node-dir "^0.1.17" + recast "^0.20.3" + temp "^0.8.1" + write-file-atomic "^2.3.0" + jsdom@^15.2.1: version "15.2.1" resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-15.2.1.tgz#d2feb1aef7183f86be521b8c6833ff5296d07ec5" @@ -4219,13 +4455,6 @@ json-stable-stringify-without-jsonify@^1.0.1: resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= -json-stable-stringify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" - integrity sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8= - dependencies: - jsonify "~0.0.0" - json-stringify-safe@~5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" @@ -4238,6 +4467,11 @@ json5@^2.1.2: dependencies: minimist "^1.2.5" +json5@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.1.tgz#655d50ed1e6f95ad1a3caababd2b0efda10b395c" + integrity sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA== + jsonfile@^2.1.0: version "2.4.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8" @@ -4275,11 +4509,6 @@ jsx-ast-utils@^2.2.3: array-includes "^3.1.1" object.assign "^4.1.0" -kind-of@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-1.1.0.tgz#140a3d2d41a36d2efcfa9377b62c24f8495a5c44" - integrity sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ= - kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: version "3.2.2" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" @@ -4359,7 +4588,7 @@ lodash.throttle@^4.1.1: resolved "https://registry.yarnpkg.com/lodash.throttle/-/lodash.throttle-4.1.1.tgz#c23e91b710242ac70c37f1e1cda9274cc39bf2f4" integrity sha1-wj6RtxAkKscMN/HhzaknTMOb8vQ= -lodash@^4.17.10, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.3.0: +lodash@^4.17.10, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19: version "4.17.20" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52" integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA== @@ -4394,14 +4623,6 @@ loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.4.0: dependencies: js-tokens "^3.0.0 || ^4.0.0" -lru-cache@^4.0.1: - version "4.1.5" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" - integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g== - dependencies: - pseudomap "^1.0.2" - yallist "^2.1.2" - make-dir@^2.0.0, make-dir@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5" @@ -4436,40 +4657,15 @@ map-visit@^1.0.0: dependencies: object-visit "^1.0.0" -merge-stream@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-1.0.1.tgz#4041202d508a342ba00174008df0c251b8c135e1" - integrity sha1-QEEgLVCKNCugAXQAjfDCUbjBNeE= - dependencies: - readable-stream "^2.0.1" - merge-stream@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== -metro-babel-register@0.58.0: - version "0.58.0" - resolved "https://registry.yarnpkg.com/metro-babel-register/-/metro-babel-register-0.58.0.tgz#5c44786d49a044048df56cf476a2263491d4f53a" - integrity sha512-P5+G3ufhSYL6cA3a7xkbSJzzFBvtivj/PhWvGXFXnuFssDlMAX1CTktff+0gpka5Cd6B6QLt0UAMWulUAAE4Eg== - dependencies: - "@babel/core" "^7.0.0" - "@babel/plugin-proposal-class-properties" "^7.0.0" - "@babel/plugin-proposal-nullish-coalescing-operator" "^7.0.0" - "@babel/plugin-proposal-object-rest-spread" "^7.0.0" - "@babel/plugin-proposal-optional-catch-binding" "^7.0.0" - "@babel/plugin-proposal-optional-chaining" "^7.0.0" - "@babel/plugin-transform-async-to-generator" "^7.0.0" - "@babel/plugin-transform-flow-strip-types" "^7.0.0" - "@babel/plugin-transform-modules-commonjs" "^7.0.0" - "@babel/register" "^7.0.0" - core-js "^2.2.2" - escape-string-regexp "^1.0.5" - -metro-babel-register@0.59.0: - version "0.59.0" - resolved "https://registry.yarnpkg.com/metro-babel-register/-/metro-babel-register-0.59.0.tgz#2bcff65641b36794cf083ba732fbc46cf870fb43" - integrity sha512-JtWc29erdsXO/V3loenXKw+aHUXgj7lt0QPaZKPpctLLy8kcEpI/8pfXXgVK9weXICCpCnYtYncIosAyzh0xjg== +metro-babel-register@0.64.0: + version "0.64.0" + resolved "https://registry.yarnpkg.com/metro-babel-register/-/metro-babel-register-0.64.0.tgz#1a2d23f68da8b8ee42e78dca37ad21a5f4d3647d" + integrity sha512-Kf6YvE3kIRumGnjK0Q9LqGDIdnsX9eFGtNBmBuCVDuB9wGGA/5CgX8We8W7Y44dz1RGTcHJRhfw5iGg+pwC3aQ== dependencies: "@babel/core" "^7.0.0" "@babel/plugin-proposal-class-properties" "^7.0.0" @@ -4480,77 +4676,78 @@ metro-babel-register@0.59.0: "@babel/register" "^7.0.0" escape-string-regexp "^1.0.5" -metro-babel-transformer@0.58.0: - version "0.58.0" - resolved "https://registry.yarnpkg.com/metro-babel-transformer/-/metro-babel-transformer-0.58.0.tgz#317c83b863cceb0573943815f1711fbcbe69b106" - integrity sha512-yBX3BkRhw2TCNPhe+pmLSgsAEA3huMvnX08UwjFqSXXI1aiqzRQobn92uKd1U5MM1Vx8EtXVomlJb95ZHNAv6A== +metro-babel-transformer@0.64.0: + version "0.64.0" + resolved "https://registry.yarnpkg.com/metro-babel-transformer/-/metro-babel-transformer-0.64.0.tgz#a21f8a989a5ea60c1109456e21bd4d9374194ea0" + integrity sha512-itZaxKTgmKGEZWxNzbSZBc22NngrMZzoUNuU92aHSTGkYi2WH4XlvzEHsstmIKHMsRVKl75cA+mNmgk4gBFJKw== dependencies: "@babel/core" "^7.0.0" - metro-source-map "0.58.0" + metro-source-map "0.64.0" + nullthrows "^1.1.1" -metro-babel-transformer@0.59.0: - version "0.59.0" - resolved "https://registry.yarnpkg.com/metro-babel-transformer/-/metro-babel-transformer-0.59.0.tgz#dda99c75d831b00142c42c020c51c103b29f199d" - integrity sha512-fdZJl8rs54GVFXokxRdD7ZrQ1TJjxWzOi/xSP25VR3E8tbm3nBZqS+/ylu643qSr/IueABR+jrlqAyACwGEf6w== - dependencies: - "@babel/core" "^7.0.0" - metro-source-map "0.59.0" +metro-cache-key@0.64.0: + version "0.64.0" + resolved "https://registry.yarnpkg.com/metro-cache-key/-/metro-cache-key-0.64.0.tgz#98d0a94332453c4c52b74f72c07cc62a5c264c4f" + integrity sha512-O9B65G8L/fopck45ZhdRosyVZdMtUQuX5mBWEC1NRj02iWBIUPLmYMjrunqIe8vHipCMp3DtTCm/65IlBmO8jg== -metro-cache@0.58.0: - version "0.58.0" - resolved "https://registry.yarnpkg.com/metro-cache/-/metro-cache-0.58.0.tgz#630ea0a4626dfb9591c71fdb85dce14b5e9a04ec" - integrity sha512-jjW9zCTKxhgKcVkyQ6LHyna9Zdf4TK/45vvT1fPyyTk1RY82ZYjU1qs+84ycKEd08Ka4YcK9xcUew9SIDJYI8Q== +metro-cache@0.64.0: + version "0.64.0" + resolved "https://registry.yarnpkg.com/metro-cache/-/metro-cache-0.64.0.tgz#a769503e12521d9e9d95ce5840ffb2efdb4e8703" + integrity sha512-QvGfxe/1QQYM9XOlR8W1xqE9eHDw/AgJIgYGn/TxZxBu9Zga+Rgs1omeSZju45D8w5VWgMr83ma5kACgzvOecg== dependencies: - jest-serializer "^24.4.0" - metro-core "0.58.0" + metro-core "0.64.0" mkdirp "^0.5.1" rimraf "^2.5.4" -metro-config@0.58.0, metro-config@^0.58.0: - version "0.58.0" - resolved "https://registry.yarnpkg.com/metro-config/-/metro-config-0.58.0.tgz#1e24b43a5a00971d75662b1a0d3c04a13d4a1746" - integrity sha512-4vgBliXwL56vjUlYplvGMVSNrJJpkHuLcD+O20trV3FvPxKg4ZsvuOcNSxqDSMU26FCtIEJ15ojcuCbRL7KY0w== +metro-config@0.64.0, metro-config@^0.64.0: + version "0.64.0" + resolved "https://registry.yarnpkg.com/metro-config/-/metro-config-0.64.0.tgz#b634fa05cffd06b1e50e4339c200f90a42924afb" + integrity sha512-QhM4asnX5KhlRWaugwVGNNXhX0Z85u5nK0UQ/A90bBb4xWyXqUe20e788VtdA75rkQiiI6wXTCIHWT0afbnjwQ== dependencies: cosmiconfig "^5.0.5" - jest-validate "^24.7.0" - metro "0.58.0" - metro-cache "0.58.0" - metro-core "0.58.0" - pretty-format "^24.7.0" - -metro-core@0.58.0, metro-core@^0.58.0: - version "0.58.0" - resolved "https://registry.yarnpkg.com/metro-core/-/metro-core-0.58.0.tgz#ad9f6645a2b439a3fbce7ce4e19b01b00375768a" - integrity sha512-RzXUjGFmCLOyzUqcKDvr91AldGtIOxnzNZrWUIiG8uC3kerVLo0mQp4YH3+XVm6fMNiLMg6iER7HLqD+MbpUjQ== - dependencies: - jest-haste-map "^24.7.1" + jest-validate "^26.5.2" + metro "0.64.0" + metro-cache "0.64.0" + metro-core "0.64.0" + metro-runtime "0.64.0" + +metro-core@0.64.0, metro-core@^0.64.0: + version "0.64.0" + resolved "https://registry.yarnpkg.com/metro-core/-/metro-core-0.64.0.tgz#7616b27acfe7baa476f6cd6bd9e70ae64fa62541" + integrity sha512-v8ZQ5j72EaUwamQ8pLfHlOHTyp7SbdazvHPzFGDpHnwIQqIT0Bw3Syg8R4regTlVG3ngpeSEAi005UITljmMcQ== + dependencies: + jest-haste-map "^26.5.2" lodash.throttle "^4.1.1" - metro-resolver "0.58.0" - wordwrap "^1.0.0" + metro-resolver "0.64.0" -metro-inspector-proxy@0.58.0: - version "0.58.0" - resolved "https://registry.yarnpkg.com/metro-inspector-proxy/-/metro-inspector-proxy-0.58.0.tgz#6fefb0cdf25655919d56c82ebe09cd26eb00e636" - integrity sha512-oFqTyNTJdCdvcw1Ha6SKE7ITbSaoTbO4xpYownIoJR+WZ0ZfxbWpp225JkHuBJm9UcBAnG9c0CME924m3uBbaw== +metro-hermes-compiler@0.64.0: + version "0.64.0" + resolved "https://registry.yarnpkg.com/metro-hermes-compiler/-/metro-hermes-compiler-0.64.0.tgz#e6043d7aa924e5b2be99bd3f602e693685d15386" + integrity sha512-CLAjVDWGAoGhbi2ZyPHnH5YDdfrDIx6+tzFWfHGIMTZkYBXsYta9IfYXBV8lFb6BIbrXLjlXZAOoosknetMPOA== + +metro-inspector-proxy@0.64.0: + version "0.64.0" + resolved "https://registry.yarnpkg.com/metro-inspector-proxy/-/metro-inspector-proxy-0.64.0.tgz#9a481b3f49773d5418e028178efec68f861bec88" + integrity sha512-KywbH3GNSz9Iqw4UH3smgaV2dBHHYMISeN7ORntDL/G+xfgPc6vt13d+zFb907YpUcXj5N0vdoiAHI5V/0y8IA== dependencies: connect "^3.6.5" debug "^2.2.0" - rxjs "^5.4.3" ws "^1.1.5" - yargs "^14.2.0" + yargs "^15.3.1" -metro-minify-uglify@0.58.0: - version "0.58.0" - resolved "https://registry.yarnpkg.com/metro-minify-uglify/-/metro-minify-uglify-0.58.0.tgz#7e1066954bfd4f767ba6aca7feef676ca44c68b8" - integrity sha512-vRHsA7bCi7eCn3LXLm20EfY2NoWDyYOnmWaq/N8LB0OxL2L5DXRqMYAQK+prWGJ5S1yvVnDuuNVP+peQ9851TA== +metro-minify-uglify@0.64.0: + version "0.64.0" + resolved "https://registry.yarnpkg.com/metro-minify-uglify/-/metro-minify-uglify-0.64.0.tgz#da6ab4dda030e3211f5924e7f41ed308d466068f" + integrity sha512-DRwRstqXR5qfte9Nuwoov5dRXxL7fJeVlO5fGyOajWeO3+AgPjvjXh/UcLJqftkMWTPGUFuzAD5/7JC5v5FLWw== dependencies: uglify-es "^3.1.9" -metro-react-native-babel-preset@0.58.0: - version "0.58.0" - resolved "https://registry.yarnpkg.com/metro-react-native-babel-preset/-/metro-react-native-babel-preset-0.58.0.tgz#18f48d33fe124280ffabc000ab8b42c488d762a2" - integrity sha512-MRriNW+fF6jxABsgPphocUY6mIhmCm8idcrQZ58fT3Iti2vCdtkaK32TyCGUNUptzhUe2/cbE57j4aC+eaodAA== +metro-react-native-babel-preset@0.64.0: + version "0.64.0" + resolved "https://registry.yarnpkg.com/metro-react-native-babel-preset/-/metro-react-native-babel-preset-0.64.0.tgz#76861408681dfda3c1d962eb31a8994918c976f8" + integrity sha512-HcZ0RWQRuJfpPiaHyFQJzcym+/dDIVUPwUAXWoub/C4GkGu+mPjp8vqK6g0FxokCnnI2TK0gZTza2IDfiNNscQ== dependencies: + "@babel/core" "^7.0.0" "@babel/plugin-proposal-class-properties" "^7.0.0" "@babel/plugin-proposal-export-default-from" "^7.0.0" "@babel/plugin-proposal-nullish-coalescing-operator" "^7.0.0" @@ -4560,6 +4757,8 @@ metro-react-native-babel-preset@0.58.0: "@babel/plugin-syntax-dynamic-import" "^7.0.0" "@babel/plugin-syntax-export-default-from" "^7.0.0" "@babel/plugin-syntax-flow" "^7.2.0" + "@babel/plugin-syntax-nullish-coalescing-operator" "^7.0.0" + "@babel/plugin-syntax-optional-chaining" "^7.0.0" "@babel/plugin-transform-arrow-functions" "^7.0.0" "@babel/plugin-transform-block-scoping" "^7.0.0" "@babel/plugin-transform-classes" "^7.0.0" @@ -4575,6 +4774,7 @@ metro-react-native-babel-preset@0.58.0: "@babel/plugin-transform-parameters" "^7.0.0" "@babel/plugin-transform-react-display-name" "^7.0.0" "@babel/plugin-transform-react-jsx" "^7.0.0" + "@babel/plugin-transform-react-jsx-self" "^7.0.0" "@babel/plugin-transform-react-jsx-source" "^7.0.0" "@babel/plugin-transform-regenerator" "^7.0.0" "@babel/plugin-transform-runtime" "^7.0.0" @@ -4587,7 +4787,7 @@ metro-react-native-babel-preset@0.58.0: "@babel/template" "^7.0.0" react-refresh "^0.4.0" -metro-react-native-babel-preset@0.59.0, metro-react-native-babel-preset@^0.59.0: +metro-react-native-babel-preset@^0.59.0: version "0.59.0" resolved "https://registry.yarnpkg.com/metro-react-native-babel-preset/-/metro-react-native-babel-preset-0.59.0.tgz#20e020bc6ac9849e1477de1333d303ed42aba225" integrity sha512-BoO6ncPfceIDReIH8pQ5tQptcGo5yRWQXJGVXfANbiKLq4tfgdZB1C1e2rMUJ6iypmeJU9dzl+EhPmIFKtgREg== @@ -4631,144 +4831,142 @@ metro-react-native-babel-preset@0.59.0, metro-react-native-babel-preset@^0.59.0: "@babel/template" "^7.0.0" react-refresh "^0.4.0" -metro-react-native-babel-transformer@0.59.0: - version "0.59.0" - resolved "https://registry.yarnpkg.com/metro-react-native-babel-transformer/-/metro-react-native-babel-transformer-0.59.0.tgz#9b3dfd6ad35c6ef37fc4ce4d20a2eb67fabbb4be" - integrity sha512-1O3wrnMq4NcPQ1asEcl9lRDn/t+F1Oef6S9WaYVIKEhg9m/EQRGVrrTVP+R6B5Eeaj3+zNKbzM8Dx/NWy1hUbQ== - dependencies: - "@babel/core" "^7.0.0" - babel-preset-fbjs "^3.3.0" - metro-babel-transformer "0.59.0" - metro-react-native-babel-preset "0.59.0" - metro-source-map "0.59.0" - -metro-react-native-babel-transformer@^0.58.0: - version "0.58.0" - resolved "https://registry.yarnpkg.com/metro-react-native-babel-transformer/-/metro-react-native-babel-transformer-0.58.0.tgz#5da0e5a1b83c01d11626905fa59f34fda53a21a5" - integrity sha512-3A73+cRq1eUPQ8g+hPNGgMUMCGmtQjwqHfoG1DwinAoJ/kr4WOXWWbGZo0xHJNBe/zdHGl0uHcDCp2knPglTdQ== +metro-react-native-babel-transformer@0.64.0, metro-react-native-babel-transformer@^0.64.0: + version "0.64.0" + resolved "https://registry.yarnpkg.com/metro-react-native-babel-transformer/-/metro-react-native-babel-transformer-0.64.0.tgz#eafef756972f20efdc51bd5361d55f8598355623" + integrity sha512-K1sHO3ODBFCr7uEiCQ4RvVr+cQg0EHQF8ChVPnecGh/WDD8udrTq9ECwB0dRfMjAvlsHtRUlJm6ZSI8UPgum2w== dependencies: "@babel/core" "^7.0.0" babel-preset-fbjs "^3.3.0" - metro-babel-transformer "0.58.0" - metro-react-native-babel-preset "0.58.0" - metro-source-map "0.58.0" + metro-babel-transformer "0.64.0" + metro-react-native-babel-preset "0.64.0" + metro-source-map "0.64.0" + nullthrows "^1.1.1" -metro-resolver@0.58.0, metro-resolver@^0.58.0: - version "0.58.0" - resolved "https://registry.yarnpkg.com/metro-resolver/-/metro-resolver-0.58.0.tgz#4d03edc52e2e25d45f16688adf3b3f268ea60df9" - integrity sha512-XFbAKvCHN2iWqKeiRARzEXn69eTDdJVJC7lu16S4dPQJ+Dy82dZBr5Es12iN+NmbJuFgrAuIHbpWrdnA9tOf6Q== +metro-resolver@0.64.0, metro-resolver@^0.64.0: + version "0.64.0" + resolved "https://registry.yarnpkg.com/metro-resolver/-/metro-resolver-0.64.0.tgz#21126b44f31346ac2ce0b06b77ef65e8c9e2294a" + integrity sha512-cJ26Id8Zf+HmS/1vFwu71K3u7ep/+HeXXAJIeVDYf+niE7AWB9FijyMtAlQgbD8elWqv1leJCnQ/xHRFBfGKYA== dependencies: absolute-path "^0.0.0" -metro-source-map@0.58.0: - version "0.58.0" - resolved "https://registry.yarnpkg.com/metro-source-map/-/metro-source-map-0.58.0.tgz#e951b99f4c653239ce9323bb08339c6f1978a112" - integrity sha512-yvN1YPmejmgiiS7T1aKBiiUTHPw2Vcm3r2TZ+DY92z/9PR4alysIywrCs/fTHs8rbDcKM5VfPCKGLpkBrbKeOw== - dependencies: - "@babel/traverse" "^7.0.0" - "@babel/types" "^7.0.0" - invariant "^2.2.4" - metro-symbolicate "0.58.0" - ob1 "0.58.0" - source-map "^0.5.6" - vlq "^1.0.0" +metro-runtime@0.64.0, metro-runtime@^0.64.0: + version "0.64.0" + resolved "https://registry.yarnpkg.com/metro-runtime/-/metro-runtime-0.64.0.tgz#cdaa1121d91041bf6345f2a69eb7c2fb289eff7b" + integrity sha512-m7XbWOaIOeFX7YcxUhmnOi6Pg8EaeL89xyZ+quZyZVF1aNoTr4w8FfbKxvijpjsytKHIZtd+43m2Wt5JrqyQmQ== -metro-source-map@0.59.0: - version "0.59.0" - resolved "https://registry.yarnpkg.com/metro-source-map/-/metro-source-map-0.59.0.tgz#e9beb9fc51bfb4e060f95820cf1508fc122d23f7" - integrity sha512-0w5CmCM+ybSqXIjqU4RiK40t4bvANL6lafabQ2GP2XD3vSwkLY+StWzCtsb4mPuyi9R/SgoLBel+ZOXHXAH0eQ== +metro-source-map@0.64.0: + version "0.64.0" + resolved "https://registry.yarnpkg.com/metro-source-map/-/metro-source-map-0.64.0.tgz#4310e17c3d4539c6369688022494ad66fa4d39a1" + integrity sha512-OCG2rtcp5cLEGYvAbfkl6mEc0J2FPRP4/UCEly+juBk7hawS9bCBMBfhJm/HIsvY1frk6nT2Vsl1O8YBbwyx2g== dependencies: "@babel/traverse" "^7.0.0" "@babel/types" "^7.0.0" invariant "^2.2.4" - metro-symbolicate "0.59.0" - ob1 "0.59.0" + metro-symbolicate "0.64.0" + nullthrows "^1.1.1" + ob1 "0.64.0" source-map "^0.5.6" vlq "^1.0.0" -metro-symbolicate@0.58.0: - version "0.58.0" - resolved "https://registry.yarnpkg.com/metro-symbolicate/-/metro-symbolicate-0.58.0.tgz#ba9fd52549c41fc1b656adaad7c8875726dd5abe" - integrity sha512-uIVxUQC1E26qOMj13dKROhwAa2FmZk5eR0NcBqej/aXmQhpr8LjJg2sondkoLKUp827Tf/Fm9+pS4icb5XiqCw== +metro-symbolicate@0.64.0: + version "0.64.0" + resolved "https://registry.yarnpkg.com/metro-symbolicate/-/metro-symbolicate-0.64.0.tgz#405c21438ab553c29f6841da52ca76ee87bb06ac" + integrity sha512-qIi+YRrDWnLVmydj6gwidYLPaBsakZRibGWSspuXgHAxOI3UuLwlo4dpQ73Et0gyHjI7ZvRMRY8JPiOntf9AQQ== dependencies: invariant "^2.2.4" - metro-source-map "0.58.0" + metro-source-map "0.64.0" + nullthrows "^1.1.1" source-map "^0.5.6" through2 "^2.0.1" vlq "^1.0.0" -metro-symbolicate@0.59.0: - version "0.59.0" - resolved "https://registry.yarnpkg.com/metro-symbolicate/-/metro-symbolicate-0.59.0.tgz#fc7f93957a42b02c2bfc57ed1e8f393f5f636a54" - integrity sha512-asLaF2A7rndrToGFIknL13aiohwPJ95RKHf0NM3hP/nipiLDoMzXT6ZnQvBqDxkUKyP+51AI75DMtb+Wcyw4Bw== +metro-transform-plugins@0.64.0: + version "0.64.0" + resolved "https://registry.yarnpkg.com/metro-transform-plugins/-/metro-transform-plugins-0.64.0.tgz#41d3dce0f2966bbd79fea1ecff61bcc8a00e4665" + integrity sha512-iTIRBD/wBI98plfxj8jAoNUUXfXLNlyvcjPtshhpGvdwu9pzQilGfnDnOaaK+vbITcOk9w5oQectXyJwAqTr1A== dependencies: - invariant "^2.2.4" - metro-source-map "0.59.0" - source-map "^0.5.6" - through2 "^2.0.1" - vlq "^1.0.0" + "@babel/core" "^7.0.0" + "@babel/generator" "^7.5.0" + "@babel/template" "^7.0.0" + "@babel/traverse" "^7.0.0" + nullthrows "^1.1.1" + +metro-transform-worker@0.64.0: + version "0.64.0" + resolved "https://registry.yarnpkg.com/metro-transform-worker/-/metro-transform-worker-0.64.0.tgz#f94429b2c42b13cb1c93be4c2e25e97f2d27ca60" + integrity sha512-wegRtK8GyLF6IPZRBJp+zsORgA4iX0h1DRpknyAMDCtSbJ4VU2xV/AojteOgAsDvY3ucAGsvfuZLNDJHUdUNHQ== + dependencies: + "@babel/core" "^7.0.0" + "@babel/generator" "^7.5.0" + "@babel/parser" "^7.0.0" + "@babel/types" "^7.0.0" + babel-preset-fbjs "^3.3.0" + metro "0.64.0" + metro-babel-transformer "0.64.0" + metro-cache "0.64.0" + metro-cache-key "0.64.0" + metro-hermes-compiler "0.64.0" + metro-source-map "0.64.0" + metro-transform-plugins "0.64.0" + nullthrows "^1.1.1" -metro@0.58.0, metro@^0.58.0: - version "0.58.0" - resolved "https://registry.yarnpkg.com/metro/-/metro-0.58.0.tgz#c037318c112f80dc96199780c8b401ab72cfd142" - integrity sha512-yi/REXX+/s4r7RjzXht+E+qE6nzvFIrEXO5Q61h+70Q7RODMU8EnlpXx04JYk7DevHuMhFaX+NWhCtRINzR4zA== +metro@0.64.0, metro@^0.64.0: + version "0.64.0" + resolved "https://registry.yarnpkg.com/metro/-/metro-0.64.0.tgz#0091a856cfbcc94dd576da563eee466e96186195" + integrity sha512-G2OC08Rzfs0kqnSEuKo2yZxR+/eNUpA93Ru45c60uN0Dw3HPrDi+ZBipgFftC6iLE0l+6hu8roFFIofotWxybw== dependencies: "@babel/code-frame" "^7.0.0" "@babel/core" "^7.0.0" "@babel/generator" "^7.5.0" "@babel/parser" "^7.0.0" - "@babel/plugin-external-helpers" "^7.0.0" "@babel/template" "^7.0.0" "@babel/traverse" "^7.0.0" "@babel/types" "^7.0.0" absolute-path "^0.0.0" + accepts "^1.3.7" async "^2.4.0" - babel-preset-fbjs "^3.3.0" - buffer-crc32 "^0.2.13" - chalk "^2.4.1" + chalk "^4.0.0" ci-info "^2.0.0" - concat-stream "^1.6.0" connect "^3.6.5" debug "^2.2.0" denodeify "^1.2.1" - eventemitter3 "^3.0.0" - fbjs "^1.0.0" + error-stack-parser "^2.0.6" fs-extra "^1.0.0" graceful-fs "^4.1.3" image-size "^0.6.0" invariant "^2.2.4" - jest-haste-map "^24.7.1" - jest-worker "^24.6.0" - json-stable-stringify "^1.0.1" + jest-haste-map "^26.5.2" + jest-worker "^26.0.0" lodash.throttle "^4.1.1" - merge-stream "^1.0.1" - metro-babel-register "0.58.0" - metro-babel-transformer "0.58.0" - metro-cache "0.58.0" - metro-config "0.58.0" - metro-core "0.58.0" - metro-inspector-proxy "0.58.0" - metro-minify-uglify "0.58.0" - metro-react-native-babel-preset "0.58.0" - metro-resolver "0.58.0" - metro-source-map "0.58.0" - metro-symbolicate "0.58.0" - mime-types "2.1.11" + metro-babel-register "0.64.0" + metro-babel-transformer "0.64.0" + metro-cache "0.64.0" + metro-cache-key "0.64.0" + metro-config "0.64.0" + metro-core "0.64.0" + metro-hermes-compiler "0.64.0" + metro-inspector-proxy "0.64.0" + metro-minify-uglify "0.64.0" + metro-react-native-babel-preset "0.64.0" + metro-resolver "0.64.0" + metro-runtime "0.64.0" + metro-source-map "0.64.0" + metro-symbolicate "0.64.0" + metro-transform-plugins "0.64.0" + metro-transform-worker "0.64.0" + mime-types "^2.1.27" mkdirp "^0.5.1" node-fetch "^2.2.0" nullthrows "^1.1.1" - resolve "^1.5.0" rimraf "^2.5.4" serialize-error "^2.1.0" source-map "^0.5.6" - strip-ansi "^4.0.0" + strip-ansi "^6.0.0" temp "0.8.3" - throat "^4.1.0" - wordwrap "^1.0.0" - write-file-atomic "^1.2.0" + throat "^5.0.0" ws "^1.1.5" - xpipe "^1.0.5" - yargs "^14.2.0" + yargs "^15.3.1" micromatch@^3.1.10, micromatch@^3.1.4: version "3.1.10" @@ -4802,17 +5000,10 @@ mime-db@1.44.0, "mime-db@>= 1.43.0 < 2": resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92" integrity sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg== -mime-db@~1.23.0: - version "1.23.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.23.0.tgz#a31b4070adaea27d732ea333740a64d0ec9a6659" - integrity sha1-oxtAcK2uon1zLqMzdApk0OyaZlk= - -mime-types@2.1.11: - version "2.1.11" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.11.tgz#c259c471bda808a85d6cd193b430a5fae4473b3c" - integrity sha1-wlnEcb2oCKhdbNGTtDCl+uRHOzw= - dependencies: - mime-db "~1.23.0" +mime-db@1.52.0: + version "1.52.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" + integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== mime-types@^2.1.12, mime-types@~2.1.19, mime-types@~2.1.24: version "2.1.27" @@ -4821,6 +5012,13 @@ mime-types@^2.1.12, mime-types@~2.1.19, mime-types@~2.1.24: dependencies: mime-db "1.44.0" +mime-types@^2.1.27, mime-types@~2.1.34: + version "2.1.35" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" + integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== + dependencies: + mime-db "1.52.0" + mime@1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" @@ -4841,6 +5039,13 @@ mimic-fn@^2.1.0: resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== +minimatch@^3.0.2, minimatch@^3.1.1: + version "3.1.2" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== + dependencies: + brace-expansion "^1.1.7" + minimatch@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" @@ -4883,21 +5088,11 @@ ms@^2.1.1: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -mute-stream@0.0.7: - version "0.0.7" - resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" - integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s= - mute-stream@0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== -nan@^2.12.1: - version "2.14.1" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.1.tgz#d7be34dfa3105b91494c3147089315eff8874b01" - integrity sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw== - nanomatch@^1.2.9: version "1.2.13" resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" @@ -4925,18 +5120,32 @@ negotiator@0.6.2: resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw== +negotiator@0.6.3: + version "0.6.3" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" + integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== + +neo-async@^2.5.0: + version "2.6.2" + resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" + integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== + nice-try@^1.0.4: version "1.0.5" resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== -node-fetch@^1.0.1: - version "1.7.3" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef" - integrity sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ== +nocache@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/nocache/-/nocache-2.1.0.tgz#120c9ffec43b5729b1d5de88cd71aa75a0ba491f" + integrity sha512-0L9FvHG3nfnnmaEQPjT9xhfN4ISk0A8/2j4M37Np4mcDesJjHgEUfgPhdCyZuFI954tjokaIj/A3NdpFNdEh4Q== + +node-dir@^0.1.17: + version "0.1.17" + resolved "https://registry.yarnpkg.com/node-dir/-/node-dir-0.1.17.tgz#5f5665d93351335caabef8f1c554516cf5f1e4e5" + integrity sha512-tmPX422rYgofd4epzrNoOXiE8XFZYOcCq1vD7MAXCDO+O+zndlA2ztdKKMa+EeuBG5tHETpr4ml4RGgpqDCCAg== dependencies: - encoding "^0.1.11" - is-stream "^1.0.1" + minimatch "^3.0.2" node-fetch@^2.2.0, node-fetch@^2.6.0: version "2.6.0" @@ -4964,6 +5173,11 @@ node-notifier@^6.0.0: shellwords "^0.1.1" which "^1.3.1" +node-releases@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.6.tgz#8a7088c63a55e493845683ebf3c828d8c51c5503" + integrity sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg== + node-stream-zip@^1.9.1: version "1.11.3" resolved "https://registry.yarnpkg.com/node-stream-zip/-/node-stream-zip-1.11.3.tgz#223892620b4889bce9782b256a76682631c507be" @@ -5020,17 +5234,12 @@ oauth-sign@~0.9.0: resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== -ob1@0.58.0: - version "0.58.0" - resolved "https://registry.yarnpkg.com/ob1/-/ob1-0.58.0.tgz#484a1e9a63a8b79d9ea6f3a83b2a42110faac973" - integrity sha512-uZP44cbowAfHafP1k4skpWItk5iHCoRevMfrnUvYCfyNNPPJd3rfDCyj0exklWi2gDXvjlj2ObsfiqP/bs/J7Q== - -ob1@0.59.0: - version "0.59.0" - resolved "https://registry.yarnpkg.com/ob1/-/ob1-0.59.0.tgz#ee103619ef5cb697f2866e3577da6f0ecd565a36" - integrity sha512-opXMTxyWJ9m68ZglCxwo0OPRESIC/iGmKFPXEXzMZqsVIrgoRXOHmoMDkQzz4y3irVjbyPJRAh5pI9fd0MJTFQ== +ob1@0.64.0: + version "0.64.0" + resolved "https://registry.yarnpkg.com/ob1/-/ob1-0.64.0.tgz#f254a55a53ca395c4f9090e28a85483eac5eba19" + integrity sha512-CO1N+5dhvy+MoAwxz8+fymEUcwsT4a+wHhrHFb02LppcJdHxgcBWviwEhUwKOD2kLMQ7ijrrzybOqpGcqEtvpQ== -object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: +object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= @@ -5247,11 +5456,6 @@ parse-json@^5.0.0: json-parse-even-better-errors "^2.3.0" lines-and-columns "^1.1.6" -parse-node-version@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/parse-node-version/-/parse-node-version-1.0.1.tgz#e2b5dbede00e7fa9bc363607f53327e8b073189b" - integrity sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA== - parse5@5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/parse5/-/parse5-5.1.0.tgz#c59341c9723f414c452975564c7c00a68d58acd2" @@ -5297,11 +5501,21 @@ path-parse@^1.0.6: resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== +path-parse@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" + integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== + performance-now@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= +picocolors@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" + integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== + picomatch@^2.0.4, picomatch@^2.0.5: version "2.2.2" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" @@ -5342,17 +5556,6 @@ plist@^3.0.1: xmlbuilder "^9.0.7" xmldom "0.1.x" -plugin-error@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/plugin-error/-/plugin-error-0.1.2.tgz#3b9bb3335ccf00f425e07437e19276967da47ace" - integrity sha1-O5uzM1zPAPQl4HQ34ZJ2ln2kes4= - dependencies: - ansi-cyan "^0.1.1" - ansi-red "^0.1.1" - arr-diff "^1.0.1" - arr-union "^2.0.1" - extend-shallow "^1.1.2" - pn@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/pn/-/pn-1.1.0.tgz#e2f4cef0e219f463c179ab37463e4e1ecdccbafb" @@ -5380,17 +5583,7 @@ prettier@^2.0.2: resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.1.0.tgz#5a9789f767a243118c60f3e56d95cb6544914fbb" integrity sha512-lz28cCbA1cDFHVuY8vvj6QuqOwIpyIfPUYkSl8AZ/vxH8qBXMMjE2knfLHCrZCmUsK/H1bg1P0tOo0dJkTJHvw== -pretty-format@^24.7.0, pretty-format@^24.9.0: - version "24.9.0" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-24.9.0.tgz#12fac31b37019a4eea3c11aa9a959eb7628aa7c9" - integrity sha512-00ZMZUiHaJrNfk33guavqgvfJS30sLYf0f8+Srklv0AMPodGGHcoHgksZ3OThYnIvOd+8yMCn0YiEOogjlgsnA== - dependencies: - "@jest/types" "^24.9.0" - ansi-regex "^4.0.0" - ansi-styles "^3.2.0" - react-is "^16.8.4" - -pretty-format@^25.1.0, pretty-format@^25.2.0, pretty-format@^25.5.0: +pretty-format@^25.5.0: version "25.5.0" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-25.5.0.tgz#7873c1d774f682c34b8d48b6743a2bf2ac55791a" integrity sha512-kbo/kq2LQ/A/is0PQwsEHM7Ca6//bGPPvU6UnsdDRSKTWxT/ru/xb88v4BJf6a69H+uTytOEsTusT9ksd/1iWQ== @@ -5400,6 +5593,16 @@ pretty-format@^25.1.0, pretty-format@^25.2.0, pretty-format@^25.5.0: ansi-styles "^4.0.0" react-is "^16.12.0" +pretty-format@^26.5.2, pretty-format@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-26.6.2.tgz#e35c2705f14cb7fe2fe94fa078345b444120fc93" + integrity sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg== + dependencies: + "@jest/types" "^26.6.2" + ansi-regex "^5.0.0" + ansi-styles "^4.0.0" + react-is "^17.0.1" + process-nextick-args@~2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" @@ -5410,13 +5613,6 @@ progress@^2.0.0: resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== -promise@^7.1.1: - version "7.3.1" - resolved "https://registry.yarnpkg.com/promise/-/promise-7.3.1.tgz#064b72602b18f90f29192b8b1bc418ffd1ebd3bf" - integrity sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg== - dependencies: - asap "~2.0.3" - promise@^8.0.3: version "8.1.0" resolved "https://registry.yarnpkg.com/promise/-/promise-8.1.0.tgz#697c25c3dfe7435dd79fcd58c38a135888eaf05e" @@ -5432,6 +5628,14 @@ prompts@^2.0.1: kleur "^3.0.3" sisteransi "^1.0.4" +prompts@^2.4.0: + version "2.4.2" + resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.2.tgz#7b57e73b3a48029ad10ebd44f74b01722a4cb069" + integrity sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q== + dependencies: + kleur "^3.0.3" + sisteransi "^1.0.5" + prop-types@^15.6.2, prop-types@^15.7.2: version "15.7.2" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5" @@ -5441,11 +5645,6 @@ prop-types@^15.6.2, prop-types@^15.7.2: object-assign "^4.1.1" react-is "^16.8.1" -pseudomap@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" - integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM= - psl@^1.1.28: version "1.8.0" resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24" @@ -5482,47 +5681,66 @@ react-devtools-core@^4.6.0: shell-quote "^1.6.1" ws "^7" -react-is@^16.12.0, react-is@^16.8.1, react-is@^16.8.4, react-is@^16.8.6: +react-is@^16.12.0, react-is@^16.8.1, react-is@^16.8.6: version "16.13.1" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== +react-is@^17.0.1: + version "17.0.2" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0" + integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w== + +react-native-codegen@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/react-native-codegen/-/react-native-codegen-0.0.6.tgz#b3173faa879cf71bfade8d030f9c4698388f6909" + integrity sha512-cMvrUelD81wiPitEPiwE/TCNscIVauXxmt4NTGcy18HrUd0WRWXfYzAQGXm0eI87u3NMudNhqFj2NISJenxQHg== + dependencies: + flow-parser "^0.121.0" + jscodeshift "^0.11.0" + nullthrows "^1.1.1" + "react-native-tcp-socket@link:../..": version "0.0.0" uid "" -react-native@0.63.2: - version "0.63.2" - resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.63.2.tgz#eaebf3430577b37fbd66ef228a86b3408259ef8e" - integrity sha512-MkxHeJorUDzmQwKJrTfrFYMDRLyu9GSBpsFFMDX7X+HglVnaZi3CTzW2mRv1eIcazoseBOP2eJe+bnkyLl8Y2A== - dependencies: - "@babel/runtime" "^7.0.0" - "@react-native-community/cli" "^4.7.0" - "@react-native-community/cli-platform-android" "^4.7.0" - "@react-native-community/cli-platform-ios" "^4.7.0" +react-native@0.64.0: + version "0.64.0" + resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.64.0.tgz#c3bde5b638bf8bcf12bae6e094930d39cb942ab7" + integrity sha512-8dhSHBthgGwAjU+OjqUEA49229ThPMQH7URH0u8L0xoQFCnZO2sZ9Wc6KcbxI0x9KSmjCMFFZqRe3w3QsRv64g== + dependencies: + "@jest/create-cache-key-function" "^26.5.0" + "@react-native-community/cli" "^5.0.1-alpha.0" + "@react-native-community/cli-platform-android" "^5.0.1-alpha.0" + "@react-native-community/cli-platform-ios" "^5.0.1-alpha.0" + "@react-native/assets" "1.0.0" + "@react-native/normalize-color" "1.0.0" + "@react-native/polyfills" "1.0.0" abort-controller "^3.0.0" anser "^1.4.9" base64-js "^1.1.2" event-target-shim "^5.0.1" - fbjs "^1.0.0" - fbjs-scripts "^1.1.0" - hermes-engine "~0.5.0" + hermes-engine "~0.7.0" invariant "^2.2.4" jsc-android "^245459.0.0" - metro-babel-register "0.59.0" - metro-react-native-babel-transformer "0.59.0" - metro-source-map "0.59.0" + metro-babel-register "0.64.0" + metro-react-native-babel-transformer "0.64.0" + metro-runtime "0.64.0" + metro-source-map "0.64.0" nullthrows "^1.1.1" - pretty-format "^24.9.0" + pretty-format "^26.5.2" promise "^8.0.3" prop-types "^15.7.2" react-devtools-core "^4.6.0" + react-native-codegen "^0.0.6" react-refresh "^0.4.0" regenerator-runtime "^0.13.2" - scheduler "0.19.1" + scheduler "^0.20.1" + shelljs "^0.8.4" stacktrace-parser "^0.1.3" use-subscription "^1.0.0" whatwg-fetch "^3.0.0" + ws "^6.1.4" react-refresh@^0.4.0: version "0.4.3" @@ -5539,14 +5757,13 @@ react-test-renderer@16.13.1: react-is "^16.8.6" scheduler "^0.19.1" -react@16.13.1: - version "16.13.1" - resolved "https://registry.yarnpkg.com/react/-/react-16.13.1.tgz#2e818822f1a9743122c063d6410d85c1e3afe48e" - integrity sha512-YMZQQq32xHLX0bz5Mnibv1/LHb3Sqzngu7xstSM+vrkE5Kzr9xE0yMByK5kMoTK30YVJE61WfbxIFFvfeDKT1w== +react@17.0.1: + version "17.0.1" + resolved "https://registry.yarnpkg.com/react/-/react-17.0.1.tgz#6e0600416bd57574e3f86d92edba3d9008726127" + integrity sha512-lG9c9UuMHdcAexXtigOZLX8exLWkW0Ku29qPRU8uhF2R9BN96dLCt0psvzPLlHc5OWkgymP3qwTRgbnw5BKx3w== dependencies: loose-envify "^1.1.0" object-assign "^4.1.1" - prop-types "^15.6.2" read-pkg-up@^7.0.1: version "7.0.1" @@ -5567,7 +5784,7 @@ read-pkg@^5.2.0: parse-json "^5.0.0" type-fest "^0.6.0" -readable-stream@^2.0.1, readable-stream@^2.2.2, readable-stream@~2.3.6: +readable-stream@~2.3.6: version "2.3.7" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== @@ -5585,6 +5802,23 @@ realpath-native@^2.0.0: resolved "https://registry.yarnpkg.com/realpath-native/-/realpath-native-2.0.0.tgz#7377ac429b6e1fd599dc38d08ed942d0d7beb866" integrity sha512-v1SEYUOXXdbBZK8ZuNgO4TBjamPsiSgcFr0aP+tEKpQZK8vooEUqV6nm6Cv502mX4NF2EfsnVqtNAHG+/6Ur1Q== +recast@^0.20.3: + version "0.20.5" + resolved "https://registry.yarnpkg.com/recast/-/recast-0.20.5.tgz#8e2c6c96827a1b339c634dd232957d230553ceae" + integrity sha512-E5qICoPoNL4yU0H0NoBDntNB0Q5oMSNh9usFctYniLBluTthi3RsQVBXIJNbApOlvSwW/RGxIuokPcAc59J5fQ== + dependencies: + ast-types "0.14.2" + esprima "~4.0.0" + source-map "~0.6.1" + tslib "^2.0.1" + +rechoir@^0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" + integrity sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw== + dependencies: + resolve "^1.1.6" + regenerate-unicode-properties@^8.2.0: version "8.2.0" resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-8.2.0.tgz#e5de7111d655e7ba60c057dbe9ff37c87e65cdec" @@ -5758,7 +5992,16 @@ resolve@1.1.7: resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs= -resolve@^1.10.0, resolve@^1.12.0, resolve@^1.15.1, resolve@^1.17.0, resolve@^1.3.2, resolve@^1.5.0, resolve@^1.8.1: +resolve@^1.1.6: + version "1.22.1" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" + integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== + dependencies: + is-core-module "^2.9.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + +resolve@^1.10.0, resolve@^1.12.0, resolve@^1.15.1, resolve@^1.17.0, resolve@^1.3.2, resolve@^1.8.1: version "1.17.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== @@ -5786,7 +6029,7 @@ ret@~0.1.10: resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== -rimraf@2.6.3: +rimraf@2.6.3, rimraf@~2.6.2: version "2.6.3" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== @@ -5817,30 +6060,11 @@ rsvp@^4.8.4: resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-4.8.5.tgz#c8f155311d167f68f21e168df71ec5b083113734" integrity sha512-nfMOlASu9OnRJo1mbEk2cz0D56a1MBNrJ7orjRZQG10XDyuvwksKbuXNp6qa+kbn839HwjwhBzhFmdsaEAfauA== -run-async@^2.2.0, run-async@^2.4.0: +run-async@^2.4.0: version "2.4.1" resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ== -rx-lite-aggregates@^4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz#753b87a89a11c95467c4ac1626c4efc4e05c67be" - integrity sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74= - dependencies: - rx-lite "*" - -rx-lite@*, rx-lite@^4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-4.0.8.tgz#0b1e11af8bc44836f04a6407e92da42467b79444" - integrity sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ= - -rxjs@^5.4.3: - version "5.5.12" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.5.12.tgz#6fa61b8a77c3d793dbaf270bee2f43f652d741cc" - integrity sha512-xx2itnL5sBbqeeiVgNPVuQQ1nC8Jp2WfNJhXWHmElW9YmrpS9UVnNzhP3EH3HFqexO5Tlp8GhYY+WEcqcVMvGw== - dependencies: - symbol-observable "1.0.1" - rxjs@^6.6.0: version "6.6.2" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.2.tgz#8096a7ac03f2cc4fe5860ef6e572810d9e01c0d2" @@ -5865,7 +6089,7 @@ safe-regex@^1.1.0: dependencies: ret "~0.1.10" -"safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: +"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== @@ -5897,7 +6121,7 @@ saxes@^3.1.9: dependencies: xmlchars "^2.1.1" -scheduler@0.19.1, scheduler@^0.19.1: +scheduler@^0.19.1: version "0.19.1" resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.19.1.tgz#4f3e2ed2c1a7d65681f4c854fa8c5a1ccb40f196" integrity sha512-n/zwRWRYSUj0/3g/otKDRPMh6qv2SYMWNq85IEa8iZyAv8od9zDYpGSnpBEjNgcMNq6Scbu5KfIPxNF72R/2EA== @@ -5905,7 +6129,15 @@ scheduler@0.19.1, scheduler@^0.19.1: loose-envify "^1.1.0" object-assign "^4.1.1" -"semver@2 || 3 || 4 || 5", semver@^5.1.0, semver@^5.4.1, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0: +scheduler@^0.20.1: + version "0.20.2" + resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.20.2.tgz#4baee39436e34aa93b4874bddcbf0fe8b8b50e91" + integrity sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ== + dependencies: + loose-envify "^1.1.0" + object-assign "^4.1.1" + +"semver@2 || 3 || 4 || 5", semver@^5.4.1, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0: version "5.7.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== @@ -5969,11 +6201,6 @@ set-value@^2.0.0, set-value@^2.0.1: is-plain-object "^2.0.3" split-string "^3.0.1" -setimmediate@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" - integrity sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU= - setprototypeof@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.1.tgz#7e95acb24aa92f5885e0abef5ba131330d4ae683" @@ -6018,6 +6245,15 @@ shell-quote@^1.6.1: resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.7.2.tgz#67a7d02c76c9da24f99d20808fcaded0e0e04be2" integrity sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg== +shelljs@^0.8.4: + version "0.8.5" + resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.5.tgz#de055408d8361bed66c669d2f000538ced8ee20c" + integrity sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow== + dependencies: + glob "^7.0.0" + interpret "^1.0.0" + rechoir "^0.6.2" + shellwords@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b" @@ -6045,16 +6281,11 @@ simple-plist@^1.0.0: bplist-parser "0.2.0" plist "^3.0.1" -sisteransi@^1.0.4: +sisteransi@^1.0.4, sisteransi@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" integrity sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg== -slash@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-2.0.0.tgz#de552851a1759df3a8f206535442f5ec4ddeab44" - integrity sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A== - slash@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" @@ -6069,11 +6300,6 @@ slice-ansi@^2.0.0, slice-ansi@^2.1.0: astral-regex "^1.0.0" is-fullwidth-code-point "^2.0.0" -slide@^1.1.5: - version "1.1.6" - resolved "https://registry.yarnpkg.com/slide/-/slide-1.1.6.tgz#56eb027d65b4d2dce6cb2e2d32c4d4afc9e1d707" - integrity sha1-VusCfWW00tzmyy4tMsTUr8nh1wc= - snapdragon-node@^2.0.1: version "2.1.1" resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" @@ -6201,6 +6427,11 @@ stack-utils@^1.0.1: resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-1.0.2.tgz#33eba3897788558bebfc2db059dc158ec36cebb8" integrity sha512-MTX+MeG5U994cazkjd/9KNAapsHnibjMLnfXodlkXw76JEea0UiNzrqidzo1emMwk7w5Qhc9jd4Bn9TBb1MFwA== +stackframe@^1.3.4: + version "1.3.4" + resolved "https://registry.yarnpkg.com/stackframe/-/stackframe-1.3.4.tgz#b881a004c8c149a5e8efef37d51b16e412943310" + integrity sha512-oeVtt7eWQS+Na6F//S4kJ2K2VbRlS9D43mAlMyVpVWovy9o+jfgH8O9agzANzaiLjclA0oYzUXEM4PurhSUChw== + stacktrace-parser@^0.1.3: version "0.1.10" resolved "https://registry.yarnpkg.com/stacktrace-parser/-/stacktrace-parser-0.1.10.tgz#29fb0cae4e0d0b85155879402857a1639eb6051a" @@ -6239,15 +6470,7 @@ string-length@^3.1.0: astral-regex "^1.0.0" strip-ansi "^5.2.0" -string-width@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" - integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== - dependencies: - is-fullwidth-code-point "^2.0.0" - strip-ansi "^4.0.0" - -string-width@^3.0.0, string-width@^3.1.0: +string-width@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== @@ -6300,13 +6523,6 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" -strip-ansi@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" - integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= - dependencies: - ansi-regex "^3.0.0" - strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" @@ -6353,13 +6569,6 @@ supports-color@^5.3.0: dependencies: has-flag "^3.0.0" -supports-color@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.1.0.tgz#0764abc69c63d5ac842dd4867e8d025e880df8f3" - integrity sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ== - dependencies: - has-flag "^3.0.0" - supports-color@^7.0.0, supports-color@^7.1.0: version "7.1.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.1.0.tgz#68e32591df73e25ad1c4b49108a2ec507962bfd1" @@ -6375,10 +6584,10 @@ supports-hyperlinks@^2.0.0: has-flag "^4.0.0" supports-color "^7.0.0" -symbol-observable@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.1.tgz#8340fc4702c3122df5d22288f88283f513d3fdd4" - integrity sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ= +supports-preserve-symlinks-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" + integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== symbol-tree@^3.2.2: version "3.2.4" @@ -6403,6 +6612,13 @@ temp@0.8.3: os-tmpdir "^1.0.0" rimraf "~2.2.6" +temp@^0.8.1: + version "0.8.4" + resolved "https://registry.yarnpkg.com/temp/-/temp-0.8.4.tgz#8c97a33a4770072e0a05f919396c7665a7dd59f2" + integrity sha512-s0ZZzd0BzYv5tLSptZooSjK8oj6C+c19p7Vqta9+6NPOf7r+fxq0cJe6/oN4LTC79sy5NY8ucOJNgwsKCSbfqg== + dependencies: + rimraf "~2.6.2" + terminal-link@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/terminal-link/-/terminal-link-2.1.1.tgz#14a64a27ab3c0df933ea546fba55f2d078edc994" @@ -6425,17 +6641,12 @@ text-table@^0.2.0: resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= -throat@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/throat/-/throat-4.1.0.tgz#89037cbc92c56ab18926e6ba4cbb200e15672a6a" - integrity sha1-iQN8vJLFarGJJua6TLsgDhVnKmo= - throat@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/throat/-/throat-5.0.0.tgz#c5199235803aad18754a667d659b5e72ce16764b" integrity sha512-fcwX4mndzpLQKBS1DVYhGAcYaYt7vsHNIvQV+WXMvnow5cgjPphq5CaayLaGsjRdSCKZFNGt7/GYAuXaNOiYCA== -through2@^2.0.0, through2@^2.0.1: +through2@^2.0.1: version "2.0.5" resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== @@ -6448,11 +6659,6 @@ through@^2.3.6: resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= -time-stamp@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/time-stamp/-/time-stamp-1.1.0.tgz#764a5a11af50561921b133f3b44e618687e0f5c3" - integrity sha1-dkpaEa9QVhkhsTPztE5hhofg9cM= - tmp@^0.0.33: version "0.0.33" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" @@ -6536,6 +6742,11 @@ tslib@^1.8.1, tslib@^1.9.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.13.0.tgz#c881e13cc7015894ed914862d276436fa9a47043" integrity sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q== +tslib@^2.0.1: + version "2.4.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3" + integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ== + tsutils@^3.17.1: version "3.17.1" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.17.1.tgz#ed719917f11ca0dee586272b2ac49e015a2dd759" @@ -6594,21 +6805,11 @@ typedarray-to-buffer@^3.1.5: dependencies: is-typedarray "^1.0.0" -typedarray@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" - integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= - typescript@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.2.3.tgz#39062d8019912d43726298f09493d598048c1ce3" integrity sha512-qOcYwxaByStAWrBf4x0fibwZvMRG+r4cQoTjbPtUlrWjBHbmCAww1i448U0GJ+3cNNEtebDteo/cHOR3xJ4wEw== -ua-parser-js@^0.7.18: - version "0.7.21" - resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.21.tgz#853cf9ce93f642f67174273cc34565ae6f308777" - integrity sha512-+O8/qh/Qj8CgC6eYBVBykMrNtp5Gebn4dlGD/kKXVkJNDwyrAwSIqwz8CDf+tsAIWVycKcku6gIXJ0qwx/ZXaQ== - uglify-es@^3.1.9: version "3.3.9" resolved "https://registry.yarnpkg.com/uglify-es/-/uglify-es-3.3.9.tgz#0c1c4f0700bed8dbc124cdb304d2592ca203e677" @@ -6673,6 +6874,14 @@ unset-value@^1.0.0: has-value "^0.3.1" isobject "^3.0.0" +update-browserslist-db@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.5.tgz#be06a5eedd62f107b7c19eb5bcefb194411abf38" + integrity sha512-dteFFpCyvuDdr9S/ff1ISkKt/9YZxKjI9WlRR99c180GaztJtRa/fn18FdxGVKVsnPY7/a/FDN68mcvUmP4U7Q== + dependencies: + escalade "^3.1.1" + picocolors "^1.0.0" + uri-js@^4.2.2: version "4.2.2" resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" @@ -6795,7 +7004,7 @@ whatwg-encoding@^1.0.1, whatwg-encoding@^1.0.5: dependencies: iconv-lite "0.4.24" -whatwg-fetch@>=0.10.0, whatwg-fetch@^3.0.0: +whatwg-fetch@^3.0.0: version "3.4.0" resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-3.4.0.tgz#e11de14f4878f773fbebcde8871b2c0699af8b30" integrity sha512-rsum2ulz2iuZH08mJkT0Yi6JnKhwdw4oeyMjokgxd+mmqYSd9cPpOQf01TIWgjxG/U4+QR+AwKq6lSbXVxkyoQ== @@ -6838,20 +7047,6 @@ word-wrap@~1.2.3: resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== -wordwrap@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" - integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus= - -wrap-ansi@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" - integrity sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q== - dependencies: - ansi-styles "^3.2.0" - string-width "^3.0.0" - strip-ansi "^5.0.0" - wrap-ansi@^6.2.0: version "6.2.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" @@ -6866,14 +7061,14 @@ wrappy@1: resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= -write-file-atomic@^1.2.0: - version "1.3.4" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-1.3.4.tgz#f807a4f0b1d9e913ae7a48112e6cc3af1991b45f" - integrity sha1-+Aek8LHZ6ROuekgRLmzDrxmRtF8= +write-file-atomic@^2.3.0: + version "2.4.3" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.4.3.tgz#1fd2e9ae1df3e75b8d8c367443c692d4ca81f481" + integrity sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ== dependencies: graceful-fs "^4.1.11" imurmurhash "^0.1.4" - slide "^1.1.5" + signal-exit "^3.0.2" write-file-atomic@^3.0.0: version "3.0.3" @@ -6900,6 +7095,13 @@ ws@^1.1.0, ws@^1.1.5: options ">=0.0.5" ultron "1.0.x" +ws@^6.1.4: + version "6.2.2" + resolved "https://registry.yarnpkg.com/ws/-/ws-6.2.2.tgz#dd5cdbd57a9979916097652d78f1cc5faea0c32e" + integrity sha512-zmhltoSR8u1cnDsD43TX59mzoMZsLKqUweyYBAIvTngR3shc0W6aOZylZmq/7hqyVxPdi+5Ud2QInblgyE72fw== + dependencies: + async-limiter "~1.0.0" + ws@^7, ws@^7.0.0: version "7.3.1" resolved "https://registry.yarnpkg.com/ws/-/ws-7.3.1.tgz#d0547bf67f7ce4f12a72dfe31262c68d7dc551c8" @@ -6940,11 +7142,6 @@ xmldom@0.1.x: resolved "https://registry.yarnpkg.com/xmldom/-/xmldom-0.1.31.tgz#b76c9a1bd9f0a9737e5a72dc37231cf38375e2ff" integrity sha512-yS2uJflVQs6n+CyjHoaBmVSqIDevTAWrzMmjG1Gc7h1qQ7uVozNhEPJAwZXWyGQ/Gafo3fCwrcaokezLPupVyQ== -xpipe@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/xpipe/-/xpipe-1.0.5.tgz#8dd8bf45fc3f7f55f0e054b878f43a62614dafdf" - integrity sha1-jdi/Rfw/f1Xw4FS4ePQ6YmFNr98= - xregexp@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/xregexp/-/xregexp-4.3.0.tgz#7e92e73d9174a99a59743f67a4ce879a04b5ae50" @@ -6962,19 +7159,6 @@ y18n@^4.0.0: resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w== -yallist@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" - integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= - -yargs-parser@^15.0.1: - version "15.0.1" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-15.0.1.tgz#54786af40b820dcb2fb8025b11b4d659d76323b3" - integrity sha512-0OAMV2mAZQrs3FkNpDQcBk1x5HXb8X4twADss4S0Iuk+2dGnLOE/fRHrsYm542GduMveyA77OF4wrNJuanRCWw== - dependencies: - camelcase "^5.0.0" - decamelize "^1.2.0" - yargs-parser@^18.1.2: version "18.1.3" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0" @@ -6983,23 +7167,6 @@ yargs-parser@^18.1.2: camelcase "^5.0.0" decamelize "^1.2.0" -yargs@^14.2.0: - version "14.2.3" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-14.2.3.tgz#1a1c3edced1afb2a2fea33604bc6d1d8d688a414" - integrity sha512-ZbotRWhF+lkjijC/VhmOT9wSgyBQ7+zr13+YLkhfsSiTriYsMzkTUFP18pFhWwBeMa5gUc1MzbhrO6/VB7c9Xg== - dependencies: - cliui "^5.0.0" - decamelize "^1.2.0" - find-up "^3.0.0" - get-caller-file "^2.0.1" - require-directory "^2.1.1" - require-main-filename "^2.0.0" - set-blocking "^2.0.0" - string-width "^3.0.0" - which-module "^2.0.0" - y18n "^4.0.0" - yargs-parser "^15.0.1" - yargs@^15.1.0, yargs@^15.3.1: version "15.4.1" resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8" diff --git a/ios/.clang-format b/ios/.clang-format new file mode 100644 index 0000000..e1f1075 --- /dev/null +++ b/ios/.clang-format @@ -0,0 +1 @@ +IndentWidth: 4 \ No newline at end of file diff --git a/ios/TcpSocketClient.h b/ios/TcpSocketClient.h index 109fcb2..abbdd82 100644 --- a/ios/TcpSocketClient.h +++ b/ios/TcpSocketClient.h @@ -1,18 +1,18 @@ -#import #import "CocoaAsyncSocket/GCDAsyncSocket.h" +#import + extern NSString *const RCTTCPErrorDomain; -enum RCTTCPError -{ - RCTTCPNoError = 0, // Never used - RCTTCPInvalidInvocationError,// Invalid method invocation - RCTTCPBadConfigError, // Invalid configuration - RCTTCPBadParamError, // Invalid parameter was passed - RCTTCPSendTimeoutError, // A send operation timed out - RCTTCPSendFailedError, // A send operation failed - RCTTCPClosedError, // The socket was closed - RCTTCPOtherError, // Description provided in userInfo +enum RCTTCPError { + RCTTCPNoError = 0, // Never used + RCTTCPInvalidInvocationError, // Invalid method invocation + RCTTCPBadConfigError, // Invalid configuration + RCTTCPBadParamError, // Invalid parameter was passed + RCTTCPSendTimeoutError, // A send operation timed out + RCTTCPSendFailedError, // A send operation failed + RCTTCPClosedError, // The socket was closed + RCTTCPOtherError, // Description provided in userInfo }; typedef enum RCTTCPError RCTTCPError; @@ -21,23 +21,26 @@ typedef enum RCTTCPError RCTTCPError; @protocol SocketClientDelegate -- (void)onConnect:(TcpSocketClient*)client; -- (void)onListen:(TcpSocketClient*)server; -- (void)onConnection:(TcpSocketClient*)client toClient:(NSNumber *)clientID; +- (void)addClient:(TcpSocketClient *)client; +- (void)onConnect:(TcpSocketClient *)client; +- (void)onListen:(TcpSocketClient *)server; +- (void)onConnection:(TcpSocketClient *)client toClient:(NSNumber *)clientID; +- (void)onSecureConnection:(TcpSocketClient *)client + toClient:(NSNumber *)clientID; - (void)onData:(NSNumber *)clientID data:(NSData *)data; -- (void)onClose:(TcpSocketClient*)client withError:(NSError *)err; -- (void)onError:(TcpSocketClient*)client withError:(NSError *)err; -- (void)onWrittenData:(TcpSocketClient*)client msgId:(NSNumber *)msgId; -- (NSNumber*)getNextId; +- (void)onClose:(TcpSocketClient *)client withError:(NSError *)err; +- (void)onError:(TcpSocketClient *)client withError:(NSError *)err; +- (void)onWrittenData:(TcpSocketClient *)client msgId:(NSNumber *)msgId; +- (NSNumber *)getNextId; @end -@interface TcpSocketClient : NSObject +@interface TcpSocketClient : NSObject -@property (nonatomic, retain) NSNumber * id; -@property (nonatomic, weak) id clientDelegate; +@property(nonatomic, retain) NSNumber *id; +@property(nonatomic, weak) id clientDelegate; -- (GCDAsyncSocket *) getSocket; +- (GCDAsyncSocket *)getSocket; ///--------------------------------------------------------------------------------------- /// @name Class Methods @@ -50,7 +53,8 @@ typedef enum RCTTCPError RCTTCPError; * @return New RCTTCPClient */ -+ (id)socketClientWithId:(NSNumber *)clientID andConfig:(id) delegate; ++ (id)socketClientWithId:(NSNumber *)clientID + andConfig:(id)delegate; ///--------------------------------------------------------------------------------------- /// @name Instance Methods @@ -59,15 +63,21 @@ typedef enum RCTTCPError RCTTCPError; * Connects to a host and port * @param port port * @param host ip address - * @param options NSDictionary which can have @"localAddress" and @"localPort" to specify the local interface + * @param options NSDictionary which can have @"localAddress" and @"localPort" + * to specify the local interface * @return true if connected, false if there was an error */ -- (BOOL)connect:(NSString *)host port:(int)port withOptions:(NSDictionary *)options error:(NSError **)error; +- (BOOL)connect:(NSString *)host + port:(int)port + withOptions:(NSDictionary *)options + tlsOptions:(NSDictionary *)tlsOptions + error:(NSError **)error; /** * Starts listening on a local host and port * - * @param options NSDictionary which must have a @"port" and @"host" to specify where to listen + * @param options NSDictionary which must have a @"port" and @"host" to specify + * where to listen * @return true if connected, false if there was an error */ - (BOOL)listen:(NSDictionary *)options error:(NSError **)error; @@ -83,7 +93,9 @@ typedef enum RCTTCPError RCTTCPError; * write data * */ -- (void)writeData:(NSData*) data msgId:(NSNumber*)msgId; +- (void)writeData:(NSData *)data msgId:(NSNumber *)msgId; + +- (void)startTLS:(NSDictionary *)tlsOptions; /** * end client @@ -99,8 +111,8 @@ typedef enum RCTTCPError RCTTCPError; - (void)setKeepAlive:(BOOL)enable initialDelay:(int)initialDelay; -- (void) pause; +- (void)pause; -- (void) resume; +- (void)resume; @end diff --git a/ios/TcpSocketClient.m b/ios/TcpSocketClient.m index f956f8d..80e22d5 100644 --- a/ios/TcpSocketClient.m +++ b/ios/TcpSocketClient.m @@ -1,252 +1,330 @@ +#import "TcpSocketClient.h" +#import #import #import -#import -#import "TcpSocketClient.h" #import NSString *const RCTTCPErrorDomain = @"RCTTCPErrorDomain"; -@interface TcpSocketClient() -{ -@private +@interface TcpSocketClient () { + @private BOOL _tls; BOOL _checkValidity; BOOL _paused; + BOOL _connecting; NSString *_certPath; + NSString *_host; GCDAsyncSocket *_tcpSocket; - NSMutableDictionary *_pendingSends; + NSMutableDictionary *_pendingSends; + NSDictionary *_tlsSettings; NSLock *_lock; + NSNumber *_serverId; long _sendTag; } -- (id)initWithClientId:(NSNumber *)clientID andConfig:(id)aDelegate; -- (id)initWithClientId:(NSNumber *)clientID andConfig:(id)aDelegate andSocket:(GCDAsyncSocket*)tcpSocket; +- (id)initWithClientId:(NSNumber *)clientID + andConfig:(id)aDelegate; +- (id)initWithClientId:(NSNumber *)clientID + andConfig:(id)aDelegate + andSocket:(GCDAsyncSocket *)tcpSocket + andServer:(NSNumber *)serverID; @end @implementation TcpSocketClient -- (GCDAsyncSocket *) getSocket -{ +- (GCDAsyncSocket *)getSocket { return _tcpSocket; } -+ (id)socketClientWithId:(nonnull NSNumber *)clientID andConfig:(id)delegate -{ - return [[[self class] alloc] initWithClientId:clientID andConfig:delegate andSocket:nil]; ++ (id)socketClientWithId:(nonnull NSNumber *)clientID + andConfig:(id)delegate { + return [[[self class] alloc] initWithClientId:clientID + andConfig:delegate + andSocket:nil + andServer:nil]; } -- (id)initWithClientId:(NSNumber *)clientID andConfig:(id)aDelegate -{ - return [self initWithClientId:clientID andConfig:aDelegate andSocket:nil]; +- (id)initWithClientId:(NSNumber *)clientID + andConfig:(id)aDelegate { + return [self initWithClientId:clientID andConfig:aDelegate andSocket:nil andServer:nil]; } -- (id)initWithClientId:(NSNumber *)clientID andConfig:(id)aDelegate andSocket:(GCDAsyncSocket*)tcpSocket; +- (id)initWithClientId:(NSNumber *)clientID + andConfig:(id)aDelegate + andSocket:(GCDAsyncSocket *)tcpSocket + andServer:(NSNumber *)serverID; { self = [super init]; if (self) { _id = clientID; _clientDelegate = aDelegate; _paused = false; + _connecting = false; _pendingSends = [NSMutableDictionary dictionary]; _lock = [[NSLock alloc] init]; _tcpSocket = tcpSocket; - [_tcpSocket setUserData: clientID]; - [_tcpSocket setDelegate: self]; - [_tcpSocket setDelegateQueue: [self methodQueue]]; + _serverId = serverID; + [_tcpSocket setUserData:clientID]; + [_tcpSocket setDelegate:self]; + [_tcpSocket setDelegateQueue:[self methodQueue]]; } return self; } -- (BOOL)connect:(NSString *)host port:(int)port withOptions:(NSDictionary *)options error:(NSError **)error -{ +- (BOOL)connect:(NSString *)host + port:(int)port + withOptions:(NSDictionary *)options + tlsOptions:(NSDictionary *)tlsOptions + error:(NSError **)error { if (_tcpSocket) { if (error) { - *error = [self badInvocationError:@"this client's socket is already connected"]; + *error = [self badInvocationError: + @"this client's socket is already connected"]; } return false; } - _tcpSocket = [[GCDAsyncSocket alloc] initWithDelegate:self delegateQueue:[self methodQueue]]; - [_tcpSocket setUserData: _id]; + _tcpSocket = [[GCDAsyncSocket alloc] initWithDelegate:self + delegateQueue:[self methodQueue]]; + [_tcpSocket setUserData:_id]; BOOL result = false; NSString *localAddress = options[@"localAddress"]; NSNumber *localPort = options[@"localPort"]; + _host = host; + _connecting = true; if (!localAddress && !localPort) { result = [_tcpSocket connectToHost:host onPort:port error:error]; } else { NSMutableArray *interface = [NSMutableArray arrayWithCapacity:2]; - [interface addObject: localAddress?localAddress:@""]; + [interface addObject:localAddress ? localAddress : @""]; if (localPort) { [interface addObject:[localPort stringValue]]; } - result = [_tcpSocket connectToHost:host - onPort:port - viaInterface:[interface componentsJoinedByString:@":"] - withTimeout:-1 - error:error]; + result = + [_tcpSocket connectToHost:host + onPort:port + viaInterface:[interface componentsJoinedByString:@":"] + withTimeout:-1 + error:error]; } - _tls = (options[@"tls"]?[options[@"tls"] boolValue]:false); - if (result && _tls){ - NSMutableDictionary *settings = [NSMutableDictionary dictionary]; - NSString *certResourcePath = options[@"tlsCert"]; - BOOL checkValidity = (options[@"tlsCheckValidity"]?[options[@"tlsCheckValidity"] boolValue]:true); - if (!checkValidity) { - // Do not validate - _checkValidity = false; - [settings setObject:[NSNumber numberWithBool:YES] forKey:GCDAsyncSocketManuallyEvaluateTrust]; - } else if (certResourcePath != nil) { - // Self-signed certificate - _certPath = certResourcePath; - [settings setObject:[NSNumber numberWithBool:YES] forKey:GCDAsyncSocketManuallyEvaluateTrust]; - } else { - // Default certificates - [settings setObject:host forKey:(NSString *) kCFStreamSSLPeerName]; - } - [_tcpSocket startTLS:settings]; + if (result && tlsOptions) { + [self startTLS:tlsOptions]; } return result; } -- (NSDictionary *)getAddress -{ - if (_tcpSocket) - { +- (void)startTLS:(NSDictionary *)tlsOptions { + if (_tls) return; + NSMutableDictionary *settings = [NSMutableDictionary dictionary]; + NSString *certResourcePath = tlsOptions[@"ca"]; + BOOL checkValidity = (tlsOptions[@"rejectUnauthorized"] + ? [tlsOptions[@"rejectUnauthorized"] boolValue] + : true); + if (!checkValidity) { + // Do not validate + _checkValidity = false; + [settings setObject:[NSNumber numberWithBool:YES] + forKey:GCDAsyncSocketManuallyEvaluateTrust]; + } else if (certResourcePath != nil) { + // Self-signed certificate + _certPath = certResourcePath; + [settings setObject:[NSNumber numberWithBool:YES] + forKey:GCDAsyncSocketManuallyEvaluateTrust]; + } else { + // Default certificates + [settings setObject:_host forKey:(NSString *)kCFStreamSSLPeerName]; + } + _tls = true; + [_tcpSocket startTLS:settings]; +} + +- (NSDictionary *)getAddress { + if (_tcpSocket) { if (_tcpSocket.isConnected) { - return @{ @"port": @(_tcpSocket.connectedPort), - @"address": _tcpSocket.connectedHost ?: @"unknown", - @"family": _tcpSocket.isIPv6?@"IPv6":@"IPv4" }; + return @{ + @"port" : @(_tcpSocket.connectedPort), + @"address" : _tcpSocket.connectedHost ?: @"unknown", + @"family" : _tcpSocket.isIPv6 ? @"IPv6" : @"IPv4" + }; } else { - return @{ @"port": @(_tcpSocket.localPort), - @"address": _tcpSocket.localHost ?: @"unknown", - @"family": _tcpSocket.isIPv6?@"IPv6":@"IPv4" }; + return @{ + @"port" : @(_tcpSocket.localPort), + @"address" : _tcpSocket.localHost ?: @"unknown", + @"family" : _tcpSocket.isIPv6 ? @"IPv6" : @"IPv4" + }; } } - return @{ @"port": @(0), - @"address": @"unknown", - @"family": @"unkown" }; + return @{@"port" : @(0), @"address" : @"unknown", @"family" : @"unkown"}; } -- (void)setNoDelay:(BOOL)noDelay -{ +- (void)setNoDelay:(BOOL)noDelay { [_tcpSocket performBlock:^{ - int fd = [self->_tcpSocket socketFD]; - int on = noDelay ? 1 : 0; - if (setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, (char*)&on, sizeof(on)) == -1) { - /* TODO: handle error */ - RCTLogWarn(@"react-native-tcp-socket: setNoDelay() caused an unexpected error"); - } + int fd = [self->_tcpSocket socketFD]; + int on = noDelay ? 1 : 0; + if (setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, (char *)&on, sizeof(on)) == + -1) { + /* TODO: handle error */ + RCTLogWarn(@"react-native-tcp-socket: setNoDelay() caused an " + @"unexpected error"); + } }]; } -- (void)setKeepAlive:(BOOL)enable initialDelay:(int)initialDelay -{ +- (void)setKeepAlive:(BOOL)enable initialDelay:(int)initialDelay { [_tcpSocket performBlock:^{ - int fd = [self->_tcpSocket socketFD]; - int on = enable ? 1 : 0; - int enableKA = setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, &on, sizeof(on)); - // `initialDelay` is ignored - if (enableKA == -1) { - /* TODO: handle error */ - RCTLogWarn(@"react-native-tcp-socket: setKeepAlive() caused an unexpected error"); - } + int fd = [self->_tcpSocket socketFD]; + int on = enable ? 1 : 0; + int enableKA = setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, &on, sizeof(on)); + // `initialDelay` is ignored + if (enableKA == -1) { + /* TODO: handle error */ + RCTLogWarn(@"react-native-tcp-socket: setKeepAlive() caused an " + @"unexpected error"); + } }]; } -- (BOOL)listen:(NSDictionary *)options error:(NSError **)error -{ +- (BOOL)listen:(NSDictionary *)options error:(NSError **)error { if (_tcpSocket) { if (error) { - *error = [self badInvocationError:@"this client's socket is already connected"]; + *error = [self badInvocationError: + @"this client's socket is already connected"]; } return false; } - _tcpSocket = [[GCDAsyncSocket alloc] initWithDelegate:self delegateQueue:[self methodQueue]]; - [_tcpSocket setUserData: _id]; + _tcpSocket = [[GCDAsyncSocket alloc] initWithDelegate:self + delegateQueue:[self methodQueue]]; + [_tcpSocket setUserData:_id]; + + // Get TLS data if present + NSDictionary *tlsOptions = options[@"tls"]; + if (tlsOptions) { + BOOL success = [self setSecureContext:tlsOptions]; + if (!success) { + if (error) { + *error = [self badInvocationError:@"failed to set TLS context"]; + } + return false; + } + } // Get the host and port NSString *host = options[@"host"]; int port = [options[@"port"] intValue]; - + // GCDAsyncSocket doesn't recognize 0.0.0.0 - if ([@"0.0.0.0" isEqualToString: host]) { + if ([@"0.0.0.0" isEqualToString:host]) { host = nil; } - BOOL isListening = [_tcpSocket acceptOnInterface:host port:port error:error]; + BOOL isListening = [_tcpSocket acceptOnInterface:host + port:port + error:error]; if (isListening == YES) { - [_clientDelegate onListen: self]; + [_clientDelegate onListen:self]; } return isListening; } -- (void)setPendingSend:(NSNumber *)msgId forKey:(NSNumber *)key -{ +- (BOOL)setSecureContext:(NSDictionary *)tlsOptions { + NSString *keystoreResourcePath = tlsOptions[@"keystore"]; + NSURL *keystoreUrl = [[NSURL alloc] initWithString:keystoreResourcePath]; + NSData *pkcs12data = [[NSData alloc] initWithContentsOfURL:keystoreUrl]; + CFDataRef inPCKS12Data = (CFDataRef)CFBridgingRetain(pkcs12data); + CFStringRef password = CFSTR(""); + const void *keys[] = {kSecImportExportPassphrase}; + const void *values[] = {password}; + CFDictionaryRef options = + CFDictionaryCreate(NULL, keys, values, 1, NULL, NULL); + + CFArrayRef items = CFArrayCreate(NULL, 0, 0, NULL); + + OSStatus securityError = SecPKCS12Import(inPCKS12Data, options, &items); + CFRelease(options); + CFRelease(password); + + if (securityError != errSecSuccess) { + return false; + } + + CFDictionaryRef identityDict = CFArrayGetValueAtIndex(items, 0); + SecIdentityRef myIdent = (SecIdentityRef)CFDictionaryGetValue( + identityDict, kSecImportItemIdentity); + + SecIdentityRef certArray[1] = {myIdent}; + CFArrayRef myCerts = CFArrayCreate(NULL, (void *)certArray, 1, NULL); + + _tlsSettings = [NSMutableDictionary dictionary]; + [(NSMutableDictionary*) _tlsSettings setObject:[NSNumber numberWithBool:YES] + forKey:(NSString *)kCFStreamSSLIsServer]; + [(NSMutableDictionary*) _tlsSettings setObject:[NSNumber numberWithInteger:2] + forKey:GCDAsyncSocketSSLProtocolVersionMin]; + [(NSMutableDictionary*) _tlsSettings setObject:[NSNumber numberWithInteger:8] + forKey:GCDAsyncSocketSSLProtocolVersionMax]; + [(NSMutableDictionary*) _tlsSettings setObject:(id)CFBridgingRelease(myCerts) + forKey:(NSString *)kCFStreamSSLCertificates]; + _tls = true; + return true; +} + +- (void)setPendingSend:(NSNumber *)msgId forKey:(NSNumber *)key { [_lock lock]; @try { [_pendingSends setObject:msgId forKey:key]; - } - @finally { + } @finally { [_lock unlock]; } } -- (NSNumber*)getPendingSend:(NSNumber *)key -{ +- (NSNumber *)getPendingSend:(NSNumber *)key { [_lock lock]; @try { return [_pendingSends objectForKey:key]; - } - @finally { + } @finally { [_lock unlock]; } } -- (void)dropPendingSend:(NSNumber *)key -{ +- (void)dropPendingSend:(NSNumber *)key { [_lock lock]; @try { [_pendingSends removeObjectForKey:key]; - } - @finally { + } @finally { [_lock unlock]; } } -- (void)socket:(GCDAsyncSocket *)sock didWriteDataWithTag:(long)msgTag -{ - NSNumber* tagNum = [NSNumber numberWithLong:msgTag]; - NSNumber* msgId = [self getPendingSend:tagNum]; +- (void)socket:(GCDAsyncSocket *)sock didWriteDataWithTag:(long)msgTag { + NSNumber *tagNum = [NSNumber numberWithLong:msgTag]; + NSNumber *msgId = [self getPendingSend:tagNum]; if (msgId) { [_clientDelegate onWrittenData:self msgId:msgId]; [self dropPendingSend:tagNum]; } } -- (void) writeData:(NSData *)data msgId:(NSNumber*)msgId -{ +- (void)writeData:(NSData *)data msgId:(NSNumber *)msgId { [self setPendingSend:msgId forKey:@(_sendTag)]; [_tcpSocket writeData:data withTimeout:-1 tag:_sendTag]; _sendTag++; } -- (void)end -{ +- (void)end { [_tcpSocket disconnectAfterWriting]; } -- (void)destroy -{ +- (void)destroy { [_tcpSocket disconnect]; } @@ -261,9 +339,12 @@ - (void)resume { _paused = false; } -- (void)socket:(GCDAsyncSocket *)sock didReadData:(NSData *)data withTag:(long)tag { +- (void)socket:(GCDAsyncSocket *)sock + didReadData:(NSData *)data + withTag:(long)tag { if (!_clientDelegate) { - RCTLogWarn(@"didReadData with nil clientDelegate for %@", [sock userData]); + RCTLogWarn(@"didReadData with nil clientDelegate for %@", + [sock userData]); return; } @@ -273,71 +354,102 @@ - (void)socket:(GCDAsyncSocket *)sock didReadData:(NSData *)data withTag:(long)t } } -- (void)socket:(GCDAsyncSocket *)sock didAcceptNewSocket:(GCDAsyncSocket *)newSocket -{ - TcpSocketClient *inComing = [[TcpSocketClient alloc] initWithClientId:[_clientDelegate getNextId] - andConfig:_clientDelegate - andSocket:newSocket]; - [_clientDelegate onConnection: inComing - toClient: _id]; +- (void)socket:(GCDAsyncSocket *)sock + didAcceptNewSocket:(GCDAsyncSocket *)newSocket { + TcpSocketClient *inComing = + [[TcpSocketClient alloc] initWithClientId:[_clientDelegate getNextId] + andConfig:_clientDelegate + andSocket:newSocket + andServer:_id]; + // Store the socket or the connection will be closed + [_clientDelegate addClient:inComing]; + if (_tls) { + [newSocket startTLS:_tlsSettings]; + } else { + [_clientDelegate onConnection:inComing toClient:_id]; + } [newSocket readDataWithTimeout:-1 tag:inComing.id.longValue]; } -- (void)socketDidSecure:(GCDAsyncSocket *)sock -{ +- (void)socketDidSecure:(GCDAsyncSocket *)sock { // Only for TLS if (!_clientDelegate) { - RCTLogWarn(@"socketDidSecure with nil clientDelegate for %@", [sock userData]); + RCTLogWarn(@"socketDidSecure with nil clientDelegate for %@", + [sock userData]); return; } - - [_clientDelegate onConnect:self]; + if (_serverId != nil) { + [_clientDelegate onSecureConnection:self toClient:_serverId]; + } else if (_connecting) { + [_clientDelegate onConnect:self]; + _connecting = false; + } + _tls = true; } -- (void)socket:(GCDAsyncSocket *)sock didReceiveTrust:(SecTrustRef)trust completionHandler:(void (^)(BOOL shouldTrustPeer))completionHandler { +- (void)socket:(GCDAsyncSocket *)sock + didReceiveTrust:(SecTrustRef)trust + completionHandler:(void (^)(BOOL shouldTrustPeer))completionHandler { // Check if we should check the validity if (!_checkValidity) { completionHandler(YES); return; } - + // Server certificate - SecCertificateRef serverCertificate = SecTrustGetCertificateAtIndex(trust, 0); + SecCertificateRef serverCertificate = + SecTrustGetCertificateAtIndex(trust, 0); CFDataRef serverCertificateData = SecCertificateCopyData(serverCertificate); - const UInt8* const serverData = CFDataGetBytePtr(serverCertificateData); + const UInt8 *const serverData = CFDataGetBytePtr(serverCertificateData); const CFIndex serverDataSize = CFDataGetLength(serverCertificateData); - NSData* cert1 = [NSData dataWithBytes:serverData length:(NSUInteger)serverDataSize]; + NSData *cert1 = [NSData dataWithBytes:serverData + length:(NSUInteger)serverDataSize]; // Local certificate NSURL *certUrl = [[NSURL alloc] initWithString:_certPath]; - NSString *pem = [[NSString alloc] initWithContentsOfURL:certUrl encoding:NSUTF8StringEncoding error:NULL]; - + NSString *pem = [[NSString alloc] initWithContentsOfURL:certUrl + encoding:NSUTF8StringEncoding + error:NULL]; + // Strip PEM header and footers. We don't support multi-certificate PEM. - NSMutableString *pemMutable = [pem stringByTrimmingCharactersInSet:NSCharacterSet.whitespaceAndNewlineCharacterSet].mutableCopy; - + NSMutableString *pemMutable = + [pem stringByTrimmingCharactersInSet: + NSCharacterSet.whitespaceAndNewlineCharacterSet] + .mutableCopy; + // Strip PEM header and footer - [pemMutable replaceOccurrencesOfString:@"-----BEGIN CERTIFICATE-----" - withString:@"" - options:(NSStringCompareOptions)(NSAnchoredSearch | NSLiteralSearch) - range:NSMakeRange(0, pemMutable.length)]; - - [pemMutable replaceOccurrencesOfString:@"-----END CERTIFICATE-----" - withString:@"" - options:(NSStringCompareOptions)(NSAnchoredSearch | NSBackwardsSearch | NSLiteralSearch) - range:NSMakeRange(0, pemMutable.length)]; - - NSData *pemData = [[NSData alloc] initWithBase64EncodedString:pemMutable options:NSDataBase64DecodingIgnoreUnknownCharacters]; - SecCertificateRef localCertificate = SecCertificateCreateWithData(NULL, (CFDataRef)pemData); - if (!localCertificate) - { - [NSException raise:@"Configuration invalid" format:@"Failed to parse PEM certificate"]; + [pemMutable + replaceOccurrencesOfString:@"-----BEGIN CERTIFICATE-----" + withString:@"" + options:(NSStringCompareOptions)(NSAnchoredSearch | + NSLiteralSearch) + range:NSMakeRange(0, pemMutable.length)]; + + [pemMutable + replaceOccurrencesOfString:@"-----END CERTIFICATE-----" + withString:@"" + options:(NSStringCompareOptions)(NSAnchoredSearch | + NSBackwardsSearch | + NSLiteralSearch) + range:NSMakeRange(0, pemMutable.length)]; + + NSData *pemData = [[NSData alloc] + initWithBase64EncodedString:pemMutable + options: + NSDataBase64DecodingIgnoreUnknownCharacters]; + SecCertificateRef localCertificate = + SecCertificateCreateWithData(NULL, (CFDataRef)pemData); + if (!localCertificate) { + [NSException raise:@"Configuration invalid" + format:@"Failed to parse PEM certificate"]; } - + CFDataRef myCertData = SecCertificateCopyData(localCertificate); - const UInt8* const localData = CFDataGetBytePtr(myCertData); + const UInt8 *const localData = CFDataGetBytePtr(myCertData); const CFIndex localDataSize = CFDataGetLength(myCertData); - NSData* cert2 = [NSData dataWithBytes:localData length:(NSUInteger)localDataSize]; - + NSData *cert2 = [NSData dataWithBytes:localData + length:(NSUInteger)localDataSize]; + if (cert1 == nil || cert2 == nil) { RCTLogWarn(@"BAD SSL CERTIFICATE"); completionHandler(NO); @@ -345,18 +457,20 @@ - (void)socket:(GCDAsyncSocket *)sock didReceiveTrust:(SecTrustRef)trust complet } if ([cert1 isEqualToData:cert2]) { completionHandler(YES); - }else { + } else { completionHandler(NO); } } -- (void)socket:(GCDAsyncSocket *)sock didConnectToHost:(NSString *)host port:(uint16_t)port -{ +- (void)socket:(GCDAsyncSocket *)sock + didConnectToHost:(NSString *)host + port:(uint16_t)port { if (!_clientDelegate) { - RCTLogWarn(@"didConnectToHost with nil clientDelegate for %@", [sock userData]); + RCTLogWarn(@"didConnectToHost with nil clientDelegate for %@", + [sock userData]); return; } - + // Show up if SSL handsake is done if (!_tls) { [_clientDelegate onConnect:self]; @@ -364,34 +478,35 @@ - (void)socket:(GCDAsyncSocket *)sock didConnectToHost:(NSString *)host port:(ui [sock readDataWithTimeout:-1 tag:_id.longValue]; } -- (void)socketDidCloseReadStream:(GCDAsyncSocket *)sock -{ +- (void)socketDidCloseReadStream:(GCDAsyncSocket *)sock { // TODO : investigate for half-closed sockets // for now close the stream completely [sock disconnect]; } -- (void)socketDidDisconnect:(GCDAsyncSocket *)sock withError:(NSError *)err -{ +- (void)socketDidDisconnect:(GCDAsyncSocket *)sock withError:(NSError *)err { if (!_clientDelegate) { - RCTLogWarn(@"socketDidDisconnect with nil clientDelegate for %@", [sock userData]); + RCTLogWarn(@"socketDidDisconnect with nil clientDelegate for %@", + [sock userData]); return; } - [_clientDelegate onClose:[sock userData] withError:(!err || err.code == GCDAsyncSocketClosedError ? nil : err)]; + [_clientDelegate + onClose:[sock userData] + withError:(!err || err.code == GCDAsyncSocketClosedError ? nil : err)]; } -- (NSError *)badInvocationError:(NSString *)errMsg -{ - NSDictionary *userInfo = [NSDictionary dictionaryWithObject:errMsg forKey:NSLocalizedDescriptionKey]; +- (NSError *)badInvocationError:(NSString *)errMsg { + NSDictionary *userInfo = + [NSDictionary dictionaryWithObject:errMsg + forKey:NSLocalizedDescriptionKey]; return [NSError errorWithDomain:RCTTCPErrorDomain code:RCTTCPInvalidInvocationError userInfo:userInfo]; } -- (dispatch_queue_t)methodQueue -{ +- (dispatch_queue_t)methodQueue { return dispatch_get_main_queue(); } diff --git a/ios/TcpSockets.h b/ios/TcpSockets.h index cf63914..23ab36c 100644 --- a/ios/TcpSockets.h +++ b/ios/TcpSockets.h @@ -1,8 +1,9 @@ #import "TcpSocketClient.h" -#import #import "CocoaAsyncSocket/GCDAsyncSocket.h" +#import + -@interface TcpSockets : RCTEventEmitter +@interface TcpSockets : RCTEventEmitter @end diff --git a/ios/TcpSockets.m b/ios/TcpSockets.m index e21ff0e..23c961f 100644 --- a/ios/TcpSockets.m +++ b/ios/TcpSockets.m @@ -1,31 +1,29 @@ #import -#import #import +#import #import -#import "TcpSockets.h" + #import "TcpSocketClient.h" +#import "TcpSockets.h" + // offset native ids by 5000 #define COUNTER_OFFSET 5000 -@implementation TcpSockets -{ - NSMutableDictionary *_clients; +@implementation TcpSockets { + NSMutableDictionary *_clients; + NSMutableDictionary *_pendingTLS; int _counter; } RCT_EXPORT_MODULE() -- (NSArray *)supportedEvents -{ - return @[@"connect", - @"listening", - @"connection", - @"data", - @"close", - @"error", - @"written"]; +- (NSArray *)supportedEvents { + return @[ + @"connect", @"listening", @"connection", @"secureConnection", @"data", + @"close", @"error", @"written" + ]; } - (void)startObserving { @@ -36,234 +34,289 @@ - (void)stopObserving { // Does nothing } --(void)dealloc -{ +- (void)dealloc { for (NSNumber *cId in _clients.allKeys) { [self destroyClient:cId]; } } -- (TcpSocketClient *)createSocket:(nonnull NSNumber*)cId -{ +- (TcpSocketClient *)createSocket:(nonnull NSNumber *)cId { if (!cId) { - RCTLogWarn(@"%@.createSocket called with nil id parameter.", [self class]); + RCTLogWarn(@"%@.createSocket called with nil id parameter.", + [self class]); return nil; } - + if (!_clients) { _clients = [NSMutableDictionary new]; } - + if (_clients[cId]) { - RCTLogWarn(@"%@.createSocket called twice with the same id.", [self class]); + RCTLogWarn(@"%@.createSocket called twice with the same id.", + [self class]); return nil; } - + _clients[cId] = [TcpSocketClient socketClientWithId:cId andConfig:self]; - + return _clients[cId]; } -RCT_EXPORT_METHOD(connect:(nonnull NSNumber*)cId - host:(NSString *)host - port:(int)port - withOptions:(NSDictionary *)options) -{ +RCT_EXPORT_METHOD(connect + : (nonnull NSNumber *)cId host + : (NSString *)host port + : (int)port withOptions + : (NSDictionary *)options) { TcpSocketClient *client = _clients[cId]; if (!client) { client = [self createSocket:cId]; } - + + NSDictionary *tlsOptions = _pendingTLS[cId]; + NSError *error = nil; - if (![client connect:host port:port withOptions:options error:&error]) - { + if (![client connect:host + port:port + withOptions:options + tlsOptions:tlsOptions + error:&error]) { [self onError:client withError:error]; return; } } -RCT_EXPORT_METHOD(write:(nonnull NSNumber*)cId - string:(nonnull NSString*)base64String - callback:(nonnull NSNumber*)msgId) { - TcpSocketClient* client = [self findClient:cId]; - if (!client) return; - +RCT_EXPORT_METHOD(write + : (nonnull NSNumber *)cId string + : (nonnull NSString *)base64String callback + : (nonnull NSNumber *)msgId) { + TcpSocketClient *client = [self findClient:cId]; + if (!client) + return; + // iOS7+ - // TODO: use https://github.com/nicklockwood/Base64 for compatibility with earlier iOS versions - NSData *data = [[NSData alloc] initWithBase64EncodedString:base64String options:0]; + // TODO: use https://github.com/nicklockwood/Base64 for compatibility with + // earlier iOS versions + NSData *data = [[NSData alloc] initWithBase64EncodedString:base64String + options:0]; [client writeData:data msgId:msgId]; } -RCT_EXPORT_METHOD(end:(nonnull NSNumber*)cId) { - [self endClient:cId]; -} +RCT_EXPORT_METHOD(end : (nonnull NSNumber *)cId) { [self endClient:cId]; } -RCT_EXPORT_METHOD(destroy:(nonnull NSNumber*)cId) { +RCT_EXPORT_METHOD(destroy : (nonnull NSNumber *)cId) { [self destroyClient:cId]; } -RCT_EXPORT_METHOD(close:(nonnull NSNumber*)cId) { - [self destroyClient:cId]; -} +RCT_EXPORT_METHOD(close : (nonnull NSNumber *)cId) { [self destroyClient:cId]; } -RCT_EXPORT_METHOD(listen:(nonnull NSNumber*)cId - withOptions:(nonnull NSDictionary *)options) -{ - TcpSocketClient* client = _clients[cId]; +RCT_EXPORT_METHOD(listen + : (nonnull NSNumber *)cId withOptions + : (nonnull NSDictionary *)options) { + TcpSocketClient *client = _clients[cId]; if (!client) { client = [self createSocket:cId]; } - + NSError *error = nil; - if (![client listen:options error:&error]) - { + if (![client listen:options error:&error]) { [self onError:client withError:error]; return; } } -RCT_EXPORT_METHOD(setNoDelay:(nonnull NSNumber*)cId noDelay:(BOOL)noDelay) { - TcpSocketClient* client = [self findClient:cId]; - if (!client) return; - +RCT_EXPORT_METHOD(startTLS + : (nonnull NSNumber *)cId tlsOptions + : (nonnull NSDictionary *)tlsOptions) { + TcpSocketClient *client = _clients[cId]; + if (!client) { + if (!_pendingTLS) { + _pendingTLS = [NSMutableDictionary new]; + } + _pendingTLS[cId] = tlsOptions; + } else { + [client startTLS:tlsOptions]; + } +} + +RCT_EXPORT_METHOD(setNoDelay + : (nonnull NSNumber *)cId noDelay + : (BOOL)noDelay) { + TcpSocketClient *client = [self findClient:cId]; + if (!client) + return; + [client setNoDelay:noDelay]; } -RCT_EXPORT_METHOD(setKeepAlive:(nonnull NSNumber*)cId enable:(BOOL)enable initialDelay:(int)initialDelay) { - TcpSocketClient* client = [self findClient:cId]; - if (!client) return; - +RCT_EXPORT_METHOD(setKeepAlive + : (nonnull NSNumber *)cId enable + : (BOOL)enable initialDelay + : (int)initialDelay) { + TcpSocketClient *client = [self findClient:cId]; + if (!client) + return; + [client setKeepAlive:enable initialDelay:initialDelay]; } -RCT_EXPORT_METHOD(pause:(nonnull NSNumber*)cId) { - TcpSocketClient* client = [self findClient:cId]; - if (!client) return; - +RCT_EXPORT_METHOD(pause : (nonnull NSNumber *)cId) { + TcpSocketClient *client = [self findClient:cId]; + if (!client) + return; + [client pause]; } -RCT_EXPORT_METHOD(resume:(nonnull NSNumber*)cId) { - TcpSocketClient* client = [self findClient:cId]; - if (!client) return; - +RCT_EXPORT_METHOD(resume : (nonnull NSNumber *)cId) { + TcpSocketClient *client = [self findClient:cId]; + if (!client) + return; + [client resume]; } -- (void)onWrittenData:(TcpSocketClient*) client msgId:(NSNumber *)msgId -{ - [self sendEventWithName:@"written" body:@{ - @"id": client.id, - @"msgId": msgId, - }]; +- (void)onWrittenData:(TcpSocketClient *)client msgId:(NSNumber *)msgId { + [self sendEventWithName:@"written" + body:@{ + @"id" : client.id, + @"msgId" : msgId, + }]; +} + +- (void)onConnect:(TcpSocketClient *)client { + GCDAsyncSocket *socket = [client getSocket]; + [self sendEventWithName:@"connect" + body:@{ + @"id" : client.id, + @"connection" : @{ + @"localAddress" : [socket localHost], + @"localPort" : + [NSNumber numberWithInt:[socket localPort]], + @"remoteAddress" : [socket connectedHost], + @"remotePort" : [NSNumber + numberWithInt:[socket connectedPort]], + @"remoteFamily" : [socket isIPv4] ? @"IPv4" + : @"IPv6" + } + }]; +} + +- (void)onListen:(TcpSocketClient *)server { + GCDAsyncSocket *socket = [server getSocket]; + [self sendEventWithName:@"listening" + body:@{ + @"id" : server.id, + @"connection" : @{ + @"localAddress" : [socket localHost], + @"localPort" : + [NSNumber numberWithInt:[socket localPort]], + @"localFamily" : [socket isIPv4] ? @"IPv4" + : @"IPv6" + } + }]; } -- (void)onConnect:(TcpSocketClient*) client -{ - GCDAsyncSocket * socket = [client getSocket]; - [self sendEventWithName:@"connect" body:@{ - @"id": client.id, - @"connection": @{ - @"localAddress": [socket localHost], - @"localPort": [NSNumber numberWithInt:[socket localPort]], - @"remoteAddress": [socket connectedHost], - @"remotePort": [NSNumber numberWithInt:[socket connectedPort]], - @"remoteFamily": [socket isIPv4] ? @"IPv4" : @"IPv6" - } }]; +- (void)onConnection:(TcpSocketClient *)client toClient:(NSNumber *)clientID { + [self onSocketConnection:client + toClient:clientID + connectionType:@"connection"]; } -- (void) onListen:(TcpSocketClient*) server -{ - GCDAsyncSocket * socket = [server getSocket]; - [self sendEventWithName:@"listening" body:@{ - @"id": server.id, - @"connection": @{ - @"localAddress": [socket localHost], - @"localPort": [NSNumber numberWithInt:[socket localPort]], - @"localFamily": [socket isIPv4] ? @"IPv4" : @"IPv6" - } }]; +- (void)onSecureConnection:(TcpSocketClient *)client + toClient:(NSNumber *)clientID { + [self onSocketConnection:client + toClient:clientID + connectionType:@"secureConnection"]; } --(void)onConnection:(TcpSocketClient *)client toClient:(NSNumber *)clientID { +- (void)addClient:(TcpSocketClient *)client { _clients[client.id] = client; - - GCDAsyncSocket * socket = [client getSocket]; - - [self sendEventWithName:@"connection" body:@{ - @"id": clientID, - @"info": @{ - @"id": client.id, - @"connection": @{ - @"localAddress": [socket localHost], - @"localPort": [NSNumber numberWithInt:[socket localPort]], - @"remoteAddress": [socket connectedHost], - @"remotePort": [NSNumber numberWithInt:[socket connectedPort]], - @"remoteFamily": [socket isIPv4] ? @"IPv4" : @"IPv6" - } }}]; } -- (void)onData:(NSNumber *)clientID data:(NSData *)data -{ +- (void)onSocketConnection:(TcpSocketClient *)client + toClient:(NSNumber *)clientID + connectionType:(NSString *)connectionType { + GCDAsyncSocket *socket = [client getSocket]; + + [self sendEventWithName:connectionType + body:@{ + @"id" : clientID, + @"info" : @{ + @"id" : client.id, + @"connection" : @{ + @"localAddress" : [socket localHost], + @"localPort" : [NSNumber + numberWithInt:[socket localPort]], + @"remoteAddress" : [socket connectedHost], + @"remotePort" : [NSNumber + numberWithInt:[socket connectedPort]], + @"remoteFamily" : [socket isIPv4] ? @"IPv4" + : @"IPv6" + } + } + }]; +} + +- (void)onData:(NSNumber *)clientID data:(NSData *)data { NSString *base64String = [data base64EncodedStringWithOptions:0]; [self sendEventWithName:@"data" - body:@{ @"id": clientID, @"data" : base64String }]; + body:@{@"id" : clientID, @"data" : base64String}]; } -- (void)onClose:(NSNumber*) clientID withError:(NSError *)err -{ - TcpSocketClient* client = [self findClient:clientID]; +- (void)onClose:(NSNumber *)clientID withError:(NSError *)err { + TcpSocketClient *client = [self findClient:clientID]; if (!client) { RCTLogWarn(@"onClose: unrecognized client id %@", clientID); } - + if (err) { [self onError:client withError:err]; } - + [self sendEventWithName:@"close" - body:@{ @"id": clientID, @"hadError": err == nil ? @NO : @YES }]; - + body:@{ + @"id" : clientID, + @"hadError" : err == nil ? @NO : @YES + }]; + [_clients removeObjectForKey:clientID]; } -- (void)onError:(TcpSocketClient*) client withError:(NSError *)err { +- (void)onError:(TcpSocketClient *)client withError:(NSError *)err { NSString *msg = err.localizedFailureReason ?: err.localizedDescription; - [self sendEventWithName:@"error" - body:@{ @"id": client.id, @"error": msg }]; - + [self sendEventWithName:@"error" body:@{@"id" : client.id, @"error" : msg}]; } --(TcpSocketClient*)findClient:(nonnull NSNumber*)cId -{ +- (TcpSocketClient *)findClient:(nonnull NSNumber *)cId { TcpSocketClient *client = _clients[cId]; if (!client) { - NSString *msg = [NSString stringWithFormat:@"no client found with id %@", cId]; - [self sendEventWithName:@"error" - body:@{ @"id": cId, @"error": msg }]; - + NSString *msg = + [NSString stringWithFormat:@"no client found with id %@", cId]; + [self sendEventWithName:@"error" body:@{@"id" : cId, @"error" : msg}]; + return nil; } - + return client; } --(void)endClient:(nonnull NSNumber*)cId -{ - TcpSocketClient* client = [self findClient:cId]; - if (!client) return; - +- (void)endClient:(nonnull NSNumber *)cId { + TcpSocketClient *client = [self findClient:cId]; + if (!client) + return; + [client end]; } --(void)destroyClient:(nonnull NSNumber*)cId -{ - TcpSocketClient* client = [self findClient:cId]; - if (!client) return; - +- (void)destroyClient:(nonnull NSNumber *)cId { + TcpSocketClient *client = [self findClient:cId]; + if (!client) + return; + [client destroy]; } --(NSNumber*)getNextId { +- (NSNumber *)getNextId { return @(_counter++ + COUNTER_OFFSET); } diff --git a/lib/types/Server.d.ts b/lib/types/Server.d.ts index b6b4131..67dde78 100644 --- a/lib/types/Server.d.ts +++ b/lib/types/Server.d.ts @@ -1,9 +1,12 @@ /** + * @typedef {import('./TLSSocket').default} TLSSocket + * * @typedef {object} ServerEvents * @property {() => void} close * @property {(socket: Socket) => void} connection * @property {() => void} listening * @property {(err: Error) => void} error + * @property {(tlsSocket: TLSSocket) => void} secureConnection * * @extends {EventEmitter} */ @@ -12,10 +15,10 @@ export default class Server extends EventEmitter { * @param {(socket: Socket) => void} [connectionCallback] Automatically set as a listener for the `'connection'` event. */ constructor(connectionCallback?: ((socket: Socket) => void) | undefined); - /** @private */ - private _id; - /** @private */ - private _eventEmitter; + /** @protected @readonly */ + protected readonly _id: number; + /** @protected @readonly */ + protected readonly _eventEmitter: import("react-native").EventEmitter; /** @private @type {Set} */ private _connections; /** @private */ @@ -77,6 +80,7 @@ export default class Server extends EventEmitter { * @private */ private _registerEvents; + _listeningListener: import("react-native").EmitterSubscription | undefined; _errorListener: import("react-native").EmitterSubscription | undefined; _connectionsListener: import("react-native").EmitterSubscription | undefined; /** @@ -90,11 +94,13 @@ export default class Server extends EventEmitter { */ private _buildSocket; } +export type TLSSocket = import("./TLSSocket").default; export type ServerEvents = { close: () => void; connection: (socket: Socket) => void; listening: () => void; error: (err: Error) => void; + secureConnection: (tlsSocket: TLSSocket) => void; }; import EventEmitter from "eventemitter3"; import Socket from "./Socket"; diff --git a/lib/types/TLSServer.d.ts b/lib/types/TLSServer.d.ts new file mode 100644 index 0000000..b8ae936 --- /dev/null +++ b/lib/types/TLSServer.d.ts @@ -0,0 +1,30 @@ +/** + * @typedef {object} TLSServerOptions + * @property {string} cert + * @property {string} key + * + * @extends {Server} + */ +export default class TLSServer extends Server { + /** + * @param {(socket: TLSSocket) => void} [secureConnectionListener] Automatically set as a listener for the `'secureConnection'` event. + */ + constructor(secureConnectionListener?: ((socket: TLSSocket) => void) | undefined); + /** + * @param {TLSServerOptions} options TLS server options + */ + setSecureContext(options: TLSServerOptions): void; + /** @private */ + private _options; + /** + * @private + */ + private _registerTLSEvents; + _secureConnectionListener: import("react-native").EmitterSubscription | undefined; +} +export type TLSServerOptions = { + cert: string; + key: string; +}; +import Server from "./Server"; +import TLSSocket from "./TLSSocket"; diff --git a/lib/types/TLSSocket.d.ts b/lib/types/TLSSocket.d.ts new file mode 100644 index 0000000..d78d77f --- /dev/null +++ b/lib/types/TLSSocket.d.ts @@ -0,0 +1,11 @@ +/** + * @extends {Socket} + */ +export default class TLSSocket extends Socket { + /** + * @param {Socket} socket Any instance of `Socket`. + * @param {object} options Options for the TLS socket. + */ + constructor(socket: Socket, options: object); +} +import Socket from "./Socket"; diff --git a/lib/types/index.d.ts b/lib/types/index.d.ts index cae6cc1..2d66eac 100644 --- a/lib/types/index.d.ts +++ b/lib/types/index.d.ts @@ -6,6 +6,8 @@ declare namespace _default { export { isIPv6 }; export { Server }; export { Socket }; + export { TLSServer }; + export { TLSSocket }; } export default _default; /** @@ -39,3 +41,5 @@ declare function isIPv4(input: string): boolean; declare function isIPv6(input: string): boolean; import Server from "./Server"; import Socket from "./Socket"; +import TLSServer from "./TLSServer"; +import TLSSocket from "./TLSSocket"; diff --git a/src/Server.js b/src/Server.js index 0a5bf3b..78567cc 100644 --- a/src/Server.js +++ b/src/Server.js @@ -7,11 +7,14 @@ import Socket from './Socket'; import { nativeEventEmitter, getNextId } from './Globals'; /** + * @typedef {import('./TLSSocket').default} TLSSocket + * * @typedef {object} ServerEvents * @property {() => void} close * @property {(socket: Socket) => void} connection * @property {() => void} listening * @property {(err: Error) => void} error + * @property {(tlsSocket: TLSSocket) => void} secureConnection * * @extends {EventEmitter} */ @@ -21,9 +24,9 @@ export default class Server extends EventEmitter { */ constructor(connectionCallback) { super(); - /** @private */ + /** @protected @readonly */ this._id = getNextId(); - /** @private */ + /** @protected @readonly */ this._eventEmitter = nativeEventEmitter; /** @private @type {Set} */ this._connections = new Set(); @@ -124,7 +127,7 @@ export default class Server extends EventEmitter { * @private */ _registerEvents() { - this._errorListener = this._eventEmitter.addListener('listening', (evt) => { + this._listeningListener = this._eventEmitter.addListener('listening', (evt) => { if (evt.id !== this._id) return; this._localAddress = evt.connection.localAddress; this._localPort = evt.connection.localPort; @@ -139,12 +142,7 @@ export default class Server extends EventEmitter { this._connectionsListener = this._eventEmitter.addListener('connection', (evt) => { if (evt.id !== this._id) return; const newSocket = this._buildSocket(evt.info); - // Emit 'close' when all connection closed - newSocket.on('close', () => { - this._connections.delete(newSocket); - if (!this.listening && this._connections.size === 0) this.emit('close'); - }); - this._connections.add(newSocket); + this._addConnection(newSocket); this.emit('connection', newSocket); }); } @@ -159,7 +157,20 @@ export default class Server extends EventEmitter { } /** - * @private + * @protected + * @param {Socket} socket + */ + _addConnection(socket) { + // Emit 'close' when all connection closed + socket.on('close', () => { + this._connections.delete(socket); + if (!this.listening && this._connections.size === 0) this.emit('close'); + }); + this._connections.add(socket); + } + + /** + * @protected * @param {{ id: number; connection: import('./Socket').NativeConnectionInfo; }} info * @returns {Socket} */ diff --git a/src/Socket.js b/src/Socket.js index e17ee2d..f725db5 100644 --- a/src/Socket.js +++ b/src/Socket.js @@ -1,6 +1,6 @@ 'use strict'; -import { NativeModules, Image } from 'react-native'; +import { NativeModules } from 'react-native'; import EventEmitter from 'eventemitter3'; import { Buffer } from 'buffer'; const Sockets = NativeModules.TcpSockets; @@ -39,6 +39,7 @@ import { nativeEventEmitter, getNextId } from './Globals'; * @property {() => void} drain * @property {(err: Error) => void} error * @property {() => void} timeout + * @property {() => void} secureConnect * * @extends {EventEmitter} */ @@ -48,8 +49,8 @@ export default class Socket extends EventEmitter { */ constructor() { super(); - /** @private */ - this._id = undefined; + /** @package */ + this._id = getNextId(); /** @private */ this._eventEmitter = nativeEventEmitter; /** @type {EventEmitter<'written', any>} @private */ @@ -155,8 +156,6 @@ export default class Socket extends EventEmitter { * @param {() => void} [callback] */ connect(options, callback) { - if (this._id === undefined) this._setId(getNextId()); - const customOptions = { ...options }; // Normalize args customOptions.host = customOptions.host || 'localhost'; @@ -167,10 +166,6 @@ export default class Socket extends EventEmitter { // Timeout if (customOptions.timeout) this.setTimeout(customOptions.timeout); else if (this._timeout) this._activateTimer(); - // TLS Cert - if (customOptions.tlsCert) { - customOptions.tlsCert = Image.resolveAssetSource(customOptions.tlsCert).uri; - } this._connecting = true; this._readyState = 'opening'; Sockets.connect(this._id, customOptions.host, customOptions.port, customOptions); @@ -482,7 +477,7 @@ export default class Socket extends EventEmitter { } /** - * @private + * @package */ _unregisterEvents() { this._dataListener?.remove(); diff --git a/src/TLSServer.js b/src/TLSServer.js new file mode 100644 index 0000000..64808a4 --- /dev/null +++ b/src/TLSServer.js @@ -0,0 +1,70 @@ +'use strict'; + +import { Image } from 'react-native'; +import Server from './Server'; +import TLSSocket from './TLSSocket'; + +/** + * @typedef {object} TLSServerOptions + * @property {any} keystore + * + * @extends {Server} + */ +export default class TLSServer extends Server { + /** + * @param {(socket: TLSSocket) => void} [secureConnectionListener] Automatically set as a listener for the `'secureConnection'` event. + */ + constructor(secureConnectionListener) { + super(); + if (secureConnectionListener) this.on('secureConnection', secureConnectionListener); + this._registerTLSEvents(); + } + + /** + * @param {TLSServerOptions} options TLS server options + */ + setSecureContext(options) { + /** @private */ + this._options = { ...options }; + this._options.keystore = Image.resolveAssetSource(this._options.keystore).uri; + } + + /** + * Start a server listening for connections. + * + * This function is asynchronous. When the server starts listening, the `'listening'` event will be emitted. + * The last parameter `callback` will be added as a listener for the `'listening'` event. + * + * The `server.listen()` method can be called again if and only if there was an error during the first + * `server.listen()` call or `server.close()` has been called. Otherwise, an `ERR_SERVER_ALREADY_LISTEN` + * error will be thrown. + * + * @param {{ port: number; host: string; reuseAddress?: boolean}} options + * @param {() => void} [callback] + * @override + */ + listen(options, callback) { + const newOptions = { ...options }; + // @ts-ignore + newOptions['tls'] = this._options; + return super.listen(newOptions, callback); + } + + /** + * @private + */ + _registerTLSEvents() { + this._secureConnectionListener = this._eventEmitter.addListener( + 'secureConnection', + (evt) => { + if (evt.id !== this._id) return; + const standardSocket = this._buildSocket(evt.info); + standardSocket._unregisterEvents(); + const tlsSocket = new TLSSocket(standardSocket); + this._addConnection(tlsSocket); + this.emit('connection', standardSocket); + this.emit('secureConnection', tlsSocket); + } + ); + } +} diff --git a/src/TLSSocket.js b/src/TLSSocket.js new file mode 100644 index 0000000..b038c77 --- /dev/null +++ b/src/TLSSocket.js @@ -0,0 +1,59 @@ +'use strict'; + +import { Image, NativeModules } from 'react-native'; +const Sockets = NativeModules.TcpSockets; +import Socket from './Socket'; + +/** + * @typedef {object} TLSSocketOptions + * @property {any} [ca] + * + * @extends {Socket} + */ +export default class TLSSocket extends Socket { + /** + * @param {Socket} socket Any instance of `Socket`. + * @param {TLSSocketOptions} [options] Options for the TLS socket. + */ + constructor(socket, options = {}) { + super(); + /** @private */ + this._options = { ...options }; + if (this._options.ca) this._options.ca = Image.resolveAssetSource(this._options.ca).uri; + /** @private */ + this._socket = socket; + // @ts-ignore + this._setId(this._socket._id); + this._startTLS(); + if (socket.pending || socket.connecting) socket.once('connect', () => this._initialize()); + else this._initialize(); + } + + /** + * @private + */ + _initialize() { + // Avoid calling twice destroy() if an error occurs + this._socket._errorListener?.remove(); + this.on('error', (error) => this._socket.emit('error', error)); + this._setConnected({ + // @ts-ignore + localAddress: this._socket.localAddress, + // @ts-ignore + localPort: this._socket.localPort, + // @ts-ignore + remoteAddress: this._socket.remoteAddress, + // @ts-ignore + remotePort: this._socket.remotePort, + // @ts-ignore + remoteFamily: this._socket.remoteFamily, + }); + } + + /** + * @private + */ + _startTLS() { + Sockets.startTLS(this._id, this._options); + } +} diff --git a/src/index.js b/src/index.js index 223be44..e04e240 100644 --- a/src/index.js +++ b/src/index.js @@ -2,6 +2,8 @@ import Socket from './Socket'; import Server from './Server'; +import TLSServer from './TLSServer'; +import TLSSocket from './TLSSocket'; /** * @param {(socket: Socket) => void} connectionListener @@ -11,6 +13,33 @@ function createServer(connectionListener) { return new Server(connectionListener); } +/** + * @param {import('./TLSServer').TLSServerOptions} options + * @param {(socket: TLSSocket) => void} connectionListener + * @returns {TLSServer} + */ +function createTLSServer(options, connectionListener) { + const server = new TLSServer(connectionListener); + server.setSecureContext(options); + return server; +} + +/** + * The `callback` function, if specified, will be added as a listener for the `'secureConnect'` event. + * + * @param {import('./TLSSocket').TLSSocketOptions & import('./Socket').ConnectionOptions} options + * @param {() => void} [callback] + * @returns {TLSSocket} + */ +function connectTLS(options, callback) { + const socket = new Socket(); + const tlsSocket = new TLSSocket(socket, options); + socket.once('connect', () => tlsSocket.emit('secureConnect')); + if (callback) tlsSocket.once('secureConnect', callback); + socket.connect(options); + return tlsSocket; +} + /** * @param {import('./Socket').ConnectionOptions} options * @param {() => void} callback @@ -70,7 +99,33 @@ function isIP(input) { return 0; } -export default { createServer, createConnection, isIP, isIPv4, isIPv6, Server, Socket }; +export default { + connect: createConnection, + createServer, + createConnection, + createTLSServer, + connectTLS, + isIP, + isIPv4, + isIPv6, + Server, + Socket, + TLSServer, + TLSSocket, +}; // @ts-ignore -module.exports = { createServer, createConnection, isIP, isIPv4, isIPv6, Server, Socket }; +module.exports = { + connect: createConnection, + createServer, + createConnection, + createTLSServer, + connectTLS, + isIP, + isIPv4, + isIPv6, + Server, + Socket, + TLSServer, + TLSSocket, +};