diff --git a/.babelrc b/.babelrc index 0c76448..72009ce 100644 --- a/.babelrc +++ b/.babelrc @@ -4,7 +4,7 @@ "@babel/preset-env", { "targets": { - "node": true + "node": "current" } } ] diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 1210960..e170977 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -11,7 +11,7 @@ jobs: - uses: actions/checkout@v1 - uses: actions/setup-node@v1 with: - node-version: 12 + node-version: 14 - run: npm install - run: npm test - uses: JS-DevTools/npm-publish@v1 diff --git a/Changelog.md b/Changelog.md new file mode 100644 index 0000000..2ca3f73 --- /dev/null +++ b/Changelog.md @@ -0,0 +1,61 @@ +# Changelog + +## Breaking changes v4 + +### Node.js +**Dropped** support for Node.js **12**. Minimum Node.js version is now **14** + +### API changes +#### Registration Options + - auditAuthOnly -> removed (can be filtered with isAuditable, check example below) + - auditGetRequests -> removed (can be filtered with isAuditable, check example below) + - showErrorsOnStdErr -> renamed to **debug** (false by default) + - isAuditable -> invoked with **request** as parameter (arity 1) to handle all cases (audits all by default, check example below for filtering) + - getEntity -> renamed to **setEntity**. Returns by default the endpoint path + - cacheEnabled -> renamed to isCacheEnabled + +Example using **isAuditable** (auditAuthOnly, auditGetRequests cases and path filtering) + +```js +await server.register({ + plugin: require("hapi-audit-rest"), + options: { + isAuditable: ({ auth: { isAuthenticated }, method, url: { pathname } }) => { + // do not audit unauthenticated requests + if (!isAuthenticated) { + return false + } + + // do not audit GET requests + if (method === "get") { + return false + } + + // do not audit requests when path does not start from /api + if (!pathname.startsWith("/api")) { + return false + } + + // return true to audit all other cases + return true + } + }, +}); +``` + +Example using **setEntity** option: +```js +await server.register({ + plugin: require("hapi-audit-rest"), + options: { + // use the standard pattern of an api i.e. /api/v1.0/users, to refine the entity name + // will have 'entity: users' in audit log + setEntity: (path) => path.split("/")[3], + } + }, +}); +``` + + +#### Route Options + - getPath -> renamed to **setInjectedPath** diff --git a/README.md b/README.md index e0b2ef0..9649a06 100644 --- a/README.md +++ b/README.md @@ -20,24 +20,27 @@ Small opinionated [Hapi.js] plugin that generates **audit logs** for **RESTful A - [PUT Requests](#put-requests) - [API](#api) - [Plugin registration options](#plugin-registration-options) + - [Handle common cases](#handle-common-cases) - [Plugin route options](#plugin-route-options) - [Disable plugin on route](#disable-plugin-on-route) - [Flows & Audit Log Data](#flows--audit-log-data) - [GET - scope _collection_](#get---scope-collection) - [GET - scope _resource_](#get---scope-resource) - - [POST - scope collection](#post---scope-collection) + - [POST - scope _resource_](#post---scope-resource) - [mutation (default)](#mutation-default) - [action](#action) - - [PUT - scope resource](#put---scope-resource) + - [PUT - scope _resource_](#put---scope-resource) - [mutation (default)](#mutation-default-1) - [action](#action-1) - - [DELETE - scope resource](#delete---scope-resource) + - [DELETE - scope _resource_](#delete---scope-resource) + - [mutation (default)](#mutation-default-2) + - [action](#action-2) - [Error handling](#error-handling) - [License](#license) ## Requirements -Works with Hapi **v18** or higher, Node.js **v12** or higher +Works with **Hapi.js v18** or higher, **Node.js v14** or higher. For compatibility with Node.js **v12** check **version 3**. ## Installation @@ -53,12 +56,18 @@ npm test ## About -This plugin creates audit log documents: +This plugin creates audit log documents based on REST semantics. -- **Actions**: general interactions (GET). -- **Mutations**: track **old and new state** of a resource (POST, PUT, DELETE), to effectively **reason about state changes**. +| HTTP method | Description | Audit Log Document | +| ----------- | ----------------------- | ------------------ | +| GET | Retrieve resources | Action | +| POST | Create a new resource | Mutation - Create | +| PUT | Update a resource | Mutation - Update | +| DELETE | Delete a resource | Mutation - Delete | -For every request an **event** is emitted with an **audit log** (action or mutation) document. +**Mutations** track **old and new state** of a resource to effectively **reason about state changes**. + +For every request an **event** is emitted with an **audit log** document. ## Quickstart @@ -80,7 +89,7 @@ Consider a CRUD API on users. application: "my-app", type: "SEARCH", body: { - entity: "users", + entity: "/api/users", entityId: null, action: "SEARCH", username: null, // or the username if authenticated @@ -100,7 +109,7 @@ Consider a CRUD API on users. application: "my-app", type: "SEARCH", body: { - entity: "users", + entity: "/api/users/1", entityId: "1", action: "SEARCH", username: null, // or the username if authenticated @@ -126,7 +135,7 @@ const user = { application: "my-app", type: "MUTATION", body: { - entity: "users", + entity: "/api/users", entityId: 1, action: "CREATE", username: null, // or the username if authenticated @@ -151,7 +160,7 @@ const user = { application: "my-app", type: "MUTATION", body: { - entity: "users", + entity: "/api/users/1", entityId: 1, action: "DELETE", username: null, // or the username if authenticated @@ -180,7 +189,7 @@ const user = { application: "my-app", type: "MUTATION", body: { - entity: "users", + entity: "/api/users/1", entityId: 1, action: "UPDATE", username: null, // or the username if authenticated @@ -214,19 +223,59 @@ await server.register({ | Name | Type | Default | Mandatory | Description | | ------------------ | ------------------------- | --------------- | ---------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| auditGetRequests | `Boolean` | true | no | Enable/Disable auditing of GET requests. | -| showErrorsOnStdErr | `Boolean` | true | no | Display errors on std error stream. | +| debug | `Boolean` | false | no | Display errors on std error stream. | | diffFunc | `Function` | _provided_ | no | External function to diff old and new values, Must `return` an array with two elements: old values and new values, with that order. **The default** implementation `returns` **fetched old and new values**.

_Signature
`function (oldValues, newValues) {return [oldValues, newValues]}`_ | -| cacheEnabled | `Boolean` | true | no | Enable/Disable internal cache. **Use cache** only if running an **one instance server (default enabled)**. If a GET by id is triggered before an update (PUT), old values will be loaded from cache instead of requiring an extra GET by id API call. | +| isCacheEnabled | `Boolean` | true | no | Enable/Disable internal cache. **Use cache** only if running an **one instance server (default enabled)**. If a GET by id is triggered before an update (PUT), old values will be loaded from cache instead of requiring an extra GET by id API call. | | clientId | `String` | my-app | no | Application instance name or auth client id. | -| auditAuthOnly | ` Boolean` | false | no | Enable/Disable auditing of **only authenticated requests**. | -| usernameKey | `String` | | yes (when auditAuthOnly enabled)
else no | The path/key to the username stored in _request.auth.credentials_ object. | +| usernameKey | `String` | | no | The path/key to the username stored in _request.auth.credentials_ object. | | cacheExpiresIn | `Number Positive Integer` | 900000 (15mins) | no | Time (_msecs_) until cache expires (when _cacheEnabled = false_). Minimum 60000 (1 minute). | -| isAuditable | `Function` | _provided_ | no | Checks if current path is auditable. **The default** implementation checks if **path starts with /api**.

_Signature
`function (path, method) {return Boolean}`_ | +| isAuditable | `Function` | _provided_ | no | Checks if current request is auditable. **The default** implementation audits all requests.

_Signature
`function (request) {return Boolean}`_ | | `eventHandler` | `Function` | _provided_ | no | Handler for the emitted events. **The default** implementations prints the audit log to stdout. You will have to implement this function in order to do something with the audit log.

_Signature
`function ({ auditLog, routeEndpoint })`_ | -| getEntity | `Function` | _provided_ | no | Creates the entity name of the audit log. **The default** implementation `returns` the string after /api/ and before next / if any.

_Signature
`function (path) {return String}`_ | +| setEntity | `Function` | _provided_ | no | Creates the entity name of the audit log. **The default** implementation `returns` the endpoint path.

_Signature
`function (path) {return String}`_ | | isEnabled | `Boolean` | true | no | Enable/Disable plugin initialization and functionality. | -| extAll | `Function` | - | no | A global override entrypoint to extend any value of any created audit log document. | +| extAll | `Function` | - | no | A **global override** entrypoint to extend any value of any created audit log document, invoked on **pre-response**.

_Signature
`function (request, auditLog) {return }`_ | + +#### Handle common cases +Common use cases for **isAuditable** option: +```js +await server.register({ + plugin: require("hapi-audit-rest"), + options: { + isAuditable: ({ auth: { isAuthenticated }, method, url: { pathname } }) => { + // do not audit unauthenticated requests + if (!isAuthenticated) { + return false + } + + // do not audit GET requests + if (method === "get") { + return false + } + + // do not audit requests when path does not start from /api + if (!pathname.startsWith("/api")) { + return false + } + + // return true to audit all other cases + return true + } + }, +}); +``` + +Common use cases for **setEntity** option: +```js +await server.register({ + plugin: require("hapi-audit-rest"), + options: { + // use the standard pattern of an api i.e. /api/v1.0/users, to refine the entity name + // will have 'entity: users' in audit log + setEntity: (path) => path.split("/")[3], + } + }, +}); +``` ### Plugin route options @@ -243,9 +292,9 @@ options: { | Name | Type | Default | Mandatory | Description | | -------------- | ---------- | ------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| ext | `Function` | | no | An extension point per route, invoked on `pre-response`, to **customize audit log document values**: Must `return an object (AuditAction or AuditMutation)` with any of the following **properties to override the default values**: | -| isAction | `Boolean` | false | no | Enable/Disable creation of **action** audit log documents for **PUT/POST** requests instead of mutation. | -| getPath | `Function` | | no | On PUT requests, old and/or new values are fetched by injecting a **GET by id** request, based on PUT route path. When GET by id route path differs, it must be provided.

_Signature
`function (request) {return String}`_ | +| ext | `Function` | | no | An extension point per route, invoked on `pre-response`, to **customize audit log document values**: Must `return an object (AuditAction or AuditMutation)` with **any** of the following **properties to override the default values**: | +| isAction | `Boolean` | false | no | Enable/Disable creation of **action** audit log documents for **PUT/POST/DELETE** requests instead of mutation. | +| setInjectedPath | `Function` | | no | On PUT requests, old and/or new values are fetched by injecting a **GET by id** request, based on PUT route path. When GET by id route path differs, it must be provided.

_Signature
`function (request) {return String}`_ | | fetchNewValues | `Boolean` | false | no | On PUT requests, the **incoming payload** will be used as **newValues**. In case there are any model inconsistencies, this option will inject a **GET by id** request to **fetch the newValues**. | | #### Disable plugin on route @@ -268,13 +317,14 @@ To effectively track old and new state of a resource, the plugin implements inte | ----------- | ---------- | -------------------------------------- | | GET | collection | Retrieve all resources in a collection | | GET | resource | Retrieve a single resource | -| POST | collection | Create a new resource in a collection | +| POST | resource | Create a new resource in a collection | | PUT | resource | Update a resource | | DELETE | resource | Delete a resource | -The user can **override** audit log document defaults by using the route [extension point](#ext). +To **override** audit log document defaults use the route [extension point](#ext). To completely override any created audit log document use the global override registration option [extend all](#extAll). #### GET - scope _collection_ +![get_collection_flow](https://user-images.githubusercontent.com/1659476/147410653-2b161ebe-eb7c-4b68-b21d-a2c055616feb.jpg) An _action_ audit log document is created, on pre-response lifecycle if the request succeeds with the following defaults: @@ -283,7 +333,7 @@ An _action_ audit log document is created, on pre-response lifecycle if the requ application: "my-app", // or the clientId if specified type: "SEARCH", body: { - entity: $, // as specified by getEntity function + entity: $, // as specified by setEntity function entityId: null, action: "SEARCH", username: null, // or the username if authenticated @@ -295,6 +345,7 @@ An _action_ audit log document is created, on pre-response lifecycle if the requ ``` #### GET - scope _resource_ +![get_resource_flow](https://user-images.githubusercontent.com/1659476/147410658-a9541e04-6484-415b-8517-44b006713737.jpg) An _action_ audit log document is created, on pre-response lifecycle if the request succeeds with the following defaults: @@ -303,7 +354,7 @@ An _action_ audit log document is created, on pre-response lifecycle if the requ application: "my-app", // or the clientId if specified type: "SEARCH", body: { - entity: $, // as specified by getEntity function + entity: $, // as specified by setEntity function entityId: request.params.id, action: "SEARCH", username: null, // or the username if authenticated @@ -319,6 +370,7 @@ The response is _cached_ if cashing enabled. #### POST - scope _resource_ ##### mutation (default) +![post_resource_mutation_flow_2](https://user-images.githubusercontent.com/1659476/147410665-53885e0d-3163-4d85-83a3-9cde340683e0.jpg) A _mutation_ audit log document is created on pre-response lifecycle if the request succeeds with the following defaults: @@ -327,7 +379,7 @@ A _mutation_ audit log document is created on pre-response lifecycle if the requ application: "my-app", // or the clientId if specified type: "MUTATION", body: { - entity: $, // as specified by getEntity function + entity: $, // as specified by setEntity function entityId: request.response.source.id || request.payload.id, action: "CREATE", username: null, // or the username if authenticated @@ -342,6 +394,7 @@ A _mutation_ audit log document is created on pre-response lifecycle if the requ - POST mutations rely to **request payload** or **response payload** to track the new resource state. If request is streamed to an upstream server this will result to an error. ##### action +![post_put_delete_resource_action_flow_2](https://user-images.githubusercontent.com/1659476/147410682-2d4d7ae7-b15d-4ab9-8852-5a0ade8d8f52.jpg) In cases that it is not meaningful to audit a mutation, an _action_ audit log document can be created by setting [isAction](#is-action) route parameter. @@ -350,7 +403,7 @@ In cases that it is not meaningful to audit a mutation, an _action_ audit log do application: "my-app", // or the clientId if specified type: "SEARCH", body: { - entity: $, // as specified by getEntity function + entity: $, // as specified by setEntity function entityId: request.params.id || request.payload.id, action: "SEARCH", username: null, // or the username if authenticated @@ -364,6 +417,7 @@ In cases that it is not meaningful to audit a mutation, an _action_ audit log do #### PUT - scope resource ##### mutation (default) +![put_resource_mutation_flow_2](https://user-images.githubusercontent.com/1659476/147410687-2b63d01d-0152-44e4-aafc-99bbf9417901.jpg) A _mutation_ audit log document is created on pre-response lifecycle if the request succeeds with the following defaults: @@ -372,7 +426,7 @@ A _mutation_ audit log document is created on pre-response lifecycle if the requ application: "my-app", // or the clientId if specified type: "MUTATION", body: { - entity: $, // as specified by getEntity function + entity: $, // as specified by setEntity function entityId: request.params.id || newValues.id, // where newValues is either the request payload (default) or the resource data fetched after update when fetchNewValues=true or request streamed action: "UPDATE", username: null, // or the username if authenticated @@ -386,7 +440,7 @@ A _mutation_ audit log document is created on pre-response lifecycle if the requ PUT mutations are the most complex. -- Before the update, the original resource state is retrieved by inspecting the cache. If not in cache a GET by id request is injected based on the current request path (custom path can be set on route with [getPath](#get-path)). +- Before the update, the original resource state is retrieved by inspecting the cache. If not in cache a GET by id request is injected based on the current request path (custom path can be set on route with [setInjectedPath](#get-path)). - After the update, the new resource state is retrieved from the request payload. If the request is streamed or the [fetchNewValues](#fetch-new) option is set, a GET by id request will be injected to fetch the new resource state. ##### action @@ -398,7 +452,7 @@ In cases that it is not meaningful to audit a mutation, an _action_ audit log do application: "my-app", // or the clientId if specified type: "SEARCH", body: { - entity: $, // as specified by getEntity function + entity: $, // as specified by setEntity function entityId: request.params.id || request.payload.id, action: "SEARCH", username: null, // or the username if authenticated @@ -412,6 +466,7 @@ In cases that it is not meaningful to audit a mutation, an _action_ audit log do #### DELETE - scope resource ##### mutation (default) +![delete_resource_mutation_flow](https://user-images.githubusercontent.com/1659476/147410981-a6c479af-8330-4799-ba31-6ec50aae2593.jpg) A _mutation_ audit log document is created on pre-response lifecycle if the request succeeds with the following defaults: @@ -420,7 +475,7 @@ A _mutation_ audit log document is created on pre-response lifecycle if the requ application: "my-app", // or the clientId if specified type: "MUTATION", body: { - entity: $, // as specified by getEntity function + entity: $, // as specified by setEntity function entityId: request.params.id || originalValues.id, // where originalValues = resource state before delete action: "DELETE", username: null, // or the username if authenticated @@ -434,7 +489,6 @@ A _mutation_ audit log document is created on pre-response lifecycle if the requ DELETE mutations retrieve old resource state by injecting a GET by id request before the delete operation. - ##### action In cases that it is not meaningful to audit a mutation, an _action_ audit log document can be created by setting [isAction](#is-action) route parameter. @@ -444,7 +498,7 @@ In cases that it is not meaningful to audit a mutation, an _action_ audit log do application: "my-app", // or the clientId if specified type: "SEARCH", body: { - entity: $, // as specified by getEntity function + entity: $, // as specified by setEntity function entityId: request.params.id || request.payload.id, action: "SEARCH", username: null, // or the username if authenticated @@ -472,7 +526,7 @@ server.events.on({ name: "request", channels: "app" }, (request, event, tags) => }); ``` -If `showErrorsOnStdErr` option is enabled (default), the error message will be printed to stderr for convenience. +If `debug` option is enabled (disabled by default), the error message will be printed to stderr for convenience. ## License diff --git a/package-lock.json b/package-lock.json index dd5ad41..8336fb1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "hapi-audit-rest", - "version": "3.5.2", + "version": "4.0.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -37,19 +37,19 @@ "dev": true }, "@babel/core": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.16.0.tgz", - "integrity": "sha512-mYZEvshBRHGsIAiyH5PzCFTCfbWfoYbO/jcSdXQSUQu1/pW0xDZAUP7KEc32heqWTAfAHhV9j1vH8Sav7l+JNQ==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.16.5.tgz", + "integrity": "sha512-wUcenlLzuWMZ9Zt8S0KmFwGlH6QKRh3vsm/dhDA3CHkiTA45YuG1XkHRcNRl73EFPXDp/d5kVOU0/y7x2w6OaQ==", "dev": true, "requires": { "@babel/code-frame": "^7.16.0", - "@babel/generator": "^7.16.0", - "@babel/helper-compilation-targets": "^7.16.0", - "@babel/helper-module-transforms": "^7.16.0", - "@babel/helpers": "^7.16.0", - "@babel/parser": "^7.16.0", + "@babel/generator": "^7.16.5", + "@babel/helper-compilation-targets": "^7.16.3", + "@babel/helper-module-transforms": "^7.16.5", + "@babel/helpers": "^7.16.5", + "@babel/parser": "^7.16.5", "@babel/template": "^7.16.0", - "@babel/traverse": "^7.16.0", + "@babel/traverse": "^7.16.5", "@babel/types": "^7.16.0", "convert-source-map": "^1.7.0", "debug": "^4.1.0", @@ -69,9 +69,9 @@ } }, "@babel/generator": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.16.0.tgz", - "integrity": "sha512-RR8hUCfRQn9j9RPKEVXo9LiwoxLPYn6hNZlvUOR8tSnaxlD0p0+la00ZP9/SnRt6HchKr+X0fO2r8vrETiJGew==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.16.5.tgz", + "integrity": "sha512-kIvCdjZqcdKqoDbVVdt5R99icaRtrtYhYK/xux5qiWCBmfdvEYMFZ68QCrpE5cbFM1JsuArUNs1ZkuKtTtUcZA==", "dev": true, "requires": { "@babel/types": "^7.16.0", @@ -126,9 +126,9 @@ } }, "@babel/parser": { - "version": "7.16.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.16.4.tgz", - "integrity": "sha512-6V0qdPUaiVHH3RtZeLIsc+6pDhbYzHR8ogA8w+f+Wc77DuXto19g2QUwveINoS34Uw+W8/hQDGJCx+i4n7xcng==", + "version": "7.16.6", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.16.6.tgz", + "integrity": "sha512-Gr86ujcNuPDnNOY8mi383Hvi8IYrJVJYuf3XcuBM/Dgd+bINn/7tHqsj+tKkoreMbmGsFLsltI/JJd8fOFWGDQ==", "dev": true }, "@babel/template": { @@ -143,17 +143,18 @@ } }, "@babel/traverse": { - "version": "7.16.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.16.3.tgz", - "integrity": "sha512-eolumr1vVMjqevCpwVO99yN/LoGL0EyHiLO5I043aYQvwOJ9eR5UsZSClHVCzfhBduMAsSzgA/6AyqPjNayJag==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.16.5.tgz", + "integrity": "sha512-FOCODAzqUMROikDYLYxl4nmwiLlu85rNqBML/A5hKRVXG2LV8d0iMqgPzdYTcIpjZEBB7D6UDU9vxRZiriASdQ==", "dev": true, "requires": { "@babel/code-frame": "^7.16.0", - "@babel/generator": "^7.16.0", + "@babel/generator": "^7.16.5", + "@babel/helper-environment-visitor": "^7.16.5", "@babel/helper-function-name": "^7.16.0", "@babel/helper-hoist-variables": "^7.16.0", "@babel/helper-split-export-declaration": "^7.16.0", - "@babel/parser": "^7.16.3", + "@babel/parser": "^7.16.5", "@babel/types": "^7.16.0", "debug": "^4.1.0", "globals": "^11.1.0" @@ -243,9 +244,9 @@ } }, "@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.16.0.tgz", - "integrity": "sha512-9KuleLT0e77wFUku6TUkqZzCEymBdtuQQ27MhEKzf9UOOJu3cYj98kyaDAzxpC7lV6DGiZFuC8XqDsq8/Kl6aQ==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.16.5.tgz", + "integrity": "sha512-3JEA9G5dmmnIWdzaT9d0NmFRgYnWUThLsDaL7982H0XqqWr56lRrsmwheXFMjR+TMl7QMBb6mzy9kvgr1lRLUA==", "dev": true, "requires": { "@babel/helper-explode-assignable-expression": "^7.16.0", @@ -291,16 +292,17 @@ } }, "@babel/helper-create-class-features-plugin": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.16.0.tgz", - "integrity": "sha512-XLwWvqEaq19zFlF5PTgOod4bUA+XbkR4WLQBct1bkzmxJGB0ZEJaoKF4c8cgH9oBtCDuYJ8BP5NB9uFiEgO5QA==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.16.5.tgz", + "integrity": "sha512-NEohnYA7mkB8L5JhU7BLwcBdU3j83IziR9aseMueWGeAjblbul3zzb8UvJ3a1zuBiqCMObzCJHFqKIQE6hTVmg==", "dev": true, "requires": { "@babel/helper-annotate-as-pure": "^7.16.0", + "@babel/helper-environment-visitor": "^7.16.5", "@babel/helper-function-name": "^7.16.0", - "@babel/helper-member-expression-to-functions": "^7.16.0", + "@babel/helper-member-expression-to-functions": "^7.16.5", "@babel/helper-optimise-call-expression": "^7.16.0", - "@babel/helper-replace-supers": "^7.16.0", + "@babel/helper-replace-supers": "^7.16.5", "@babel/helper-split-export-declaration": "^7.16.0" }, "dependencies": { @@ -360,9 +362,9 @@ } }, "@babel/parser": { - "version": "7.16.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.16.4.tgz", - "integrity": "sha512-6V0qdPUaiVHH3RtZeLIsc+6pDhbYzHR8ogA8w+f+Wc77DuXto19g2QUwveINoS34Uw+W8/hQDGJCx+i4n7xcng==", + "version": "7.16.6", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.16.6.tgz", + "integrity": "sha512-Gr86ujcNuPDnNOY8mi383Hvi8IYrJVJYuf3XcuBM/Dgd+bINn/7tHqsj+tKkoreMbmGsFLsltI/JJd8fOFWGDQ==", "dev": true }, "@babel/template": { @@ -424,9 +426,9 @@ } }, "@babel/generator": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.16.0.tgz", - "integrity": "sha512-RR8hUCfRQn9j9RPKEVXo9LiwoxLPYn6hNZlvUOR8tSnaxlD0p0+la00ZP9/SnRt6HchKr+X0fO2r8vrETiJGew==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.16.5.tgz", + "integrity": "sha512-kIvCdjZqcdKqoDbVVdt5R99icaRtrtYhYK/xux5qiWCBmfdvEYMFZ68QCrpE5cbFM1JsuArUNs1ZkuKtTtUcZA==", "dev": true, "requires": { "@babel/types": "^7.16.0", @@ -481,9 +483,9 @@ } }, "@babel/parser": { - "version": "7.16.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.16.4.tgz", - "integrity": "sha512-6V0qdPUaiVHH3RtZeLIsc+6pDhbYzHR8ogA8w+f+Wc77DuXto19g2QUwveINoS34Uw+W8/hQDGJCx+i4n7xcng==", + "version": "7.16.6", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.16.6.tgz", + "integrity": "sha512-Gr86ujcNuPDnNOY8mi383Hvi8IYrJVJYuf3XcuBM/Dgd+bINn/7tHqsj+tKkoreMbmGsFLsltI/JJd8fOFWGDQ==", "dev": true }, "@babel/template": { @@ -498,17 +500,18 @@ } }, "@babel/traverse": { - "version": "7.16.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.16.3.tgz", - "integrity": "sha512-eolumr1vVMjqevCpwVO99yN/LoGL0EyHiLO5I043aYQvwOJ9eR5UsZSClHVCzfhBduMAsSzgA/6AyqPjNayJag==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.16.5.tgz", + "integrity": "sha512-FOCODAzqUMROikDYLYxl4nmwiLlu85rNqBML/A5hKRVXG2LV8d0iMqgPzdYTcIpjZEBB7D6UDU9vxRZiriASdQ==", "dev": true, "requires": { "@babel/code-frame": "^7.16.0", - "@babel/generator": "^7.16.0", + "@babel/generator": "^7.16.5", + "@babel/helper-environment-visitor": "^7.16.5", "@babel/helper-function-name": "^7.16.0", "@babel/helper-hoist-variables": "^7.16.0", "@babel/helper-split-export-declaration": "^7.16.0", - "@babel/parser": "^7.16.3", + "@babel/parser": "^7.16.5", "@babel/types": "^7.16.0", "debug": "^4.1.0", "globals": "^11.1.0" @@ -532,6 +535,33 @@ } } }, + "@babel/helper-environment-visitor": { + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.16.5.tgz", + "integrity": "sha512-ODQyc5AnxmZWm/R2W7fzhamOk1ey8gSguo5SGvF0zcB3uUzRpTRmM/jmLSm9bDMyPlvbyJ+PwPEK0BWIoZ9wjg==", + "dev": true, + "requires": { + "@babel/types": "^7.16.0" + }, + "dependencies": { + "@babel/helper-validator-identifier": { + "version": "7.15.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.15.7.tgz", + "integrity": "sha512-K4JvCtQqad9OY2+yTU8w+E82ywk/fe+ELNlt1G8z3bVGlZfn/hOcQQsUhGhW/N+tb3fxK800wLtKOE/aM0m72w==", + "dev": true + }, + "@babel/types": { + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.16.0.tgz", + "integrity": "sha512-PJgg/k3SdLsGb3hhisFvtLOw5ts113klrpLuIPtCJIU+BB24fqq6lf8RWqKJEjzqXR9AEH1rIb5XTqwBHB+kQg==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.15.7", + "to-fast-properties": "^2.0.0" + } + } + } + }, "@babel/helper-explode-assignable-expression": { "version": "7.16.0", "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.16.0.tgz", @@ -607,9 +637,9 @@ } }, "@babel/helper-member-expression-to-functions": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.16.0.tgz", - "integrity": "sha512-bsjlBFPuWT6IWhl28EdrQ+gTvSvj5tqVP5Xeftp07SEuz5pLnsXZuDkDD3Rfcxy0IsHmbZ+7B2/9SHzxO0T+sQ==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.16.5.tgz", + "integrity": "sha512-7fecSXq7ZrLE+TWshbGT+HyCLkxloWNhTbU2QM1NTI/tDqyf0oZiMcEfYtDuUDCo528EOlt39G1rftea4bRZIw==", "dev": true, "requires": { "@babel/types": "^7.16.0" @@ -661,18 +691,18 @@ } }, "@babel/helper-module-transforms": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.16.0.tgz", - "integrity": "sha512-My4cr9ATcaBbmaEa8M0dZNA74cfI6gitvUAskgDtAFmAqyFKDSHQo5YstxPbN+lzHl2D9l/YOEFqb2mtUh4gfA==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.16.5.tgz", + "integrity": "sha512-CkvMxgV4ZyyioElFwcuWnDCcNIeyqTkCm9BxXZi73RR1ozqlpboqsbGUNvRTflgZtFbbJ1v5Emvm+lkjMYY/LQ==", "dev": true, "requires": { + "@babel/helper-environment-visitor": "^7.16.5", "@babel/helper-module-imports": "^7.16.0", - "@babel/helper-replace-supers": "^7.16.0", "@babel/helper-simple-access": "^7.16.0", "@babel/helper-split-export-declaration": "^7.16.0", "@babel/helper-validator-identifier": "^7.15.7", "@babel/template": "^7.16.0", - "@babel/traverse": "^7.16.0", + "@babel/traverse": "^7.16.5", "@babel/types": "^7.16.0" }, "dependencies": { @@ -686,9 +716,9 @@ } }, "@babel/generator": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.16.0.tgz", - "integrity": "sha512-RR8hUCfRQn9j9RPKEVXo9LiwoxLPYn6hNZlvUOR8tSnaxlD0p0+la00ZP9/SnRt6HchKr+X0fO2r8vrETiJGew==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.16.5.tgz", + "integrity": "sha512-kIvCdjZqcdKqoDbVVdt5R99icaRtrtYhYK/xux5qiWCBmfdvEYMFZ68QCrpE5cbFM1JsuArUNs1ZkuKtTtUcZA==", "dev": true, "requires": { "@babel/types": "^7.16.0", @@ -743,9 +773,9 @@ } }, "@babel/parser": { - "version": "7.16.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.16.4.tgz", - "integrity": "sha512-6V0qdPUaiVHH3RtZeLIsc+6pDhbYzHR8ogA8w+f+Wc77DuXto19g2QUwveINoS34Uw+W8/hQDGJCx+i4n7xcng==", + "version": "7.16.6", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.16.6.tgz", + "integrity": "sha512-Gr86ujcNuPDnNOY8mi383Hvi8IYrJVJYuf3XcuBM/Dgd+bINn/7tHqsj+tKkoreMbmGsFLsltI/JJd8fOFWGDQ==", "dev": true }, "@babel/template": { @@ -760,17 +790,18 @@ } }, "@babel/traverse": { - "version": "7.16.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.16.3.tgz", - "integrity": "sha512-eolumr1vVMjqevCpwVO99yN/LoGL0EyHiLO5I043aYQvwOJ9eR5UsZSClHVCzfhBduMAsSzgA/6AyqPjNayJag==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.16.5.tgz", + "integrity": "sha512-FOCODAzqUMROikDYLYxl4nmwiLlu85rNqBML/A5hKRVXG2LV8d0iMqgPzdYTcIpjZEBB7D6UDU9vxRZiriASdQ==", "dev": true, "requires": { "@babel/code-frame": "^7.16.0", - "@babel/generator": "^7.16.0", + "@babel/generator": "^7.16.5", + "@babel/helper-environment-visitor": "^7.16.5", "@babel/helper-function-name": "^7.16.0", "@babel/helper-hoist-variables": "^7.16.0", "@babel/helper-split-export-declaration": "^7.16.0", - "@babel/parser": "^7.16.3", + "@babel/parser": "^7.16.5", "@babel/types": "^7.16.0", "debug": "^4.1.0", "globals": "^11.1.0" @@ -816,19 +847,19 @@ } }, "@babel/helper-plugin-utils": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz", - "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.16.5.tgz", + "integrity": "sha512-59KHWHXxVA9K4HNF4sbHCf+eJeFe0Te/ZFGqBT4OjXhrwvA04sGfaEGsVTdsjoszq0YTP49RC9UKe5g8uN2RwQ==", "dev": true }, "@babel/helper-remap-async-to-generator": { - "version": "7.16.4", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.16.4.tgz", - "integrity": "sha512-vGERmmhR+s7eH5Y/cp8PCVzj4XEjerq8jooMfxFdA5xVtAk9Sh4AQsrWgiErUEBjtGrBtOFKDUcWQFW4/dFwMA==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.16.5.tgz", + "integrity": "sha512-X+aAJldyxrOmN9v3FKp+Hu1NO69VWgYgDGq6YDykwRPzxs5f2N+X988CBXS7EQahDU+Vpet5QYMqLk+nsp+Qxw==", "dev": true, "requires": { "@babel/helper-annotate-as-pure": "^7.16.0", - "@babel/helper-wrap-function": "^7.16.0", + "@babel/helper-wrap-function": "^7.16.5", "@babel/types": "^7.16.0" }, "dependencies": { @@ -851,14 +882,15 @@ } }, "@babel/helper-replace-supers": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.16.0.tgz", - "integrity": "sha512-TQxuQfSCdoha7cpRNJvfaYxxxzmbxXw/+6cS7V02eeDYyhxderSoMVALvwupA54/pZcOTtVeJ0xccp1nGWladA==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.16.5.tgz", + "integrity": "sha512-ao3seGVa/FZCMCCNDuBcqnBFSbdr8N2EW35mzojx3TwfIbdPmNK+JV6+2d5bR0Z71W5ocLnQp9en/cTF7pBJiQ==", "dev": true, "requires": { - "@babel/helper-member-expression-to-functions": "^7.16.0", + "@babel/helper-environment-visitor": "^7.16.5", + "@babel/helper-member-expression-to-functions": "^7.16.5", "@babel/helper-optimise-call-expression": "^7.16.0", - "@babel/traverse": "^7.16.0", + "@babel/traverse": "^7.16.5", "@babel/types": "^7.16.0" }, "dependencies": { @@ -872,9 +904,9 @@ } }, "@babel/generator": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.16.0.tgz", - "integrity": "sha512-RR8hUCfRQn9j9RPKEVXo9LiwoxLPYn6hNZlvUOR8tSnaxlD0p0+la00ZP9/SnRt6HchKr+X0fO2r8vrETiJGew==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.16.5.tgz", + "integrity": "sha512-kIvCdjZqcdKqoDbVVdt5R99icaRtrtYhYK/xux5qiWCBmfdvEYMFZ68QCrpE5cbFM1JsuArUNs1ZkuKtTtUcZA==", "dev": true, "requires": { "@babel/types": "^7.16.0", @@ -929,9 +961,9 @@ } }, "@babel/parser": { - "version": "7.16.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.16.4.tgz", - "integrity": "sha512-6V0qdPUaiVHH3RtZeLIsc+6pDhbYzHR8ogA8w+f+Wc77DuXto19g2QUwveINoS34Uw+W8/hQDGJCx+i4n7xcng==", + "version": "7.16.6", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.16.6.tgz", + "integrity": "sha512-Gr86ujcNuPDnNOY8mi383Hvi8IYrJVJYuf3XcuBM/Dgd+bINn/7tHqsj+tKkoreMbmGsFLsltI/JJd8fOFWGDQ==", "dev": true }, "@babel/template": { @@ -946,17 +978,18 @@ } }, "@babel/traverse": { - "version": "7.16.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.16.3.tgz", - "integrity": "sha512-eolumr1vVMjqevCpwVO99yN/LoGL0EyHiLO5I043aYQvwOJ9eR5UsZSClHVCzfhBduMAsSzgA/6AyqPjNayJag==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.16.5.tgz", + "integrity": "sha512-FOCODAzqUMROikDYLYxl4nmwiLlu85rNqBML/A5hKRVXG2LV8d0iMqgPzdYTcIpjZEBB7D6UDU9vxRZiriASdQ==", "dev": true, "requires": { "@babel/code-frame": "^7.16.0", - "@babel/generator": "^7.16.0", + "@babel/generator": "^7.16.5", + "@babel/helper-environment-visitor": "^7.16.5", "@babel/helper-function-name": "^7.16.0", "@babel/helper-hoist-variables": "^7.16.0", "@babel/helper-split-export-declaration": "^7.16.0", - "@babel/parser": "^7.16.3", + "@babel/parser": "^7.16.5", "@babel/types": "^7.16.0", "debug": "^4.1.0", "globals": "^11.1.0" @@ -1050,14 +1083,14 @@ "dev": true }, "@babel/helper-wrap-function": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.16.0.tgz", - "integrity": "sha512-VVMGzYY3vkWgCJML+qVLvGIam902mJW0FvT7Avj1zEe0Gn7D93aWdLblYARTxEw+6DhZmtzhBM2zv0ekE5zg1g==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.16.5.tgz", + "integrity": "sha512-2J2pmLBqUqVdJw78U0KPNdeE2qeuIyKoG4mKV7wAq3mc4jJG282UgjZw4ZYDnqiWQuS3Y3IYdF/AQ6CpyBV3VA==", "dev": true, "requires": { "@babel/helper-function-name": "^7.16.0", "@babel/template": "^7.16.0", - "@babel/traverse": "^7.16.0", + "@babel/traverse": "^7.16.5", "@babel/types": "^7.16.0" }, "dependencies": { @@ -1071,9 +1104,9 @@ } }, "@babel/generator": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.16.0.tgz", - "integrity": "sha512-RR8hUCfRQn9j9RPKEVXo9LiwoxLPYn6hNZlvUOR8tSnaxlD0p0+la00ZP9/SnRt6HchKr+X0fO2r8vrETiJGew==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.16.5.tgz", + "integrity": "sha512-kIvCdjZqcdKqoDbVVdt5R99icaRtrtYhYK/xux5qiWCBmfdvEYMFZ68QCrpE5cbFM1JsuArUNs1ZkuKtTtUcZA==", "dev": true, "requires": { "@babel/types": "^7.16.0", @@ -1128,9 +1161,9 @@ } }, "@babel/parser": { - "version": "7.16.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.16.4.tgz", - "integrity": "sha512-6V0qdPUaiVHH3RtZeLIsc+6pDhbYzHR8ogA8w+f+Wc77DuXto19g2QUwveINoS34Uw+W8/hQDGJCx+i4n7xcng==", + "version": "7.16.6", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.16.6.tgz", + "integrity": "sha512-Gr86ujcNuPDnNOY8mi383Hvi8IYrJVJYuf3XcuBM/Dgd+bINn/7tHqsj+tKkoreMbmGsFLsltI/JJd8fOFWGDQ==", "dev": true }, "@babel/template": { @@ -1145,17 +1178,18 @@ } }, "@babel/traverse": { - "version": "7.16.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.16.3.tgz", - "integrity": "sha512-eolumr1vVMjqevCpwVO99yN/LoGL0EyHiLO5I043aYQvwOJ9eR5UsZSClHVCzfhBduMAsSzgA/6AyqPjNayJag==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.16.5.tgz", + "integrity": "sha512-FOCODAzqUMROikDYLYxl4nmwiLlu85rNqBML/A5hKRVXG2LV8d0iMqgPzdYTcIpjZEBB7D6UDU9vxRZiriASdQ==", "dev": true, "requires": { "@babel/code-frame": "^7.16.0", - "@babel/generator": "^7.16.0", + "@babel/generator": "^7.16.5", + "@babel/helper-environment-visitor": "^7.16.5", "@babel/helper-function-name": "^7.16.0", "@babel/helper-hoist-variables": "^7.16.0", "@babel/helper-split-export-declaration": "^7.16.0", - "@babel/parser": "^7.16.3", + "@babel/parser": "^7.16.5", "@babel/types": "^7.16.0", "debug": "^4.1.0", "globals": "^11.1.0" @@ -1174,13 +1208,13 @@ } }, "@babel/helpers": { - "version": "7.16.3", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.16.3.tgz", - "integrity": "sha512-Xn8IhDlBPhvYTvgewPKawhADichOsbkZuzN7qz2BusOM0brChsyXMDJvldWaYMMUNiCQdQzNEioXTp3sC8Nt8w==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.16.5.tgz", + "integrity": "sha512-TLgi6Lh71vvMZGEkFuIxzaPsyeYCHQ5jJOOX1f0xXn0uciFuE8cEk0wyBquMcCxBXZ5BJhE2aUB7pnWTD150Tw==", "dev": true, "requires": { "@babel/template": "^7.16.0", - "@babel/traverse": "^7.16.3", + "@babel/traverse": "^7.16.5", "@babel/types": "^7.16.0" }, "dependencies": { @@ -1194,9 +1228,9 @@ } }, "@babel/generator": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.16.0.tgz", - "integrity": "sha512-RR8hUCfRQn9j9RPKEVXo9LiwoxLPYn6hNZlvUOR8tSnaxlD0p0+la00ZP9/SnRt6HchKr+X0fO2r8vrETiJGew==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.16.5.tgz", + "integrity": "sha512-kIvCdjZqcdKqoDbVVdt5R99icaRtrtYhYK/xux5qiWCBmfdvEYMFZ68QCrpE5cbFM1JsuArUNs1ZkuKtTtUcZA==", "dev": true, "requires": { "@babel/types": "^7.16.0", @@ -1251,9 +1285,9 @@ } }, "@babel/parser": { - "version": "7.16.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.16.4.tgz", - "integrity": "sha512-6V0qdPUaiVHH3RtZeLIsc+6pDhbYzHR8ogA8w+f+Wc77DuXto19g2QUwveINoS34Uw+W8/hQDGJCx+i4n7xcng==", + "version": "7.16.6", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.16.6.tgz", + "integrity": "sha512-Gr86ujcNuPDnNOY8mi383Hvi8IYrJVJYuf3XcuBM/Dgd+bINn/7tHqsj+tKkoreMbmGsFLsltI/JJd8fOFWGDQ==", "dev": true }, "@babel/template": { @@ -1268,17 +1302,18 @@ } }, "@babel/traverse": { - "version": "7.16.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.16.3.tgz", - "integrity": "sha512-eolumr1vVMjqevCpwVO99yN/LoGL0EyHiLO5I043aYQvwOJ9eR5UsZSClHVCzfhBduMAsSzgA/6AyqPjNayJag==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.16.5.tgz", + "integrity": "sha512-FOCODAzqUMROikDYLYxl4nmwiLlu85rNqBML/A5hKRVXG2LV8d0iMqgPzdYTcIpjZEBB7D6UDU9vxRZiriASdQ==", "dev": true, "requires": { "@babel/code-frame": "^7.16.0", - "@babel/generator": "^7.16.0", + "@babel/generator": "^7.16.5", + "@babel/helper-environment-visitor": "^7.16.5", "@babel/helper-function-name": "^7.16.0", "@babel/helper-hoist-variables": "^7.16.0", "@babel/helper-split-export-declaration": "^7.16.0", - "@babel/parser": "^7.16.3", + "@babel/parser": "^7.16.5", "@babel/types": "^7.16.0", "debug": "^4.1.0", "globals": "^11.1.0" @@ -1371,161 +1406,161 @@ } }, "@babel/plugin-proposal-async-generator-functions": { - "version": "7.16.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.16.4.tgz", - "integrity": "sha512-/CUekqaAaZCQHleSK/9HajvcD/zdnJiKRiuUFq8ITE+0HsPzquf53cpFiqAwl/UfmJbR6n5uGPQSPdrmKOvHHg==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.16.5.tgz", + "integrity": "sha512-C/FX+3HNLV6sz7AqbTQqEo1L9/kfrKjxcVtgyBCmvIgOjvuBVUWooDoi7trsLxOzCEo5FccjRvKHkfDsJFZlfA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-remap-async-to-generator": "^7.16.4", + "@babel/helper-plugin-utils": "^7.16.5", + "@babel/helper-remap-async-to-generator": "^7.16.5", "@babel/plugin-syntax-async-generators": "^7.8.4" } }, "@babel/plugin-proposal-class-properties": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.16.0.tgz", - "integrity": "sha512-mCF3HcuZSY9Fcx56Lbn+CGdT44ioBMMvjNVldpKtj8tpniETdLjnxdHI1+sDWXIM1nNt+EanJOZ3IG9lzVjs7A==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.16.5.tgz", + "integrity": "sha512-pJD3HjgRv83s5dv1sTnDbZOaTjghKEz8KUn1Kbh2eAIRhGuyQ1XSeI4xVXU3UlIEVA3DAyIdxqT1eRn7Wcn55A==", "dev": true, "requires": { - "@babel/helper-create-class-features-plugin": "^7.16.0", - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-create-class-features-plugin": "^7.16.5", + "@babel/helper-plugin-utils": "^7.16.5" } }, "@babel/plugin-proposal-class-static-block": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.16.0.tgz", - "integrity": "sha512-mAy3sdcY9sKAkf3lQbDiv3olOfiLqI51c9DR9b19uMoR2Z6r5pmGl7dfNFqEvqOyqbf1ta4lknK4gc5PJn3mfA==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.16.5.tgz", + "integrity": "sha512-EEFzuLZcm/rNJ8Q5krK+FRKdVkd6FjfzT9tuSZql9sQn64K0hHA2KLJ0DqVot9/iV6+SsuadC5yI39zWnm+nmQ==", "dev": true, "requires": { - "@babel/helper-create-class-features-plugin": "^7.16.0", - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-create-class-features-plugin": "^7.16.5", + "@babel/helper-plugin-utils": "^7.16.5", "@babel/plugin-syntax-class-static-block": "^7.14.5" } }, "@babel/plugin-proposal-dynamic-import": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.16.0.tgz", - "integrity": "sha512-QGSA6ExWk95jFQgwz5GQ2Dr95cf7eI7TKutIXXTb7B1gCLTCz5hTjFTQGfLFBBiC5WSNi7udNwWsqbbMh1c4yQ==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.16.5.tgz", + "integrity": "sha512-P05/SJZTTvHz79LNYTF8ff5xXge0kk5sIIWAypcWgX4BTRUgyHc8wRxJ/Hk+mU0KXldgOOslKaeqnhthcDJCJQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-plugin-utils": "^7.16.5", "@babel/plugin-syntax-dynamic-import": "^7.8.3" } }, "@babel/plugin-proposal-export-namespace-from": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.16.0.tgz", - "integrity": "sha512-CjI4nxM/D+5wCnhD11MHB1AwRSAYeDT+h8gCdcVJZ/OK7+wRzFsf7PFPWVpVpNRkHMmMkQWAHpTq+15IXQ1diA==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.16.5.tgz", + "integrity": "sha512-i+sltzEShH1vsVydvNaTRsgvq2vZsfyrd7K7vPLUU/KgS0D5yZMe6uipM0+izminnkKrEfdUnz7CxMRb6oHZWw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-plugin-utils": "^7.16.5", "@babel/plugin-syntax-export-namespace-from": "^7.8.3" } }, "@babel/plugin-proposal-json-strings": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.16.0.tgz", - "integrity": "sha512-kouIPuiv8mSi5JkEhzApg5Gn6hFyKPnlkO0a9YSzqRurH8wYzSlf6RJdzluAsbqecdW5pBvDJDfyDIUR/vLxvg==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.16.5.tgz", + "integrity": "sha512-QQJueTFa0y9E4qHANqIvMsuxM/qcLQmKttBACtPCQzGUEizsXDACGonlPiSwynHfOa3vNw0FPMVvQzbuXwh4SQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-plugin-utils": "^7.16.5", "@babel/plugin-syntax-json-strings": "^7.8.3" } }, "@babel/plugin-proposal-logical-assignment-operators": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.16.0.tgz", - "integrity": "sha512-pbW0fE30sVTYXXm9lpVQQ/Vc+iTeQKiXlaNRZPPN2A2VdlWyAtsUrsQ3xydSlDW00TFMK7a8m3cDTkBF5WnV3Q==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.16.5.tgz", + "integrity": "sha512-xqibl7ISO2vjuQM+MzR3rkd0zfNWltk7n9QhaD8ghMmMceVguYrNDt7MikRyj4J4v3QehpnrU8RYLnC7z/gZLA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-plugin-utils": "^7.16.5", "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" } }, "@babel/plugin-proposal-nullish-coalescing-operator": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.16.0.tgz", - "integrity": "sha512-3bnHA8CAFm7cG93v8loghDYyQ8r97Qydf63BeYiGgYbjKKB/XP53W15wfRC7dvKfoiJ34f6Rbyyx2btExc8XsQ==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.16.5.tgz", + "integrity": "sha512-YwMsTp/oOviSBhrjwi0vzCUycseCYwoXnLiXIL3YNjHSMBHicGTz7GjVU/IGgz4DtOEXBdCNG72pvCX22ehfqg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-plugin-utils": "^7.16.5", "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" } }, "@babel/plugin-proposal-numeric-separator": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.16.0.tgz", - "integrity": "sha512-FAhE2I6mjispy+vwwd6xWPyEx3NYFS13pikDBWUAFGZvq6POGs5eNchw8+1CYoEgBl9n11I3NkzD7ghn25PQ9Q==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.16.5.tgz", + "integrity": "sha512-DvB9l/TcsCRvsIV9v4jxR/jVP45cslTVC0PMVHvaJhhNuhn2Y1SOhCSFlPK777qLB5wb8rVDaNoqMTyOqtY5Iw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-plugin-utils": "^7.16.5", "@babel/plugin-syntax-numeric-separator": "^7.10.4" } }, "@babel/plugin-proposal-object-rest-spread": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.16.0.tgz", - "integrity": "sha512-LU/+jp89efe5HuWJLmMmFG0+xbz+I2rSI7iLc1AlaeSMDMOGzWlc5yJrMN1d04osXN4sSfpo4O+azkBNBes0jg==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.16.5.tgz", + "integrity": "sha512-UEd6KpChoyPhCoE840KRHOlGhEZFutdPDMGj+0I56yuTTOaT51GzmnEl/0uT41fB/vD2nT+Pci2KjezyE3HmUw==", "dev": true, "requires": { - "@babel/compat-data": "^7.16.0", - "@babel/helper-compilation-targets": "^7.16.0", - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/compat-data": "^7.16.4", + "@babel/helper-compilation-targets": "^7.16.3", + "@babel/helper-plugin-utils": "^7.16.5", "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-transform-parameters": "^7.16.0" + "@babel/plugin-transform-parameters": "^7.16.5" } }, "@babel/plugin-proposal-optional-catch-binding": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.16.0.tgz", - "integrity": "sha512-kicDo0A/5J0nrsCPbn89mTG3Bm4XgYi0CZtvex9Oyw7gGZE3HXGD0zpQNH+mo+tEfbo8wbmMvJftOwpmPy7aVw==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.16.5.tgz", + "integrity": "sha512-ihCMxY1Iljmx4bWy/PIMJGXN4NS4oUj1MKynwO07kiKms23pNvIn1DMB92DNB2R0EA882sw0VXIelYGdtF7xEQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-plugin-utils": "^7.16.5", "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" } }, "@babel/plugin-proposal-optional-chaining": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.16.0.tgz", - "integrity": "sha512-Y4rFpkZODfHrVo70Uaj6cC1JJOt3Pp0MdWSwIKtb8z1/lsjl9AmnB7ErRFV+QNGIfcY1Eruc2UMx5KaRnXjMyg==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.16.5.tgz", + "integrity": "sha512-kzdHgnaXRonttiTfKYnSVafbWngPPr2qKw9BWYBESl91W54e+9R5pP70LtWxV56g0f05f/SQrwHYkfvbwcdQ/A==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-plugin-utils": "^7.16.5", "@babel/helper-skip-transparent-expression-wrappers": "^7.16.0", "@babel/plugin-syntax-optional-chaining": "^7.8.3" } }, "@babel/plugin-proposal-private-methods": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.16.0.tgz", - "integrity": "sha512-IvHmcTHDFztQGnn6aWq4t12QaBXTKr1whF/dgp9kz84X6GUcwq9utj7z2wFCUfeOup/QKnOlt2k0zxkGFx9ubg==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.16.5.tgz", + "integrity": "sha512-+yFMO4BGT3sgzXo+lrq7orX5mAZt57DwUK6seqII6AcJnJOIhBJ8pzKH47/ql/d426uQ7YhN8DpUFirQzqYSUA==", "dev": true, "requires": { - "@babel/helper-create-class-features-plugin": "^7.16.0", - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-create-class-features-plugin": "^7.16.5", + "@babel/helper-plugin-utils": "^7.16.5" } }, "@babel/plugin-proposal-private-property-in-object": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.16.0.tgz", - "integrity": "sha512-3jQUr/HBbMVZmi72LpjQwlZ55i1queL8KcDTQEkAHihttJnAPrcvG9ZNXIfsd2ugpizZo595egYV6xy+pv4Ofw==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.16.5.tgz", + "integrity": "sha512-+YGh5Wbw0NH3y/E5YMu6ci5qTDmAEVNoZ3I54aB6nVEOZ5BQ7QJlwKq5pYVucQilMByGn/bvX0af+uNaPRCabA==", "dev": true, "requires": { "@babel/helper-annotate-as-pure": "^7.16.0", - "@babel/helper-create-class-features-plugin": "^7.16.0", - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-create-class-features-plugin": "^7.16.5", + "@babel/helper-plugin-utils": "^7.16.5", "@babel/plugin-syntax-private-property-in-object": "^7.14.5" } }, "@babel/plugin-proposal-unicode-property-regex": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.16.0.tgz", - "integrity": "sha512-ti7IdM54NXv29cA4+bNNKEMS4jLMCbJgl+Drv+FgYy0erJLAxNAIXcNjNjrRZEcWq0xJHsNVwQezskMFpF8N9g==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.16.5.tgz", + "integrity": "sha512-s5sKtlKQyFSatt781HQwv1hoM5BQ9qRH30r+dK56OLDsHmV74mzwJNX7R1yMuE7VZKG5O6q/gmOGSAO6ikTudg==", "dev": true, "requires": { "@babel/helper-create-regexp-features-plugin": "^7.16.0", - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" } }, "@babel/plugin-syntax-async-generators": { @@ -1655,54 +1690,55 @@ } }, "@babel/plugin-transform-arrow-functions": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.16.0.tgz", - "integrity": "sha512-vIFb5250Rbh7roWARvCLvIJ/PtAU5Lhv7BtZ1u24COwpI9Ypjsh+bZcKk6rlIyalK+r0jOc1XQ8I4ovNxNrWrA==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.16.5.tgz", + "integrity": "sha512-8bTHiiZyMOyfZFULjsCnYOWG059FVMes0iljEHSfARhNgFfpsqE92OrCffv3veSw9rwMkYcFe9bj0ZoXU2IGtQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" } }, "@babel/plugin-transform-async-to-generator": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.16.0.tgz", - "integrity": "sha512-PbIr7G9kR8tdH6g8Wouir5uVjklETk91GMVSUq+VaOgiinbCkBP6Q7NN/suM/QutZkMJMvcyAriogcYAdhg8Gw==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.16.5.tgz", + "integrity": "sha512-TMXgfioJnkXU+XRoj7P2ED7rUm5jbnDWwlCuFVTpQboMfbSya5WrmubNBAMlk7KXvywpo8rd8WuYZkis1o2H8w==", "dev": true, "requires": { "@babel/helper-module-imports": "^7.16.0", - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-remap-async-to-generator": "^7.16.0" + "@babel/helper-plugin-utils": "^7.16.5", + "@babel/helper-remap-async-to-generator": "^7.16.5" } }, "@babel/plugin-transform-block-scoped-functions": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.16.0.tgz", - "integrity": "sha512-V14As3haUOP4ZWrLJ3VVx5rCnrYhMSHN/jX7z6FAt5hjRkLsb0snPCmJwSOML5oxkKO4FNoNv7V5hw/y2bjuvg==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.16.5.tgz", + "integrity": "sha512-BxmIyKLjUGksJ99+hJyL/HIxLIGnLKtw772zYDER7UuycDZ+Xvzs98ZQw6NGgM2ss4/hlFAaGiZmMNKvValEjw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" } }, "@babel/plugin-transform-block-scoping": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.16.0.tgz", - "integrity": "sha512-27n3l67/R3UrXfizlvHGuTwsRIFyce3D/6a37GRxn28iyTPvNXaW4XvznexRh1zUNLPjbLL22Id0XQElV94ruw==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.16.5.tgz", + "integrity": "sha512-JxjSPNZSiOtmxjX7PBRBeRJTUKTyJ607YUYeT0QJCNdsedOe+/rXITjP08eG8xUpsLfPirgzdCFN+h0w6RI+pQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" } }, "@babel/plugin-transform-classes": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.16.0.tgz", - "integrity": "sha512-HUxMvy6GtAdd+GKBNYDWCIA776byUQH8zjnfjxwT1P1ARv/wFu8eBDpmXQcLS/IwRtrxIReGiplOwMeyO7nsDQ==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.16.5.tgz", + "integrity": "sha512-DzJ1vYf/7TaCYy57J3SJ9rV+JEuvmlnvvyvYKFbk5u46oQbBvuB9/0w+YsVsxkOv8zVWKpDmUoj4T5ILHoXevA==", "dev": true, "requires": { "@babel/helper-annotate-as-pure": "^7.16.0", + "@babel/helper-environment-visitor": "^7.16.5", "@babel/helper-function-name": "^7.16.0", "@babel/helper-optimise-call-expression": "^7.16.0", - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-replace-supers": "^7.16.0", + "@babel/helper-plugin-utils": "^7.16.5", + "@babel/helper-replace-supers": "^7.16.5", "@babel/helper-split-export-declaration": "^7.16.0", "globals": "^11.1.0" }, @@ -1763,9 +1799,9 @@ } }, "@babel/parser": { - "version": "7.16.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.16.4.tgz", - "integrity": "sha512-6V0qdPUaiVHH3RtZeLIsc+6pDhbYzHR8ogA8w+f+Wc77DuXto19g2QUwveINoS34Uw+W8/hQDGJCx+i4n7xcng==", + "version": "7.16.6", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.16.6.tgz", + "integrity": "sha512-Gr86ujcNuPDnNOY8mi383Hvi8IYrJVJYuf3XcuBM/Dgd+bINn/7tHqsj+tKkoreMbmGsFLsltI/JJd8fOFWGDQ==", "dev": true }, "@babel/template": { @@ -1792,69 +1828,69 @@ } }, "@babel/plugin-transform-computed-properties": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.16.0.tgz", - "integrity": "sha512-63l1dRXday6S8V3WFY5mXJwcRAnPYxvFfTlt67bwV1rTyVTM5zrp0DBBb13Kl7+ehkCVwIZPumPpFP/4u70+Tw==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.16.5.tgz", + "integrity": "sha512-n1+O7xtU5lSLraRzX88CNcpl7vtGdPakKzww74bVwpAIRgz9JVLJJpOLb0uYqcOaXVM0TL6X0RVeIJGD2CnCkg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" } }, "@babel/plugin-transform-destructuring": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.16.0.tgz", - "integrity": "sha512-Q7tBUwjxLTsHEoqktemHBMtb3NYwyJPTJdM+wDwb0g8PZ3kQUIzNvwD5lPaqW/p54TXBc/MXZu9Jr7tbUEUM8Q==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.16.5.tgz", + "integrity": "sha512-GuRVAsjq+c9YPK6NeTkRLWyQskDC099XkBSVO+6QzbnOnH2d/4mBVXYStaPrZD3dFRfg00I6BFJ9Atsjfs8mlg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" } }, "@babel/plugin-transform-dotall-regex": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.16.0.tgz", - "integrity": "sha512-FXlDZfQeLILfJlC6I1qyEwcHK5UpRCFkaoVyA1nk9A1L1Yu583YO4un2KsLBsu3IJb4CUbctZks8tD9xPQubLw==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.16.5.tgz", + "integrity": "sha512-iQiEMt8Q4/5aRGHpGVK2Zc7a6mx7qEAO7qehgSug3SDImnuMzgmm/wtJALXaz25zUj1PmnNHtShjFgk4PDx4nw==", "dev": true, "requires": { "@babel/helper-create-regexp-features-plugin": "^7.16.0", - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" } }, "@babel/plugin-transform-duplicate-keys": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.16.0.tgz", - "integrity": "sha512-LIe2kcHKAZOJDNxujvmp6z3mfN6V9lJxubU4fJIGoQCkKe3Ec2OcbdlYP+vW++4MpxwG0d1wSDOJtQW5kLnkZQ==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.16.5.tgz", + "integrity": "sha512-81tijpDg2a6I1Yhj4aWY1l3O1J4Cg/Pd7LfvuaH2VVInAkXtzibz9+zSPdUM1WvuUi128ksstAP0hM5w48vQgg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" } }, "@babel/plugin-transform-exponentiation-operator": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.16.0.tgz", - "integrity": "sha512-OwYEvzFI38hXklsrbNivzpO3fh87skzx8Pnqi4LoSYeav0xHlueSoCJrSgTPfnbyzopo5b3YVAJkFIcUpK2wsw==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.16.5.tgz", + "integrity": "sha512-12rba2HwemQPa7BLIKCzm1pT2/RuQHtSFHdNl41cFiC6oi4tcrp7gjB07pxQvFpcADojQywSjblQth6gJyE6CA==", "dev": true, "requires": { - "@babel/helper-builder-binary-assignment-operator-visitor": "^7.16.0", - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.16.5", + "@babel/helper-plugin-utils": "^7.16.5" } }, "@babel/plugin-transform-for-of": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.16.0.tgz", - "integrity": "sha512-5QKUw2kO+GVmKr2wMYSATCTTnHyscl6sxFRAY+rvN7h7WB0lcG0o4NoV6ZQU32OZGVsYUsfLGgPQpDFdkfjlJQ==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.16.5.tgz", + "integrity": "sha512-+DpCAJFPAvViR17PIMi9x2AE34dll5wNlXO43wagAX2YcRGgEVHCNFC4azG85b4YyyFarvkc/iD5NPrz4Oneqw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" } }, "@babel/plugin-transform-function-name": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.16.0.tgz", - "integrity": "sha512-lBzMle9jcOXtSOXUpc7tvvTpENu/NuekNJVova5lCCWCV9/U1ho2HH2y0p6mBg8fPm/syEAbfaaemYGOHCY3mg==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.16.5.tgz", + "integrity": "sha512-Fuec/KPSpVLbGo6z1RPw4EE1X+z9gZk1uQmnYy7v4xr4TO9p41v1AoUuXEtyqAI7H+xNJYSICzRqZBhDEkd3kQ==", "dev": true, "requires": { "@babel/helper-function-name": "^7.16.0", - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" }, "dependencies": { "@babel/code-frame": { @@ -1904,9 +1940,9 @@ } }, "@babel/parser": { - "version": "7.16.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.16.4.tgz", - "integrity": "sha512-6V0qdPUaiVHH3RtZeLIsc+6pDhbYzHR8ogA8w+f+Wc77DuXto19g2QUwveINoS34Uw+W8/hQDGJCx+i4n7xcng==", + "version": "7.16.6", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.16.6.tgz", + "integrity": "sha512-Gr86ujcNuPDnNOY8mi383Hvi8IYrJVJYuf3XcuBM/Dgd+bINn/7tHqsj+tKkoreMbmGsFLsltI/JJd8fOFWGDQ==", "dev": true }, "@babel/template": { @@ -1933,55 +1969,55 @@ } }, "@babel/plugin-transform-literals": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.16.0.tgz", - "integrity": "sha512-gQDlsSF1iv9RU04clgXqRjrPyyoJMTclFt3K1cjLmTKikc0s/6vE3hlDeEVC71wLTRu72Fq7650kABrdTc2wMQ==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.16.5.tgz", + "integrity": "sha512-B1j9C/IfvshnPcklsc93AVLTrNVa69iSqztylZH6qnmiAsDDOmmjEYqOm3Ts2lGSgTSywnBNiqC949VdD0/gfw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" } }, "@babel/plugin-transform-member-expression-literals": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.16.0.tgz", - "integrity": "sha512-WRpw5HL4Jhnxw8QARzRvwojp9MIE7Tdk3ez6vRyUk1MwgjJN0aNpRoXainLR5SgxmoXx/vsXGZ6OthP6t/RbUg==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.16.5.tgz", + "integrity": "sha512-d57i3vPHWgIde/9Y8W/xSFUndhvhZN5Wu2TjRrN1MVz5KzdUihKnfDVlfP1U7mS5DNj/WHHhaE4/tTi4hIyHwQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" } }, "@babel/plugin-transform-modules-amd": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.16.0.tgz", - "integrity": "sha512-rWFhWbCJ9Wdmzln1NmSCqn7P0RAD+ogXG/bd9Kg5c7PKWkJtkiXmYsMBeXjDlzHpVTJ4I/hnjs45zX4dEv81xw==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.16.5.tgz", + "integrity": "sha512-oHI15S/hdJuSCfnwIz+4lm6wu/wBn7oJ8+QrkzPPwSFGXk8kgdI/AIKcbR/XnD1nQVMg/i6eNaXpszbGuwYDRQ==", "dev": true, "requires": { - "@babel/helper-module-transforms": "^7.16.0", - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-module-transforms": "^7.16.5", + "@babel/helper-plugin-utils": "^7.16.5", "babel-plugin-dynamic-import-node": "^2.3.3" } }, "@babel/plugin-transform-modules-commonjs": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.16.0.tgz", - "integrity": "sha512-Dzi+NWqyEotgzk/sb7kgQPJQf7AJkQBWsVp1N6JWc1lBVo0vkElUnGdr1PzUBmfsCCN5OOFya3RtpeHk15oLKQ==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.16.5.tgz", + "integrity": "sha512-ABhUkxvoQyqhCWyb8xXtfwqNMJD7tx+irIRnUh6lmyFud7Jln1WzONXKlax1fg/ey178EXbs4bSGNd6PngO+SQ==", "dev": true, "requires": { - "@babel/helper-module-transforms": "^7.16.0", - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-module-transforms": "^7.16.5", + "@babel/helper-plugin-utils": "^7.16.5", "@babel/helper-simple-access": "^7.16.0", "babel-plugin-dynamic-import-node": "^2.3.3" } }, "@babel/plugin-transform-modules-systemjs": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.16.0.tgz", - "integrity": "sha512-yuGBaHS3lF1m/5R+6fjIke64ii5luRUg97N2wr+z1sF0V+sNSXPxXDdEEL/iYLszsN5VKxVB1IPfEqhzVpiqvg==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.16.5.tgz", + "integrity": "sha512-53gmLdScNN28XpjEVIm7LbWnD/b/TpbwKbLk6KV4KqC9WyU6rq1jnNmVG6UgAdQZVVGZVoik3DqHNxk4/EvrjA==", "dev": true, "requires": { "@babel/helper-hoist-variables": "^7.16.0", - "@babel/helper-module-transforms": "^7.16.0", - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-module-transforms": "^7.16.5", + "@babel/helper-plugin-utils": "^7.16.5", "@babel/helper-validator-identifier": "^7.15.7", "babel-plugin-dynamic-import-node": "^2.3.3" }, @@ -1995,171 +2031,171 @@ } }, "@babel/plugin-transform-modules-umd": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.16.0.tgz", - "integrity": "sha512-nx4f6no57himWiHhxDM5pjwhae5vLpTK2zCnDH8+wNLJy0TVER/LJRHl2bkt6w9Aad2sPD5iNNoUpY3X9sTGDg==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.16.5.tgz", + "integrity": "sha512-qTFnpxHMoenNHkS3VoWRdwrcJ3FhX567GvDA3hRZKF0Dj8Fmg0UzySZp3AP2mShl/bzcywb/UWAMQIjA1bhXvw==", "dev": true, "requires": { - "@babel/helper-module-transforms": "^7.16.0", - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-module-transforms": "^7.16.5", + "@babel/helper-plugin-utils": "^7.16.5" } }, "@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.16.0.tgz", - "integrity": "sha512-LogN88uO+7EhxWc8WZuQ8vxdSyVGxhkh8WTC3tzlT8LccMuQdA81e9SGV6zY7kY2LjDhhDOFdQVxdGwPyBCnvg==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.16.5.tgz", + "integrity": "sha512-/wqGDgvFUeKELW6ex6QB7dLVRkd5ehjw34tpXu1nhKC0sFfmaLabIswnpf8JgDyV2NeDmZiwoOb0rAmxciNfjA==", "dev": true, "requires": { "@babel/helper-create-regexp-features-plugin": "^7.16.0" } }, "@babel/plugin-transform-new-target": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.16.0.tgz", - "integrity": "sha512-fhjrDEYv2DBsGN/P6rlqakwRwIp7rBGLPbrKxwh7oVt5NNkIhZVOY2GRV+ULLsQri1bDqwDWnU3vhlmx5B2aCw==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.16.5.tgz", + "integrity": "sha512-ZaIrnXF08ZC8jnKR4/5g7YakGVL6go6V9ql6Jl3ecO8PQaQqFE74CuM384kezju7Z9nGCCA20BqZaR1tJ/WvHg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" } }, "@babel/plugin-transform-object-super": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.16.0.tgz", - "integrity": "sha512-fds+puedQHn4cPLshoHcR1DTMN0q1V9ou0mUjm8whx9pGcNvDrVVrgw+KJzzCaiTdaYhldtrUps8DWVMgrSEyg==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.16.5.tgz", + "integrity": "sha512-tded+yZEXuxt9Jdtkc1RraW1zMF/GalVxaVVxh41IYwirdRgyAxxxCKZ9XB7LxZqmsjfjALxupNE1MIz9KH+Zg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-replace-supers": "^7.16.0" + "@babel/helper-plugin-utils": "^7.16.5", + "@babel/helper-replace-supers": "^7.16.5" } }, "@babel/plugin-transform-parameters": { - "version": "7.16.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.16.3.tgz", - "integrity": "sha512-3MaDpJrOXT1MZ/WCmkOFo7EtmVVC8H4EUZVrHvFOsmwkk4lOjQj8rzv8JKUZV4YoQKeoIgk07GO+acPU9IMu/w==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.16.5.tgz", + "integrity": "sha512-B3O6AL5oPop1jAVg8CV+haeUte9oFuY85zu0jwnRNZZi3tVAbJriu5tag/oaO2kGaQM/7q7aGPBlTI5/sr9enA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" } }, "@babel/plugin-transform-property-literals": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.16.0.tgz", - "integrity": "sha512-XLldD4V8+pOqX2hwfWhgwXzGdnDOThxaNTgqagOcpBgIxbUvpgU2FMvo5E1RyHbk756WYgdbS0T8y0Cj9FKkWQ==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.16.5.tgz", + "integrity": "sha512-+IRcVW71VdF9pEH/2R/Apab4a19LVvdVsr/gEeotH00vSDVlKD+XgfSIw+cgGWsjDB/ziqGv/pGoQZBIiQVXHg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" } }, "@babel/plugin-transform-regenerator": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.16.0.tgz", - "integrity": "sha512-JAvGxgKuwS2PihiSFaDrp94XOzzTUeDeOQlcKzVAyaPap7BnZXK/lvMDiubkPTdotPKOIZq9xWXWnggUMYiExg==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.16.5.tgz", + "integrity": "sha512-2z+it2eVWU8TtQQRauvGUqZwLy4+7rTfo6wO4npr+fvvN1SW30ZF3O/ZRCNmTuu4F5MIP8OJhXAhRV5QMJOuYg==", "dev": true, "requires": { "regenerator-transform": "^0.14.2" } }, "@babel/plugin-transform-reserved-words": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.16.0.tgz", - "integrity": "sha512-Dgs8NNCehHSvXdhEhln8u/TtJxfVwGYCgP2OOr5Z3Ar+B+zXicEOKNTyc+eca2cuEOMtjW6m9P9ijOt8QdqWkg==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.16.5.tgz", + "integrity": "sha512-aIB16u8lNcf7drkhXJRoggOxSTUAuihTSTfAcpynowGJOZiGf+Yvi7RuTwFzVYSYPmWyARsPqUGoZWWWxLiknw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" } }, "@babel/plugin-transform-shorthand-properties": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.16.0.tgz", - "integrity": "sha512-iVb1mTcD8fuhSv3k99+5tlXu5N0v8/DPm2mO3WACLG6al1CGZH7v09HJyUb1TtYl/Z+KrM6pHSIJdZxP5A+xow==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.16.5.tgz", + "integrity": "sha512-ZbuWVcY+MAXJuuW7qDoCwoxDUNClfZxoo7/4swVbOW1s/qYLOMHlm9YRWMsxMFuLs44eXsv4op1vAaBaBaDMVg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" } }, "@babel/plugin-transform-spread": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.16.0.tgz", - "integrity": "sha512-Ao4MSYRaLAQczZVp9/7E7QHsCuK92yHRrmVNRe/SlEJjhzivq0BSn8mEraimL8wizHZ3fuaHxKH0iwzI13GyGg==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.16.5.tgz", + "integrity": "sha512-5d6l/cnG7Lw4tGHEoga4xSkYp1euP7LAtrah1h1PgJ3JY7yNsjybsxQAnVK4JbtReZ/8z6ASVmd3QhYYKLaKZw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-plugin-utils": "^7.16.5", "@babel/helper-skip-transparent-expression-wrappers": "^7.16.0" } }, "@babel/plugin-transform-sticky-regex": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.16.0.tgz", - "integrity": "sha512-/ntT2NljR9foobKk4E/YyOSwcGUXtYWv5tinMK/3RkypyNBNdhHUaq6Orw5DWq9ZcNlS03BIlEALFeQgeVAo4Q==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.16.5.tgz", + "integrity": "sha512-usYsuO1ID2LXxzuUxifgWtJemP7wL2uZtyrTVM4PKqsmJycdS4U4mGovL5xXkfUheds10Dd2PjoQLXw6zCsCbg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" } }, "@babel/plugin-transform-template-literals": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.16.0.tgz", - "integrity": "sha512-Rd4Ic89hA/f7xUSJQk5PnC+4so50vBoBfxjdQAdvngwidM8jYIBVxBZ/sARxD4e0yMXRbJVDrYf7dyRtIIKT6Q==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.16.5.tgz", + "integrity": "sha512-gnyKy9RyFhkovex4BjKWL3BVYzUDG6zC0gba7VMLbQoDuqMfJ1SDXs8k/XK41Mmt1Hyp4qNAvGFb9hKzdCqBRQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" } }, "@babel/plugin-transform-typeof-symbol": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.16.0.tgz", - "integrity": "sha512-++V2L8Bdf4vcaHi2raILnptTBjGEFxn5315YU+e8+EqXIucA+q349qWngCLpUYqqv233suJ6NOienIVUpS9cqg==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.16.5.tgz", + "integrity": "sha512-ldxCkW180qbrvyCVDzAUZqB0TAeF8W/vGJoRcaf75awm6By+PxfJKvuqVAnq8N9wz5Xa6mSpM19OfVKKVmGHSQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" } }, "@babel/plugin-transform-unicode-escapes": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.16.0.tgz", - "integrity": "sha512-VFi4dhgJM7Bpk8lRc5CMaRGlKZ29W9C3geZjt9beuzSUrlJxsNwX7ReLwaL6WEvsOf2EQkyIJEPtF8EXjB/g2A==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.16.5.tgz", + "integrity": "sha512-shiCBHTIIChGLdyojsKQjoAyB8MBwat25lKM7MJjbe1hE0bgIppD+LX9afr41lLHOhqceqeWl4FkLp+Bgn9o1Q==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" } }, "@babel/plugin-transform-unicode-regex": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.16.0.tgz", - "integrity": "sha512-jHLK4LxhHjvCeZDWyA9c+P9XH1sOxRd1RO9xMtDVRAOND/PczPqizEtVdx4TQF/wyPaewqpT+tgQFYMnN/P94A==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.16.5.tgz", + "integrity": "sha512-GTJ4IW012tiPEMMubd7sD07iU9O/LOo8Q/oU4xNhcaq0Xn8+6TcUQaHtC8YxySo1T+ErQ8RaWogIEeFhKGNPzw==", "dev": true, "requires": { "@babel/helper-create-regexp-features-plugin": "^7.16.0", - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.5" } }, "@babel/preset-env": { - "version": "7.16.4", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.16.4.tgz", - "integrity": "sha512-v0QtNd81v/xKj4gNKeuAerQ/azeNn/G1B1qMLeXOcV8+4TWlD2j3NV1u8q29SDFBXx/NBq5kyEAO+0mpRgacjA==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.16.5.tgz", + "integrity": "sha512-MiJJW5pwsktG61NDxpZ4oJ1CKxM1ncam9bzRtx9g40/WkLRkxFP6mhpkYV0/DxcciqoiHicx291+eUQrXb/SfQ==", "dev": true, "requires": { "@babel/compat-data": "^7.16.4", "@babel/helper-compilation-targets": "^7.16.3", - "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-plugin-utils": "^7.16.5", "@babel/helper-validator-option": "^7.14.5", "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.16.2", "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.16.0", - "@babel/plugin-proposal-async-generator-functions": "^7.16.4", - "@babel/plugin-proposal-class-properties": "^7.16.0", - "@babel/plugin-proposal-class-static-block": "^7.16.0", - "@babel/plugin-proposal-dynamic-import": "^7.16.0", - "@babel/plugin-proposal-export-namespace-from": "^7.16.0", - "@babel/plugin-proposal-json-strings": "^7.16.0", - "@babel/plugin-proposal-logical-assignment-operators": "^7.16.0", - "@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.0", - "@babel/plugin-proposal-numeric-separator": "^7.16.0", - "@babel/plugin-proposal-object-rest-spread": "^7.16.0", - "@babel/plugin-proposal-optional-catch-binding": "^7.16.0", - "@babel/plugin-proposal-optional-chaining": "^7.16.0", - "@babel/plugin-proposal-private-methods": "^7.16.0", - "@babel/plugin-proposal-private-property-in-object": "^7.16.0", - "@babel/plugin-proposal-unicode-property-regex": "^7.16.0", + "@babel/plugin-proposal-async-generator-functions": "^7.16.5", + "@babel/plugin-proposal-class-properties": "^7.16.5", + "@babel/plugin-proposal-class-static-block": "^7.16.5", + "@babel/plugin-proposal-dynamic-import": "^7.16.5", + "@babel/plugin-proposal-export-namespace-from": "^7.16.5", + "@babel/plugin-proposal-json-strings": "^7.16.5", + "@babel/plugin-proposal-logical-assignment-operators": "^7.16.5", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.5", + "@babel/plugin-proposal-numeric-separator": "^7.16.5", + "@babel/plugin-proposal-object-rest-spread": "^7.16.5", + "@babel/plugin-proposal-optional-catch-binding": "^7.16.5", + "@babel/plugin-proposal-optional-chaining": "^7.16.5", + "@babel/plugin-proposal-private-methods": "^7.16.5", + "@babel/plugin-proposal-private-property-in-object": "^7.16.5", + "@babel/plugin-proposal-unicode-property-regex": "^7.16.5", "@babel/plugin-syntax-async-generators": "^7.8.4", "@babel/plugin-syntax-class-properties": "^7.12.13", "@babel/plugin-syntax-class-static-block": "^7.14.5", @@ -2174,38 +2210,38 @@ "@babel/plugin-syntax-optional-chaining": "^7.8.3", "@babel/plugin-syntax-private-property-in-object": "^7.14.5", "@babel/plugin-syntax-top-level-await": "^7.14.5", - "@babel/plugin-transform-arrow-functions": "^7.16.0", - "@babel/plugin-transform-async-to-generator": "^7.16.0", - "@babel/plugin-transform-block-scoped-functions": "^7.16.0", - "@babel/plugin-transform-block-scoping": "^7.16.0", - "@babel/plugin-transform-classes": "^7.16.0", - "@babel/plugin-transform-computed-properties": "^7.16.0", - "@babel/plugin-transform-destructuring": "^7.16.0", - "@babel/plugin-transform-dotall-regex": "^7.16.0", - "@babel/plugin-transform-duplicate-keys": "^7.16.0", - "@babel/plugin-transform-exponentiation-operator": "^7.16.0", - "@babel/plugin-transform-for-of": "^7.16.0", - "@babel/plugin-transform-function-name": "^7.16.0", - "@babel/plugin-transform-literals": "^7.16.0", - "@babel/plugin-transform-member-expression-literals": "^7.16.0", - "@babel/plugin-transform-modules-amd": "^7.16.0", - "@babel/plugin-transform-modules-commonjs": "^7.16.0", - "@babel/plugin-transform-modules-systemjs": "^7.16.0", - "@babel/plugin-transform-modules-umd": "^7.16.0", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.16.0", - "@babel/plugin-transform-new-target": "^7.16.0", - "@babel/plugin-transform-object-super": "^7.16.0", - "@babel/plugin-transform-parameters": "^7.16.3", - "@babel/plugin-transform-property-literals": "^7.16.0", - "@babel/plugin-transform-regenerator": "^7.16.0", - "@babel/plugin-transform-reserved-words": "^7.16.0", - "@babel/plugin-transform-shorthand-properties": "^7.16.0", - "@babel/plugin-transform-spread": "^7.16.0", - "@babel/plugin-transform-sticky-regex": "^7.16.0", - "@babel/plugin-transform-template-literals": "^7.16.0", - "@babel/plugin-transform-typeof-symbol": "^7.16.0", - "@babel/plugin-transform-unicode-escapes": "^7.16.0", - "@babel/plugin-transform-unicode-regex": "^7.16.0", + "@babel/plugin-transform-arrow-functions": "^7.16.5", + "@babel/plugin-transform-async-to-generator": "^7.16.5", + "@babel/plugin-transform-block-scoped-functions": "^7.16.5", + "@babel/plugin-transform-block-scoping": "^7.16.5", + "@babel/plugin-transform-classes": "^7.16.5", + "@babel/plugin-transform-computed-properties": "^7.16.5", + "@babel/plugin-transform-destructuring": "^7.16.5", + "@babel/plugin-transform-dotall-regex": "^7.16.5", + "@babel/plugin-transform-duplicate-keys": "^7.16.5", + "@babel/plugin-transform-exponentiation-operator": "^7.16.5", + "@babel/plugin-transform-for-of": "^7.16.5", + "@babel/plugin-transform-function-name": "^7.16.5", + "@babel/plugin-transform-literals": "^7.16.5", + "@babel/plugin-transform-member-expression-literals": "^7.16.5", + "@babel/plugin-transform-modules-amd": "^7.16.5", + "@babel/plugin-transform-modules-commonjs": "^7.16.5", + "@babel/plugin-transform-modules-systemjs": "^7.16.5", + "@babel/plugin-transform-modules-umd": "^7.16.5", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.16.5", + "@babel/plugin-transform-new-target": "^7.16.5", + "@babel/plugin-transform-object-super": "^7.16.5", + "@babel/plugin-transform-parameters": "^7.16.5", + "@babel/plugin-transform-property-literals": "^7.16.5", + "@babel/plugin-transform-regenerator": "^7.16.5", + "@babel/plugin-transform-reserved-words": "^7.16.5", + "@babel/plugin-transform-shorthand-properties": "^7.16.5", + "@babel/plugin-transform-spread": "^7.16.5", + "@babel/plugin-transform-sticky-regex": "^7.16.5", + "@babel/plugin-transform-template-literals": "^7.16.5", + "@babel/plugin-transform-typeof-symbol": "^7.16.5", + "@babel/plugin-transform-unicode-escapes": "^7.16.5", + "@babel/plugin-transform-unicode-regex": "^7.16.5", "@babel/preset-modules": "^0.1.5", "@babel/types": "^7.16.0", "babel-plugin-polyfill-corejs2": "^0.3.0", @@ -2253,9 +2289,9 @@ } }, "@babel/runtime": { - "version": "7.16.3", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.16.3.tgz", - "integrity": "sha512-WBwekcqacdY2e9AF/Q7WLFUWmdJGJTkbjqTjoMDgXkVZ3ZRUvOPsLb5KdwISoQVsbP+DQzVZW4Zhci0DvpbNTQ==", + "version": "7.16.5", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.16.5.tgz", + "integrity": "sha512-TXWihFIS3Pyv5hzR7j6ihmeLkZfrXGxAr5UfSl8CHf+6q/wpiYDkUau0czckpYG8QmnCIuPpdLtuA9VmuGGyMA==", "dev": true, "requires": { "regenerator-runtime": "^0.13.4" @@ -3238,13 +3274,13 @@ } }, "browserslist": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.18.1.tgz", - "integrity": "sha512-8ScCzdpPwR2wQh8IT82CA2VgDwjHyqMovPBZSNH54+tm4Jk2pCuv90gmAdH6J84OCRWi0b4gMe6O6XPXuJnjgQ==", + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.19.1.tgz", + "integrity": "sha512-u2tbbG5PdKRTUoctO3NBD8FQ5HdPh1ZXPHzp1rwaa5jTc+RV9/+RlWiAIKmjRPQF+xbGM9Kklj5bZQFa2s/38A==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30001280", - "electron-to-chromium": "^1.3.896", + "caniuse-lite": "^1.0.30001286", + "electron-to-chromium": "^1.4.17", "escalade": "^3.1.1", "node-releases": "^2.0.1", "picocolors": "^1.0.0" @@ -3273,9 +3309,9 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30001284", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001284.tgz", - "integrity": "sha512-t28SKa7g6kiIQi6NHeOcKrOrGMzCRrXvlasPwWC26TH2QNdglgzQIRUuJ0cR3NeQPH+5jpuveeeSFDLm2zbkEw==", + "version": "1.0.30001292", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001292.tgz", + "integrity": "sha512-jnT4Tq0Q4ma+6nncYQVe7d73kmDmE9C3OGTx3MvW7lBM/eY1S1DZTMBON7dqV481RhNiS5OxD7k9JQvmDOTirw==", "dev": true }, "chalk": { @@ -3411,12 +3447,12 @@ } }, "core-js-compat": { - "version": "3.19.2", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.19.2.tgz", - "integrity": "sha512-ObBY1W5vx/LFFMaL1P5Udo4Npib6fu+cMokeziWkA8Tns4FcDemKF5j9JvaI5JhdkW8EQJQGJN1EcrzmEwuAqQ==", + "version": "3.20.1", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.20.1.tgz", + "integrity": "sha512-AVhKZNpqMV3Jz8hU0YEXXE06qoxtQGsAqU0u1neUngz5IusDJRX/ZJ6t3i7mS7QxNyEONbCo14GprkBrxPlTZA==", "dev": true, "requires": { - "browserslist": "^4.18.1", + "browserslist": "^4.19.1", "semver": "7.0.0" }, "dependencies": { @@ -3527,9 +3563,9 @@ } }, "electron-to-chromium": { - "version": "1.4.11", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.11.tgz", - "integrity": "sha512-2OhsaYgsWGhWjx2et8kaUcdktPbBGjKM2X0BReUCKcSCPttEY+hz2zie820JLbttU8jwL92+JJysWwkut3wZgA==", + "version": "1.4.28", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.28.tgz", + "integrity": "sha512-Gzbf0wUtKfyPaqf0Plz+Ctinf9eQIzxEqBHwSvbGfeOm9GMNdLxyu1dNiCUfM+x6r4BE0xUJNh3Nmg9gfAtTmg==", "dev": true }, "emoji-regex": { diff --git a/package.json b/package.json index 9f5e14c..a99ad63 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hapi-audit-rest", - "version": "3.5.2", + "version": "4.0.0", "description": "A NPM package to audit rest API calls on a Hapi.js server", "main": "lib/index.js", "files": [ @@ -8,7 +8,7 @@ "lib/" ], "engines": { - "node": ">=12.0.0" + "node": ">=14.0.0" }, "scripts": { "build": "node_modules/.bin/babel ./src -d ./lib", @@ -44,8 +44,8 @@ "homepage": "https://github.com/denlap007/hapi-audit-rest#readme", "devDependencies": { "@babel/cli": "^7.16.0", - "@babel/core": "^7.16.0", - "@babel/preset-env": "^7.16.4", + "@babel/core": "^7.16.5", + "@babel/preset-env": "^7.16.5", "@hapi/code": "^8.0.5", "@hapi/h2o2": "^9.1.0", "@hapi/hapi": "^20.2.1", diff --git a/src/dtos/AuditMutation.js b/src/dtos/AuditMutation.js index 7f2d9ab..db9b973 100644 --- a/src/dtos/AuditMutation.js +++ b/src/dtos/AuditMutation.js @@ -16,12 +16,14 @@ class AuditMutation { } = input; let httpAction = null; - if (!action && `${method}`.toLowerCase() === "put") { - httpAction = MUTATION_ACTION.MUTATION_UPDATE; - } else if (!action && `${method}`.toLowerCase() === "post") { - httpAction = MUTATION_ACTION.MUTATION_CREATE; - } else if (!action && `${method}`.toLowerCase() === "delete") { - httpAction = MUTATION_ACTION.MUTATION_DELETE; + if (!action) { + if (method === "put") { + httpAction = MUTATION_ACTION.MUTATION_UPDATE; + } else if (!action && method === "post") { + httpAction = MUTATION_ACTION.MUTATION_CREATE; + } else if (!action && method === "delete") { + httpAction = MUTATION_ACTION.MUTATION_DELETE; + } } this.application = application; diff --git a/src/index.js b/src/index.js index cd82172..810aa9b 100644 --- a/src/index.js +++ b/src/index.js @@ -11,7 +11,7 @@ internals.pluginName = "hapi-audit-rest"; internals.schema = Schemas.baseSchema; internals.handleError = (settings, request, error) => { - if (settings.showErrorsOnStdErr) { + if (settings.debug) { console.error(`[${internals.pluginName}]`, error); } request.log(["error", internals.pluginName], error.message); @@ -84,28 +84,27 @@ exports.plugin = { } = request; /** - * skip audit if disabled on route, not authenticated and auditAuthOnly enabled, path does not match criteria - * if this will be handled as a custom action skip to process on preResponse, is GET request go on preResponse + * skip pre-handler if disabled on route, is GET request, request not auditable + * if this will be handled as a custom action skip to process on preResponse */ if ( !Utils.isEnabled(routeOptions) || - (settings.auditAuthOnly && !request.auth.isAuthenticated) || - !settings.isAuditable(pathname, method) || - routeOptions.isAction || - Utils.isRead(method) + Utils.isRead(method) || + !settings.isAuditable(request) || + routeOptions.isAction ) { return h.continue; } // Ovveride, creates GET endpoint const pathOverride = Validate.attempt( - routeOptions.getPath?.(request), + routeOptions.setInjectedPath?.(request), Schemas.getRoutePath ); const getEndpoint = Utils.toEndpoint("get", pathname, pathOverride); if (Utils.isUpdate(method)) { - let oldVals = settings.cacheEnabled ? oldValsCache.get(getEndpoint) : null; + let oldVals = settings.isCacheEnabled ? oldValsCache.get(getEndpoint) : null; if (oldVals == null) { oldVals = await internals.fetchValues(request, pathOverride); @@ -137,22 +136,19 @@ exports.plugin = { response: { source: resp, statusCode }, } = request; const { injected } = headers; - /** - * skip audit IF disabled on route, not authenticated and auditAuthOnly enabled, path does not match criteria, - * call failed, is GET request and disabled, is injected GET request - */ + + // skip audit IF disabled on route, request not auditable, call failed, is injected GET request if ( !Utils.isEnabled(routeOptions) || - (settings.auditAuthOnly && !request.auth.isAuthenticated) || - !settings.isAuditable(pathname, method) || + !settings.isAuditable(request) || !Utils.isSuccess(statusCode) || - !Utils.isGetRequestAuditable(method, settings.auditGetRequests, injected) + !!injected ) { return h.continue; } const pathOverride = Validate.attempt( - routeOptions.getPath?.(request), + routeOptions.setInjectedPath?.(request), Schemas.getRoutePath ); const createMutation = Utils.initMutation({ @@ -175,12 +171,12 @@ exports.plugin = { const entityId = auditLog?.entityId || Utils.getId(params); // cache only GET by id response - if (settings.cacheEnabled && !Utils.isStream(resp) && !!entityId) { + if (settings.isCacheEnabled && !Utils.isStream(resp) && !!entityId) { oldValsCache.set(getEndpoint, resp); } auditLog = createAction({ - entity: settings.getEntity(pathname), + entity: settings.setEntity(pathname), entityId, data: query, ...auditLog, @@ -197,7 +193,7 @@ exports.plugin = { } auditLog = createAction({ - entity: settings.getEntity(pathname), + entity: settings.setEntity(pathname), entityId: Utils.isStream(reqPayload) ? Utils.getId(params) : Utils.getId(params, reqPayload), @@ -228,7 +224,7 @@ exports.plugin = { const [originalValues, newValues] = settings.diffFunc(oldVals, newVals); auditLog = createMutation({ - entity: settings.getEntity(pathname), + entity: settings.setEntity(pathname), entityId: Utils.getId(params, newVals), originalValues, newValues, @@ -243,7 +239,7 @@ exports.plugin = { Validate.assert(auditLog, Schemas.mutationSchema); auditLog = createMutation({ - entity: settings.getEntity(pathname), + entity: settings.setEntity(pathname), entityId: Utils.getId(params, oldVals), originalValues: oldVals, ...auditLog, @@ -256,7 +252,7 @@ exports.plugin = { Validate.assert(auditLog, Schemas.mutationSchema); auditLog = createMutation({ - entity: settings.getEntity(pathname), + entity: settings.setEntity(pathname), entityId: Utils.getId(null, data), newValues: data, ...auditLog, diff --git a/src/schemas.js b/src/schemas.js index 6da5fb4..994c3d6 100644 --- a/src/schemas.js +++ b/src/schemas.js @@ -7,47 +7,32 @@ const constants = { DEFAULT_SOURCE_ID: "id", }; -const isAuditable = () => (path, method) => path.startsWith("/api"); -const eventHandler = () => ({ auditLog, endpoint }) => { - console.log(`Audit Log Record for: ${endpoint}\n`, JSON.stringify(auditLog, null, 4)); -}; +const isAuditable = () => () => true; +const eventHandler = + () => + ({ auditLog, endpoint }) => { + console.log(`Audit Log Record for: ${endpoint}\n`, JSON.stringify(auditLog, null, 4)); + }; const diff = () => (left, right) => [left, right]; -const getEntity = () => (path) => { - let entity = ""; - - if (path.startsWith("/api")) { - entity = path.split("/")[2]; - } - - if (!entity) { - throw new Error(`[getEntity] ERROR: Could not extract entity for path: ${path}`); - } - - return entity; -}; +const setEntity = () => (path) => path; export default { baseSchema: Validate.object({ auditGetRequests: Validate.boolean().default(true), - showErrorsOnStdErr: Validate.boolean().default(true), + debug: Validate.boolean().default(false), diffFunc: Validate.func().arity(2).default(diff), - cacheEnabled: Validate.boolean().default(true), + isCacheEnabled: Validate.boolean().default(true), clientId: Validate.string().default(constants.DERAULT_CLIENT_ID), - auditAuthOnly: Validate.boolean().default(false), - usernameKey: Validate.string().when("auditAuthOnly", { - is: true, - then: Validate.string().required(), - otherwise: Validate.any(), - }), + usernameKey: Validate.string(), cacheExpiresIn: Validate.number() .integer() .positive() .min(constants.ONE_MIN_MSECS) .default(constants.FIFTEEN_MINS_MSECS), - isAuditable: Validate.func().arity(2).default(isAuditable), + isAuditable: Validate.func().arity(1).default(isAuditable), eventHandler: Validate.func().arity(1).default(eventHandler), - getEntity: Validate.func().arity(1).default(getEntity), + setEntity: Validate.func().arity(1).default(setEntity), isEnabled: Validate.boolean().default(true), extAll: Validate.func(), }), @@ -55,7 +40,7 @@ export default { Validate.object({ ext: Validate.func(), isAction: Validate.boolean().default(false), - getPath: Validate.func(), + setInjectedPath: Validate.func(), fetchNewValues: Validate.boolean().default(false), }), Validate.boolean() diff --git a/src/utils.js b/src/utils.js index 73c84d2..dc64fc7 100644 --- a/src/utils.js +++ b/src/utils.js @@ -4,7 +4,9 @@ import AuditAction from "./dtos/AuditAction"; import AuditMutation from "./dtos/AuditMutation"; const isObject = (val) => typeof val === "object" && val !== null; + const ONE_MINUTE_MSECS = 60 * 1000; +const DEFAULT_ID = "id"; export default { clone: (obj) => JSON.parse(JSON.stringify(obj)), @@ -42,8 +44,6 @@ export default { action, }), gotResponseData: (data) => data != null, - isGetRequestAuditable: (method, auditGetRequests, injected) => - method === "get" ? injected == null && auditGetRequests : true, removeProps: (left, right, props) => { if (Array.isArray(props) && isObject(left) && isObject(right)) { props.forEach((key) => { @@ -70,7 +70,6 @@ export default { }, getId: (params, payload) => { const data = params || payload || {}; - const DEFAULT_ID = "id"; return data[DEFAULT_ID]; }, diff --git a/test/flows.js b/test/flows.js index c5db943..45b5c13 100644 --- a/test/flows.js +++ b/test/flows.js @@ -43,7 +43,8 @@ describe("flows with default settings", () => { options: { usernameKey: "userName", eventHandler: ({ auditLog, endpoint }) => {}, - showErrorsOnStdErr: false, + debug: false, + setEntity: (path) => path.split("/")[2], }, }, ]); diff --git a/test/proxy_flows.js b/test/proxy_flows.js index 11098b9..90b4f7c 100644 --- a/test/proxy_flows.js +++ b/test/proxy_flows.js @@ -47,7 +47,8 @@ describe("PROXY flows with default settings", () => { options: { usernameKey: "userName", eventHandler: ({ auditLog, endpoint }) => {}, - showErrorsOnStdErr: false, + debug: false, + setEntity: (path) => path.split("/")[2], }, }, h2o2, diff --git a/test/registration_options.js b/test/registration_options.js index 363112f..bb8d106 100644 --- a/test/registration_options.js +++ b/test/registration_options.js @@ -6,6 +6,8 @@ const plugin = require("../lib/index"); const { describe, it, before, after, afterEach, beforeEach } = (exports.lab = Lab.script()); +const internals = {}; + describe("Registration settings", () => { let server = null; let auditError = null; @@ -27,69 +29,13 @@ describe("Registration settings", () => { await server.stop(); }); - it("does not audit GET requests when auditGetRequests disabled", async () => { - await server.register({ - plugin, - options: { - auditGetRequests: false, - }, - }); - - server.events.on("hapi-audit-rest", ({ auditLog }) => { - auditEvent = auditLog; - }); - - server.route({ - method: "GET", - path: "/api/test", - handler: (request, h) => "OK", - }); - - const res = await server.inject({ - method: "get", - url: "/api/test", - }); - - expect(res.statusCode).to.equal(200); - expect(auditError).to.be.null(); - expect(auditEvent).be.null(); - }); - - it("does not audit requests when auditable returns false", async () => { - await server.register({ - plugin, - options: { - isAuditable: (path, method) => false, - }, - }); - - server.events.on("hapi-audit-rest", ({ auditLog }) => { - auditEvent = auditLog; - }); - - server.route({ - method: "GET", - path: "/api/test", - handler: (request, h) => "OK", - }); - - const res = await server.inject({ - method: "get", - url: "/api/test", - }); - - expect(res.statusCode).to.equal(200); - expect(auditError).to.be.null(); - expect(auditEvent).be.null(); - }); - it("does not use internal cache to fetch old values when disabled", async (flags) => { await server.register({ plugin, options: { - // override default so that audit logs are not printed eventHandler: (data) => {}, - cacheEnabled: false, + isCacheEnabled: false, + setEntity: (path) => path.split("/")[2], }, }); @@ -142,6 +88,7 @@ describe("Registration settings", () => { // override default so that audit logs are not printed eventHandler: (data) => {}, clientId, + setEntity: (path) => path.split("/")[2], }, }); @@ -177,39 +124,6 @@ describe("Registration settings", () => { }); }); - it("throws when getEntity is not overriden and route does not start with /api", async () => { - await server.register({ - plugin, - options: { - showErrorsOnStdErr: false, - // override default so that audit logs are not printed - eventHandler: (data) => {}, - isAuditable: (path, method) => true, - }, - }); - - server.events.on("hapi-audit-rest", ({ auditLog }) => { - auditEvent = auditLog; - }); - - server.route({ - method: "GET", - path: "/test/{id}", - handler: (request, h) => "OK", - }); - - const res = await server.inject({ - method: "get", - url: "/test/5", - }); - - expect(res.statusCode).to.equal(200); - expect(auditError.data).to.equal( - "[getEntity] ERROR: Could not extract entity for path: /test/5" - ); - expect(auditEvent).to.be.null(); - }); - it("throws and logs error to stderr", async () => { let loggedErr = null; @@ -222,10 +136,11 @@ describe("Registration settings", () => { await server.register({ plugin, options: { - showErrorsOnStdErr: true, - // override default so that audit logs are not printed + debug: true, eventHandler: (data) => {}, - isAuditable: (path, method) => true, + setEntity: (path) => { + throw new Error("custom test error"); + }, }, }); @@ -245,38 +160,16 @@ describe("Registration settings", () => { }); expect(res.statusCode).to.equal(200); - expect(auditError.data).to.equal( - "[getEntity] ERROR: Could not extract entity for path: /test/5" - ); + expect(auditError.data).to.equal("custom test error"); expect(auditEvent).to.be.null(); - expect(loggedErr).to.include( - "[getEntity] ERROR: Could not extract entity for path: /test/5" - ); + expect(loggedErr).to.include("custom test error"); }); - it("audits only authenticated requests when auditAuthOnly enabled", async () => { - server.auth.scheme("custom", (server, options) => { - const scheme = { - authenticate: (request, h) => { - const credentials = { - userName: "user", - }; - return h.authenticated({ credentials }); - }, - }; - - return scheme; - }); - server.auth.strategy("default", "custom", { name: "sid" }); - server.auth.default("default"); - + it("propagates the path as entity if setEntity function is not provided", async () => { await server.register({ plugin, options: { - // override default so that audit logs are not printed eventHandler: (data) => {}, - auditAuthOnly: true, - usernameKey: "userName", }, }); @@ -284,47 +177,27 @@ describe("Registration settings", () => { auditEvent = auditLog; }); - // no auth server.route({ method: "GET", - path: "/api/no-auth", + path: "/api/test/custom", handler: (request, h) => "OK", - options: { - auth: false, - }, }); const res = await server.inject({ method: "get", - url: "/api/no-auth", + url: "/api/test/custom", }); expect(res.statusCode).to.equal(200); expect(auditError).to.be.null(); - expect(auditEvent).to.be.null(); - - // with auth - server.route({ - method: "GET", - path: "/api/with-auth", - handler: (request, h) => "OK", - }); - - const authRes = await server.inject({ - method: "get", - url: "/api/with-auth", - }); - - expect(authRes.statusCode).to.equal(200); - expect(auditError).to.be.null(); expect(auditEvent).to.equal({ application: "my-app", type: "SEARCH", body: { - entity: "with-auth", + entity: "/api/test/custom", entityId: null, action: "SEARCH", - username: "user", + username: null, data: {}, timestamp: auditEvent.body.timestamp, }, @@ -332,13 +205,13 @@ describe("Registration settings", () => { }); }); - it("propagates correctly the entity if a getEntity function is provided", async () => { + it("propagates correctly the entity if a setEntity function is provided", async () => { await server.register({ plugin, options: { // override default so that audit logs are not printed eventHandler: (data) => {}, - getEntity: (path) => "entity-from-provided-getEntity", + setEntity: (path) => "entity-from-provided-setEntity", }, }); @@ -363,7 +236,7 @@ describe("Registration settings", () => { application: "my-app", type: "SEARCH", body: { - entity: "entity-from-provided-getEntity", + entity: "entity-from-provided-setEntity", entityId: null, action: "SEARCH", username: null, @@ -381,6 +254,7 @@ describe("Registration settings", () => { plugin, options: { isEnabled: false, + setEntity: (path) => path.split("/")[2], }, }); @@ -415,6 +289,7 @@ describe("Registration settings", () => { // override default so that audit logs are not printed eventHandler: (data) => {}, cacheExpiresIn: 60000, + setEntity: (path) => path.split("/")[2], }, }); @@ -513,6 +388,7 @@ describe("Registration settings", () => { outcome: "custom-outcome", }; }, + setEntity: (path) => path.split("/")[2], }, }); @@ -547,4 +423,34 @@ describe("Registration settings", () => { outcome: "custom-outcome", }); }); + + it("does not audit request if isAuditable returns false", async () => { + const routePath = "/api/test/custom"; + await server.register({ + plugin, + options: { + eventHandler: (data) => {}, + isAuditable: ({ path }) => path !== routePath, + }, + }); + + server.events.on("hapi-audit-rest", ({ auditLog }) => { + auditEvent = auditLog; + }); + + server.route({ + method: "GET", + path: routePath, + handler: (request, h) => "OK", + }); + + const res = await server.inject({ + method: "get", + url: routePath, + }); + + expect(res.statusCode).to.equal(200); + expect(auditError).to.be.null(); + expect(auditEvent).to.be.null(); + }); }); diff --git a/test/route_options.js b/test/route_options.js index 00b905c..8d21733 100644 --- a/test/route_options.js +++ b/test/route_options.js @@ -32,6 +32,7 @@ describe("Route settings", () => { plugin, options: { eventHandler: ({ auditLog, endpoint }) => {}, + setEntity: (path) => path.split("/")[2], }, }); @@ -89,6 +90,7 @@ describe("Route settings", () => { plugin, options: { eventHandler: ({ auditLog, endpoint }) => {}, + setEntity: (path) => path.split("/")[2], }, }); @@ -161,6 +163,7 @@ describe("Route settings", () => { plugin, options: { eventHandler: ({ auditLog, endpoint }) => {}, + setEntity: (path) => path.split("/")[2], }, }); @@ -213,11 +216,12 @@ describe("Route settings", () => { }); }); - it("overrides the default endpoint to get values before update when getPath function is provided", async () => { + it("overrides the default endpoint to get values before update when setInjectedPath function is provided", async () => { await server.register({ plugin, options: { eventHandler: ({ auditLog, endpoint }) => {}, + setEntity: (path) => path.split("/")[2], }, }); @@ -241,7 +245,7 @@ describe("Route settings", () => { options: { plugins: { "hapi-audit-rest": { - getPath: ({ query, params }) => `/api/different/${params.id}`, + setInjectedPath: ({ query, params }) => `/api/different/${params.id}`, }, }, }, @@ -276,6 +280,7 @@ describe("Route settings", () => { plugin, options: { eventHandler: ({ auditLog, endpoint }) => {}, + setEntity: (path) => path.split("/")[2], }, }); @@ -340,6 +345,9 @@ describe("Route settings", () => { it("validates route options", async () => { await server.register({ plugin, + options: { + setEntity: (path) => path.split("/")[2], + }, }); server.events.on("hapi-audit-rest", ({ auditLog }) => { @@ -355,7 +363,7 @@ describe("Route settings", () => { "hapi-audit-rest": { ext: async () => {}, isAction: true, - getPath: () => {}, + setInjectedPath: () => {}, fetchNewValues: true, }, }, @@ -373,6 +381,9 @@ describe("Route settings", () => { it("does not emit an audit record when disabled on route", async () => { await server.register({ plugin, + options: { + setEntity: (path) => path.split("/")[2], + }, }); server.events.on("hapi-audit-rest", ({ auditLog }) => {