diff --git a/.github/workflows/linux.yaml b/.github/workflows/linux.yaml index 4d7e3bc9..d4042c75 100644 --- a/.github/workflows/linux.yaml +++ b/.github/workflows/linux.yaml @@ -17,7 +17,7 @@ jobs: steps: - uses: actions/checkout@v2 - + - name: Setup node uses: actions/setup-node@v1 with: @@ -62,7 +62,7 @@ jobs: with: command: test args: -p napi-rs --lib -- --nocapture - + - name: test scripts run: | yarn @@ -73,4 +73,4 @@ jobs: - name: Clear the cargo caches run: | cargo install cargo-cache --no-default-features --features ci-autoclean - cargo-cache \ No newline at end of file + cargo-cache diff --git a/.github/workflows/macos.yaml b/.github/workflows/macos.yaml index 21f76d1f..b0765a34 100644 --- a/.github/workflows/macos.yaml +++ b/.github/workflows/macos.yaml @@ -17,7 +17,7 @@ jobs: steps: - uses: actions/checkout@v2 - + - name: Setup node uses: actions/setup-node@v1 with: @@ -73,4 +73,4 @@ jobs: - name: Clear the cargo caches run: | cargo install cargo-cache --no-default-features --features ci-autoclean - cargo-cache \ No newline at end of file + cargo-cache diff --git a/.github/workflows/windows.yaml b/.github/workflows/windows.yaml index 3790f2e3..b46b26ef 100644 --- a/.github/workflows/windows.yaml +++ b/.github/workflows/windows.yaml @@ -19,7 +19,7 @@ jobs: steps: - uses: actions/checkout@v2 - + - name: Setup node uses: actions/setup-node@v1 with: @@ -31,7 +31,7 @@ jobs: profile: minimal override: true - name: Install llvm - run: choco install -y llvm + run: choco install -y llvm - name: set environment variables uses: allenevans/set-env@v1.0.0 with: @@ -68,7 +68,7 @@ jobs: with: command: test args: -p napi-rs --lib -- --nocapture - + - name: test scripts run: | yarn diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..5feb9078 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,2 @@ +target +node_modules \ No newline at end of file diff --git a/README.md b/README.md index aea9a5a4..3cacd105 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,7 @@ This library depends on N-API and requires Node 8.9 or later. It is still pretty One nice feature is that this crate allows you to build add-ons purely with the Rust toolchain and without involving `node-gyp`. ## Taste + ```rust #[js_function(1)] // ------> arguments length, omit for zero fn fibonacci(ctx: CallContext) -> Result> { @@ -62,7 +63,7 @@ napi-build = "0.1" And create `build.rs` in your own project: -```rs +```rust // build.rs extern crate napi_build; @@ -71,14 +72,13 @@ fn main() { } ``` -So far, the `napi` build script has only been tested on `macOS` `Linux` and `Windows x64 MSVC`. +So far, the `napi` build script has only been tested on `macOS` `Linux` and `Windows x64 MSVC`. See the included [test_module](./test_module) for an example add-on. Run `cargo build` to produce the `Dynamic lib` file. And install the `napi-rs` to help you copy `Dynamic lib` file to `.node` file in case you can `require` it in your program. ```json - { "package": "your pkg", "dependencies": { @@ -127,78 +127,78 @@ npm test ### Create JavaScript values -| NAPI | NAPI Version | Minimal Node version | Status | -| ------------------------------------------------------------ | ------------ | -------------------- | ------ | -| [Enum types](https://nodejs.org/api/n-api.html#n_api_enum_types) | 6 | v13.7.0 | ⛔️ | -| [napi_create_array](https://nodejs.org/api/n-api.html#n_api_napi_create_array) | 1 | v8.0.0 | ✅ | -| [napi_create_array_with_length](https://nodejs.org/api/n-api.html#n_api_napi_create_array_with_length) | 1 | v8.0.0 | ✅ | -| [napi_create_arraybuffer](https://nodejs.org/api/n-api.html#n_api_napi_create_arraybuffer) | 1 | v8.0.0 | ✅ | -| [napi_create_buffer](https://nodejs.org/api/n-api.html#n_api_napi_create_buffer) | 1 | v8.0.0 | ✅ | -| [napi_create_buffer_copy](https://nodejs.org/api/n-api.html#n_api_napi_create_buffer_copy) | 1 | v8.0.0 | ⛔️ | -| [napi_create_date](https://nodejs.org/api/n-api.html#n_api_napi_create_date) | 5 | v11.11.0 | ⛔️ | -| [napi_create_external](https://nodejs.org/api/n-api.html#n_api_napi_create_external) | 1 | v8.0.0 | ⛔️ | -| [napi_create_external_arraybuffer](https://nodejs.org/api/n-api.html#n_api_napi_create_external_arraybuffer) | 1 | v8.0.0 | ✅ | -| [napi_create_external_buffer](https://nodejs.org/api/n-api.html#n_api_napi_create_external_buffer) | 1 | v8.0.0 | ✅ | -| [napi_create_object](https://nodejs.org/api/n-api.html#n_api_napi_create_object) | 1 | v8.0.0 | ✅ | -| [napi_create_symbol](https://nodejs.org/api/n-api.html#n_api_napi_create_symbol) | 1 | v8.0.0 | ⛔️ | -| [napi_create_typedarray](https://nodejs.org/api/n-api.html#n_api_napi_create_typedarray) | 1 | v8.0.0 | ⛔️ | -| [napi_create_dataview](https://nodejs.org/api/n-api.html#n_api_napi_create_dataview) | 1 | v8.3.0 | ⛔️ | -| [napi_create_int32](https://nodejs.org/api/n-api.html#n_api_napi_create_int32) | 1 | v8.4.0 | ✅ | -| [napi_create_uint32](https://nodejs.org/api/n-api.html#n_api_napi_create_uint32) | 1 | v8.4.0 | ✅ | -| [napi_create_int64](https://nodejs.org/api/n-api.html#n_api_napi_create_int64) | 1 | v8.4.0 | ✅ | -| [napi_create_double](https://nodejs.org/api/n-api.html#n_api_napi_create_double) | 1 | v8.4.0 | ✅ | -| [napi_create_bigint_int64](https://nodejs.org/api/n-api.html#n_api_napi_create_bigint_int64) | 6 | v10.7.0 | ⛔️ | -| [napi_create_bigint_uint64](https://nodejs.org/api/n-api.html#n_api_napi_create_bigint_uint64) | 6 | v10.7.0 | ⛔️ | -| [napi_create_bigint_words](https://nodejs.org/api/n-api.html#n_api_napi_create_bigint_words) | 6 | v10.7.0 | ⛔️ | -| [napi_create_string_latin1](https://nodejs.org/api/n-api.html#n_api_napi_create_string_latin1) | 1 | v8.0.0 | ⛔️ | -| [napi_create_string_utf16](https://nodejs.org/api/n-api.html#n_api_napi_create_string_utf16) | 1 | v8.0.0 | ✅ | -| [napi_create_string_utf8](https://nodejs.org/api/n-api.html#n_api_napi_create_string_utf8) | 1 | v8.0.0 | ✅ | +| NAPI | NAPI Version | Minimal Node version | Status | +| ------------------------------------------------------------------------------------------------------------ | ------------ | -------------------- | ------ | +| [Enum types](https://nodejs.org/api/n-api.html#n_api_enum_types) | 6 | v13.7.0 | ⛔️ | +| [napi_create_array](https://nodejs.org/api/n-api.html#n_api_napi_create_array) | 1 | v8.0.0 | ✅ | +| [napi_create_array_with_length](https://nodejs.org/api/n-api.html#n_api_napi_create_array_with_length) | 1 | v8.0.0 | ✅ | +| [napi_create_arraybuffer](https://nodejs.org/api/n-api.html#n_api_napi_create_arraybuffer) | 1 | v8.0.0 | ✅ | +| [napi_create_buffer](https://nodejs.org/api/n-api.html#n_api_napi_create_buffer) | 1 | v8.0.0 | ✅ | +| [napi_create_buffer_copy](https://nodejs.org/api/n-api.html#n_api_napi_create_buffer_copy) | 1 | v8.0.0 | ⛔️ | +| [napi_create_date](https://nodejs.org/api/n-api.html#n_api_napi_create_date) | 5 | v11.11.0 | ⛔️ | +| [napi_create_external](https://nodejs.org/api/n-api.html#n_api_napi_create_external) | 1 | v8.0.0 | ⛔️ | +| [napi_create_external_arraybuffer](https://nodejs.org/api/n-api.html#n_api_napi_create_external_arraybuffer) | 1 | v8.0.0 | ✅ | +| [napi_create_external_buffer](https://nodejs.org/api/n-api.html#n_api_napi_create_external_buffer) | 1 | v8.0.0 | ✅ | +| [napi_create_object](https://nodejs.org/api/n-api.html#n_api_napi_create_object) | 1 | v8.0.0 | ✅ | +| [napi_create_symbol](https://nodejs.org/api/n-api.html#n_api_napi_create_symbol) | 1 | v8.0.0 | ⛔️ | +| [napi_create_typedarray](https://nodejs.org/api/n-api.html#n_api_napi_create_typedarray) | 1 | v8.0.0 | ⛔️ | +| [napi_create_dataview](https://nodejs.org/api/n-api.html#n_api_napi_create_dataview) | 1 | v8.3.0 | ⛔️ | +| [napi_create_int32](https://nodejs.org/api/n-api.html#n_api_napi_create_int32) | 1 | v8.4.0 | ✅ | +| [napi_create_uint32](https://nodejs.org/api/n-api.html#n_api_napi_create_uint32) | 1 | v8.4.0 | ✅ | +| [napi_create_int64](https://nodejs.org/api/n-api.html#n_api_napi_create_int64) | 1 | v8.4.0 | ✅ | +| [napi_create_double](https://nodejs.org/api/n-api.html#n_api_napi_create_double) | 1 | v8.4.0 | ✅ | +| [napi_create_bigint_int64](https://nodejs.org/api/n-api.html#n_api_napi_create_bigint_int64) | 6 | v10.7.0 | ⛔️ | +| [napi_create_bigint_uint64](https://nodejs.org/api/n-api.html#n_api_napi_create_bigint_uint64) | 6 | v10.7.0 | ⛔️ | +| [napi_create_bigint_words](https://nodejs.org/api/n-api.html#n_api_napi_create_bigint_words) | 6 | v10.7.0 | ⛔️ | +| [napi_create_string_latin1](https://nodejs.org/api/n-api.html#n_api_napi_create_string_latin1) | 1 | v8.0.0 | ⛔️ | +| [napi_create_string_utf16](https://nodejs.org/api/n-api.html#n_api_napi_create_string_utf16) | 1 | v8.0.0 | ✅ | +| [napi_create_string_utf8](https://nodejs.org/api/n-api.html#n_api_napi_create_string_utf8) | 1 | v8.0.0 | ✅ | ### [Functions to convert from N-API to C types](https://nodejs.org/api/n-api.html#n_api_functions_to_convert_from_n_api_to_c_types) -| NAPI | NAPI Version | Minimal Node Version | Status | -| ---- | ------------ | -------------------- | ------ | -|[napi_get_array_length](https://nodejs.org/api/n-api.html#n_api_napi_get_array_length)| 1 | v8.0.0 | ✅ | -|[napi_get_arraybuffer_info](https://nodejs.org/api/n-api.html#n_api_napi_get_arraybuffer_info)| 1 | v8.0.0 | ✅ | -|[napi_get_buffer_info](https://nodejs.org/api/n-api.html#n_api_napi_get_buffer_info)| 1 | v8.0.0 | ✅ | -|[napi_get_prototype](https://nodejs.org/api/n-api.html#n_api_napi_get_prototype)| 1 | v8.0.0 | ⛔️ | -|[napi_get_typedarray_info](https://nodejs.org/api/n-api.html#n_api_napi_get_typedarray_info)| 1 | v8.0.0 | ⛔️ | -|[napi_get_dataview_info](https://nodejs.org/api/n-api.html#n_api_napi_get_dataview_info)| 1 | v8.3.0 | ⛔️ | -|[napi_get_date_value](https://nodejs.org/api/n-api.html#n_api_napi_get_date_value)| 5 | v11.11.0 | ⛔️ | -|[napi_get_value_bool](https://nodejs.org/api/n-api.html#n_api_napi_get_value_bool)| 1 | v8.0.0 | ✅ | -|[napi_get_value_double](https://nodejs.org/api/n-api.html#n_api_napi_get_value_double)| 1 | v8.0.0 | ✅ | -|[napi_get_value_bigint_int64](https://nodejs.org/api/n-api.html#n_api_napi_get_value_bigint_int64)| 6 | v10.7.0 | ⛔️ | -|[napi_get_value_bigint_uint64](https://nodejs.org/api/n-api.html#n_api_napi_get_value_bigint_uint64)| 6 | v10.7.0 | ⛔️ | -|[napi_get_value_bigint_words](https://nodejs.org/api/n-api.html#n_api_napi_get_value_bigint_words)| 6 | v10.7.0 | ⛔️ | -|[napi_get_value_external](https://nodejs.org/api/n-api.html#n_api_napi_get_value_external)| 1 | v8.0.0 | ⛔️ | -|[napi_get_value_int32](https://nodejs.org/api/n-api.html#n_api_napi_get_value_int32)| 1 | v8.0.0 | ✅ | -|[napi_get_value_int64](https://nodejs.org/api/n-api.html#n_api_napi_get_value_int64)| 1 | v8.0.0 | ✅ | -|[napi_get_value_string_latin1](https://nodejs.org/api/n-api.html#n_api_napi_get_value_string_latin1)| 1 | v8.0.0 | ⛔️ | -|[napi_get_value_string_utf8](https://nodejs.org/api/n-api.html#n_api_napi_get_value_string_utf8)| 1 | v8.0.0 | ✅ | -|[napi_get_value_string_utf16](https://nodejs.org/api/n-api.html#n_api_napi_get_value_string_utf16)| 1 | v8.0.0 | ✅ | -|[napi_get_value_uint32](https://nodejs.org/api/n-api.html#n_api_napi_get_value_uint32)| 1 | v8.0.0 | ✅ | -|[napi_get_boolean](https://nodejs.org/api/n-api.html#n_api_napi_get_boolean)| 1 | v8.0.0 | ✅ | -|[napi_get_global](https://nodejs.org/api/n-api.html#n_api_napi_get_global)| 1 | v8.0.0 | ⛔️ | -|[napi_get_null](https://nodejs.org/api/n-api.html#n_api_napi_get_null)| 1 | v8.0.0 | ✅ | -|[napi_get_undefined](https://nodejs.org/api/n-api.html#n_api_napi_get_undefined)| 1 | v8.0.0 | ✅ | +| NAPI | NAPI Version | Minimal Node Version | Status | +| ---------------------------------------------------------------------------------------------------- | ------------ | -------------------- | ------ | +| [napi_get_array_length](https://nodejs.org/api/n-api.html#n_api_napi_get_array_length) | 1 | v8.0.0 | ✅ | +| [napi_get_arraybuffer_info](https://nodejs.org/api/n-api.html#n_api_napi_get_arraybuffer_info) | 1 | v8.0.0 | ✅ | +| [napi_get_buffer_info](https://nodejs.org/api/n-api.html#n_api_napi_get_buffer_info) | 1 | v8.0.0 | ✅ | +| [napi_get_prototype](https://nodejs.org/api/n-api.html#n_api_napi_get_prototype) | 1 | v8.0.0 | ⛔️ | +| [napi_get_typedarray_info](https://nodejs.org/api/n-api.html#n_api_napi_get_typedarray_info) | 1 | v8.0.0 | ⛔️ | +| [napi_get_dataview_info](https://nodejs.org/api/n-api.html#n_api_napi_get_dataview_info) | 1 | v8.3.0 | ⛔️ | +| [napi_get_date_value](https://nodejs.org/api/n-api.html#n_api_napi_get_date_value) | 5 | v11.11.0 | ⛔️ | +| [napi_get_value_bool](https://nodejs.org/api/n-api.html#n_api_napi_get_value_bool) | 1 | v8.0.0 | ✅ | +| [napi_get_value_double](https://nodejs.org/api/n-api.html#n_api_napi_get_value_double) | 1 | v8.0.0 | ✅ | +| [napi_get_value_bigint_int64](https://nodejs.org/api/n-api.html#n_api_napi_get_value_bigint_int64) | 6 | v10.7.0 | ⛔️ | +| [napi_get_value_bigint_uint64](https://nodejs.org/api/n-api.html#n_api_napi_get_value_bigint_uint64) | 6 | v10.7.0 | ⛔️ | +| [napi_get_value_bigint_words](https://nodejs.org/api/n-api.html#n_api_napi_get_value_bigint_words) | 6 | v10.7.0 | ⛔️ | +| [napi_get_value_external](https://nodejs.org/api/n-api.html#n_api_napi_get_value_external) | 1 | v8.0.0 | ⛔️ | +| [napi_get_value_int32](https://nodejs.org/api/n-api.html#n_api_napi_get_value_int32) | 1 | v8.0.0 | ✅ | +| [napi_get_value_int64](https://nodejs.org/api/n-api.html#n_api_napi_get_value_int64) | 1 | v8.0.0 | ✅ | +| [napi_get_value_string_latin1](https://nodejs.org/api/n-api.html#n_api_napi_get_value_string_latin1) | 1 | v8.0.0 | ⛔️ | +| [napi_get_value_string_utf8](https://nodejs.org/api/n-api.html#n_api_napi_get_value_string_utf8) | 1 | v8.0.0 | ✅ | +| [napi_get_value_string_utf16](https://nodejs.org/api/n-api.html#n_api_napi_get_value_string_utf16) | 1 | v8.0.0 | ✅ | +| [napi_get_value_uint32](https://nodejs.org/api/n-api.html#n_api_napi_get_value_uint32) | 1 | v8.0.0 | ✅ | +| [napi_get_boolean](https://nodejs.org/api/n-api.html#n_api_napi_get_boolean) | 1 | v8.0.0 | ✅ | +| [napi_get_global](https://nodejs.org/api/n-api.html#n_api_napi_get_global) | 1 | v8.0.0 | ⛔️ | +| [napi_get_null](https://nodejs.org/api/n-api.html#n_api_napi_get_null) | 1 | v8.0.0 | ✅ | +| [napi_get_undefined](https://nodejs.org/api/n-api.html#n_api_napi_get_undefined) | 1 | v8.0.0 | ✅ | ### [Working with JavaScript Values and Abstract Operations](https://nodejs.org/api/n-api.html#n_api_working_with_javascript_values_and_abstract_operations) -| NAPI | NAPI Version | Minimal Node Version | Status | -| ---- | ------------ | -------------------- | ------ | -|[napi_coerce_to_bool](https://nodejs.org/api/n-api.html#n_api_napi_coerce_to_bool)| 1 | v8.0.0 | ✅ | -|[napi_coerce_to_number](https://nodejs.org/api/n-api.html#n_api_napi_coerce_to_number)| 1 | v8.0.0 | ✅ | -|[napi_coerce_to_object](https://nodejs.org/api/n-api.html#n_api_napi_coerce_to_object)| 1 | v8.0.0 | ✅ | -|[napi_coerce_to_string](https://nodejs.org/api/n-api.html#n_api_napi_coerce_to_string)| 1 | v8.0.0 | ✅ | -|[napi_typeof](https://nodejs.org/api/n-api.html#n_api_napi_typeof)| 1 | v8.0.0 | ✅ | -|[napi_instanceof](https://nodejs.org/api/n-api.html#n_api_napi_instanceof)| 1 | v8.0.0 | ⛔️ | -|[napi_is_array](https://nodejs.org/api/n-api.html#n_api_napi_is_array)| 1 | v8.0.0 | ✅ | -|[napi_is_arraybuffer](https://nodejs.org/api/n-api.html#n_api_napi_is_arraybuffer)| 1 | v8.0.0 | ✅ | -|[napi_is_buffer](https://nodejs.org/api/n-api.html#n_api_napi_is_buffer)| 1 | v8.0.0 | ✅ | -|[napi_is_date](https://nodejs.org/api/n-api.html#n_api_napi_is_date)| 1 | v8.0.0 | ⛔️ | -|[napi_is_error](https://nodejs.org/api/n-api.html#n_api_napi_is_error_1)| 1 | v8.0.0 | ⛔️ | -|[napi_is_typedarray](https://nodejs.org/api/n-api.html#n_api_napi_is_typedarray)| 1 | v8.0.0 | ⛔️ | -|[napi_is_dataview](https://nodejs.org/api/n-api.html#n_api_napi_is_dataview)| 1 | v8.3.0 | ⛔️ | -|[napi_strict_equals](https://nodejs.org/api/n-api.html#n_api_napi_strict_equals)| 1 | v8.0.0 | ⛔️ | -|[napi_detach_arraybuffer](https://nodejs.org/api/n-api.html#n_api_napi_detach_arraybuffer)| Experimental | v13.3.0 | ⛔️ | -|[napi_is_detached_arraybuffer](https://nodejs.org/api/n-api.html#n_api_napi_is_detached_arraybuffer)| Experimental | v13.3.0 | ⛔️ | \ No newline at end of file +| NAPI | NAPI Version | Minimal Node Version | Status | +| ---------------------------------------------------------------------------------------------------- | ------------ | -------------------- | ------ | +| [napi_coerce_to_bool](https://nodejs.org/api/n-api.html#n_api_napi_coerce_to_bool) | 1 | v8.0.0 | ✅ | +| [napi_coerce_to_number](https://nodejs.org/api/n-api.html#n_api_napi_coerce_to_number) | 1 | v8.0.0 | ✅ | +| [napi_coerce_to_object](https://nodejs.org/api/n-api.html#n_api_napi_coerce_to_object) | 1 | v8.0.0 | ✅ | +| [napi_coerce_to_string](https://nodejs.org/api/n-api.html#n_api_napi_coerce_to_string) | 1 | v8.0.0 | ✅ | +| [napi_typeof](https://nodejs.org/api/n-api.html#n_api_napi_typeof) | 1 | v8.0.0 | ✅ | +| [napi_instanceof](https://nodejs.org/api/n-api.html#n_api_napi_instanceof) | 1 | v8.0.0 | ⛔️ | +| [napi_is_array](https://nodejs.org/api/n-api.html#n_api_napi_is_array) | 1 | v8.0.0 | ✅ | +| [napi_is_arraybuffer](https://nodejs.org/api/n-api.html#n_api_napi_is_arraybuffer) | 1 | v8.0.0 | ✅ | +| [napi_is_buffer](https://nodejs.org/api/n-api.html#n_api_napi_is_buffer) | 1 | v8.0.0 | ✅ | +| [napi_is_date](https://nodejs.org/api/n-api.html#n_api_napi_is_date) | 1 | v8.0.0 | ⛔️ | +| [napi_is_error](https://nodejs.org/api/n-api.html#n_api_napi_is_error_1) | 1 | v8.0.0 | ⛔️ | +| [napi_is_typedarray](https://nodejs.org/api/n-api.html#n_api_napi_is_typedarray) | 1 | v8.0.0 | ⛔️ | +| [napi_is_dataview](https://nodejs.org/api/n-api.html#n_api_napi_is_dataview) | 1 | v8.3.0 | ⛔️ | +| [napi_strict_equals](https://nodejs.org/api/n-api.html#n_api_napi_strict_equals) | 1 | v8.0.0 | ⛔️ | +| [napi_detach_arraybuffer](https://nodejs.org/api/n-api.html#n_api_napi_detach_arraybuffer) | Experimental | v13.3.0 | ⛔️ | +| [napi_is_detached_arraybuffer](https://nodejs.org/api/n-api.html#n_api_napi_is_detached_arraybuffer) | Experimental | v13.3.0 | ⛔️ | diff --git a/build/README.md b/build/README.md index 1609bc36..01829dba 100644 --- a/build/README.md +++ b/build/README.md @@ -1,4 +1,5 @@ # napi-build + > Build support for napi-rs Setup `N-API` build in your `build.rs`: diff --git a/napi-derive-example/src/lib.rs b/napi-derive-example/src/lib.rs index 3f997200..6dded1cc 100644 --- a/napi-derive-example/src/lib.rs +++ b/napi-derive-example/src/lib.rs @@ -8,10 +8,7 @@ use std::convert::TryInto; register_module!(test_module, init); -fn init<'env>( - env: &'env Env, - exports: &'env mut Value<'env, Object>, -) -> Result>> { +fn init(env: &Env, exports: &mut Value) -> Result>> { exports.set_named_property("testThrow", env.create_function("testThrow", test_throw)?)?; exports.set_named_property("fibonacci", env.create_function("fibonacci", fibonacci)?)?; @@ -20,7 +17,7 @@ fn init<'env>( #[js_function] fn test_throw(_ctx: CallContext) -> Result> { - Err(Error::new(Status::GenericFailure)) + Err(Error::from_status(Status::GenericFailure)) } #[js_function(1)] diff --git a/napi-derive/src/lib.rs b/napi-derive/src/lib.rs index e63b2226..f3b44834 100644 --- a/napi-derive/src/lib.rs +++ b/napi-derive/src/lib.rs @@ -102,16 +102,13 @@ pub fn js_function(attr: TokenStream, input: TokenStream) -> TokenStream { } let env = Env::from_raw(raw_env); - let call_ctx = CallContext::new(&env, raw_this, raw_args, #arg_len_span); + let call_ctx = CallContext::new(env, raw_this, raw_args, #arg_len_span); let result = call_ctx.and_then(|ctx| #new_fn_name(ctx)); has_error = has_error && result.is_err(); match result { Ok(result) => result.into_raw(), Err(e) => { - if !cfg!(windows) { - let _ = writeln!(::std::io::stderr(), "Error calling function: {:?}", e); - } let message = format!("{:?}", e); unsafe { napi_rs::sys::napi_throw_error(raw_env, ptr::null(), message.as_ptr() as *const c_char); diff --git a/napi/Cargo.toml b/napi/Cargo.toml index a8cac29e..eefd3f40 100644 --- a/napi/Cargo.toml +++ b/napi/Cargo.toml @@ -7,6 +7,7 @@ description = "N-API bindings" readme = "README.md" repository = "https://github.com/Brooooooklyn/napi-rs" keywords = ["NodeJS", "FFI", "NAPI", "n-api"] +edition = "2018" [dependencies] futures = { version = "0.3", features = ["default", "thread-pool"] } @@ -25,7 +26,6 @@ tar = "0.4" [build-dependencies] bindgen = "0.53" -cc = "1.0" glob = "0.3" napi-build = { version = "0.1", path = "../build" } regex = "1.3" diff --git a/napi/build.rs b/napi/build.rs index 66b48428..f80d29ad 100644 --- a/napi/build.rs +++ b/napi/build.rs @@ -1,5 +1,4 @@ extern crate bindgen; -extern crate cc; #[cfg(windows)] extern crate flate2; extern crate glob; @@ -36,8 +35,6 @@ fn main() { ); } - env::set_var("CARGO_RUSTC_FLAGS", "-Clink-args=-export_dynamic"); - if node_major_version < 10 { panic!("node version is too low") } @@ -60,31 +57,6 @@ fn main() { .expect("Unable to generate napi bindings") .write_to_file(out_path.join("bindings.rs")) .expect("Unable to write napi bindings"); - - let mut bindings_path = PathBuf::from("src"); - bindings_path.push("sys"); - bindings_path.push("bindings.cc"); - - let mut cc_builder = cc::Build::new(); - - cc_builder - .cpp(true) - .include(&node_include_path) - .file(bindings_path); - if !cfg!(windows) { - cc_builder.flag("-Wno-unused-parameter"); - }; - - if cfg!(target_os = "macos") { - cc_builder.flag("-std=c++0x"); - } else if cfg!(linux) || cfg!(target_env = "gnu") { - cc_builder.flag("-std=c++14"); - } - - cc_builder - .cargo_metadata(true) - .out_dir(&out_path) - .compile("napi-bindings"); } #[cfg(target_os = "windows")] diff --git a/napi/src/call_context.rs b/napi/src/call_context.rs index 4b826ea1..d85060ff 100644 --- a/napi/src/call_context.rs +++ b/napi/src/call_context.rs @@ -1,32 +1,35 @@ use crate::{sys, Any, Env, Error, Result, Status, Value, ValueType}; -pub struct CallContext<'env, T: ValueType = Any> { - pub env: &'env Env, - pub this: Value<'env, T>, +pub struct CallContext { + pub env: Env, + pub this: Value, args: [sys::napi_value; 8], arg_len: usize, } -impl<'env, T: ValueType> CallContext<'env, T> { +impl CallContext { pub fn new( - env: &'env Env, + env: Env, this: sys::napi_value, args: [sys::napi_value; 8], arg_len: usize, ) -> Result { Ok(Self { env, - this: Value::<'env, T>::from_raw(env, this)?, + this: Value::::from_raw(env.0, this)?, args, arg_len, }) } - pub fn get(&'env self, index: usize) -> Result> { + pub fn get(&self, index: usize) -> Result> { if index + 1 > self.arg_len { - Err(Error::new(Status::GenericFailure)) + Err(Error { + status: Status::GenericFailure, + reason: Some("Arguments index out of range".to_owned()), + }) } else { - Value::<'env, ArgType>::from_raw(&self.env, self.args[index]) + Value::::from_raw(self.env.0, self.args[index]) } } } diff --git a/napi/src/executor.rs b/napi/src/executor.rs index 2146002e..b4c3335a 100644 --- a/napi/src/executor.rs +++ b/napi/src/executor.rs @@ -1,4 +1,3 @@ -use super::sys; use futures::task::Poll; use std::future::Future; use std::mem; @@ -7,16 +6,7 @@ use std::pin::Pin; use std::sync::Arc; use std::task::{Context, RawWaker, RawWakerVTable, Waker}; -pub struct LibuvExecutor { - event_loop: *mut sys::uv_loop_s, -} - -#[derive(Clone, Debug)] -struct LibuvWaker(*mut sys::uv_async_t); - -unsafe impl Send for LibuvWaker {} - -unsafe impl Sync for LibuvWaker {} +use crate::{sys, Error, Result, Status}; const UV_ASYNC_V_TABLE: RawWakerVTable = RawWakerVTable::new( clone_executor, @@ -39,46 +29,47 @@ unsafe fn wake_uv_async_by_ref(uv_async_t: *const ()) { assert!(status == 0, "wake_uv_async_by_ref failed"); } -unsafe fn drop_uv_async(uv_async_t_ptr: *const ()) { - sys::uv_unref(uv_async_t_ptr as *mut sys::uv_handle_t); -} +unsafe fn drop_uv_async(_uv_async_t_ptr: *const ()) {} struct Task<'a> { future: Pin>>, context: Context<'a>, } -impl LibuvExecutor { - pub fn new(event_loop: *mut sys::uv_loop_s) -> Self { - Self { event_loop } - } - - pub fn execute>(&self, future: F) { - let uninit = mem::MaybeUninit::::uninit(); - let uv_async_t: Box = unsafe { Box::new(uninit.assume_init()) }; - let uv_async_t_ref = Box::leak(uv_async_t); - unsafe { - let status = sys::uv_async_init(self.event_loop, uv_async_t_ref, Some(poll_future)); - assert!(status == 0, "Non-zero status returned from uv_async_init"); - }; - unsafe { - let waker = Waker::from_raw(RawWaker::new( - uv_async_t_ref as *mut _ as *const (), - &UV_ASYNC_V_TABLE, - )); - let context = Context::from_waker(&waker); - let mut task = Box::new(Task { - future: Box::pin(future), - context, +pub fn execute>( + event_loop: *mut sys::uv_loop_s, + future: F, +) -> Result<()> { + let uninit = mem::MaybeUninit::::uninit(); + let uv_async_t: Box = unsafe { Box::new(uninit.assume_init()) }; + let uv_async_t_ref = Box::leak(uv_async_t); + unsafe { + let status = sys::uv_async_init(event_loop, uv_async_t_ref, Some(poll_future)); + if status != 0 { + return Err(Error { + status: Status::Unknown, + reason: Some("Non-zero status returned from uv_async_init".to_owned()), }); - if !task.as_mut().poll_future() { - let arc_task = Arc::new(task); - sys::uv_handle_set_data( - uv_async_t_ref as *mut _ as *mut sys::uv_handle_t, - Arc::into_raw(arc_task) as *mut c_void, - ); - } } + }; + unsafe { + let waker = Waker::from_raw(RawWaker::new( + uv_async_t_ref as *mut _ as *const (), + &UV_ASYNC_V_TABLE, + )); + let context = Context::from_waker(&waker); + let mut task = Box::new(Task { + future: Box::pin(future), + context, + }); + if !task.as_mut().poll_future() { + let arc_task = Arc::new(task); + sys::uv_handle_set_data( + uv_async_t_ref as *mut _ as *mut sys::uv_handle_t, + Arc::into_raw(arc_task) as *mut c_void, + ); + }; + Ok(()) } } @@ -96,10 +87,7 @@ unsafe extern "C" fn poll_future(handle: *mut sys::uv_async_t) { let mut task = Arc::from_raw(data_ptr); if let Some(mut_task) = Arc::get_mut(&mut task) { if mut_task.poll_future() { - sys::uv_close( - handle as *mut sys::uv_handle_t, - Some(drop_handle_after_close), - ); + sys::uv_close(handle as *mut sys::uv_handle_t, None); } else { Arc::into_raw(task); }; @@ -107,7 +95,3 @@ unsafe extern "C" fn poll_future(handle: *mut sys::uv_async_t) { Arc::into_raw(task); } } - -unsafe extern "C" fn drop_handle_after_close(handle: *mut sys::uv_handle_t) { - Box::from_raw(handle); -} diff --git a/napi/src/lib.rs b/napi/src/lib.rs index 36acb931..8986372d 100644 --- a/napi/src/lib.rs +++ b/napi/src/lib.rs @@ -1,5 +1,7 @@ extern crate futures; +use core::fmt::Debug; +use futures::prelude::*; use std::any::TypeId; use std::convert::{TryFrom, TryInto}; use std::ffi::CString; @@ -14,17 +16,21 @@ use std::string::String as RustString; mod call_context; mod executor; +mod promise; pub mod sys; +mod version; pub use call_context::CallContext; pub use sys::{napi_valuetype, Status}; +pub use version::NodeVersion; pub type Result = std::result::Result; pub type Callback = extern "C" fn(sys::napi_env, sys::napi_callback_info) -> sys::napi_value; -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct Error { - status: Status, + pub status: Status, + pub reason: Option, } #[derive(Clone, Copy, Debug)] @@ -75,8 +81,8 @@ pub struct ArrayBuffer { } #[derive(Clone, Copy, Debug)] -pub struct Value<'env, T> { - env: &'env Env, +pub struct Value { + env: sys::napi_env, raw_value: sys::napi_value, value: T, } @@ -87,14 +93,6 @@ pub struct Ref { _marker: PhantomData, } -pub struct AsyncContext { - raw_env: sys::napi_env, - raw_context: sys::napi_async_context, - raw_resource: sys::napi_ref, -} - -pub struct Deferred(sys::napi_deferred); - #[derive(Clone, Debug)] pub struct Property { name: RustString, @@ -141,7 +139,7 @@ macro_rules! register_module { raw_exports: sys::napi_value, ) -> sys::napi_value { let env = Env::from_raw(raw_env); - let mut exports: Value = Value::from_raw(&env, raw_exports).unwrap(); + let mut exports: Value = Value::from_raw(raw_env, raw_exports).unwrap(); let result = $init(&env, &mut exports); @@ -162,15 +160,19 @@ macro_rules! register_module { } impl Error { - pub fn new(status: Status) -> Self { - Error { status: status } + pub fn from_status(status: Status) -> Self { + Error { + status: status, + reason: None, + } } } impl From for Error { - fn from(_error: std::ffi::NulError) -> Self { + fn from(error: std::ffi::NulError) -> Self { Error { status: Status::StringExpected, + reason: Some(format!("{:?}", error)), } } } @@ -180,14 +182,14 @@ impl Env { Env(env) } - pub fn get_undefined<'a>(&'a self) -> Result> { + pub fn get_undefined(&self) -> Result> { let mut raw_value = ptr::null_mut(); let status = unsafe { sys::napi_get_undefined(self.0, &mut raw_value) }; check_status(status)?; Ok(Value::from_raw_value(self, raw_value, Undefined)) } - pub fn get_null<'a>(&'a self) -> Result> { + pub fn get_null(&self) -> Result> { let mut raw_value = ptr::null_mut(); let status = unsafe { sys::napi_get_null(self.0, &mut raw_value) }; check_status(status)?; @@ -201,7 +203,7 @@ impl Env { Ok(Value::from_raw_value(self, raw_value, Boolean { value })) } - pub fn create_int32<'a>(&'a self, int: i32) -> Result> { + pub fn create_int32(&self, int: i32) -> Result> { let mut raw_value = ptr::null_mut(); let status = unsafe { sys::napi_create_int32(self.0, int, (&mut raw_value) as *mut sys::napi_value) }; @@ -209,7 +211,7 @@ impl Env { Ok(Value::from_raw_value(self, raw_value, Number::Int32(int))) } - pub fn create_int64<'a>(&'a self, int: i64) -> Result> { + pub fn create_int64(&self, int: i64) -> Result> { let mut raw_value = ptr::null_mut(); let status = unsafe { sys::napi_create_int64(self.0, int, (&mut raw_value) as *mut sys::napi_value) }; @@ -217,7 +219,7 @@ impl Env { Ok(Value::from_raw_value(self, raw_value, Number::Int(int))) } - pub fn create_uint32<'a>(&'a self, number: u32) -> Result> { + pub fn create_uint32(&self, number: u32) -> Result> { let mut raw_value = ptr::null_mut(); let status = unsafe { sys::napi_create_uint32(self.0, number, (&mut raw_value) as *mut sys::napi_value) }; @@ -225,7 +227,7 @@ impl Env { Ok(Value::from_raw_value(self, raw_value, Number::U32(number))) } - pub fn create_double<'a>(&'a self, double: f64) -> Result> { + pub fn create_double(&self, double: f64) -> Result> { let mut raw_value = ptr::null_mut(); let status = unsafe { sys::napi_create_double(self.0, double, (&mut raw_value) as *mut sys::napi_value) }; @@ -237,7 +239,7 @@ impl Env { )) } - pub fn create_string<'a, 'b>(&'a self, s: &'b str) -> Result> { + pub fn create_string<'a, 'b>(&'a self, s: &'b str) -> Result> { let mut raw_value = ptr::null_mut(); let status = unsafe { sys::napi_create_string_utf8( @@ -260,7 +262,7 @@ impl Env { Ok(Value::from_raw_value(self, raw_value, JsString)) } - pub fn create_object<'a>(&'a self) -> Result> { + pub fn create_object(&self) -> Result> { let mut raw_value = ptr::null_mut(); let status = unsafe { sys::napi_create_object(self.0, &mut raw_value) }; check_status(status)?; @@ -365,11 +367,7 @@ impl Env { )) } - pub fn create_function<'a, 'b>( - &'a self, - name: &'b str, - callback: Callback, - ) -> Result> { + pub fn create_function(&self, name: &str, callback: Callback) -> Result> { let mut raw_result = ptr::null_mut(); let status = unsafe { sys::napi_create_function( @@ -414,7 +412,7 @@ impl Env { check_status(status)?; }; - Value::from_raw(self, raw_value) + Value::from_raw(self.0, raw_value) } pub fn define_class<'a, 'b>( @@ -422,7 +420,7 @@ impl Env { name: &'b str, constructor_cb: Callback, properties: Vec, - ) -> Result> { + ) -> Result> { let mut raw_result = ptr::null_mut(); let raw_properties = properties .into_iter() @@ -473,10 +471,14 @@ impl Env { let tagged_object: *mut TaggedObject = mem::transmute(unknown_tagged_object); (*tagged_object).object.as_mut().ok_or(Error { status: Status::InvalidArg, + reason: Some("Invalid argument, nothing attach to js_object".to_owned()), }) } else { Err(Error { status: Status::InvalidArg, + reason: Some( + "Invalid argument, T on unrwap is not the type of wrapped object".to_owned(), + ), }) } } @@ -496,35 +498,40 @@ impl Env { } else { Err(Error { status: Status::InvalidArg, + reason: Some( + "Invalid argument, T on drop_wrapped is not the type of wrapped object".to_owned(), + ), }) } } } - pub fn async_init(&self, resource: Option>, name: &str) -> Result { - let raw_resource = resource - .map(|r| Ok(r.into_raw())) - .unwrap_or_else(|| self.create_object().map(|o| o.into_raw()))?; - let raw_name = self.create_string(name)?.into_raw(); - - let mut raw_context = ptr::null_mut(); - let mut raw_resource_ref = ptr::null_mut(); - unsafe { - let status = sys::napi_async_init(self.0, raw_resource, raw_name, &mut raw_context); - check_status(status)?; - - let status = sys::napi_create_reference(self.0, raw_resource, 1, &mut raw_resource_ref); - check_status(status)?; - } - - Ok(AsyncContext { - raw_env: self.0, - raw_resource: raw_resource_ref, - raw_context, - }) + pub fn create_error(&self, e: Error) -> Result> { + let reason = e.reason.unwrap_or("".to_owned()); + let reason_string = self.create_string(reason.as_str())?; + let mut result = ptr::null_mut(); + let status = unsafe { + sys::napi_create_error( + self.0, + ptr::null_mut(), + reason_string.into_raw(), + &mut result, + ) + }; + check_status(status)?; + Ok(Value::from_raw_value(self, result, Object)) } - pub fn create_promise(&self) -> Result<(Value, Deferred)> { + pub fn perform_async_operation< + T: 'static, + V: 'static + ValueType, + F: 'static + Future>, + R: 'static + FnOnce(&mut Env, T) -> Result>, + >( + &self, + deferred: F, + resolver: R, + ) -> Result> { let mut raw_promise = ptr::null_mut(); let mut raw_deferred = ptr::null_mut(); @@ -533,28 +540,41 @@ impl Env { check_status(status)?; } - Ok(( - Value::from_raw_value(self, raw_promise, Object), - Deferred(raw_deferred), - )) - } - - pub fn resolve_deferred(&self, deferred: Deferred, value: Value) -> Result<()> { - unsafe { - let status = sys::napi_resolve_deferred(self.0, deferred.0, value.into_raw()); - check_status(status) - } - } - - pub fn create_executor(&self) -> executor::LibuvExecutor { let event_loop = unsafe { sys::uv_default_loop() }; - executor::LibuvExecutor::new(event_loop) + let raw_env = self.0; + executor::execute( + event_loop, + promise::resolve(self.0, deferred, resolver, raw_deferred).map(move |v| match v { + Ok(value) => value, + Err(e) => { + let cloned_error = e.clone(); + unsafe { + sys::napi_throw_error( + raw_env, + ptr::null(), + e.reason.unwrap_or(format!("{:?}", e.status)).as_ptr() as *const _, + ); + }; + eprintln!("{:?}", &cloned_error); + panic!(cloned_error); + } + }), + )?; + + Ok(Value::from_raw_value(self, raw_promise, Object)) + } + + pub fn get_node_version(&self) -> Result { + let mut result = ptr::null(); + check_status(unsafe { sys::napi_get_node_version(self.0, &mut result) })?; + let version = unsafe { *result }; + version.try_into() } } -pub trait ValueType: Copy { +pub trait ValueType: Copy + Debug { fn from_raw(env: sys::napi_env, raw: sys::napi_value) -> Result; - fn matches_raw_type(env: sys::napi_env, raw: sys::napi_value) -> bool; + fn matches_raw_type(env: sys::napi_env, raw: sys::napi_value) -> Result; } impl ValueType for Any { @@ -562,8 +582,8 @@ impl ValueType for Any { Ok(Any) } - fn matches_raw_type(_env: sys::napi_env, _raw: sys::napi_value) -> bool { - true + fn matches_raw_type(_env: sys::napi_env, _raw: sys::napi_value) -> Result { + Ok(true) } } @@ -572,8 +592,8 @@ impl ValueType for Undefined { Ok(Undefined) } - fn matches_raw_type(env: sys::napi_env, raw: sys::napi_value) -> bool { - get_raw_type(env, raw) == sys::napi_valuetype::napi_undefined + fn matches_raw_type(env: sys::napi_env, raw: sys::napi_value) -> Result { + Ok(get_raw_type(env, raw)? == sys::napi_valuetype::napi_undefined) } } @@ -582,8 +602,8 @@ impl ValueType for Null { Ok(Null) } - fn matches_raw_type(env: sys::napi_env, raw: sys::napi_value) -> bool { - get_raw_type(env, raw) == sys::napi_valuetype::napi_null + fn matches_raw_type(env: sys::napi_env, raw: sys::napi_value) -> Result { + Ok(get_raw_type(env, raw)? == sys::napi_valuetype::napi_null) } } @@ -595,8 +615,8 @@ impl ValueType for Boolean { Ok(Boolean { value }) } - fn matches_raw_type(env: sys::napi_env, raw: sys::napi_value) -> bool { - get_raw_type(env, raw) == sys::napi_valuetype::napi_boolean + fn matches_raw_type(env: sys::napi_env, raw: sys::napi_value) -> Result { + Ok(get_raw_type(env, raw)? == sys::napi_valuetype::napi_boolean) } } @@ -608,8 +628,8 @@ impl ValueType for Number { Ok(Number::Double(double)) } - fn matches_raw_type(env: sys::napi_env, raw: sys::napi_value) -> bool { - get_raw_type(env, raw) == sys::napi_valuetype::napi_number + fn matches_raw_type(env: sys::napi_env, raw: sys::napi_value) -> Result { + Ok(get_raw_type(env, raw)? == sys::napi_valuetype::napi_number) } } @@ -618,8 +638,8 @@ impl ValueType for JsString { Ok(JsString {}) } - fn matches_raw_type(env: sys::napi_env, raw: sys::napi_value) -> bool { - get_raw_type(env, raw) == sys::napi_valuetype::napi_string + fn matches_raw_type(env: sys::napi_env, raw: sys::napi_value) -> Result { + Ok(get_raw_type(env, raw)? == sys::napi_valuetype::napi_string) } } @@ -628,8 +648,8 @@ impl ValueType for Object { Ok(Object {}) } - fn matches_raw_type(env: sys::napi_env, raw: sys::napi_value) -> bool { - get_raw_type(env, raw) == sys::napi_valuetype::napi_object + fn matches_raw_type(env: sys::napi_env, raw: sys::napi_value) -> Result { + Ok(get_raw_type(env, raw)? == sys::napi_valuetype::napi_object) } } @@ -645,13 +665,13 @@ impl ValueType for Buffer { }) } - fn matches_raw_type(env: sys::napi_env, raw: sys::napi_value) -> bool { + fn matches_raw_type(env: sys::napi_env, raw: sys::napi_value) -> Result { let mut result = false; unsafe { let status = sys::napi_is_buffer(env, raw, &mut result); - debug_assert!(Status::from(status) == Status::Ok); + check_status(status)?; } - result + Ok(result) } } @@ -667,21 +687,21 @@ impl ValueType for ArrayBuffer { }) } - fn matches_raw_type(env: sys::napi_env, raw: sys::napi_value) -> bool { + fn matches_raw_type(env: sys::napi_env, raw: sys::napi_value) -> Result { let mut result = false; unsafe { let status = sys::napi_is_arraybuffer(env, raw, &mut result); - debug_assert!(Status::from(status) == Status::Ok); + check_status(status)?; } - result + Ok(result) } } -impl<'env> Value<'env, Buffer> { +impl Value { #[inline] - pub fn from_value(env: &'env Env, value: &Value<'env, Any>) -> Result> { + pub fn from_value(env: &Env, value: &Value) -> Result> { Ok(Value { - env, + env: env.0, raw_value: value.raw_value, value: Buffer::from_raw(env.0, value.into_raw())?, }) @@ -693,25 +713,25 @@ impl ValueType for Function { Ok(Function {}) } - fn matches_raw_type(env: sys::napi_env, raw: sys::napi_value) -> bool { - get_raw_type(env, raw) == sys::napi_valuetype::napi_function + fn matches_raw_type(env: sys::napi_env, raw: sys::napi_value) -> Result { + Ok(get_raw_type(env, raw)? == sys::napi_valuetype::napi_function) } } -impl<'env, T: ValueType> Value<'env, T> { - pub fn from_raw_value(env: &'env Env, raw_value: sys::napi_value, value: T) -> Self { +impl Value { + pub fn from_raw_value(env: &Env, raw_value: sys::napi_value, value: T) -> Self { Self { - env, + env: env.0, raw_value, value, } } - pub fn from_raw(env: &'env Env, raw_value: sys::napi_value) -> Result { + pub fn from_raw(env: sys::napi_env, raw_value: sys::napi_value) -> Result { Ok(Self { env, raw_value, - value: T::from_raw(env.0, raw_value)?, + value: T::from_raw(env, raw_value)?, }) } @@ -719,22 +739,22 @@ impl<'env, T: ValueType> Value<'env, T> { self.raw_value } - pub fn coerce_to_number(self) -> Result> { + pub fn coerce_to_number(self) -> Result> { let mut new_raw_value = ptr::null_mut(); let status = - unsafe { sys::napi_coerce_to_number(self.env.0, self.raw_value, &mut new_raw_value) }; + unsafe { sys::napi_coerce_to_number(self.env, self.raw_value, &mut new_raw_value) }; check_status(status)?; Ok(Value { env: self.env, raw_value: self.raw_value, - value: Number::from_raw(self.env.0, self.raw_value)?, + value: Number::from_raw(self.env, self.raw_value)?, }) } - pub fn coerce_to_string(self) -> Result> { + pub fn coerce_to_string(self) -> Result> { let mut new_raw_value = ptr::null_mut(); let status = - unsafe { sys::napi_coerce_to_string(self.env.0, self.raw_value, &mut new_raw_value) }; + unsafe { sys::napi_coerce_to_string(self.env, self.raw_value, &mut new_raw_value) }; check_status(status)?; Ok(Value { env: self.env, @@ -743,11 +763,11 @@ impl<'env, T: ValueType> Value<'env, T> { }) } - pub fn coerce_to_object(self) -> Result> { + pub fn coerce_to_object(self) -> Result> { let mut new_raw_value = ptr::null_mut(); let status = unsafe { sys::napi_coerce_to_object( - self.env.0, + self.env, self.raw_value, (&mut new_raw_value) as *mut sys::napi_value, ) @@ -761,7 +781,7 @@ impl<'env, T: ValueType> Value<'env, T> { } #[inline] - pub fn into_any(self) -> Value<'env, Any> { + pub fn into_any(self) -> Value { Value { env: self.env, raw_value: self.raw_value, @@ -771,27 +791,26 @@ impl<'env, T: ValueType> Value<'env, T> { } #[inline] -fn get_raw_type(env: sys::napi_env, raw_value: sys::napi_value) -> sys::napi_valuetype { +fn get_raw_type(env: sys::napi_env, raw_value: sys::napi_value) -> Result { unsafe { let value_type = ptr::null_mut(); - let status = sys::napi_typeof(env, raw_value, value_type); - debug_assert!(Status::from(status) == Status::Ok); - *value_type + check_status(sys::napi_typeof(env, raw_value, value_type))?; + Ok(*value_type) } } -impl<'env> Value<'env, Boolean> { +impl Value { pub fn get_value(&self) -> bool { self.value.value } } -impl<'env> Value<'env, JsString> { +impl Value { pub fn len(&self) -> Result { let mut raw_length = ptr::null_mut(); unsafe { let status = sys::napi_get_named_property( - self.env.0, + self.env, self.raw_value, "length\0".as_ptr() as *const c_char, &mut raw_length, @@ -803,7 +822,7 @@ impl<'env> Value<'env, JsString> { } } -impl<'env> Value<'env, JsString> { +impl Value { #[inline] pub fn get_ref(&self) -> Result<&[u8]> { let mut written_char_count: u64 = 0; @@ -811,7 +830,7 @@ impl<'env> Value<'env, JsString> { let mut result = Vec::with_capacity(len); unsafe { let status = sys::napi_get_value_string_utf8( - self.env.0, + self.env, self.raw_value, result.as_mut_ptr(), len as u64, @@ -829,7 +848,10 @@ impl<'env> Value<'env, JsString> { } pub fn as_str(&self) -> Result<&str> { - str::from_utf8(self.get_ref()?).map_err(|_| Error::new(Status::GenericFailure)) + str::from_utf8(self.get_ref()?).map_err(|e| Error { + status: Status::GenericFailure, + reason: Some(format!("{:?}", e)), + }) } pub fn get_ref_mut(&mut self) -> Result<&mut [u8]> { @@ -838,7 +860,7 @@ impl<'env> Value<'env, JsString> { let mut result = Vec::with_capacity(len); unsafe { let status = sys::napi_get_value_string_utf8( - self.env.0, + self.env, self.raw_value, result.as_mut_ptr(), len as u64, @@ -856,16 +878,16 @@ impl<'env> Value<'env, JsString> { } } -impl<'env> TryFrom> for Vec { +impl TryFrom> for Vec { type Error = Error; - fn try_from(value: Value<'env, JsString>) -> Result> { + fn try_from(value: Value) -> Result> { let mut result = Vec::with_capacity(value.len()? + 1); // Leave room for trailing null byte unsafe { let mut written_char_count = 0; let status = sys::napi_get_value_string_utf16( - value.env.0, + value.env, value.raw_value, result.as_mut_ptr(), result.capacity() as u64, @@ -879,63 +901,63 @@ impl<'env> TryFrom> for Vec { } } -impl<'env> TryFrom> for usize { +impl TryFrom> for usize { type Error = Error; - fn try_from(value: Value<'env, Number>) -> Result { + fn try_from(value: Value) -> Result { let mut result = 0; - let status = unsafe { sys::napi_get_value_int64(value.env.0, value.raw_value, &mut result) }; + let status = unsafe { sys::napi_get_value_int64(value.env, value.raw_value, &mut result) }; check_status(status)?; Ok(result as usize) } } -impl<'env> TryFrom> for u32 { +impl TryFrom> for u32 { type Error = Error; - fn try_from(value: Value<'env, Number>) -> Result { + fn try_from(value: Value) -> Result { let mut result = 0; - let status = unsafe { sys::napi_get_value_uint32(value.env.0, value.raw_value, &mut result) }; + let status = unsafe { sys::napi_get_value_uint32(value.env, value.raw_value, &mut result) }; check_status(status)?; Ok(result) } } -impl<'env> TryFrom> for i32 { +impl TryFrom> for i32 { type Error = Error; - fn try_from(value: Value<'env, Number>) -> Result { + fn try_from(value: Value) -> Result { let mut result = 0; - let status = unsafe { sys::napi_get_value_int32(value.env.0, value.raw_value, &mut result) }; + let status = unsafe { sys::napi_get_value_int32(value.env, value.raw_value, &mut result) }; check_status(status)?; Ok(result) } } -impl<'env> TryFrom> for i64 { +impl TryFrom> for i64 { type Error = Error; - fn try_from(value: Value<'env, Number>) -> Result { + fn try_from(value: Value) -> Result { let mut result = 0; - let status = unsafe { sys::napi_get_value_int64(value.env.0, value.raw_value, &mut result) }; + let status = unsafe { sys::napi_get_value_int64(value.env, value.raw_value, &mut result) }; check_status(status)?; Ok(result) } } -impl<'env> TryFrom> for f64 { +impl TryFrom> for f64 { type Error = Error; - fn try_from(value: Value<'env, Number>) -> Result { + fn try_from(value: Value) -> Result { let mut result = 0_f64; - let status = unsafe { sys::napi_get_value_double(value.env.0, value.raw_value, &mut result) }; + let status = unsafe { sys::napi_get_value_double(value.env, value.raw_value, &mut result) }; check_status(status)?; Ok(result) } } -impl<'env> Value<'env, Object> { - pub fn set_property<'a, K, V>(&mut self, key: Value, value: Value) -> Result<()> { +impl Value { + pub fn set_property(&mut self, key: Value, value: Value) -> Result<()> { let status = unsafe { sys::napi_set_property( self.raw_env(), @@ -948,11 +970,7 @@ impl<'env> Value<'env, Object> { Ok(()) } - pub fn set_named_property<'a, T, V: Into>>( - &mut self, - name: &'a str, - value: V, - ) -> Result<()> { + pub fn set_named_property>>(&mut self, name: &str, value: V) -> Result<()> { let key = CString::new(name)?; let status = unsafe { sys::napi_set_named_property( @@ -990,7 +1008,7 @@ impl<'env> Value<'env, Object> { } pub fn set_index<'a, T>(&mut self, index: usize, value: Value) -> Result<()> { - self.set_property(self.env.create_int64(index as i64)?, value) + self.set_property(Env::from_raw(self.env).create_int64(index as i64)?, value) } pub fn get_index(&self, index: u32) -> Result> { @@ -1015,7 +1033,7 @@ impl<'env> Value<'env, Object> { Ok(is_buffer) } - pub fn to_buffer(&self) -> Result> { + pub fn to_buffer(&self) -> Result> { Value::from_raw(self.env, self.raw_value) } @@ -1023,6 +1041,7 @@ impl<'env> Value<'env, Object> { if self.is_array()? != true { return Err(Error { status: Status::ArrayExpected, + reason: Some("Object is not array".to_owned()), }); } let mut length: u32 = 0; @@ -1037,17 +1056,17 @@ impl<'env> Value<'env, Object> { } fn raw_env(&self) -> sys::napi_env { - self.env.0 + self.env } } -impl<'env> AsRef<[u8]> for Value<'env, Buffer> { +impl AsRef<[u8]> for Value { fn as_ref(&self) -> &[u8] { self.deref() } } -impl<'env> Deref for Value<'env, Buffer> { +impl Deref for Value { type Target = [u8]; fn deref(&self) -> &[u8] { @@ -1055,13 +1074,13 @@ impl<'env> Deref for Value<'env, Buffer> { } } -impl<'env> DerefMut for Value<'env, Buffer> { +impl DerefMut for Value { fn deref_mut(&mut self) -> &mut [u8] { unsafe { slice::from_raw_parts_mut(self.value.data as *mut _, self.value.size as usize) } } } -impl<'env> Deref for Value<'env, ArrayBuffer> { +impl Deref for Value { type Target = [u8]; fn deref(&self) -> &[u8] { @@ -1069,22 +1088,26 @@ impl<'env> Deref for Value<'env, ArrayBuffer> { } } -impl<'env> DerefMut for Value<'env, ArrayBuffer> { +impl DerefMut for Value { fn deref_mut(&mut self) -> &mut [u8] { unsafe { slice::from_raw_parts_mut(self.value.data as *mut _, self.value.size as usize) } } } -impl<'env> Value<'env, Function> { - pub fn call( - &self, - this: Option<&Value<'env, Object>>, - args: &[Value<'env, Any>], - ) -> Result> { +impl Value { + pub fn call(&self, this: Option<&Value>, args: &[Value]) -> Result> { let raw_this = this .map(|v| v.into_raw()) - .or_else(|| self.env.get_undefined().ok().map(|u| u.into_raw())) - .ok_or(Error::new(Status::Unknown))?; + .or_else(|| { + Env::from_raw(self.env) + .get_undefined() + .ok() + .map(|u| u.into_raw()) + }) + .ok_or(Error { + status: Status::Unknown, + reason: Some("Get raw this failed".to_owned()), + })?; let mut raw_args = unsafe { mem::MaybeUninit::<[sys::napi_value; 8]>::uninit().assume_init() }; for (i, arg) in args.into_iter().enumerate() { raw_args[i] = arg.raw_value; @@ -1092,7 +1115,7 @@ impl<'env> Value<'env, Function> { let mut return_value = ptr::null_mut(); let status = unsafe { sys::napi_call_function( - self.env.0, + self.env, raw_this, self.raw_value, args.len() as u64, @@ -1106,9 +1129,9 @@ impl<'env> Value<'env, Function> { } } -impl<'env> Value<'env, Any> { - pub fn get_type(&self) -> sys::napi_valuetype { - get_raw_type(self.env.0, self.raw_value) +impl Value { + pub fn get_type(&self) -> Result { + get_raw_type(self.env, self.raw_value) } } @@ -1127,34 +1150,6 @@ impl Drop for Ref { } } -impl AsyncContext { - pub fn enter<'a, F: 'a + FnOnce(&mut Env)>(&'a self, run_in_context: F) { - let mut env = Env::from_raw(self.raw_env); - let mut handle_scope = ptr::null_mut(); - let mut callback_scope = ptr::null_mut(); - let mut raw_resource = ptr::null_mut(); - - unsafe { - sys::napi_open_handle_scope(env.0, &mut handle_scope); - sys::napi_get_reference_value(env.0, self.raw_resource, &mut raw_resource); - sys::extras_open_callback_scope(self.raw_context, raw_resource, &mut callback_scope); - } - run_in_context(&mut env); - unsafe { - sys::extras_close_callback_scope(callback_scope); - sys::napi_close_handle_scope(env.0, handle_scope); - } - } -} - -impl Drop for AsyncContext { - fn drop(&mut self) { - unsafe { - sys::napi_delete_reference(self.raw_env, self.raw_resource); - } - } -} - impl Property { pub fn new(name: &str) -> Self { Property { @@ -1202,11 +1197,12 @@ impl TaggedObject { } } +#[inline] fn check_status(code: sys::napi_status) -> Result<()> { let status = Status::from(code); match status { Status::Ok => Ok(()), - _ => Err(Error { status }), + _ => Err(Error::from_status(status)), } } diff --git a/napi/src/promise.rs b/napi/src/promise.rs new file mode 100644 index 00000000..d99c35a7 --- /dev/null +++ b/napi/src/promise.rs @@ -0,0 +1,65 @@ +use futures::prelude::*; +use std::os::raw::c_char; +use std::ptr; + +use crate::{check_status, sys, Env, Result, Value, ValueType}; + +#[inline] +pub async fn resolve< + T, + V: ValueType, + R: FnOnce(&mut Env, T) -> Result>, + F: Future>, +>( + env: sys::napi_env, + fut: F, + resolver: R, + raw_deferred: sys::napi_deferred, +) -> Result<()> { + let mut raw_resource = ptr::null_mut(); + let status = unsafe { sys::napi_create_object(env, &mut raw_resource) }; + check_status(status)?; + let mut raw_name = ptr::null_mut(); + let s = "napi_async_context"; + let status = unsafe { + sys::napi_create_string_utf8( + env, + s.as_ptr() as *const c_char, + s.len() as u64, + &mut raw_name, + ) + }; + check_status(status)?; + let mut raw_context = ptr::null_mut(); + unsafe { + let status = sys::napi_async_init(env, raw_resource, raw_name, &mut raw_context); + check_status(status)?; + } + let mut handle_scope = ptr::null_mut(); + match fut.await { + Ok(v) => unsafe { + check_status(sys::napi_open_handle_scope(env, &mut handle_scope))?; + let mut tmp_env = Env::from_raw(env); + let js_value = resolver(&mut tmp_env, v)?; + check_status(sys::napi_resolve_deferred( + env, + raw_deferred, + js_value.raw_value, + ))?; + check_status(sys::napi_close_handle_scope(env, handle_scope))?; + }, + Err(e) => unsafe { + check_status(sys::napi_open_handle_scope(env, &mut handle_scope))?; + check_status(sys::napi_reject_deferred( + env, + raw_deferred, + Env::from_raw(env) + .create_error(e) + .map(|e| e.into_raw()) + .unwrap_or(ptr::null_mut()), + ))?; + check_status(sys::napi_close_handle_scope(env, handle_scope))?; + }, + }; + Ok(()) +} diff --git a/napi/src/sys/bindings.cc b/napi/src/sys/bindings.cc deleted file mode 100644 index a255321d..00000000 --- a/napi/src/sys/bindings.cc +++ /dev/null @@ -1,31 +0,0 @@ -#include "bindings.h" -#include -#include -#include - -static v8::Local V8LocalValueFromJsValue(napi_value v) -{ - v8::Local local; - memcpy(&local, &v, sizeof(v)); - return local; -} - -EXTERN_C_START - -NAPI_EXTERN void extras_open_callback_scope(napi_async_context napi_async_context, - napi_value napi_resource_object, - extras_callback_scope *result) -{ - v8::Isolate *isolate = v8::Isolate::GetCurrent(); - v8::Local context = isolate->GetCurrentContext(); - v8::Local resource_object = V8LocalValueFromJsValue(napi_resource_object)->ToObject(context).ToLocalChecked(); - node::async_context *node_async_context = reinterpret_cast(napi_async_context); - *result = reinterpret_cast(new node::CallbackScope(isolate, resource_object, *node_async_context)); -} - -NAPI_EXTERN void extras_close_callback_scope(extras_callback_scope callback_scope) -{ - delete reinterpret_cast(callback_scope); -} - -EXTERN_C_END diff --git a/napi/src/sys/bindings.h b/napi/src/sys/bindings.h index 9d29f92a..f7cf3c44 100644 --- a/napi/src/sys/bindings.h +++ b/napi/src/sys/bindings.h @@ -1,15 +1,2 @@ #include -#include -#include - -typedef struct extras_callback_scope__ *extras_callback_scope; - -EXTERN_C_START - -NAPI_EXTERN void extras_open_callback_scope(napi_async_context napi_async_context, - napi_value napi_resource_object, - extras_callback_scope *result); - -NAPI_EXTERN void extras_close_callback_scope(extras_callback_scope callback_scope); - -EXTERN_C_END +#include \ No newline at end of file diff --git a/napi/src/sys/stable.rs b/napi/src/sys/stable.rs index 8cad684c..4280f5f2 100644 --- a/napi/src/sys/stable.rs +++ b/napi/src/sys/stable.rs @@ -1,6 +1,6 @@ use super::napi_status; -#[derive(Eq, PartialEq, Debug)] +#[derive(Eq, PartialEq, Debug, Clone, Copy)] pub enum Status { Ok, InvalidArg, diff --git a/napi/src/version.rs b/napi/src/version.rs new file mode 100644 index 00000000..4e4356fc --- /dev/null +++ b/napi/src/version.rs @@ -0,0 +1,29 @@ +use crate::{sys, Error, Status}; +use std::convert::TryFrom; +use std::ffi::CStr; + +#[derive(Debug, Clone, Copy)] +pub struct NodeVersion { + pub major: u32, + pub minor: u32, + pub patch: u32, + pub release: &'static str, +} + +impl TryFrom for NodeVersion { + type Error = Error; + + fn try_from(value: sys::napi_node_version) -> Result { + Ok(NodeVersion { + major: value.major, + minor: value.minor, + patch: value.patch, + release: unsafe { + CStr::from_ptr(value.release).to_str().map_err(|_| Error { + status: Status::StringExpected, + reason: Some("Invalid release name".to_owned()), + })? + }, + }) + } +} diff --git a/package.json b/package.json index 81a2f76a..f239cd8d 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,13 @@ } ], "license": "MIT", + "scripts": { + "format": "run-p format:md format:json format:yaml format:source", + "format:md": "prettier --parser markdown --write './**/*.md'", + "format:json": "prettier --parser json --write './**/*.json'", + "format:source": "prettier --config ./package.json --write './**/*.js'", + "format:yaml": "prettier --parser yaml --write './**/*.{yml,yaml}'" + }, "bugs": { "url": "https://github.com/Brooooooklyn/napi-rs/issues" }, @@ -32,12 +39,23 @@ "trailingComma": "all", "arrowParens": "always" }, - "files": [ - "scripts/napi.js", - "LICENSE" - ], + "files": ["scripts/napi.js", "LICENSE"], + "lint-staged": { + "*.js": ["prettier --write"], + "*.@(yml|yaml)": ["prettier --parser yaml --write"], + "*.json": ["prettier --parser json --write"], + "*.md": ["prettier --parser markdown --write"] + }, + "husky": { + "hooks": { + "pre-commit": "lint-staged && cargo fmt --all" + } + }, "devDependencies": { "@types/node": "^13.13.5", + "husky": "^4.2.5", + "lint-staged": "^10.2.2", + "npm-run-all": "^4.1.5", "prettier": "^2.0.5" } } diff --git a/scripts/napi.js b/scripts/napi.js index 0638b25b..576c4db0 100755 --- a/scripts/napi.js +++ b/scripts/napi.js @@ -11,7 +11,10 @@ let tomlContent let moduleName try { - tomlContentString = fs.readFileSync(path.join(process.cwd(), 'Cargo.toml'), 'utf-8') + tomlContentString = fs.readFileSync( + path.join(process.cwd(), 'Cargo.toml'), + 'utf-8', + ) } catch { throw new TypeError('Can not find Cargo.toml in process.cwd') } @@ -60,7 +63,9 @@ const targetDir = argv.release ? 'release' : 'debug' const platformName = argv.platform ? `.${platform}` : '' -let subcommand = argv._[0] || path.join('target', targetDir, `${moduleName}${platformName}.node`) +let subcommand = + argv._[0] || + path.join('target', targetDir, `${moduleName}${platformName}.node`) const parsedDist = path.parse(subcommand) if (!parsedDist.name || parsedDist.name === '.') { @@ -73,11 +78,13 @@ if (!parsedDist.ext) { const pos = __dirname.indexOf('node_modules') -const dylibContent = fs.readFileSync(path.join( - __dirname.substring(0, pos), - 'target', - targetDir, - `${dylibName}${libExt}`, -)) +const dylibContent = fs.readFileSync( + path.join( + __dirname.substring(0, pos), + 'target', + targetDir, + `${dylibName}${libExt}`, + ), +) fs.writeFileSync(subcommand, dylibContent) diff --git a/test_module/index.js b/test_module/index.js index 614e4710..33a813d0 100644 --- a/test_module/index.js +++ b/test_module/index.js @@ -1,4 +1,4 @@ -const testModule = require(`./target/debug/test_module.node`) +const testModule = require('./index.node') function testSpawn() { console.log('=== Test spawning a future on libuv event loop') @@ -9,19 +9,21 @@ function testThrow() { console.log('=== Test throwing from Rust') try { testModule.testThrow() + console.error('Expected function to throw an error') + process.exit(1) } catch (e) { - return + console.error(e) } - console.error('Expected function to throw an error') - process.exit(1) } const future = testSpawn() -// https://github.com/nodejs/node/issues/29355 -setTimeout(() => { - future.then(testThrow).catch((e) => { +future + .then((value) => { + console.info(`${value} from napi`) + testThrow() + }) + .catch((e) => { console.error(e) process.exit(1) }) -}, 1000) diff --git a/test_module/package.json b/test_module/package.json index 96097214..45430aff 100644 --- a/test_module/package.json +++ b/test_module/package.json @@ -2,8 +2,8 @@ "name": "test-module", "version": "1.0.0", "scripts": { - "build": "cargo build && node ../scripts/napi.js", - "build-release": "cargo build --release && node ../scripts/napi.js --release", + "build": "cargo build && node ../scripts/napi.js ./index", + "build-release": "cargo build --release && node ../scripts/napi.js --release ./index", "test": "node ./index.js" } } diff --git a/test_module/src/lib.rs b/test_module/src/lib.rs index 05b3384b..d93cbabd 100644 --- a/test_module/src/lib.rs +++ b/test_module/src/lib.rs @@ -9,49 +9,36 @@ use napi::{Any, CallContext, Env, Error, Object, Result, Status, Value}; register_module!(test_module, init); -fn init<'env>( - env: &'env Env, - exports: &'env mut Value<'env, Object>, -) -> Result>> { +fn init(env: &Env, exports: &mut Value) -> Result>> { exports.set_named_property("testSpawn", env.create_function("testSpawn", test_spawn)?)?; exports.set_named_property("testThrow", env.create_function("testThrow", test_throw)?)?; Ok(None) } #[js_function] -fn test_spawn<'a>(ctx: CallContext<'a>) -> Result> { +fn test_spawn(ctx: CallContext) -> Result> { use futures::executor::ThreadPool; use futures::StreamExt; let env = ctx.env; - let async_context = env.async_init(None, "test_spawn")?; let pool = ThreadPool::new().expect("Failed to build pool"); - let (promise, deferred) = env.create_promise()?; let (tx, rx) = futures::channel::mpsc::unbounded::(); let fut_values = async move { let fut_tx_result = async move { - (0..20).for_each(|v| { + (0..200).for_each(|v| { tx.unbounded_send(v).expect("Failed to send"); }) }; pool.spawn_ok(fut_tx_result); - let fut_values = rx.map(|v| v * 2).collect::>(); - let results = fut_values.await; - if !cfg!(windows) { - println!("Collected result lenght {}", results.len()); - }; - async_context.enter(|env| { - env - .resolve_deferred(deferred, env.get_undefined().unwrap()) - .unwrap(); - }); + let fut = rx.map(|v| v * 2).collect::>(); + let results = fut.await; + println!("Collected result lenght {}", results.len()); + Ok(results.len() as u32) }; - env.create_executor().execute(fut_values); - - Ok(promise) + env.perform_async_operation(fut_values, |&mut env, len| env.create_uint32(len)) } #[js_function] -fn test_throw<'a>(_ctx: CallContext<'a>) -> Result> { - Err(Error::new(Status::GenericFailure)) +fn test_throw(_ctx: CallContext) -> Result> { + Err(Error::from_status(Status::GenericFailure)) } diff --git a/yarn.lock b/yarn.lock index ef63a7c1..a328b008 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,22 +2,1189 @@ # yarn lockfile v1 +"@babel/code-frame@^7.0.0": + version "7.8.3" + resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz#33e25903d7481181534e12ec0a25f16b6fcf419e" + integrity sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g== + dependencies: + "@babel/highlight" "^7.8.3" + +"@babel/helper-validator-identifier@^7.9.0": + version "7.9.5" + resolved "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.5.tgz#90977a8e6fbf6b431a7dc31752eee233bf052d80" + integrity sha512-/8arLKUFq882w4tWGj9JYzRpAlZgiWUJ+dtteNTDqrRBz9Iguck9Rn3ykuBDoUwh2TO4tSAJlrxDUOXWklJe4g== + +"@babel/highlight@^7.8.3": + version "7.9.0" + resolved "https://registry.npmjs.org/@babel/highlight/-/highlight-7.9.0.tgz#4e9b45ccb82b79607271b2979ad82c7b68163079" + integrity sha512-lJZPilxX7Op3Nv/2cvFdnlepPXDxi29wxteT57Q965oc5R9v86ztx0jfxVrTcBk8C2kcPkkDa2Z4T3ZsPPVWsQ== + dependencies: + "@babel/helper-validator-identifier" "^7.9.0" + chalk "^2.0.0" + js-tokens "^4.0.0" + +"@babel/runtime@^7.9.2": + version "7.9.6" + resolved "https://registry.npmjs.org/@babel/runtime/-/runtime-7.9.6.tgz#a9102eb5cadedf3f31d08a9ecf294af7827ea29f" + integrity sha512-64AF1xY3OAkFHqOb9s4jpgk1Mm5vDZ4L3acHvAml+53nO1XbXLuDodsVpO4OIUsmemlUHMxNdYMNJmsvOwLrvQ== + dependencies: + regenerator-runtime "^0.13.4" + +"@samverschueren/stream-to-observable@^0.3.0": + version "0.3.0" + resolved "https://registry.npmjs.org/@samverschueren/stream-to-observable/-/stream-to-observable-0.3.0.tgz#ecdf48d532c58ea477acfcab80348424f8d0662f" + integrity sha512-MI4Xx6LHs4Webyvi6EbspgyAb4D2Q2VtnCQ1blOJcoLS6mVa8lNN2rkIy1CVxfTUpoyIbCTkXES1rLXztFD1lg== + dependencies: + any-observable "^0.3.0" + +"@types/color-name@^1.1.1": + version "1.1.1" + resolved "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0" + integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ== + "@types/node@^13.13.5": version "13.13.5" resolved "https://registry.npmjs.org/@types/node/-/node-13.13.5.tgz#96ec3b0afafd64a4ccea9107b75bf8489f0e5765" integrity sha512-3ySmiBYJPqgjiHA7oEaIo2Rzz0HrOZ7yrNO5HWyaE5q0lQ3BppDZ3N53Miz8bw2I7gh1/zir2MGVZBvpb1zq9g== +"@types/parse-json@^4.0.0": + version "4.0.0" + resolved "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0" + integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA== + +aggregate-error@^3.0.0: + version "3.0.1" + resolved "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.0.1.tgz#db2fe7246e536f40d9b5442a39e117d7dd6a24e0" + integrity sha512-quoaXsZ9/BLNae5yiNoUz+Nhkwz83GhWwtYFglcjEQB2NDHCIpApbqXxIFnm4Pq/Nvhrsq5sYJFyohrrxnTGAA== + dependencies: + clean-stack "^2.0.0" + indent-string "^4.0.0" + +ansi-colors@^3.2.1: + version "3.2.4" + resolved "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.4.tgz#e3a3da4bfbae6c86a9c285625de124a234026fbf" + integrity sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA== + +ansi-escapes@^4.3.0: + version "4.3.1" + resolved "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.1.tgz#a5c47cc43181f1f38ffd7076837700d395522a61" + integrity sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA== + dependencies: + type-fest "^0.11.0" + +ansi-regex@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" + integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== + +ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== + dependencies: + color-convert "^1.9.0" + +ansi-styles@^4.0.0, ansi-styles@^4.1.0: + version "4.2.1" + resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz#90ae75c424d008d2624c5bf29ead3177ebfcf359" + integrity sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA== + dependencies: + "@types/color-name" "^1.1.1" + color-convert "^2.0.1" + +any-observable@^0.3.0: + version "0.3.0" + resolved "https://registry.npmjs.org/any-observable/-/any-observable-0.3.0.tgz#af933475e5806a67d0d7df090dd5e8bef65d119b" + integrity sha512-/FQM1EDkTsf63Ub2C6O7GuYFDsSXUwsaZDurV0np41ocwq0jthUAYCmhBX9f+KwlaCgIuWyr/4WlUQUBfKfZog== + +astral-regex@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" + integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== + +balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +braces@^3.0.1: + version "3.0.2" + resolved "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + dependencies: + fill-range "^7.0.1" + +callsites@^3.0.0: + version "3.1.0" + resolved "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" + integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== + +chalk@^2.0.0, chalk@^2.4.1, chalk@^2.4.2: + version "2.4.2" + resolved "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +chalk@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4" + integrity sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +chalk@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/chalk/-/chalk-4.0.0.tgz#6e98081ed2d17faab615eb52ac66ec1fe6209e72" + integrity sha512-N9oWFcegS0sFr9oh1oz2d7Npos6vNoWW9HvtCg5N1KRFpUhaAhvTv5Y58g880fZaEYSNm3qDz8SU1UrGvp+n7A== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +ci-info@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" + integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== + +clean-stack@^2.0.0: + version "2.2.0" + resolved "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" + integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== + +cli-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307" + integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw== + dependencies: + restore-cursor "^3.1.0" + +cli-truncate@^2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz#c39e28bf05edcde5be3b98992a22deed5a2b93c7" + integrity sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg== + dependencies: + slice-ansi "^3.0.0" + string-width "^4.2.0" + +clone@^1.0.2: + version "1.0.4" + resolved "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" + integrity sha1-2jCcwmPfFZlMaIypAheco8fNfH4= + +color-convert@^1.9.0: + version "1.9.3" + resolved "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== + dependencies: + color-name "1.1.3" + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= + +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +commander@^5.0.0: + version "5.1.0" + resolved "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz#46abbd1652f8e059bddaef99bbdcb2ad9cf179ae" + integrity sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg== + +compare-versions@^3.6.0: + version "3.6.0" + resolved "https://registry.npmjs.org/compare-versions/-/compare-versions-3.6.0.tgz#1a5689913685e5a87637b8d3ffca75514ec41d62" + integrity sha512-W6Af2Iw1z4CB7q4uU4hv646dW9GQuBM+YpC0UvUCWSD8w90SJjp+ujJuXaEMtAXBtSqGfMPuFOVn4/+FlaqfBA== + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= + +cosmiconfig@^6.0.0: + version "6.0.0" + resolved "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-6.0.0.tgz#da4fee853c52f6b1e6935f41c1a2fc50bd4a9982" + integrity sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg== + dependencies: + "@types/parse-json" "^4.0.0" + import-fresh "^3.1.0" + parse-json "^5.0.0" + path-type "^4.0.0" + yaml "^1.7.2" + +cross-spawn@^6.0.5: + version "6.0.5" + resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" + integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== + dependencies: + nice-try "^1.0.4" + path-key "^2.0.1" + semver "^5.5.0" + shebang-command "^1.2.0" + which "^1.2.9" + +cross-spawn@^7.0.0: + version "7.0.2" + resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.2.tgz#d0d7dcfa74e89115c7619f4f721a94e1fdb716d6" + integrity sha512-PD6G8QG3S4FK/XCGFbEQrDqO2AnMMsy0meR7lerlIOHAAbkuavGU/pOqprrlvfTNjvowivTeBsjebAL0NSoMxw== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + +debug@^4.1.1: + version "4.1.1" + resolved "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" + integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== + dependencies: + ms "^2.1.1" + +dedent@^0.7.0: + version "0.7.0" + resolved "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" + integrity sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw= + +defaults@^1.0.3: + version "1.0.3" + resolved "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d" + integrity sha1-xlYFHpgX2f8I7YgUd/P+QBnz730= + dependencies: + clone "^1.0.2" + +define-properties@^1.1.2, define-properties@^1.1.3: + version "1.1.3" + resolved "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" + integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== + dependencies: + object-keys "^1.0.12" + +elegant-spinner@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/elegant-spinner/-/elegant-spinner-2.0.0.tgz#f236378985ecd16da75488d166be4b688fd5af94" + integrity sha512-5YRYHhvhYzV/FC4AiMdeSIg3jAYGq9xFvbhZMpPlJoBsfYgrw2DSCYeXfat6tYBu45PWiyRr3+flaCPPmviPaA== + +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + +end-of-stream@^1.1.0: + version "1.4.4" + resolved "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" + integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== + dependencies: + once "^1.4.0" + +enquirer@^2.3.4: + version "2.3.5" + resolved "https://registry.npmjs.org/enquirer/-/enquirer-2.3.5.tgz#3ab2b838df0a9d8ab9e7dff235b0e8712ef92381" + integrity sha512-BNT1C08P9XD0vNg3J475yIUG+mVdp9T6towYFHUv897X0KoHBjB1shyrNmhmtHWKP17iSWgo7Gqh7BBuzLZMSA== + dependencies: + ansi-colors "^3.2.1" + +error-ex@^1.3.1: + version "1.3.2" + resolved "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" + integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== + dependencies: + is-arrayish "^0.2.1" + +es-abstract@^1.17.0-next.1, es-abstract@^1.17.5: + version "1.17.5" + resolved "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.5.tgz#d8c9d1d66c8981fb9200e2251d799eee92774ae9" + integrity sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg== + dependencies: + es-to-primitive "^1.2.1" + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.1" + is-callable "^1.1.5" + is-regex "^1.0.5" + object-inspect "^1.7.0" + object-keys "^1.1.1" + object.assign "^4.1.0" + string.prototype.trimleft "^2.1.1" + string.prototype.trimright "^2.1.1" + +es-to-primitive@^1.2.1: + version "1.2.1" + resolved "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" + integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== + dependencies: + is-callable "^1.1.4" + is-date-object "^1.0.1" + is-symbol "^1.0.2" + +escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= + +execa@^4.0.0: + version "4.0.1" + resolved "https://registry.npmjs.org/execa/-/execa-4.0.1.tgz#988488781f1f0238cd156f7aaede11c3e853b4c1" + integrity sha512-SCjM/zlBdOK8Q5TIjOn6iEHZaPHFsMoTxXQ2nvUvtPnuohz3H2dIozSg+etNR98dGoYUp2ENSKLL/XaMmbxVgw== + dependencies: + cross-spawn "^7.0.0" + get-stream "^5.0.0" + human-signals "^1.1.1" + is-stream "^2.0.0" + merge-stream "^2.0.0" + npm-run-path "^4.0.0" + onetime "^5.1.0" + signal-exit "^3.0.2" + strip-final-newline "^2.0.0" + +figures@^3.2.0: + version "3.2.0" + resolved "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" + integrity sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg== + dependencies: + escape-string-regexp "^1.0.5" + +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + dependencies: + to-regex-range "^5.0.1" + +find-up@^4.0.0: + version "4.1.0" + resolved "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" + integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== + dependencies: + locate-path "^5.0.0" + path-exists "^4.0.0" + +find-versions@^3.2.0: + version "3.2.0" + resolved "https://registry.npmjs.org/find-versions/-/find-versions-3.2.0.tgz#10297f98030a786829681690545ef659ed1d254e" + integrity sha512-P8WRou2S+oe222TOCHitLy8zj+SIsVJh52VP4lvXkaFVnOFFdoWv1H1Jjvel1aI6NCFOAaeAVm8qrI0odiLcww== + dependencies: + semver-regex "^2.0.0" + +function-bind@^1.1.1: + version "1.1.1" + resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" + integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== + +get-own-enumerable-property-symbols@^3.0.0: + version "3.0.2" + resolved "https://registry.npmjs.org/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz#b5fde77f22cbe35f390b4e089922c50bce6ef664" + integrity sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g== + +get-stream@^5.0.0: + version "5.1.0" + resolved "https://registry.npmjs.org/get-stream/-/get-stream-5.1.0.tgz#01203cdc92597f9b909067c3e656cc1f4d3c4dc9" + integrity sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw== + dependencies: + pump "^3.0.0" + +graceful-fs@^4.1.2: + version "4.2.4" + resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" + integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + +has-symbols@^1.0.0, has-symbols@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz#9f5214758a44196c406d9bd76cebf81ec2dd31e8" + integrity sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg== + +has@^1.0.3: + version "1.0.3" + resolved "https://registry.npmjs.org/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" + integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== + dependencies: + function-bind "^1.1.1" + +hosted-git-info@^2.1.4: + version "2.8.8" + resolved "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz#7539bd4bc1e0e0a895815a2e0262420b12858488" + integrity sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg== + +human-signals@^1.1.1: + version "1.1.1" + resolved "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3" + integrity sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw== + +husky@^4.2.5: + version "4.2.5" + resolved "https://registry.npmjs.org/husky/-/husky-4.2.5.tgz#2b4f7622673a71579f901d9885ed448394b5fa36" + integrity sha512-SYZ95AjKcX7goYVZtVZF2i6XiZcHknw50iXvY7b0MiGoj5RwdgRQNEHdb+gPDPCXKlzwrybjFjkL6FOj8uRhZQ== + dependencies: + chalk "^4.0.0" + ci-info "^2.0.0" + compare-versions "^3.6.0" + cosmiconfig "^6.0.0" + find-versions "^3.2.0" + opencollective-postinstall "^2.0.2" + pkg-dir "^4.2.0" + please-upgrade-node "^3.2.0" + slash "^3.0.0" + which-pm-runs "^1.0.0" + +import-fresh@^3.1.0: + version "3.2.1" + resolved "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz#633ff618506e793af5ac91bf48b72677e15cbe66" + integrity sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ== + dependencies: + parent-module "^1.0.0" + resolve-from "^4.0.0" + +indent-string@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" + integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= + +is-callable@^1.1.4, is-callable@^1.1.5: + version "1.1.5" + resolved "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz#f7e46b596890456db74e7f6e976cb3273d06faab" + integrity sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q== + +is-date-object@^1.0.1: + version "1.0.2" + resolved "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz#bda736f2cd8fd06d32844e7743bfa7494c3bfd7e" + integrity sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g== + +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-obj@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f" + integrity sha1-PkcprB9f3gJc19g6iW2rn09n2w8= + +is-regex@^1.0.5: + version "1.0.5" + resolved "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz#39d589a358bf18967f726967120b8fc1aed74eae" + integrity sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ== + dependencies: + has "^1.0.3" + +is-regexp@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz#fd2d883545c46bac5a633e7b9a09e87fa2cb5069" + integrity sha1-/S2INUXEa6xaYz57mgnof6LLUGk= + +is-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz#bde9c32680d6fae04129d6ac9d921ce7815f78e3" + integrity sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw== + +is-symbol@^1.0.2: + version "1.0.3" + resolved "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz#38e1014b9e6329be0de9d24a414fd7441ec61937" + integrity sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ== + dependencies: + has-symbols "^1.0.1" + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= + +js-tokens@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + +json-parse-better-errors@^1.0.1: + version "1.0.2" + resolved "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" + integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== + +lines-and-columns@^1.1.6: + version "1.1.6" + resolved "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00" + integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA= + +lint-staged@^10.2.2: + version "10.2.2" + resolved "https://registry.npmjs.org/lint-staged/-/lint-staged-10.2.2.tgz#901403c120eb5d9443a0358b55038b04c8a7db9b" + integrity sha512-78kNqNdDeKrnqWsexAmkOU3Z5wi+1CsQmUmfCuYgMTE8E4rAIX8RHW7xgxwAZ+LAayb7Cca4uYX4P3LlevzjVg== + dependencies: + chalk "^4.0.0" + commander "^5.0.0" + cosmiconfig "^6.0.0" + debug "^4.1.1" + dedent "^0.7.0" + execa "^4.0.0" + listr2 "1.3.8" + log-symbols "^3.0.0" + micromatch "^4.0.2" + normalize-path "^3.0.0" + please-upgrade-node "^3.2.0" + string-argv "0.3.1" + stringify-object "^3.3.0" + +listr2@1.3.8: + version "1.3.8" + resolved "https://registry.npmjs.org/listr2/-/listr2-1.3.8.tgz#30924d79de1e936d8c40af54b6465cb814a9c828" + integrity sha512-iRDRVTgSDz44tBeBBg/35TQz4W+EZBWsDUq7hPpqeUHm7yLPNll0rkwW3lIX9cPAK7l+x95mGWLpxjqxftNfZA== + dependencies: + "@samverschueren/stream-to-observable" "^0.3.0" + chalk "^3.0.0" + cli-cursor "^3.1.0" + cli-truncate "^2.1.0" + elegant-spinner "^2.0.0" + enquirer "^2.3.4" + figures "^3.2.0" + indent-string "^4.0.0" + log-update "^4.0.0" + p-map "^4.0.0" + pad "^3.2.0" + rxjs "^6.3.3" + through "^2.3.8" + uuid "^7.0.2" + +load-json-file@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz#2f5f45ab91e33216234fd53adab668eb4ec0993b" + integrity sha1-L19Fq5HjMhYjT9U62rZo607AmTs= + dependencies: + graceful-fs "^4.1.2" + parse-json "^4.0.0" + pify "^3.0.0" + strip-bom "^3.0.0" + +locate-path@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" + integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== + dependencies: + p-locate "^4.1.0" + +log-symbols@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz#f3a08516a5dea893336a7dee14d18a1cfdab77c4" + integrity sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ== + dependencies: + chalk "^2.4.2" + +log-update@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/log-update/-/log-update-4.0.0.tgz#589ecd352471f2a1c0c570287543a64dfd20e0a1" + integrity sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg== + dependencies: + ansi-escapes "^4.3.0" + cli-cursor "^3.1.0" + slice-ansi "^4.0.0" + wrap-ansi "^6.2.0" + +memorystream@^0.3.1: + version "0.3.1" + resolved "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz#86d7090b30ce455d63fbae12dda51a47ddcaf9b2" + integrity sha1-htcJCzDORV1j+64S3aUaR93K+bI= + +merge-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" + integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== + +micromatch@^4.0.2: + version "4.0.2" + resolved "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz#4fcb0999bf9fbc2fcbdd212f6d629b9a56c39259" + integrity sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q== + dependencies: + braces "^3.0.1" + picomatch "^2.0.5" + +mimic-fn@^2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" + integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== + +minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== + dependencies: + brace-expansion "^1.1.7" + minimist@^1.2.5: version "1.2.5" resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== +ms@^2.1.1: + version "2.1.2" + resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +nice-try@^1.0.4: + version "1.0.5" + resolved "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" + integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== + +normalize-package-data@^2.3.2: + version "2.5.0" + resolved "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" + integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== + dependencies: + hosted-git-info "^2.1.4" + resolve "^1.10.0" + semver "2 || 3 || 4 || 5" + validate-npm-package-license "^3.0.1" + +normalize-path@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== + +npm-run-all@^4.1.5: + version "4.1.5" + resolved "https://registry.npmjs.org/npm-run-all/-/npm-run-all-4.1.5.tgz#04476202a15ee0e2e214080861bff12a51d98fba" + integrity sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ== + dependencies: + ansi-styles "^3.2.1" + chalk "^2.4.1" + cross-spawn "^6.0.5" + memorystream "^0.3.1" + minimatch "^3.0.4" + pidtree "^0.3.0" + read-pkg "^3.0.0" + shell-quote "^1.6.1" + string.prototype.padend "^3.0.0" + +npm-run-path@^4.0.0: + version "4.0.1" + resolved "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" + integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== + dependencies: + path-key "^3.0.0" + +object-inspect@^1.7.0: + version "1.7.0" + resolved "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz#f4f6bd181ad77f006b5ece60bd0b6f398ff74a67" + integrity sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw== + +object-keys@^1.0.11, object-keys@^1.0.12, object-keys@^1.1.1: + version "1.1.1" + resolved "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" + integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== + +object.assign@^4.1.0: + version "4.1.0" + resolved "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" + integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w== + dependencies: + define-properties "^1.1.2" + function-bind "^1.1.1" + has-symbols "^1.0.0" + object-keys "^1.0.11" + +once@^1.3.1, once@^1.4.0: + version "1.4.0" + resolved "https://registry.npmjs.org/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= + dependencies: + wrappy "1" + +onetime@^5.1.0: + version "5.1.0" + resolved "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz#fff0f3c91617fe62bb50189636e99ac8a6df7be5" + integrity sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q== + dependencies: + mimic-fn "^2.1.0" + +opencollective-postinstall@^2.0.2: + version "2.0.2" + resolved "https://registry.npmjs.org/opencollective-postinstall/-/opencollective-postinstall-2.0.2.tgz#5657f1bede69b6e33a45939b061eb53d3c6c3a89" + integrity sha512-pVOEP16TrAO2/fjej1IdOyupJY8KDUM1CvsaScRbw6oddvpQoOfGk4ywha0HKKVAD6RkW4x6Q+tNBwhf3Bgpuw== + +p-limit@^2.2.0: + version "2.3.0" + resolved "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" + integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== + dependencies: + p-try "^2.0.0" + +p-locate@^4.1.0: + version "4.1.0" + resolved "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" + integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== + dependencies: + p-limit "^2.2.0" + +p-map@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b" + integrity sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ== + dependencies: + aggregate-error "^3.0.0" + +p-try@^2.0.0: + version "2.2.0" + resolved "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== + +pad@^3.2.0: + version "3.2.0" + resolved "https://registry.npmjs.org/pad/-/pad-3.2.0.tgz#be7a1d1cb6757049b4ad5b70e71977158fea95d1" + integrity sha512-2u0TrjcGbOjBTJpyewEl4hBO3OeX5wWue7eIFPzQTg6wFSvoaHcBTTUY5m+n0hd04gmTCPuY0kCpVIVuw5etwg== + dependencies: + wcwidth "^1.0.1" + +parent-module@^1.0.0: + version "1.0.1" + resolved "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" + integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== + dependencies: + callsites "^3.0.0" + +parse-json@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" + integrity sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA= + dependencies: + error-ex "^1.3.1" + json-parse-better-errors "^1.0.1" + +parse-json@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/parse-json/-/parse-json-5.0.0.tgz#73e5114c986d143efa3712d4ea24db9a4266f60f" + integrity sha512-OOY5b7PAEFV0E2Fir1KOkxchnZNCdowAJgQ5NuxjpBKTRP3pQhwkrkxqQjeoKJ+fO7bCpmIZaogI4eZGDMEGOw== + dependencies: + "@babel/code-frame" "^7.0.0" + error-ex "^1.3.1" + json-parse-better-errors "^1.0.1" + lines-and-columns "^1.1.6" + +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + +path-key@^2.0.1: + version "2.0.1" + resolved "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" + integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= + +path-key@^3.0.0, path-key@^3.1.0: + version "3.1.1" + resolved "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== + +path-parse@^1.0.6: + version "1.0.6" + resolved "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" + integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== + +path-type@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" + integrity sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg== + dependencies: + pify "^3.0.0" + +path-type@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" + integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== + +picomatch@^2.0.5: + version "2.2.2" + resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" + integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== + +pidtree@^0.3.0: + version "0.3.1" + resolved "https://registry.npmjs.org/pidtree/-/pidtree-0.3.1.tgz#ef09ac2cc0533df1f3250ccf2c4d366b0d12114a" + integrity sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA== + +pify@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" + integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= + +pkg-dir@^4.2.0: + version "4.2.0" + resolved "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" + integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== + dependencies: + find-up "^4.0.0" + +please-upgrade-node@^3.2.0: + version "3.2.0" + resolved "https://registry.npmjs.org/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz#aeddd3f994c933e4ad98b99d9a556efa0e2fe942" + integrity sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg== + dependencies: + semver-compare "^1.0.0" + prettier@^2.0.5: version "2.0.5" resolved "https://registry.npmjs.org/prettier/-/prettier-2.0.5.tgz#d6d56282455243f2f92cc1716692c08aa31522d4" integrity sha512-7PtVymN48hGcO4fGjybyBSIWDsLU4H4XlvOHfq91pz9kkGlonzwTfYkaIEwiRg/dAJF9YlbsduBAgtYLi+8cFg== +pump@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" + integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== + dependencies: + end-of-stream "^1.1.0" + once "^1.3.1" + +read-pkg@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz#9cbc686978fee65d16c00e2b19c237fcf6e38389" + integrity sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k= + dependencies: + load-json-file "^4.0.0" + normalize-package-data "^2.3.2" + path-type "^3.0.0" + +regenerator-runtime@^0.13.4: + version "0.13.5" + resolved "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz#d878a1d094b4306d10b9096484b33ebd55e26697" + integrity sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA== + +resolve-from@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" + integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== + +resolve@^1.10.0: + version "1.17.0" + resolved "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" + integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== + dependencies: + path-parse "^1.0.6" + +restore-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" + integrity sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA== + dependencies: + onetime "^5.1.0" + signal-exit "^3.0.2" + +rxjs@^6.3.3: + version "6.5.5" + resolved "https://registry.npmjs.org/rxjs/-/rxjs-6.5.5.tgz#c5c884e3094c8cfee31bf27eb87e54ccfc87f9ec" + integrity sha512-WfQI+1gohdf0Dai/Bbmk5L5ItH5tYqm3ki2c5GdWhKjalzjg93N3avFjVStyZZz+A2Em+ZxKH5bNghw9UeylGQ== + dependencies: + tslib "^1.9.0" + +semver-compare@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc" + integrity sha1-De4hahyUGrN+nvsXiPavxf9VN/w= + +semver-regex@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/semver-regex/-/semver-regex-2.0.0.tgz#a93c2c5844539a770233379107b38c7b4ac9d338" + integrity sha512-mUdIBBvdn0PLOeP3TEkMH7HHeUP3GjsXCwKarjv/kGmUFOYg1VqEemKhoQpWMu6X2I8kHeuVdGibLGkVK+/5Qw== + +"semver@2 || 3 || 4 || 5", semver@^5.5.0: + version "5.7.1" + resolved "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" + integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== + +shebang-command@^1.2.0: + version "1.2.0" + resolved "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" + integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= + dependencies: + shebang-regex "^1.0.0" + +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + dependencies: + shebang-regex "^3.0.0" + +shebang-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" + integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= + +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + +shell-quote@^1.6.1: + version "1.7.2" + resolved "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.2.tgz#67a7d02c76c9da24f99d20808fcaded0e0e04be2" + integrity sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg== + +signal-exit@^3.0.2: + version "3.0.3" + resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" + integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== + +slash@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" + integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== + +slice-ansi@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/slice-ansi/-/slice-ansi-3.0.0.tgz#31ddc10930a1b7e0b67b08c96c2f49b77a789787" + integrity sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ== + dependencies: + ansi-styles "^4.0.0" + astral-regex "^2.0.0" + is-fullwidth-code-point "^3.0.0" + +slice-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b" + integrity sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ== + dependencies: + ansi-styles "^4.0.0" + astral-regex "^2.0.0" + is-fullwidth-code-point "^3.0.0" + +spdx-correct@^3.0.0: + version "3.1.0" + resolved "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz#fb83e504445268f154b074e218c87c003cd31df4" + integrity sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q== + dependencies: + spdx-expression-parse "^3.0.0" + spdx-license-ids "^3.0.0" + +spdx-exceptions@^2.1.0: + version "2.3.0" + resolved "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz#3f28ce1a77a00372683eade4a433183527a2163d" + integrity sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A== + +spdx-expression-parse@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz#99e119b7a5da00e05491c9fa338b7904823b41d0" + integrity sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg== + dependencies: + spdx-exceptions "^2.1.0" + spdx-license-ids "^3.0.0" + +spdx-license-ids@^3.0.0: + version "3.0.5" + resolved "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz#3694b5804567a458d3c8045842a6358632f62654" + integrity sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q== + +string-argv@0.3.1: + version "0.3.1" + resolved "https://registry.npmjs.org/string-argv/-/string-argv-0.3.1.tgz#95e2fbec0427ae19184935f816d74aaa4c5c19da" + integrity sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg== + +string-width@^4.1.0, string-width@^4.2.0: + version "4.2.0" + resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz#952182c46cc7b2c313d1596e623992bd163b72b5" + integrity sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.0" + +string.prototype.padend@^3.0.0: + version "3.1.0" + resolved "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.1.0.tgz#dc08f57a8010dc5c153550318f67e13adbb72ac3" + integrity sha512-3aIv8Ffdp8EZj8iLwREGpQaUZiPyrWrpzMBHvkiSW/bK/EGve9np07Vwy7IJ5waydpGXzQZu/F8Oze2/IWkBaA== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.0-next.1" + +string.prototype.trimend@^1.0.0: + version "1.0.1" + resolved "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz#85812a6b847ac002270f5808146064c995fb6913" + integrity sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.5" + +string.prototype.trimleft@^2.1.1: + version "2.1.2" + resolved "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.2.tgz#4408aa2e5d6ddd0c9a80739b087fbc067c03b3cc" + integrity sha512-gCA0tza1JBvqr3bfAIFJGqfdRTyPae82+KTnm3coDXkZN9wnuW3HjGgN386D7hfv5CHQYCI022/rJPVlqXyHSw== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.5" + string.prototype.trimstart "^1.0.0" + +string.prototype.trimright@^2.1.1: + version "2.1.2" + resolved "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.2.tgz#c76f1cef30f21bbad8afeb8db1511496cfb0f2a3" + integrity sha512-ZNRQ7sY3KroTaYjRS6EbNiiHrOkjihL9aQE/8gfQ4DtAC/aEBRHFJa44OmoWxGGqXuJlfKkZW4WcXErGr+9ZFg== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.5" + string.prototype.trimend "^1.0.0" + +string.prototype.trimstart@^1.0.0: + version "1.0.1" + resolved "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz#14af6d9f34b053f7cfc89b72f8f2ee14b9039a54" + integrity sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.5" + +stringify-object@^3.3.0: + version "3.3.0" + resolved "https://registry.npmjs.org/stringify-object/-/stringify-object-3.3.0.tgz#703065aefca19300d3ce88af4f5b3956d7556629" + integrity sha512-rHqiFh1elqCQ9WPLIC8I0Q/g/wj5J1eMkyoiD6eoQApWHP0FtlK7rqnhmabL5VUY9JQCcqwwvlOaSuutekgyrw== + dependencies: + get-own-enumerable-property-symbols "^3.0.0" + is-obj "^1.0.1" + is-regexp "^1.0.0" + +strip-ansi@^6.0.0: + version "6.0.0" + resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532" + integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w== + dependencies: + ansi-regex "^5.0.0" + +strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM= + +strip-final-newline@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" + integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== + +supports-color@^5.3.0: + version "5.5.0" + resolved "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== + dependencies: + has-flag "^3.0.0" + +supports-color@^7.1.0: + version "7.1.0" + resolved "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz#68e32591df73e25ad1c4b49108a2ec507962bfd1" + integrity sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g== + dependencies: + has-flag "^4.0.0" + +through@^2.3.8: + version "2.3.8" + resolved "https://registry.npmjs.org/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + toml@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/toml/-/toml-3.0.0.tgz#342160f1af1904ec9d204d03a5d61222d762c5ee" integrity sha512-y/mWCZinnvxjTKYhJ+pYxwD0mRLVvOtdS2Awbgxln6iEnt4rk0yBxeSBHkGJcPucRiG0e55mwWp+g/05rsrd6w== + +tslib@^1.9.0: + version "1.11.2" + resolved "https://registry.npmjs.org/tslib/-/tslib-1.11.2.tgz#9c79d83272c9a7aaf166f73915c9667ecdde3cc9" + integrity sha512-tTSkux6IGPnUGUd1XAZHcpu85MOkIl5zX49pO+jfsie3eP0B6pyhOlLXm3cAC6T7s+euSDDUUV+Acop5WmtkVg== + +type-fest@^0.11.0: + version "0.11.0" + resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz#97abf0872310fed88a5c466b25681576145e33f1" + integrity sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ== + +uuid@^7.0.2: + version "7.0.3" + resolved "https://registry.npmjs.org/uuid/-/uuid-7.0.3.tgz#c5c9f2c8cf25dc0a372c4df1441c41f5bd0c680b" + integrity sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg== + +validate-npm-package-license@^3.0.1: + version "3.0.4" + resolved "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" + integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== + dependencies: + spdx-correct "^3.0.0" + spdx-expression-parse "^3.0.0" + +wcwidth@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8" + integrity sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g= + dependencies: + defaults "^1.0.3" + +which-pm-runs@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/which-pm-runs/-/which-pm-runs-1.0.0.tgz#670b3afbc552e0b55df6b7780ca74615f23ad1cb" + integrity sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs= + +which@^1.2.9: + version "1.3.1" + resolved "https://registry.npmjs.org/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" + integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== + dependencies: + isexe "^2.0.0" + +which@^2.0.1: + version "2.0.2" + resolved "https://registry.npmjs.org/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + +wrap-ansi@^6.2.0: + version "6.2.0" + resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" + integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrappy@1: + version "1.0.2" + resolved "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= + +yaml@^1.7.2: + version "1.9.2" + resolved "https://registry.npmjs.org/yaml/-/yaml-1.9.2.tgz#f0cfa865f003ab707663e4f04b3956957ea564ed" + integrity sha512-HPT7cGGI0DuRcsO51qC1j9O16Dh1mZ2bnXwsi0jrSpsLz0WxOLSLXfkABVl6bZO629py3CU+OMJtpNHDLB97kg== + dependencies: + "@babel/runtime" "^7.9.2"